id
stringlengths 40
40
| text
stringlengths 29
2.03k
| original_text
stringlengths 3
154k
| subdomain
stringclasses 20
values | metadata
dict | emb
listlengths 1.02k
1.02k
|
---|---|---|---|---|---|
51f4568b47c79cba33d102c2cfb7daf97ebc7257
|
Wordpress Stackexchange
Q: Wordpress Admins or Roles per Page I would like to define an admin that has Administrator rights to everything - thats of course possible, its the default functionality. then i would also like to create an admin (or role) that can only edit and see certain PAGES in the backend. i have gone through many plugins but i can't seem to find this functionality anywhere!
any ideas?
thanks!
mark
A: I recommend 2 plugins:
*
*User Role Editor: This plugin allows you create new roles and adjust their capabilities.
*Hide Admin Menu: This plugin allows you hide menu items based on user role. You just need to select which menu items will be hidden for curtain roles.
|
Q: Wordpress Admins or Roles per Page I would like to define an admin that has Administrator rights to everything - thats of course possible, its the default functionality. then i would also like to create an admin (or role) that can only edit and see certain PAGES in the backend. i have gone through many plugins but i can't seem to find this functionality anywhere!
any ideas?
thanks!
mark
A: I recommend 2 plugins:
*
*User Role Editor: This plugin allows you create new roles and adjust their capabilities.
*Hide Admin Menu: This plugin allows you hide menu items based on user role. You just need to select which menu items will be hidden for curtain roles.
A: There's only one plugin that I know it does that right now. It's called Press Permit, and you will need the Pro (paid) version if you want the functionality of editing specific pages. I am still looking for another alternative as the UI of this plugin is not the best.
A: I haven't seen any plugin that can do what you want.
You didn't cited any programming possibility, but if you want to scratch a plugin to do this exactly as you want, you might look at the user levels and admin hooks. Starting from there, you'll have to apply rules and modify the admin query for getting pages.
Perhaps, maybe the built-in user permissions (author and editor) can already do that, as authors can't edit things created by other users.
Hope it helps... somehow.
A: Try using http://wordpress.org/extend/plugins/adminimize/ its a great plugin I use on all the sites I do. You can leave admin as default but specify exactly what you want and dont want all other users to see. So you can hide everything but the pages section for all editors if you wanted.
Hope this helps.
A: Role Scoper (http://wordpress.org/extend/plugins/role-scoper/) is another option.
You can set permissions on a page or post basis, if you like. It is something I am looking into using for some of our forms. Has anyone compared it with adminimize and other similar plugins?
A: I share your frustration, I've searched a fair amount and was a little surprised. Most user role management plugins only give you the control to edit users' permissions on an entire post_type basis (i.e. managing the ability to edit ALL or No pages, posts, etc) or control permissions to edit plugins and settings.
I have found two that specifically manage users' permissions to edit specific pages but both require you to purchase their pro versions to have this ability
*
*Press Permit
*User Role Editor.
*Role Scoper had this option and it was free but its development was discontinued in 2016 and its author referred people to use Press Permit.
There is also Capability Manager Enhanced and advanced access manager but the major disadvantage is that you cannot enable more than 1 user to have edit permissions to a specific page.
|
wordpress
|
{
"language": "en",
"length": 493,
"provenance": "stackexchange_00019.jsonl.gz:407499",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11268"
}
|
[
0.053558349609375,
-0.00788116455078125,
0.025665283203125,
-0.00910186767578125,
-0.0080413818359375,
-0.025360107421875,
0.0228271484375,
-0.050994873046875,
-0.0160675048828125,
-0.00197601318359375,
0.0139312744140625,
-0.01141357421875,
-0.0152435302734375,
-0.05413818359375,
0.000057578086853027344,
-0.0303955078125,
-0.0000489354133605957,
0.009613037109375,
0.0029354095458984375,
-0.034332275390625,
0.00957489013671875,
-0.026214599609375,
0.00018453598022460938,
0.04254150390625,
0.0225372314453125,
-0.01485443115234375,
0.01910400390625,
-0.0123748779296875,
0.00365447998046875,
0.0005259513854980469,
0.0167083740234375,
-0.019683837890625,
0.00791168212890625,
-0.024627685546875,
0.04931640625,
-0.0218963623046875,
-0.0253753662109375,
0.00919342041015625,
0.030670166015625,
-0.047088623046875,
0.006725311279296875,
0.015533447265625,
0.03790283203125,
0.08721923828125,
-0.0174713134765625,
-0.0706787109375,
0.033172607421875,
-0.03582763671875,
0.008758544921875,
-0.046173095703125,
0.0196533203125,
-0.00958251953125,
0.03765869140625,
-0.005367279052734375,
-0.019195556640625,
-0.002838134765625,
0.05419921875,
-0.00913238525390625,
0.051849365234375,
-0.057708740234375,
-0.065185546875,
-0.0306854248046875,
0.034454345703125,
-0.0207061767578125,
-0.01128387451171875,
-0.02001953125,
-0.0170440673828125,
0.0252532958984375,
-0.046905517578125,
-0.0020847320556640625,
0.037200927734375,
-0.0224456787109375,
0.01708984375,
-0.0151214599609375,
-0.0196990966796875,
0.0177154541015625,
0.005401611328125,
0.0196075439453125,
0.0291595458984375,
-0.00965118408203125,
0.0124664306640625,
-0.0109100341796875,
-0.0096282958984375,
-0.01342010498046875,
0.0023288726806640625,
0.01495361328125,
-0.01242828369140625,
-0.0074005126953125,
-0.0217132568359375,
0.00325775146484375,
-0.01824951171875,
-0.0205535888671875,
-0.029022216796875,
0.032745361328125,
0.00839996337890625,
0.005146026611328125,
0.03045654296875,
0.0487060546875,
0.0180511474609375,
0.0129852294921875,
-0.0155181884765625,
-0.03466796875,
0.0004737377166748047,
-0.0257568359375,
0.0135345458984375,
0.0430908203125,
-0.0059814453125,
0.015380859375,
0.034210205078125,
0.0159759521484375,
0.0083770751953125,
0.0129241943359375,
-0.0007786750793457031,
-0.0012197494506835938,
-0.018402099609375,
-0.02825927734375,
-0.0445556640625,
0.01317596435546875,
-0.01009368896484375,
0.0020771026611328125,
-0.0212860107421875,
-0.007244110107421875,
0.03521728515625,
-0.032257080078125,
-0.01049041748046875,
-0.02978515625,
-0.036407470703125,
-0.01154327392578125,
0.0254974365234375,
0.003185272216796875,
-0.0260009765625,
0.0052337646484375,
0.032684326171875,
0.01751708984375,
-0.004474639892578125,
-0.0038700103759765625,
0.016937255859375,
0.0010728836059570312,
-0.0024394989013671875,
0.0059051513671875,
-0.0081634521484375,
-0.0127410888671875,
0.01500701904296875,
-0.0076904296875,
-0.0251007080078125,
-0.00484466552734375,
0.01091766357421875,
0.032012939453125,
0.00749969482421875,
-0.0079498291015625,
-0.03106689453125,
-0.0087127685546875,
0.005985260009765625,
-0.0004668235778808594,
0.026611328125,
0.0271759033203125,
0.0022792816162109375,
0.02752685546875,
-0.020233154296875,
0.0384521484375,
0.006023406982421875,
0.00913238525390625,
0.03466796875,
-0.029205322265625,
-0.0426025390625,
-0.0242156982421875,
-0.03924560546875,
-0.0117340087890625,
0.020172119140625,
-0.08056640625,
0.06072998046875,
-0.033905029296875,
0.01522064208984375,
0.006969451904296875,
0.024566650390625,
0.0504150390625,
-0.0072174072265625,
0.01291656494140625,
0.00481414794921875,
-0.004985809326171875,
-0.0011348724365234375,
-0.0203399658203125,
0.0148162841796875,
0.0229644775390625,
-0.029937744140625,
-0.018280029296875,
-0.0044097900390625,
0.01393890380859375,
0.0287017822265625,
0.028411865234375,
0.00548553466796875,
-0.01031494140625,
0.003787994384765625,
-0.00009179115295410156,
-0.028106689453125,
-0.03656005859375,
0.01416778564453125,
0.0149688720703125,
-0.0219268798828125,
-0.00609588623046875,
0.01468658447265625,
-0.0213775634765625,
0.007740020751953125,
0.0013265609741210938,
-0.0088653564453125,
-0.0221710205078125,
-0.006160736083984375,
0.0028400421142578125,
0.01262664794921875,
0.027069091796875,
0.0028095245361328125,
0.007541656494140625,
0.00373077392578125,
-0.08697509765625,
-0.0309295654296875,
0.0101318359375,
-0.020721435546875,
0.034393310546875,
0.0031414031982421875,
0.01032257080078125,
0.0158538818359375,
-0.04107666015625,
0.00795745849609375,
0.0009050369262695312,
0.04913330078125,
0.0026092529296875,
0.01242828369140625,
-0.0031566619873046875,
0.09027099609375,
0.0152130126953125,
0.040863037109375,
-0.0097808837890625,
0.0511474609375,
0.051849365234375,
-0.01021575927734375,
-0.0094451904296875,
-0.00904083251953125,
-0.09197998046875,
0.003040313720703125,
0.061798095703125,
0.039337158203125,
0.00994110107421875,
-0.00882720947265625,
0.006168365478515625,
0.0153045654296875,
-0.08135986328125,
0.0111236572265625,
0.00792694091796875,
-0.02197265625,
0.0131378173828125,
-0.01678466796875,
0.0191802978515625,
0.0286102294921875,
-0.0017881393432617188,
-0.02001953125,
0.061859130859375,
-0.0242767333984375,
0.0214691162109375,
-0.0147552490234375,
-0.0191650390625,
-0.00860595703125,
-0.0224609375,
0.007049560546875,
-0.01995849609375,
-0.0008001327514648438,
-0.0185394287109375,
0.0115966796875,
0.0029315948486328125,
-0.0198516845703125,
-0.0213623046875,
0.036651611328125,
0.0227508544921875,
0.006832122802734375,
-0.00023365020751953125,
0.037811279296875,
-0.0207366943359375,
-0.039459228515625,
-0.005786895751953125,
0.0174102783203125,
-0.01013946533203125,
-0.0185089111328125,
0.000008404254913330078,
-0.046875,
-0.01373291015625,
0.002655029296875,
-0.035400390625,
-0.0037078857421875,
0.01654052734375,
0.032501220703125,
-0.0125732421875,
0.0168304443359375,
-0.0245513916015625,
-0.053253173828125,
0.06396484375,
-0.013916015625,
-0.052734375,
-0.0189208984375,
-0.059234619140625,
0.03985595703125,
-0.045501708984375,
0.03369140625,
0.06365966796875,
0.00980377197265625,
-0.006572723388671875,
0.01528167724609375,
-0.00870513916015625,
0.0047454833984375,
0.03265380859375,
0.019073486328125,
-0.00801849365234375,
-0.032012939453125,
0.0214996337890625,
0.004638671875,
-0.0215606689453125,
0.01320648193359375,
-0.026824951171875,
-0.038848876953125,
0.009979248046875,
-0.046417236328125,
0.0054779052734375,
-0.01166534423828125,
-0.08404541015625,
-0.01309967041015625,
0.01007843017578125,
-0.042572021484375,
0.0037937164306640625,
0.058868408203125,
0.007709503173828125,
-0.0301971435546875,
0.01092529296875,
0.0010213851928710938,
0.0026092529296875,
-0.0079498291015625,
0.0133819580078125,
-0.0055694580078125,
0.0097808837890625,
-0.008056640625,
0.099609375,
-0.006229400634765625,
-0.0802001953125,
-0.032684326171875,
-0.01214599609375,
-0.007282257080078125,
0.01800537109375,
-0.01161956787109375,
-0.0194549560546875,
0.020751953125,
-0.003261566162109375,
0.017608642578125,
0.002155303955078125,
-0.0017719268798828125,
-0.00951385498046875,
-0.0071563720703125,
-0.033721923828125,
0.0048980712890625,
0.01340484619140625,
-0.00838470458984375,
0.007137298583984375,
0.034423828125,
-0.029388427734375,
0.01025390625,
-0.0026721954345703125,
-0.0305633544921875,
0.031341552734375,
-0.01165771484375,
-0.0160369873046875,
0.042816162109375,
-0.0191802978515625,
0.0309906005859375,
0.039154052734375,
-0.010986328125,
0.0191497802734375,
-0.030914306640625,
-0.003856658935546875,
0.01158905029296875,
0.0014591217041015625,
0.006763458251953125,
-0.036651611328125,
-0.002170562744140625,
0.0004246234893798828,
0.003276824951171875,
0.0217742919921875,
0.028045654296875,
0.037261962890625,
-0.07635498046875,
0.04351806640625,
-0.034515380859375,
0.007843017578125,
-0.071533203125,
-0.0195770263671875,
-0.03619384765625,
0.10198974609375,
-0.0032176971435546875,
0.0186309814453125,
0.00728607177734375,
-0.008697509765625,
-0.0240020751953125,
-0.010223388671875,
-0.09246826171875,
0.01183319091796875,
-0.074951171875,
0.02392578125,
-0.0007348060607910156,
0.0011262893676757812,
-0.03125,
0.043243408203125,
-0.047637939453125,
-0.032684326171875,
0.054718017578125,
-0.0836181640625,
0.006702423095703125,
0.004241943359375,
0.00341033935546875,
-0.0654296875,
-0.0264129638671875,
-0.03271484375,
-0.0845947265625,
-0.014739990234375,
-0.0212249755859375,
0.0743408203125,
0.0231475830078125,
-0.00678253173828125,
-0.031768798828125,
0.0278167724609375,
-0.004070281982421875,
0.0174713134765625,
-0.0010051727294921875,
0.01163482666015625,
0.0162353515625,
-0.04248046875,
-0.005100250244140625,
-0.034820556640625,
-0.03594970703125,
-0.01514434814453125,
0.019134521484375,
-0.02325439453125,
-0.04949951171875,
-0.0833740234375,
-0.0181732177734375,
-0.01517486572265625,
-0.053680419921875,
-0.0165252685546875,
-0.04168701171875,
-0.0015087127685546875,
-0.020233154296875,
0.0081329345703125,
-0.0208740234375,
-0.06390380859375,
0.034423828125,
-0.0438232421875,
-0.0172576904296875,
0.0259552001953125,
0.07281494140625,
0.0178985595703125,
0.0052642822265625,
-0.03851318359375,
-0.004886627197265625,
0.0244903564453125,
0.00916290283203125,
0.06671142578125,
0.039764404296875,
-0.0012750625610351562,
0.0374755859375,
0.01239013671875,
-0.001190185546875,
-0.032135009765625,
0.03131103515625,
0.0034465789794921875,
-0.041107177734375,
0.0335693359375,
-0.006031036376953125,
0.019256591796875,
-0.026275634765625,
-0.0186309814453125,
-0.00775146484375,
-0.026092529296875,
0.036773681640625,
0.0033931732177734375,
0.0222015380859375,
-0.02777099609375,
0.00475311279296875,
-0.01111602783203125,
-0.00021028518676757812,
0.0178375244140625,
0.033111572265625,
-0.0088043212890625,
-0.007602691650390625,
0.01678466796875,
-0.0203857421875,
0.00211334228515625,
0.017059326171875,
-0.0367431640625,
0.0281524658203125,
-0.0208740234375,
-0.033172607421875,
-0.0006413459777832031,
-0.01025390625,
0.05535888671875,
-0.02349853515625,
-0.07012939453125,
0.0134124755859375,
-0.03656005859375,
0.0051116943359375,
0.041015625,
-0.00698089599609375,
0.0185546875,
0.01251983642578125,
0.002964019775390625,
-0.02008056640625,
0.015838623046875,
-0.0042572021484375,
-0.0281219482421875,
-0.0110931396484375,
-0.00814056396484375,
-0.00907135009765625,
0.040191650390625,
0.05426025390625,
-0.011138916015625,
0.039459228515625,
-0.023284912109375,
0.047882080078125,
0.03515625,
-0.004039764404296875,
-0.01329803466796875,
0.04815673828125,
-0.0006346702575683594,
-0.0309600830078125,
0.019989013671875,
-0.022979736328125,
-0.0006275177001953125,
0.043487548828125,
0.0270538330078125,
0.01522064208984375,
-0.00897216796875,
-0.01503753662109375,
-0.01332855224609375,
-0.0297088623046875,
0.0655517578125,
-0.0297393798828125,
-0.0926513671875,
-0.036651611328125,
0.022796630859375,
0.043914794921875,
-0.05108642578125,
-0.018707275390625,
0.0165252685546875,
-0.01421356201171875,
0.022216796875,
0.000438690185546875,
-0.059814453125,
0.01090240478515625,
0.0290069580078125,
-0.055755615234375,
-0.00826263427734375,
0.02716064453125,
-0.0511474609375,
-0.024749755859375,
-0.00688934326171875,
-0.00621795654296875,
0.006336212158203125,
-0.0084381103515625,
0.0177764892578125,
-0.0232086181640625,
-0.0038299560546875,
-0.016357421875,
0.0010957717895507812,
0.047210693359375,
0.0179443359375,
-0.05859375,
-0.003757476806640625,
-0.06982421875,
-0.029937744140625,
-0.08184814453125,
-0.037200927734375,
-0.0533447265625,
0.01183319091796875,
0.0093231201171875,
0.015106201171875,
-0.002025604248046875,
-0.004146575927734375,
-0.0182037353515625,
0.0253753662109375,
0.0236968994140625,
0.04559326171875,
-0.0027065277099609375,
0.05230712890625,
-0.010101318359375,
0.051666259765625,
0.008087158203125,
0.0007710456848144531,
-0.0310821533203125,
-0.005893707275390625,
0.01224517822265625,
-0.01261138916015625,
-0.01812744140625,
-0.024932861328125,
-0.016937255859375,
0.0002567768096923828,
0.051422119140625,
-0.006534576416015625,
0.0164794921875,
-0.018463134765625,
0.005741119384765625,
-0.0299835205078125,
0.0037174224853515625,
-0.035919189453125,
-0.01206207275390625,
-0.00267791748046875,
-0.01357269287109375,
0.045166015625,
-0.01202392578125,
-0.035308837890625,
0.037384033203125,
-0.0202484130859375,
0.0452880859375,
0.026092529296875,
-0.0131988525390625,
0.01457977294921875,
0.07269287109375,
-0.0191192626953125,
0.03515625,
0.037628173828125,
0.0081024169921875,
0.03253173828125,
-0.04132080078125,
0.001689910888671875,
0.024322509765625,
0.0489501953125,
-0.0058746337890625,
0.0010194778442382812,
0.05279541015625,
-0.0218048095703125,
0.0206146240234375,
0.06280517578125,
0.05889892578125,
-0.126953125,
0.031097412109375,
-0.0020847320556640625,
0.00461578369140625,
0.0259857177734375,
-0.01654052734375,
-0.00446319580078125,
-0.046630859375,
0.046112060546875,
-0.02581787109375,
-0.01337432861328125,
0.0015859603881835938,
-0.027801513671875,
-0.040069580078125,
-0.00908660888671875,
0.0134735107421875,
0.02471923828125,
0.045623779296875,
0.02276611328125,
-0.039337158203125,
0.038421630859375,
-0.01113128662109375,
0.030792236328125,
0.01158905029296875,
-0.0220794677734375,
-0.060028076171875,
0.0211639404296875,
0.0084381103515625,
-0.0272674560546875,
0.04632568359375,
0.006717681884765625,
-0.015869140625,
0.062103271484375,
-0.0364990234375,
0.0165557861328125,
0.035858154296875,
-0.0377197265625,
-0.049072265625,
-0.06683349609375,
0.005863189697265625,
-0.0038242340087890625,
-0.052337646484375,
0.037200927734375,
-0.01751708984375,
-0.06585693359375,
-0.0194854736328125,
-0.032562255859375,
0.0736083984375,
0.0052642822265625,
-0.0325927734375,
0.0126953125,
0.0157928466796875,
-0.0091400146484375,
-0.0081634521484375,
-0.01629638671875,
-0.0294647216796875,
0.01190948486328125,
-0.0242767333984375,
-0.0021800994873046875,
0.0213775634765625,
0.0102386474609375,
-0.062225341796875,
0.09552001953125,
-0.01322174072265625,
0.02288818359375,
0.0189971923828125,
0.03021240234375,
-0.031280517578125,
-0.00334930419921875,
-0.0157318115234375,
0.04620361328125,
-0.00858306884765625,
0.0185089111328125,
-0.0191650390625,
0.012298583984375,
-0.0010852813720703125,
0.01448822021484375,
0.046142578125,
0.0249786376953125,
-0.021881103515625,
0.00023376941680908203,
0.033905029296875,
-0.004978179931640625,
-0.0222930908203125,
0.054901123046875,
0.01971435546875,
0.022491455078125,
0.00751495361328125,
-0.0076904296875,
0.054290771484375,
-0.0810546875,
-0.01532745361328125,
0.02276611328125,
0.01541900634765625,
0.0129241943359375,
0.00040221214294433594,
0.0538330078125,
-0.061279296875,
0.0078582763671875,
0.050323486328125,
-0.032012939453125,
0.0003209114074707031,
-0.00855255126953125,
0.031982421875,
-0.049560546875,
0.016845703125,
-0.0198822021484375,
0.040374755859375,
0.0177154541015625,
-0.00794219970703125,
0.0222625732421875,
0.023895263671875,
-0.0421142578125,
-0.0187530517578125,
0.0103607177734375,
0.03204345703125,
-0.0513916015625,
-0.0027866363525390625,
-0.0026702880859375,
0.0224151611328125,
-0.0477294921875,
-0.00041675567626953125,
0.0167999267578125,
0.018402099609375,
-0.009063720703125,
-0.05401611328125,
0.005401611328125,
0.0164031982421875,
0.0296173095703125,
0.03411865234375,
0.039642333984375,
-0.00202178955078125,
0.06536865234375,
-0.005466461181640625,
0.016632080078125,
0.0196533203125,
-0.0123443603515625,
-0.01157379150390625,
-0.0037441253662109375,
0.005153656005859375,
0.0535888671875,
-0.00597381591796875,
-0.039459228515625,
-0.0038089752197265625,
-0.01557159423828125,
0.04095458984375,
-0.0235137939453125,
0.054779052734375,
0.0149383544921875,
0.007656097412109375,
0.046051025390625,
-0.0355224609375,
-0.0028076171875,
-0.040924072265625,
-0.089111328125,
-0.01308441162109375,
0.035064697265625,
-0.0290374755859375,
0.01812744140625,
0.0007185935974121094,
0.0266265869140625,
0.00476837158203125,
-0.020355224609375,
-0.004314422607421875,
-0.024383544921875,
-0.0118408203125,
-0.0273284912109375,
0.024749755859375,
0.002925872802734375,
0.002346038818359375,
-0.026824951171875,
0.049468994140625,
0.0117340087890625,
-0.007770538330078125,
-0.0105133056640625,
0.0006489753723144531,
-0.0273590087890625,
0.006641387939453125,
-0.044952392578125,
-0.000713348388671875,
-0.00849151611328125,
-0.08990478515625,
-0.0044708251953125,
-0.0390625,
-0.079345703125,
0.04217529296875,
0.046539306640625,
-0.035186767578125,
0.0178375244140625,
0.00965118408203125,
0.017852783203125,
-0.0016889572143554688,
-0.033966064453125,
0.022674560546875,
-0.0181732177734375,
0.011566162109375,
0.0080108642578125,
-0.0010175704956054688,
-0.00682830810546875,
-0.0019989013671875,
0.041229248046875,
0.034271240234375,
0.0474853515625,
-0.033172607421875,
0.0221099853515625,
-0.01279449462890625,
0.0308990478515625,
-0.05291748046875,
-0.029510498046875,
0.035369873046875,
-0.0133819580078125,
-0.0113372802734375,
0.00115966796875,
-0.047607421875,
0.0084228515625,
0.0272979736328125,
-0.0292816162109375,
0.01277923583984375,
0.0036830902099609375,
0.013580322265625,
-0.0126800537109375,
0.05792236328125,
-0.0073394775390625,
-0.044525146484375,
-0.0589599609375,
-0.003391265869140625,
0.026458740234375,
0.05780029296875,
-0.00513458251953125,
0.00826263427734375,
-0.033935546875,
-0.04022216796875,
-0.0194091796875,
-0.006072998046875,
-0.037811279296875,
0.0254364013671875,
-0.01540374755859375,
-0.006137847900390625,
0.0152130126953125,
0.0018320083618164062,
-0.00466156005859375,
0.04248046875,
-0.002681732177734375,
0.0240631103515625,
-0.0164031982421875,
0.0027637481689453125,
0.005878448486328125,
0.03179931640625,
-0.01837158203125,
0.009521484375,
-0.0035610198974609375,
-0.00749969482421875,
-0.0199127197265625,
-0.0133209228515625,
-0.03619384765625,
-0.0411376953125,
-0.01366424560546875,
0.0025615692138671875,
-0.0295562744140625,
-0.08599853515625,
-0.06689453125,
0.0255279541015625,
0.0243072509765625,
0.0190582275390625,
-0.0911865234375,
0.060882568359375,
-0.0181732177734375,
0.050567626953125,
-0.00927734375,
-0.03204345703125,
0.0214691162109375,
0.04046630859375,
-0.0243988037109375,
0.01355743408203125,
-0.0248870849609375,
-0.036956787109375,
-0.012451171875,
0.0228118896484375,
0.041748046875,
-0.03240966796875,
-0.005748748779296875,
0.030364990234375,
0.0161285400390625,
0.08087158203125,
-0.01224517822265625,
0.00699615478515625,
-0.029327392578125,
0.04058837890625,
-0.0196380615234375,
-0.06689453125,
0.01541900634765625,
-0.0095062255859375,
-0.034820556640625,
-0.007671356201171875,
-0.00754547119140625,
-0.001415252685546875,
-0.03582763671875,
-0.04595947265625,
0.0657958984375,
-0.004085540771484375,
-0.0215301513671875,
0.01132965087890625,
0.01380157470703125,
-0.01554107666015625,
0.0094757080078125,
0.0163726806640625,
-0.017120361328125,
-0.0023746490478515625,
-0.006771087646484375,
0.0281829833984375,
-0.05279541015625,
0.0257415771484375,
0.0220794677734375,
-0.054443359375,
0.05206298828125,
0.055419921875,
-0.00811767578125,
0.0173492431640625,
0.0008068084716796875,
0.0212249755859375,
0.0784912109375,
0.0074615478515625,
-0.062744140625,
-0.0276336669921875,
-0.10284423828125,
0.007297515869140625,
0.006420135498046875,
-0.0400390625,
-0.022491455078125,
0.050628662109375,
0.0615234375,
0.0147705078125,
-0.00772857666015625,
0.004344940185546875,
-0.05657958984375,
-0.05426025390625,
-0.0260162353515625,
0.021881103515625,
-0.0675048828125,
-0.003879547119140625,
0.031524658203125,
-0.0330810546875,
0.0194854736328125,
0.02880859375,
-0.034912109375,
0.014556884765625,
0.0210113525390625,
-0.01971435546875,
-0.0648193359375,
0.024078369140625,
0.0340576171875,
-0.038421630859375,
-0.0007605552673339844,
-0.003803253173828125,
-0.0132293701171875,
0.012237548828125,
0.005069732666015625,
-0.020111083984375,
-0.0073699951171875,
-0.04888916015625,
0.041961669921875,
-0.03192138671875,
0.032745361328125,
-0.0682373046875,
0.00001239776611328125,
-0.007503509521484375,
0.04083251953125,
0.0024089813232421875,
0.0577392578125,
-0.02996826171875,
0.049072265625,
0.0198974609375,
0.025421142578125,
0.002811431884765625,
0.0152435302734375,
-0.030242919921875,
0.047119140625,
0.01453399658203125,
-0.025604248046875,
0.04998779296875,
-0.030792236328125,
-0.004070281982421875,
0.0224151611328125,
-0.0161895751953125,
-0.046112060546875,
0.00496673583984375,
-0.020782470703125,
0.004131317138671875,
0.005725860595703125
] |
2b8b75ab24393d5b7adf1e1cae78e24917678724
|
Wordpress Stackexchange
Q: Multisite wide post type? Is it possible to have a multisite wide post type without duplicating the posts? That is a post type that is the same no matter what blog you are on?
Theoretical example: StackExchange has many sites (blogs) but wants their site-wide news post type, I'll call it sitewide_news, to be the same on every blog. If they happen to be in blog id 4 and make a change or add a new post it will show up in 3 or 8 as if they made the change there. In other words only one database entry exists.
Thanks!
A: I've been using this plugin, which works really, really well.
|
Q: Multisite wide post type? Is it possible to have a multisite wide post type without duplicating the posts? That is a post type that is the same no matter what blog you are on?
Theoretical example: StackExchange has many sites (blogs) but wants their site-wide news post type, I'll call it sitewide_news, to be the same on every blog. If they happen to be in blog id 4 and make a change or add a new post it will show up in 3 or 8 as if they made the change there. In other words only one database entry exists.
Thanks!
A: I've been using this plugin, which works really, really well.
|
wordpress
|
{
"language": "en",
"length": 113,
"provenance": "stackexchange_00019.jsonl.gz:407503",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11276"
}
|
[
0.020263671875,
-0.0199737548828125,
-0.0167694091796875,
0.017181396484375,
-0.004520416259765625,
-0.041656494140625,
0.049102783203125,
-0.00850677490234375,
-0.01532745361328125,
0.016082763671875,
-0.038543701171875,
0.040008544921875,
-0.0400390625,
-0.002613067626953125,
0.00954437255859375,
-0.0294189453125,
0.037750244140625,
0.0015478134155273438,
0.0183868408203125,
-0.0221710205078125,
-0.00418853759765625,
0.00460052490234375,
0.0207672119140625,
0.0625,
0.020416259765625,
-0.004306793212890625,
0.0294189453125,
-0.003997802734375,
-0.005252838134765625,
-0.0005059242248535156,
0.024444580078125,
0.0015459060668945312,
0.0211639404296875,
-0.0055084228515625,
0.008270263671875,
-0.058349609375,
0.0204010009765625,
-0.0185546875,
0.00441741943359375,
0.025726318359375,
-0.001743316650390625,
-0.0005955696105957031,
0.0843505859375,
0.0316162109375,
0.023834228515625,
-0.0404052734375,
0.0300750732421875,
-0.05712890625,
0.00769805908203125,
-0.006420135498046875,
0.0097808837890625,
-0.0057220458984375,
0.039337158203125,
-0.0258331298828125,
-0.028228759765625,
-0.0246429443359375,
0.04547119140625,
-0.04693603515625,
0.0278167724609375,
-0.0183563232421875,
-0.007568359375,
0.00873565673828125,
0.0203399658203125,
0.020416259765625,
-0.014434814453125,
-0.025299072265625,
0.0284271240234375,
0.0013856887817382812,
-0.04315185546875,
-0.0168914794921875,
0.052734375,
-0.009796142578125,
0.054168701171875,
-0.032196044921875,
-0.00778961181640625,
-0.023162841796875,
-0.01375579833984375,
-0.035858154296875,
0.024078369140625,
-0.042755126953125,
-0.03143310546875,
0.00583648681640625,
-0.027008056640625,
-0.0823974609375,
-0.004058837890625,
-0.05523681640625,
-0.01708984375,
0.0295867919921875,
-0.0323486328125,
-0.025177001953125,
-0.0172271728515625,
-0.051239013671875,
-0.054595947265625,
0.044708251953125,
0.000017762184143066406,
-0.00689697265625,
-0.00586700439453125,
0.06146240234375,
-0.0283660888671875,
0.0208587646484375,
-0.058258056640625,
0.00928497314453125,
-0.01702880859375,
-0.040771484375,
0.01788330078125,
0.025390625,
-0.0227813720703125,
0.024749755859375,
0.06158447265625,
0.032257080078125,
0.0038433074951171875,
0.026519775390625,
-0.006481170654296875,
0.0205535888671875,
-0.056488037109375,
-0.004817962646484375,
-0.0303192138671875,
-0.010040283203125,
-0.0279998779296875,
0.017120361328125,
0.00836944580078125,
0.032501220703125,
0.0115966796875,
0.0243988037109375,
0.0002589225769042969,
0.03533935546875,
0.0226898193359375,
-0.08319091796875,
-0.00138092041015625,
0.00418853759765625,
-0.016204833984375,
0.0006718635559082031,
0.04827880859375,
0.02203369140625,
0.004058837890625,
-0.0099639892578125,
0.021270751953125,
-0.0195159912109375,
-0.03582763671875,
-0.00016057491302490234,
0.00850677490234375,
-0.01352691650390625,
-0.00872802734375,
-0.0228118896484375,
0.0262451171875,
0.020660400390625,
0.034942626953125,
0.0277099609375,
-0.0169219970703125,
0.01169586181640625,
-0.032440185546875,
0.0212860107421875,
0.0274200439453125,
-0.01959228515625,
-0.0164031982421875,
-0.09259033203125,
0.0240325927734375,
-0.05206298828125,
0.02264404296875,
-0.057586669921875,
0.0285491943359375,
-0.01535797119140625,
0.045745849609375,
0.006175994873046875,
-0.01009368896484375,
0.0142059326171875,
-0.06787109375,
-0.019927978515625,
0.0227813720703125,
-0.01314544677734375,
-0.00867462158203125,
0.0044097900390625,
0.01348876953125,
0.003177642822265625,
-0.002532958984375,
0.007274627685546875,
0.007381439208984375,
-0.027252197265625,
0.01525115966796875,
0.0202789306640625,
-0.0120849609375,
-0.009765625,
-0.0015974044799804688,
0.0152740478515625,
-0.059661865234375,
0.01953125,
0.00299835205078125,
0.0472412109375,
0.0264129638671875,
0.01319122314453125,
0.036285400390625,
0.00981903076171875,
0.005947113037109375,
0.0193939208984375,
-0.00859832763671875,
-0.006809234619140625,
-0.01812744140625,
0.0321044921875,
-0.0238189697265625,
-0.036163330078125,
0.015899658203125,
0.0164337158203125,
-0.003856658935546875,
0.00968170166015625,
0.0034961700439453125,
-0.01031494140625,
0.01543426513671875,
0.0228271484375,
0.0221405029296875,
0.025634765625,
0.0038604736328125,
0.0223388671875,
0.00414276123046875,
-0.07672119140625,
-0.04290771484375,
0.00688934326171875,
-0.0110931396484375,
-0.00778961181640625,
-0.00708770751953125,
0.002532958984375,
-0.037109375,
0.01157379150390625,
-0.03448486328125,
-0.00992584228515625,
0.052276611328125,
-0.0074310302734375,
-0.0272674560546875,
-0.01654052734375,
-0.0008387565612792969,
0.01055908203125,
-0.05487060546875,
0.035400390625,
-0.00714111328125,
-0.0009126663208007812,
-0.0245513916015625,
-0.0049896240234375,
0.029541015625,
-0.01873779296875,
0.01309967041015625,
0.034332275390625,
0.017791748046875,
0.0269012451171875,
-0.0011167526245117188,
0.041259765625,
-0.0137481689453125,
0.002773284912109375,
0.052825927734375,
-0.003002166748046875,
-0.009002685546875,
0.044952392578125,
-0.0094146728515625,
0.009490966796875,
0.0054168701171875,
-0.0672607421875,
-0.0281982421875,
0.04986572265625,
0.01129150390625,
0.036834716796875,
-0.028839111328125,
0.0264129638671875,
-0.0145263671875,
0.0262908935546875,
-0.0008363723754882812,
0.00839996337890625,
0.0626220703125,
-0.0175933837890625,
0.047210693359375,
0.0194854736328125,
-0.03497314453125,
0.006702423095703125,
0.01116943359375,
-0.0132293701171875,
0.02117919921875,
0.06964111328125,
0.0396728515625,
0.032318115234375,
-0.0170745849609375,
-0.05865478515625,
0.052886962890625,
0.053985595703125,
-0.04132080078125,
0.01526641845703125,
-0.07818603515625,
-0.035125732421875,
-0.0288543701171875,
-0.0352783203125,
-0.016265869140625,
-0.0186614990234375,
-0.0182342529296875,
-0.0193634033203125,
-0.003017425537109375,
0.034271240234375,
-0.0252227783203125,
0.037567138671875,
0.012054443359375,
-0.0167236328125,
-0.0113677978515625,
-0.0960693359375,
0.0682373046875,
-0.050537109375,
0.03021240234375,
0.09271240234375,
0.01242828369140625,
0.0126190185546875,
-0.01456451416015625,
0.032135009765625,
-0.00795745849609375,
-0.0012807846069335938,
-0.0232696533203125,
-0.01434326171875,
-0.05322265625,
0.00475311279296875,
-0.0011129379272460938,
0.037322998046875,
-0.02178955078125,
-0.032470703125,
-0.005046844482421875,
0.007617950439453125,
-0.0078582763671875,
0.0233917236328125,
-0.0053558349609375,
-0.033111572265625,
-0.01180267333984375,
-0.049774169921875,
-0.01305389404296875,
-0.0027866363525390625,
-0.03753662109375,
-0.004608154296875,
0.004283905029296875,
-0.002223968505859375,
-0.04058837890625,
-0.038970947265625,
-0.06463623046875,
-0.0236358642578125,
-0.0019292831420898438,
0.01546478271484375,
0.012451171875,
0.03778076171875,
0.018829345703125,
-0.0312347412109375,
0.03448486328125,
0.077392578125,
-0.027740478515625,
-0.0200347900390625,
0.0179901123046875,
-0.040740966796875,
0.0188446044921875,
0.007350921630859375,
-0.0229644775390625,
0.034881591796875,
-0.0023288726806640625,
-0.01494598388671875,
0.039947509765625,
-0.0044403076171875,
0.0460205078125,
-0.0418701171875,
-0.047821044921875,
0.0280303955078125,
0.00824737548828125,
-0.0428466796875,
-0.01560211181640625,
-0.023712158203125,
-0.032562255859375,
0.0022125244140625,
0.0084686279296875,
-0.006732940673828125,
-0.0355224609375,
0.04779052734375,
0.01169586181640625,
-0.003337860107421875,
0.050079345703125,
-0.027618408203125,
0.0350341796875,
-0.0118865966796875,
0.0005950927734375,
-0.048370361328125,
-0.0546875,
-0.040557861328125,
0.057342529296875,
-0.032012939453125,
-0.00038433074951171875,
-0.03131103515625,
0.06939697265625,
0.0008096694946289062,
-0.0455322265625,
0.03466796875,
-0.05206298828125,
0.031768798828125,
-0.047271728515625,
-0.0196533203125,
-0.01232147216796875,
0.095703125,
-0.0625,
0.0011959075927734375,
-0.0022296905517578125,
0.0023345947265625,
0.00653839111328125,
-0.06048583984375,
-0.043212890625,
-0.031982421875,
-0.01413726806640625,
0.016387939453125,
0.0018320083618164062,
0.0142822265625,
-0.02923583984375,
0.059112548828125,
0.0038661956787109375,
-0.016387939453125,
0.03179931640625,
-0.020355224609375,
0.03759765625,
-0.00555419921875,
0.0237579345703125,
-0.018524169921875,
-0.0181884765625,
-0.038421630859375,
-0.020263671875,
-0.003536224365234375,
-0.0301055908203125,
0.0233306884765625,
0.0298919677734375,
-0.0274810791015625,
-0.0007681846618652344,
0.0181732177734375,
0.0003502368927001953,
0.029022216796875,
-0.021087646484375,
-0.0004839897155761719,
-0.010833740234375,
-0.0189971923828125,
-0.01250457763671875,
-0.02386474609375,
-0.03192138671875,
-0.014251708984375,
0.015716552734375,
0.0208282470703125,
-0.0207977294921875,
-0.04034423828125,
-0.009735107421875,
-0.0085906982421875,
-0.016754150390625,
0.0004355907440185547,
0.01102447509765625,
0.01593017578125,
-0.0229339599609375,
0.0052337646484375,
-0.0027980804443359375,
-0.0032482147216796875,
0.0199432373046875,
0.06280517578125,
-0.020782470703125,
0.0182037353515625,
0.0496826171875,
0.00374603271484375,
-0.018402099609375,
-0.12213134765625,
0.0015077590942382812,
0.00839996337890625,
0.042816162109375,
0.02752685546875,
0.0147247314453125,
0.01235198974609375,
-0.00321197509765625,
0.008392333984375,
0.00206756591796875,
0.00626373291015625,
0.0146484375,
0.006561279296875,
-0.0209808349609375,
0.0222320556640625,
0.0006504058837890625,
-0.0015087127685546875,
0.040924072265625,
0.00431060791015625,
-0.0243072509765625,
-0.036895751953125,
0.043548583984375,
0.01739501953125,
-0.0379638671875,
-0.05975341796875,
-0.0026397705078125,
0.0161590576171875,
-0.007266998291015625,
0.0054779052734375,
0.019683837890625,
-0.01202392578125,
-0.023529052734375,
-0.036590576171875,
-0.005176544189453125,
0.017486572265625,
0.02679443359375,
-0.0081787109375,
0.01119232177734375,
0.01690673828125,
-0.03302001953125,
-0.01043701171875,
-0.00878143310546875,
0.03265380859375,
-0.00301361083984375,
-0.041595458984375,
0.01366424560546875,
-0.01526641845703125,
-0.00007838010787963867,
0.0152130126953125,
0.0014429092407226562,
0.0208587646484375,
0.01242828369140625,
-0.032073974609375,
-0.00554656982421875,
0.0085906982421875,
-0.0208892822265625,
-0.054840087890625,
0.0114288330078125,
-0.0178680419921875,
0.01386260986328125,
0.036529541015625,
0.0295562744140625,
-0.037750244140625,
0.050567626953125,
-0.016021728515625,
0.03179931640625,
0.052032470703125,
-0.021209716796875,
0.0217132568359375,
0.0268402099609375,
-0.029541015625,
-0.021026611328125,
-0.001064300537109375,
-0.0299530029296875,
-0.0152587890625,
0.05029296875,
0.061614990234375,
0.0582275390625,
0.0104827880859375,
-0.059234619140625,
-0.0235443115234375,
-0.0153961181640625,
-0.0028171539306640625,
-0.031829833984375,
-0.0654296875,
0.0117034912109375,
0.037384033203125,
-0.0003006458282470703,
-0.031585693359375,
0.002017974853515625,
-0.0286865234375,
-0.033935546875,
-0.035308837890625,
-0.0178375244140625,
-0.056854248046875,
-0.0012226104736328125,
0.01934814453125,
-0.0289306640625,
-0.017578125,
0.00699615478515625,
-0.062164306640625,
-0.006252288818359375,
-0.014556884765625,
-0.004711151123046875,
0.0145111083984375,
-0.01611328125,
0.0305938720703125,
-0.01611328125,
-0.00418853759765625,
-0.0053863525390625,
0.005733489990234375,
0.05084228515625,
0.021820068359375,
-0.0082550048828125,
0.015167236328125,
-0.0252838134765625,
-0.0276947021484375,
-0.0270538330078125,
-0.03155517578125,
-0.03363037109375,
-0.00814056396484375,
0.0193023681640625,
0.03179931640625,
-0.0186920166015625,
-0.043060302734375,
-0.0000851750373840332,
-0.0081939697265625,
0.001667022705078125,
0.006450653076171875,
-0.034942626953125,
0.048431396484375,
-0.00821685791015625,
0.0362548828125,
-0.00936126708984375,
0.033966064453125,
0.01507568359375,
-0.009124755859375,
-0.0062255859375,
-0.07281494140625,
-0.034149169921875,
0.020172119140625,
0.0016727447509765625,
0.08233642578125,
0.0323486328125,
0.0199432373046875,
0.006378173828125,
-0.0192718505859375,
-0.00034356117248535156,
-0.0250091552734375,
-0.01763916015625,
-0.032379150390625,
0.0008330345153808594,
-0.0120697021484375,
-0.02166748046875,
0.0309906005859375,
0.0009369850158691406,
0.02825927734375,
-0.05035400390625,
-0.00154876708984375,
-0.01525115966796875,
0.01366424560546875,
-0.0350341796875,
0.02410888671875,
0.056732177734375,
0.017333984375,
0.030487060546875,
0.0017452239990234375,
0.01093292236328125,
0.0276641845703125,
0.0027618408203125,
-0.006092071533203125,
-0.04443359375,
0.01519775390625,
-0.0093994140625,
-0.01910400390625,
0.0104217529296875,
-0.0275421142578125,
-0.000499725341796875,
0.03271484375,
0.053253173828125,
-0.06756591796875,
0.0118560791015625,
0.040130615234375,
-0.00030612945556640625,
-0.005359649658203125,
-0.006237030029296875,
0.0169219970703125,
0.041259765625,
-0.018524169921875,
0.00974273681640625,
-0.053680419921875,
-0.0215606689453125,
0.006931304931640625,
-0.00008738040924072266,
0.0095672607421875,
0.05499267578125,
0.0260772705078125,
-0.01111602783203125,
-0.00678253173828125,
0.004055023193359375,
0.0303497314453125,
-0.014007568359375,
0.0325927734375,
-0.0263824462890625,
0.002017974853515625,
-0.04644775390625,
0.005157470703125,
0.0011205673217773438,
-0.0241241455078125,
-0.0061798095703125,
0.0102081298828125,
-0.0158538818359375,
0.047637939453125,
-0.03375244140625,
-0.00017547607421875,
0.0113677978515625,
-0.00689697265625,
-0.060821533203125,
-0.051055908203125,
-0.004863739013671875,
0.032470703125,
-0.00452423095703125,
0.04345703125,
0.009246826171875,
-0.041656494140625,
-0.03179931640625,
-0.01555633544921875,
0.09326171875,
-0.048675537109375,
0.0048828125,
0.039947509765625,
0.05206298828125,
-0.020904541015625,
0.013824462890625,
-0.036956787109375,
-0.07232666015625,
-0.051513671875,
-0.003887176513671875,
-0.07781982421875,
0.0025005340576171875,
0.005847930908203125,
-0.08209228515625,
0.06268310546875,
0.0293426513671875,
0.036285400390625,
0.005443572998046875,
0.008636474609375,
-0.0268096923828125,
-0.02264404296875,
-0.008514404296875,
0.05401611328125,
-0.02777099609375,
0.0077056884765625,
-0.0236053466796875,
-0.0003292560577392578,
0.00472259521484375,
0.0208282470703125,
0.004589080810546875,
0.002201080322265625,
-0.022003173828125,
0.004974365234375,
0.060791015625,
0.0194091796875,
0.0233154296875,
0.035125732421875,
-0.00955963134765625,
0.037872314453125,
0.0631103515625,
-0.04864501953125,
0.0249481201171875,
0.015533447265625,
-0.003204345703125,
0.009246826171875,
-0.005290985107421875,
-0.01406097412109375,
0.007038116455078125,
-0.01861572265625,
-0.00937652587890625,
0.00527191162109375,
-0.0146331787109375,
0.03240966796875,
0.0270538330078125,
0.00518035888671875,
0.0159149169921875,
-0.0024166107177734375,
0.0721435546875,
-0.024322509765625,
0.052093505859375,
-0.0011911392211914062,
0.00641632080078125,
0.01084136962890625,
-0.009246826171875,
0.073486328125,
0.01427459716796875,
-0.01030731201171875,
0.01285552978515625,
0.051544189453125,
0.00969696044921875,
-0.004528045654296875,
0.0118865966796875,
-0.081298828125,
-0.0261383056640625,
0.05999755859375,
0.0526123046875,
-0.0316162109375,
-0.047698974609375,
0.01495361328125,
0.0157928466796875,
0.028411865234375,
0.007106781005859375,
0.04022216796875,
0.0089569091796875,
0.046478271484375,
-0.0296478271484375,
-0.00411224365234375,
0.0040435791015625,
0.048309326171875,
0.00981903076171875,
0.0308990478515625,
-0.05535888671875,
-0.0489501953125,
-0.09014892578125,
0.0374755859375,
0.0235748291015625,
0.12432861328125,
0.032989501953125,
0.1256103515625,
-0.0252227783203125,
-0.0648193359375,
-0.0136871337890625,
-0.00634002685546875,
-0.01605224609375,
0.0214691162109375,
-0.061279296875,
-0.0302886962890625,
0.06561279296875,
0.05096435546875,
0.007579803466796875,
0.0236053466796875,
0.030670166015625,
0.0281524658203125,
0.01073455810546875,
-0.0010309219360351562,
0.015716552734375,
-0.0070037841796875,
0.0214996337890625,
-0.0347900390625,
-0.007282257080078125,
-0.0091094970703125,
-0.0360107421875,
0.0031070709228515625,
-0.0137939453125,
0.0298614501953125,
0.01511383056640625,
0.0199432373046875,
0.01070404052734375,
-0.0125885009765625,
0.009063720703125,
0.01513671875,
0.00797271728515625,
0.0287322998046875,
-0.08575439453125,
-0.01012420654296875,
-0.0256805419921875,
-0.05059814453125,
0.032745361328125,
0.052154541015625,
-0.021881103515625,
-0.01386260986328125,
0.0032367706298828125,
0.011688232421875,
0.026763916015625,
-0.023406982421875,
0.0009388923645019531,
0.0237884521484375,
0.022979736328125,
0.01033782958984375,
-0.08514404296875,
-0.041107177734375,
-0.01318359375,
0.006317138671875,
-0.00959014892578125,
0.0771484375,
0.00786590576171875,
0.006237030029296875,
0.03985595703125,
0.0255889892578125,
-0.007411956787109375,
0.027587890625,
-0.01427459716796875,
-0.013397216796875,
0.032806396484375,
-0.00865936279296875,
-0.006134033203125,
-0.01177978515625,
0.04931640625,
-0.0478515625,
-0.005767822265625,
-0.02947998046875,
0.0112152099609375,
-0.03466796875,
0.00812530517578125,
-0.0215911865234375,
0.026763916015625,
-0.0079345703125,
-0.0238189697265625,
0.058624267578125,
0.01377105712890625,
-0.01343536376953125,
0.044921875,
0.03594970703125,
-0.022979736328125,
0.01215362548828125,
-0.0406494140625,
-0.006557464599609375,
0.0211334228515625,
0.0665283203125,
-0.0251922607421875,
0.01812744140625,
-0.0054931640625,
0.0143585205078125,
0.01523590087890625,
0.0426025390625,
0.00832366943359375,
-0.0141448974609375,
0.0115966796875,
0.0172576904296875,
0.031585693359375,
-0.033233642578125,
0.0028533935546875,
0.0440673828125,
-0.021270751953125,
-0.005706787109375,
0.0158538818359375,
-0.0031299591064453125,
-0.020172119140625,
-0.029052734375,
-0.0112152099609375,
0.00003743171691894531,
-0.031402587890625,
0.028961181640625,
-0.047119140625,
0.03692626953125,
-0.017364501953125,
0.0190887451171875,
-0.0197906494140625,
-0.03857421875,
-0.034210205078125,
0.0162811279296875,
-0.0748291015625,
0.02777099609375,
0.060394287109375,
0.0187530517578125,
-0.008758544921875,
-0.0139007568359375,
0.0007762908935546875,
-0.0166473388671875,
0.019134521484375,
0.03082275390625,
-0.0275421142578125,
-0.01197052001953125,
0.01471710205078125,
0.037567138671875,
0.06640625,
0.02703857421875,
-0.0144500732421875,
0.015289306640625,
-0.01082611083984375,
-0.025482177734375,
-0.0198822021484375,
0.01078033447265625,
-0.04229736328125,
-0.034820556640625,
-0.0021266937255859375,
-0.0175018310546875,
-0.02679443359375,
-0.03973388671875,
-0.0241241455078125,
0.040130615234375,
0.017486572265625,
-0.031585693359375,
-0.06683349609375,
-0.04339599609375,
0.0245361328125,
-0.0148162841796875,
-0.032440185546875,
-0.0141754150390625,
-0.09796142578125,
0.0267791748046875,
0.005229949951171875,
0.0173492431640625,
0.01171112060546875,
-0.005733489990234375,
-0.0052490234375,
0.03399658203125,
0.046478271484375,
-0.005908966064453125,
0.0020885467529296875,
-0.0234375,
0.031707763671875,
0.0287017822265625,
-0.025970458984375,
-0.011749267578125,
0.0277862548828125,
0.0056915283203125,
0.0027618408203125,
0.033935546875,
-0.05877685546875,
-0.01464080810546875,
0.0762939453125,
0.0980224609375,
0.0335693359375,
-0.036834716796875,
0.035858154296875,
0.004398345947265625,
-0.0992431640625,
0.00707244873046875,
0.0386962890625,
-0.02447509765625,
0.00745391845703125,
-0.0101776123046875,
-0.02374267578125,
-0.005611419677734375,
0.0083160400390625,
-0.03363037109375,
-0.0037670135498046875,
-0.0020885467529296875,
-0.0243377685546875,
-0.0171356201171875,
0.041656494140625,
-0.006683349609375,
-0.0120086669921875,
0.017181396484375,
-0.02685546875,
-0.0139312744140625,
0.00792694091796875,
0.01398468017578125,
-0.041748046875,
0.00138092041015625,
-0.0177764892578125,
0.0028476715087890625,
-0.009979248046875,
0.037872314453125,
-0.0116119384765625,
0.021148681640625,
-0.0109100341796875,
0.0176849365234375,
0.0056304931640625,
0.0297393798828125,
0.01136016845703125,
0.0014553070068359375,
0.0119171142578125,
0.005443572998046875,
0.0012903213500976562,
-0.0194854736328125,
-0.035614013671875,
0.060516357421875,
-0.0207061767578125,
-0.02789306640625,
-0.0030517578125,
-0.01419830322265625,
-0.001560211181640625,
-0.00916290283203125,
-0.033050537109375,
-0.05853271484375,
0.03863525390625,
0.0209197998046875,
-0.01277923583984375,
0.031219482421875
] |
7479d163cfa4c7fb72cb78b4abfd870fba5fba00
|
Wordpress Stackexchange
Q: Form to Add Posts to Custom Post Type Basically I want to display a form on my blog (on a certain page) that will allow anyone to fill it out and it will create a post in a custom post type.
I saw the answer once before but I can't find it now.
A: It might be simpler to use a plugin to do this.
You could also use the excellent Contact Form 7 plugin along with the Post My CF7 Form extension plugin which will allow you to save any custom forms to a custom post, including images as featured attachments, custom meta fields and select/checkbox/radio inputs as taxonomies.
The Post My CF7 Form plugin has a rich functionality that can be leveraged to further customise and tweak the way your forms should be saved. There is a detailed documentation section too.
|
Q: Form to Add Posts to Custom Post Type Basically I want to display a form on my blog (on a certain page) that will allow anyone to fill it out and it will create a post in a custom post type.
I saw the answer once before but I can't find it now.
A: It might be simpler to use a plugin to do this.
You could also use the excellent Contact Form 7 plugin along with the Post My CF7 Form extension plugin which will allow you to save any custom forms to a custom post, including images as featured attachments, custom meta fields and select/checkbox/radio inputs as taxonomies.
The Post My CF7 Form plugin has a rich functionality that can be leveraged to further customise and tweak the way your forms should be saved. There is a detailed documentation section too.
A: posting from the front-end is a matter of displaying a form and processing it:
form:
<!-- New Post Form -->
<div id="postbox">
<form id="new_post" name="new_post" method="post" action="">
<!-- post name -->
<p><label for="title">Title</label><br />
<input type="text" id="title" value="" tabindex="1" size="20" name="title" />
</p>
<!-- post Category -->
<p><label for="Category">Category:</label><br />
<p><?php wp_dropdown_categories( 'show_option_none=Category&tab_index=4&taxonomy=category' ); ?></p>
<!-- post Content -->
<p><label for="description">Content</label><br />
<textarea id="description" tabindex="3" name="description" cols="50" rows="6"></textarea>
</p>
<!-- post tags -->
<p><label for="post_tags">Tags:</label>
<input type="text" value="" tabindex="5" size="16" name="post_tags" id="post_tags" /></p>
<p align="right"><input type="submit" value="Publish" tabindex="6" id="submit" name="submit" /></p>
<input type="hidden" name="action" value="new_post" />
<?php wp_nonce_field( 'new-post' ); ?>
</form>
</div>
the processing:
if( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == "new_post") {
// Do some minor form validation to make sure there is content
if (isset ($_POST['title'])) {
$title = $_POST['title'];
} else {
echo 'Please enter a title';
}
if (isset ($_POST['description'])) {
$description = $_POST['description'];
} else {
echo 'Please enter the content';
}
$tags = $_POST['post_tags'];
// Add the content of the form to $post as an array
$new_post = array(
'post_title' => $title,
'post_content' => $description,
'post_category' => array($_POST['cat']), // Usable for custom taxonomies too
'tags_input' => array($tags),
'post_status' => 'publish', // Choose: publish, preview, future, draft, etc.
'post_type' => 'post_type_name' //'post',page' or use a custom post type if you want to
);
//save the new post
$pid = wp_insert_post($new_post);
//insert taxonomies
}
|
wordpress
|
{
"language": "en",
"length": 378,
"provenance": "stackexchange_00019.jsonl.gz:407505",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11288"
}
|
[
0.0782470703125,
0.0162353515625,
-0.012298583984375,
-0.05145263671875,
0.03125,
-0.0260772705078125,
0.0390625,
-0.0135650634765625,
-0.035552978515625,
-0.033782958984375,
-0.023284912109375,
0.00864410400390625,
-0.071044921875,
-0.04156494140625,
0.056854248046875,
-0.051025390625,
0.01334381103515625,
0.0285491943359375,
0.048675537109375,
-0.0211029052734375,
0.01873779296875,
-0.019256591796875,
0.04168701171875,
0.0212249755859375,
0.006412506103515625,
0.02020263671875,
0.0271148681640625,
-0.001983642578125,
-0.007965087890625,
-0.00734710693359375,
0.0234222412109375,
-0.0212249755859375,
0.035552978515625,
0.010498046875,
-0.0438232421875,
0.0200042724609375,
0.026458740234375,
-0.01312255859375,
-0.0234222412109375,
0.043304443359375,
0.0248260498046875,
-0.0128173828125,
-0.00890350341796875,
0.0078887939453125,
-0.0038394927978515625,
-0.05950927734375,
0.03173828125,
-0.0291595458984375,
0.01800537109375,
-0.0277557373046875,
-0.002964019775390625,
0.005191802978515625,
0.02569580078125,
-0.0168304443359375,
-0.01470184326171875,
-0.034942626953125,
-0.003269195556640625,
-0.00872802734375,
0.054901123046875,
-0.0185699462890625,
-0.029022216796875,
-0.04376220703125,
0.032989501953125,
-0.00762176513671875,
-0.00225067138671875,
0.0183258056640625,
0.002025604248046875,
0.00331878662109375,
-0.03753662109375,
0.0007967948913574219,
0.03912353515625,
-0.050018310546875,
0.034454345703125,
-0.017608642578125,
0.01702880859375,
-0.043121337890625,
0.0097808837890625,
-0.00449371337890625,
0.0298614501953125,
-0.0006251335144042969,
-0.024139404296875,
-0.033355712890625,
0.020172119140625,
-0.045745849609375,
-0.0218505859375,
-0.02923583984375,
-0.0114288330078125,
0.0242462158203125,
-0.0283660888671875,
-0.041717529296875,
-0.009552001953125,
-0.0845947265625,
-0.045684814453125,
0.0261993408203125,
0.0223846435546875,
-0.052581787109375,
0.024322509765625,
-0.00923919677734375,
0.019805908203125,
0.00827789306640625,
0.0087432861328125,
-0.05078125,
0.04412841796875,
-0.0203704833984375,
0.00350189208984375,
0.02655029296875,
-0.0125579833984375,
0.0007967948913574219,
0.033294677734375,
0.005924224853515625,
-0.00543975830078125,
0.0030117034912109375,
-0.0027790069580078125,
0.0124053955078125,
-0.0140380859375,
0.014007568359375,
-0.0258941650390625,
0.0254669189453125,
-0.018829345703125,
0.04998779296875,
-0.004268646240234375,
0.036163330078125,
0.00984954833984375,
-0.035369873046875,
-0.01384735107421875,
-0.0338134765625,
-0.00791168212890625,
-0.04150390625,
0.024169921875,
0.0008320808410644531,
-0.033905029296875,
0.024810791015625,
0.07366943359375,
0.03704833984375,
0.01218414306640625,
-0.00678253173828125,
-0.0136260986328125,
-0.03369140625,
-0.00789642333984375,
-0.0026836395263671875,
0.0155487060546875,
-0.04388427734375,
-0.0155792236328125,
0.01226043701171875,
0.01007843017578125,
0.051239013671875,
0.0105133056640625,
0.0016841888427734375,
0.003391265869140625,
-0.04718017578125,
-0.022186279296875,
-0.0162506103515625,
0.032958984375,
-0.004261016845703125,
-0.01140594482421875,
-0.01885986328125,
0.025146484375,
-0.02447509765625,
-0.0053253173828125,
-0.02056884765625,
-0.0022754669189453125,
0.0222015380859375,
0.0518798828125,
-0.0285186767578125,
-0.0042877197265625,
-0.037628173828125,
-0.06488037109375,
0.0033092498779296875,
0.02679443359375,
-0.037841796875,
0.006076812744140625,
-0.004581451416015625,
0.037933349609375,
0.0091705322265625,
-0.0059967041015625,
0.032684326171875,
0.006496429443359375,
0.0208282470703125,
0.0225067138671875,
0.053985595703125,
0.021270751953125,
-0.00812530517578125,
0.10205078125,
-0.030303955078125,
-0.045989990234375,
0.034576416015625,
0.0093231201171875,
0.02459716796875,
-0.0054779052734375,
0.003582000732421875,
0.047454833984375,
0.037139892578125,
-0.008331298828125,
0.002300262451171875,
-0.011962890625,
-0.01197052001953125,
-0.0181427001953125,
0.01202392578125,
-0.02276611328125,
0.0102081298828125,
-0.046875,
-0.0298919677734375,
-0.0003447532653808594,
0.0108489990234375,
0.00931549072265625,
-0.03790283203125,
0.0027904510498046875,
0.0005197525024414062,
0.004497528076171875,
0.01419830322265625,
0.01505279541015625,
0.0028476715087890625,
-0.0152130126953125,
-0.03411865234375,
-0.0099639892578125,
0.015380859375,
-0.0008001327514648438,
0.01861572265625,
-0.02020263671875,
0.0105743408203125,
-0.018096923828125,
-0.03875732421875,
-0.0266265869140625,
0.037567138671875,
0.0138397216796875,
-0.0101776123046875,
-0.0287017822265625,
-0.014923095703125,
-0.045318603515625,
0.021728515625,
-0.08111572265625,
0.04266357421875,
-0.01061248779296875,
-0.051605224609375,
-0.06817626953125,
-0.0223236083984375,
-0.034820556640625,
-0.061004638671875,
0.01302337646484375,
0.07489013671875,
0.007183074951171875,
0.0296173095703125,
0.0215911865234375,
0.07159423828125,
0.05291748046875,
0.033050537109375,
0.03302001953125,
0.022674560546875,
0.013946533203125,
0.04290771484375,
-0.015380859375,
-0.007106781005859375,
0.0201873779296875,
-0.041290283203125,
0.0259857177734375,
0.0223846435546875,
-0.0140380859375,
-0.020782470703125,
0.02264404296875,
-0.031646728515625,
0.02313232421875,
-0.0304107666015625,
-0.056854248046875,
-0.0010128021240234375,
0.06744384765625,
0.0091094970703125,
0.07269287109375,
0.058502197265625,
-0.0269775390625,
-0.01428985595703125,
-0.001308441162109375,
0.02886962890625,
0.004779815673828125,
-0.0027523040771484375,
0.034027099609375,
0.0240478515625,
-0.03948974609375,
-0.017822265625,
0.047515869140625,
0.01181793212890625,
0.003021240234375,
0.032562255859375,
-0.012908935546875,
-0.00604248046875,
0.004619598388671875,
-0.0743408203125,
-0.007110595703125,
0.0264434814453125,
-0.0201263427734375,
-0.0474853515625,
0.0058135986328125,
-0.01004791259765625,
-0.0394287109375,
0.0265045166015625,
0.0164794921875,
-0.04736328125,
-0.006000518798828125,
-0.0794677734375,
0.0748291015625,
-0.0513916015625,
0.034881591796875,
0.0811767578125,
-0.029510498046875,
0.0516357421875,
0.0023193359375,
-0.01090240478515625,
-0.0206451416015625,
0.052093505859375,
0.0308074951171875,
-0.05322265625,
0.010162353515625,
0.007335662841796875,
0.0211944580078125,
0.0229644775390625,
0.005977630615234375,
-0.020263671875,
0.00963592529296875,
0.033416748046875,
-0.01488494873046875,
-0.0170135498046875,
-0.036102294921875,
-0.05914306640625,
-0.021148681640625,
-0.017669677734375,
-0.033782958984375,
0.0235595703125,
-0.0072479248046875,
0.013580322265625,
-0.01027679443359375,
-0.0149383544921875,
0.0044403076171875,
-0.03729248046875,
-0.045074462890625,
-0.058502197265625,
0.0053558349609375,
-0.005863189697265625,
-0.0039825439453125,
0.038970947265625,
-0.0138397216796875,
-0.0430908203125,
-0.0074310302734375,
0.0073699951171875,
0.005191802978515625,
0.006053924560546875,
0.003955841064453125,
-0.0272369384765625,
0.03228759765625,
0.0043792724609375,
-0.00047707557678222656,
0.020263671875,
-0.01220703125,
-0.01739501953125,
-0.039520263671875,
-0.0552978515625,
-0.00252532958984375,
0.004741668701171875,
0.0244903564453125,
-0.0279388427734375,
0.0301666259765625,
-0.047882080078125,
0.0287628173828125,
0.0046234130859375,
0.00574493408203125,
-0.0745849609375,
-0.0303955078125,
-0.0248870849609375,
-0.049346923828125,
0.0241851806640625,
-0.01392364501953125,
0.0253143310546875,
0.0019388198852539062,
-0.004993438720703125,
0.0238800048828125,
-0.00971221923828125,
-0.01230621337890625,
-0.00241851806640625,
0.002872467041015625,
-0.0279693603515625,
0.060821533203125,
0.0047149658203125,
-0.0006866455078125,
-0.01265716552734375,
0.006107330322265625,
-0.03839111328125,
-0.11419677734375,
0.046905517578125,
-0.0718994140625,
0.01190185546875,
-0.0635986328125,
-0.0207366943359375,
-0.001605987548828125,
0.1307373046875,
-0.052001953125,
-0.0037441253662109375,
0.0167999267578125,
-0.00620269775390625,
0.02410888671875,
-0.003322601318359375,
-0.058807373046875,
-0.035919189453125,
-0.042724609375,
0.0070648193359375,
0.007335662841796875,
-0.01898193359375,
-0.0116729736328125,
0.0310516357421875,
-0.0234375,
-0.0194091796875,
0.0125732421875,
-0.032012939453125,
0.022735595703125,
0.002185821533203125,
-0.0033588409423828125,
-0.006038665771484375,
0.01995849609375,
-0.05224609375,
-0.10772705078125,
-0.016265869140625,
0.0220947265625,
0.053253173828125,
-0.031494140625,
0.0038166046142578125,
-0.01065826416015625,
0.054107666015625,
0.028533935546875,
0.0118255615234375,
-0.0015869140625,
-0.013671875,
-0.0180206298828125,
-0.032135009765625,
0.0020294189453125,
-0.040069580078125,
-0.0124969482421875,
-0.0227203369140625,
-0.014556884765625,
-0.0025768280029296875,
-0.0191650390625,
-0.022003173828125,
-0.0025539398193359375,
-0.01983642578125,
-0.013702392578125,
-0.03375244140625,
-0.0210723876953125,
0.00739288330078125,
-0.0247955322265625,
-0.00261688232421875,
-0.0217742919921875,
-0.01043701171875,
-0.00843048095703125,
-0.0272064208984375,
-0.0010509490966796875,
0.0273895263671875,
0.059051513671875,
0.00983428955078125,
0.0135345458984375,
-0.07562255859375,
-0.02569580078125,
0.0438232421875,
0.021759033203125,
0.032562255859375,
0.0207366943359375,
-0.028076171875,
0.03997802734375,
0.02972412109375,
-0.0006265640258789062,
-0.0465087890625,
0.0640869140625,
-0.0020542144775390625,
-0.00785064697265625,
0.0111541748046875,
-0.030914306640625,
0.029266357421875,
-0.01568603515625,
-0.0174102783203125,
-0.0141754150390625,
0.00536346435546875,
0.0281829833984375,
-0.02117919921875,
0.053253173828125,
-0.007770538330078125,
-0.04302978515625,
0.022491455078125,
-0.0252685546875,
-0.0024013519287109375,
0.0005249977111816406,
0.0027294158935546875,
-0.006580352783203125,
-0.04840087890625,
-0.01003265380859375,
-0.000011026859283447266,
-0.01299285888671875,
0.015777587890625,
-0.0050811767578125,
0.04949951171875,
0.005825042724609375,
-0.007457733154296875,
-0.0000019669532775878906,
0.01470184326171875,
-0.006214141845703125,
-0.0489501953125,
-0.0131683349609375,
0.0002371072769165039,
0.0201263427734375,
0.012786865234375,
0.014251708984375,
0.004268646240234375,
0.0221099853515625,
0.032379150390625,
0.01922607421875,
0.007366180419921875,
0.043853759765625,
-0.01110076904296875,
-0.030303955078125,
0.006504058837890625,
-0.0230865478515625,
-0.0242462158203125,
0.042327880859375,
0.00359344482421875,
0.0073699951171875,
-0.0081329345703125,
0.054168701171875,
0.07672119140625,
-0.005588531494140625,
0.0211029052734375,
0.0295867919921875,
-0.030029296875,
-0.00026035308837890625,
-0.0310211181640625,
-0.0357666015625,
-0.0224151611328125,
-0.0027790069580078125,
0.0350341796875,
-0.007030487060546875,
0.006717681884765625,
0.0178070068359375,
-0.0069427490234375,
-0.0179595947265625,
-0.0022144317626953125,
-0.0015897750854492188,
-0.0245208740234375,
-0.0033111572265625,
0.0276947021484375,
0.00899505615234375,
0.01305389404296875,
0.00838470458984375,
0.0083770751953125,
0.00685882568359375,
0.0257720947265625,
-0.0054779052734375,
0.00400543212890625,
-0.00867462158203125,
-0.01204681396484375,
-0.0264892578125,
0.0036773681640625,
0.010284423828125,
-0.0237274169921875,
-0.036224365234375,
0.00031447410583496094,
-0.01160430908203125,
0.0209197998046875,
-0.03753662109375,
0.01282501220703125,
-0.018951416015625,
0.01361083984375,
-0.01305389404296875,
0.03155517578125,
-0.0014314651489257812,
-0.0085601806640625,
-0.0027790069580078125,
-0.0168609619140625,
-0.0213165283203125,
-0.0272064208984375,
-0.03631591796875,
-0.0217742919921875,
-0.01409149169921875,
0.003429412841796875,
-0.0021724700927734375,
0.033355712890625,
-0.04034423828125,
-0.057464599609375,
-0.00485992431640625,
-0.003681182861328125,
0.0165557861328125,
0.007076263427734375,
0.01294708251953125,
0.01763916015625,
-0.01090240478515625,
0.0631103515625,
0.017242431640625,
-0.0170135498046875,
-0.031585693359375,
-0.0300445556640625,
-0.0035877227783203125,
-0.09576416015625,
-0.0233306884765625,
0.00536346435546875,
-0.014312744140625,
0.058807373046875,
0.0000407099723815918,
0.004932403564453125,
0.00046896934509277344,
-0.01007843017578125,
0.00951385498046875,
-0.014404296875,
0.005916595458984375,
-0.01409912109375,
-0.034515380859375,
0.033905029296875,
-0.0148162841796875,
0.041412353515625,
0.0164642333984375,
-0.00815582275390625,
0.00809478759765625,
-0.00937652587890625,
0.02362060546875,
-0.0022869110107421875,
-0.03948974609375,
0.042694091796875,
0.0292205810546875,
0.0185699462890625,
0.012176513671875,
0.0099029541015625,
0.00916290283203125,
-0.0283050537109375,
0.005222320556640625,
-0.030120849609375,
-0.0170135498046875,
0.03265380859375,
0.00084686279296875,
-0.044219970703125,
0.022705078125,
-0.0261077880859375,
0.03936767578125,
0.052215576171875,
0.06884765625,
-0.11212158203125,
0.041290283203125,
-0.0036067962646484375,
0.01126861572265625,
0.0870361328125,
-0.0335693359375,
0.00920867919921875,
0.01451873779296875,
0.020416259765625,
0.037872314453125,
-0.0367431640625,
0.0016508102416992188,
0.0080718994140625,
-0.00797271728515625,
-0.0230560302734375,
0.04608154296875,
0.01446533203125,
0.0170440673828125,
-0.0244598388671875,
-0.00981903076171875,
-0.0178375244140625,
-0.00675201416015625,
0.01776123046875,
-0.028076171875,
-0.007099151611328125,
-0.04815673828125,
-0.00907135009765625,
-0.042938232421875,
0.0031681060791015625,
0.004283905029296875,
0.0123443603515625,
0.044342041015625,
0.047515869140625,
-0.00783538818359375,
-0.006710052490234375,
0.025421142578125,
0.0200347900390625,
-0.0256805419921875,
-0.04620361328125,
-0.01971435546875,
0.037750244140625,
-0.0200347900390625,
0.02911376953125,
-0.003864288330078125,
-0.03289794921875,
-0.0288543701171875,
-0.0248870849609375,
0.0914306640625,
-0.004772186279296875,
-0.0321044921875,
0.031951904296875,
0.006526947021484375,
-0.0287322998046875,
-0.0146942138671875,
-0.03619384765625,
-0.055572509765625,
-0.020111083984375,
-0.02490234375,
-0.04705810546875,
0.019500732421875,
-0.01099395751953125,
-0.08380126953125,
0.08270263671875,
0.024444580078125,
0.0199737548828125,
-0.02459716796875,
0.038970947265625,
-0.01036834716796875,
0.026031494140625,
-0.01531982421875,
0.03375244140625,
-0.018646240234375,
0.00785064697265625,
-0.06195068359375,
-0.024139404296875,
-0.0246734619140625,
0.06256103515625,
0.05023193359375,
0.0008759498596191406,
-0.0202178955078125,
-0.00939178466796875,
0.0623779296875,
0.04742431640625,
0.013916015625,
0.022857666015625,
0.0005774497985839844,
0.02166748046875,
0.053131103515625,
-0.021881103515625,
0.032440185546875,
0.028167724609375,
-0.0241241455078125,
0.032928466796875,
-0.01024627685546875,
-0.013580322265625,
-0.0037746429443359375,
0.0192718505859375,
0.01358795166015625,
-0.0149993896484375,
-0.0151519775390625,
0.0010995864868164062,
-0.0117950439453125,
0.05072021484375,
0.0041351318359375,
-0.0128936767578125,
-0.01200103759765625,
-0.03704833984375,
0.03424072265625,
-0.01300811767578125,
0.041107177734375,
-0.0101776123046875,
0.0139617919921875,
0.039459228515625,
-0.022613525390625,
0.0243072509765625,
0.03228759765625,
-0.04608154296875,
0.051666259765625,
-0.021392822265625,
0.016571044921875,
-0.0654296875,
0.0002636909484863281,
0.01287078857421875,
0.041107177734375,
-0.040283203125,
-0.023284912109375,
0.0081329345703125,
0.035064697265625,
0.03521728515625,
-0.01392364501953125,
0.046112060546875,
-0.04058837890625,
0.0136871337890625,
-0.048614501953125,
-0.0004756450653076172,
0.01067352294921875,
0.00811004638671875,
-0.035186767578125,
-0.0170745849609375,
0.007152557373046875,
0.01277923583984375,
-0.010162353515625,
-0.0256805419921875,
-0.0059814453125,
0.0273284912109375,
0.02203369140625,
0.03448486328125,
-0.01708984375,
-0.00965118408203125,
-0.0017576217651367188,
0.01000213623046875,
0.0197906494140625,
-0.005878448486328125,
0.0004048347473144531,
-0.00968170166015625,
0.0215301513671875,
0.00986480712890625,
0.00748443603515625,
0.0275115966796875,
0.045196533203125,
0.039947509765625,
0.0009169578552246094,
-0.01175689697265625,
0.0282745361328125,
-0.0167694091796875,
0.006122589111328125,
-0.03546142578125,
0.020782470703125,
0.03460693359375,
-0.01284027099609375,
0.01434326171875,
-0.04022216796875,
0.07098388671875,
-0.0025806427001953125,
0.0249786376953125,
0.007617950439453125,
-0.041656494140625,
0.055511474609375,
-0.00559234619140625,
0.105224609375,
0.0266876220703125,
-0.10260009765625,
-0.0159912109375,
-0.037628173828125,
-0.065185546875,
0.061614990234375,
0.059906005859375,
-0.020172119140625,
-0.017974853515625,
0.01381683349609375,
-0.033477783203125,
0.060272216796875,
0.001506805419921875,
-0.012451171875,
0.023529052734375,
0.0302276611328125,
-0.005931854248046875,
-0.0947265625,
-0.049560546875,
-0.01043701171875,
0.030517578125,
-0.005519866943359375,
0.055450439453125,
0.00016891956329345703,
0.004459381103515625,
-0.06671142578125,
0.017822265625,
-0.042327880859375,
-0.0623779296875,
0.050201416015625,
0.03045654296875,
-0.0085906982421875,
-0.0034923553466796875,
-0.00518035888671875,
-0.01715087890625,
0.03076171875,
-0.046173095703125,
-0.03582763671875,
-0.00807952880859375,
0.031646728515625,
-0.0141448974609375,
0.00104522705078125,
-0.023345947265625,
0.0136566162109375,
0.01305389404296875,
-0.032806396484375,
0.0245208740234375,
-0.01131439208984375,
-0.000026702880859375,
0.05224609375,
-0.0140533447265625,
-0.02301025390625,
0.020660400390625,
-0.06561279296875,
0.019317626953125,
0.0352783203125,
0.00997161865234375,
-0.0126953125,
0.00957489013671875,
-0.01273345947265625,
0.034149169921875,
0.0031223297119140625,
0.03216552734375,
0.0206451416015625,
-0.02069091796875,
0.0367431640625,
-0.0085296630859375,
0.046905517578125,
-0.01390838623046875,
0.005916595458984375,
-0.0202178955078125,
0.0174713134765625,
0.0033931732177734375,
0.01102447509765625,
-0.0295867919921875,
-0.039794921875,
0.017974853515625,
0.01392364501953125,
0.0145111083984375,
-0.01262664794921875,
-0.048431396484375,
-0.0080718994140625,
0.0160369873046875,
-0.0335693359375,
-0.004535675048828125,
0.00421142578125,
-0.0389404296875,
0.01454925537109375,
-0.023468017578125,
-0.023193359375,
0.01959228515625,
0.056610107421875,
0.00858306884765625,
0.002227783203125,
-0.0091094970703125,
0.00566864013671875,
0.006649017333984375,
0.038909912109375,
0.045135498046875,
-0.037017822265625,
-0.03485107421875,
0.05169677734375,
0.0241241455078125,
0.0928955078125,
0.015869140625,
-0.017791748046875,
0.0104217529296875,
-0.01070404052734375,
0.000012099742889404297,
-0.0263824462890625,
0.014007568359375,
-0.047607421875,
-0.0287322998046875,
-0.044403076171875,
0.0167694091796875,
0.01026153564453125,
-0.032501220703125,
-0.07208251953125,
0.03094482421875,
-0.028106689453125,
-0.031829833984375,
-0.03717041015625,
0.024017333984375,
0.010833740234375,
0.0228271484375,
-0.0018262863159179688,
-0.02752685546875,
-0.0408935546875,
-0.00940704345703125,
-0.0126953125,
0.0272064208984375,
0.037384033203125,
-0.00039696693420410156,
-0.03564453125,
-0.030914306640625,
-0.0294952392578125,
-0.02294921875,
0.04718017578125,
-0.0269775390625,
0.009063720703125,
0.03466796875,
-0.0682373046875,
-0.0643310546875,
-0.044464111328125,
-0.013092041015625,
0.002288818359375,
-0.0557861328125,
-0.01140594482421875,
-0.021942138671875,
0.02197265625,
0.0209197998046875,
0.0021820068359375,
-0.01114654541015625,
0.02545166015625,
-0.016357421875,
-0.054534912109375,
-0.0117340087890625,
0.006420135498046875,
-0.01312255859375,
0.0151214599609375,
-0.0297393798828125,
-0.0178375244140625,
0.01190948486328125,
0.00843048095703125,
-0.0259552001953125,
0.01540374755859375,
0.006153106689453125,
-0.0257568359375,
-0.0386962890625,
0.0162353515625,
0.041290283203125,
-0.02081298828125,
0.0196380615234375,
-0.0024547576904296875,
-0.0042877197265625,
0.039581298828125,
0.0285186767578125,
0.0021305084228515625,
-0.01128387451171875,
-0.02978515625,
0.05072021484375,
-0.01325225830078125,
0.03955078125,
-0.05987548828125,
-0.005283355712890625,
-0.007015228271484375,
0.04168701171875,
-0.002910614013671875,
0.03741455078125,
-0.04541015625,
0.07513427734375,
0.013153076171875,
0.06817626953125,
-0.00957489013671875,
-0.0880126953125,
-0.0404052734375,
0.004116058349609375,
-0.0121002197265625,
0.01406097412109375,
0.036834716796875,
-0.035369873046875,
0.000006258487701416016,
-0.011627197265625,
-0.049407958984375,
-0.032135009765625,
0.01137542724609375,
0.0264892578125,
-0.0311126708984375,
0.0182037353515625
] |
192b21c1f8401a488f3b333bff09b68a9cb4e4f2
|
Wordpress Stackexchange
Q: How do I get a post (page or CPT) ID from a title or slug? I've scoured the Codex, failed to get get_page_by_title() to work and am quite surprised that there doesn't seem to be a standard WP function for this task.
I need to get the ID of any given post/ cpt or page using either the slug of the post/ page title. Ideally I'm looking for the following:
get_post_ID_by_title('My post title', 'customposttype');
What should I be doing?
A: You are missing a function parameter. Throw a null in for the second optional paramter $output and this function should work for you.
get_page_by_title('My post title', null, 'customposttype');
I just ran into the same issue and adding the null fixed it for me.
|
Q: How do I get a post (page or CPT) ID from a title or slug? I've scoured the Codex, failed to get get_page_by_title() to work and am quite surprised that there doesn't seem to be a standard WP function for this task.
I need to get the ID of any given post/ cpt or page using either the slug of the post/ page title. Ideally I'm looking for the following:
get_post_ID_by_title('My post title', 'customposttype');
What should I be doing?
A: You are missing a function parameter. Throw a null in for the second optional paramter $output and this function should work for you.
get_page_by_title('My post title', null, 'customposttype');
I just ran into the same issue and adding the null fixed it for me.
A: I tend to shy away from direct DB queries. Instead, I use the WP_Query object to parse things for me.
This is, basically, a function I use in one of my themes to get a post based on a given slug:
function get_post_id( $slug, $post_type ) {
$query = new WP_Query(
array(
'name' => $slug,
'post_type' => $post_type
)
);
$query->the_post();
return get_the_ID();
}
This will create a query using the WP API to fetch a post of a specific type with a given slug, will run the regular loop functions on the result, and return the ID of the post. You could also use it to return the entire post by modifying the function a bit, but that's up to you.
A: Update: As of WordPress 3.0 you can use the built-in function get_page_by_title with the third parameter $post_type:
$post = get_page_by_title( 'Post Title', OBJECT, 'post_type' );
$post_id = $post ? $post->ID : 0;
Original Answer
you can use this function that jumps by google "get post by title"
/**
* Retrieve a post given its title.
*
* @uses $wpdb
*
* @param string $post_title Page title
* @param string $post_type post type ('post','page','any custom type')
* @param string $output Optional. Output type. OBJECT, ARRAY_N, or ARRAY_A.
* @return mixed
*/
function get_post_by_title($page_title, $post_type ='post' , $output = OBJECT) {
global $wpdb;
$post = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_type= %s", $page_title, $post_type));
if ( $post )
return get_post($post, $output);
return null;
}
A: This is a few years old now, but it still pops up when searching for this on Google. So, here's a simple way to do it:
$page = get_page_by_title( 'my post title' );
or
$page = get_post_ID_by_title('my post title', OBJECT, 'customposttype');
Then just use the $page object to grab the ID:
$page->ID
A: Currently (WP >4.9.2) you'll find your "any" given post/page etc. by title/slug this way:
$page = get_posts(
array(
//'name' => 'your-post-slug', // by post slug
'title' => 'Your post title', // by post title
'post_type' => 'page' // post type of your preference
)
);
if ($page = $page[0]) // First/lowest ID taken if many objects
{
// Then you do whatever is needed...
// $id = $page->id;
// $content = $page->post_content;
// or $content = apply_filters('the_content', $page->post_content);
// etc.
}
|
wordpress
|
{
"language": "en",
"length": 511,
"provenance": "stackexchange_00019.jsonl.gz:407506",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11292"
}
|
[
0.0238189697265625,
-0.0010051727294921875,
0.022552490234375,
0.0163116455078125,
-0.00927734375,
-0.0222625732421875,
0.03948974609375,
-0.031494140625,
0.003818511962890625,
0.0100860595703125,
-0.04461669921875,
0.0228729248046875,
-0.047027587890625,
-0.007701873779296875,
0.006744384765625,
-0.0221405029296875,
0.024871826171875,
-0.007110595703125,
0.023101806640625,
-0.016265869140625,
-0.0080108642578125,
-0.014312744140625,
0.04852294921875,
0.033233642578125,
0.044952392578125,
-0.0650634765625,
0.01629638671875,
-0.012908935546875,
0.02032470703125,
-0.0187225341796875,
0.03021240234375,
0.0006418228149414062,
0.01499176025390625,
-0.035888671875,
0.038787841796875,
0.022979736328125,
0.00849151611328125,
-0.006412506103515625,
0.0214691162109375,
-0.004058837890625,
-0.0015535354614257812,
0.0237579345703125,
0.01300811767578125,
0.007030487060546875,
-0.03564453125,
-0.0318603515625,
0.00635528564453125,
-0.00775146484375,
-0.004695892333984375,
-0.00009828805923461914,
0.00475311279296875,
0.0199432373046875,
0.00611114501953125,
0.062744140625,
-0.005420684814453125,
-0.01702880859375,
0.0300750732421875,
-0.0313720703125,
0.0246734619140625,
-0.05596923828125,
-0.033050537109375,
-0.0123443603515625,
0.043121337890625,
0.0026092529296875,
-0.00823211669921875,
0.0306854248046875,
0.02813720703125,
-0.0029621124267578125,
0.01381683349609375,
-0.006622314453125,
-0.003772735595703125,
-0.00025725364685058594,
-0.00637054443359375,
-0.01300811767578125,
-0.012786865234375,
-0.0296478271484375,
0.012359619140625,
-0.054840087890625,
-0.000988006591796875,
0.02093505859375,
0.01039886474609375,
-0.06890869140625,
-0.06964111328125,
0.038970947265625,
0.00457000732421875,
0.059295654296875,
-0.007213592529296875,
-0.0234832763671875,
-0.0227813720703125,
-0.03436279296875,
-0.030548095703125,
0.0287322998046875,
-0.018890380859375,
-0.0247344970703125,
-0.044891357421875,
-0.027252197265625,
0.0308685302734375,
0.07672119140625,
-0.030517578125,
0.0217742919921875,
-0.006195068359375,
-0.03936767578125,
0.051788330078125,
-0.059814453125,
-0.001682281494140625,
0.0013723373413085938,
0.0196533203125,
0.0228729248046875,
0.0055084228515625,
0.0034236907958984375,
-0.0191802978515625,
-0.013214111328125,
-0.0042724609375,
-0.00453948974609375,
-0.0202484130859375,
0.0380859375,
-0.0179290771484375,
-0.0213775634765625,
-0.019683837890625,
0.015594482421875,
-0.0088043212890625,
0.005672454833984375,
0.0401611328125,
-0.0194091796875,
0.0266876220703125,
0.0423583984375,
-0.0191650390625,
-0.0430908203125,
0.0243988037109375,
0.005344390869140625,
-0.035980224609375,
0.00933837890625,
0.09197998046875,
0.0243072509765625,
0.0160675048828125,
-0.026580810546875,
-0.0159912109375,
-0.0220947265625,
-0.01535797119140625,
-0.0211334228515625,
0.01058197021484375,
0.0026149749755859375,
0.033660888671875,
-0.030487060546875,
-0.01465606689453125,
0.0087890625,
0.00739288330078125,
0.030975341796875,
0.00008028745651245117,
-0.044586181640625,
0.0236358642578125,
-0.0257568359375,
0.00438690185546875,
0.0111083984375,
0.004680633544921875,
-0.03790283203125,
-0.00955963134765625,
-0.0228118896484375,
0.0611572265625,
-0.0221710205078125,
0.0273284912109375,
0.0129852294921875,
-0.00449371337890625,
-0.00325775146484375,
-0.0251007080078125,
-0.010650634765625,
-0.0099639892578125,
-0.01190948486328125,
0.0289154052734375,
0.05291748046875,
0.032623291015625,
-0.01617431640625,
-0.029541015625,
-0.0033206939697265625,
-0.01812744140625,
-0.006023406982421875,
0.00798797607421875,
-0.005039215087890625,
0.010406494140625,
0.03814697265625,
-0.00859832763671875,
-0.0264892578125,
0.0268402099609375,
-0.020904541015625,
-0.055908203125,
0.041656494140625,
0.01541900634765625,
0.07861328125,
0.002918243408203125,
0.029998779296875,
-0.003437042236328125,
0.0136871337890625,
-0.07415771484375,
0.02032470703125,
0.01222991943359375,
-0.0212249755859375,
-0.0016794204711914062,
-0.0223236083984375,
-0.001979827880859375,
0.01012420654296875,
-0.01450347900390625,
0.0071258544921875,
-0.006626129150390625,
0.034881591796875,
-0.027618408203125,
-0.00803375244140625,
0.0005216598510742188,
0.026702880859375,
0.0218505859375,
0.0128173828125,
-0.0016994476318359375,
-0.00878143310546875,
-0.0128173828125,
-0.020721435546875,
-0.049468994140625,
-0.01465606689453125,
0.002410888671875,
-0.06915283203125,
-0.032745361328125,
-0.0250091552734375,
-0.0447998046875,
0.025970458984375,
-0.07958984375,
0.0304412841796875,
0.06939697265625,
0.0018854141235351562,
0.00038623809814453125,
-0.02099609375,
0.07635498046875,
0.01776123046875,
-0.027008056640625,
-0.00862884521484375,
0.03802490234375,
0.0516357421875,
-0.02880859375,
-0.0003230571746826172,
-0.0017347335815429688,
-0.0222320556640625,
0.006755828857421875,
0.030120849609375,
0.0305328369140625,
0.007110595703125,
-0.01513671875,
-0.0050048828125,
0.01425933837890625,
-0.03448486328125,
0.005138397216796875,
-0.00762176513671875,
0.038177490234375,
0.069580078125,
0.01290130615234375,
0.0039215087890625,
0.01549530029296875,
-0.0196075439453125,
0.00954437255859375,
0.0390625,
-0.007251739501953125,
0.01541900634765625,
-0.005420684814453125,
-0.0169219970703125,
0.0029239654541015625,
-0.0174102783203125,
-0.0098114013671875,
-0.01439666748046875,
0.0019359588623046875,
0.035919189453125,
0.020263671875,
0.0302734375,
-0.033477783203125,
0.004302978515625,
0.01178741455078125,
0.0369873046875,
0.00786590576171875,
0.036224365234375,
0.05645751953125,
0.00963592529296875,
-0.01873779296875,
-0.0308685302734375,
0.01015472412109375,
0.01531219482421875,
0.0009164810180664062,
0.014923095703125,
0.00904083251953125,
-0.00848388671875,
0.01495361328125,
-0.050567626953125,
0.004924774169921875,
-0.0037078857421875,
-0.0191192626953125,
-0.004474639892578125,
0.003154754638671875,
0.047943115234375,
-0.036407470703125,
0.052215576171875,
-0.01175689697265625,
0.01360321044921875,
0.061004638671875,
-0.041839599609375,
0.038970947265625,
-0.041534423828125,
0.07244873046875,
0.046539306640625,
-0.0352783203125,
0.01410675048828125,
0.01558685302734375,
-0.035003662109375,
0.0021762847900390625,
0.0017490386962890625,
0.0007114410400390625,
0.00766754150390625,
-0.05224609375,
0.05584716796875,
0.0086822509765625,
0.0958251953125,
-0.039276123046875,
-0.06378173828125,
0.0072784423828125,
0.0240631103515625,
-0.11492919921875,
-0.1171875,
-0.00719451904296875,
-0.050079345703125,
-0.0019483566284179688,
-0.01355743408203125,
-0.031097412109375,
0.01284027099609375,
0.0162353515625,
0.005527496337890625,
0.016815185546875,
-0.023040771484375,
-0.061920166015625,
-0.037994384765625,
-0.06683349609375,
-0.018035888671875,
-0.00952911376953125,
0.01267242431640625,
0.01177215576171875,
-0.0209197998046875,
-0.00021755695343017578,
-0.0208892822265625,
0.03155517578125,
0.060028076171875,
-0.006954193115234375,
-0.019195556640625,
-0.0040130615234375,
-0.01715087890625,
0.003063201904296875,
0.0218048095703125,
-0.0168914794921875,
-0.0130157470703125,
0.0281982421875,
-0.0310516357421875,
-0.009429931640625,
-0.005950927734375,
-0.0007047653198242188,
0.03619384765625,
0.0233612060546875,
0.039215087890625,
0.035552978515625,
-0.01739501953125,
-0.031585693359375,
-0.0288543701171875,
-0.05853271484375,
0.03863525390625,
0.0303802490234375,
0.0299224853515625,
-0.0245361328125,
0.0265045166015625,
0.01187896728515625,
0.004344940185546875,
0.0173492431640625,
-0.011077880859375,
0.007259368896484375,
-0.00037360191345214844,
0.0231170654296875,
-0.00876617431640625,
0.034454345703125,
0.014190673828125,
0.007251739501953125,
0.0076141357421875,
0.04388427734375,
-0.00807952880859375,
0.0221099853515625,
-0.042236328125,
-0.054290771484375,
0.047821044921875,
-0.0170135498046875,
0.0168914794921875,
-0.0196380615234375,
-0.0386962890625,
0.014862060546875,
0.0997314453125,
-0.03460693359375,
-0.0273590087890625,
-0.01136016845703125,
0.006465911865234375,
0.006656646728515625,
-0.054412841796875,
-0.0029430389404296875,
-0.01428985595703125,
-0.05413818359375,
0.00936126708984375,
-0.00489044189453125,
-0.0165863037109375,
-0.0155792236328125,
0.059295654296875,
-0.01331329345703125,
-0.016693115234375,
0.0374755859375,
0.00891876220703125,
-0.01480865478515625,
0.04119873046875,
-0.04052734375,
0.04705810546875,
-0.05340576171875,
0.023712158203125,
-0.0443115234375,
-0.0234527587890625,
0.039276123046875,
0.03826904296875,
-0.0269622802734375,
-0.0110321044921875,
-0.0230865478515625,
0.0245513916015625,
0.025634765625,
0.029022216796875,
-0.0007090568542480469,
-0.01412200927734375,
-0.0022735595703125,
-0.01904296875,
-0.0187225341796875,
-0.0261077880859375,
-0.0014524459838867188,
-0.0186920166015625,
-0.035980224609375,
0.0093231201171875,
-0.03948974609375,
0.01885986328125,
-0.0149078369140625,
-0.0255889892578125,
-0.044769287109375,
-0.007297515869140625,
0.0199432373046875,
0.0254364013671875,
0.0270233154296875,
-0.007450103759765625,
-0.033203125,
-0.06634521484375,
0.05682373046875,
0.04803466796875,
0.0012311935424804688,
-0.0238037109375,
0.033172607421875,
0.01204681396484375,
-0.059356689453125,
-0.006816864013671875,
-0.037078857421875,
0.0288543701171875,
-0.009735107421875,
0.035186767578125,
0.012298583984375,
-0.0254364013671875,
0.06317138671875,
0.0012025833129882812,
-0.057159423828125,
-0.01433563232421875,
0.06951904296875,
-0.0176544189453125,
-0.0237884521484375,
-0.0013885498046875,
-0.08203125,
0.07080078125,
0.0236663818359375,
-0.028411865234375,
-0.018829345703125,
-0.0291595458984375,
0.052581787109375,
-0.020782470703125,
0.07342529296875,
-0.0260467529296875,
-0.032073974609375,
0.02001953125,
0.00005424022674560547,
0.0070953369140625,
-0.00455474853515625,
-0.0008454322814941406,
-0.0001512765884399414,
-0.024322509765625,
0.01275634765625,
0.0064849853515625,
0.041046142578125,
0.00168609619140625,
0.031768798828125,
0.02642822265625,
0.0006194114685058594,
-0.0296478271484375,
-0.0104827880859375,
0.04925537109375,
-0.0124359130859375,
-0.043182373046875,
0.01287078857421875,
-0.019805908203125,
0.0185546875,
0.031494140625,
0.017425537109375,
0.03375244140625,
0.060821533203125,
-0.01529693603515625,
-0.0160064697265625,
0.031829833984375,
0.034759521484375,
-0.036163330078125,
0.0091705322265625,
0.0180511474609375,
-0.0285797119140625,
-0.00888824462890625,
0.0823974609375,
-0.011077880859375,
0.033111572265625,
-0.02423095703125,
0.02239990234375,
0.0201263427734375,
0.049957275390625,
0.008819580078125,
-0.032318115234375,
-0.0179901123046875,
0.047882080078125,
-0.004390716552734375,
-0.0289459228515625,
-0.00010305643081665039,
0.037689208984375,
0.0343017578125,
-0.005313873291015625,
-0.0249786376953125,
-0.0013742446899414062,
-0.033050537109375,
-0.0196990966796875,
0.034271240234375,
0.0174407958984375,
-0.0455322265625,
-0.01175689697265625,
0.00853729248046875,
0.00591278076171875,
0.0010499954223632812,
-0.0125274658203125,
0.023529052734375,
-0.0150299072265625,
0.0165557861328125,
-0.0201873779296875,
-0.020904541015625,
0.00534820556640625,
0.0128631591796875,
0.0039043426513671875,
-0.013702392578125,
-0.02386474609375,
0.028350830078125,
0.013580322265625,
-0.00975799560546875,
-0.027130126953125,
0.027740478515625,
-0.012603759765625,
0.05902099609375,
-0.03985595703125,
-0.0213623046875,
0.0214996337890625,
-0.0078277587890625,
0.07391357421875,
0.043609619140625,
-0.019744873046875,
0.0255889892578125,
-0.040069580078125,
0.005237579345703125,
0.03662109375,
-0.047027587890625,
-0.03338623046875,
-0.055145263671875,
-0.00279998779296875,
0.0242156982421875,
0.0196533203125,
0.01000213623046875,
-0.0179901123046875,
0.017242431640625,
0.0227508544921875,
0.0611572265625,
0.01209259033203125,
0.06304931640625,
0.005214691162109375,
0.03143310546875,
0.0255889892578125,
0.03216552734375,
-0.0335693359375,
-0.026153564453125,
0.01082611083984375,
-0.03045654296875,
-0.0111083984375,
-0.01204681396484375,
0.0125579833984375,
0.003429412841796875,
0.025146484375,
0.004180908203125,
0.00019252300262451172,
-0.0214080810546875,
-0.0004718303680419922,
-0.0212860107421875,
0.01053619384765625,
-0.0175018310546875,
-0.041046142578125,
0.04644775390625,
-0.033905029296875,
-0.0280914306640625,
-0.0006794929504394531,
0.02972412109375,
-0.01242828369140625,
-0.0296173095703125,
-0.01001739501953125,
0.0206146240234375,
-0.049713134765625,
0.05377197265625,
0.092529296875,
0.0308685302734375,
0.0421142578125,
-0.0009241104125976562,
-0.006305694580078125,
-0.00807952880859375,
0.0216064453125,
0.0110626220703125,
-0.033538818359375,
0.06536865234375,
0.01508331298828125,
-0.005405426025390625,
0.042572021484375,
-0.034454345703125,
0.00423431396484375,
0.00652313232421875,
0.03253173828125,
-0.0192413330078125,
-0.0004329681396484375,
0.019195556640625,
-0.035186767578125,
-0.0343017578125,
-0.0034961700439453125,
-0.0003638267517089844,
-0.0203857421875,
0.0265350341796875,
-0.0207672119140625,
-0.0232696533203125,
0.001270294189453125,
-0.01861572265625,
-0.00415802001953125,
-0.01432037353515625,
0.0692138671875,
0.0206451416015625,
-0.0227813720703125,
0.004756927490234375,
0.00934600830078125,
0.0163726806640625,
-0.06787109375,
-0.002506256103515625,
0.0423583984375,
-0.00699615478515625,
-0.07061767578125,
0.059356689453125,
-0.029937744140625,
0.0297698974609375,
0.033111572265625,
0.057891845703125,
-0.00313568115234375,
0.044097900390625,
0.00565338134765625,
-0.015167236328125,
0.0255126953125,
-0.041229248046875,
-0.0158843994140625,
-0.00885772705078125,
-0.0016508102416992188,
0.041595458984375,
-0.007358551025390625,
0.0203857421875,
-0.0205535888671875,
0.0018787384033203125,
-0.00901031494140625,
-0.03497314453125,
0.05780029296875,
-0.0154266357421875,
-0.0191497802734375,
0.0083160400390625,
0.03057861328125,
0.003246307373046875,
0.00792694091796875,
0.016326904296875,
0.0037097930908203125,
0.032928466796875,
0.0218658447265625,
0.0242919921875,
-0.0183563232421875,
0.01486968994140625,
-0.060821533203125,
0.102294921875,
0.03131103515625,
0.020843505859375,
-0.01113128662109375,
0.040191650390625,
-0.028961181640625,
0.0284423828125,
-0.06378173828125,
0.06927490234375,
-0.0411376953125,
0.047210693359375,
-0.07958984375,
-0.0114898681640625,
0.00862884521484375,
0.0097808837890625,
0.0657958984375,
0.00843048095703125,
-0.0426025390625,
-0.0166015625,
0.047454833984375,
0.049041748046875,
0.01459503173828125,
0.028106689453125,
0.01027679443359375,
0.041961669921875,
0.03118896484375,
-0.06378173828125,
0.01299285888671875,
-0.042266845703125,
-0.003589630126953125,
0.03515625,
0.0200653076171875,
-0.00051116943359375,
0.023101806640625,
-0.05694580078125,
-0.0491943359375,
0.027069091796875,
0.015533447265625,
0.0245819091796875,
0.0250396728515625,
0.038665771484375,
0.0791015625,
-0.062744140625,
-0.020111083984375,
-0.0274658203125,
0.07293701171875,
0.0218048095703125,
0.0022068023681640625,
0.00420379638671875,
0.01099395751953125,
0.00582122802734375,
-0.02325439453125,
-0.019744873046875,
0.00750732421875,
-0.004314422607421875,
0.06744384765625,
0.00795745849609375,
0.007328033447265625,
-0.066650390625,
0.0406494140625,
0.036102294921875,
0.07000732421875,
-0.069580078125,
-0.005279541015625,
0.02655029296875,
-0.007312774658203125,
-0.00994873046875,
-0.0184478759765625,
-0.00989532470703125,
0.005596160888671875,
0.029541015625,
-0.018707275390625,
0.0030841827392578125,
0.00916290283203125,
0.039703369140625,
-0.0221405029296875,
-0.0574951171875,
-0.018646240234375,
-0.00025010108947753906,
-0.06072998046875,
0.0305328369140625,
0.0261688232421875,
0.07232666015625,
0.01024627685546875,
0.0709228515625,
-0.04071044921875,
-0.037628173828125,
0.0271453857421875,
0.016754150390625,
0.01142120361328125,
-0.034759521484375,
0.012298583984375,
-0.039642333984375,
0.00922393798828125,
-0.0013256072998046875,
0.0506591796875,
0.0284881591796875,
0.05584716796875,
0.007625579833984375,
-0.022735595703125,
0.01367950439453125,
0.00920867919921875,
-0.02545166015625,
0.0188140869140625,
-0.025482177734375,
0.021636962890625,
0.001506805419921875,
-0.02117919921875,
-0.0164794921875,
0.01331329345703125,
0.016265869140625,
-0.002410888671875,
0.042236328125,
0.012664794921875,
-0.0004317760467529297,
0.046234130859375,
0.031005859375,
0.019287109375,
0.0269012451171875,
-0.07403564453125,
0.004032135009765625,
-0.0171051025390625,
-0.07647705078125,
0.025665283203125,
0.041748046875,
-0.005672454833984375,
-0.0261383056640625,
-0.0125579833984375,
0.039093017578125,
0.00423431396484375,
-0.0238037109375,
-0.00047969818115234375,
0.0234222412109375,
0.03424072265625,
0.027069091796875,
-0.034820556640625,
-0.02386474609375,
-0.00933074951171875,
0.021026611328125,
0.013946533203125,
0.048095703125,
0.002521514892578125,
0.02801513671875,
-0.01515960693359375,
0.052886962890625,
-0.047149658203125,
-0.0255126953125,
0.060882568359375,
0.01029205322265625,
0.0227508544921875,
-0.01393890380859375,
-0.03643798828125,
0.035247802734375,
0.022064208984375,
0.0198974609375,
0.0100250244140625,
-0.0184478759765625,
0.023956298828125,
0.01348114013671875,
-0.0211181640625,
-0.01214599609375,
0.0260009765625,
-0.003932952880859375,
-0.032073974609375,
0.056304931640625,
0.0394287109375,
-0.005435943603515625,
0.013580322265625,
-0.007427215576171875,
-0.0313720703125,
0.02587890625,
-0.04559326171875,
0.03790283203125,
0.02764892578125,
-0.023712158203125,
-0.03265380859375,
0.033203125,
-0.00188446044921875,
0.0252227783203125,
0.025360107421875,
0.03466796875,
0.032257080078125,
0.01158905029296875,
-0.01360321044921875,
-0.0504150390625,
0.005352020263671875,
-0.0287017822265625,
-0.002719879150390625,
-0.03466796875,
0.024871826171875,
0.0009984970092773438,
-0.0782470703125,
-0.0267181396484375,
-0.044769287109375,
0.020263671875,
0.04254150390625,
-0.003353118896484375,
0.0142822265625,
-0.03302001953125,
-0.0186004638671875,
-0.0055999755859375,
-0.0243072509765625,
0.017120361328125,
0.01413726806640625,
-0.040802001953125,
-0.0263824462890625,
-0.030517578125,
0.01313018798828125,
0.00732421875,
0.007129669189453125,
-0.039886474609375,
0.045867919921875,
-0.02618408203125,
-0.029815673828125,
0.0157928466796875,
0.02362060546875,
0.048797607421875,
-0.03314208984375,
-0.05224609375,
0.02880859375,
0.0301361083984375,
0.07720947265625,
-0.001239776611328125,
-0.0137786865234375,
0.01363372802734375,
0.01052093505859375,
-0.0123748779296875,
-0.0704345703125,
0.01410675048828125,
-0.064453125,
-0.01073455810546875,
-0.01422882080078125,
-0.01227569580078125,
-0.006870269775390625,
-0.024505615234375,
0.00035452842712402344,
0.06719970703125,
0.005306243896484375,
-0.01067352294921875,
-0.03387451171875,
0.0164031982421875,
0.0134124755859375,
-0.010711669921875,
-0.006500244140625,
-0.031890869140625,
-0.0202789306640625,
0.006404876708984375,
0.018402099609375,
0.0233001708984375,
0.031707763671875,
0.03131103515625,
-0.01180267333984375,
0.0251312255859375,
0.0013408660888671875,
-0.0036029815673828125,
0.04608154296875,
-0.0287628173828125,
0.018646240234375,
0.01983642578125,
-0.08758544921875,
-0.030609130859375,
-0.037078857421875,
0.0718994140625,
-0.0122528076171875,
-0.0195465087890625,
-0.0215911865234375,
0.00508880615234375,
0.04400634765625,
0.06182861328125,
0.01324462890625,
-0.037322998046875,
0.00954437255859375,
-0.0261688232421875,
-0.05645751953125,
-0.0230712890625,
0.035888671875,
-0.07293701171875,
-0.020538330078125,
0.021209716796875,
-0.0253753662109375,
0.01303863525390625,
-0.0144805908203125,
-0.03155517578125,
-0.004871368408203125,
-0.0282745361328125,
-0.0200958251953125,
-0.01247406005859375,
0.00583648681640625,
0.030487060546875,
-0.03839111328125,
-0.0154571533203125,
-0.0045318603515625,
0.01299285888671875,
-0.01190948486328125,
-0.0499267578125,
-0.01004791259765625,
0.0306396484375,
-0.0163421630859375,
0.0101165771484375,
0.0024356842041015625,
0.04583740234375,
-0.0164337158203125,
0.0003204345703125,
-0.0214691162109375,
0.0245208740234375,
-0.002681732177734375,
0.00920867919921875,
-0.00942230224609375,
0.014739990234375,
0.0009379386901855469,
0.05181884765625,
0.01035308837890625,
0.037353515625,
0.02392578125,
0.0266265869140625,
-0.00518798828125,
-0.0205230712890625,
0.0219268798828125,
-0.054962158203125,
-0.00734710693359375,
-0.00274658203125,
-0.0122833251953125,
-0.0517578125,
0.0174560546875,
-0.00969696044921875,
-0.01311492919921875,
0.0196990966796875
] |
9d0806eb4b6192d4209e80e9e44360c4e8a04b11
|
Wordpress Stackexchange
Q: How to work with Syntax Highlighter Evolved? I have installed Syntax Highlighter Evolved to simplify code snippets writing and highlighting. I know that it is quite popular and used by many bloggers, so I must be doing something wrong because it drives me mad.
I'm writting my first blog post and I want to include several C# and XML code snippets. I can include one snippet format it as I need but when I continue with second snippet (switching between HTML and Wysiwyg editor and saving draft several times) it sometimes lost formatting of my former snippet (in case of XML it deletes whole snippet). What I'm doing wrong?
I'm using version 3.1.1 of syntax highlighter and WordPress 3.1. I'm writting my post directly in WordPress admin interface.
A: its not the plugins issue, it is problem with wordpress's visual editor. i used this plugin : http://wordpress.org/extend/plugins/tinymce-advanced/ which enabled me to fix and work better, because it have option to disable code stripping.
take a look and let me know if it works :)
cheers
|
Q: How to work with Syntax Highlighter Evolved? I have installed Syntax Highlighter Evolved to simplify code snippets writing and highlighting. I know that it is quite popular and used by many bloggers, so I must be doing something wrong because it drives me mad.
I'm writting my first blog post and I want to include several C# and XML code snippets. I can include one snippet format it as I need but when I continue with second snippet (switching between HTML and Wysiwyg editor and saving draft several times) it sometimes lost formatting of my former snippet (in case of XML it deletes whole snippet). What I'm doing wrong?
I'm using version 3.1.1 of syntax highlighter and WordPress 3.1. I'm writting my post directly in WordPress admin interface.
A: its not the plugins issue, it is problem with wordpress's visual editor. i used this plugin : http://wordpress.org/extend/plugins/tinymce-advanced/ which enabled me to fix and work better, because it have option to disable code stripping.
take a look and let me know if it works :)
cheers
A: Try disabling "WordPress should correct invalidly nested XHTML automatically" (under Settings -> Writing).
|
wordpress
|
{
"language": "en",
"length": 190,
"provenance": "stackexchange_00019.jsonl.gz:407509",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11306"
}
|
[
0.01171112060546875,
-0.0162200927734375,
-0.0176849365234375,
-0.00591278076171875,
-0.00756072998046875,
-0.017913818359375,
-0.0015354156494140625,
-0.021697998046875,
0.006237030029296875,
0.035888671875,
-0.0234375,
0.005107879638671875,
-0.033416748046875,
-0.0016050338745117188,
-0.032012939453125,
-0.03582763671875,
0.049591064453125,
-0.0231475830078125,
0.0247344970703125,
-0.01007080078125,
-0.01081085205078125,
0.00446319580078125,
0.0244140625,
0.03302001953125,
0.044281005859375,
-0.056976318359375,
0.06573486328125,
-0.027435302734375,
0.0280609130859375,
-0.01067352294921875,
0.017791748046875,
-0.0221099853515625,
0.03790283203125,
0.063232421875,
-0.0982666015625,
0.00554656982421875,
0.01088714599609375,
0.0033512115478515625,
-0.0180816650390625,
0.026214599609375,
-0.0173187255859375,
0.0169677734375,
0.029388427734375,
-0.0032062530517578125,
-0.00101470947265625,
-0.057373046875,
0.012237548828125,
-0.044189453125,
0.0011539459228515625,
-0.084228515625,
0.0096588134765625,
0.017578125,
0.041900634765625,
-0.052642822265625,
-0.0206451416015625,
0.0233001708984375,
-0.0170440673828125,
0.034820556640625,
-0.0005741119384765625,
0.0249176025390625,
-0.0014791488647460938,
0.042633056640625,
0.00415802001953125,
0.0133209228515625,
-0.00308990478515625,
-0.004650115966796875,
0.0051116943359375,
0.00933074951171875,
-0.00798797607421875,
-0.005718231201171875,
0.0101776123046875,
-0.026123046875,
0.01373291015625,
-0.048065185546875,
0.0170135498046875,
-0.003993988037109375,
0.0023899078369140625,
-0.0012464523315429688,
0.0025806427001953125,
-0.00319671630859375,
0.052734375,
0.0162506103515625,
0.055694580078125,
-0.05322265625,
0.023895263671875,
-0.037384033203125,
0.009918212890625,
-0.00424957275390625,
-0.0080108642578125,
-0.036102294921875,
-0.01280975341796875,
-0.00452423095703125,
-0.0223846435546875,
0.005496978759765625,
-0.0303497314453125,
-0.0249786376953125,
-0.005458831787109375,
0.0046844482421875,
-0.00948333740234375,
0.013519287109375,
0.0306549072265625,
-0.05035400390625,
0.06634521484375,
-0.035308837890625,
-0.01036834716796875,
0.021759033203125,
0.01125335693359375,
0.020050048828125,
0.02685546875,
0.02001953125,
-0.0014286041259765625,
-0.016998291015625,
-0.0025653839111328125,
-0.01197052001953125,
-0.005878448486328125,
0.036376953125,
-0.0012788772583007812,
0.007320404052734375,
-0.01175689697265625,
0.01904296875,
-0.0050506591796875,
0.02093505859375,
-0.0170440673828125,
0.0196380615234375,
-0.000881195068359375,
0.0165557861328125,
0.0038509368896484375,
-0.00171661376953125,
0.05523681640625,
0.0174713134765625,
-0.042572021484375,
0.0142974853515625,
0.02679443359375,
0.005916595458984375,
0.01611328125,
-0.01023101806640625,
0.024200439453125,
0.0175628662109375,
-0.01140594482421875,
-0.0228271484375,
0.01351165771484375,
0.0175323486328125,
0.0019855499267578125,
-0.01453399658203125,
0.01334381103515625,
0.001819610595703125,
0.00615692138671875,
0.0256195068359375,
0.0199737548828125,
-0.00562286376953125,
0.0157623291015625,
-0.016265869140625,
0.048431396484375,
-0.0197601318359375,
-0.0458984375,
-0.07421875,
-0.029144287109375,
-0.03680419921875,
0.036041259765625,
-0.0645751953125,
0.007076263427734375,
-0.004123687744140625,
0.025604248046875,
0.021453857421875,
0.0017728805541992188,
0.006622314453125,
-0.0299224853515625,
0.01123809814453125,
0.0199737548828125,
-0.0283050537109375,
0.0145721435546875,
0.00705718994140625,
0.035797119140625,
0.005336761474609375,
0.00829315185546875,
0.0091705322265625,
-0.004413604736328125,
0.03912353515625,
0.037628173828125,
-0.01415252685546875,
-0.01215362548828125,
-0.038604736328125,
0.088623046875,
-0.0277252197265625,
-0.06573486328125,
0.06890869140625,
0.00379180908203125,
0.061431884765625,
0.03289794921875,
-0.011260986328125,
0.04705810546875,
0.0121002197265625,
-0.0041656494140625,
0.017181396484375,
0.025604248046875,
-0.002468109130859375,
-0.05340576171875,
0.00032591819763183594,
-0.0164794921875,
-0.046142578125,
0.01303863525390625,
0.006252288818359375,
0.007511138916015625,
0.00384521484375,
-0.0187225341796875,
0.023040771484375,
-0.017547607421875,
0.0184783935546875,
0.032318115234375,
0.01000213623046875,
0.0080108642578125,
0.0118408203125,
-0.0245361328125,
-0.01184844970703125,
-0.02459716796875,
0.03125,
0.011993408203125,
0.052734375,
0.0360107421875,
-0.02783203125,
0.0994873046875,
-0.01229095458984375,
0.09283447265625,
0.034454345703125,
-0.00983428955078125,
-0.0166015625,
-0.0256805419921875,
-0.00981903076171875,
-0.0193939208984375,
-0.00916290283203125,
0.01470184326171875,
0.046295166015625,
0.038177490234375,
0.0748291015625,
-0.040252685546875,
-0.050872802734375,
-0.051544189453125,
-0.0230865478515625,
0.01393890380859375,
0.0623779296875,
0.037200927734375,
0.07403564453125,
-0.01009368896484375,
-0.07025146484375,
0.102783203125,
-0.0170745849609375,
0.026763916015625,
-0.055755615234375,
0.00809478759765625,
0.01328277587890625,
-0.0005278587341308594,
0.007701873779296875,
0.041290283203125,
-0.018951416015625,
0.0165252685546875,
0.033721923828125,
-0.0034236907958984375,
0.036346435546875,
-0.027984619140625,
0.005645751953125,
-0.007068634033203125,
-0.068603515625,
-0.0377197265625,
-0.046875,
0.0283966064453125,
-0.01629638671875,
0.062286376953125,
0.04803466796875,
-0.0135345458984375,
-0.026397705078125,
0.007175445556640625,
0.05938720703125,
0.005947113037109375,
0.023529052734375,
-0.00592041015625,
0.02911376953125,
0.0002092123031616211,
-0.0162811279296875,
0.0106201171875,
0.0168609619140625,
-0.00464630126953125,
0.05120849609375,
-0.0247344970703125,
-0.032928466796875,
0.027496337890625,
0.00887298583984375,
-0.035552978515625,
-0.046173095703125,
0.01415252685546875,
0.0090789794921875,
0.0228729248046875,
0.03717041015625,
0.01312255859375,
0.03277587890625,
-0.00617218017578125,
-0.0063323974609375,
0.0732421875,
-0.0146026611328125,
0.0386962890625,
-0.006511688232421875,
0.051544189453125,
0.050537109375,
-0.003631591796875,
-0.003326416015625,
0.00649261474609375,
-0.00040650367736816406,
0.0284881591796875,
0.003398895263671875,
0.01517486572265625,
-0.01041412353515625,
-0.002803802490234375,
0.0273590087890625,
0.0204315185546875,
0.032501220703125,
-0.0101165771484375,
-0.04180908203125,
-0.032623291015625,
0.0241241455078125,
-0.0496826171875,
-0.0154266357421875,
0.00786590576171875,
-0.0848388671875,
-0.020355224609375,
0.0030612945556640625,
-0.06207275390625,
-0.0006089210510253906,
0.058929443359375,
-0.006969451904296875,
0.04541015625,
0.0006442070007324219,
-0.055023193359375,
-0.0115966796875,
-0.06829833984375,
-0.022186279296875,
-0.020477294921875,
-0.007526397705078125,
0.0298309326171875,
0.0267486572265625,
0.007518768310546875,
-0.043365478515625,
0.0232696533203125,
-0.0767822265625,
-0.03167724609375,
0.055572509765625,
0.01531219482421875,
-0.05035400390625,
-0.00859832763671875,
0.0016107559204101562,
0.03424072265625,
0.00026679039001464844,
-0.0119476318359375,
-0.00920867919921875,
-0.0103302001953125,
0.0204925537109375,
0.0333251953125,
-0.016082763671875,
-0.0076446533203125,
0.06658935546875,
0.0287017822265625,
-0.0013141632080078125,
0.018280029296875,
0.0006794929504394531,
-0.004184722900390625,
-0.00980377197265625,
-0.00800323486328125,
-0.026519775390625,
-0.010711669921875,
-0.0028858184814453125,
0.0264129638671875,
0.045379638671875,
0.06396484375,
-0.0309906005859375,
0.02886962890625,
-0.020172119140625,
-0.0169525146484375,
-0.0693359375,
-0.0065765380859375,
-0.0273284912109375,
0.01036834716796875,
-0.03033447265625,
-0.00110626220703125,
-0.020263671875,
0.0361328125,
-0.026275634765625,
0.038970947265625,
0.0010890960693359375,
-0.0465087890625,
0.0105438232421875,
-0.0211334228515625,
0.019287109375,
-0.0430908203125,
-0.005401611328125,
-0.05450439453125,
-0.007663726806640625,
-0.002086639404296875,
-0.0016431808471679688,
-0.019989013671875,
0.0176544189453125,
-0.08209228515625,
-0.00502777099609375,
-0.050567626953125,
0.02508544921875,
-0.0060882568359375,
-0.00274658203125,
-0.03936767578125,
0.01168060302734375,
-0.039947509765625,
-0.042205810546875,
0.005687713623046875,
0.0124359130859375,
-0.04278564453125,
-0.009552001953125,
-0.05023193359375,
-0.038787841796875,
0.0198516845703125,
-0.00688934326171875,
-0.1177978515625,
-0.0213623046875,
-0.0271759033203125,
0.07489013671875,
0.0156707763671875,
-0.041961669921875,
-0.011444091796875,
0.06085205078125,
0.0017404556274414062,
-0.0214385986328125,
0.008026123046875,
0.0227508544921875,
-0.03802490234375,
0.0034332275390625,
-0.01335906982421875,
-0.03271484375,
-0.019561767578125,
0.036651611328125,
-0.038116455078125,
0.021942138671875,
0.00033354759216308594,
-0.045684814453125,
0.07421875,
-0.04608154296875,
-0.007476806640625,
-0.0110321044921875,
-0.00316619873046875,
0.00019752979278564453,
-0.007259368896484375,
-0.01168060302734375,
-0.0029735565185546875,
0.018341064453125,
0.0714111328125,
0.0084991455078125,
0.007534027099609375,
-0.0108642578125,
0.11627197265625,
0.0090484619140625,
-0.01308441162109375,
-0.0241851806640625,
-0.0004436969757080078,
0.045196533203125,
0.0179290771484375,
-0.0010404586791992188,
0.0027828216552734375,
-0.0491943359375,
0.035614013671875,
0.04949951171875,
0.021820068359375,
-0.0291748046875,
0.02325439453125,
0.007534027099609375,
-0.0059356689453125,
0.0135650634765625,
0.03076171875,
0.01282501220703125,
0.00905609130859375,
-0.00962066650390625,
-0.0200958251953125,
-0.00634002685546875,
0.051025390625,
-0.0147552490234375,
0.00788116455078125,
-0.047698974609375,
-0.040130615234375,
0.0007200241088867188,
-0.0005269050598144531,
0.006683349609375,
0.01499176025390625,
0.0027790069580078125,
0.003429412841796875,
0.02606201171875,
0.0053558349609375,
-0.01898193359375,
-0.0158538818359375,
0.0288238525390625,
0.028289794921875,
0.00789642333984375,
0.0157623291015625,
-0.01064300537109375,
-0.0197296142578125,
0.0419921875,
0.02740478515625,
-0.051513671875,
0.031341552734375,
0.004116058349609375,
0.00553131103515625,
-0.0029659271240234375,
0.0194244384765625,
0.034149169921875,
-0.01499176025390625,
0.017120361328125,
-0.0254058837890625,
-0.026275634765625,
-0.0012083053588867188,
-0.025390625,
-0.0213165283203125,
-0.007518768310546875,
-0.0205841064453125,
-0.029815673828125,
0.0036449432373046875,
-0.0153961181640625,
-0.020721435546875,
0.0188446044921875,
-0.0302734375,
-0.002655029296875,
0.0252838134765625,
0.01447296142578125,
0.005840301513671875,
0.01136016845703125,
-0.00855255126953125,
0.059478759765625,
-0.023834228515625,
-0.028289794921875,
0.0142669677734375,
0.036590576171875,
-0.025115966796875,
-0.01549530029296875,
0.01113128662109375,
-0.01241302490234375,
-0.018310546875,
-0.035400390625,
-0.003021240234375,
0.0182647705078125,
-0.00682830810546875,
-0.016357421875,
-0.0184783935546875,
0.03082275390625,
-0.023284912109375,
0.032928466796875,
-0.02447509765625,
0.0214996337890625,
-0.0268096923828125,
-0.0211029052734375,
0.0159912109375,
0.0149688720703125,
0.00612640380859375,
0.0171051025390625,
-0.0120849609375,
0.0007853507995605469,
-0.035003662109375,
-0.004947662353515625,
-0.02264404296875,
0.06964111328125,
-0.0193328857421875,
0.0128173828125,
0.00521087646484375,
-0.0244293212890625,
0.0030727386474609375,
0.020965576171875,
-0.006710052490234375,
-0.00493621826171875,
-0.0303955078125,
0.0028076171875,
-0.01495361328125,
-0.0206298828125,
0.0157012939453125,
-0.0285797119140625,
-0.0301666259765625,
-0.0276336669921875,
-0.006137847900390625,
0.021087646484375,
0.005950927734375,
0.038604736328125,
-0.00627899169921875,
0.05328369140625,
-0.0126495361328125,
0.0784912109375,
0.00196075439453125,
0.01369476318359375,
-0.0217742919921875,
0.05096435546875,
-0.005840301513671875,
0.00571441650390625,
-0.022857666015625,
-0.0156402587890625,
0.0293426513671875,
-0.041412353515625,
-0.036956787109375,
-0.05572509765625,
-0.036865234375,
0.024627685546875,
0.042633056640625,
-0.007598876953125,
0.0259246826171875,
0.0017900466918945312,
0.01593017578125,
-0.0186309814453125,
-0.02337646484375,
-0.00485992431640625,
-0.00274658203125,
0.0286865234375,
-0.04376220703125,
-0.0244293212890625,
0.022796630859375,
0.0219268798828125,
-0.01540374755859375,
-0.008026123046875,
-0.03839111328125,
0.01312255859375,
0.06298828125,
-0.036651611328125,
-0.025421142578125,
-0.01715087890625,
0.0143585205078125,
0.0143280029296875,
0.01215362548828125,
-0.0026836395263671875,
-0.053131103515625,
0.0013856887817382812,
0.0633544921875,
-0.032867431640625,
-0.05242919921875,
0.03704833984375,
-0.042755126953125,
0.0106201171875,
0.0093536376953125,
0.0673828125,
0.06878662109375,
-0.10235595703125,
0.004009246826171875,
0.024688720703125,
-0.0253143310546875,
-0.017181396484375,
0.0079345703125,
-0.0214996337890625,
-0.07275390625,
-0.0033473968505859375,
0.03326416015625,
-0.00653076171875,
-0.0079803466796875,
0.0113677978515625,
-0.01104736328125,
-0.0102081298828125,
0.0208892822265625,
0.026397705078125,
-0.05078125,
0.055999755859375,
0.02978515625,
0.0270843505859375,
-0.00435638427734375,
0.002902984619140625,
0.0030460357666015625,
-0.0204010009765625,
-0.0498046875,
0.01470947265625,
-0.0208587646484375,
-0.00963592529296875,
-0.003559112548828125,
0.005615234375,
0.0184173583984375,
0.0849609375,
-0.039825439453125,
0.042724609375,
0.048492431640625,
-0.0015592575073242188,
-0.0017547607421875,
-0.037078857421875,
0.01287841796875,
0.018890380859375,
-0.0224761962890625,
0.01290130615234375,
0.0186614990234375,
-0.048919677734375,
-0.010650634765625,
0.03271484375,
0.05401611328125,
0.0033130645751953125,
-0.026275634765625,
0.0394287109375,
0.0256500244140625,
-0.0305023193359375,
-0.0285186767578125,
-0.044952392578125,
-0.04248046875,
-0.0006775856018066406,
-0.033782958984375,
-0.0186920166015625,
0.0075531005859375,
-0.039215087890625,
-0.045562744140625,
0.06134033203125,
0.0293731689453125,
-0.00812530517578125,
0.01763916015625,
0.03363037109375,
-0.05999755859375,
-0.023712158203125,
-0.0162506103515625,
0.032958984375,
-0.0178375244140625,
0.006732940673828125,
-0.0214996337890625,
0.006587982177734375,
0.01071929931640625,
0.0197906494140625,
0.0143890380859375,
-0.0010814666748046875,
-0.0239715576171875,
-0.024993896484375,
0.01523590087890625,
0.029022216796875,
-0.006351470947265625,
0.01430511474609375,
0.01253509521484375,
-0.0118255615234375,
-0.03497314453125,
0.00499725341796875,
0.02618408203125,
-0.0452880859375,
-0.033416748046875,
0.026214599609375,
0.004482269287109375,
0.0162200927734375,
-0.006084442138671875,
-0.031402587890625,
-0.0128021240234375,
-0.004306793212890625,
-0.0034542083740234375,
0.0175933837890625,
-0.016693115234375,
0.03594970703125,
0.018341064453125,
-0.035675048828125,
-0.0247955322265625,
-0.019622802734375,
0.0310821533203125,
0.0087127685546875,
0.051513671875,
-0.01068878173828125,
0.0062713623046875,
0.09027099609375,
-0.01910400390625,
0.019622802734375,
0.04498291015625,
-0.0235748291015625,
0.005435943603515625,
0.00665283203125,
0.03057861328125,
-0.00971221923828125,
-0.0027141571044921875,
0.018341064453125,
0.005832672119140625,
-0.00348663330078125,
-0.0199432373046875,
-0.0006117820739746094,
-0.01373291015625,
0.0026454925537109375,
-0.0269622802734375,
-0.0164794921875,
-0.0009045600891113281,
0.0183868408203125,
-0.00936126708984375,
-0.0195465087890625,
-0.01068115234375,
-0.0032100677490234375,
0.00231170654296875,
-0.01230621337890625,
0.0263671875,
-0.005870819091796875,
-0.00574493408203125,
0.00153350830078125,
-0.0048065185546875,
0.01464080810546875,
-0.00536346435546875,
0.029266357421875,
-0.05120849609375,
0.01143646240234375,
-0.025909423828125,
0.01467132568359375,
0.024322509765625,
0.01203155517578125,
-0.00428009033203125,
0.0294647216796875,
0.034027099609375,
0.01995849609375,
-0.0146636962890625,
0.0090179443359375,
-0.00417327880859375,
-0.0080718994140625,
-0.0225982666015625,
-0.018707275390625,
-0.0128021240234375,
-0.033050537109375,
-0.0172576904296875,
-0.04425048828125,
-0.025360107421875,
0.032135009765625,
0.0032215118408203125,
0.0287017822265625,
-0.0104217529296875,
0.04400634765625,
0.0007433891296386719,
0.00634002685546875,
0.018218994140625,
-0.01788330078125,
-0.0024318695068359375,
-0.0478515625,
-0.019378662109375,
-0.005542755126953125,
-0.0479736328125,
-0.0159454345703125,
-0.01021575927734375,
-0.0262603759765625,
0.0025005340576171875,
0.0223236083984375,
0.01537322998046875,
-0.0062103271484375,
-0.043914794921875,
-0.018707275390625,
0.0304107666015625,
-0.02178955078125,
0.007808685302734375,
0.01343536376953125,
-0.004253387451171875,
-0.02056884765625,
-0.04010009765625,
-0.04742431640625,
-0.0478515625,
0.08990478515625,
0.0228118896484375,
0.0511474609375,
-0.0192718505859375,
0.0638427734375,
0.013946533203125,
0.011993408203125,
-0.01000213623046875,
0.007904052734375,
-0.00666046142578125,
-0.0152435302734375,
0.0224761962890625,
-0.0068511962890625,
-0.08148193359375,
0.06793212890625,
0.0015478134155273438,
0.0338134765625,
0.08905029296875,
-0.05401611328125,
-0.0079345703125,
-0.0133819580078125,
-0.0089874267578125,
-0.0296173095703125,
-0.045257568359375,
-0.0289459228515625,
-0.015960693359375,
0.0021190643310546875,
0.0200653076171875,
0.0341796875,
0.0122833251953125,
0.048858642578125,
-0.0305633544921875,
0.013946533203125,
-0.0228729248046875,
0.03338623046875,
0.04241943359375,
0.047210693359375,
-0.0290069580078125,
0.0340576171875,
-0.0189361572265625,
-0.015899658203125,
0.0203094482421875,
0.0026702880859375,
0.0196990966796875,
-0.09130859375,
0.051727294921875,
0.09088134765625,
0.05853271484375,
-0.033172607421875,
0.0294036865234375,
0.0738525390625,
-0.0345458984375,
0.045196533203125,
0.036224365234375,
-0.03436279296875,
-0.01218414306640625,
0.00867462158203125,
0.018310546875,
0.0019702911376953125,
-0.012847900390625,
-0.07098388671875,
-0.036834716796875,
0.01462554931640625,
-0.01271820068359375,
-0.0012636184692382812,
-0.034088134765625,
0.004322052001953125,
0.0372314453125,
-0.0276031494140625,
-0.026519775390625,
-0.0271453857421875,
-0.0008540153503417969,
0.02020263671875,
-0.0555419921875,
-0.0684814453125,
0.0758056640625,
-0.046051025390625,
0.0278778076171875,
0.060699462890625,
-0.0231170654296875,
-0.03216552734375,
0.0084075927734375,
0.003566741943359375,
0.068603515625,
-0.028656005859375,
0.008392333984375,
0.05609130859375,
-0.0289306640625,
-0.057891845703125,
-0.051971435546875,
0.018646240234375,
-0.06512451171875,
-0.010223388671875,
0.03021240234375,
-0.01203155517578125,
0.00151824951171875,
-0.03839111328125,
-0.07061767578125,
0.0002586841583251953,
-0.000637054443359375,
-0.03900146484375,
-0.0265655517578125,
-0.040069580078125,
0.000820159912109375,
-0.0024623870849609375,
-0.01074981689453125,
-0.0321044921875,
-0.05352783203125,
0.0299835205078125,
-0.00547027587890625,
0.055328369140625,
0.0226898193359375,
-0.040740966796875,
0.0231781005859375,
-0.0027923583984375,
0.01016998291015625,
0.0104522705078125,
-0.0294036865234375,
0.0232391357421875,
0.01120758056640625,
0.05657958984375,
0.00243377685546875,
-0.00788116455078125,
0.01377105712890625,
-0.032379150390625,
0.0163726806640625,
-0.039337158203125,
-0.06610107421875,
-0.034515380859375,
0.060821533203125,
0.05322265625,
0.0275421142578125,
-0.0081634521484375,
-0.0087432861328125,
-0.01552581787109375,
-0.06298828125,
-0.0225372314453125,
0.03265380859375,
-0.0771484375,
-0.003887176513671875,
0.00824737548828125,
0.00479888916015625,
0.0176544189453125,
0.0064544677734375,
-0.0003173351287841797,
-0.0138397216796875,
0.024169921875,
-0.00804901123046875,
-0.0555419921875,
-0.044891357421875,
0.046173095703125,
-0.0135498046875,
0.0174407958984375,
0.02618408203125,
0.0138092041015625,
0.03375244140625,
0.09210205078125,
0.0240020751953125,
0.023101806640625,
-0.038482666015625,
0.0214080810546875,
0.0233154296875,
0.0016469955444335938,
-0.0236663818359375,
-0.023284912109375,
-0.01317596435546875,
-0.005157470703125,
0.0161285400390625,
-0.027587890625,
-0.0221405029296875,
-0.01097869873046875,
-0.01544189453125,
0.045440673828125,
-0.0295257568359375,
-0.002712249755859375,
-0.042938232421875,
0.018768310546875,
-0.0292205810546875,
0.006298065185546875,
0.01806640625,
0.01032257080078125,
0.004589080810546875,
0.0234375,
0.0301055908203125,
-0.025238037109375,
0.0066375732421875,
0.01145172119140625,
0.021514892578125,
0.005496978759765625
] |
9bd35c9699ecfd0fff71be592ba5fa4c67783275
|
Wordpress Stackexchange
Q: Do we still need to include a "if (have_posts())" in templates? I include this logic in my template all the time
if ( have_posts() ):
//show content
else:
//show content not found
endif;
But recently I began to doubt its necessity, WordPress will turn to 404.php when no post found, it seems no need to add this logic in normal templates, else will never be triggered, is it?
A: When I look at WP::handle_404(), I think that the 404.php template will not be loaded, even if there are no posts, if:
*
*We are on the homepage
*It is a search
*It is a taxonomy term that exists, but has no posts attached to it (and it's not paged)
*It is an author that exists, which has written no posts (yet) (and it's not paged)
So in these template files, have_posts() can be useful.
|
Q: Do we still need to include a "if (have_posts())" in templates? I include this logic in my template all the time
if ( have_posts() ):
//show content
else:
//show content not found
endif;
But recently I began to doubt its necessity, WordPress will turn to 404.php when no post found, it seems no need to add this logic in normal templates, else will never be triggered, is it?
A: When I look at WP::handle_404(), I think that the 404.php template will not be loaded, even if there are no posts, if:
*
*We are on the homepage
*It is a search
*It is a taxonomy term that exists, but has no posts attached to it (and it's not paged)
*It is an author that exists, which has written no posts (yet) (and it's not paged)
So in these template files, have_posts() can be useful.
A: No, in most cases it's not needed.
if ( have_posts() ) would only be useful on the index.php file, if you don't have a 404.php template.
And even in that case, you could use is_404() instead.
|
wordpress
|
{
"language": "en",
"length": 182,
"provenance": "stackexchange_00019.jsonl.gz:407523",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11354"
}
|
[
0.0628662109375,
0.001827239990234375,
0.040069580078125,
-0.023956298828125,
0.0205841064453125,
-0.0132904052734375,
0.0635986328125,
-0.048614501953125,
0.044097900390625,
0.028350830078125,
-0.054473876953125,
-0.0001131892204284668,
0.001766204833984375,
0.0009822845458984375,
-0.042694091796875,
-0.0289459228515625,
0.034820556640625,
-0.0298004150390625,
0.026092529296875,
-0.0135955810546875,
0.01898193359375,
0.009765625,
0.033050537109375,
0.0248870849609375,
0.00429534912109375,
-0.040802001953125,
0.071044921875,
-0.022216796875,
-0.0249481201171875,
-0.041168212890625,
0.0175323486328125,
0.04608154296875,
0.0258331298828125,
-0.013763427734375,
0.01824951171875,
0.0258636474609375,
-0.01152801513671875,
0.004627227783203125,
-0.0055084228515625,
0.018341064453125,
-0.0177001953125,
0.00031304359436035156,
0.0540771484375,
-0.007843017578125,
0.0209808349609375,
0.0003437995910644531,
-0.02886962890625,
-0.072265625,
0.02960205078125,
-0.006500244140625,
0.0019741058349609375,
-0.02777099609375,
0.0160369873046875,
-0.051788330078125,
-0.026641845703125,
-0.01456451416015625,
0.0020904541015625,
0.0014142990112304688,
0.036163330078125,
-0.034332275390625,
-0.03643798828125,
-0.0037689208984375,
0.0275115966796875,
-0.0162506103515625,
-0.005718231201171875,
0.00612640380859375,
-0.035980224609375,
-0.005626678466796875,
-0.06512451171875,
-0.0092926025390625,
0.032928466796875,
-0.06427001953125,
0.00569915771484375,
0.0147552490234375,
0.0187225341796875,
-0.047607421875,
0.00531768798828125,
-0.0194244384765625,
0.0022220611572265625,
0.0548095703125,
-0.016571044921875,
-0.0203399658203125,
-0.0019273757934570312,
-0.0394287109375,
0.0236053466796875,
-0.0019502639770507812,
-0.022369384765625,
0.0015935897827148438,
-0.0294342041015625,
-0.03704833984375,
-0.0205535888671875,
-0.0261383056640625,
-0.0179595947265625,
-0.01163482666015625,
-0.024383544921875,
-0.025665283203125,
0.005397796630859375,
0.055938720703125,
-0.044921875,
-0.007167816162109375,
-0.03314208984375,
-0.019744873046875,
-0.0044708251953125,
-0.03155517578125,
0.0287017822265625,
0.061370849609375,
-0.00428009033203125,
-0.006427764892578125,
0.028076171875,
-0.0005588531494140625,
0.01617431640625,
0.0322265625,
-0.01503753662109375,
-0.032867431640625,
-0.005451202392578125,
0.038848876953125,
-0.018341064453125,
-0.014129638671875,
0.00025963783264160156,
0.005702972412109375,
-0.00844573974609375,
0.0252227783203125,
0.004413604736328125,
-0.036834716796875,
-0.006191253662109375,
-0.01383209228515625,
-0.008697509765625,
-0.017730712890625,
0.095458984375,
0.032989501953125,
-0.01471710205078125,
0.00588226318359375,
-0.0284576416015625,
-0.0548095703125,
-0.046112060546875,
-0.02911376953125,
0.0009593963623046875,
-0.00839996337890625,
-0.0101165771484375,
0.0010280609130859375,
0.00797271728515625,
-0.042327880859375,
0.002166748046875,
0.01068115234375,
0.0228424072265625,
0.034088134765625,
0.0293121337890625,
0.0016431808471679688,
0.0092620849609375,
-0.072509765625,
0.021209716796875,
0.011444091796875,
0.02679443359375,
0.00601959228515625,
-0.0237274169921875,
-0.01971435546875,
-0.0140228271484375,
-0.01137542724609375,
-0.008087158203125,
-0.0300750732421875,
0.0272674560546875,
0.00408172607421875,
-0.000926971435546875,
-0.04827880859375,
-0.06854248046875,
-0.01522064208984375,
-0.037261962890625,
-0.00965118408203125,
0.0184478759765625,
0.0264434814453125,
-0.0025959014892578125,
-0.003444671630859375,
-0.0010623931884765625,
0.01158905029296875,
-0.0060272216796875,
0.0035953521728515625,
0.023590087890625,
0.027862548828125,
0.01378631591796875,
0.0714111328125,
0.00907135009765625,
-0.026458740234375,
0.06439208984375,
-0.036895751953125,
-0.09979248046875,
0.070068359375,
-0.01508331298828125,
0.059234619140625,
0.031951904296875,
-0.015594482421875,
0.05120849609375,
0.0203857421875,
-0.0235443115234375,
0.05438232421875,
-0.0218658447265625,
-0.03375244140625,
-0.01497650146484375,
0.00450897216796875,
-0.01507568359375,
-0.0111846923828125,
0.01555633544921875,
0.011199951171875,
-0.01282501220703125,
-0.004383087158203125,
-0.041168212890625,
-0.0031585693359375,
-0.01172637939453125,
0.0223541259765625,
-0.017120361328125,
0.0255889892578125,
0.01529693603515625,
0.023284912109375,
-0.052093505859375,
0.013580322265625,
-0.0161285400390625,
0.00925445556640625,
-0.029327392578125,
0.00644683837890625,
-0.0122528076171875,
0.00847625732421875,
-0.0162200927734375,
-0.0084075927734375,
-0.0194244384765625,
0.021270751953125,
0.03302001953125,
-0.00815582275390625,
-0.006595611572265625,
-0.0086212158203125,
-0.01055908203125,
0.042938232421875,
-0.053619384765625,
0.00409698486328125,
0.03515625,
0.00008404254913330078,
-0.055694580078125,
0.00885009765625,
-0.01198577880859375,
-0.04290771484375,
-0.01178741455078125,
0.065673828125,
0.0243072509765625,
0.047271728515625,
-0.035491943359375,
-0.031219482421875,
0.03631591796875,
-0.030670166015625,
0.01019287109375,
-0.0186004638671875,
0.0169525146484375,
0.024627685546875,
-0.01253509521484375,
-0.0258636474609375,
0.0187225341796875,
-0.0670166015625,
0.00836181640625,
0.0276336669921875,
-0.03167724609375,
-0.004322052001953125,
-0.0014982223510742188,
-0.00693511962890625,
0.005321502685546875,
0.017333984375,
0.016845703125,
-0.0087890625,
0.0124359130859375,
0.009307861328125,
0.018218994140625,
0.005992889404296875,
-0.01168060302734375,
0.005580902099609375,
0.00814056396484375,
-0.031463623046875,
0.0218658447265625,
0.046844482421875,
-0.018310546875,
0.06317138671875,
-0.023773193359375,
-0.020965576171875,
0.023223876953125,
0.043701171875,
-0.0266571044921875,
0.021514892578125,
-0.059844970703125,
-0.013336181640625,
-0.01305389404296875,
-0.0753173828125,
-0.00848388671875,
0.00827789306640625,
0.08868408203125,
0.0253143310546875,
0.0274200439453125,
0.02056884765625,
-0.01418304443359375,
0.08050537109375,
0.01421356201171875,
-0.040252685546875,
-0.051910400390625,
-0.06964111328125,
0.042816162109375,
-0.0404052734375,
0.00833892822265625,
0.052642822265625,
0.01161956787109375,
-0.005870819091796875,
0.01251220703125,
0.0469970703125,
0.0171966552734375,
0.01611328125,
-0.006313323974609375,
0.00884246826171875,
-0.036102294921875,
0.0112457275390625,
0.02728271484375,
0.072265625,
0.015655517578125,
-0.028411865234375,
0.0292510986328125,
0.041900634765625,
-0.037506103515625,
-0.08062744140625,
-0.0144805908203125,
-0.039947509765625,
-0.00563812255859375,
-0.008941650390625,
-0.01270294189453125,
-0.0169219970703125,
0.002101898193359375,
0.0098724365234375,
-0.03839111328125,
-0.00873565673828125,
-0.07147216796875,
-0.0904541015625,
-0.07562255859375,
0.00568389892578125,
-0.00966644287109375,
0.029449462890625,
-0.005950927734375,
0.074951171875,
-0.00640869140625,
-0.0943603515625,
-0.026092529296875,
-0.007801055908203125,
-0.024139404296875,
0.032379150390625,
-0.022918701171875,
-0.00713348388671875,
-0.00853729248046875,
0.0030994415283203125,
-0.0017042160034179688,
-0.003475189208984375,
0.01047515869140625,
-0.013702392578125,
-0.042510986328125,
-0.0144195556640625,
-0.00624847412109375,
0.0235443115234375,
0.04461669921875,
-0.013702392578125,
0.022491455078125,
-0.0382080078125,
-0.04107666015625,
-0.0233917236328125,
-0.063232421875,
0.03070068359375,
0.042572021484375,
0.0107574462890625,
0.000797271728515625,
-0.009735107421875,
-0.01251220703125,
0.0095672607421875,
-0.00659942626953125,
-0.03350830078125,
0.04791259765625,
0.0031871795654296875,
-0.0095672607421875,
0.005035400390625,
0.0008540153503417969,
-0.0163421630859375,
-0.00055694580078125,
-0.010833740234375,
0.015655517578125,
-0.016937255859375,
0.029327392578125,
-0.03936767578125,
-0.032135009765625,
0.025054931640625,
-0.0011119842529296875,
0.0038623809814453125,
-0.0191802978515625,
-0.024505615234375,
0.004364013671875,
0.05120849609375,
-0.0274505615234375,
-0.01499176025390625,
-0.0296478271484375,
-0.00420379638671875,
0.005001068115234375,
-0.0447998046875,
-0.00431060791015625,
-0.0157623291015625,
0.03564453125,
-0.0022106170654296875,
-0.0155487060546875,
0.0090789794921875,
-0.0282745361328125,
0.0111541748046875,
0.0131072998046875,
0.0085601806640625,
0.029449462890625,
-0.045196533203125,
0.0242767333984375,
-0.002315521240234375,
0.005237579345703125,
0.00215911865234375,
-0.01540374755859375,
-0.06121826171875,
-0.04339599609375,
-0.0194244384765625,
0.02191162109375,
0.02447509765625,
0.01189422607421875,
-0.03350830078125,
0.01363372802734375,
0.04742431640625,
0.004444122314453125,
-0.023834228515625,
0.005809783935546875,
0.00266265869140625,
0.0081787109375,
-0.005062103271484375,
-0.01047515869140625,
-0.0007038116455078125,
0.006961822509765625,
0.00873565673828125,
-0.04766845703125,
-0.006565093994140625,
-0.038177490234375,
-0.01415252685546875,
0.003589630126953125,
-0.034576416015625,
-0.01305389404296875,
-0.01262664794921875,
0.0157928466796875,
0.047760009765625,
0.0031223297119140625,
0.00435638427734375,
-0.0276031494140625,
-0.03021240234375,
0.029632568359375,
0.00543975830078125,
-0.033538818359375,
0.00780487060546875,
0.0557861328125,
0.0248565673828125,
-0.01910400390625,
-0.033538818359375,
0.03228759765625,
0.0260467529296875,
0.007526397705078125,
0.03717041015625,
0.0157470703125,
-0.01337432861328125,
0.030242919921875,
0.00705718994140625,
-0.0258636474609375,
-0.005275726318359375,
0.0833740234375,
-0.01027679443359375,
-0.0276641845703125,
0.027984619140625,
-0.04071044921875,
0.0245819091796875,
0.069580078125,
0.0078277587890625,
-0.04071044921875,
0.002880096435546875,
0.0298309326171875,
-0.05120849609375,
0.038177490234375,
-0.0214385986328125,
-0.003936767578125,
-0.0069427490234375,
0.0034961700439453125,
0.024749755859375,
0.0255889892578125,
0.00748443603515625,
-0.006130218505859375,
-0.004425048828125,
-0.00612640380859375,
0.019744873046875,
0.0091552734375,
0.00835418701171875,
0.0218505859375,
0.01430511474609375,
-0.0181121826171875,
-0.0021209716796875,
-0.007755279541015625,
0.054229736328125,
-0.012359619140625,
-0.05889892578125,
-0.017120361328125,
-0.005157470703125,
0.052001953125,
0.03875732421875,
0.0117645263671875,
0.03302001953125,
-0.0229644775390625,
-0.01461029052734375,
-0.0098114013671875,
-0.0157012939453125,
-0.0280303955078125,
-0.034149169921875,
-0.0167694091796875,
0.037017822265625,
-0.0217437744140625,
0.015106201171875,
0.041778564453125,
0.03668212890625,
0.0117034912109375,
-0.036865234375,
-0.0001571178436279297,
-0.022003173828125,
0.045806884765625,
0.033966064453125,
-0.033966064453125,
0.010345458984375,
0.011993408203125,
0.00626373291015625,
-0.047882080078125,
-0.037109375,
0.02197265625,
0.051788330078125,
-0.056488037109375,
-0.01387786865234375,
0.032196044921875,
0.002292633056640625,
-0.02044677734375,
0.033111572265625,
-0.0297698974609375,
-0.04962158203125,
-0.044189453125,
-0.006046295166015625,
0.028350830078125,
0.0014410018920898438,
-0.006702423095703125,
0.016571044921875,
-0.006793975830078125,
0.01544952392578125,
-0.007568359375,
-0.035858154296875,
0.008056640625,
0.0235443115234375,
-0.0003833770751953125,
-0.042633056640625,
-0.0003952980041503906,
-0.007732391357421875,
0.031494140625,
-0.03338623046875,
-0.036224365234375,
0.053955078125,
-0.0225372314453125,
0.021759033203125,
-0.0013761520385742188,
-0.0305938720703125,
0.0240478515625,
0.033416748046875,
0.0013885498046875,
-0.005893707275390625,
-0.08734130859375,
0.01824951171875,
-0.06951904296875,
0.0160064697265625,
-0.057525634765625,
-0.08087158203125,
-0.037872314453125,
-0.0099945068359375,
0.0095672607421875,
-0.00121307373046875,
0.004734039306640625,
-0.0193939208984375,
-0.046173095703125,
0.045684814453125,
0.055389404296875,
0.046966552734375,
-0.01340484619140625,
0.07501220703125,
-0.004669189453125,
0.0155792236328125,
0.0274658203125,
0.056182861328125,
0.0060577392578125,
-0.0205535888671875,
0.0265960693359375,
-0.0599365234375,
-0.027496337890625,
-0.0194854736328125,
0.0120086669921875,
0.036773681640625,
0.0014715194702148438,
-0.00458526611328125,
0.00518035888671875,
-0.01326751708984375,
-0.0086822509765625,
-0.0123138427734375,
0.037872314453125,
-0.00920867919921875,
0.010284423828125,
0.0251312255859375,
0.01107025146484375,
-0.0003669261932373047,
-0.0292510986328125,
-0.052947998046875,
0.0174713134765625,
0.0243682861328125,
-0.00536346435546875,
-0.00846099853515625,
-0.04034423828125,
0.0693359375,
0.0865478515625,
0.016998291015625,
0.051422119140625,
0.024017333984375,
0.0030689239501953125,
-0.00969696044921875,
0.01486968994140625,
-0.01702880859375,
-0.05029296875,
0.0640869140625,
0.0115814208984375,
-0.0223388671875,
0.06109619140625,
-0.0295562744140625,
0.01448822021484375,
0.048980712890625,
0.03863525390625,
-0.04376220703125,
-0.0161285400390625,
-0.0138397216796875,
-0.0277099609375,
0.0162200927734375,
-0.0010585784912109375,
-0.005878448486328125,
-0.021331787109375,
0.048309326171875,
-0.004657745361328125,
-0.0163116455078125,
0.01074981689453125,
-0.006244659423828125,
-0.01812744140625,
-0.031280517578125,
0.026153564453125,
0.01300811767578125,
-0.0309906005859375,
0.042144775390625,
0.0207672119140625,
0.0255279541015625,
-0.01390838623046875,
0.037353515625,
-0.03729248046875,
0.0181121826171875,
-0.00251007080078125,
0.02740478515625,
-0.018218994140625,
-0.0025501251220703125,
0.038726806640625,
0.027862548828125,
0.0016450881958007812,
0.031158447265625,
-0.007045745849609375,
0.040283203125,
-0.016998291015625,
-0.0022735595703125,
-0.01641845703125,
-0.026214599609375,
0.018035888671875,
0.041229248046875,
-0.040802001953125,
0.0233306884765625,
0.00850677490234375,
-0.027923583984375,
-0.0131683349609375,
-0.035552978515625,
0.0997314453125,
-0.048370361328125,
-0.0226287841796875,
-0.021087646484375,
0.0253143310546875,
0.0269775390625,
-0.000583648681640625,
0.0290374755859375,
-0.046051025390625,
-0.0052947998046875,
0.001148223876953125,
-0.0011434555053710938,
-0.01157379150390625,
-0.003582000732421875,
-0.053802490234375,
0.10284423828125,
-0.0015420913696289062,
0.0203399658203125,
-0.012451171875,
0.049407958984375,
-0.009490966796875,
0.04364013671875,
-0.026824951171875,
0.077392578125,
0.01241302490234375,
0.0426025390625,
-0.0721435546875,
-0.015899658203125,
0.015533447265625,
0.05181884765625,
0.0830078125,
0.00749969482421875,
0.0065460205078125,
-0.01544189453125,
0.0382080078125,
0.040496826171875,
-0.0206298828125,
0.007381439208984375,
-0.034423828125,
0.036102294921875,
-0.0183868408203125,
-0.050628662109375,
0.0243682861328125,
-0.03411865234375,
-0.057586669921875,
-0.01113128662109375,
0.018707275390625,
0.0287933349609375,
-0.0014696121215820312,
0.01197052001953125,
-0.005321502685546875,
-0.020782470703125,
0.019195556640625,
-0.0253753662109375,
-0.026611328125,
0.05999755859375,
0.0164642333984375,
-0.08154296875,
-0.0146484375,
-0.056732177734375,
0.0457763671875,
-0.01090240478515625,
0.0202484130859375,
0.014617919921875,
0.00959014892578125,
0.052001953125,
-0.0266876220703125,
0.0101470947265625,
0.0244140625,
-0.0275115966796875,
0.031158447265625,
0.0570068359375,
0.037200927734375,
-0.006870269775390625,
-0.0036220550537109375,
0.0232696533203125,
0.056884765625,
-0.021331787109375,
-0.031707763671875,
0.0195770263671875,
0.00007200241088867188,
-0.0192108154296875,
-0.003108978271484375,
-0.02154541015625,
0.029052734375,
0.0469970703125,
-0.0243988037109375,
-0.0178375244140625,
0.0030040740966796875,
-0.03887939453125,
-0.0189361572265625,
-0.021331787109375,
0.06829833984375,
0.02532958984375,
-0.038604736328125,
0.00806427001953125,
0.0140838623046875,
0.0821533203125,
0.025115966796875,
0.035888671875,
-0.041534423828125,
-0.02691650390625,
-0.01763916015625,
0.03936767578125,
-0.004177093505859375,
0.0179290771484375,
-0.0308990478515625,
-0.0258026123046875,
0.0027790069580078125,
0.023040771484375,
0.0207366943359375,
0.0191192626953125,
0.0205230712890625,
0.0198211669921875,
0.0007987022399902344,
0.00933837890625,
0.00327301025390625,
-0.022308349609375,
0.049530029296875,
-0.0360107421875,
0.046295166015625,
0.01213836669921875,
-0.010040283203125,
-0.019287109375,
0.00665283203125,
0.051422119140625,
-0.005191802978515625,
0.021636962890625,
0.0029926300048828125,
-0.05462646484375,
0.041046142578125,
0.028289794921875,
0.11822509765625,
0.032623291015625,
-0.0304412841796875,
-0.0135955810546875,
0.01126861572265625,
-0.06427001953125,
0.01322174072265625,
0.04864501953125,
-0.00628662109375,
-0.0238037109375,
0.022705078125,
0.006587982177734375,
0.01230621337890625,
-0.01009368896484375,
0.004421234130859375,
-0.00902557373046875,
0.032806396484375,
0.01099395751953125,
-0.01568603515625,
-0.01464080810546875,
-0.00220489501953125,
0.03509521484375,
-0.000713348388671875,
0.0966796875,
-0.03387451171875,
0.0103759765625,
0.012237548828125,
0.0147247314453125,
-0.0216522216796875,
0.00896453857421875,
0.002559661865234375,
-0.01323699951171875,
0.0166015625,
-0.01129913330078125,
-0.039276123046875,
0.0333251953125,
0.0361328125,
-0.0225372314453125,
0.038787841796875,
-0.01161956787109375,
-0.009246826171875,
-0.038848876953125,
-0.0076446533203125,
-0.033447265625,
-0.036773681640625,
-0.0186614990234375,
0.01433563232421875,
0.004177093505859375,
-0.0012464523315429688,
-0.035919189453125,
0.037445068359375,
-0.0100555419921875,
-0.059417724609375,
0.02294921875,
-0.07855224609375,
0.01174163818359375,
0.02386474609375,
0.04290771484375,
0.027435302734375,
0.01476287841796875,
-0.016082763671875,
0.019500732421875,
0.0257110595703125,
-0.0186614990234375,
0.01497650146484375,
0.021484375,
-0.0290374755859375,
-0.04620361328125,
-0.0016689300537109375,
-0.04071044921875,
-0.0104217529296875,
-0.021820068359375,
0.00862884521484375,
0.0172576904296875,
0.0109100341796875,
-0.007354736328125,
0.002101898193359375,
-0.031402587890625,
-0.030670166015625,
-0.002979278564453125,
-0.06195068359375,
0.0006833076477050781,
-0.0009284019470214844,
0.01580810546875,
-0.00305938720703125,
-0.0244903564453125,
-0.0004286766052246094,
-0.0142822265625,
0.0316162109375,
-0.032073974609375,
-0.0010881423950195312,
0.01458740234375,
0.049041748046875,
-0.0268402099609375,
0.051727294921875,
-0.007015228271484375,
-0.058074951171875,
0.0293121337890625,
0.016448974609375,
0.04461669921875,
-0.051055908203125,
-0.0271148681640625,
-0.00992584228515625,
0.00951385498046875,
0.03558349609375,
0.0152740478515625,
-0.0017328262329101562,
0.044219970703125,
-0.01104736328125,
-0.0205841064453125,
-0.0406494140625,
0.0026035308837890625,
-0.044921875,
-0.01361083984375,
-0.01033782958984375,
0.00894927978515625,
0.0258331298828125,
-0.035675048828125,
-0.09027099609375,
0.07318115234375,
-0.031646728515625,
-0.0289306640625,
-0.0273590087890625,
-0.00470733642578125,
-0.0262908935546875,
0.019317626953125,
-0.0035305023193359375,
-0.0013980865478515625,
0.0017080307006835938,
0.02508544921875,
0.021697998046875,
-0.01934814453125,
0.061187744140625,
-0.00955963134765625,
-0.0621337890625,
-0.021575927734375,
-0.01593017578125,
0.01215362548828125,
0.0248870849609375,
-0.0225372314453125,
0.0149688720703125,
0.040283203125,
-0.05303955078125,
-0.04864501953125,
-0.010162353515625,
-0.0027103424072265625,
0.0029850006103515625,
-0.0078125,
-0.01194000244140625,
-0.02716064453125,
0.08453369140625,
-0.01465606689453125,
0.0262603759765625,
-0.004398345947265625,
-0.03875732421875,
-0.048919677734375,
-0.042266845703125,
-0.020782470703125,
0.0265045166015625,
-0.0616455078125,
0.03228759765625,
-0.0012187957763671875,
-0.0218353271484375,
-0.0010633468627929688,
-0.029266357421875,
-0.05950927734375,
0.0018978118896484375,
-0.0611572265625,
0.0050811767578125,
-0.039703369140625,
-0.01175689697265625,
0.01401519775390625,
0.0028896331787109375,
0.055419921875,
-0.045501708984375,
0.04034423828125,
0.039215087890625,
0.00937652587890625,
0.01407623291015625,
0.036102294921875,
-0.033111572265625,
-0.0184173583984375,
0.0197906494140625,
0.025421142578125,
0.0012149810791015625,
-0.00029921531677246094,
0.00412750244140625,
0.0121307373046875,
-0.00734710693359375,
0.01107025146484375,
0.01290130615234375,
-0.0011510848999023438,
-0.010650634765625,
0.038818359375,
-0.00891876220703125,
0.083251953125,
0.006481170654296875,
0.046905517578125,
-0.0175933837890625,
-0.005229949951171875,
0.0069122314453125,
-0.024261474609375,
-0.0034942626953125,
0.001995086669921875,
-0.02587890625,
-0.037200927734375,
0.015899658203125,
-0.02764892578125,
-0.0048370361328125,
0.0178375244140625
] |
9f6c3db616c0eda3138aa3e15a80fa16f08d326c
|
Wordpress Stackexchange
Q: custom tabs in media uploader I've managed to add a custom tab to the media uploader, but for some reason it doesn't come with the same layout - it doesn't load the media-uploader-header that contain all the other tabs:
add_filter('media_upload_tabs', 'my_media_upload_tabs_filter');
function my_media_upload_tabs_filter($tabs) {
unset($tabs["type_url"]);
unset($tabs['library']);
$newtab = array('ell_insert_gmap_tab' => __('Google Map','insertgmap'));
return array_merge($tabs,$newtab);
}
add_action('media_upload_ell_insert_gmap_tab', 'media_upload_ell_gmap_tab');
function media_upload_ell_gmap_tab() {
return wp_iframe('media_upload_ell_gmap_form', $errors );
}
function media_upload_ell_gmap_form() {
?>
<h2>HTML Form</h2>
<?php
}
Thanks.
A: found it.
in the automattic SVN for media.php i found the media_upload_header() function, and the only thing left to do is to echo it in the last function:
function media_upload_ell_gmap_form() {
echo media_upload_header();
?>
<h2>HTML Form</h2>
<?php
}
that's it.
|
Q: custom tabs in media uploader I've managed to add a custom tab to the media uploader, but for some reason it doesn't come with the same layout - it doesn't load the media-uploader-header that contain all the other tabs:
add_filter('media_upload_tabs', 'my_media_upload_tabs_filter');
function my_media_upload_tabs_filter($tabs) {
unset($tabs["type_url"]);
unset($tabs['library']);
$newtab = array('ell_insert_gmap_tab' => __('Google Map','insertgmap'));
return array_merge($tabs,$newtab);
}
add_action('media_upload_ell_insert_gmap_tab', 'media_upload_ell_gmap_tab');
function media_upload_ell_gmap_tab() {
return wp_iframe('media_upload_ell_gmap_form', $errors );
}
function media_upload_ell_gmap_form() {
?>
<h2>HTML Form</h2>
<?php
}
Thanks.
A: found it.
in the automattic SVN for media.php i found the media_upload_header() function, and the only thing left to do is to echo it in the last function:
function media_upload_ell_gmap_form() {
echo media_upload_header();
?>
<h2>HTML Form</h2>
<?php
}
that's it.
|
wordpress
|
{
"language": "en",
"length": 116,
"provenance": "stackexchange_00019.jsonl.gz:407525",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11357"
}
|
[
0.04498291015625,
-0.0043487548828125,
0.0200347900390625,
-0.005970001220703125,
0.0034694671630859375,
-0.017425537109375,
0.0390625,
-0.0202789306640625,
-0.0228729248046875,
0.0180206298828125,
0.03326416015625,
-0.0028133392333984375,
0.0004711151123046875,
-0.060516357421875,
0.0243377685546875,
-0.01137542724609375,
0.035858154296875,
-0.024688720703125,
0.02850341796875,
-0.0009126663208007812,
0.02520751953125,
0.019073486328125,
0.017303466796875,
0.03887939453125,
-0.0171966552734375,
0.023040771484375,
0.016571044921875,
-0.027923583984375,
-0.03466796875,
-0.031158447265625,
-0.01386260986328125,
0.048492431640625,
0.0088958740234375,
0.0384521484375,
-0.020538330078125,
0.05023193359375,
0.065673828125,
-0.004741668701171875,
0.0284576416015625,
0.0338134765625,
0.03778076171875,
-0.00881195068359375,
-0.0058746337890625,
0.0114288330078125,
-0.00360107421875,
-0.0244140625,
0.021270751953125,
-0.0286102294921875,
0.0176544189453125,
0.037445068359375,
-0.02069091796875,
-0.021453857421875,
-0.0080718994140625,
-0.04443359375,
0.002834320068359375,
-0.0186767578125,
0.042724609375,
-0.03173828125,
0.0153045654296875,
0.01348114013671875,
-0.0183868408203125,
0.023956298828125,
-0.0024471282958984375,
-0.0267181396484375,
-0.036468505859375,
0.018951416015625,
0.01477813720703125,
-0.00780487060546875,
-0.037200927734375,
-0.06341552734375,
0.00804901123046875,
-0.0196380615234375,
0.03900146484375,
-0.01873779296875,
0.002864837646484375,
-0.00907135009765625,
0.004474639892578125,
0.0079193115234375,
0.0188140869140625,
-0.0239410400390625,
0.0226593017578125,
-0.0160369873046875,
-0.026123046875,
-0.035400390625,
0.05364990234375,
0.00946807861328125,
0.0033893585205078125,
-0.031097412109375,
-0.01142120361328125,
0.0102996826171875,
-0.0154876708984375,
-0.014190673828125,
0.00070953369140625,
0.016571044921875,
-0.0155181884765625,
-0.0111236572265625,
0.025177001953125,
0.024139404296875,
-0.01334381103515625,
0.005290985107421875,
0.016021728515625,
-0.0501708984375,
0.04461669921875,
-0.033599853515625,
0.0301361083984375,
0.0153045654296875,
-0.0408935546875,
-0.054107666015625,
0.027923583984375,
0.012969970703125,
-0.0183868408203125,
-0.00569915771484375,
0.033355712890625,
-0.011962890625,
-0.0184326171875,
-0.0149383544921875,
0.0035858154296875,
0.0113983154296875,
0.01064300537109375,
-0.029937744140625,
-0.00563812255859375,
0.0172576904296875,
-0.032379150390625,
-0.01654052734375,
0.011016845703125,
-0.0157470703125,
-0.00775909423828125,
0.01305389404296875,
0.0166778564453125,
0.033843994140625,
-0.010467529296875,
0.005916595458984375,
0.01422882080078125,
0.00495147705078125,
-0.0075225830078125,
-0.01337432861328125,
0.03692626953125,
-0.0201416015625,
-0.012176513671875,
0.04400634765625,
-0.0211944580078125,
-0.031036376953125,
-0.00937652587890625,
-0.0217437744140625,
-0.007015228271484375,
0.031982421875,
0.00914764404296875,
0.00315093994140625,
-0.00946044921875,
-0.062744140625,
0.00533294677734375,
-0.01385498046875,
0.00795745849609375,
-0.0116119384765625,
0.0235443115234375,
-0.0404052734375,
0.008056640625,
-0.026123046875,
0.03515625,
0.00017893314361572266,
0.058380126953125,
-0.02020263671875,
-0.02593994140625,
-0.034820556640625,
-0.0528564453125,
0.001026153564453125,
-0.0523681640625,
-0.0082244873046875,
0.03173828125,
0.0230865478515625,
-0.0205230712890625,
0.0081939697265625,
0.03643798828125,
0.032623291015625,
0.00787353515625,
0.0186920166015625,
0.0305633544921875,
0.03955078125,
0.0204620361328125,
0.048828125,
0.016693115234375,
-0.025726318359375,
0.10211181640625,
-0.03326416015625,
-0.0721435546875,
0.08648681640625,
-0.0011320114135742188,
0.092529296875,
0.01490020751953125,
0.006717681884765625,
0.0219879150390625,
0.01032257080078125,
0.004058837890625,
-0.037139892578125,
-0.000015974044799804688,
-0.035003662109375,
0.00922393798828125,
-0.01305389404296875,
0.0006842613220214844,
0.046234130859375,
-0.0081787109375,
-0.00801849365234375,
0.01953125,
-0.002658843994140625,
-0.021575927734375,
-0.004077911376953125,
-0.0090789794921875,
0.02630615234375,
-0.00704193115234375,
0.024169921875,
-0.0022563934326171875,
-0.02789306640625,
-0.01110076904296875,
-0.00569915771484375,
-0.0007081031799316406,
-0.03094482421875,
0.00394439697265625,
0.05328369140625,
-0.009429931640625,
0.056121826171875,
-0.0440673828125,
-0.024139404296875,
-0.0341796875,
-0.0260009765625,
0.006847381591796875,
0.01556396484375,
-0.021240234375,
0.0073699951171875,
0.0184173583984375,
0.017303466796875,
-0.00949859619140625,
0.0213470458984375,
-0.00031185150146484375,
-0.0019073486328125,
-0.036529541015625,
-0.04193115234375,
-0.03631591796875,
-0.10455322265625,
0.0187225341796875,
0.0662841796875,
-0.0019817352294921875,
0.040557861328125,
-0.003711700439453125,
0.05474853515625,
0.060791015625,
0.050201416015625,
0.0191802978515625,
0.01727294921875,
-0.00482177734375,
0.0011816024780273438,
-0.054107666015625,
-0.005832672119140625,
0.0416259765625,
-0.04718017578125,
0.025421142578125,
0.043304443359375,
-0.0272369384765625,
-0.0654296875,
0.028350830078125,
-0.002101898193359375,
0.01531982421875,
-0.0118408203125,
-0.022369384765625,
-0.01122283935546875,
0.06365966796875,
0.0276336669921875,
0.05340576171875,
0.048492431640625,
-0.052337646484375,
0.0262451171875,
0.012969970703125,
0.00669097900390625,
-0.0241851806640625,
0.041656494140625,
0.0643310546875,
-0.010772705078125,
-0.0240936279296875,
-0.01067352294921875,
-0.01505279541015625,
0.012420654296875,
-0.032196044921875,
-0.0169219970703125,
-0.035064697265625,
-0.0067138671875,
0.0074615478515625,
-0.064208984375,
0.01406097412109375,
-0.01473236083984375,
-0.007488250732421875,
-0.038818359375,
-0.0098114013671875,
0.01934814453125,
-0.0491943359375,
0.059112548828125,
0.01152801513671875,
-0.0283966064453125,
0.0186004638671875,
-0.04986572265625,
0.0428466796875,
-0.0281829833984375,
0.06890869140625,
0.0714111328125,
-0.01959228515625,
0.02838134765625,
0.0117034912109375,
-0.0290374755859375,
-0.02862548828125,
0.053985595703125,
0.0140380859375,
-0.0372314453125,
0.006343841552734375,
0.018280029296875,
-0.003398895263671875,
-0.00452423095703125,
-0.025543212890625,
-0.0237579345703125,
-0.03179931640625,
-0.0134735107421875,
-0.050048828125,
-0.004230499267578125,
0.0266571044921875,
-0.0634765625,
0.0274505615234375,
-0.021484375,
-0.038116455078125,
-0.026611328125,
0.01206207275390625,
-0.006931304931640625,
-0.0237579345703125,
0.0300445556640625,
-0.0222015380859375,
-0.00925445556640625,
-0.05352783203125,
-0.011199951171875,
-0.00313568115234375,
0.0280303955078125,
0.018310546875,
-0.00543212890625,
0.005916595458984375,
-0.004108428955078125,
0.057647705078125,
0.01337432861328125,
0.0073394775390625,
0.0167083740234375,
0.011016845703125,
-0.030426025390625,
0.0238494873046875,
0.0033283233642578125,
-0.01029205322265625,
0.033782958984375,
-0.02459716796875,
-0.01214599609375,
-0.01259613037109375,
-0.03448486328125,
-0.0255584716796875,
0.0220489501953125,
0.034637451171875,
-0.0301666259765625,
-0.0147705078125,
-0.062225341796875,
0.0299530029296875,
0.01678466796875,
0.003742218017578125,
-0.043670654296875,
-0.022308349609375,
-0.033538818359375,
-0.01561737060546875,
-0.002147674560546875,
0.0323486328125,
0.0287322998046875,
-0.0098114013671875,
-0.00188446044921875,
0.0031337738037109375,
0.01306915283203125,
0.044921875,
-0.0040435791015625,
-0.011627197265625,
-0.0177764892578125,
0.02520751953125,
0.0109405517578125,
0.0177154541015625,
0.0131378173828125,
0.00789642333984375,
-0.00020396709442138672,
-0.022003173828125,
0.040863037109375,
-0.012542724609375,
0.036407470703125,
-0.046295166015625,
-0.036956787109375,
-0.036865234375,
0.05670166015625,
-0.0126800537109375,
-0.0219268798828125,
-0.01397705078125,
0.0166015625,
0.01202392578125,
-0.060333251953125,
0.0193328857421875,
-0.01306915283203125,
-0.0146331787109375,
-0.01007080078125,
0.01329803466796875,
-0.040008544921875,
-0.01544189453125,
-0.019134521484375,
-0.052398681640625,
-0.0016279220581054688,
0.037689208984375,
0.01239776611328125,
-0.0221405029296875,
0.053741455078125,
-0.01505279541015625,
0.00014972686767578125,
-0.0240325927734375,
0.0240936279296875,
-0.0906982421875,
-0.015777587890625,
-0.038604736328125,
0.075439453125,
0.032562255859375,
-0.040740966796875,
-0.019378662109375,
0.055908203125,
0.053466796875,
-0.0084686279296875,
0.0280914306640625,
-0.032623291015625,
0.043121337890625,
-0.006092071533203125,
0.01523590087890625,
-0.0272674560546875,
-0.0260009765625,
-0.01036834716796875,
-0.0212249755859375,
0.037567138671875,
0.0254058837890625,
0.0254974365234375,
0.034576416015625,
-0.024658203125,
-0.048675537109375,
-0.0189361572265625,
-0.0218963623046875,
-0.0177001953125,
-0.01361083984375,
-0.0197906494140625,
0.0221099853515625,
-0.023345947265625,
0.018524169921875,
0.0297088623046875,
-0.024261474609375,
0.0229949951171875,
0.024169921875,
0.0232696533203125,
-0.020416259765625,
-0.11822509765625,
-0.0018243789672851562,
0.0268402099609375,
0.033294677734375,
0.026641845703125,
-0.004711151123046875,
-0.0238800048828125,
0.033935546875,
-0.005939483642578125,
0.01264190673828125,
0.0019893646240234375,
0.024932861328125,
0.0252227783203125,
-0.0001475811004638672,
0.002368927001953125,
0.046630859375,
-0.03314208984375,
-0.0426025390625,
-0.02789306640625,
0.005016326904296875,
-0.01080322265625,
0.024810791015625,
0.024658203125,
0.005340576171875,
-0.042083740234375,
-0.053497314453125,
0.00791168212890625,
-0.015777587890625,
0.049530029296875,
0.0013303756713867188,
0.00212860107421875,
0.0244293212890625,
0.01137542724609375,
0.020172119140625,
-0.01367950439453125,
0.043243408203125,
-0.049560546875,
0.050201416015625,
0.0105743408203125,
0.0027675628662109375,
-0.040924072265625,
0.01401519775390625,
-0.0273284912109375,
0.024871826171875,
-0.0010786056518554688,
-0.0802001953125,
0.01873779296875,
0.0113067626953125,
-0.053802490234375,
-0.017120361328125,
-0.02099609375,
0.037200927734375,
0.0176544189453125,
0.033782958984375,
0.00853729248046875,
0.04046630859375,
-0.00710296630859375,
0.02008056640625,
0.0184478759765625,
-0.01824951171875,
-0.031005859375,
0.049591064453125,
-0.041229248046875,
0.011505126953125,
0.017486572265625,
0.0275421142578125,
0.0275726318359375,
0.0073089599609375,
0.0265960693359375,
-0.020477294921875,
0.022064208984375,
-0.03271484375,
0.00473785400390625,
-0.036346435546875,
0.0196380615234375,
-0.0181121826171875,
0.032379150390625,
0.004791259765625,
-0.02801513671875,
0.0289306640625,
-0.06488037109375,
0.00897979736328125,
0.0037937164306640625,
-0.04779052734375,
-0.06298828125,
0.0032329559326171875,
0.02984619140625,
0.0042266845703125,
-0.0574951171875,
-0.0024871826171875,
0.018951416015625,
0.012664794921875,
0.0152740478515625,
0.0251617431640625,
-0.038970947265625,
0.02178955078125,
0.0187835693359375,
0.0240936279296875,
-0.00665283203125,
-0.0008945465087890625,
-0.0653076171875,
-0.03717041015625,
-0.022705078125,
0.003875732421875,
0.048126220703125,
-0.047332763671875,
0.005565643310546875,
-0.035491943359375,
0.03387451171875,
-0.050994873046875,
0.01335906982421875,
0.053741455078125,
0.047607421875,
0.022613525390625,
-0.016143798828125,
-0.024017333984375,
-0.032806396484375,
-0.04962158203125,
-0.023101806640625,
-0.00634765625,
-0.0014677047729492188,
0.01555633544921875,
0.036529541015625,
0.00013971328735351562,
-0.0150909423828125,
-0.01354217529296875,
0.017608642578125,
0.0109710693359375,
0.05609130859375,
-0.0005869865417480469,
0.0223846435546875,
0.027679443359375,
0.01351165771484375,
0.0197906494140625,
0.0243988037109375,
0.0042572021484375,
-0.0294189453125,
-0.01568603515625,
-0.09515380859375,
-0.0294036865234375,
0.032257080078125,
-0.0762939453125,
0.08575439453125,
0.052032470703125,
0.00921630859375,
0.0171356201171875,
-0.0173797607421875,
-0.005680084228515625,
-0.0233612060546875,
-0.00812530517578125,
-0.023468017578125,
-0.0184326171875,
0.0094146728515625,
-0.01323699951171875,
0.042022705078125,
-0.006591796875,
0.0203094482421875,
0.0189361572265625,
-0.038970947265625,
0.038787841796875,
-0.01018524169921875,
-0.04327392578125,
0.0447998046875,
0.09136962890625,
0.00518798828125,
0.059417724609375,
0.0218963623046875,
0.01666259765625,
0.046234130859375,
0.0197906494140625,
0.03582763671875,
-0.01430511474609375,
0.058380126953125,
0.00884246826171875,
-0.002590179443359375,
0.057861328125,
-0.0250396728515625,
0.0088653564453125,
-0.006740570068359375,
0.0211944580078125,
-0.01061248779296875,
0.001491546630859375,
-0.006542205810546875,
0.01065826416015625,
0.06072998046875,
-0.032257080078125,
0.0184783935546875,
0.005828857421875,
0.03289794921875,
-0.007472991943359375,
-0.044891357421875,
-0.007965087890625,
-0.017303466796875,
-0.01007843017578125,
-0.026031494140625,
0.0241241455078125,
0.01390838623046875,
0.0022983551025390625,
-0.0232391357421875,
-0.020263671875,
-0.01131439208984375,
0.0186309814453125,
0.061614990234375,
-0.0274810791015625,
0.006809234619140625,
-0.0204315185546875,
0.0149078369140625,
-0.0118865966796875,
-0.032440185546875,
0.033782958984375,
-0.01047515869140625,
0.06646728515625,
0.043975830078125,
-0.0020351409912109375,
0.022125244140625,
0.0033206939697265625,
0.0273895263671875,
0.049896240234375,
-0.00966644287109375,
0.0200958251953125,
-0.00952911376953125,
-0.0132293701171875,
0.002899169921875,
-0.0053558349609375,
-0.0232391357421875,
0.007598876953125,
0.004261016845703125,
0.0195770263671875,
0.004962921142578125,
-0.02874755859375,
0.045654296875,
0.00652313232421875,
-0.0189361572265625,
-0.011932373046875,
0.0321044921875,
-0.06951904296875,
-0.033294677734375,
0.007740020751953125,
-0.035491943359375,
-0.006748199462890625,
-0.010345458984375,
-0.04705810546875,
0.09466552734375,
0.0302581787109375,
0.02899169921875,
0.0134124755859375,
0.0345458984375,
-0.041290283203125,
0.0099945068359375,
-0.026611328125,
-0.0068817138671875,
-0.00565338134765625,
0.0278472900390625,
-0.06427001953125,
-0.02227783203125,
-0.0192413330078125,
0.0657958984375,
-0.0012292861938476562,
-0.005046844482421875,
-0.060699462890625,
-0.006679534912109375,
0.02325439453125,
0.033416748046875,
0.030914306640625,
0.043182373046875,
-0.001461029052734375,
-0.0036716461181640625,
0.05352783203125,
-0.01202392578125,
0.043731689453125,
-0.041595458984375,
0.005954742431640625,
0.0118560791015625,
0.015350341796875,
0.037872314453125,
-0.0511474609375,
0.005977630615234375,
0.0169677734375,
-0.04736328125,
-0.012847900390625,
-0.0267181396484375,
-0.0058441162109375,
0.0183868408203125,
0.0009450912475585938,
-0.05029296875,
-0.0165863037109375,
-0.0297393798828125,
0.03253173828125,
-0.00255584716796875,
-0.02777099609375,
0.050201416015625,
0.00626373291015625,
-0.033416748046875,
0.0102996826171875,
-0.01275634765625,
-0.009185791015625,
0.034423828125,
0.044830322265625,
-0.0015363693237304688,
0.003692626953125,
-0.0572509765625,
0.0276031494140625,
0.045379638671875,
0.050537109375,
-0.048919677734375,
-0.0355224609375,
0.0024166107177734375,
-0.015960693359375,
-0.00232696533203125,
-0.01751708984375,
0.0001819133758544922,
-0.07525634765625,
-0.041351318359375,
-0.04595947265625,
0.00743865966796875,
0.0175933837890625,
0.023956298828125,
0.0013170242309570312,
0.004871368408203125,
-0.0223388671875,
-0.00508880615234375,
-0.056396484375,
-0.0008873939514160156,
-0.02508544921875,
0.052703857421875,
0.0538330078125,
0.045684814453125,
-0.01511383056640625,
-0.03436279296875,
-0.0311431884765625,
0.049285888671875,
0.006618499755859375,
0.048492431640625,
-0.04046630859375,
-0.00957489013671875,
0.010986328125,
0.0308074951171875,
0.040283203125,
0.0159759521484375,
0.01366424560546875,
-0.007167816162109375,
0.00905609130859375,
0.023651123046875,
0.0367431640625,
-0.018096923828125,
-0.041351318359375,
-0.050628662109375,
0.028778076171875,
0.0374755859375,
0.019989013671875,
0.036590576171875,
-0.03228759765625,
0.057708740234375,
-0.017547607421875,
0.0285797119140625,
-0.01470947265625,
-0.072021484375,
0.005611419677734375,
-0.021209716796875,
0.12493896484375,
0.00405120849609375,
-0.05438232421875,
-0.007904052734375,
-0.040740966796875,
-0.02728271484375,
0.02734375,
0.037017822265625,
-0.013458251953125,
0.02301025390625,
-0.02630615234375,
-0.01490020751953125,
0.002079010009765625,
-0.025665283203125,
0.0198211669921875,
0.0305938720703125,
-0.006122589111328125,
-0.003391265869140625,
-0.056976318359375,
-0.025146484375,
-0.01073455810546875,
0.00908660888671875,
0.01351165771484375,
0.04193115234375,
0.0196685791015625,
0.01160430908203125,
0.0155029296875,
-0.0106964111328125,
0.0218353271484375,
0.0291900634765625,
0.040679931640625,
0.01904296875,
-0.0182037353515625,
-0.04949951171875,
0.0210418701171875,
-0.00948333740234375,
0.037872314453125,
-0.059478759765625,
-0.051361083984375,
0.017364501953125,
0.0323486328125,
0.005615234375,
-0.00872039794921875,
-0.037567138671875,
-0.044281005859375,
-0.04327392578125,
0.00356292724609375,
0.016021728515625,
0.018707275390625,
-0.0189971923828125,
0.052276611328125,
-0.0004935264587402344,
-0.014129638671875,
0.01511383056640625,
-0.05194091796875,
0.04736328125,
0.049652099609375,
-0.042266845703125,
-0.033203125,
-0.024261474609375,
-0.026885986328125,
0.0006122589111328125,
-0.00638580322265625,
0.0300140380859375,
-0.004360198974609375,
-0.0506591796875,
0.021148681640625,
0.033660888671875,
0.008148193359375,
-0.047149658203125,
-0.014892578125,
0.07232666015625,
-0.032196044921875,
-0.0018568038940429688,
-0.0418701171875,
-0.02001953125,
-0.050048828125,
-0.015960693359375,
0.02886962890625,
-0.032684326171875,
-0.0400390625,
-0.07098388671875,
0.01129913330078125,
0.02880859375,
-0.01430511474609375,
-0.052734375,
0.017852783203125,
-0.02716064453125,
0.08441162109375,
-0.0295562744140625,
0.048797607421875,
-0.0286712646484375,
0.0023555755615234375,
-0.0306243896484375,
-0.068115234375,
-0.0140838623046875,
0.0888671875,
-0.0035800933837890625,
-0.0167388916015625,
0.0193328857421875,
-0.00641632080078125,
-0.0209503173828125,
0.0139312744140625,
-0.01335906982421875,
0.06683349609375,
-0.019927978515625,
-0.04595947265625,
-0.005878448486328125,
-0.016693115234375,
0.026763916015625,
0.0232086181640625,
-0.001338958740234375,
-0.0301361083984375,
-0.01435089111328125,
-0.01372528076171875,
-0.0207977294921875,
-0.0209197998046875,
-0.043304443359375,
-0.068359375,
0.01059722900390625,
0.0037937164306640625,
-0.035552978515625,
-0.007648468017578125,
0.041595458984375,
0.0019254684448242188,
0.006069183349609375,
0.00533294677734375,
-0.0222320556640625,
-0.002849578857421875,
-0.00392913818359375,
-0.00971221923828125,
0.059356689453125,
-0.000762939453125,
0.01483154296875,
-0.0263214111328125,
-0.002170562744140625,
-0.019012451171875,
-0.005157470703125,
0.0362548828125,
-0.037384033203125,
0.035064697265625,
0.02996826171875,
-0.033660888671875,
-0.07659912109375,
-0.0189666748046875,
-0.059844970703125,
-0.03192138671875,
-0.028961181640625,
-0.01535797119140625,
0.004070281982421875,
0.08551025390625,
0.06494140625,
0.017547607421875,
-0.03936767578125,
0.0217437744140625,
0.003509521484375,
0.0282440185546875,
-0.0030975341796875,
-0.01239776611328125,
-0.0330810546875,
-0.034881591796875,
0.005580902099609375,
0.036376953125,
-0.019805908203125,
-0.0309906005859375,
0.006137847900390625,
-0.052703857421875,
0.01558685302734375,
0.0297393798828125,
0.0032100677490234375,
0.0092926025390625,
0.07855224609375,
-0.0550537109375,
-0.0103607177734375,
0.00920867919921875,
-0.004116058349609375,
0.0294189453125,
0.00897216796875,
0.0133514404296875,
0.005504608154296875,
-0.04241943359375,
0.01739501953125,
0.0120086669921875,
0.00447845458984375,
-0.0246124267578125,
-0.02545166015625,
-0.0251617431640625,
0.0023136138916015625,
0.0117950439453125,
0.007049560546875,
-0.0219573974609375,
0.012481689453125,
-0.0016489028930664062,
0.0233154296875,
0.0018739700317382812,
-0.035736083984375,
-0.034088134765625,
0.016387939453125,
0.0021152496337890625,
-0.00955963134765625,
0.00672149658203125,
-0.008544921875,
0.0275421142578125,
0.0133056640625,
0.0243072509765625,
-0.00563812255859375,
0.0271148681640625,
-0.03131103515625,
-0.0078277587890625,
0.0146026611328125
] |
b7cd4690568b7b4b6ef075f416c519da4dd014f5
|
Wordpress Stackexchange
Q: js error on post editing page I'm getting a Javascript error on the wp-admin/post.php page
which prevents me from adding tags/editing the post's link.. pretty much everything with JS... anyway, the error is:
> Error: d.delegate is not a function
> Source File:
> http://www.mysite.com/wp-admin/load-scripts.php?c=1&load=hoverIntent,common,jquery-color,schedule,wp-ajax-response,autosave,wp-lists,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-query,admin-comments,suggest,jquery-ui-sortable,postbox,post,word-count,thickbox,media-upload&ver=c1c854f5d9062306d43d7331055686c9
> Line: 42
UPDATE
Only solution that seemed to work was downgrading the Wordpress website to 3.0.5
I'm not sure why is this happening, but after 5 hours of debugging - I don't care
A: I'd suggest disabling script concatenation and/or compression to see if that helps. You can do this by adding the following to the wp-config.php file:
define( 'CONCATENATE_SCRIPTS', false );
define( 'COMPRESS_SCRIPTS', false );
And maybe even script debugging to..
define( 'SCRIPT_DEBUG', true );
Are you using any caching plugins?
EDIT:
The most common reason for seeing that message seems to be running an older version of jQuery, ie. anything lower than 1.4.2 ... do you have any plugins that load jQuery?
|
Q: js error on post editing page I'm getting a Javascript error on the wp-admin/post.php page
which prevents me from adding tags/editing the post's link.. pretty much everything with JS... anyway, the error is:
> Error: d.delegate is not a function
> Source File:
> http://www.mysite.com/wp-admin/load-scripts.php?c=1&load=hoverIntent,common,jquery-color,schedule,wp-ajax-response,autosave,wp-lists,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-query,admin-comments,suggest,jquery-ui-sortable,postbox,post,word-count,thickbox,media-upload&ver=c1c854f5d9062306d43d7331055686c9
> Line: 42
UPDATE
Only solution that seemed to work was downgrading the Wordpress website to 3.0.5
I'm not sure why is this happening, but after 5 hours of debugging - I don't care
A: I'd suggest disabling script concatenation and/or compression to see if that helps. You can do this by adding the following to the wp-config.php file:
define( 'CONCATENATE_SCRIPTS', false );
define( 'COMPRESS_SCRIPTS', false );
And maybe even script debugging to..
define( 'SCRIPT_DEBUG', true );
Are you using any caching plugins?
EDIT:
The most common reason for seeing that message seems to be running an older version of jQuery, ie. anything lower than 1.4.2 ... do you have any plugins that load jQuery?
A: Is javascript working anywhere in the back-end? i.e. is javascript working on your Dashboard? In the edit screens for other post-types (e.g. Pages)?
If javascript is not working anywhere in your back-end, try adding the following to wp-config.php, right after your database configuration:
define('CONCATENATE_SCRIPTS', false);
This seems to fix some pesky javascript issues on the back-end, especially if you're getting conflicts with other script minimization functionality (e.g. via caching plugins, or a proxy/CDN service).
A: If you've verified that the error still occurs after disabling all plugins and switching back to the default/included theme, then you can try reinstalling WordPress. Sometimes an individual file (or two) can be corrupted during the download of an update.
To re-install WordPress, log into the admin part of your WordPress site and go to the Updates page (http://yourblogurl/wp-admin/update-core.php). There you should see a button labelled "Re-install Automatically". That will re-download the WordPress files, overwriting anything that may have been previously corrupted.
A: I had the exact same problem, I solved the issue by disabling a plugin and then went into my pages, then returned to the plugins and enabled the plugin again, the plugin that was causing the problem was advanced custom fields.
I also manually updated jQuery in wp-includs/js/jquery from version 1.4.1 to 1.7.
Hope that helps.
A: I solved this issue with the following code in the wp-config.php
if (strpos($_SERVER['REQUEST_URI'], 'wp-admin') !== false){
define('CONCATENATE_SCRIPTS', false );
}
This is a temporary solution for me until the versions of WP, ACF & jQuery work out.
|
wordpress
|
{
"language": "en",
"length": 414,
"provenance": "stackexchange_00019.jsonl.gz:407537",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11398"
}
|
[
0.05035400390625,
-0.02001953125,
-0.03387451171875,
-0.039215087890625,
-0.00656890869140625,
-0.04327392578125,
0.012237548828125,
0.0026397705078125,
0.010650634765625,
-0.00304412841796875,
-0.007213592529296875,
-0.003391265869140625,
-0.046234130859375,
-0.0303955078125,
-0.0090789794921875,
-0.035675048828125,
0.045684814453125,
-0.04693603515625,
-0.01076507568359375,
-0.007106781005859375,
0.01277923583984375,
0.02386474609375,
-0.004932403564453125,
0.06610107421875,
-0.02435302734375,
0.033111572265625,
0.068115234375,
0.0130462646484375,
-0.01849365234375,
-0.0197601318359375,
0.0086822509765625,
-0.02593994140625,
0.01708984375,
0.0196380615234375,
-0.016998291015625,
-0.019683837890625,
-0.0025787353515625,
0.01537322998046875,
0.00650787353515625,
0.007137298583984375,
-0.011474609375,
-0.00746917724609375,
0.026031494140625,
0.0192413330078125,
-0.0135650634765625,
-0.021820068359375,
-0.0092315673828125,
-0.05072021484375,
0.0305023193359375,
-0.0156707763671875,
-0.0298614501953125,
0.015655517578125,
-0.0251007080078125,
-0.00051116943359375,
-0.0108184814453125,
0.00426483154296875,
-0.026153564453125,
0.018768310546875,
0.01033782958984375,
0.06494140625,
0.01366424560546875,
0.0135650634765625,
-0.027252197265625,
-0.034210205078125,
-0.01025390625,
-0.01425933837890625,
0.0209197998046875,
0.01305389404296875,
-0.0472412109375,
-0.0007376670837402344,
0.035797119140625,
-0.013427734375,
0.0207977294921875,
0.015716552734375,
0.01361083984375,
-0.036468505859375,
-0.0003097057342529297,
0.0242156982421875,
0.02960205078125,
0.0097808837890625,
0.06158447265625,
0.018585205078125,
-0.0201568603515625,
0.02862548828125,
-0.019317626953125,
0.0308074951171875,
0.01276397705078125,
-0.0276947021484375,
-0.039703369140625,
-0.01024627685546875,
-0.030609130859375,
-0.057159423828125,
-0.044769287109375,
0.007415771484375,
0.001987457275390625,
-0.01551055908203125,
0.03204345703125,
0.07965087890625,
-0.004856109619140625,
0.005367279052734375,
-0.0277099609375,
-0.02215576171875,
-0.00325775146484375,
-0.03338623046875,
0.00572967529296875,
0.04718017578125,
-0.00799560546875,
0.0162506103515625,
0.0321044921875,
0.01934814453125,
0.0161590576171875,
-0.0174102783203125,
0.00958251953125,
-0.0277252197265625,
-0.00011110305786132812,
0.0009598731994628906,
-0.0240478515625,
0.0294647216796875,
0.0135345458984375,
-0.002777099609375,
-0.01611328125,
0.0103912353515625,
-0.0439453125,
0.054718017578125,
-0.0014677047729492188,
0.0018177032470703125,
0.020233154296875,
0.004756927490234375,
0.035552978515625,
-0.0245208740234375,
-0.03411865234375,
0.026153564453125,
0.0692138671875,
0.0338134765625,
0.025177001953125,
-0.007732391357421875,
0.05194091796875,
-0.03436279296875,
-0.017852783203125,
-0.0035076141357421875,
-0.0006074905395507812,
0.0263824462890625,
0.032440185546875,
-0.051605224609375,
-0.034637451171875,
0.00911712646484375,
0.01399993896484375,
0.020294189453125,
-0.02142333984375,
-0.0592041015625,
0.002002716064453125,
-0.01508331298828125,
0.06744384765625,
0.0013666152954101562,
-0.032562255859375,
-0.0657958984375,
0.088623046875,
-0.09228515625,
-0.03021240234375,
-0.10986328125,
0.01036834716796875,
0.0062408447265625,
0.0017576217651367188,
-0.0188140869140625,
-0.025360107421875,
-0.0222015380859375,
-0.02313232421875,
0.00859832763671875,
0.0280914306640625,
0.0116729736328125,
0.0203857421875,
-0.047454833984375,
0.024810791015625,
0.0082550048828125,
-0.0185394287109375,
0.032989501953125,
0.00012814998626708984,
-0.004184722900390625,
0.0284423828125,
0.003917694091796875,
-0.01715087890625,
-0.0288543701171875,
0.0333251953125,
-0.0058441162109375,
-0.05242919921875,
0.03533935546875,
0.01971435546875,
0.044281005859375,
0.004680633544921875,
0.0020389556884765625,
0.05352783203125,
0.0199737548828125,
0.00634002685546875,
0.00455474853515625,
-0.005596160888671875,
-0.051605224609375,
-0.01284027099609375,
-0.01551055908203125,
-0.020751953125,
0.0225982666015625,
0.013763427734375,
0.023834228515625,
-0.032501220703125,
-0.0007042884826660156,
-0.06298828125,
-0.01200103759765625,
-0.0191497802734375,
0.03643798828125,
0.05072021484375,
0.036651611328125,
-0.01546478271484375,
0.0266876220703125,
-0.0194854736328125,
0.0017118453979492188,
-0.01849365234375,
0.03997802734375,
-0.03387451171875,
0.048431396484375,
-0.005764007568359375,
0.062164306640625,
-0.00943756103515625,
-0.037841796875,
-0.007965087890625,
-0.0440673828125,
0.01251220703125,
0.01345062255859375,
-0.0287017822265625,
-0.003208160400390625,
0.0201568603515625,
-0.0037136077880859375,
0.0173492431640625,
0.055145263671875,
0.035797119140625,
0.030120849609375,
-0.02691650390625,
-0.00461578369140625,
-0.01654052734375,
-0.031280517578125,
-0.00926971435546875,
0.028167724609375,
0.045867919921875,
0.0028247833251953125,
0.007595062255859375,
-0.0106201171875,
0.0219268798828125,
-0.08795166015625,
0.0031185150146484375,
-0.0198974609375,
-0.024444580078125,
-0.001529693603515625,
0.055999755859375,
0.01178741455078125,
0.0246429443359375,
-0.058013916015625,
0.0180206298828125,
0.042694091796875,
-0.00833892822265625,
0.0235748291015625,
0.006023406982421875,
-0.050537109375,
0.0215606689453125,
-0.061737060546875,
-0.0574951171875,
-0.0136260986328125,
0.03570556640625,
0.007293701171875,
0.0305328369140625,
0.0347900390625,
-0.0115509033203125,
0.004058837890625,
0.0036602020263671875,
-0.042205810546875,
-0.007694244384765625,
0.0193939208984375,
0.031280517578125,
0.06463623046875,
-0.0413818359375,
0.00008320808410644531,
0.0029697418212890625,
0.03564453125,
-0.019012451171875,
-0.006832122802734375,
-0.00847625732421875,
-0.011383056640625,
-0.00249481201171875,
-0.011199951171875,
0.0265350341796875,
-0.0017309188842773438,
0.047149658203125,
0.0018291473388671875,
0.046844482421875,
-0.045623779296875,
-0.01971435546875,
0.0252838134765625,
0.017242431640625,
-0.069091796875,
0.07879638671875,
-0.01383209228515625,
0.003078460693359375,
0.01088714599609375,
0.09552001953125,
0.049713134765625,
-0.01345062255859375,
0.0264434814453125,
0.0098114013671875,
0.021392822265625,
0.0176239013671875,
0.024871826171875,
0.0021762847900390625,
-0.00908660888671875,
-0.07354736328125,
-0.030731201171875,
0.0278472900390625,
0.034027099609375,
-0.0001004934310913086,
-0.033599853515625,
-0.003887176513671875,
0.0178375244140625,
-0.12939453125,
-0.1495361328125,
-0.057647705078125,
-0.0771484375,
0.0157318115234375,
-0.0025653839111328125,
-0.023590087890625,
0.01401519775390625,
0.04638671875,
0.03192138671875,
0.038604736328125,
-0.026092529296875,
-0.06585693359375,
-0.02532958984375,
-0.078857421875,
-0.007076263427734375,
-0.00769805908203125,
0.014251708984375,
0.004634857177734375,
0.053070068359375,
0.002254486083984375,
-0.054962158203125,
0.01041412353515625,
-0.01235198974609375,
-0.01363372802734375,
0.0262451171875,
0.045379638671875,
-0.00897979736328125,
-0.0229949951171875,
0.0234375,
-0.03643798828125,
0.0205841064453125,
-0.0295257568359375,
-0.05224609375,
-0.0709228515625,
-0.0391845703125,
-0.02667236328125,
0.037750244140625,
0.06756591796875,
-0.00531005859375,
0.038055419921875,
-0.03173828125,
-0.036865234375,
0.01163482666015625,
-0.03253173828125,
0.057464599609375,
0.01995849609375,
-0.0294342041015625,
0.00839996337890625,
0.0148773193359375,
0.05902099609375,
0.0279998779296875,
0.0118255615234375,
0.00904083251953125,
0.047821044921875,
0.00606536865234375,
0.0438232421875,
-0.058349609375,
0.053619384765625,
-0.0210418701171875,
-0.0195465087890625,
0.00846099853515625,
-0.01305389404296875,
0.018463134765625,
-0.0419921875,
0.0185394287109375,
-0.0204315185546875,
0.0092926025390625,
-0.038848876953125,
-0.00534820556640625,
-0.0240020751953125,
0.005931854248046875,
-0.0322265625,
0.0238494873046875,
-0.0169677734375,
-0.01180267333984375,
-0.02069091796875,
0.020477294921875,
-0.045196533203125,
-0.045989990234375,
-0.0069732666015625,
-0.005523681640625,
0.006374359130859375,
0.00556182861328125,
-0.0026340484619140625,
-0.014801025390625,
-0.0165557861328125,
0.038787841796875,
-0.0104217529296875,
0.00414276123046875,
0.03466796875,
-0.028778076171875,
0.0012636184692382812,
-0.022125244140625,
0.007022857666015625,
-0.05877685546875,
-0.01436614990234375,
-0.01549530029296875,
-0.09661865234375,
-0.006420135498046875,
-0.0792236328125,
0.07977294921875,
0.034515380859375,
-0.01105499267578125,
-0.019744873046875,
0.03033447265625,
0.02874755859375,
-0.00423431396484375,
0.009246826171875,
-0.020111083984375,
-0.0043487548828125,
-0.00788116455078125,
0.00484466552734375,
-0.02313232421875,
0.001068115234375,
-0.0036029815673828125,
-0.045074462890625,
-0.044769287109375,
-0.030609130859375,
-0.07470703125,
-0.0006937980651855469,
-0.042755126953125,
-0.040130615234375,
-0.036468505859375,
0.00716400146484375,
0.003070831298828125,
-0.01377105712890625,
0.0175018310546875,
-0.0278778076171875,
-0.03497314453125,
0.012420654296875,
-0.0330810546875,
-0.0232696533203125,
0.01505279541015625,
0.049163818359375,
0.023162841796875,
0.0166778564453125,
0.0236968994140625,
-0.04534912109375,
0.0158233642578125,
-0.00678253173828125,
0.039947509765625,
0.0013599395751953125,
-0.01012420654296875,
0.049468994140625,
-0.025482177734375,
0.038055419921875,
-0.01264190673828125,
0.0056304931640625,
0.009521484375,
-0.0029125213623046875,
0.01210784912109375,
0.034332275390625,
-0.01447296142578125,
-0.00893402099609375,
-0.0261383056640625,
0.037567138671875,
-0.005817413330078125,
0.001102447509765625,
-0.0091705322265625,
0.01226806640625,
-0.025390625,
-0.0545654296875,
0.02886962890625,
-0.044036865234375,
0.021942138671875,
0.015777587890625,
0.00415802001953125,
0.031951904296875,
0.03485107421875,
-0.01056671142578125,
0.00928497314453125,
0.07733154296875,
-0.02880859375,
0.042755126953125,
0.01332855224609375,
-0.029693603515625,
-0.042633056640625,
-0.0120086669921875,
0.03350830078125,
0.021728515625,
-0.0261383056640625,
0.004230499267578125,
0.017547607421875,
-0.00832366943359375,
-0.01256561279296875,
0.0411376953125,
0.0300140380859375,
0.00997161865234375,
-0.00612640380859375,
-0.0184478759765625,
0.01119232177734375,
0.0088348388671875,
-0.023284912109375,
0.0521240234375,
0.01641845703125,
-0.006099700927734375,
0.016632080078125,
-0.004638671875,
0.037872314453125,
-0.0119781494140625,
-0.0166778564453125,
0.016815185546875,
-0.01264190673828125,
0.06451416015625,
0.0228729248046875,
-0.0616455078125,
0.0167694091796875,
0.0301055908203125,
0.0013141632080078125,
-0.05364990234375,
-0.00519561767578125,
0.006549835205078125,
0.025177001953125,
-0.005870819091796875,
-0.014251708984375,
0.0283966064453125,
-0.00787353515625,
-0.017120361328125,
0.01464080810546875,
0.0102386474609375,
-0.01528167724609375,
-0.0187225341796875,
-0.0222625732421875,
0.0123443603515625,
0.01337432861328125,
0.00946807861328125,
0.00838470458984375,
0.01274871826171875,
0.03033447265625,
-0.0244598388671875,
-0.00968170166015625,
0.00022161006927490234,
0.00788116455078125,
-0.002376556396484375,
0.005748748779296875,
0.006488800048828125,
-0.054656982421875,
-0.04119873046875,
-0.003658294677734375,
0.012939453125,
0.0295562744140625,
0.0005974769592285156,
-0.01068115234375,
-0.0238494873046875,
0.01447296142578125,
-0.022430419921875,
0.007770538330078125,
0.0294647216796875,
-0.006130218505859375,
-0.0265350341796875,
-0.012542724609375,
-0.048583984375,
-0.0249176025390625,
-0.0185089111328125,
-0.00341033935546875,
-0.035980224609375,
-0.00026679039001464844,
-0.0091552734375,
0.0208892822265625,
-0.0291595458984375,
-0.0010213851928710938,
-0.006092071533203125,
0.0241241455078125,
0.003173828125,
0.05328369140625,
-0.043426513671875,
0.0294036865234375,
-0.002460479736328125,
0.00919342041015625,
-0.0328369140625,
-0.005886077880859375,
0.020904541015625,
-0.0135345458984375,
0.0029315948486328125,
-0.078369140625,
-0.01236724853515625,
0.00878143310546875,
-0.046722412109375,
0.005855560302734375,
0.02081298828125,
-0.0019512176513671875,
0.032470703125,
-0.00689697265625,
0.01161956787109375,
-0.01251983642578125,
0.00591278076171875,
-0.00440216064453125,
0.0007987022399902344,
0.050689697265625,
-0.0278778076171875,
0.01708984375,
0.012115478515625,
-0.01123809814453125,
0.01505279541015625,
-0.0284423828125,
-0.0092010498046875,
0.04241943359375,
-0.006710052490234375,
-0.0214996337890625,
0.0021648406982421875,
0.025421142578125,
0.038238525390625,
0.0006041526794433594,
0.04144287109375,
0.02294921875,
0.033233642578125,
-0.0285797119140625,
-0.06658935546875,
-0.01081085205078125,
-0.002040863037109375,
-0.005329132080078125,
-0.003936767578125,
-0.0100250244140625,
0.023651123046875,
0.046844482421875,
0.09820556640625,
-0.0528564453125,
0.00970458984375,
0.02899169921875,
-0.03692626953125,
-0.001766204833984375,
-0.0184783935546875,
0.034942626953125,
0.0007295608520507812,
0.018310546875,
0.0282745361328125,
-0.0123291015625,
0.00824737548828125,
-0.0128173828125,
-0.024383544921875,
-0.01053619384765625,
0.01580810546875,
0.0234832763671875,
-0.0142974853515625,
0.032684326171875,
0.005157470703125,
0.0242767333984375,
-0.0027828216552734375,
-0.004058837890625,
0.00518798828125,
-0.049560546875,
-0.08642578125,
-0.026641845703125,
-0.0023517608642578125,
-0.046356201171875,
-0.0491943359375,
0.006603240966796875,
-0.0016536712646484375,
0.056243896484375,
-0.03948974609375,
0.017333984375,
0.038909912109375,
-0.007770538330078125,
0.0323486328125,
-0.025146484375,
-0.0037097930908203125,
0.01995849609375,
-0.0036220550537109375,
-0.005954742431640625,
0.01529693603515625,
-0.0297088623046875,
-0.00807952880859375,
-0.0123443603515625,
0.03863525390625,
-0.0239715576171875,
-0.015899658203125,
0.0465087890625,
0.00801849365234375,
-0.03302001953125,
-0.0201568603515625,
0.0221099853515625,
-0.08843994140625,
-0.06439208984375,
-0.0016565322875976562,
-0.07989501953125,
-0.01727294921875,
-0.028594970703125,
-0.00994873046875,
0.09259033203125,
-0.0328369140625,
-0.0212554931640625,
0.0261688232421875,
0.051727294921875,
-0.006458282470703125,
0.04425048828125,
-0.03533935546875,
0.016998291015625,
-0.037750244140625,
0.01123046875,
-0.032958984375,
0.017303466796875,
-0.0210418701171875,
-0.00836181640625,
-0.0213470458984375,
-0.01381683349609375,
0.0126190185546875,
-0.00521087646484375,
0.014617919921875,
0.04327392578125,
0.0167999267578125,
-0.0211029052734375,
0.01393890380859375,
-0.0132598876953125,
-0.0010652542114257812,
0.01335906982421875,
0.0289459228515625,
-0.027923583984375,
-0.0143890380859375,
0.0271148681640625,
0.009033203125,
-0.003925323486328125,
0.029205322265625,
-0.017181396484375,
-0.03314208984375,
0.0267486572265625,
0.01219940185546875,
0.01387786865234375,
-0.0321044921875,
0.025543212890625,
0.002899169921875,
-0.03955078125,
-0.083984375,
-0.01824951171875,
0.0135498046875,
0.03131103515625,
-0.03668212890625,
0.010009765625,
0.0043182373046875,
-0.023773193359375,
-0.0207977294921875,
-0.0264892578125,
0.0241546630859375,
-0.006317138671875,
0.02618408203125,
0.003047943115234375,
0.01352691650390625,
-0.06610107421875,
-0.0421142578125,
0.05517578125,
0.06060791015625,
-0.0199432373046875,
-0.03271484375,
0.0186309814453125,
0.007663726806640625,
0.0011692047119140625,
0.0333251953125,
0.021484375,
0.01824951171875,
0.044586181640625,
0.005725860595703125,
-0.017547607421875,
0.0277862548828125,
-0.008575439453125,
0.02581787109375,
0.0243377685546875,
0.01354217529296875,
0.0114288330078125,
-0.045257568359375,
0.0002951622009277344,
0.01001739501953125,
0.0958251953125,
0.0460205078125,
0.04754638671875,
-0.0771484375,
-0.052276611328125,
0.01873779296875,
0.01111602783203125,
-0.01953125,
-0.01374053955078125,
0.002346038818359375,
-0.04132080078125,
-0.0011796951293945312,
0.032135009765625,
-0.03826904296875,
0.027740478515625,
0.04449462890625,
0.0330810546875,
-0.0667724609375,
-0.025482177734375,
0.06396484375,
-0.0394287109375,
-0.0192718505859375,
0.01540374755859375,
-0.0199127197265625,
0.02386474609375,
-0.0081024169921875,
-0.00801849365234375,
0.035614013671875,
0.01468658447265625,
-0.0200653076171875,
-0.006397247314453125,
0.01507568359375,
-0.016082763671875,
0.052490234375,
-0.011138916015625,
0.015228271484375,
-0.004039764404296875,
-0.04681396484375,
0.0053863525390625,
-0.04150390625,
-0.0254669189453125,
0.0124664306640625,
0.0195770263671875,
-0.0284881591796875,
0.038299560546875,
0.0204315185546875,
-0.05010986328125,
0.015167236328125,
0.045654296875,
0.01032257080078125,
-0.0080108642578125,
0.010986328125,
-0.0176239013671875,
-0.013641357421875,
0.0021533966064453125,
-0.00421142578125,
0.006916046142578125,
0.0277252197265625,
0.03857421875,
0.005695343017578125,
0.00673675537109375,
0.026092529296875,
0.0308990478515625,
-0.00274658203125,
0.0225982666015625,
-0.0030460357666015625,
-0.0170135498046875,
0.0210113525390625,
-0.01273345947265625,
-0.04180908203125,
0.060791015625,
-0.0164947509765625,
0.00994110107421875,
0.0280609130859375,
-0.0197296142578125,
0.0207977294921875,
0.0305633544921875,
0.02984619140625,
-0.02691650390625,
-0.033660888671875,
-0.0155029296875,
0.0069732666015625,
0.0059051513671875,
0.00640106201171875,
0.01331329345703125,
-0.002101898193359375,
0.005336761474609375,
-0.01580810546875,
-0.00785064697265625,
0.0121917724609375,
-0.024444580078125,
0.0308990478515625,
-0.0240325927734375,
0.012237548828125,
0.01277923583984375,
-0.01363372802734375,
0.029205322265625,
0.000004827976226806641,
0.0171661376953125,
-0.0028743743896484375,
-0.0048065185546875,
0.00295257568359375,
0.0222015380859375,
0.006351470947265625,
-0.0153350830078125,
-0.0008606910705566406,
0.0267333984375,
-0.0278472900390625,
-0.0204620361328125,
0.046051025390625,
-0.033203125,
-0.0186004638671875,
0.0012922286987304688,
0.01067352294921875,
-0.00026679039001464844,
-0.0254974365234375,
-0.068359375,
-0.007568359375,
0.0296630859375,
0.020599365234375,
-0.09246826171875,
0.06243896484375,
-0.0165863037109375,
0.0394287109375,
-0.028411865234375,
0.01312255859375,
-0.0263519287109375,
0.01763916015625,
-0.0014133453369140625,
-0.047515869140625,
-0.023162841796875,
0.070556640625,
0.0003757476806640625,
0.0538330078125,
0.06158447265625,
-0.041015625,
0.015899658203125,
0.039794921875,
0.043365478515625,
0.09478759765625,
0.00982666015625,
0.007568359375,
0.0115966796875,
0.043182373046875,
-0.035491943359375,
-0.08642578125,
-0.007511138916015625,
-0.050079345703125,
0.0269012451171875,
0.004001617431640625,
-0.013885498046875,
-0.019775390625,
-0.049468994140625,
-0.0777587890625,
0.05657958984375,
0.00304412841796875,
-0.0374755859375,
-0.01812744140625,
-0.032867431640625,
0.01220703125,
-0.0154571533203125,
-0.006175994873046875,
-0.043304443359375,
-0.0726318359375,
0.01534271240234375,
-0.0011720657348632812,
0.018280029296875,
0.039703369140625,
-0.0157012939453125,
-0.052764892578125,
-0.0196380615234375,
-0.043060302734375,
-0.002471923828125,
-0.036102294921875,
0.03265380859375,
0.01453399658203125,
0.065673828125,
0.01053619384765625,
0.01226043701171875,
0.006679534912109375,
-0.0311737060546875,
0.0286712646484375,
-0.0245208740234375,
-0.028350830078125,
-0.0310821533203125,
0.041656494140625,
-0.0130767822265625,
0.0152587890625,
0.00844573974609375,
-0.0113372802734375,
-0.046417236328125,
0.0016393661499023438,
0.0059814453125,
0.0117950439453125,
-0.037017822265625,
0.0259246826171875,
0.01465606689453125,
-0.01171112060546875,
0.0200653076171875,
0.007633209228515625,
-0.0276641845703125,
0.0072784423828125,
0.00891876220703125,
-0.01213836669921875,
-0.04815673828125,
-0.015960693359375,
0.053192138671875,
-0.0201568603515625,
0.0184173583984375,
0.0257110595703125,
0.00969696044921875,
0.04681396484375,
0.035736083984375,
0.0037822723388671875,
-0.0007309913635253906,
-0.0263519287109375,
0.01715087890625,
0.009979248046875,
0.05828857421875,
-0.0211029052734375,
-0.032989501953125,
0.003658294677734375,
-0.001575469970703125,
-0.000675201416015625,
-0.0110015869140625,
-0.0142364501953125,
-0.019622802734375,
-0.0274658203125,
0.0283660888671875,
-0.05804443359375,
-0.0193023681640625,
-0.040924072265625,
0.0157928466796875,
0.005420684814453125,
0.022705078125,
0.065673828125,
0.0006880760192871094,
0.002162933349609375,
0.01418304443359375,
-0.00012093782424926758,
-0.0037689208984375,
-0.0060577392578125,
-0.01369476318359375,
-0.00023663043975830078,
-0.004680633544921875
] |
bbe0bde0eb41a7b9a831050580932797f429626d
|
Wordpress Stackexchange
Q: How can I get page slug How can I get the slug of a page or post?
A: Another option is getting the slug by post ID:
$slug = get_post_field( 'post_name', $post_id );
Here is more info about get_post_field https://codex.wordpress.org/Function_Reference/get_post_field
|
Q: How can I get page slug How can I get the slug of a page or post?
A: Another option is getting the slug by post ID:
$slug = get_post_field( 'post_name', $post_id );
Here is more info about get_post_field https://codex.wordpress.org/Function_Reference/get_post_field
A: Inside of your loop you can do:
global $post;
echo $post->post_name;
A: As per other answers slug is stored in post_name property. While it could be accessed directly I prefer the (underused) get_post_field() function for access post properties which have no proper API for them.
It requires post provided explicitly and doesn't default to the current one.
If you want to get slug of the post outside the loop then use:
$post_id = 20; //specify post id here
$post = get_post($post_id);
$slug = $post->post_name;
If you want to get slug of the post from the loop then use:
global $post;
echo $post->post_name;
A: Outside the loop:
<?php
$post_id = 11;
$post = get_post($post_id);
$slug = $post->post_name;
?>
|
wordpress
|
{
"language": "en",
"length": 159,
"provenance": "stackexchange_00019.jsonl.gz:407546",
"question_score": "24",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11426"
}
|
[
0.01369476318359375,
-0.0012369155883789062,
-0.0016450881958007812,
-0.005054473876953125,
0.0006732940673828125,
-0.00788116455078125,
0.0211639404296875,
-0.0223236083984375,
-0.0012712478637695312,
-0.00408935546875,
-0.045257568359375,
0.0149078369140625,
-0.035797119140625,
-0.0222015380859375,
0.00839996337890625,
-0.0396728515625,
0.043670654296875,
-0.0300750732421875,
0.0152435302734375,
-0.010498046875,
0.0210113525390625,
0.01438140869140625,
0.0269622802734375,
0.0557861328125,
0.0557861328125,
-0.04705810546875,
0.006168365478515625,
-0.0232696533203125,
0.018157958984375,
-0.029052734375,
0.0283355712890625,
0.0189208984375,
0.013702392578125,
-0.01557159423828125,
0.033660888671875,
0.00862884521484375,
-0.00981903076171875,
0.002719879150390625,
0.0299224853515625,
-0.0130767822265625,
0.018310546875,
0.0058746337890625,
-0.0036220550537109375,
0.0288848876953125,
-0.0102386474609375,
-0.035064697265625,
-0.01122283935546875,
-0.06292724609375,
0.00806427001953125,
0.01531982421875,
0.016082763671875,
0.01235198974609375,
0.00907135009765625,
0.0204620361328125,
-0.0005135536193847656,
-0.0008726119995117188,
0.03875732421875,
-0.0133514404296875,
0.0438232421875,
-0.0716552734375,
-0.0587158203125,
-0.00699615478515625,
0.044586181640625,
0.0007333755493164062,
-0.00827789306640625,
0.009185791015625,
-0.0206451416015625,
0.012847900390625,
-0.0160064697265625,
-0.004085540771484375,
0.018280029296875,
-0.029876708984375,
0.01425933837890625,
0.0015583038330078125,
-0.0036945343017578125,
-0.050018310546875,
0.00998687744140625,
-0.0276641845703125,
0.0105133056640625,
0.02191162109375,
-0.0030117034912109375,
-0.0218048095703125,
-0.06640625,
0.01995849609375,
-0.01373291015625,
0.0261993408203125,
-0.01032257080078125,
-0.0128326416015625,
-0.0052032470703125,
-0.034271240234375,
-0.0198974609375,
0.00923919677734375,
-0.0177764892578125,
-0.0021381378173828125,
-0.034088134765625,
-0.0284423828125,
0.050567626953125,
0.0296630859375,
0.0017328262329101562,
0.0037841796875,
0.005382537841796875,
-0.049896240234375,
0.024810791015625,
-0.0192108154296875,
0.012481689453125,
0.0199737548828125,
0.00250244140625,
0.029205322265625,
0.027374267578125,
0.0131683349609375,
-0.0185699462890625,
-0.006946563720703125,
-0.002864837646484375,
-0.0312347412109375,
-0.0374755859375,
0.03631591796875,
0.0013980865478515625,
-0.03521728515625,
0.01531982421875,
-0.02532958984375,
0.0194854736328125,
0.0197906494140625,
0.046905517578125,
-0.00930023193359375,
0.0003910064697265625,
0.01021575927734375,
-0.04443359375,
-0.049072265625,
0.0335693359375,
0.014373779296875,
-0.016021728515625,
-0.0114898681640625,
0.02447509765625,
0.0131683349609375,
0.0004277229309082031,
-0.015045166015625,
-0.026092529296875,
-0.03802490234375,
-0.003810882568359375,
0.01383209228515625,
-0.01416015625,
-0.0242767333984375,
0.0318603515625,
-0.01226043701171875,
0.005130767822265625,
-0.0156707763671875,
-0.0011844635009765625,
0.0369873046875,
-0.00557708740234375,
-0.0048065185546875,
-0.002899169921875,
0.0198516845703125,
-0.024169921875,
0.02850341796875,
0.037353515625,
-0.00673675537109375,
0.0125732421875,
-0.0087432861328125,
0.032012939453125,
0.004669189453125,
0.0416259765625,
0.024505615234375,
0.0283203125,
0.0140533447265625,
-0.0139617919921875,
-0.02349853515625,
-0.044464111328125,
-0.01361083984375,
0.0140380859375,
0.0018596649169921875,
0.038421630859375,
-0.003833770751953125,
-0.01371002197265625,
-0.00020039081573486328,
0.0034389495849609375,
-0.007106781005859375,
-0.0032405853271484375,
-0.0001316070556640625,
0.0024929046630859375,
0.04083251953125,
0.009857177734375,
-0.0288543701171875,
-0.0075531005859375,
0.0115966796875,
-0.04974365234375,
0.05633544921875,
0.012603759765625,
0.0572509765625,
0.0008111000061035156,
0.01335906982421875,
0.0134735107421875,
0.028778076171875,
-0.0650634765625,
0.0215301513671875,
-0.00323486328125,
0.0038890838623046875,
0.0030517578125,
0.020050048828125,
-0.0115203857421875,
-0.0232086181640625,
-0.042694091796875,
-0.005100250244140625,
-0.0180816650390625,
0.05108642578125,
0.01104736328125,
-0.0155487060546875,
0.004161834716796875,
0.01282501220703125,
0.0309906005859375,
0.0141754150390625,
-0.007572174072265625,
-0.0167388916015625,
-0.00525665283203125,
-0.01384735107421875,
-0.05181884765625,
0.0238189697265625,
-0.0141448974609375,
-0.058502197265625,
-0.042724609375,
-0.0017690658569335938,
-0.06561279296875,
0.020233154296875,
-0.0877685546875,
0.0008754730224609375,
0.04718017578125,
-0.00447845458984375,
-0.0150909423828125,
-0.0233154296875,
0.0247650146484375,
0.008392333984375,
-0.04974365234375,
0.030364990234375,
0.0187835693359375,
0.0299072265625,
-0.01015472412109375,
0.0038814544677734375,
0.0145263671875,
-0.0155029296875,
0.006740570068359375,
0.0241546630859375,
0.031646728515625,
0.0199737548828125,
-0.0162200927734375,
-0.029052734375,
0.0399169921875,
-0.0362548828125,
0.0039043426513671875,
-0.01418304443359375,
0.0286102294921875,
0.10577392578125,
0.00983428955078125,
0.05682373046875,
-0.00804901123046875,
0.0186309814453125,
-0.0077056884765625,
0.04925537109375,
-0.01198577880859375,
0.01641845703125,
-0.004055023193359375,
0.01561737060546875,
-0.0160369873046875,
-0.01145172119140625,
0.0152740478515625,
-0.0298004150390625,
-0.049285888671875,
0.036651611328125,
-0.005374908447265625,
0.0138092041015625,
-0.023681640625,
0.00559234619140625,
0.019439697265625,
0.01317596435546875,
-0.0031986236572265625,
0.030731201171875,
0.0038890838623046875,
-0.0024261474609375,
-0.004985809326171875,
-0.0134124755859375,
-0.0209197998046875,
0.007518768310546875,
-0.00978851318359375,
0.01953125,
0.057830810546875,
-0.01263427734375,
-0.01035308837890625,
-0.042724609375,
0.04388427734375,
-0.0018157958984375,
-0.00257110595703125,
-0.0038909912109375,
0.006549835205078125,
0.0577392578125,
-0.01154327392578125,
0.0341796875,
0.00838470458984375,
-0.015960693359375,
0.041839599609375,
-0.01873779296875,
0.01409912109375,
-0.011810302734375,
0.029571533203125,
0.046630859375,
-0.00576019287109375,
0.00616455078125,
0.00992584228515625,
-0.04278564453125,
0.00406646728515625,
-0.0032672882080078125,
-0.01404571533203125,
0.008636474609375,
-0.07781982421875,
0.034637451171875,
0.00943756103515625,
0.01128387451171875,
-0.016082763671875,
-0.042205810546875,
-0.02166748046875,
-0.0157470703125,
-0.138671875,
-0.11016845703125,
-0.02056884765625,
-0.077392578125,
-0.037139892578125,
-0.005889892578125,
-0.051300048828125,
0.03472900390625,
0.01277923583984375,
-0.00363922119140625,
0.028076171875,
-0.02655029296875,
-0.08233642578125,
-0.036651611328125,
-0.09552001953125,
0.009552001953125,
-0.020782470703125,
0.0297698974609375,
0.003574371337890625,
0.03228759765625,
-0.00006717443466186523,
-0.0305938720703125,
-0.00576019287109375,
0.049652099609375,
-0.0208587646484375,
-0.03497314453125,
-0.0260162353515625,
-0.0157470703125,
0.024444580078125,
0.01335906982421875,
-0.006771087646484375,
-0.00494384765625,
0.0203094482421875,
-0.0272674560546875,
-0.01520538330078125,
-0.01512908935546875,
0.00952911376953125,
0.044158935546875,
0.0081787109375,
-0.0109405517578125,
0.03759765625,
-0.029541015625,
-0.036651611328125,
-0.045806884765625,
-0.05712890625,
0.028289794921875,
0.0289154052734375,
0.024810791015625,
-0.03546142578125,
0.03936767578125,
0.00659942626953125,
0.00705718994140625,
-0.005252838134765625,
0.005489349365234375,
0.034820556640625,
-0.0093994140625,
0.0159149169921875,
-0.0012407302856445312,
-0.02301025390625,
-0.024383544921875,
0.059234619140625,
0.0004725456237792969,
0.023895263671875,
0.0025310516357421875,
0.00995635986328125,
-0.0255126953125,
-0.05096435546875,
0.057373046875,
-0.0106201171875,
0.003631591796875,
-0.0277252197265625,
-0.0426025390625,
-0.010284423828125,
0.1036376953125,
-0.008331298828125,
-0.021270751953125,
-0.030517578125,
-0.021087646484375,
-0.006443023681640625,
-0.0158233642578125,
-0.029266357421875,
-0.00287628173828125,
-0.044891357421875,
0.003963470458984375,
-0.00664520263671875,
-0.0259552001953125,
-0.020660400390625,
0.042327880859375,
-0.02435302734375,
-0.01055908203125,
0.0355224609375,
-0.04132080078125,
-0.005794525146484375,
0.025909423828125,
-0.0137176513671875,
0.0259246826171875,
-0.04449462890625,
-0.004375457763671875,
-0.0501708984375,
-0.0242919921875,
0.030181884765625,
0.052215576171875,
0.005161285400390625,
-0.04132080078125,
0.003536224365234375,
0.046295166015625,
0.0231781005859375,
0.036468505859375,
0.01312255859375,
-0.00832366943359375,
0.019866943359375,
-0.0007414817810058594,
0.0135955810546875,
-0.0176239013671875,
0.017791748046875,
-0.0297393798828125,
-0.044403076171875,
0.005260467529296875,
-0.038177490234375,
0.033905029296875,
-0.0188446044921875,
-0.0220489501953125,
-0.02178955078125,
0.00959014892578125,
0.0172882080078125,
0.009735107421875,
-0.01910400390625,
0.01934814453125,
-0.0021648406982421875,
-0.004756927490234375,
0.07110595703125,
0.04681396484375,
-0.01303863525390625,
-0.01531219482421875,
0.06280517578125,
0.0034465789794921875,
-0.060089111328125,
-0.07568359375,
-0.001865386962890625,
0.0219573974609375,
0.0268707275390625,
0.056182861328125,
0.028411865234375,
-0.00823211669921875,
0.047149658203125,
0.01401519775390625,
-0.043731689453125,
-0.050323486328125,
0.055084228515625,
-0.00469970703125,
0.0005321502685546875,
-0.01506805419921875,
-0.0672607421875,
0.10791015625,
0.035552978515625,
-0.03497314453125,
0.011444091796875,
-0.0177764892578125,
0.046234130859375,
-0.03753662109375,
0.0474853515625,
-0.04864501953125,
-0.0687255859375,
0.020751953125,
-0.00310516357421875,
0.0078887939453125,
0.0284881591796875,
-0.01004791259765625,
0.0447998046875,
0.01070404052734375,
0.0015954971313476562,
-0.0271759033203125,
0.0176239013671875,
0.0029754638671875,
0.0250396728515625,
-0.00954437255859375,
-0.00279998779296875,
-0.038177490234375,
-0.005817413330078125,
0.045562744140625,
-0.012359619140625,
-0.04461669921875,
-0.005260467529296875,
0.0015516281127929688,
0.0021343231201171875,
0.02154541015625,
0.00605010986328125,
0.015533447265625,
0.041046142578125,
-0.0275726318359375,
-0.00022351741790771484,
0.01158905029296875,
0.031524658203125,
-0.034881591796875,
0.021881103515625,
0.00030875205993652344,
0.0008139610290527344,
0.004192352294921875,
0.09637451171875,
-0.030364990234375,
0.0477294921875,
-0.01517486572265625,
0.02520751953125,
0.00443267822265625,
0.0191650390625,
0.0169830322265625,
-0.0287322998046875,
0.016815185546875,
-0.0199432373046875,
-0.0019245147705078125,
-0.0222625732421875,
-0.00890350341796875,
0.035491943359375,
0.0229034423828125,
-0.02105712890625,
-0.00823974609375,
0.00937652587890625,
0.0019989013671875,
0.01412200927734375,
0.005260467529296875,
-0.01143646240234375,
-0.033172607421875,
-0.00372314453125,
0.01434326171875,
0.01232147216796875,
-0.0186767578125,
-0.0200042724609375,
0.06463623046875,
-0.005657196044921875,
0.035675048828125,
-0.00444793701171875,
-0.0131683349609375,
0.0015859603881835938,
0.0244140625,
0.005306243896484375,
-0.0209503173828125,
-0.031646728515625,
-0.032928466796875,
0.004482269287109375,
0.0025005340576171875,
-0.01497650146484375,
0.058013916015625,
-0.00130462646484375,
0.050994873046875,
-0.035064697265625,
-0.0075531005859375,
0.0135040283203125,
-0.00838470458984375,
0.058502197265625,
0.0186920166015625,
-0.0269927978515625,
0.004436492919921875,
-0.053924560546875,
0.001583099365234375,
0.037078857421875,
-0.020355224609375,
-0.009735107421875,
-0.042144775390625,
-0.00891876220703125,
0.022491455078125,
0.0194244384765625,
0.0278472900390625,
0.00511932373046875,
0.01119232177734375,
-0.004245758056640625,
0.03411865234375,
0.0139923095703125,
0.03607177734375,
-0.021759033203125,
0.02630615234375,
0.00998687744140625,
-0.00716400146484375,
-0.044586181640625,
-0.0096588134765625,
-0.01137542724609375,
-0.00860595703125,
-0.0243682861328125,
0.025634765625,
-0.00846099853515625,
-0.0008950233459472656,
0.03143310546875,
-0.0001665353775024414,
-0.00211334228515625,
-0.01239013671875,
0.009765625,
-0.016876220703125,
0.035858154296875,
-0.037353515625,
-0.036224365234375,
0.021331787109375,
-0.0194244384765625,
-0.016998291015625,
0.007717132568359375,
0.01045989990234375,
0.0101470947265625,
-0.0198211669921875,
0.02056884765625,
-0.00030803680419921875,
-0.0283203125,
0.046142578125,
0.055816650390625,
0.0195465087890625,
0.0263519287109375,
0.00501251220703125,
0.0197601318359375,
-0.0229949951171875,
0.0382080078125,
-0.02569580078125,
-0.04876708984375,
0.05718994140625,
0.0262908935546875,
-0.0213165283203125,
0.039337158203125,
-0.02728271484375,
0.0161590576171875,
0.00569915771484375,
0.06732177734375,
-0.035400390625,
0.0293731689453125,
0.048248291015625,
-0.032745361328125,
-0.020538330078125,
0.02001953125,
-0.00313568115234375,
0.01218414306640625,
0.0340576171875,
-0.07177734375,
-0.0034618377685546875,
0.0092315673828125,
-0.0269317626953125,
-0.018890380859375,
-0.0210723876953125,
0.068115234375,
0.013336181640625,
0.010955810546875,
-0.005157470703125,
-0.01020050048828125,
0.01947021484375,
-0.044403076171875,
-0.0029201507568359375,
0.00543975830078125,
-0.0104217529296875,
-0.027008056640625,
0.037353515625,
-0.032562255859375,
0.0333251953125,
0.0325927734375,
0.0304718017578125,
-0.0002956390380859375,
0.03265380859375,
0.0029659271240234375,
-0.0037822723388671875,
-0.0000807642936706543,
-0.038299560546875,
0.02459716796875,
-0.0167388916015625,
-0.01021575927734375,
0.046722412109375,
-0.0279693603515625,
0.01032257080078125,
-0.00390625,
0.00791168212890625,
-0.04412841796875,
-0.04986572265625,
0.1134033203125,
-0.0205841064453125,
-0.0287628173828125,
0.0034027099609375,
0.046112060546875,
-0.01174163818359375,
-0.005489349365234375,
-0.01274871826171875,
-0.005504608154296875,
0.042144775390625,
-0.0145721435546875,
0.0240478515625,
0.00951385498046875,
-0.01544952392578125,
-0.0972900390625,
0.102783203125,
0.04296875,
0.043914794921875,
-0.01136016845703125,
0.029052734375,
-0.040863037109375,
-0.011627197265625,
-0.06646728515625,
0.0889892578125,
0.0243072509765625,
0.0697021484375,
-0.0758056640625,
-0.0210418701171875,
0.0196075439453125,
0.036590576171875,
0.07421875,
-0.0018014907836914062,
-0.0131072998046875,
0.0009255409240722656,
0.078857421875,
0.060028076171875,
-0.00714874267578125,
0.0230865478515625,
0.02880859375,
0.033782958984375,
0.09344482421875,
-0.053497314453125,
0.0246734619140625,
0.003173828125,
0.04534912109375,
0.03668212890625,
0.018707275390625,
0.0073089599609375,
0.020050048828125,
-0.0323486328125,
-0.043121337890625,
0.0209197998046875,
0.0281219482421875,
-0.0304107666015625,
-0.008697509765625,
0.061676025390625,
0.05224609375,
-0.026458740234375,
-0.03912353515625,
-0.0307159423828125,
0.04608154296875,
0.00920867919921875,
0.00689697265625,
0.0107269287109375,
0.01354217529296875,
0.046112060546875,
0.00031065940856933594,
0.0048065185546875,
0.041046142578125,
-0.0077362060546875,
0.068359375,
0.019378662109375,
0.015380859375,
-0.055084228515625,
0.00830078125,
0.045623779296875,
0.07635498046875,
-0.0667724609375,
-0.005466461181640625,
0.01715087890625,
0.01513671875,
-0.004657745361328125,
-0.02435302734375,
-0.01378631591796875,
-0.00785064697265625,
0.022491455078125,
-0.042327880859375,
-0.007354736328125,
0.023834228515625,
0.041168212890625,
-0.01351165771484375,
-0.03289794921875,
-0.04443359375,
-0.01491546630859375,
-0.0548095703125,
0.00656890869140625,
0.0265045166015625,
0.06353759765625,
0.023345947265625,
0.059539794921875,
-0.01103973388671875,
-0.02166748046875,
0.01305389404296875,
0.00911712646484375,
0.033355712890625,
-0.021209716796875,
-0.01146697998046875,
-0.00629425048828125,
-0.0011777877807617188,
0.033660888671875,
0.039947509765625,
-0.007289886474609375,
0.03363037109375,
0.00815582275390625,
-0.030487060546875,
-0.010223388671875,
0.0015354156494140625,
-0.0274200439453125,
0.06817626953125,
-0.045623779296875,
0.0240936279296875,
-0.0149078369140625,
-0.028900146484375,
-0.0286407470703125,
-0.0286865234375,
0.04266357421875,
0.012481689453125,
0.040740966796875,
0.01485443115234375,
0.03118896484375,
0.05084228515625,
0.02203369140625,
-0.010986328125,
0.03656005859375,
-0.0777587890625,
-0.0021724700927734375,
-0.0107421875,
-0.0648193359375,
0.029937744140625,
0.045013427734375,
-0.01384735107421875,
-0.0010557174682617188,
-0.0096588134765625,
-0.0029430389404296875,
0.010467529296875,
-0.0001270771026611328,
0.0028591156005859375,
0.048004150390625,
0.0283050537109375,
0.016632080078125,
-0.035400390625,
-0.0283050537109375,
-0.0152435302734375,
0.0152435302734375,
0.0004906654357910156,
0.0238189697265625,
0.00992584228515625,
0.01519775390625,
-0.020721435546875,
0.00799560546875,
-0.00939178466796875,
-0.030242919921875,
0.026702880859375,
0.01091766357421875,
-0.00376129150390625,
-0.015716552734375,
-0.032318115234375,
0.0283050537109375,
0.01702880859375,
-0.0092010498046875,
-0.0026950836181640625,
-0.001354217529296875,
0.01215362548828125,
-0.00444793701171875,
-0.0032367706298828125,
-0.0182037353515625,
-0.02313232421875,
-0.00908660888671875,
-0.006275177001953125,
0.0166015625,
0.0223541259765625,
-0.00420379638671875,
0.00902557373046875,
-0.0194549560546875,
-0.035430908203125,
0.00811767578125,
-0.01157379150390625,
-0.0019664764404296875,
0.022705078125,
-0.0094146728515625,
-0.005229949951171875,
0.0193634033203125,
-0.0113525390625,
0.0292816162109375,
0.006587982177734375,
0.02972412109375,
0.01358795166015625,
0.0124664306640625,
-0.0009160041809082031,
-0.06658935546875,
0.01270294189453125,
-0.006237030029296875,
-0.01406097412109375,
-0.044342041015625,
0.033416748046875,
-0.0248565673828125,
-0.0731201171875,
-0.024688720703125,
-0.0670166015625,
-0.00853729248046875,
0.02593994140625,
-0.039276123046875,
-0.00662994384765625,
-0.006229400634765625,
-0.01531219482421875,
-0.0004296302795410156,
-0.03375244140625,
0.02630615234375,
-0.0355224609375,
-0.02691650390625,
0.0234375,
-0.035491943359375,
0.0213165283203125,
0.01085662841796875,
0.0265350341796875,
-0.050445556640625,
0.02862548828125,
-0.006893157958984375,
-0.03302001953125,
0.0227508544921875,
0.037811279296875,
0.0621337890625,
-0.051422119140625,
-0.0270843505859375,
0.04718017578125,
0.04534912109375,
0.0858154296875,
-0.00824737548828125,
-0.027313232421875,
0.0462646484375,
-0.01172637939453125,
-0.0167083740234375,
-0.056396484375,
-0.0001615285873413086,
-0.05889892578125,
0.031524658203125,
-0.0009279251098632812,
0.0030803680419921875,
0.0288543701171875,
-0.0273590087890625,
-0.047393798828125,
0.06549072265625,
-0.0235748291015625,
-0.02197265625,
-0.0489501953125,
0.00701141357421875,
0.041290283203125,
-0.03704833984375,
-0.0227203369140625,
-0.018768310546875,
-0.070556640625,
-0.00775909423828125,
0.0149383544921875,
0.015899658203125,
0.0117645263671875,
0.02679443359375,
-0.0347900390625,
0.04608154296875,
-0.003376007080078125,
0.0005931854248046875,
0.0263214111328125,
-0.0123443603515625,
-0.0113067626953125,
0.0278778076171875,
-0.06982421875,
-0.062286376953125,
-0.047088623046875,
0.0097198486328125,
-0.010101318359375,
-0.017181396484375,
-0.0163421630859375,
0.0055694580078125,
0.05279541015625,
0.05572509765625,
0.0183563232421875,
-0.041900634765625,
-0.0271453857421875,
-0.042205810546875,
-0.08990478515625,
-0.01284027099609375,
0.063720703125,
-0.0965576171875,
0.0159149169921875,
0.0217132568359375,
0.017333984375,
-0.0147857666015625,
-0.029205322265625,
-0.008331298828125,
-0.0219573974609375,
-0.01416015625,
-0.006740570068359375,
-0.0025005340576171875,
-0.01526641845703125,
0.06463623046875,
-0.0300445556640625,
0.0240325927734375,
-0.02081298828125,
0.0362548828125,
0.046783447265625,
-0.025787353515625,
-0.0155792236328125,
-0.0025463104248046875,
0.005413055419921875,
0.0029735565185546875,
0.013671875,
0.045501708984375,
0.004489898681640625,
-0.005062103271484375,
-0.01380157470703125,
0.043975830078125,
0.011505126953125,
0.041534423828125,
-0.0239715576171875,
0.038421630859375,
0.0203094482421875,
0.035858154296875,
-0.0092010498046875,
0.0572509765625,
0.033782958984375,
0.034027099609375,
-0.0218963623046875,
-0.0199127197265625,
0.024017333984375,
-0.06500244140625,
-0.005161285400390625,
-0.00031876564025878906,
-0.020904541015625,
-0.0254669189453125,
0.01500701904296875,
-0.00923919677734375,
-0.007045745849609375,
0.007083892822265625
] |
ec0346ff67e5f99bb5a202ae97130cef83e9336c
|
Wordpress Stackexchange
Q: How to 301 private posts rather than 404? How do I 301 redirect private pages, rather than 404 them? If a post is private, WordPress filters it out in the SQL query, so there are no $post variables to work with.
I'd like for this code to work, but doesn't:
add_action('wp','redirect_stuffs', 0);
function redirect_stuffs(){
global $post;
if ( $post->post_status == "private" && !is_admin() ):
wp_redirect("http://dangayle.com/",301);
exit();
endif;
}
I don't know where that is set earlier than wp, other than the fact that I know it's a user role issue. If I could set a non-logged in user to have that capability, it would probably fix the issue:
$publicReader -> add_cap('read_private_posts');
The problem with add_cap is that only logged-in users have capabilities.
A: Sorry guys, I found my answer:
add_action('wp','redirect_stuffs', 0);
function redirect_stuffs(){
global $wpdb;
if ($wpdb->last_result[0]->post_status == "private" && !is_admin() ):
wp_redirect( home_url(), 301 );
exit();
endif;
}
Posts/Pages are removed from the sitemaps, but the page still shows up on the site so that it can get 301'd.
|
Q: How to 301 private posts rather than 404? How do I 301 redirect private pages, rather than 404 them? If a post is private, WordPress filters it out in the SQL query, so there are no $post variables to work with.
I'd like for this code to work, but doesn't:
add_action('wp','redirect_stuffs', 0);
function redirect_stuffs(){
global $post;
if ( $post->post_status == "private" && !is_admin() ):
wp_redirect("http://dangayle.com/",301);
exit();
endif;
}
I don't know where that is set earlier than wp, other than the fact that I know it's a user role issue. If I could set a non-logged in user to have that capability, it would probably fix the issue:
$publicReader -> add_cap('read_private_posts');
The problem with add_cap is that only logged-in users have capabilities.
A: Sorry guys, I found my answer:
add_action('wp','redirect_stuffs', 0);
function redirect_stuffs(){
global $wpdb;
if ($wpdb->last_result[0]->post_status == "private" && !is_admin() ):
wp_redirect( home_url(), 301 );
exit();
endif;
}
Posts/Pages are removed from the sitemaps, but the page still shows up on the site so that it can get 301'd.
A: It seems to me that you shouldn't return either 404 or 301 - you should return either 401 (Unauthorized / authentication required, though you won't accept any authentication offered) or 403 (Rejected, aka I know what you're asking for and you can't have it).
There's an abandoned plugin Private Page Forbidden that might be worth looking at for guidance, though at a casual glance it seems to want to convert 404 into 403 which seems like a bad idea. Unfortunately while there's been a variety of discussion of options (see https://core.trac.wordpress.org/ticket/10551 and related) the milestone for fixes has gradually moved to "Future Release."
A: Firstly, I would have to agree with @fencepost's answer. However, I couldn't resist posting a solution, so here we are!
function __intercept_private_page( $posts, &$wp_query )
{
// remove filter now, so that on subsequent post querying we don't get involved!
remove_filter( 'the_posts', '__intercept_private_page', 5, 2 );
if ( !( $wp_query->is_page && empty($posts) ) )
return $posts; // bail, not page with no results
// if you want to explicitly check it *is* private, use the code block below:
/*
if ( !empty( $wp_query->query['page_id'] ) )
$page = get_page( $wp_query->query['page_id'] );
else
$page = get_page_by_path( $wp_query->query['pagename'] );
if ( $page && $page->post_status == 'private' ) {
// redirect
}
*/
// otherwise assume that if the request was for a page, and no page was found, it was private
wp_redirect( home_url(), 301 );
exit;
}
is_admin() || add_filter( 'the_posts', '__intercept_private_page', 5, 2 );
Update: Revised code to use the_posts filter instead of posts_results (which fires before WordPress checks permissions, and so $posts hasn't been 'emptied' yet).
|
wordpress
|
{
"language": "en",
"length": 441,
"provenance": "stackexchange_00019.jsonl.gz:407547",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11427"
}
|
[
0.0662841796875,
0.0212249755859375,
0.005069732666015625,
-0.003932952880859375,
0.03240966796875,
-0.051116943359375,
0.045074462890625,
-0.06927490234375,
0.01325225830078125,
0.0290679931640625,
0.00926971435546875,
-0.0237274169921875,
-0.037994384765625,
-0.0299835205078125,
-0.0369873046875,
-0.031005859375,
0.0236663818359375,
-0.01800537109375,
0.029541015625,
-0.0120849609375,
-0.004657745361328125,
0.01580810546875,
0.05535888671875,
0.006500244140625,
-0.00711822509765625,
-0.03515625,
0.07861328125,
-0.055023193359375,
-0.0030364990234375,
-0.050689697265625,
-0.00749969482421875,
0.028656005859375,
0.01108551025390625,
0.0196380615234375,
0.00693511962890625,
0.00485992431640625,
-0.0097198486328125,
0.029571533203125,
0.024932861328125,
-0.0214996337890625,
0.01552581787109375,
0.00826263427734375,
-0.0128326416015625,
0.05987548828125,
-0.041259765625,
-0.057464599609375,
0.0269775390625,
0.0012197494506835938,
0.01087188720703125,
-0.005649566650390625,
0.0243377685546875,
0.00022792816162109375,
0.023590087890625,
-0.0286865234375,
-0.014495849609375,
0.01078033447265625,
0.0272979736328125,
-0.021453857421875,
0.034820556640625,
-0.01220703125,
-0.03765869140625,
-0.00835418701171875,
0.01384735107421875,
-0.0260162353515625,
0.002033233642578125,
-0.0023784637451171875,
-0.0068359375,
0.0113677978515625,
-0.07843017578125,
-0.003681182861328125,
0.0357666015625,
-0.046295166015625,
-0.004901885986328125,
-0.00450897216796875,
-0.0279998779296875,
-0.01500701904296875,
0.01297760009765625,
-0.0222320556640625,
0.01824951171875,
0.013458251953125,
0.0211181640625,
-0.0057830810546875,
-0.0005602836608886719,
-0.01641845703125,
0.0233306884765625,
0.0263671875,
-0.01519775390625,
-0.032470703125,
-0.0242462158203125,
-0.0234222412109375,
-0.016357421875,
-0.013946533203125,
-0.03515625,
0.0142974853515625,
-0.016571044921875,
-0.0267333984375,
0.034942626953125,
0.039337158203125,
0.006580352783203125,
-0.0142974853515625,
0.00536346435546875,
-0.036834716796875,
-0.0231781005859375,
-0.0191497802734375,
0.0207366943359375,
0.034942626953125,
-0.01290130615234375,
-0.00940704345703125,
0.0300445556640625,
0.031219482421875,
0.0034961700439453125,
0.00696563720703125,
-0.0118560791015625,
-0.0265655517578125,
-0.0194244384765625,
0.052581787109375,
-0.013824462890625,
-0.0218658447265625,
-0.00872802734375,
0.00955963134765625,
-0.025604248046875,
0.0007090568542480469,
0.0306396484375,
-0.006961822509765625,
-0.01036834716796875,
-0.01383209228515625,
-0.00354766845703125,
-0.034820556640625,
0.0494384765625,
0.046142578125,
-0.016937255859375,
-0.0037479400634765625,
0.016693115234375,
-0.03155517578125,
-0.029541015625,
-0.0172882080078125,
0.02154541015625,
-0.045013427734375,
-0.0292510986328125,
0.040985107421875,
-0.0041656494140625,
-0.050201416015625,
-0.015869140625,
-0.01345062255859375,
0.0114288330078125,
0.0235443115234375,
0.031219482421875,
0.004146575927734375,
-0.031890869140625,
-0.0614013671875,
0.0048065185546875,
0.0172882080078125,
0.0243682861328125,
0.008087158203125,
-0.0189208984375,
-0.01273345947265625,
-0.0008387565612792969,
-0.0111083984375,
-0.01146697998046875,
-0.016082763671875,
0.079345703125,
-0.00008434057235717773,
-0.004055023193359375,
0.0205078125,
-0.04876708984375,
-0.00830078125,
-0.06787109375,
-0.041748046875,
0.0167236328125,
0.0204925537109375,
0.020050048828125,
-0.048675537109375,
0.01050567626953125,
0.0006256103515625,
-0.0172882080078125,
0.02142333984375,
0.0191192626953125,
0.0389404296875,
0.019622802734375,
0.03271484375,
0.0137786865234375,
-0.019012451171875,
0.06805419921875,
-0.01251220703125,
-0.049530029296875,
0.037384033203125,
0.005794525146484375,
0.046417236328125,
-0.01097869873046875,
0.0020313262939453125,
0.04193115234375,
0.043701171875,
-0.03350830078125,
0.0279541015625,
-0.032867431640625,
-0.056976318359375,
0.005504608154296875,
-0.0146484375,
-0.02386474609375,
0.048370361328125,
0.007411956787109375,
0.0826416015625,
-0.072265625,
0.0296478271484375,
-0.0291290283203125,
-0.00817108154296875,
0.01312255859375,
0.018341064453125,
0.00849151611328125,
0.0170440673828125,
-0.0078125,
-0.038421630859375,
-0.00786590576171875,
0.005695343017578125,
-0.0229949951171875,
-0.0150299072265625,
-0.045257568359375,
0.054901123046875,
0.0119171142578125,
0.0623779296875,
0.01242828369140625,
-0.03692626953125,
0.0164642333984375,
-0.04443359375,
0.06689453125,
-0.01885986328125,
0.0093536376953125,
-0.028472900390625,
0.0467529296875,
-0.00484466552734375,
-0.043609619140625,
0.041748046875,
0.044158935546875,
0.0161895751953125,
-0.046142578125,
-0.01448822021484375,
-0.034820556640625,
-0.06829833984375,
0.0081634521484375,
0.06927490234375,
0.030426025390625,
0.00408935546875,
-0.04241943359375,
-0.051239013671875,
-0.0159912109375,
-0.054107666015625,
0.02294921875,
-0.031646728515625,
0.004199981689453125,
0.02886962890625,
-0.0165557861328125,
-0.0018796920776367188,
0.0286865234375,
-0.050811767578125,
-0.0008816719055175781,
0.043365478515625,
-0.0130157470703125,
-0.0238037109375,
-0.025787353515625,
0.01323699951171875,
0.018768310546875,
-0.015289306640625,
-0.0214996337890625,
0.00952911376953125,
0.033599853515625,
-0.035003662109375,
0.0238037109375,
-0.003314971923828125,
-0.0082244873046875,
-0.032257080078125,
0.00670623779296875,
-0.035552978515625,
0.0024242401123046875,
0.063232421875,
0.0243988037109375,
-0.042999267578125,
-0.035919189453125,
-0.0050048828125,
0.024688720703125,
0.01019287109375,
-0.0280609130859375,
0.0222015380859375,
-0.052093505859375,
-0.018798828125,
-0.0261993408203125,
-0.038055419921875,
-0.003215789794921875,
-0.006710052490234375,
0.0218353271484375,
-0.017913818359375,
0.0035495758056640625,
0.003910064697265625,
-0.025482177734375,
0.0535888671875,
0.0018701553344726562,
-0.0577392578125,
0.00043511390686035156,
-0.09033203125,
0.04595947265625,
-0.073486328125,
0.08123779296875,
0.06341552734375,
-0.016082763671875,
0.01422882080078125,
0.0024700164794921875,
0.004367828369140625,
0.0104827880859375,
0.0150604248046875,
-0.01100921630859375,
-0.04351806640625,
-0.0162353515625,
0.015350341796875,
0.0242462158203125,
0.0296173095703125,
-0.004154205322265625,
-0.03485107421875,
0.007617950439453125,
0.01346588134765625,
-0.06048583984375,
-0.0650634765625,
-0.0285186767578125,
-0.0684814453125,
-0.0167694091796875,
0.005962371826171875,
-0.0290374755859375,
0.0223846435546875,
0.0218048095703125,
0.01702880859375,
-0.00647735595703125,
-0.0133514404296875,
-0.05926513671875,
-0.0196380615234375,
-0.05865478515625,
0.05029296875,
-0.0063018798828125,
0.02288818359375,
0.01380157470703125,
0.0259857177734375,
0.0120849609375,
-0.060791015625,
0.007381439208984375,
0.0177001953125,
-0.0275115966796875,
0.01904296875,
-0.0254364013671875,
0.00339508056640625,
0.0082244873046875,
0.01454925537109375,
0.038970947265625,
-0.00698089599609375,
0.0036373138427734375,
-0.01309967041015625,
-0.0289459228515625,
-0.01175689697265625,
0.0172576904296875,
-0.045684814453125,
0.0018711090087890625,
0.00008732080459594727,
0.0005631446838378906,
-0.029022216796875,
-0.0156097412109375,
-0.03277587890625,
-0.045867919921875,
-0.01305389404296875,
0.032470703125,
0.003719329833984375,
-0.0257568359375,
-0.01393890380859375,
0.038482666015625,
0.04290771484375,
-0.01047515869140625,
-0.005756378173828125,
0.0228271484375,
0.005157470703125,
0.0248565673828125,
-0.0198516845703125,
-0.0031871795654296875,
-0.031829833984375,
0.03460693359375,
-0.007740020751953125,
-0.0068206787109375,
-0.013824462890625,
-0.0027637481689453125,
-0.05828857421875,
-0.032623291015625,
0.0171356201171875,
-0.050689697265625,
0.03466796875,
-0.031829833984375,
-0.0032672882080078125,
-0.01071929931640625,
0.0770263671875,
-0.021759033203125,
-0.0024814605712890625,
-0.01192474365234375,
0.0046234130859375,
-0.002246856689453125,
-0.0487060546875,
-0.039886474609375,
-0.004428863525390625,
-0.0406494140625,
0.0020465850830078125,
0.0033969879150390625,
-0.0384521484375,
-0.0272064208984375,
-0.022216796875,
-0.061279296875,
-0.0254669189453125,
0.0217437744140625,
0.00731658935546875,
0.0245208740234375,
0.035919189453125,
0.011322021484375,
0.01904296875,
-0.0085601806640625,
-0.019622802734375,
-0.057861328125,
-0.03643798828125,
0.024139404296875,
0.07562255859375,
0.0217437744140625,
-0.0247650146484375,
0.0096588134765625,
0.06964111328125,
0.01224517822265625,
-0.01030731201171875,
-0.0214996337890625,
-0.041412353515625,
0.0017118453979492188,
0.024627685546875,
-0.03155517578125,
0.0181427001953125,
0.0192108154296875,
0.0005402565002441406,
-0.05084228515625,
-0.0455322265625,
-0.04248046875,
-0.04888916015625,
0.03131103515625,
-0.05181884765625,
-0.0772705078125,
-0.03326416015625,
0.011474609375,
0.008270263671875,
-0.0195465087890625,
0.0006871223449707031,
-0.0295257568359375,
-0.077880859375,
0.0195465087890625,
-0.01226806640625,
-0.0235137939453125,
-0.00791168212890625,
0.0293121337890625,
0.021026611328125,
-0.0212860107421875,
0.052642822265625,
0.0162353515625,
0.0244293212890625,
-0.01029205322265625,
0.05279541015625,
0.0300140380859375,
0.0007796287536621094,
0.047393798828125,
-0.00789642333984375,
-0.02191162109375,
-0.0078582763671875,
0.05450439453125,
0.0228729248046875,
-0.029754638671875,
0.016845703125,
-0.008544921875,
0.004425048828125,
0.068359375,
-0.00820159912109375,
-0.019134521484375,
-0.04180908203125,
0.0301513671875,
-0.016815185546875,
0.0219268798828125,
-0.033111572265625,
-0.0012388229370117188,
-0.0028972625732421875,
0.00855255126953125,
0.047882080078125,
0.04437255859375,
-0.007190704345703125,
0.017608642578125,
0.0501708984375,
-0.0011110305786132812,
-0.006664276123046875,
0.007427215576171875,
-0.033843994140625,
0.033355712890625,
-0.01387786865234375,
-0.036285400390625,
0.026641845703125,
-0.01280975341796875,
0.01308441162109375,
0.007480621337890625,
-0.04327392578125,
-0.007717132568359375,
-0.024261474609375,
0.0118560791015625,
0.01006317138671875,
-0.0291748046875,
0.0396728515625,
0.019683837890625,
-0.025848388671875,
0.006137847900390625,
-0.03204345703125,
-0.01654052734375,
-0.043731689453125,
0.039215087890625,
-0.013641357421875,
0.025115966796875,
0.013946533203125,
0.06317138671875,
0.04278564453125,
0.032745361328125,
-0.04010009765625,
0.0160980224609375,
0.01454925537109375,
0.01502227783203125,
0.0109710693359375,
0.0062103271484375,
0.005321502685546875,
0.00797271728515625,
0.0273895263671875,
-0.02764892578125,
-0.057159423828125,
0.0240325927734375,
0.035614013671875,
-0.00833892822265625,
0.0227203369140625,
0.0129852294921875,
0.0279388427734375,
-0.0289154052734375,
0.05511474609375,
0.029449462890625,
-0.06365966796875,
-0.0369873046875,
0.00803375244140625,
0.03948974609375,
0.006519317626953125,
-0.0114288330078125,
0.01800537109375,
-0.031463623046875,
0.012054443359375,
0.015045166015625,
-0.0285797119140625,
0.00506591796875,
0.01372528076171875,
-0.002109527587890625,
-0.04425048828125,
-0.02215576171875,
0.000244140625,
0.036834716796875,
-0.023468017578125,
-0.016632080078125,
0.020477294921875,
-0.00489044189453125,
0.0197296142578125,
0.006458282470703125,
-0.0276336669921875,
0.031463623046875,
0.00461578369140625,
0.055023193359375,
0.006229400634765625,
-0.007671356201171875,
-0.029449462890625,
-0.0325927734375,
-0.0263824462890625,
0.0499267578125,
0.006870269775390625,
0.00824737548828125,
-0.01453399658203125,
0.0570068359375,
0.036895751953125,
0.035064697265625,
-0.05853271484375,
-0.0261688232421875,
-0.02508544921875,
0.035064697265625,
0.00787353515625,
-0.01947021484375,
0.0858154296875,
-0.038238525390625,
0.05694580078125,
-0.006534576416015625,
0.046661376953125,
-0.0017461776733398438,
-0.01367950439453125,
0.0159149169921875,
-0.0662841796875,
-0.0266265869140625,
-0.01248931884765625,
-0.0111846923828125,
0.027862548828125,
0.0173187255859375,
-0.00008791685104370117,
0.0060577392578125,
0.02655029296875,
0.007686614990234375,
-0.0198822021484375,
-0.0258026123046875,
0.017791748046875,
0.00923919677734375,
0.0029506683349609375,
0.033294677734375,
0.01226806640625,
-0.033172607421875,
-0.032379150390625,
-0.00843048095703125,
0.034027099609375,
0.0108642578125,
-0.040435791015625,
-0.055419921875,
0.044219970703125,
0.0709228515625,
0.0090179443359375,
0.061981201171875,
0.004241943359375,
0.032470703125,
0.08685302734375,
-0.0191192626953125,
0.029510498046875,
0.013824462890625,
0.045074462890625,
-0.02032470703125,
-0.006343841552734375,
0.03106689453125,
-0.032867431640625,
0.0452880859375,
0.0762939453125,
0.0712890625,
-0.107421875,
0.00966644287109375,
0.017364501953125,
-0.020355224609375,
0.04644775390625,
0.002513885498046875,
-0.01480865478515625,
0.0010128021240234375,
-0.0029506683349609375,
-0.001636505126953125,
-0.0303955078125,
-0.0157012939453125,
0.0284881591796875,
0.0011138916015625,
-0.0206146240234375,
0.02618408203125,
0.006557464599609375,
-0.0791015625,
0.0318603515625,
0.0362548828125,
0.019866943359375,
-0.012603759765625,
-0.00445556640625,
-0.009368896484375,
-0.0175628662109375,
-0.047943115234375,
-0.00862884521484375,
-0.0280914306640625,
0.01065826416015625,
0.058807373046875,
-0.0035037994384765625,
0.00965118408203125,
0.0338134765625,
0.0096435546875,
-0.0035114288330078125,
0.0169525146484375,
-0.0665283203125,
0.0295257568359375,
-0.021240234375,
-0.002155303955078125,
-0.037994384765625,
-0.01861572265625,
-0.0015850067138671875,
-0.01438140869140625,
-0.03704833984375,
-0.0189666748046875,
-0.0281524658203125,
0.051788330078125,
-0.042755126953125,
-0.0185699462890625,
-0.00261688232421875,
0.061248779296875,
0.0261077880859375,
0.0037441253662109375,
0.050537109375,
-0.037109375,
0.0003559589385986328,
0.01165008544921875,
-0.02362060546875,
-0.029296875,
-0.0239410400390625,
-0.046173095703125,
0.085205078125,
0.0185089111328125,
0.02978515625,
0.012298583984375,
0.023773193359375,
-0.0311431884765625,
0.0163421630859375,
-0.03125,
0.0758056640625,
0.0174713134765625,
0.040252685546875,
-0.0271148681640625,
0.0019779205322265625,
0.0272674560546875,
0.01360321044921875,
0.07537841796875,
0.0282440185546875,
-0.059967041015625,
-0.0067596435546875,
0.046356201171875,
0.0226287841796875,
-0.0108184814453125,
0.055450439453125,
-0.013519287109375,
-0.005390167236328125,
0.01337432861328125,
-0.061370849609375,
0.0286865234375,
-0.05609130859375,
0.001979827880859375,
-0.0018787384033203125,
-0.0023021697998046875,
-0.0263824462890625,
-0.01275634765625,
-0.0005922317504882812,
-0.07244873046875,
0.0066375732421875,
0.02899169921875,
0.01125335693359375,
-0.005123138427734375,
0.044677734375,
0.0171356201171875,
-0.042877197265625,
-0.031463623046875,
-0.039703369140625,
0.023956298828125,
-0.00792694091796875,
0.037139892578125,
0.01151275634765625,
0.0230560302734375,
0.021484375,
-0.029296875,
-0.0010852813720703125,
0.004974365234375,
-0.026611328125,
0.08233642578125,
0.0784912109375,
0.041259765625,
0.01337432861328125,
0.041595458984375,
0.046783447265625,
0.094482421875,
-0.065673828125,
0.000286102294921875,
-0.003696441650390625,
-0.0006766319274902344,
0.01277923583984375,
-0.044219970703125,
0.0279083251953125,
-0.0075225830078125,
-0.0084228515625,
-0.032745361328125,
0.015869140625,
0.046051025390625,
0.025726318359375,
-0.004215240478515625,
-0.0237884521484375,
-0.048187255859375,
0.0170440673828125,
-0.013702392578125,
-0.043701171875,
0.060455322265625,
0.05816650390625,
0.0149993896484375,
0.0207977294921875,
-0.004207611083984375,
-0.019500732421875,
-0.0279083251953125,
0.0091400146484375,
0.021392822265625,
0.025543212890625,
-0.08599853515625,
-0.03961181640625,
0.04388427734375,
0.07666015625,
0.01464080810546875,
-0.001453399658203125,
0.000812530517578125,
0.0128021240234375,
-0.00865936279296875,
-0.0008349418640136719,
0.0265960693359375,
-0.0201568603515625,
0.0279083251953125,
-0.042633056640625,
0.019317626953125,
-0.030548095703125,
-0.0168304443359375,
-0.023406982421875,
0.01739501953125,
0.0017004013061523438,
0.0132904052734375,
0.02630615234375,
-0.00020754337310791016,
-0.01148223876953125,
0.0297088623046875,
-0.00550079345703125,
0.05023193359375,
0.018402099609375,
-0.0399169921875,
-0.01287078857421875,
0.0188446044921875,
-0.0154876708984375,
-0.0126190185546875,
0.0172576904296875,
-0.01446533203125,
0.02532958984375,
0.021514892578125,
-0.020263671875,
0.0224151611328125,
-0.00475311279296875,
0.0130615234375,
0.00017654895782470703,
0.01340484619140625,
0.0028858184814453125,
-0.0272216796875,
-0.006267547607421875,
-0.0257720947265625,
0.043243408203125,
0.001468658447265625,
0.042205810546875,
-0.0189208984375,
0.032012939453125,
-0.0625,
0.034881591796875,
-0.06597900390625,
-0.046722412109375,
0.0251007080078125,
0.0165252685546875,
-0.00966644287109375,
0.00824737548828125,
-0.055389404296875,
-0.006778717041015625,
0.00997161865234375,
-0.028076171875,
0.0062408447265625,
-0.0227203369140625,
0.0141754150390625,
-0.017608642578125,
-0.0181732177734375,
-0.04150390625,
-0.02996826171875,
-0.032012939453125,
-0.01045989990234375,
0.0302734375,
-0.00018453598022460938,
-0.0194091796875,
0.06085205078125,
-0.0033702850341796875,
-0.014007568359375,
0.0128936767578125,
-0.062103271484375,
0.0217742919921875,
0.038116455078125,
-0.027618408203125,
0.006465911865234375,
0.0065765380859375,
-0.0085296630859375,
0.0213470458984375,
0.0202484130859375,
-0.007518768310546875,
0.0181121826171875,
-0.00033211708068847656,
-0.030517578125,
-0.039581298828125,
0.01464080810546875,
-0.006687164306640625,
-0.00116729736328125,
-0.052337646484375,
0.004917144775390625,
-0.01079559326171875,
-0.0171356201171875,
-0.024688720703125,
-0.0144500732421875,
-0.0230255126953125,
-0.00330352783203125,
-0.0028438568115234375,
-0.07568359375,
-0.0286712646484375,
0.031341552734375,
-0.00669097900390625,
0.004352569580078125,
-0.0430908203125,
0.0465087890625,
-0.0213165283203125,
0.0157318115234375,
-0.027008056640625,
0.04693603515625,
-0.007564544677734375,
0.01010894775390625,
-0.07342529296875,
0.0289306640625,
-0.035125732421875,
-0.026763916015625,
-0.01788330078125,
0.00530242919921875,
0.054534912109375,
-0.0106353759765625,
-0.0238037109375,
-0.0213470458984375,
-0.0266571044921875,
0.0183563232421875,
-0.0287017822265625,
-0.0182037353515625,
0.002689361572265625,
0.01357269287109375,
0.0004825592041015625,
-0.057342529296875,
-0.006587982177734375,
-0.029541015625,
-0.00862884521484375,
-0.0062255859375,
-0.0214691162109375,
-0.017059326171875,
-0.040771484375,
-0.04345703125,
0.07012939453125,
-0.004405975341796875,
-0.01523590087890625,
-0.034149169921875,
0.034454345703125,
-0.00583648681640625,
-0.004589080810546875,
0.006862640380859375,
-0.04248046875,
-0.0202178955078125,
-0.01045989990234375,
0.0029926300048828125,
0.0535888671875,
-0.0243377685546875,
0.0276641845703125,
-0.01035308837890625,
0.040863037109375,
0.0289306640625,
-0.00495147705078125,
-0.015869140625,
-0.0042724609375,
0.032196044921875,
0.060455322265625,
-0.00659942626953125,
0.0103912353515625,
0.0199737548828125,
-0.01137542724609375,
0.014312744140625,
-0.0452880859375,
-0.022186279296875,
-0.033416748046875,
0.03216552734375,
-0.025238037109375,
0.007640838623046875,
0.0139617919921875,
-0.0546875,
-0.050262451171875,
-0.00858306884765625,
-0.0374755859375,
0.0112152099609375,
-0.0634765625,
0.01024627685546875,
-0.0160980224609375,
-0.008697509765625,
0.0005984306335449219,
0.00582122802734375,
-0.005344390869140625,
-0.0029888153076171875,
0.0364990234375,
-0.0190277099609375,
0.0007386207580566406,
-0.0276947021484375,
0.041229248046875,
-0.032318115234375,
-0.033721923828125,
0.0079345703125,
0.0298919677734375,
-0.0224456787109375,
-0.01340484619140625,
-0.0102691650390625,
0.05133056640625,
-0.04736328125,
-0.02392578125,
0.0015506744384765625,
0.05584716796875,
-0.033233642578125,
-0.0058135986328125,
-0.004909515380859375,
0.01509857177734375,
0.007190704345703125,
0.028717041015625,
-0.01392364501953125,
0.0194244384765625,
0.00542449951171875,
0.046966552734375,
0.0025615692138671875,
0.0545654296875,
0.016937255859375,
0.032958984375,
0.03021240234375,
-0.005916595458984375,
0.04931640625,
-0.004993438720703125,
-0.004207611083984375,
0.006694793701171875,
0.0200042724609375,
-0.037841796875,
0.034454345703125,
-0.02215576171875,
0.02740478515625,
0.0158233642578125
] |
41ffece46ab2763d8395803d92e8b3ab811f4fc1
|
Wordpress Stackexchange
Q: My WordPress site always displays a cached version of its homepage First of all, sorry if I'm making a mistake. I already asked this on the ServerFault forum, but got no answers at the moment and I thought it would be a good idea to ask the question here, considering that it is a WordPress specific question.
I have a WordPress site that runs fine, but there's a strange behaviour: one a reader loads the page, the site shows a "cached" version of the site, with the same news and comment numbers that the reader viewed when he visited the site last time.
So every user has to reload the page (Ctrl+F5, Cmd+R) in order to get the "real", and updated homepage.
I don't know why this is happening. At the moment I'm not using any cache plugin, and my server is running Nginx+MySQL+PHP-FPM on a Ubuntu 10.04 LTS Linux VPS. Is there something I must change on the nginx config files, maybe?
A: I had an issue like this and it was the WP Super Cache plugin. Try disabling it and if that works, check around the settings to see what's amiss.
|
Q: My WordPress site always displays a cached version of its homepage First of all, sorry if I'm making a mistake. I already asked this on the ServerFault forum, but got no answers at the moment and I thought it would be a good idea to ask the question here, considering that it is a WordPress specific question.
I have a WordPress site that runs fine, but there's a strange behaviour: one a reader loads the page, the site shows a "cached" version of the site, with the same news and comment numbers that the reader viewed when he visited the site last time.
So every user has to reload the page (Ctrl+F5, Cmd+R) in order to get the "real", and updated homepage.
I don't know why this is happening. At the moment I'm not using any cache plugin, and my server is running Nginx+MySQL+PHP-FPM on a Ubuntu 10.04 LTS Linux VPS. Is there something I must change on the nginx config files, maybe?
A: I had an issue like this and it was the WP Super Cache plugin. Try disabling it and if that works, check around the settings to see what's amiss.
A: Sounds like your expires headers are set to far in the future. The following rules can be added to your .htaccess Expires rules can be added to your Nginx server file to shorten the expires time down to 180 seconds.
location ~* \/[^\/]+\/(feed|\.xml|.html|.HTML)\/? {
expires 180;
}
I would also suggest installing the Nginx Proxy Cache Integrator plugin to control the Nginx static file proxy cache.
Another plugin that is similar is Nginx Proxy Cache Purge that purges the proxy cache anytime you update your site.
The problem your having is NOT being caused by WordPress.
A: ExpiresByType text/html "access plus 180 seconds"
Adding this in htaccess will fix the issue. I too faced same kind of issue and above fixed it forever
|
wordpress
|
{
"language": "en",
"length": 318,
"provenance": "stackexchange_00019.jsonl.gz:407554",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11444"
}
|
[
0.0214691162109375,
0.0206756591796875,
-0.01195526123046875,
0.0218963623046875,
0.01346588134765625,
-0.03863525390625,
0.022064208984375,
-0.080078125,
0.03167724609375,
0.01015472412109375,
-0.06329345703125,
-0.0068206787109375,
-0.0012378692626953125,
-0.019744873046875,
0.0004553794860839844,
-0.03509521484375,
0.058990478515625,
-0.0121307373046875,
0.0540771484375,
0.00940704345703125,
-0.00907135009765625,
0.055084228515625,
0.04876708984375,
0.04046630859375,
0.03204345703125,
-0.060577392578125,
0.0831298828125,
-0.0104827880859375,
0.04083251953125,
-0.01122283935546875,
0.036285400390625,
-0.0213470458984375,
0.024444580078125,
0.0257110595703125,
-0.0478515625,
-0.0209503173828125,
0.0029659271240234375,
0.00643157958984375,
-0.031707763671875,
0.050537109375,
0.00241851806640625,
0.01265716552734375,
0.053985595703125,
-0.010101318359375,
0.00431060791015625,
-0.0301513671875,
0.01021575927734375,
-0.037200927734375,
-0.0036563873291015625,
-0.0226898193359375,
0.0037994384765625,
0.00565338134765625,
0.0185394287109375,
-0.003734588623046875,
0.013916015625,
0.01336669921875,
-0.0015430450439453125,
0.0203094482421875,
0.03131103515625,
-0.07281494140625,
-0.0347900390625,
0.00518798828125,
0.03497314453125,
0.030426025390625,
-0.01419830322265625,
0.001369476318359375,
0.059295654296875,
-0.0120391845703125,
-0.08917236328125,
-0.0134124755859375,
0.070068359375,
-0.032806396484375,
0.0009179115295410156,
-0.023284912109375,
-0.01551055908203125,
0.003742218017578125,
-0.0009746551513671875,
-0.0108795166015625,
0.0256805419921875,
-0.01149749755859375,
0.0019502639770507812,
-0.002277374267578125,
-0.048736572265625,
-0.0197906494140625,
-0.003353118896484375,
0.007335662841796875,
-0.017303466796875,
-0.0152435302734375,
-0.032257080078125,
-0.00677490234375,
-0.02484130859375,
-0.03192138671875,
-0.012542724609375,
-0.0017290115356445312,
-0.0203399658203125,
-0.00568389892578125,
-0.01885986328125,
0.0242462158203125,
-0.04510498046875,
0.013641357421875,
-0.043670654296875,
0.007190704345703125,
0.01033782958984375,
-0.035858154296875,
0.00545501708984375,
-0.0006427764892578125,
-0.019622802734375,
0.040740966796875,
0.0567626953125,
0.060791015625,
0.00736236572265625,
-0.009521484375,
-0.030975341796875,
-0.060546875,
-0.01558685302734375,
0.040557861328125,
-0.0262298583984375,
0.001888275146484375,
0.01934814453125,
-0.0111541748046875,
0.006946563720703125,
0.03253173828125,
0.00968170166015625,
-0.04608154296875,
-0.0027523040771484375,
-0.013641357421875,
-0.0171661376953125,
-0.043670654296875,
-0.0115966796875,
-0.0016193389892578125,
-0.0357666015625,
0.022186279296875,
0.0631103515625,
0.0210723876953125,
0.0082244873046875,
-0.02178955078125,
0.013702392578125,
-0.043487548828125,
-0.01256561279296875,
0.032806396484375,
-0.0176544189453125,
-0.035003662109375,
0.015838623046875,
-0.045989990234375,
0.01708984375,
0.01096343994140625,
-0.0034999847412109375,
0.03558349609375,
0.03192138671875,
-0.00543975830078125,
-0.0007033348083496094,
-0.01513671875,
0.027435302734375,
0.01025390625,
0.036651611328125,
-0.01009368896484375,
0.031097412109375,
-0.02008056640625,
-0.02886962890625,
-0.01294708251953125,
0.0134429931640625,
-0.0272369384765625,
-0.038970947265625,
-0.0036163330078125,
-0.049835205078125,
0.030975341796875,
0.020111083984375,
-0.006275177001953125,
0.02239990234375,
-0.021514892578125,
0.04168701171875,
0.012969970703125,
0.0654296875,
-0.008331298828125,
-0.007221221923828125,
-0.0215911865234375,
0.00403594970703125,
0.0248260498046875,
-0.00004094839096069336,
0.0227203369140625,
0.0012569427490234375,
-0.0282745361328125,
0.020355224609375,
0.0005578994750976562,
-0.041778564453125,
0.0173492431640625,
-0.007137298583984375,
0.0241241455078125,
0.0283203125,
-0.0014209747314453125,
0.021484375,
-0.002490997314453125,
-0.07928466796875,
0.07073974609375,
0.019012451171875,
0.016326904296875,
-0.053436279296875,
0.01300048828125,
0.0031719207763671875,
-0.0823974609375,
0.049285888671875,
-0.0073089599609375,
-0.007747650146484375,
-0.0211029052734375,
-0.09771728515625,
-0.00518798828125,
-0.03057861328125,
0.030670166015625,
0.058746337890625,
0.05706787109375,
-0.021026611328125,
0.021575927734375,
0.0018014907836914062,
-0.061798095703125,
-0.05377197265625,
0.0272674560546875,
-0.0303802490234375,
-0.004154205322265625,
0.0096282958984375,
0.0017042160034179688,
-0.0212860107421875,
0.01617431640625,
-0.01702880859375,
-0.025787353515625,
0.038818359375,
0.006229400634765625,
-0.029022216796875,
-0.018463134765625,
0.0184478759765625,
-0.01739501953125,
-0.0010004043579101562,
0.05963134765625,
-0.0008897781372070312,
0.0406494140625,
-0.022003173828125,
-0.0223541259765625,
-0.0548095703125,
-0.0723876953125,
0.0048065185546875,
0.059417724609375,
0.0251007080078125,
-0.011932373046875,
0.0085601806640625,
0.039276123046875,
0.0112762451171875,
-0.0196990966796875,
0.0253143310546875,
0.0170135498046875,
0.034942626953125,
0.019622802734375,
0.0006275177001953125,
-0.026031494140625,
0.03466796875,
-0.06219482421875,
0.016326904296875,
0.030181884765625,
0.0157928466796875,
0.048553466796875,
-0.019012451171875,
-0.0100555419921875,
-0.0027561187744140625,
0.0287933349609375,
-0.0005927085876464844,
0.0121002197265625,
-0.027801513671875,
-0.0120849609375,
-0.0193634033203125,
-0.003940582275390625,
0.01456451416015625,
-0.007904052734375,
0.01270294189453125,
-0.03338623046875,
0.002361297607421875,
0.0227203369140625,
-0.00930023193359375,
-0.016876220703125,
-0.03887939453125,
0.005401611328125,
0.007671356201171875,
-0.004528045654296875,
-0.00860595703125,
-0.0034809112548828125,
-0.033477783203125,
-0.00406646728515625,
0.01004791259765625,
-0.048583984375,
0.00731658935546875,
0.030120849609375,
0.0236358642578125,
0.037078857421875,
0.044097900390625,
0.0169677734375,
-0.023529052734375,
0.05828857421875,
-0.04241943359375,
-0.0132598876953125,
-0.0234375,
-0.051055908203125,
0.0426025390625,
-0.01038360595703125,
0.04669189453125,
0.0941162109375,
0.001728057861328125,
0.050140380859375,
0.0029430389404296875,
0.01203155517578125,
0.03558349609375,
0.017486572265625,
-0.01430511474609375,
0.0014362335205078125,
-0.097412109375,
-0.06268310546875,
0.018280029296875,
0.052032470703125,
-0.006031036376953125,
-0.046722412109375,
-0.01540374755859375,
0.01282501220703125,
-0.1024169921875,
-0.10791015625,
-0.0635986328125,
0.0240631103515625,
0.0022258758544921875,
0.032867431640625,
0.04022216796875,
-0.006206512451171875,
0.015472412109375,
0.01522064208984375,
-0.004459381103515625,
-0.044586181640625,
-0.058197021484375,
-0.0814208984375,
-0.059844970703125,
-0.03558349609375,
-0.00370025634765625,
0.005435943603515625,
-0.0064697265625,
0.054962158203125,
-0.00876617431640625,
-0.07330322265625,
-0.04705810546875,
0.027069091796875,
-0.0270843505859375,
-0.01107025146484375,
-0.0101470947265625,
-0.0294036865234375,
-0.0105743408203125,
0.006092071533203125,
0.006702423095703125,
-0.0048065185546875,
0.01148223876953125,
-0.0016641616821289062,
-0.0347900390625,
-0.044647216796875,
-0.03692626953125,
0.0100250244140625,
0.04241943359375,
-0.005779266357421875,
0.0033740997314453125,
-0.03692626953125,
-0.035858154296875,
0.01727294921875,
-0.04510498046875,
0.01105499267578125,
0.035858154296875,
-0.033416748046875,
0.0182952880859375,
-0.0217132568359375,
-0.00571441650390625,
-0.01084136962890625,
0.061126708984375,
-0.0211334228515625,
0.0301971435546875,
-0.026123046875,
-0.028167724609375,
-0.054107666015625,
0.045257568359375,
0.004001617431640625,
0.018341064453125,
0.006259918212890625,
0.01396942138671875,
-0.034027099609375,
0.0274658203125,
-0.061004638671875,
-0.044189453125,
0.02532958984375,
-0.034881591796875,
0.0269622802734375,
-0.02520751953125,
-0.0185546875,
0.0048980712890625,
0.10064697265625,
-0.059967041015625,
-0.00530242919921875,
0.0285797119140625,
0.0135498046875,
-0.0241546630859375,
-0.001434326171875,
-0.085205078125,
-0.0260772705078125,
-0.061981201171875,
0.0197296142578125,
0.0126953125,
-0.039093017578125,
-0.0205078125,
-0.0162506103515625,
-0.05224609375,
-0.0267791748046875,
0.0269775390625,
-0.03515625,
0.019073486328125,
-0.0292510986328125,
-0.00363922119140625,
-0.050750732421875,
0.009002685546875,
-0.04534912109375,
-0.057586669921875,
-0.007633209228515625,
-0.01004791259765625,
0.0306549072265625,
0.032501220703125,
-0.050018310546875,
-0.000919342041015625,
0.02960205078125,
0.018646240234375,
0.059112548828125,
0.0029544830322265625,
-0.024261474609375,
0.0411376953125,
0.0090179443359375,
0.030487060546875,
-0.01435089111328125,
0.00864410400390625,
-0.006313323974609375,
-0.062255859375,
-0.053985595703125,
-0.025360107421875,
-0.03289794921875,
0.035675048828125,
-0.04779052734375,
-0.0004749298095703125,
-0.061676025390625,
-0.05474853515625,
-0.00864410400390625,
-0.0159149169921875,
0.007598876953125,
-0.035858154296875,
0.00897216796875,
0.01300048828125,
-0.007076263427734375,
-0.01320648193359375,
0.0228729248046875,
0.07464599609375,
0.0163116455078125,
-0.00966644287109375,
-0.0192718505859375,
0.04718017578125,
0.01214599609375,
0.0205078125,
0.039154052734375,
-0.0030384063720703125,
0.01494598388671875,
0.0024700164794921875,
-0.0127716064453125,
0.045867919921875,
-0.0024585723876953125,
0.047027587890625,
-0.010711669921875,
-0.0357666015625,
0.044677734375,
0.0215606689453125,
-0.059112548828125,
0.04913330078125,
0.0219573974609375,
-0.01097869873046875,
-0.0204010009765625,
0.0136566162109375,
0.0207366943359375,
-0.04754638671875,
-0.04351806640625,
-0.0269927978515625,
0.0016117095947265625,
-0.006732940673828125,
0.06878662109375,
0.0443115234375,
-0.0050048828125,
0.07452392578125,
0.06903076171875,
0.0082855224609375,
0.0016012191772460938,
0.019775390625,
-0.0252532958984375,
0.03594970703125,
-0.022247314453125,
-0.01210784912109375,
0.0009679794311523438,
-0.00786590576171875,
0.0230560302734375,
-0.0019283294677734375,
-0.0755615234375,
0.020721435546875,
-0.01461029052734375,
0.0011224746704101562,
0.044342041015625,
0.011260986328125,
0.02679443359375,
-0.0230865478515625,
-0.00882720947265625,
-0.0083160400390625,
-0.0180511474609375,
-0.04290771484375,
-0.039886474609375,
0.01158905029296875,
-0.007205963134765625,
0.0023708343505859375,
0.07196044921875,
0.025177001953125,
0.0010728836059570312,
0.0499267578125,
-0.0290985107421875,
0.004302978515625,
0.0092620849609375,
0.0250244140625,
0.01155853271484375,
0.0224151611328125,
0.0009946823120117188,
0.0004229545593261719,
0.0361328125,
-0.01128387451171875,
0.0004177093505859375,
0.020416259765625,
0.032012939453125,
-0.0116424560546875,
-0.0185089111328125,
0.005908966064453125,
-0.042327880859375,
0.019775390625,
0.0177764892578125,
-0.035186767578125,
-0.03717041015625,
-0.0191802978515625,
-0.026519775390625,
0.0241851806640625,
-0.0238800048828125,
-0.03424072265625,
0.01385498046875,
-0.034027099609375,
0.01837158203125,
0.01800537109375,
-0.042755126953125,
0.031524658203125,
0.0199127197265625,
-0.0005803108215332031,
-0.025177001953125,
-0.0141143798828125,
-0.02117919921875,
0.00933837890625,
-0.0250701904296875,
-0.014007568359375,
0.045623779296875,
-0.003841400146484375,
0.04669189453125,
-0.0275421142578125,
-0.03350830078125,
0.02471923828125,
0.0073394775390625,
0.0443115234375,
0.00543975830078125,
-0.0243072509765625,
-0.00762176513671875,
-0.030242919921875,
-0.0265045166015625,
-0.021148681640625,
-0.0267791748046875,
-0.05322265625,
0.0023441314697265625,
0.005767822265625,
0.0137481689453125,
-0.048095703125,
-0.07318115234375,
-0.040374755859375,
0.02276611328125,
0.06280517578125,
0.042266845703125,
-0.0114898681640625,
0.032745361328125,
-0.016998291015625,
0.049163818359375,
-0.0111236572265625,
0.00788116455078125,
-0.0274200439453125,
-0.013519287109375,
0.0176544189453125,
-0.02569580078125,
-0.022735595703125,
-0.0160980224609375,
0.0013284683227539062,
0.004810333251953125,
0.0322265625,
-0.0088653564453125,
-0.018524169921875,
0.0015001296997070312,
0.00949859619140625,
-0.0274658203125,
0.033966064453125,
-0.0011682510375976562,
-0.0181427001953125,
-0.00762176513671875,
-0.001277923583984375,
-0.007663726806640625,
0.01318359375,
-0.035919189453125,
0.0263214111328125,
0.0216522216796875,
0.01873779296875,
-0.044403076171875,
0.0014677047729492188,
0.01317596435546875,
0.08917236328125,
0.04412841796875,
0.0765380859375,
0.039276123046875,
0.046051025390625,
0.032318115234375,
0.0009613037109375,
-0.034027099609375,
-0.0284881591796875,
0.0152740478515625,
-0.0113372802734375,
-0.0246429443359375,
0.0009036064147949219,
-0.0224151611328125,
0.01116180419921875,
0.043792724609375,
0.0304718017578125,
-0.04486083984375,
0.0002142190933227539,
-0.0152740478515625,
-0.0196990966796875,
0.041717529296875,
-0.006534576416015625,
0.0018138885498046875,
-0.046600341796875,
0.0325927734375,
0.02947998046875,
-0.0107879638671875,
0.0196380615234375,
0.002193450927734375,
-0.004608154296875,
-0.0201873779296875,
0.0267181396484375,
-0.0087890625,
-0.051116943359375,
-0.005100250244140625,
0.00843048095703125,
-0.00084686279296875,
-0.01486968994140625,
-0.007904052734375,
-0.002788543701171875,
-0.0298919677734375,
-0.053131103515625,
-0.0155029296875,
-0.01129913330078125,
-0.01186370849609375,
0.0341796875,
0.047271728515625,
-0.042205810546875,
0.047393798828125,
-0.020416259765625,
0.044586181640625,
-0.003265380859375,
-0.0200347900390625,
0.0484619140625,
-0.0277557373046875,
0.012420654296875,
-0.01006317138671875,
-0.0689697265625,
0.006122589111328125,
-0.0007381439208984375,
-0.03125,
-0.0166473388671875,
0.007297515869140625,
0.07757568359375,
-0.0377197265625,
-0.01428985595703125,
0.01082611083984375,
0.057891845703125,
-0.0008211135864257812,
-0.025054931640625,
0.0218658447265625,
-0.037933349609375,
0.0282745361328125,
-0.0129547119140625,
0.02191162109375,
-0.00647735595703125,
-0.0129547119140625,
-0.0672607421875,
0.020599365234375,
-0.01202392578125,
0.048675537109375,
0.01464080810546875,
-0.01812744140625,
-0.006053924560546875,
-0.0302581787109375,
-0.01346588134765625,
0.05194091796875,
-0.0212860107421875,
0.05902099609375,
-0.033843994140625,
-0.005352020263671875,
0.03125,
0.05438232421875,
0.023590087890625,
0.01168060302734375,
-0.0311431884765625,
0.006786346435546875,
0.027313232421875,
-0.0023365020751953125,
-0.01458740234375,
0.0615234375,
-0.0301666259765625,
0.0180511474609375,
0.01727294921875,
-0.03961181640625,
0.0279541015625,
-0.0183258056640625,
-0.042449951171875,
-0.01250457763671875,
-0.0004639625549316406,
-0.01514434814453125,
-0.006511688232421875,
0.04248046875,
-0.056915283203125,
0.01015472412109375,
0.0287933349609375,
-0.01187896728515625,
0.0066070556640625,
0.01206207275390625,
0.02813720703125,
-0.046905517578125,
-0.01837158203125,
-0.019775390625,
0.039276123046875,
0.01221466064453125,
-0.02044677734375,
-0.001132965087890625,
-0.0013484954833984375,
-0.0269012451171875,
-0.00846099853515625,
-0.0217132568359375,
0.035675048828125,
-0.021209716796875,
0.0253448486328125,
0.0080108642578125,
0.04400634765625,
-0.042205810546875,
-0.05596923828125,
0.0251007080078125,
0.04901123046875,
-0.0118408203125,
-0.0703125,
0.0240325927734375,
-0.0023136138916015625,
-0.004764556884765625,
-0.00020706653594970703,
-0.006504058837890625,
-0.0628662109375,
0.000018715858459472656,
0.0301666259765625,
-0.0156402587890625,
0.0001424551010131836,
-0.02032470703125,
0.0262908935546875,
0.072998046875,
0.0180816650390625,
-0.004444122314453125,
-0.028900146484375,
0.0172119140625,
-0.01532745361328125,
0.03216552734375,
0.022186279296875,
0.0253753662109375,
0.01580810546875,
-0.0121612548828125,
-0.0207977294921875,
0.064697265625,
0.01444244384765625,
0.005718231201171875,
-0.052032470703125,
-0.05328369140625,
0.0193023681640625,
0.048858642578125,
0.008880615234375,
0.0018129348754882812,
0.034332275390625,
0.0211944580078125,
-0.044097900390625,
-0.007427215576171875,
0.03826904296875,
-0.0288848876953125,
-0.0037021636962890625,
-0.0268402099609375,
0.019439697265625,
0.0168914794921875,
-0.00795745849609375,
0.01006317138671875,
0.014312744140625,
0.04779052734375,
-0.006740570068359375,
0.0078125,
-0.0102691650390625,
-0.0311737060546875,
0.033172607421875,
-0.0233001708984375,
0.0278167724609375,
-0.003997802734375,
0.014862060546875,
-0.00012862682342529297,
-0.0200042724609375,
-0.0229644775390625,
0.024505615234375,
0.029937744140625,
-0.0034046173095703125,
0.021881103515625,
0.0084686279296875,
-0.00042891502380371094,
0.01512908935546875,
-0.00847625732421875,
-0.0066680908203125,
-0.007518768310546875,
0.017608642578125,
-0.01013946533203125,
-0.049285888671875,
-0.0160980224609375,
-0.00045490264892578125,
0.0028018951416015625,
-0.0108489990234375,
0.051025390625,
0.01262664794921875,
0.005741119384765625,
0.0176239013671875,
-0.026947021484375,
0.02716064453125,
0.0146484375,
-0.025726318359375,
0.00867462158203125,
0.005222320556640625,
-0.02276611328125,
-0.08599853515625,
0.0338134765625,
0.021759033203125,
-0.01094818115234375,
0.039154052734375,
-0.0027332305908203125,
0.0006432533264160156,
-0.034820556640625,
-0.0146026611328125,
-0.028289794921875,
-0.0189056396484375,
0.001312255859375,
0.0021190643310546875,
0.0208892822265625,
-0.01251220703125,
-0.028472900390625,
0.078125,
0.032867431640625,
-0.00701904296875,
0.0255279541015625,
-0.08349609375,
0.04437255859375,
0.03717041015625,
0.0367431640625,
-0.0200653076171875,
-0.01410675048828125,
-0.0179901123046875,
0.005645751953125,
-0.003353118896484375,
0.0220184326171875,
0.0002224445343017578,
-0.01351165771484375,
-0.0281829833984375,
-0.0175628662109375,
-0.0013895034790039062,
-0.03692626953125,
0.0007977485656738281,
0.0024871826171875,
0.0140533447265625,
0.0150299072265625,
-0.0126190185546875,
-0.0148468017578125,
-0.02734375,
-0.006595611572265625,
0.0162811279296875,
-0.0237884521484375,
-0.0279541015625,
-0.030517578125,
0.01061248779296875,
-0.00021004676818847656,
-0.013885498046875,
-0.045074462890625,
0.049957275390625,
-0.039398193359375,
0.0227813720703125,
-0.051177978515625,
-0.034423828125,
0.0003952980041503906,
0.0222015380859375,
0.0092926025390625,
-0.0012140274047851562,
-0.0341796875,
0.0009226799011230469,
-0.0126953125,
-0.0161590576171875,
0.043670654296875,
0.00750732421875,
0.007228851318359375,
-0.035797119140625,
-0.028839111328125,
0.02978515625,
-0.0841064453125,
-0.0079803466796875,
0.018829345703125,
-0.01108551025390625,
-0.0195159912109375,
-0.034088134765625,
0.0133819580078125,
-0.0548095703125,
-0.022064208984375,
0.011993408203125,
0.00415802001953125,
0.0228424072265625,
-0.038238525390625,
-0.062164306640625,
0.058868408203125,
-0.00659942626953125,
-0.0276947021484375,
-0.055328369140625,
-0.03973388671875,
-0.0135498046875,
0.013427734375,
-0.026092529296875,
-0.03570556640625,
-0.04046630859375,
0.0606689453125,
0.025146484375,
0.041015625,
0.0191497802734375,
0.007778167724609375,
-0.0102386474609375,
0.034759521484375,
0.0163421630859375,
0.04779052734375,
-0.006580352783203125,
-0.0045318603515625,
0.014617919921875,
0.043853759765625,
-0.0165863037109375,
-0.042510986328125,
0.0146942138671875,
-0.049346923828125,
-0.01021575927734375,
0.003650665283203125,
0.0030574798583984375,
0.00643157958984375,
0.036895751953125,
0.0408935546875,
0.0005574226379394531,
-0.0290374755859375,
-0.022552490234375,
-0.042755126953125,
-0.0537109375,
-0.033416748046875,
0.020751953125,
-0.06903076171875,
0.01209259033203125,
-0.0122833251953125,
-0.0233612060546875,
-0.020355224609375,
-0.0131683349609375,
-0.04913330078125,
-0.0049591064453125,
0.006824493408203125,
0.0169677734375,
-0.03179931640625,
-0.014678955078125,
0.035308837890625,
-0.0379638671875,
-0.00556182861328125,
0.009246826171875,
0.00893402099609375,
0.011016845703125,
0.02020263671875,
0.027740478515625,
0.0670166015625,
-0.051971435546875,
-0.01511383056640625,
0.0222320556640625,
0.00986480712890625,
-0.01554107666015625,
-0.0142364501953125,
0.039398193359375,
-0.0035839080810546875,
-0.0157928466796875,
0.01361083984375,
0.007114410400390625,
-0.0188446044921875,
-0.061492919921875,
0.00817108154296875,
-0.0150299072265625,
-0.03765869140625,
-0.026763916015625,
0.0364990234375,
-0.042266845703125,
-0.00493621826171875,
-0.00568389892578125,
-0.020355224609375,
0.0208282470703125,
-0.00972747802734375,
0.005878448486328125,
-0.0105438232421875,
-0.0089111328125,
-0.05499267578125,
-0.025665283203125,
0.0034637451171875
] |
d1c97db25fe22b44d0c7dbca6a16ef14a598a411
|
Wordpress Stackexchange
Q: Why is wp_get_attachment_image_src not working with my custom size (add_image_size) I have added an image size with
add_image_size('gallery-thumb', 48, 48);
Why when I do
array_slice(wp_get_attachment_image_src($firstimg->ID, 'gallery-thumb'))
I get the link to the full sized image?
UPDATE
Somehow it appears that even when I do
wp_get_attachment_image_src($photo->ID, array(48,48))
I get the thumbnail image (150, 150)
A: Does the 48x48 thumbnail file exist? If not, you can use a plugin like Regenerate Thumbnails.
|
Q: Why is wp_get_attachment_image_src not working with my custom size (add_image_size) I have added an image size with
add_image_size('gallery-thumb', 48, 48);
Why when I do
array_slice(wp_get_attachment_image_src($firstimg->ID, 'gallery-thumb'))
I get the link to the full sized image?
UPDATE
Somehow it appears that even when I do
wp_get_attachment_image_src($photo->ID, array(48,48))
I get the thumbnail image (150, 150)
A: Does the 48x48 thumbnail file exist? If not, you can use a plugin like Regenerate Thumbnails.
A: I've been wrestling with the same issue this afternoon. The way wordpress handles thumbnails isn't very intuitive, but it seems that:
*
*Thumbnails are only generated on upload. So if you're developing & have added a new size, you'll need to delete and replace your media or regenerate the thumbnails with a plugin (I haven't looked for a native solution - seems ridiculous that there isn't one!) like Scribu suggests in order to use it.
*The size parameter seems like it will generate thumbnails of an arbitrary size, but I believe it is actually just mapping to the closest thumbnail size that has already been generated. That's why you're getting 150x150 pixel thumbs back when you request 48x48 pixel thumbs.
This article goes into much more detail:
http://www.studiograsshopper.ch/web-development/wordpress-featured-images-add_image_size-resizing-and-cropping-demo/
|
wordpress
|
{
"language": "en",
"length": 200,
"provenance": "stackexchange_00019.jsonl.gz:407585",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11547"
}
|
[
0.0255126953125,
-0.039886474609375,
0.0233306884765625,
-0.0255126953125,
-0.033599853515625,
-0.01526641845703125,
0.0272674560546875,
-0.00032782554626464844,
-0.00710296630859375,
0.033172607421875,
-0.046539306640625,
0.03076171875,
-0.0243988037109375,
0.0087432861328125,
-0.018890380859375,
-0.02752685546875,
0.050079345703125,
-0.0157318115234375,
0.04296875,
0.0065155029296875,
0.0167236328125,
0.045074462890625,
0.007411956787109375,
0.069091796875,
-0.007541656494140625,
0.0091400146484375,
0.047027587890625,
-0.0147857666015625,
-0.0104522705078125,
-0.0195770263671875,
0.003940582275390625,
0.0161895751953125,
0.0218505859375,
0.01275634765625,
-0.00878143310546875,
0.00743865966796875,
0.0335693359375,
-0.0156402587890625,
-0.023651123046875,
0.050140380859375,
0.007511138916015625,
0.0046234130859375,
0.04193115234375,
-0.01522064208984375,
-0.01096343994140625,
-0.030120849609375,
0.018035888671875,
-0.034149169921875,
-0.0039520263671875,
-0.0200653076171875,
0.0092315673828125,
0.035614013671875,
0.04962158203125,
-0.01373291015625,
-0.003086090087890625,
0.005680084228515625,
-0.03228759765625,
0.053619384765625,
0.017578125,
-0.0209808349609375,
-0.0279998779296875,
0.0183258056640625,
0.0181427001953125,
-0.00803375244140625,
-0.0023250579833984375,
0.0020618438720703125,
-0.00997161865234375,
-0.00548553466796875,
-0.0179901123046875,
-0.0215301513671875,
0.01360321044921875,
-0.0143280029296875,
-0.0139312744140625,
-0.037933349609375,
-0.03448486328125,
0.035858154296875,
0.022857666015625,
-0.0219268798828125,
-0.011383056640625,
-0.01885986328125,
0.032440185546875,
-0.012725830078125,
0.00431060791015625,
0.04852294921875,
-0.01149749755859375,
0.052398681640625,
-0.00522613525390625,
-0.03277587890625,
-0.006160736083984375,
-0.008209228515625,
-0.01528167724609375,
-0.057342529296875,
-0.0017375946044921875,
0.032623291015625,
-0.004398345947265625,
-0.028961181640625,
0.0174407958984375,
0.0309600830078125,
0.01352691650390625,
0.0255279541015625,
0.0003178119659423828,
-0.0443115234375,
0.037811279296875,
-0.04901123046875,
0.01690673828125,
-0.00904083251953125,
-0.0194244384765625,
0.005199432373046875,
0.061920166015625,
0.03582763671875,
-0.0027904510498046875,
0.058380126953125,
0.0167388916015625,
-0.018890380859375,
0.014984130859375,
-0.0094757080078125,
-0.038360595703125,
0.060302734375,
0.003162384033203125,
0.00727081298828125,
0.004673004150390625,
0.0189666748046875,
0.01189422607421875,
0.00316619873046875,
0.024932861328125,
0.0283355712890625,
-0.0136871337890625,
-0.036895751953125,
0.0306396484375,
0.01165008544921875,
-0.01456451416015625,
0.021331787109375,
0.0165557861328125,
-0.0091094970703125,
-0.001987457275390625,
0.000270843505859375,
-0.0219268798828125,
-0.060302734375,
-0.0245208740234375,
0.0175018310546875,
-0.006282806396484375,
-0.008056640625,
0.03009033203125,
-0.017242431640625,
0.030487060546875,
0.01293182373046875,
-0.005947113037109375,
0.0164947509765625,
0.0241241455078125,
-0.058380126953125,
0.060882568359375,
-0.0672607421875,
0.0133514404296875,
0.0367431640625,
-0.016571044921875,
0.02313232421875,
0.0625,
-0.0162506103515625,
-0.048370361328125,
-0.061859130859375,
0.03033447265625,
0.017669677734375,
-0.004390716552734375,
0.0015478134155273438,
-0.002593994140625,
-0.0218963623046875,
-0.03521728515625,
0.0008492469787597656,
0.0221710205078125,
0.06121826171875,
0.0226287841796875,
-0.0100555419921875,
0.0015869140625,
0.012237548828125,
-0.00926971435546875,
0.00122833251953125,
0.00238800048828125,
0.0000029802322387695312,
0.021331787109375,
0.038360595703125,
-0.0202178955078125,
-0.02508544921875,
0.04644775390625,
-0.036773681640625,
-0.0145416259765625,
-0.02276611328125,
0.0142364501953125,
0.003246307373046875,
0.01824951171875,
0.009979248046875,
0.0218963623046875,
0.0316162109375,
-0.03912353515625,
0.04571533203125,
-0.01094818115234375,
0.00569915771484375,
-0.02947998046875,
0.01300811767578125,
-0.007778167724609375,
-0.01446533203125,
0.04376220703125,
-0.0224151611328125,
0.0537109375,
-0.0161285400390625,
-0.018096923828125,
0.0306549072265625,
-0.018951416015625,
0.0265045166015625,
-0.056671142578125,
0.0259857177734375,
0.03167724609375,
0.02227783203125,
-0.0587158203125,
0.03704833984375,
0.0256195068359375,
-0.01499176025390625,
0.0009589195251464844,
0.03070068359375,
-0.0340576171875,
0.034881591796875,
-0.07183837890625,
-0.047454833984375,
-0.06494140625,
0.01885986328125,
0.0230865478515625,
0.03350830078125,
-0.049591064453125,
0.010650634765625,
-0.03875732421875,
0.043182373046875,
-0.08447265625,
0.042724609375,
-0.050689697265625,
-0.028076171875,
-0.01493072509765625,
0.0007119178771972656,
-0.0178985595703125,
-0.06939697265625,
0.021636962890625,
0.04150390625,
0.042694091796875,
0.049224853515625,
0.0078277587890625,
0.0012149810791015625,
0.09576416015625,
0.0182647705078125,
0.0243682861328125,
-0.020843505859375,
-0.0166473388671875,
0.004131317138671875,
0.002033233642578125,
-0.00597381591796875,
0.016632080078125,
-0.04559326171875,
0.0060882568359375,
0.04034423828125,
-0.002147674560546875,
-0.01470947265625,
-0.01422119140625,
0.07916259765625,
-0.0274505615234375,
0.0286102294921875,
0.03533935546875,
-0.0172882080078125,
0.01047515869140625,
0.0231170654296875,
0.019989013671875,
0.005428314208984375,
-0.0504150390625,
0.0290679931640625,
0.0242919921875,
0.007904052734375,
0.00592803955078125,
0.022491455078125,
-0.005584716796875,
-0.01058197021484375,
0.001995086669921875,
0.006511688232421875,
-0.007175445556640625,
-0.01561737060546875,
0.01336669921875,
0.0640869140625,
-0.01491546630859375,
-0.0178680419921875,
-0.0170440673828125,
-0.041412353515625,
-0.0047760009765625,
0.0203094482421875,
-0.0054168701171875,
-0.027496337890625,
0.00568389892578125,
0.029632568359375,
0.0045623779296875,
0.020416259765625,
0.001399993896484375,
-0.0134429931640625,
0.01904296875,
-0.04534912109375,
0.04962158203125,
-0.018341064453125,
0.081298828125,
0.08099365234375,
-0.036346435546875,
0.05511474609375,
-0.02374267578125,
-0.041961669921875,
-0.03961181640625,
-0.003448486328125,
-0.03289794921875,
-0.0211334228515625,
-0.054534912109375,
0.0306396484375,
0.0031585693359375,
0.036529541015625,
-0.0256805419921875,
-0.0396728515625,
0.00749969482421875,
-0.0048370361328125,
-0.054290771484375,
-0.0265960693359375,
0.01210784912109375,
-0.08355712890625,
-0.034515380859375,
-0.01605224609375,
-0.056549072265625,
0.0228729248046875,
0.006160736083984375,
-0.00847625732421875,
-0.004268646240234375,
-0.01026153564453125,
-0.01204681396484375,
-0.024871826171875,
-0.041290283203125,
0.012908935546875,
0.01525115966796875,
0.030120849609375,
-0.0089263916015625,
0.0223236083984375,
-0.011871337890625,
-0.0265960693359375,
-0.006114959716796875,
0.030792236328125,
0.02374267578125,
-0.002216339111328125,
0.0018711090087890625,
-0.011932373046875,
-0.0115966796875,
-0.0023937225341796875,
0.0208282470703125,
0.0165863037109375,
-0.0229644775390625,
0.0067596435546875,
-0.0188446044921875,
-0.01297760009765625,
0.00007647275924682617,
0.0465087890625,
0.0191192626953125,
-0.020355224609375,
0.03240966796875,
-0.046966552734375,
-0.00838470458984375,
-0.021697998046875,
-0.036376953125,
0.0198211669921875,
0.01332855224609375,
0.0196075439453125,
-0.01885986328125,
0.025482177734375,
-0.0220947265625,
-0.0023326873779296875,
0.0256500244140625,
-0.03466796875,
0.057830810546875,
-0.016021728515625,
-0.040069580078125,
-0.0278778076171875,
0.0210418701171875,
-0.01316070556640625,
0.0295562744140625,
0.00952911376953125,
-0.0036411285400390625,
-0.01153564453125,
0.0022430419921875,
-0.0157928466796875,
-0.0428466796875,
0.041961669921875,
-0.03363037109375,
0.010589599609375,
-0.031280517578125,
-0.01702880859375,
-0.0024890899658203125,
0.0758056640625,
-0.0290679931640625,
-0.05255126953125,
0.00341796875,
0.038116455078125,
-0.0288543701171875,
-0.053558349609375,
0.03375244140625,
-0.0270843505859375,
-0.0540771484375,
-0.014007568359375,
0.01299285888671875,
-0.035369873046875,
0.0019664764404296875,
-0.0106658935546875,
-0.04241943359375,
-0.0268402099609375,
0.023284912109375,
0.0168609619140625,
0.006771087646484375,
0.030303955078125,
-0.01329803466796875,
0.042449951171875,
-0.0016613006591796875,
-0.0244293212890625,
-0.11944580078125,
-0.0274505615234375,
0.032684326171875,
0.08599853515625,
-0.06829833984375,
0.0643310546875,
-0.06683349609375,
0.04833984375,
-0.0185546875,
0.00754547119140625,
-0.0181884765625,
0.02947998046875,
-0.0224151611328125,
0.0015134811401367188,
-0.00787353515625,
-0.0170745849609375,
-0.0279998779296875,
-0.08154296875,
-0.054443359375,
-0.0537109375,
-0.0301513671875,
0.0096435546875,
-0.0200347900390625,
0.00514984130859375,
-0.018829345703125,
-0.025360107421875,
-0.003376007080078125,
0.040557861328125,
0.0074462890625,
-0.00946807861328125,
-0.053009033203125,
-0.025909423828125,
0.037017822265625,
-0.022979736328125,
-0.0194244384765625,
0.00580596923828125,
0.0712890625,
0.004505157470703125,
-0.007061004638671875,
-0.07305908203125,
0.01132965087890625,
0.0217132568359375,
0.02490234375,
0.015960693359375,
0.0101165771484375,
-0.00940704345703125,
-0.00511932373046875,
0.0164642333984375,
0.024169921875,
-0.037078857421875,
0.0633544921875,
0.011932373046875,
0.00910186767578125,
0.0175933837890625,
0.0207061767578125,
-0.01332855224609375,
-0.0016069412231445312,
-0.033935546875,
0.03082275390625,
-0.0023975372314453125,
-0.0025424957275390625,
-0.037994384765625,
0.0245208740234375,
-0.0009975433349609375,
0.0006303787231445312,
-0.000054717063903808594,
0.0109100341796875,
0.060882568359375,
0.04437255859375,
-0.01096343994140625,
0.00075531005859375,
0.00482177734375,
0.005889892578125,
0.027191162109375,
0.034332275390625,
0.007537841796875,
0.054595947265625,
0.01053619384765625,
0.00968170166015625,
-0.004398345947265625,
0.0154876708984375,
-0.01540374755859375,
0.01708984375,
0.0174713134765625,
-0.09423828125,
0.0217437744140625,
0.00659942626953125,
-0.048583984375,
-0.021148681640625,
0.07208251953125,
0.0262451171875,
-0.01611328125,
-0.040191650390625,
-0.05413818359375,
-0.01165771484375,
-0.0736083984375,
0.0223846435546875,
0.02203369140625,
-0.0133056640625,
0.03173828125,
0.00984954833984375,
0.029937744140625,
0.0006775856018066406,
-0.0211181640625,
0.004688262939453125,
0.0300750732421875,
0.01071929931640625,
0.00960540771484375,
0.01171875,
-0.005550384521484375,
0.002040863037109375,
0.031341552734375,
-0.04949951171875,
-0.0064239501953125,
0.03192138671875,
0.045257568359375,
-0.0281219482421875,
-0.031036376953125,
0.029388427734375,
0.00848388671875,
0.00957489013671875,
0.0211334228515625,
-0.028289794921875,
-0.07354736328125,
-0.0129852294921875,
0.0369873046875,
0.043304443359375,
-0.0577392578125,
-0.04498291015625,
0.024566650390625,
-0.0259552001953125,
0.006549835205078125,
0.03521728515625,
-0.0400390625,
0.0189971923828125,
0.019683837890625,
0.005542755126953125,
-0.0382080078125,
-0.047454833984375,
0.065673828125,
0.033172607421875,
-0.0214385986328125,
-0.029876708984375,
0.038787841796875,
-0.0289154052734375,
-0.03924560546875,
-0.01383209228515625,
0.0235748291015625,
-0.07427978515625,
0.01299285888671875,
0.047637939453125,
0.0347900390625,
-0.0284423828125,
-0.0286865234375,
0.0008296966552734375,
-0.007297515869140625,
0.08685302734375,
0.0024394989013671875,
0.00311279296875,
-0.04327392578125,
-0.01267242431640625,
0.0233917236328125,
0.005313873291015625,
0.008056640625,
-0.002811431884765625,
0.0082855224609375,
-0.00304412841796875,
0.02899169921875,
0.0034542083740234375,
0.01071929931640625,
0.006969451904296875,
0.0254974365234375,
0.00539398193359375,
0.0026092529296875,
-0.0186614990234375,
-0.0167388916015625,
-0.0088958740234375,
-0.0175933837890625,
-0.0014514923095703125,
-0.004116058349609375,
0.02593994140625,
0.00994110107421875,
0.0272216796875,
0.013946533203125,
-0.021148681640625,
-0.019622802734375,
-0.01007080078125,
-0.0433349609375,
0.060546875,
-0.0025177001953125,
-0.0014982223510742188,
-0.0225372314453125,
-0.0574951171875,
0.00957489013671875,
0.00848388671875,
0.0184478759765625,
0.01087188720703125,
-0.049591064453125,
-0.0011043548583984375,
0.07568359375,
0.0153045654296875,
0.01221466064453125,
0.052398681640625,
-0.00975799560546875,
0.04278564453125,
0.0250701904296875,
0.023956298828125,
0.021270751953125,
0.04071044921875,
-0.0242462158203125,
-0.0156402587890625,
0.02606201171875,
0.00962066650390625,
0.00507354736328125,
0.012359619140625,
0.004352569580078125,
0.037017822265625,
-0.042877197265625,
0.03594970703125,
0.0211944580078125,
0.0430908203125,
-0.0002853870391845703,
-0.0184478759765625,
0.08905029296875,
-0.0293121337890625,
0.00007414817810058594,
-0.016876220703125,
0.0721435546875,
-0.0262908935546875,
-0.0254058837890625,
-0.01052093505859375,
-0.03387451171875,
-0.013153076171875,
-0.01483154296875,
-0.0291900634765625,
0.01393890380859375,
-0.041534423828125,
0.0227813720703125,
0.06268310546875,
-0.0032520294189453125,
0.00426483154296875,
0.02685546875,
-0.045196533203125,
0.004146575927734375,
-0.029327392578125,
-0.0274505615234375,
-0.0307159423828125,
-0.0034770965576171875,
-0.0009312629699707031,
-0.00988006591796875,
0.033416748046875,
0.0076446533203125,
0.00766754150390625,
-0.013092041015625,
-0.00916290283203125,
-0.049285888671875,
0.03253173828125,
-0.01678466796875,
0.01099395751953125,
0.036407470703125,
-0.052520751953125,
0.00583648681640625,
-0.0193939208984375,
0.0294342041015625,
0.002582550048828125,
0.03143310546875,
0.0673828125,
-0.03955078125,
-0.01410675048828125,
0.0396728515625,
0.0538330078125,
-0.018218994140625,
0.018707275390625,
0.02001953125,
-0.0391845703125,
-0.02593994140625,
0.012115478515625,
-0.046234130859375,
0.003314971923828125,
-0.006580352783203125,
-0.0172119140625,
0.041717529296875,
-0.033721923828125,
0.00792694091796875,
0.03851318359375,
0.004589080810546875,
0.0005893707275390625,
0.010406494140625,
-0.03173828125,
-0.00554656982421875,
-0.043609619140625,
-0.03192138671875,
-0.0389404296875,
0.026123046875,
-0.053619384765625,
-0.01396942138671875,
0.042449951171875,
0.00812530517578125,
-0.05322265625,
-0.0193634033203125,
0.061859130859375,
0.042938232421875,
0.0251312255859375,
0.03387451171875,
-0.00888824462890625,
-0.0648193359375,
0.009246826171875,
0.01142120361328125,
0.006183624267578125,
0.0109100341796875,
-0.0016117095947265625,
0.02490234375,
-0.0038909912109375,
0.00312042236328125,
0.0311737060546875,
0.07470703125,
-0.037384033203125,
0.01299285888671875,
0.0552978515625,
-0.0758056640625,
0.003387451171875,
0.04107666015625,
0.021148681640625,
0.01519775390625,
-0.05548095703125,
0.00408172607421875,
0.0228729248046875,
-0.0007152557373046875,
0.022705078125,
0.0012874603271484375,
0.0004730224609375,
0.055755615234375,
0.003589630126953125,
0.000881195068359375,
0.036285400390625,
0.0009579658508300781,
0.0035114288330078125,
0.009124755859375,
0.0205230712890625,
-0.029388427734375,
-0.0251617431640625,
0.045166015625,
0.03271484375,
-0.0191497802734375,
-0.032684326171875,
0.02362060546875,
0.01837158203125,
-0.01006317138671875,
0.015655517578125,
-0.005260467529296875,
-0.0360107421875,
0.01351165771484375,
-0.06219482421875,
0.0294036865234375,
0.041656494140625,
0.043792724609375,
-0.0201873779296875,
-0.016754150390625,
-0.06805419921875,
0.0026149749755859375,
-0.027374267578125,
-0.0045013427734375,
0.026031494140625,
0.032958984375,
0.0014886856079101562,
0.034271240234375,
0.025421142578125,
0.0008387565612792969,
-0.0087127685546875,
0.042449951171875,
-0.0135650634765625,
0.023834228515625,
-0.0303955078125,
-0.026763916015625,
-0.007335662841796875,
0.034698486328125,
0.01396942138671875,
-0.0152130126953125,
0.0234527587890625,
-0.0131988525390625,
-0.0694580078125,
-0.0037212371826171875,
-0.007534027099609375,
-0.03131103515625,
0.041168212890625,
-0.05328369140625,
0.05224609375,
0.028411865234375,
0.006008148193359375,
-0.0183563232421875,
-0.0310211181640625,
0.08013916015625,
-0.010894775390625,
0.059783935546875,
-0.0087432861328125,
-0.01390838623046875,
0.00249481201171875,
-0.00957489013671875,
0.07098388671875,
0.0082550048828125,
-0.04425048828125,
-0.0084381103515625,
-0.020660400390625,
-0.03289794921875,
0.013824462890625,
0.02777099609375,
-0.0272674560546875,
0.0290985107421875,
-0.008392333984375,
-0.0350341796875,
-0.0013494491577148438,
0.011962890625,
0.027374267578125,
-0.0250396728515625,
-0.01427459716796875,
-0.0214691162109375,
-0.058013916015625,
-0.04278564453125,
-0.024810791015625,
0.0433349609375,
0.01390838623046875,
0.048126220703125,
-0.007068634033203125,
0.029205322265625,
0.01178741455078125,
-0.0021343231201171875,
0.00800323486328125,
0.01177978515625,
-0.000751495361328125,
-0.01345062255859375,
-0.0185699462890625,
-0.034423828125,
-0.033203125,
-0.023406982421875,
0.03387451171875,
-0.057373046875,
-0.0225830078125,
0.006450653076171875,
0.0258331298828125,
-0.01085662841796875,
0.0024738311767578125,
-0.02099609375,
-0.017181396484375,
-0.0252227783203125,
-0.0171356201171875,
0.027130126953125,
0.025482177734375,
0.01529693603515625,
-0.00232696533203125,
0.011810302734375,
-0.0099029541015625,
0.03448486328125,
-0.003131866455078125,
0.05145263671875,
0.033966064453125,
-0.047149658203125,
-0.0419921875,
-0.03399658203125,
-0.01175689697265625,
-0.0253143310546875,
0.0108642578125,
0.043548583984375,
-0.0274810791015625,
0.05743408203125,
0.015167236328125,
0.01256561279296875,
0.0271453857421875,
-0.0577392578125,
-0.0095672607421875,
0.038970947265625,
0.004940032958984375,
0.00872802734375,
-0.040771484375,
-0.018402099609375,
-0.0156707763671875,
-0.00787353515625,
0.0277557373046875,
0.0226898193359375,
0.01558685302734375,
0.00439453125,
-0.0006914138793945312,
0.0255584716796875,
0.0263214111328125,
-0.06280517578125,
0.039398193359375,
-0.004100799560546875,
-0.01207733154296875,
0.0211181640625,
-0.03070068359375,
0.013824462890625,
0.0249481201171875,
-0.016326904296875,
-0.0213623046875,
-0.0201416015625,
0.01187896728515625,
-0.019866943359375,
0.05718994140625,
0.055877685546875,
-0.0457763671875,
-0.0213775634765625,
0.0791015625,
0.034759521484375,
0.129638671875,
-0.0227813720703125,
-0.0496826171875,
-0.0311279296875,
0.00391387939453125,
0.0295867919921875,
-0.01473236083984375,
-0.00563812255859375,
-0.031494140625,
-0.004425048828125,
-0.0186920166015625,
0.018768310546875,
0.025543212890625,
-0.02642822265625,
-0.054290771484375,
0.00838470458984375,
-0.006633758544921875,
-0.026611328125,
-0.0535888671875,
0.01593017578125,
0.0006175041198730469,
0.028076171875,
-0.01174163818359375,
0.01416778564453125,
0.0038471221923828125,
0.0306854248046875,
0.0005135536193847656,
-0.03533935546875,
0.052398681640625,
-0.041961669921875,
0.006526947021484375,
0.01282501220703125,
0.04229736328125,
-0.02264404296875,
0.0250701904296875,
-0.058685302734375,
0.06524658203125,
0.031707763671875,
-0.023651123046875,
-0.0175018310546875,
0.0257568359375,
-0.01666259765625,
-0.0031909942626953125,
-0.001956939697265625,
-0.00986480712890625,
0.0158538818359375,
0.03704833984375,
0.048095703125,
0.005039215087890625,
-0.044830322265625,
0.0156707763671875,
-0.00966644287109375,
-0.036163330078125,
-0.0025806427001953125,
0.00690460205078125,
-0.0428466796875,
-0.022674560546875,
-0.014495849609375,
-0.01467132568359375,
-0.00388336181640625,
-0.00847625732421875,
-0.043731689453125,
-0.0003726482391357422,
-0.01361846923828125,
0.01070404052734375,
-0.08056640625,
0.04754638671875,
0.062408447265625,
-0.04791259765625,
-0.020843505859375,
-0.01355743408203125,
-0.0035533905029296875,
0.019134521484375,
-0.057525634765625,
-0.002048492431640625,
0.060150146484375,
-0.01288604736328125,
-0.0020465850830078125,
0.0228729248046875,
-0.029754638671875,
0.01161956787109375,
0.0273284912109375,
0.0172576904296875,
0.006256103515625,
-0.032257080078125,
0.0201263427734375,
0.0804443359375,
-0.012664794921875,
-0.017547607421875,
0.0066375732421875,
-0.00751495361328125,
-0.0108642578125,
-0.0204925537109375,
0.0075225830078125,
0.004726409912109375,
-0.0111083984375,
0.03277587890625,
-0.01412200927734375,
-0.0015230178833007812,
-0.00252532958984375,
-0.0899658203125,
-0.04388427734375,
-0.03155517578125,
-0.03265380859375,
-0.028472900390625,
-0.0003223419189453125
] |
9d4139db5bcf91dd17106323a65d273d8b86b9bc
|
Wordpress Stackexchange
Q: Pluggable function and activation check? Plugin is defining pluggable wp_mail() function. My idea was to check if function is defined already and throw warning if other plugin beat me to it.
However this warning causes issues on activation. As far as I understand during normal operation plugin is loaded before pluggable.php but for the purpose of activation check it is loaded after pluggables.
What would be the robust/proper/suggested way to implement such check for pluggable function? There is no obvious (for me) way to distinguish activation and handle it separately.
A: Don't do the check on activation?
Seriously, the best way I can think of is not to check for this on activation, but only in the normal plugin load process. And instead of throwing a warning (I assume you mean a PHP E_WARNING), perhaps putting an admin error box up would make more sense.
|
Q: Pluggable function and activation check? Plugin is defining pluggable wp_mail() function. My idea was to check if function is defined already and throw warning if other plugin beat me to it.
However this warning causes issues on activation. As far as I understand during normal operation plugin is loaded before pluggable.php but for the purpose of activation check it is loaded after pluggables.
What would be the robust/proper/suggested way to implement such check for pluggable function? There is no obvious (for me) way to distinguish activation and handle it separately.
A: Don't do the check on activation?
Seriously, the best way I can think of is not to check for this on activation, but only in the normal plugin load process. And instead of throwing a warning (I assume you mean a PHP E_WARNING), perhaps putting an admin error box up would make more sense.
|
wordpress
|
{
"language": "en",
"length": 146,
"provenance": "stackexchange_00019.jsonl.gz:407593",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11574"
}
|
[
0.08770751953125,
0.05816650390625,
-0.031494140625,
-0.0987548828125,
0.08050537109375,
-0.0283966064453125,
-0.0148162841796875,
-0.04144287109375,
-0.04229736328125,
0.0206756591796875,
-0.02740478515625,
0.03533935546875,
-0.040618896484375,
-0.00556182861328125,
0.0197296142578125,
-0.043365478515625,
0.009613037109375,
0.030364990234375,
0.00421905517578125,
-0.0254974365234375,
0.0211944580078125,
0.0006656646728515625,
-0.039306640625,
0.0755615234375,
-0.0219573974609375,
-0.006134033203125,
0.1009521484375,
-0.035400390625,
0.0026874542236328125,
-0.0372314453125,
0.0053863525390625,
-0.00160980224609375,
-0.015960693359375,
0.054931640625,
-0.0283355712890625,
-0.056854248046875,
0.032257080078125,
0.01091766357421875,
0.022247314453125,
0.0252227783203125,
0.018402099609375,
-0.004978179931640625,
0.037353515625,
0.0157928466796875,
0.0022373199462890625,
-0.049591064453125,
0.036773681640625,
-0.040283203125,
0.0207672119140625,
0.037567138671875,
-0.00640869140625,
0.0263214111328125,
-0.0005888938903808594,
-0.0282440185546875,
-0.0112762451171875,
-0.031402587890625,
-0.061431884765625,
0.037139892578125,
0.0007371902465820312,
0.1103515625,
0.034912109375,
0.058441162109375,
-0.04852294921875,
-0.0660400390625,
0.0256805419921875,
-0.00969696044921875,
-0.03369140625,
0.032257080078125,
-0.031646728515625,
0.02471923828125,
0.0305023193359375,
-0.04644775390625,
-0.0038547515869140625,
-0.0007619857788085938,
0.0005402565002441406,
-0.00791168212890625,
0.01529693603515625,
0.022369384765625,
0.0102081298828125,
0.01424407958984375,
0.005306243896484375,
-0.0154571533203125,
-0.02032470703125,
0.01434326171875,
0.01219940185546875,
0.0494384765625,
-0.006450653076171875,
-0.0176544189453125,
-0.0200042724609375,
-0.034088134765625,
-0.0240325927734375,
0.01538848876953125,
0.0163116455078125,
-0.0650634765625,
-0.055084228515625,
-0.02410888671875,
0.033935546875,
0.05670166015625,
-0.018951416015625,
-0.00817108154296875,
0.00011372566223144531,
-0.038238525390625,
-0.01175689697265625,
-0.0205230712890625,
-0.01421356201171875,
0.0670166015625,
-0.007320404052734375,
-0.0005617141723632812,
-0.01195526123046875,
0.02392578125,
0.018951416015625,
-0.06927490234375,
0.007843017578125,
-0.0186614990234375,
0.00007051229476928711,
0.0062713623046875,
-0.01824951171875,
0.027679443359375,
0.0125732421875,
0.0280914306640625,
0.017181396484375,
0.006366729736328125,
0.017242431640625,
-0.0201568603515625,
0.0018100738525390625,
-0.0240020751953125,
-0.049224853515625,
-0.0005660057067871094,
-0.016265869140625,
0.0305328369140625,
-0.0133209228515625,
0.02783203125,
0.00945281982421875,
-0.021514892578125,
-0.034210205078125,
-0.00888824462890625,
-0.0061187744140625,
0.07373046875,
0.016815185546875,
-0.0004761219024658203,
0.036224365234375,
-0.049224853515625,
-0.021148681640625,
0.045806884765625,
-0.019775390625,
0.04449462890625,
0.019317626953125,
-0.0293731689453125,
-0.0244293212890625,
-0.082763671875,
-0.01024627685546875,
-0.030731201171875,
0.0190582275390625,
0.0234375,
-0.00710296630859375,
0.03955078125,
0.00890350341796875,
0.00024437904357910156,
-0.03619384765625,
0.0121307373046875,
0.0216827392578125,
-0.033355712890625,
-0.0557861328125,
-0.041900634765625,
-0.063232421875,
0.032867431640625,
-0.0281219482421875,
-0.004009246826171875,
0.0247039794921875,
-0.01666259765625,
0.01123046875,
-0.0166168212890625,
0.018646240234375,
0.01108551025390625,
0.0127105712890625,
0.022186279296875,
0.0210418701171875,
0.00792694091796875,
0.048126220703125,
0.0014209747314453125,
-0.03424072265625,
-0.0235137939453125,
0.111083984375,
-0.054290771484375,
-0.06707763671875,
0.0193328857421875,
0.01078033447265625,
0.0173797607421875,
0.029327392578125,
-0.003582000732421875,
0.06048583984375,
0.0034580230712890625,
0.01238250732421875,
-0.00335693359375,
-0.05938720703125,
-0.0220184326171875,
0.041839599609375,
0.04412841796875,
-0.03656005859375,
0.022369384765625,
0.0716552734375,
0.03143310546875,
-0.01470184326171875,
-0.041412353515625,
-0.08160400390625,
-0.0169830322265625,
-0.0119781494140625,
0.026214599609375,
0.0204315185546875,
0.04632568359375,
0.0025386810302734375,
0.0247802734375,
-0.02362060546875,
-0.0135650634765625,
0.00823211669921875,
0.0191650390625,
-0.0222930908203125,
0.039581298828125,
-0.0078277587890625,
0.050048828125,
-0.006473541259765625,
-0.0258331298828125,
-0.002685546875,
-0.034698486328125,
-0.041595458984375,
0.00799560546875,
-0.02069091796875,
0.0190582275390625,
-0.046478271484375,
0.0228729248046875,
0.041107177734375,
0.01058197021484375,
0.041839599609375,
0.0242156982421875,
-0.0159759521484375,
-0.002620697021484375,
-0.00556182861328125,
-0.06671142578125,
-0.0005803108215332031,
0.050140380859375,
0.0260162353515625,
0.011566162109375,
-0.0009412765502929688,
0.03558349609375,
0.0298919677734375,
-0.050994873046875,
-0.002471923828125,
0.0192413330078125,
-0.0009570121765136719,
0.023651123046875,
-0.030029296875,
0.004039764404296875,
0.0280609130859375,
0.0235137939453125,
-0.0030269622802734375,
0.028472900390625,
0.01383209228515625,
-0.0732421875,
0.0156402587890625,
0.0263519287109375,
0.021148681640625,
-0.047698974609375,
-0.076171875,
0.01506805419921875,
-0.01261138916015625,
-0.0160980224609375,
0.0090789794921875,
0.006252288818359375,
-0.0017728805541992188,
-0.01190185546875,
0.0276947021484375,
-0.0125579833984375,
-0.01806640625,
0.0262908935546875,
0.0765380859375,
0.00017499923706054688,
-0.038848876953125,
-0.027801513671875,
0.011810302734375,
0.033935546875,
-0.06414794921875,
-0.0174102783203125,
-0.032867431640625,
-0.020172119140625,
-0.02581787109375,
-0.0047454833984375,
0.03173828125,
-0.032012939453125,
-0.0287322998046875,
-0.037017822265625,
0.02838134765625,
-0.0114898681640625,
-0.039093017578125,
0.0145263671875,
-0.0233001708984375,
-0.054351806640625,
-0.023223876953125,
-0.059661865234375,
0.0433349609375,
-0.040496826171875,
0.003940582275390625,
0.064453125,
0.005344390869140625,
-0.00920867919921875,
-0.0253448486328125,
-0.01555633544921875,
-0.0081329345703125,
-0.00787353515625,
-0.0335693359375,
-0.037109375,
-0.0426025390625,
0.009918212890625,
0.026458740234375,
0.04736328125,
-0.0183258056640625,
-0.048187255859375,
-0.025177001953125,
0.017120361328125,
-0.07904052734375,
-0.079345703125,
-0.032379150390625,
-0.03192138671875,
0.05596923828125,
0.00653839111328125,
0.01084136962890625,
-0.0280609130859375,
0.0152740478515625,
0.025299072265625,
-0.05364990234375,
-0.01027679443359375,
-0.06439208984375,
-0.0792236328125,
-0.08367919921875,
0.0302886962890625,
-0.0172882080078125,
0.034912109375,
0.0081634521484375,
0.054443359375,
-0.0009188652038574219,
-0.0806884765625,
-0.002376556396484375,
-0.002536773681640625,
-0.0238494873046875,
0.02056884765625,
-0.031097412109375,
0.0026092529296875,
-0.0246124267578125,
0.0086822509765625,
-0.0219573974609375,
-0.0241851806640625,
0.0291748046875,
-0.02313232421875,
0.0204315185546875,
0.0170440673828125,
0.0220184326171875,
-0.0208587646484375,
-0.03509521484375,
-0.00017833709716796875,
-0.0297393798828125,
-0.0555419921875,
0.030364990234375,
0.0062408447265625,
-0.0005741119384765625,
-0.00341033935546875,
-0.0151519775390625,
-0.0182342529296875,
0.0296783447265625,
-0.03582763671875,
0.0150909423828125,
0.0201416015625,
0.00945281982421875,
0.004833221435546875,
0.044036865234375,
-0.01393890380859375,
-0.01454925537109375,
-0.044921875,
0.07110595703125,
0.00533294677734375,
-0.048919677734375,
0.00905609130859375,
0.018798828125,
0.00806427001953125,
-0.0098114013671875,
-0.01366424560546875,
-0.0116424560546875,
0.007030487060546875,
-0.051361083984375,
0.0183868408203125,
-0.03643798828125,
0.01174163818359375,
-0.0261688232421875,
0.0435791015625,
0.037109375,
-0.0177764892578125,
0.0185546875,
-0.0070037841796875,
-0.0281219482421875,
0.0254974365234375,
-0.0523681640625,
-0.004688262939453125,
-0.014373779296875,
0.01206207275390625,
-0.006755828857421875,
0.0020847320556640625,
-0.0222625732421875,
0.019775390625,
-0.009613037109375,
-0.01226806640625,
0.014556884765625,
-0.005096435546875,
0.0180511474609375,
0.0160980224609375,
-0.00565338134765625,
-0.0041351318359375,
0.0200653076171875,
-0.050384521484375,
-0.06317138671875,
0.004756927490234375,
-0.06915283203125,
0.037628173828125,
0.01241302490234375,
0.0010623931884765625,
-0.040496826171875,
0.00725555419921875,
0.0153045654296875,
0.0003428459167480469,
0.030426025390625,
0.00792694091796875,
0.006343841552734375,
0.01012420654296875,
0.030853271484375,
-0.0230865478515625,
0.0034332275390625,
-0.00025773048400878906,
-0.042205810546875,
0.0170745849609375,
-0.0181427001953125,
0.006999969482421875,
0.0284271240234375,
-0.038055419921875,
-0.013214111328125,
-0.0157012939453125,
-0.0220794677734375,
0.006137847900390625,
0.0031871795654296875,
-0.03515625,
-0.0255279541015625,
-0.01209259033203125,
0.0191802978515625,
-0.049468994140625,
-0.0034236907958984375,
0.005878448486328125,
0.09686279296875,
0.02423095703125,
0.0082244873046875,
0.00775146484375,
-0.0009183883666992188,
0.0303192138671875,
0.09222412109375,
-0.006900787353515625,
-0.01166534423828125,
-0.017120361328125,
-0.00301361083984375,
0.036865234375,
0.005825042724609375,
0.0117950439453125,
0.05389404296875,
0.00798797607421875,
-0.038177490234375,
0.0234527587890625,
0.01155853271484375,
-0.0289306640625,
0.04254150390625,
-0.0095672607421875,
0.002567291259765625,
0.033721923828125,
0.006893157958984375,
-0.051513671875,
0.024505615234375,
0.00009238719940185547,
-0.00530242919921875,
0.0141143798828125,
0.00804901123046875,
0.032470703125,
0.032135009765625,
-0.00775909423828125,
0.00856781005859375,
-0.0035724639892578125,
0.0161590576171875,
0.0313720703125,
0.052398681640625,
-0.043243408203125,
0.038116455078125,
0.021484375,
-0.01560211181640625,
-0.00220489501953125,
-0.0023288726806640625,
0.033905029296875,
-0.01068115234375,
-0.0268707275390625,
-0.03204345703125,
0.0018749237060546875,
0.004364013671875,
0.01114654541015625,
-0.0201873779296875,
0.053375244140625,
-0.0040130615234375,
-0.030731201171875,
-0.0224151611328125,
-0.044036865234375,
-0.0108795166015625,
-0.049713134765625,
-0.046966552734375,
0.007328033447265625,
-0.04345703125,
0.0296173095703125,
-0.01206207275390625,
-0.0281524658203125,
0.00579071044921875,
0.01177978515625,
0.020599365234375,
0.03277587890625,
0.0139617919921875,
0.01507568359375,
0.0008397102355957031,
-0.030303955078125,
0.0024318695068359375,
-0.00307464599609375,
-0.03643798828125,
-0.0279388427734375,
0.0181732177734375,
0.006832122802734375,
0.005550384521484375,
0.01038360595703125,
0.0286407470703125,
0.052703857421875,
-0.0167083740234375,
0.06488037109375,
0.045379638671875,
-0.043121337890625,
-0.02947998046875,
-0.032745361328125,
0.034515380859375,
-0.01120758056640625,
-0.0213470458984375,
0.032867431640625,
0.00799560546875,
0.038818359375,
0.0019702911376953125,
-0.048004150390625,
0.0367431640625,
0.057403564453125,
-0.01904296875,
-0.020782470703125,
0.00347137451171875,
-0.026611328125,
-0.0077972412109375,
-0.014312744140625,
-0.0146636962890625,
0.02996826171875,
-0.01253509521484375,
0.02545166015625,
-0.0278778076171875,
-0.01068115234375,
-0.030487060546875,
0.0056915283203125,
0.0357666015625,
-0.0010223388671875,
-0.0802001953125,
-0.0145111083984375,
-0.06256103515625,
-0.0229034423828125,
-0.0859375,
-0.04266357421875,
-0.03277587890625,
0.038238525390625,
0.0173797607421875,
0.020599365234375,
-0.0019512176513671875,
-0.034271240234375,
0.0018901824951171875,
0.0027923583984375,
0.0261383056640625,
-0.0019855499267578125,
0.00997161865234375,
-0.004917144775390625,
0.046478271484375,
-0.001445770263671875,
0.041717529296875,
0.00009584426879882812,
-0.00585174560546875,
-0.0299224853515625,
-0.01629638671875,
-0.0305633544921875,
0.01070404052734375,
-0.02764892578125,
0.0182647705078125,
0.015869140625,
0.037322998046875,
0.006649017333984375,
0.0219879150390625,
0.003810882568359375,
0.002483367919921875,
-0.0090484619140625,
0.0092926025390625,
0.0276641845703125,
0.0209503173828125,
0.018707275390625,
-0.057525634765625,
-0.0308990478515625,
-0.0011930465698242188,
0.0303497314453125,
0.0230560302734375,
-0.03863525390625,
-0.00007814168930053711,
0.0306549072265625,
-0.034515380859375,
0.04364013671875,
-0.018218994140625,
0.00018715858459472656,
0.004924774169921875,
-0.01519775390625,
0.00859832763671875,
-0.0328369140625,
0.01995849609375,
0.0157318115234375,
-0.0276336669921875,
0.04290771484375,
0.0011987686157226562,
-0.007663726806640625,
0.0240478515625,
-0.01922607421875,
0.00421142578125,
0.0149688720703125,
0.0650634765625,
-0.054656982421875,
0.015655517578125,
0.039581298828125,
0.001430511474609375,
-0.0140228271484375,
-0.01922607421875,
0.00490570068359375,
-0.021331787109375,
0.06915283203125,
0.0214996337890625,
0.010101318359375,
0.044342041015625,
-0.004474639892578125,
-0.0147857666015625,
-0.016937255859375,
0.038726806640625,
0.02734375,
-0.0191497802734375,
0.036224365234375,
-0.004634857177734375,
0.030487060546875,
-0.0278778076171875,
0.0343017578125,
0.00891876220703125,
-0.0121917724609375,
-0.050079345703125,
0.0246734619140625,
0.03668212890625,
-0.0197906494140625,
-0.00189208984375,
0.01189422607421875,
0.049896240234375,
0.01788330078125,
0.022796630859375,
-0.027862548828125,
-0.01386260986328125,
0.006244659423828125,
-0.01447296142578125,
-0.0226593017578125,
0.01195526123046875,
0.020355224609375,
-0.037841796875,
0.0214996337890625,
-0.0013437271118164062,
-0.0222015380859375,
-0.0057220458984375,
0.032806396484375,
0.06402587890625,
-0.0024051666259765625,
-0.03680419921875,
0.049072265625,
-0.003414154052734375,
-0.022430419921875,
-0.041748046875,
0.06207275390625,
-0.06402587890625,
-0.0209503173828125,
-0.00989532470703125,
-0.01332855224609375,
-0.050048828125,
-0.076416015625,
-0.0513916015625,
0.0767822265625,
-0.00958251953125,
0.0143280029296875,
0.020263671875,
0.0266571044921875,
-0.006626129150390625,
0.016754150390625,
-0.05224609375,
0.04931640625,
-0.0290985107421875,
0.08343505859375,
-0.054962158203125,
0.013336181640625,
0.00826263427734375,
0.002048492431640625,
0.042266845703125,
0.0048828125,
0.0283050537109375,
-0.0191497802734375,
0.0264739990234375,
0.0035266876220703125,
-0.04217529296875,
0.001560211181640625,
0.003292083740234375,
0.01806640625,
0.059326171875,
0.01377105712890625,
0.049560546875,
-0.0201568603515625,
-0.01117706298828125,
0.01419830322265625,
0.00021386146545410156,
-0.007537841796875,
-0.0203704833984375,
0.0183868408203125,
0.0114288330078125,
-0.0242462158203125,
-0.0159454345703125,
0.002857208251953125,
-0.01238250732421875,
0.036346435546875,
0.01403045654296875,
0.0217742919921875,
0.03143310546875,
-0.0174560546875,
0.048797607421875,
-0.0030040740966796875,
0.00388336181640625,
0.0263214111328125,
0.006923675537109375,
0.0236358642578125,
-0.00743865966796875,
-0.005603790283203125,
0.016357421875,
-0.006626129150390625,
0.00016558170318603516,
0.00940704345703125,
0.01509857177734375,
-0.0294342041015625,
-0.0362548828125,
-0.0014905929565429688,
0.013885498046875,
0.004322052001953125,
-0.04693603515625,
0.010284423828125,
0.0077667236328125,
0.00421905517578125,
0.0254364013671875,
0.0258026123046875,
-0.006683349609375,
0.00678253173828125,
-0.0278778076171875,
-0.003082275390625,
0.0097198486328125,
0.017822265625,
-0.00213623046875,
-0.020355224609375,
-0.00951385498046875,
-0.0189971923828125,
-0.01995849609375,
0.0191650390625,
0.01479339599609375,
0.0059356689453125,
-0.0262298583984375,
0.046478271484375,
0.0224761962890625,
0.00820159912109375,
-0.0205535888671875,
0.042633056640625,
0.010772705078125,
0.0186767578125,
-0.031707763671875,
-0.0275421142578125,
0.0172576904296875,
0.028900146484375,
0.00933074951171875,
-0.0145721435546875,
0.0174560546875,
0.020477294921875,
-0.0015125274658203125,
-0.0100555419921875,
0.0478515625,
-0.0103759765625,
0.00882720947265625,
-0.04229736328125,
0.038848876953125,
0.0196075439453125,
0.01263427734375,
-0.00537872314453125,
0.01568603515625,
0.034912109375,
0.0202789306640625,
0.0391845703125,
0.0128631591796875,
0.01036834716796875,
0.03070068359375,
-0.0225830078125,
0.037078857421875,
0.0268707275390625,
-0.07586669921875,
-0.0177459716796875,
-0.016510009765625,
-0.03173828125,
0.014862060546875,
0.038055419921875,
-0.0091400146484375,
0.0078277587890625,
0.05169677734375,
-0.0159454345703125,
0.043609619140625,
-0.0010633468627929688,
-0.0272674560546875,
0.003025054931640625,
0.050079345703125,
-0.005420684814453125,
-0.0168914794921875,
-0.0091400146484375,
-0.009307861328125,
0.033416748046875,
0.0244903564453125,
0.034332275390625,
-0.006549835205078125,
0.0277099609375,
-0.019073486328125,
0.02728271484375,
-0.0301513671875,
-0.0272369384765625,
0.024505615234375,
0.0031909942626953125,
0.0013580322265625,
-0.003997802734375,
-0.026763916015625,
0.02313232421875,
0.0091705322265625,
-0.0243377685546875,
0.0251617431640625,
-0.01175689697265625,
0.0124969482421875,
0.0055694580078125,
0.020050048828125,
-0.01363372802734375,
-0.05035400390625,
-0.0258941650390625,
0.027984619140625,
0.0235595703125,
0.06903076171875,
-0.0273590087890625,
-0.01081085205078125,
-0.0172576904296875,
-0.046600341796875,
-0.0146331787109375,
0.0151824951171875,
-0.06976318359375,
0.0121612548828125,
0.038909912109375,
-0.045806884765625,
-0.04400634765625,
-0.024566650390625,
-0.0286712646484375,
0.00847625732421875,
0.00833892822265625,
-0.0265655517578125,
-0.038299560546875,
-0.0179443359375,
0.0028934478759765625,
0.01873779296875,
-0.02569580078125,
-0.0024242401123046875,
0.0217437744140625,
-0.00519561767578125,
0.0005550384521484375,
-0.045379638671875,
-0.009613037109375,
-0.031524658203125,
-0.0096588134765625,
0.0024509429931640625,
-0.0159759521484375,
0.00124359130859375,
0.021881103515625,
0.0318603515625,
0.039459228515625,
-0.00904083251953125,
-0.04547119140625,
0.021514892578125,
-0.054229736328125,
0.052490234375,
0.004547119140625,
0.037017822265625,
-0.004405975341796875,
0.007457733154296875,
-0.0684814453125,
-0.0311737060546875,
-0.03466796875,
0.035247802734375,
-0.020965576171875,
0.028564453125,
0.042999267578125,
-0.041015625,
-0.03369140625,
0.0096435546875,
0.034027099609375,
0.054443359375,
0.01483154296875,
-0.006320953369140625,
0.0308990478515625,
-0.0167083740234375,
-0.03643798828125,
-0.043212890625,
0.01342010498046875,
-0.0557861328125,
-0.0166473388671875,
-0.020965576171875,
0.015777587890625,
0.0328369140625,
-0.032257080078125,
-0.07098388671875,
0.06109619140625,
-0.0184478759765625,
-0.02276611328125,
-0.042205810546875,
0.00353240966796875,
-0.00266265869140625,
0.026824951171875,
-0.00983428955078125,
-0.0016794204711914062,
-0.01202392578125,
0.0372314453125,
-0.01531219482421875,
0.024261474609375,
0.03912353515625,
-0.046875,
0.01140594482421875,
0.010040283203125,
0.028411865234375,
0.0090179443359375,
-0.03631591796875,
-0.0013561248779296875,
0.0313720703125,
0.0472412109375,
0.003566741943359375,
-0.01134490966796875,
0.040008544921875,
-0.0011587142944335938,
-0.0282440185546875,
-0.0567626953125,
0.043426513671875,
0.027740478515625,
0.0626220703125,
0.0114288330078125,
0.007266998291015625,
-0.07147216796875,
-0.0015544891357421875,
-0.0029582977294921875,
0.0182037353515625,
0.020965576171875,
-0.0095672607421875,
0.0006670951843261719,
0.0261688232421875,
-0.0113372802734375,
-0.02862548828125,
-0.0008840560913085938,
0.0052032470703125,
-0.051177978515625,
0.0093994140625,
-0.0185699462890625,
0.0029048919677734375,
-0.0521240234375,
-0.07025146484375,
-0.0019178390502929688,
0.020050048828125,
0.0157623291015625,
0.0081787109375,
0.0374755859375,
-0.006893157958984375,
0.0960693359375,
0.044586181640625,
0.060394287109375,
-0.0858154296875,
-0.044830322265625,
0.026153564453125,
0.0269317626953125,
0.005462646484375,
-0.050079345703125,
-0.003551483154296875,
0.0089263916015625,
0.0036106109619140625,
0.006744384765625,
-0.006954193115234375,
0.03564453125,
-0.003383636474609375,
0.033355712890625,
0.01161956787109375,
0.0193634033203125,
0.004302978515625,
0.042755126953125,
0.01483154296875,
-0.0208587646484375,
0.019989013671875,
-0.0290679931640625,
0.01020050048828125,
0.0158538818359375,
0.061065673828125,
-0.0268402099609375,
0.055084228515625,
-0.034271240234375,
0.025909423828125,
0.0150909423828125
] |
7582dcdec955635ac3c353e136963d0f4147890b
|
Wordpress Stackexchange
Q: Environment Specific Options Token Is it possible to add a token to any wp-option that could be replaced on get where the token being defined in a plugin’s option or the configure file?
E.g.
http://[[[env_token]]].sitename.com/some-page.html =>
http://staging.sitename.com/some-page.html or
http://dev.sitename/some-page.html or
http://www.sitename.com
To be more specific I am managing a Wordpress instance inside a development life cycle where I often copy production data down to staging and development servers. Often the options tables are unmanageable and have changed since the last dump. However, after analyzing what the most frequent changes are between servers I noticed it is the environmental specific tokens like dev and staging.
I am a little concerned with running a string replace on every option get, but I am making use of page, data, and object caching.
A: See the filter reference on the codex. In particular, note that you can use the form option_$foo to filter just a specific option key. So if you wanted a filter specific to the siteurl option, you could do:
add_filter( 'option_siteurl', 'my_url_filter' );
|
Q: Environment Specific Options Token Is it possible to add a token to any wp-option that could be replaced on get where the token being defined in a plugin’s option or the configure file?
E.g.
http://[[[env_token]]].sitename.com/some-page.html =>
http://staging.sitename.com/some-page.html or
http://dev.sitename/some-page.html or
http://www.sitename.com
To be more specific I am managing a Wordpress instance inside a development life cycle where I often copy production data down to staging and development servers. Often the options tables are unmanageable and have changed since the last dump. However, after analyzing what the most frequent changes are between servers I noticed it is the environmental specific tokens like dev and staging.
I am a little concerned with running a string replace on every option get, but I am making use of page, data, and object caching.
A: See the filter reference on the codex. In particular, note that you can use the form option_$foo to filter just a specific option key. So if you wanted a filter specific to the siteurl option, you could do:
add_filter( 'option_siteurl', 'my_url_filter' );
|
wordpress
|
{
"language": "en",
"length": 173,
"provenance": "stackexchange_00019.jsonl.gz:407604",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11601"
}
|
[
0.0477294921875,
-0.006732940673828125,
-0.0042266845703125,
-0.02716064453125,
0.0017309188842773438,
-0.050048828125,
0.060546875,
0.006969451904296875,
0.014434814453125,
0.0023174285888671875,
-0.01806640625,
-0.0212249755859375,
-0.0120086669921875,
-0.046783447265625,
-0.0014505386352539062,
-0.037261962890625,
0.0004949569702148438,
-0.0201873779296875,
-0.030853271484375,
-0.0474853515625,
0.00801849365234375,
-0.051300048828125,
-0.0192718505859375,
0.0293426513671875,
0.0289306640625,
-0.058990478515625,
0.0291290283203125,
-0.01800537109375,
0.03289794921875,
-0.004119873046875,
0.019439697265625,
-0.03277587890625,
-0.0004558563232421875,
0.029296875,
0.0022411346435546875,
-0.00730133056640625,
0.0408935546875,
-0.004833221435546875,
0.0028171539306640625,
0.0430908203125,
0.032958984375,
-0.0300445556640625,
0.042327880859375,
-0.0016775131225585938,
0.0217437744140625,
-0.00732421875,
0.032379150390625,
-0.038543701171875,
-0.01171875,
0.036529541015625,
0.0265960693359375,
-0.0017004013061523438,
0.0286712646484375,
0.002719879150390625,
0.005985260009765625,
-0.0014781951904296875,
0.00910186767578125,
0.027069091796875,
0.0157623291015625,
-0.016448974609375,
-0.0273284912109375,
0.0423583984375,
0.01387786865234375,
0.0201873779296875,
0.01366424560546875,
-0.00865936279296875,
0.01259613037109375,
0.01800537109375,
-0.01389312744140625,
-0.005016326904296875,
0.0178985595703125,
-0.028900146484375,
0.00746917724609375,
-0.041229248046875,
-0.020751953125,
0.0277557373046875,
-0.0027446746826171875,
0.0009279251098632812,
0.01212310791015625,
-0.027191162109375,
0.003940582275390625,
-0.01265716552734375,
0.033477783203125,
-0.0213470458984375,
0.01898193359375,
-0.006359100341796875,
-0.00698089599609375,
-0.005229949951171875,
-0.0258331298828125,
0.0107269287109375,
-0.027862548828125,
-0.01467132568359375,
0.0030193328857421875,
0.0214996337890625,
-0.0201263427734375,
0.0245361328125,
0.01113128662109375,
0.010101318359375,
0.0192718505859375,
0.0271148681640625,
0.027801513671875,
-0.046234130859375,
0.0587158203125,
-0.031402587890625,
-0.01151275634765625,
0.041656494140625,
0.038787841796875,
0.08319091796875,
0.0191802978515625,
0.01690673828125,
0.0010976791381835938,
-0.007053375244140625,
-0.0399169921875,
-0.012359619140625,
-0.031494140625,
0.00688934326171875,
-0.05426025390625,
-0.03619384765625,
-0.016876220703125,
-0.027191162109375,
0.002643585205078125,
0.0248260498046875,
0.0085296630859375,
-0.0005345344543457031,
-0.01265716552734375,
-0.017791748046875,
-0.007190704345703125,
-0.03900146484375,
-0.065673828125,
0.0204925537109375,
-0.045257568359375,
0.034332275390625,
0.07989501953125,
0.00939178466796875,
0.0013837814331054688,
-0.02532958984375,
0.03369140625,
-0.0003535747528076172,
-0.00884246826171875,
-0.00473785400390625,
0.02587890625,
0.0029430389404296875,
0.0140228271484375,
0.0003383159637451172,
0.0218048095703125,
0.0185394287109375,
0.0259552001953125,
0.001434326171875,
-0.00302886962890625,
-0.01885986328125,
-0.01251983642578125,
0.034881591796875,
0.0421142578125,
-0.009521484375,
-0.01413726806640625,
-0.0394287109375,
0.0253448486328125,
-0.058929443359375,
0.00011879205703735352,
-0.050872802734375,
-0.01161956787109375,
-0.00885772705078125,
0.00957489013671875,
0.02276611328125,
0.03515625,
0.0025634765625,
0.015594482421875,
0.0138702392578125,
0.0173187255859375,
0.0301055908203125,
-0.02154541015625,
0.017791748046875,
0.0052032470703125,
0.006328582763671875,
-0.0062713623046875,
0.0100555419921875,
-0.02215576171875,
0.0295562744140625,
0.05340576171875,
-0.038299560546875,
-0.0283050537109375,
-0.041717529296875,
0.07855224609375,
-0.0206146240234375,
-0.0557861328125,
0.00777435302734375,
0.023345947265625,
0.047210693359375,
-0.0031833648681640625,
0.00370025634765625,
0.049041748046875,
0.0117034912109375,
-0.03350830078125,
-0.01073455810546875,
-0.0215606689453125,
-0.0037708282470703125,
0.02947998046875,
0.0165252685546875,
-0.0026721954345703125,
0.018890380859375,
0.044158935546875,
0.0030670166015625,
0.032989501953125,
-0.039215087890625,
-0.023590087890625,
-0.0034351348876953125,
-0.014556884765625,
0.0355224609375,
0.017333984375,
-0.0121612548828125,
0.004802703857421875,
-0.00397491455078125,
-0.0205230712890625,
0.002895355224609375,
-0.04150390625,
0.029693603515625,
0.01180267333984375,
0.039398193359375,
0.02569580078125,
0.0203704833984375,
0.03057861328125,
0.00312042236328125,
0.0260162353515625,
-0.0121002197265625,
0.0303192138671875,
-0.0196990966796875,
0.0114898681640625,
0.0014057159423828125,
0.061676025390625,
0.00179290771484375,
0.048614501953125,
0.00274658203125,
0.046478271484375,
0.03790283203125,
-0.034820556640625,
-0.0218658447265625,
-0.0113372802734375,
-0.04248046875,
0.0096435546875,
0.057159423828125,
0.03192138671875,
0.0172119140625,
0.004669189453125,
-0.01317596435546875,
0.032806396484375,
-0.01284027099609375,
0.0272064208984375,
-0.032867431640625,
-0.01360321044921875,
0.0286102294921875,
-0.0024890899658203125,
-0.01039886474609375,
0.01316070556640625,
-0.07525634765625,
-0.0014934539794921875,
0.027740478515625,
-0.06768798828125,
-0.03509521484375,
0.01235198974609375,
-0.03558349609375,
0.0106964111328125,
-0.07421875,
-0.0114593505859375,
-0.03216552734375,
0.0276031494140625,
-0.027008056640625,
-0.0013475418090820312,
-0.01422882080078125,
-0.01122283935546875,
-0.01079559326171875,
0.013519287109375,
-0.04473876953125,
-0.00043320655822753906,
0.0194549560546875,
0.0267791748046875,
0.01375579833984375,
-0.022186279296875,
-0.001689910888671875,
-0.0145111083984375,
0.0068206787109375,
-0.004421234130859375,
0.046722412109375,
-0.0174407958984375,
-0.017333984375,
-0.0111846923828125,
-0.046142578125,
-0.007015228271484375,
0.0025691986083984375,
-0.0016908645629882812,
-0.0611572265625,
0.004077911376953125,
-0.022369384765625,
-0.034576416015625,
0.02252197265625,
-0.00273895263671875,
-0.072998046875,
0.025634765625,
-0.0452880859375,
0.0298004150390625,
-0.02777099609375,
0.0435791015625,
0.061187744140625,
0.008575439453125,
-0.008941650390625,
0.00922393798828125,
-0.03369140625,
-0.009063720703125,
-0.005428314208984375,
-0.030548095703125,
0.00826263427734375,
-0.0670166015625,
0.0194244384765625,
0.0014362335205078125,
-0.06585693359375,
0.0228271484375,
-0.0116729736328125,
-0.0306396484375,
-0.01043701171875,
-0.064697265625,
0.005748748779296875,
0.01157379150390625,
-0.0285186767578125,
-0.0095672607421875,
-0.009124755859375,
-0.0162811279296875,
0.0094757080078125,
0.0009217262268066406,
-0.0093841552734375,
-0.0101470947265625,
-0.023590087890625,
-0.0279693603515625,
-0.059326171875,
-0.07708740234375,
-0.0170135498046875,
0.0081634521484375,
0.0174713134765625,
0.005664825439453125,
0.07403564453125,
0.03204345703125,
-0.0250701904296875,
0.062225341796875,
-0.031951904296875,
-0.00888824462890625,
0.0458984375,
0.0203857421875,
-0.06768798828125,
-0.02813720703125,
-0.0228271484375,
0.051971435546875,
0.010589599609375,
0.002391815185546875,
0.0194549560546875,
-0.0066986083984375,
0.01418304443359375,
-0.0003871917724609375,
-0.033203125,
0.01361846923828125,
0.01050567626953125,
-0.0119476318359375,
-0.040679931640625,
-0.01029205322265625,
0.00992584228515625,
-0.01148223876953125,
0.009613037109375,
0.0125274658203125,
-0.038909912109375,
0.001010894775390625,
0.006591796875,
-0.005138397216796875,
-0.0362548828125,
0.06842041015625,
-0.03753662109375,
0.00659942626953125,
-0.01435089111328125,
-0.02813720703125,
-0.03485107421875,
0.06610107421875,
-0.0148162841796875,
-0.002536773681640625,
0.037384033203125,
-0.01445770263671875,
0.0135955810546875,
-0.0187530517578125,
0.0049285888671875,
-0.045654296875,
0.042266845703125,
-0.020782470703125,
0.0006241798400878906,
-0.029388427734375,
-0.0203399658203125,
-0.01198577880859375,
0.064697265625,
-0.05633544921875,
-0.013946533203125,
-0.01001739501953125,
0.0308990478515625,
-0.00237274169921875,
-0.058258056640625,
0.0012807846069335938,
-0.0266571044921875,
-0.06292724609375,
0.0161285400390625,
-0.0318603515625,
0.00019025802612304688,
-0.0008702278137207031,
-0.00794219970703125,
-0.0084991455078125,
-0.05303955078125,
0.0293731689453125,
-0.06451416015625,
0.031768798828125,
-0.00724029541015625,
0.0172576904296875,
-0.018402099609375,
-0.0194549560546875,
-0.045562744140625,
-0.041778564453125,
-0.0173797607421875,
0.0023193359375,
0.051788330078125,
0.03497314453125,
-0.0579833984375,
-0.005084991455078125,
0.041412353515625,
0.0231170654296875,
0.0020542144775390625,
0.007465362548828125,
-0.02874755859375,
-0.00868988037109375,
0.029327392578125,
0.01025390625,
-0.006298065185546875,
0.0158538818359375,
-0.009613037109375,
-0.08026123046875,
-0.01187896728515625,
-0.01299285888671875,
0.007419586181640625,
0.00994110107421875,
-0.043212890625,
-0.049713134765625,
-0.01082611083984375,
-0.0247039794921875,
-0.016845703125,
-0.0269622802734375,
-0.0175323486328125,
-0.005306243896484375,
-0.054779052734375,
0.081787109375,
0.01702880859375,
0.0173187255859375,
-0.007724761962890625,
0.058502197265625,
-0.00904083251953125,
-0.0531005859375,
-0.02374267578125,
0.04345703125,
0.01123046875,
0.003528594970703125,
0.049713134765625,
0.01027679443359375,
0.0034503936767578125,
0.030181884765625,
-0.025360107421875,
0.022003173828125,
-0.034393310546875,
0.04547119140625,
0.00226593017578125,
-0.017547607421875,
0.0291748046875,
0.01617431640625,
-0.0187530517578125,
0.033843994140625,
-0.01403045654296875,
-0.005336761474609375,
-0.040557861328125,
0.0144195556640625,
-0.004627227783203125,
0.01065826416015625,
-0.0238037109375,
-0.015228271484375,
-0.0031223297119140625,
-0.021484375,
0.0496826171875,
0.06121826171875,
-0.01435089111328125,
0.052154541015625,
0.0362548828125,
0.00296783447265625,
-0.0008902549743652344,
0.050384521484375,
-0.036590576171875,
0.040191650390625,
-0.01149749755859375,
-0.02789306640625,
-0.0301513671875,
-0.016082763671875,
0.07562255859375,
-0.016510009765625,
-0.0665283203125,
0.0199432373046875,
-0.0255126953125,
0.01544952392578125,
0.046356201171875,
0.024566650390625,
0.00493621826171875,
-0.0154876708984375,
-0.0010280609130859375,
-0.0027065277099609375,
-0.00797271728515625,
-0.0165557861328125,
-0.0188446044921875,
0.009033203125,
-0.01006317138671875,
0.00617218017578125,
0.0018873214721679688,
0.0262451171875,
-0.024658203125,
0.01031494140625,
-0.005855560302734375,
0.0150604248046875,
0.055511474609375,
-0.0106048583984375,
0.01445770263671875,
-0.0036907196044921875,
0.01175689697265625,
-0.031463623046875,
0.05859375,
-0.0153656005859375,
-0.029632568359375,
-0.0081329345703125,
0.024688720703125,
-0.01690673828125,
0.01073455810546875,
0.0304107666015625,
-0.0030269622802734375,
-0.0239410400390625,
0.0390625,
-0.00933837890625,
-0.046539306640625,
-0.038055419921875,
-0.014801025390625,
0.03326416015625,
0.0011529922485351562,
-0.0176239013671875,
-0.00873565673828125,
-0.0272064208984375,
0.004489898681640625,
0.0543212890625,
-0.01531982421875,
-0.01093292236328125,
-0.0216522216796875,
-0.01678466796875,
-0.0300750732421875,
-0.01424407958984375,
-0.0290069580078125,
-0.014923095703125,
-0.0283660888671875,
0.006092071533203125,
0.0433349609375,
-0.0285186767578125,
0.017730712890625,
0.03826904296875,
-0.0443115234375,
0.05908203125,
0.0170745849609375,
0.0170135498046875,
0.00171661376953125,
-0.0112762451171875,
-0.02020263671875,
-0.02178955078125,
-0.0159149169921875,
0.0159149169921875,
-0.002960205078125,
-0.01238250732421875,
-0.015899658203125,
0.00324249267578125,
0.031646728515625,
-0.0124969482421875,
-0.01502227783203125,
0.02215576171875,
-0.005306243896484375,
-0.00909423828125,
0.031982421875,
0.005786895751953125,
0.048095703125,
-0.0084991455078125,
0.024871826171875,
0.0225982666015625,
0.0221099853515625,
-0.011138916015625,
-0.0253448486328125,
-0.00293731689453125,
-0.0287933349609375,
-0.0187225341796875,
-0.050018310546875,
0.02392578125,
0.07452392578125,
0.10455322265625,
0.00864410400390625,
0.0345458984375,
-0.00852203369140625,
0.006595611572265625,
-0.0101165771484375,
0.0035152435302734375,
-0.054656982421875,
-0.00927734375,
0.031036376953125,
-0.01140594482421875,
0.0159149169921875,
-0.0253448486328125,
0.030853271484375,
0.015228271484375,
-0.03289794921875,
0.0113525390625,
0.03875732421875,
-0.045989990234375,
0.07183837890625,
0.1087646484375,
0.0288543701171875,
0.056427001953125,
0.0222625732421875,
0.016387939453125,
0.01058197021484375,
0.00933074951171875,
-0.0127716064453125,
-0.01220703125,
0.022216796875,
-0.0017194747924804688,
-0.01087188720703125,
0.01092529296875,
-0.01092529296875,
0.0211029052734375,
0.034332275390625,
0.022979736328125,
-0.061920166015625,
0.007781982421875,
-0.006870269775390625,
-0.005695343017578125,
0.04052734375,
0.0146331787109375,
-0.0207672119140625,
-0.005218505859375,
0.017791748046875,
-0.006107330322265625,
-0.02484130859375,
0.019500732421875,
0.0421142578125,
-0.018890380859375,
-0.0292205810546875,
0.0033779144287109375,
0.00601959228515625,
-0.02642822265625,
0.0282440185546875,
0.01439666748046875,
0.00689697265625,
-0.0167083740234375,
-0.0204315185546875,
0.019927978515625,
-0.038330078125,
-0.0802001953125,
-0.00994873046875,
-0.0462646484375,
-0.0126953125,
0.01306915283203125,
-0.00664520263671875,
0.04541015625,
0.02081298828125,
0.016510009765625,
-0.045654296875,
0.007221221923828125,
-0.035003662109375,
0.039154052734375,
0.0020771026611328125,
0.004791259765625,
0.017974853515625,
-0.007022857666015625,
-0.0008602142333984375,
-0.00021517276763916016,
0.002933502197265625,
0.007228851318359375,
0.01137542724609375,
0.0252532958984375,
-0.006107330322265625,
-0.018707275390625,
0.04364013671875,
0.007755279541015625,
-0.0233001708984375,
0.0312042236328125,
-0.0183258056640625,
-0.02587890625,
-0.058074951171875,
-0.00208282470703125,
-0.10797119140625,
0.03741455078125,
0.01338958740234375,
-0.0321044921875,
0.094970703125,
0.01232147216796875,
0.00835418701171875,
0.047607421875,
0.04052734375,
-0.080322265625,
0.0037860870361328125,
-0.020965576171875,
0.05389404296875,
0.00791168212890625,
0.007266998291015625,
-0.058837890625,
-0.01268768310546875,
0.0016689300537109375,
0.036285400390625,
0.054595947265625,
0.0242462158203125,
-0.058624267578125,
-0.0259552001953125,
-0.004634857177734375,
0.00353240966796875,
-0.0245513916015625,
0.09246826171875,
0.0160064697265625,
0.061767578125,
0.052032470703125,
-0.06085205078125,
0.042999267578125,
-0.06622314453125,
0.035491943359375,
0.0159149169921875,
0.0215606689453125,
0.040496826171875,
-0.026641845703125,
0.0102081298828125,
0.00336456298828125,
-0.023529052734375,
0.01506805419921875,
-0.06011962890625,
0.0204010009765625,
-0.00928497314453125,
0.006023406982421875,
-0.007312774658203125,
-0.06591796875,
0.0089263916015625,
0.01419830322265625,
0.00894927978515625,
-0.004497528076171875,
0.0256805419921875,
0.0026340484619140625,
0.0059814453125,
0.03546142578125,
0.0057830810546875,
0.0100250244140625,
0.0213775634765625,
0.060333251953125,
0.026580810546875,
0.033477783203125,
0.0153961181640625,
0.10125732421875,
-0.01389312744140625,
0.02960205078125,
-0.07440185546875,
-0.035125732421875,
-0.006214141845703125,
-0.0240325927734375,
0.027679443359375,
-0.003673553466796875,
0.04156494140625,
-0.0007219314575195312,
-0.01520538330078125,
-0.0284576416015625,
0.03094482421875,
0.0260467529296875,
0.021820068359375,
-0.0176239013671875,
0.0242919921875,
-0.05914306640625,
0.0400390625,
-0.0458984375,
-0.003185272216796875,
0.037933349609375,
0.06036376953125,
0.0247039794921875,
0.041259765625,
0.02362060546875,
-0.0193939208984375,
-0.0347900390625,
0.053436279296875,
0.016143798828125,
0.03948974609375,
-0.023345947265625,
0.002262115478515625,
0.01168060302734375,
0.015655517578125,
0.01329803466796875,
0.00768280029296875,
0.04742431640625,
0.037139892578125,
-0.043304443359375,
-0.0220489501953125,
0.0205078125,
-0.019805908203125,
0.042572021484375,
-0.03973388671875,
0.0421142578125,
0.0106658935546875,
-0.0165557861328125,
-0.0198974609375,
0.01207733154296875,
0.03338623046875,
-0.0161285400390625,
0.0254669189453125,
-0.007465362548828125,
-0.024078369140625,
0.040313720703125,
-0.00827789306640625,
0.062347412109375,
0.005199432373046875,
0.007320404052734375,
0.007843017578125,
-0.011566162109375,
-0.040374755859375,
-0.01221466064453125,
0.030548095703125,
0.020294189453125,
0.0026302337646484375,
-0.0216064453125,
0.01004791259765625,
-0.01404571533203125,
0.0037384033203125,
-0.0111083984375,
-0.0220794677734375,
0.0303802490234375,
-0.0128021240234375,
0.0051727294921875,
-0.006023406982421875,
0.019744873046875,
0.03131103515625,
0.01336669921875,
0.07781982421875,
-0.040191650390625,
0.01221466064453125,
0.008148193359375,
0.006404876708984375,
-0.01611328125,
0.0147857666015625,
-0.0011262893676757812,
-0.0007824897766113281,
0.026611328125,
0.0006656646728515625,
-0.02642822265625,
0.00670623779296875,
0.009246826171875,
-0.029632568359375,
0.0399169921875,
-0.058349609375,
0.0151214599609375,
-0.0213775634765625,
0.0313720703125,
-0.007747650146484375,
-0.042633056640625,
-0.04205322265625,
0.01580810546875,
0.03155517578125,
0.0810546875,
-0.008575439453125,
0.017486572265625,
0.0111541748046875,
0.031463623046875,
0.005084991455078125,
0.027130126953125,
0.00955963134765625,
0.0238494873046875,
-0.05560302734375,
0.03857421875,
0.011749267578125,
-0.0224761962890625,
0.0187225341796875,
0.0168609619140625,
-0.0241546630859375,
0.01073455810546875,
-0.002765655517578125,
-0.05841064453125,
-0.0294036865234375,
0.00612640380859375,
-0.00018835067749023438,
0.01233673095703125,
-0.038665771484375,
0.0006480216979980469,
-0.01178741455078125,
-0.07147216796875,
-0.03814697265625,
-0.0266571044921875,
-0.0081634521484375,
0.029998779296875,
0.01297760009765625,
-0.06622314453125,
-0.03924560546875,
-0.018768310546875,
-0.01212310791015625,
0.026031494140625,
-0.06561279296875,
0.052520751953125,
0.01348876953125,
-0.0161895751953125,
-0.024566650390625,
0.046600341796875,
-0.0237884521484375,
-0.01143646240234375,
-0.051361083984375,
-0.0235443115234375,
-0.03643798828125,
0.039031982421875,
-0.01438140869140625,
-0.0129852294921875,
0.03662109375,
0.00772857666015625,
-0.044708251953125,
-0.00835418701171875,
-0.040435791015625,
0.045166015625,
-0.078857421875,
-0.007793426513671875,
0.0159454345703125,
0.0002181529998779297,
-0.06280517578125,
-0.05096435546875,
0.04681396484375,
-0.064453125,
-0.0228729248046875,
0.04705810546875,
-0.02349853515625,
0.0035266876220703125,
-0.050811767578125,
-0.1343994140625,
0.049713134765625,
-0.00232696533203125,
-0.0657958984375,
-0.07623291015625,
-0.0193328857421875,
-0.0103912353515625,
0.048980712890625,
-0.01727294921875,
-0.030792236328125,
-0.0506591796875,
0.049407958984375,
0.02056884765625,
-0.00507354736328125,
0.03155517578125,
0.0134735107421875,
-0.0171966552734375,
0.0288238525390625,
0.03656005859375,
0.0037994384765625,
0.005401611328125,
-0.00917816162109375,
0.0245361328125,
0.055328369140625,
0.0021114349365234375,
-0.0340576171875,
0.006671905517578125,
-0.07171630859375,
-0.027252197265625,
0.0022754669189453125,
-0.01261138916015625,
0.01351165771484375,
0.06365966796875,
0.093505859375,
0.0196075439453125,
-0.044281005859375,
-0.041259765625,
-0.017852783203125,
0.01177978515625,
-0.025482177734375,
0.014251708984375,
-0.0728759765625,
-0.0220184326171875,
0.0030918121337890625,
0.01543426513671875,
-0.0025539398193359375,
-0.0139617919921875,
-0.005626678466796875,
-0.01113128662109375,
0.021759033203125,
0.00330352783203125,
-0.022918701171875,
-0.0245819091796875,
0.058319091796875,
-0.03875732421875,
-0.00262451171875,
0.00611114501953125,
0.0223388671875,
0.035491943359375,
0.01137542724609375,
-0.0258331298828125,
-0.0211944580078125,
-0.00942230224609375,
0.041473388671875,
-0.0160675048828125,
0.0240020751953125,
-0.03472900390625,
0.0028743743896484375,
-0.064208984375,
0.01529693603515625,
0.037872314453125,
0.003803253173828125,
-0.037445068359375,
0.037506103515625,
0.041412353515625,
0.050079345703125,
-0.038116455078125,
0.033477783203125,
-0.003925323486328125,
0.0013904571533203125,
-0.006397247314453125,
0.0056610107421875,
0.0455322265625,
-0.0209503173828125,
0.00272369384765625,
-0.005413055419921875,
-0.031158447265625,
-0.0518798828125,
0.01271820068359375,
-0.026031494140625,
-0.01168060302734375,
0.021392822265625
] |
58e1d9ed361a1229d837291abc0b4c1d016f2e85
|
Wordpress Stackexchange
Q: Custom Post Type Archives with 0 Posts Redirects as 404 I'm working with the new custom post type archives in 3.1 and I noticed that when my post type has 0 posts, the archive for the type results in a 404. Looking at the order of hooks being processed, it's redirecting to the 404 template before even processing my archive-{post_type}.php template and reaching the conditional for available posts.
Reading various articles and questions here had clued me in on flushing the permalink state after creating my types. This shouldn't be an issue, however, as the archive page works if posts for the type exist. I even went as far as setting my has_archive value to the post type slug rather than just true to no avail.
Is there a way to force the archive template to be loaded and not generate a 404 regardless of post count while keeping the query in place?
A: An FYI for those coming back to this question, this was fixed in 3.2: http://core.trac.wordpress.org/ticket/17316
|
Q: Custom Post Type Archives with 0 Posts Redirects as 404 I'm working with the new custom post type archives in 3.1 and I noticed that when my post type has 0 posts, the archive for the type results in a 404. Looking at the order of hooks being processed, it's redirecting to the 404 template before even processing my archive-{post_type}.php template and reaching the conditional for available posts.
Reading various articles and questions here had clued me in on flushing the permalink state after creating my types. This shouldn't be an issue, however, as the archive page works if posts for the type exist. I even went as far as setting my has_archive value to the post type slug rather than just true to no avail.
Is there a way to force the archive template to be loaded and not generate a 404 regardless of post count while keeping the query in place?
A: An FYI for those coming back to this question, this was fixed in 3.2: http://core.trac.wordpress.org/ticket/17316
|
wordpress
|
{
"language": "en",
"length": 170,
"provenance": "stackexchange_00019.jsonl.gz:407606",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11607"
}
|
[
0.058563232421875,
0.007190704345703125,
0.0027408599853515625,
-0.018096923828125,
0.01105499267578125,
-0.0113677978515625,
0.052276611328125,
-0.0310211181640625,
0.0213470458984375,
0.0079803466796875,
0.0113677978515625,
-0.01251983642578125,
0.0166473388671875,
-0.04351806640625,
0.00849151611328125,
0.005893707275390625,
0.0400390625,
-0.048583984375,
0.022857666015625,
-0.032470703125,
0.029998779296875,
-0.01904296875,
0.05157470703125,
0.0230560302734375,
0.00469207763671875,
0.0014276504516601562,
0.07281494140625,
-0.0250091552734375,
0.00405120849609375,
-0.01479339599609375,
0.0131988525390625,
-0.0033473968505859375,
0.0215301513671875,
-0.002315521240234375,
0.02093505859375,
0.04876708984375,
-0.00673675537109375,
0.0175018310546875,
0.0101165771484375,
-0.00411224365234375,
0.013214111328125,
-0.00992584228515625,
0.04949951171875,
-0.005245208740234375,
0.006916046142578125,
0.0019741058349609375,
-0.005695343017578125,
-0.05377197265625,
0.0233154296875,
-0.00769805908203125,
-0.004741668701171875,
0.0186767578125,
0.017578125,
-0.06268310546875,
-0.00724029541015625,
0.004528045654296875,
-0.0183868408203125,
0.0160064697265625,
0.01904296875,
-0.030792236328125,
0.0035991668701171875,
0.012542724609375,
0.01346588134765625,
0.03509521484375,
-0.01125335693359375,
0.0098876953125,
-0.0165863037109375,
-0.0016260147094726562,
-0.031585693359375,
-0.0031585693359375,
0.015472412109375,
-0.0303497314453125,
0.0234375,
-0.0192718505859375,
-0.0229339599609375,
-0.034332275390625,
0.047210693359375,
-0.016998291015625,
-0.016265869140625,
-0.000047147274017333984,
0.0006136894226074219,
-0.02166748046875,
0.031402587890625,
-0.03948974609375,
0.01271820068359375,
-0.00995635986328125,
-0.0115509033203125,
-0.003719329833984375,
0.01409149169921875,
-0.0174407958984375,
-0.0057830810546875,
-0.041412353515625,
0.01523590087890625,
0.0333251953125,
-0.00778961181640625,
-0.04248046875,
0.034088134765625,
0.045623779296875,
-0.0010271072387695312,
-0.00444793701171875,
0.0067291259765625,
-0.046783447265625,
0.017120361328125,
-0.02777099609375,
0.039459228515625,
-0.0082550048828125,
-0.01068115234375,
-0.0059661865234375,
0.0767822265625,
0.01666259765625,
-0.0210113525390625,
0.0931396484375,
-0.006572723388671875,
-0.006534576416015625,
-0.0194091796875,
0.008056640625,
-0.02447509765625,
0.0009207725524902344,
-0.0151214599609375,
0.01214599609375,
-0.00885009765625,
0.0218353271484375,
0.039794921875,
-0.00647735595703125,
0.01151275634765625,
0.0011224746704101562,
-0.0033283233642578125,
-0.06500244140625,
0.09521484375,
0.0271759033203125,
-0.0298309326171875,
0.01373291015625,
-0.004482269287109375,
-0.044891357421875,
-0.035400390625,
-0.018035888671875,
0.02264404296875,
-0.052520751953125,
-0.0160980224609375,
0.01366424560546875,
0.02056884765625,
-0.02911376953125,
-0.0201873779296875,
0.005420684814453125,
0.0193023681640625,
0.067626953125,
0.035003662109375,
-0.0239715576171875,
-0.039031982421875,
-0.0592041015625,
-0.0241546630859375,
-0.0172119140625,
0.064697265625,
-0.0063018798828125,
-0.0406494140625,
-0.0516357421875,
0.0311126708984375,
-0.042938232421875,
-0.0174713134765625,
-0.080810546875,
0.04168701171875,
-0.005016326904296875,
-0.035064697265625,
-0.01409149169921875,
-0.0650634765625,
0.0296783447265625,
-0.0003294944763183594,
-0.0028285980224609375,
0.017730712890625,
0.01226806640625,
0.01412200927734375,
-0.021484375,
-0.0289154052734375,
0.014434814453125,
0.005878448486328125,
0.0038700103759765625,
0.03790283203125,
-0.007762908935546875,
0.00038814544677734375,
0.0214691162109375,
-0.01137542724609375,
-0.031036376953125,
-0.003662109375,
-0.016265869140625,
-0.061614990234375,
0.03912353515625,
0.033203125,
0.056671142578125,
-0.0093994140625,
0.0077972412109375,
0.03741455078125,
0.06390380859375,
-0.06884765625,
0.032684326171875,
-0.00872039794921875,
0.00550079345703125,
-0.0286865234375,
-0.005825042724609375,
-0.016876220703125,
0.0177764892578125,
-0.03741455078125,
0.0279388427734375,
-0.01580810546875,
0.017913818359375,
-0.0157928466796875,
0.0269927978515625,
-0.015167236328125,
0.0360107421875,
-0.007190704345703125,
0.03192138671875,
0.024169921875,
0.00983428955078125,
-0.05963134765625,
0.0496826171875,
0.0175933837890625,
0.0216064453125,
-0.0186614990234375,
0.0024394989013671875,
-0.0489501953125,
0.0135955810546875,
-0.026702880859375,
-0.045379638671875,
-0.04010009765625,
0.054840087890625,
0.04559326171875,
0.0011110305786132812,
-0.0164337158203125,
-0.013397216796875,
0.04425048828125,
0.032440185546875,
-0.044952392578125,
0.007022857666015625,
0.0174560546875,
-0.0234375,
-0.066650390625,
-0.0015716552734375,
-0.0230865478515625,
-0.01251220703125,
-0.01184844970703125,
0.0631103515625,
0.004314422607421875,
0.051910400390625,
-0.019927978515625,
0.0137176513671875,
0.027008056640625,
-0.01134490966796875,
0.0285186767578125,
-0.0026912689208984375,
0.03289794921875,
0.01149749755859375,
-0.0028533935546875,
-0.02392578125,
0.029449462890625,
0.01045989990234375,
0.032440185546875,
0.021636962890625,
0.01558685302734375,
-0.005809783935546875,
0.01386260986328125,
0.01209259033203125,
0.0033359527587890625,
0.0290374755859375,
-0.0264892578125,
0.00859832763671875,
0.00830841064453125,
0.038116455078125,
0.040313720703125,
0.043975830078125,
-0.03814697265625,
0.021148681640625,
0.01305389404296875,
0.0228118896484375,
0.0024814605712890625,
0.0237884521484375,
0.0260467529296875,
0.03070068359375,
-0.039794921875,
-0.00305938720703125,
0.03326416015625,
0.0308380126953125,
-0.03253173828125,
0.019989013671875,
-0.063720703125,
-0.009246826171875,
-0.038604736328125,
-0.054229736328125,
0.003376007080078125,
0.044403076171875,
-0.0199432373046875,
-0.017730712890625,
0.01027679443359375,
0.01525115966796875,
-0.00997161865234375,
-0.01348876953125,
0.03558349609375,
-0.0177154541015625,
-0.031768798828125,
-0.09368896484375,
0.06842041015625,
-0.0718994140625,
0.06463623046875,
0.09185791015625,
-0.0235748291015625,
0.0289154052734375,
0.019439697265625,
0.016876220703125,
0.0001881122589111328,
0.05517578125,
0.016387939453125,
-0.0333251953125,
-0.0325927734375,
-0.007415771484375,
0.0411376953125,
0.043792724609375,
0.022735595703125,
0.0029048919677734375,
0.0205535888671875,
0.055938720703125,
-0.005344390869140625,
-0.0601806640625,
0.05963134765625,
-0.06787109375,
0.033172607421875,
-0.05206298828125,
-0.0245819091796875,
-0.050994873046875,
-0.0181732177734375,
0.01401519775390625,
0.019866943359375,
-0.007625579833984375,
-0.07049560546875,
-0.048248291015625,
-0.1007080078125,
-0.0221710205078125,
0.001651763916015625,
0.02838134765625,
0.00945281982421875,
0.0548095703125,
0.0022983551025390625,
-0.0828857421875,
0.0268402099609375,
0.01384735107421875,
-0.0178985595703125,
0.050872802734375,
0.017486572265625,
-0.006633758544921875,
0.01392364501953125,
0.0252532958984375,
0.01934814453125,
0.036895751953125,
-0.039337158203125,
-0.04052734375,
0.005035400390625,
-0.02734375,
0.00980377197265625,
0.05572509765625,
-0.002735137939453125,
-0.029052734375,
0.035430908203125,
-0.0498046875,
-0.0394287109375,
-0.0234375,
-0.052734375,
0.002288818359375,
0.044464111328125,
-0.0103912353515625,
-0.058685302734375,
0.027313232421875,
-0.03582763671875,
-0.0080718994140625,
0.0175933837890625,
-0.039306640625,
0.0450439453125,
-0.01532745361328125,
-0.036224365234375,
-0.0160675048828125,
0.02947998046875,
-0.0222320556640625,
0.006458282470703125,
0.0158843994140625,
-0.00322723388671875,
0.0022602081298828125,
-0.033203125,
-0.0260162353515625,
-0.0440673828125,
0.047271728515625,
-0.0440673828125,
-0.00665283203125,
-0.04510498046875,
-0.018829345703125,
-0.021087646484375,
0.06573486328125,
-0.01387786865234375,
-0.0004532337188720703,
-0.0257568359375,
-0.01239013671875,
0.04180908203125,
-0.05511474609375,
-0.0020961761474609375,
-0.024017333984375,
-0.02252197265625,
0.0023593902587890625,
-0.022796630859375,
-0.007709503173828125,
-0.00881195068359375,
-0.030059814453125,
0.00228118896484375,
-0.04168701171875,
0.01537322998046875,
-0.037933349609375,
-0.00769805908203125,
-0.0089874267578125,
-0.0043182373046875,
-0.05718994140625,
-0.00003546476364135742,
-0.040771484375,
-0.091552734375,
-0.0186767578125,
0.001117706298828125,
0.046966552734375,
-0.0156707763671875,
0.00794219970703125,
-0.0204010009765625,
0.038818359375,
0.01904296875,
0.02880859375,
-0.01534271240234375,
0.00806427001953125,
-0.057647705078125,
-0.03460693359375,
-0.0036640167236328125,
-0.035064697265625,
0.0073699951171875,
-0.004108428955078125,
-0.038543701171875,
-0.004878997802734375,
-0.032379150390625,
-0.0101776123046875,
-0.007534027099609375,
-0.047027587890625,
-0.0174713134765625,
-0.02337646484375,
0.007305145263671875,
0.037628173828125,
0.019012451171875,
-0.006862640380859375,
-0.05181884765625,
-0.0322265625,
-0.00799560546875,
-0.01282501220703125,
-0.01242828369140625,
0.023651123046875,
0.028411865234375,
0.0245819091796875,
-0.0009565353393554688,
-0.03558349609375,
0.00878143310546875,
-0.005626678466796875,
-0.0170135498046875,
0.038330078125,
-0.0270233154296875,
0.00754547119140625,
0.040496826171875,
-0.058319091796875,
-0.0176849365234375,
-0.010955810546875,
0.037506103515625,
-0.01113128662109375,
-0.03179931640625,
0.028961181640625,
-0.04180908203125,
0.025543212890625,
0.048248291015625,
0.0189666748046875,
-0.04345703125,
0.020721435546875,
0.062225341796875,
-0.035308837890625,
0.0159912109375,
-0.0360107421875,
-0.01332855224609375,
0.0163421630859375,
0.038818359375,
0.0196075439453125,
0.028228759765625,
-0.0117645263671875,
0.018585205078125,
-0.017364501953125,
-0.0124359130859375,
-0.002025604248046875,
0.00199127197265625,
0.0206451416015625,
0.0150604248046875,
0.0110015869140625,
-0.0006608963012695312,
-0.0023441314697265625,
-0.003795623779296875,
0.013275146484375,
-0.0100250244140625,
-0.044219970703125,
-0.0164031982421875,
-0.0160980224609375,
0.0015735626220703125,
0.020660400390625,
-0.04046630859375,
0.038604736328125,
0.05023193359375,
-0.00905609130859375,
0.0173797607421875,
-0.045135498046875,
0.023284912109375,
-0.053863525390625,
0.0221710205078125,
0.020477294921875,
-0.006900787353515625,
-0.0171356201171875,
0.03558349609375,
0.078369140625,
-0.025726318359375,
-0.025299072265625,
-0.029327392578125,
-0.040252685546875,
0.0743408203125,
0.04254150390625,
-0.059356689453125,
-0.01080322265625,
0.058868408203125,
0.006420135498046875,
-0.05645751953125,
-0.0046234130859375,
0.01192474365234375,
0.050262451171875,
0.0109100341796875,
-0.025634765625,
0.0262298583984375,
-0.0203399658203125,
0.0012836456298828125,
0.006313323974609375,
-0.0303497314453125,
-0.044464111328125,
-0.0235443115234375,
-0.0191802978515625,
0.03643798828125,
-0.0300140380859375,
-0.0543212890625,
0.05352783203125,
-0.047576904296875,
0.02667236328125,
0.0256500244140625,
-0.039642333984375,
0.03460693359375,
0.04168701171875,
0.006855010986328125,
-0.054443359375,
-0.007354736328125,
0.008392333984375,
0.052490234375,
-0.041107177734375,
-0.022186279296875,
0.034820556640625,
-0.034515380859375,
0.00891876220703125,
-0.0116424560546875,
-0.007389068603515625,
0.010711669921875,
0.0120391845703125,
0.043182373046875,
0.00672149658203125,
-0.03375244140625,
-0.003833770751953125,
-0.02496337890625,
-0.020477294921875,
0.00699615478515625,
-0.035400390625,
-0.02325439453125,
0.001262664794921875,
0.03717041015625,
0.01090240478515625,
0.0017910003662109375,
-0.06524658203125,
-0.0086822509765625,
0.0101165771484375,
0.042327880859375,
-0.0004992485046386719,
-0.01178741455078125,
0.043548583984375,
-0.04974365234375,
0.0187530517578125,
-0.0301361083984375,
0.00954437255859375,
0.0004799365997314453,
0.0034732818603515625,
0.0006814002990722656,
-0.050537109375,
-0.0215301513671875,
0.00838470458984375,
-0.01200103759765625,
0.025665283203125,
0.022247314453125,
0.0043182373046875,
-0.0474853515625,
0.00864410400390625,
0.002918243408203125,
-0.0302734375,
0.058258056640625,
0.05596923828125,
0.0099945068359375,
-0.0284576416015625,
0.00585174560546875,
0.0297698974609375,
-0.0013380050659179688,
-0.041351318359375,
-0.008148193359375,
0.019500732421875,
-0.00766754150390625,
0.00435638427734375,
-0.017364501953125,
0.061492919921875,
0.03662109375,
0.0023403167724609375,
0.03173828125,
-0.01189422607421875,
0.0031185150146484375,
-0.0095672607421875,
0.006725311279296875,
0.030120849609375,
-0.0169219970703125,
0.0626220703125,
0.004322052001953125,
-0.0250396728515625,
0.03173828125,
-0.044158935546875,
0.01058197021484375,
0.03619384765625,
0.024383544921875,
-0.0782470703125,
0.004894256591796875,
0.002490997314453125,
-0.0085601806640625,
-0.00836181640625,
-0.0160980224609375,
-0.001644134521484375,
-0.030487060546875,
0.019744873046875,
0.004955291748046875,
-0.0293731689453125,
-0.01568603515625,
-0.00007218122482299805,
0.0030765533447265625,
0.0009984970092773438,
0.02728271484375,
0.00592041015625,
-0.0196380615234375,
0.00930023193359375,
0.0043182373046875,
0.0187225341796875,
-0.00044989585876464844,
0.02142333984375,
-0.043670654296875,
-0.002902984619140625,
-0.0264434814453125,
-0.0017786026000976562,
-0.03131103515625,
0.0001138448715209961,
0.01995849609375,
0.0016279220581054688,
0.0209808349609375,
0.036468505859375,
-0.00952911376953125,
0.0226898193359375,
0.00007063150405883789,
-0.0257720947265625,
-0.0540771484375,
-0.0633544921875,
-0.0009069442749023438,
0.0391845703125,
-0.0115966796875,
0.035369873046875,
0.0192413330078125,
-0.043426513671875,
-0.0086822509765625,
0.01279449462890625,
0.0673828125,
-0.046173095703125,
-0.0091094970703125,
0.031951904296875,
0.0276031494140625,
-0.006866455078125,
0.00226593017578125,
0.0012807846069335938,
-0.039093017578125,
0.0022296905517578125,
-0.0063018798828125,
0.018218994140625,
-0.009857177734375,
0.0221710205078125,
-0.0205841064453125,
0.10107421875,
-0.034942626953125,
-0.0007238388061523438,
0.022857666015625,
0.05126953125,
0.01030731201171875,
0.056976318359375,
-0.00725555419921875,
0.04302978515625,
-0.0188140869140625,
0.011749267578125,
-0.0289306640625,
0.00734710693359375,
0.0017690658569335938,
0.03228759765625,
0.025634765625,
-0.01047515869140625,
-0.004913330078125,
0.01030731201171875,
0.06976318359375,
0.0291748046875,
0.0085296630859375,
-0.002147674560546875,
-0.00037932395935058594,
0.01227569580078125,
0.031829833984375,
0.0216217041015625,
0.048431396484375,
0.0015344619750976562,
-0.0618896484375,
0.00011813640594482422,
0.008758544921875,
0.00814056396484375,
-0.0143280029296875,
-0.02850341796875,
-0.04315185546875,
-0.005767822265625,
0.0367431640625,
0.0016241073608398438,
0.00704193115234375,
0.0194854736328125,
0.042266845703125,
-0.076171875,
0.0086517333984375,
-0.04168701171875,
0.04925537109375,
0.00847625732421875,
-0.01042938232421875,
-0.012298583984375,
-0.0014276504516601562,
0.03900146484375,
-0.09393310546875,
-0.0316162109375,
-0.00606536865234375,
-0.0225372314453125,
0.050201416015625,
0.03973388671875,
0.0185699462890625,
-0.01381683349609375,
0.0216827392578125,
0.058502197265625,
0.0684814453125,
-0.058074951171875,
-0.07135009765625,
0.0061492919921875,
0.0157012939453125,
0.0195465087890625,
0.03515625,
0.024078369140625,
0.02801513671875,
0.061859130859375,
-0.01161956787109375,
-0.0087738037109375,
-0.0207672119140625,
0.025421142578125,
-0.0123291015625,
-0.0145721435546875,
0.006969451904296875,
-0.0050201416015625,
-0.0223388671875,
-0.03546142578125,
0.008148193359375,
0.0673828125,
0.038970947265625,
0.026214599609375,
-0.0364990234375,
-0.02630615234375,
0.006916046142578125,
-0.006587982177734375,
-0.038177490234375,
0.012939453125,
-0.0345458984375,
-0.0256500244140625,
0.001392364501953125,
0.0469970703125,
0.019287109375,
-0.016326904296875,
0.046905517578125,
0.032867431640625,
-0.020233154296875,
-0.01325225830078125,
-0.0203094482421875,
-0.007205963134765625,
-0.020294189453125,
-0.003963470458984375,
0.004657745361328125,
0.028167724609375,
-0.00472259521484375,
0.00383758544921875,
0.036224365234375,
0.0264892578125,
0.0012502670288085938,
0.01094818115234375,
0.01031494140625,
-0.050537109375,
0.04052734375,
-0.005283355712890625,
0.1092529296875,
0.03369140625,
-0.0550537109375,
-0.03594970703125,
0.0140380859375,
-0.0391845703125,
0.02032470703125,
0.0506591796875,
-0.00589752197265625,
-0.0113525390625,
0.0264434814453125,
-0.01226043701171875,
-0.02899169921875,
-0.012664794921875,
0.055511474609375,
-0.0005574226379394531,
-0.011962890625,
0.043060302734375,
-0.035919189453125,
-0.031982421875,
0.0104522705078125,
0.03253173828125,
-0.0177001953125,
0.083984375,
-0.032928466796875,
-0.006725311279296875,
0.0049896240234375,
0.056396484375,
-0.05615234375,
0.005756378173828125,
0.0005478858947753906,
-0.007610321044921875,
0.036773681640625,
-0.0136871337890625,
-0.035858154296875,
0.0042724609375,
0.052947998046875,
-0.043060302734375,
-0.0035533905029296875,
0.0036029815673828125,
0.020233154296875,
-0.033172607421875,
-0.03778076171875,
-0.053070068359375,
-0.057769775390625,
-0.04644775390625,
-0.006916046142578125,
-0.004947662353515625,
-0.030181884765625,
-0.0208892822265625,
0.0662841796875,
-0.011505126953125,
-0.048736572265625,
0.0272064208984375,
-0.0859375,
0.037567138671875,
0.035186767578125,
0.0311279296875,
-0.0109710693359375,
0.0018453598022460938,
-0.015655517578125,
0.007404327392578125,
0.0077972412109375,
0.024444580078125,
-0.004199981689453125,
0.0139923095703125,
-0.00528717041015625,
-0.041473388671875,
0.0218048095703125,
-0.0030231475830078125,
-0.0106353759765625,
-0.03131103515625,
0.00357818603515625,
-0.0265045166015625,
0.0024623870849609375,
-0.02984619140625,
-0.003269195556640625,
-0.00797271728515625,
-0.0064544677734375,
0.02276611328125,
-0.02874755859375,
-0.0252532958984375,
0.004817962646484375,
0.0217132568359375,
-0.00019741058349609375,
-0.05059814453125,
0.04736328125,
-0.04681396484375,
0.0035228729248046875,
-0.0161590576171875,
0.01515960693359375,
0.016082763671875,
0.07672119140625,
0.008209228515625,
-0.0011034011840820312,
-0.0019893646240234375,
0.00988006591796875,
-0.003459930419921875,
0.00653839111328125,
0.03363037109375,
-0.0188751220703125,
-0.015838623046875,
-0.042205810546875,
-0.0083465576171875,
0.014434814453125,
-0.0084228515625,
0.007236480712890625,
0.0390625,
-0.0204010009765625,
-0.035980224609375,
-0.051849365234375,
0.02569580078125,
-0.054718017578125,
-0.047088623046875,
-0.0029735565185546875,
-0.00714874267578125,
0.01270294189453125,
-0.0218505859375,
-0.042236328125,
0.066650390625,
-0.002712249755859375,
-0.0107269287109375,
-0.058563232421875,
0.03656005859375,
0.022125244140625,
-0.03564453125,
-0.0250244140625,
0.0014286041259765625,
-0.0259857177734375,
0.00860595703125,
-0.01183319091796875,
0.021697998046875,
0.020965576171875,
0.0018129348754882812,
-0.0281829833984375,
0.0035991668701171875,
0.01678466796875,
-0.029632568359375,
-0.00261688232421875,
0.0024852752685546875,
0.015960693359375,
0.033966064453125,
-0.05364990234375,
0.040863037109375,
-0.01763916015625,
0.057464599609375,
0.00628662109375,
-0.01507568359375,
-0.0633544921875,
-0.061553955078125,
0.07684326171875,
0.0211029052734375,
0.0223388671875,
0.00765228271484375,
-0.0426025390625,
-0.031524658203125,
-0.04547119140625,
-0.0308990478515625,
0.0343017578125,
-0.0732421875,
0.005615234375,
-0.0014963150024414062,
-0.0140228271484375,
0.0021514892578125,
-0.03460693359375,
-0.020355224609375,
0.007904052734375,
-0.015594482421875,
-0.0097198486328125,
0.019866943359375,
0.0159759521484375,
0.0013475418090820312,
0.006801605224609375,
0.009521484375,
-0.01995849609375,
0.0016765594482421875,
0.005344390869140625,
-0.0079193115234375,
-0.0274810791015625,
-0.006649017333984375,
-0.006488800048828125,
0.02618408203125,
-0.01108551025390625,
0.0268402099609375,
-0.03656005859375,
0.00951385498046875,
0.0121917724609375,
-0.00740814208984375,
-0.016082763671875,
-0.02301025390625,
0.037200927734375,
-0.0092620849609375,
-0.0190582275390625,
0.01428985595703125,
0.0175933837890625,
0.00763702392578125,
0.0006494522094726562,
0.047271728515625,
-0.033599853515625,
-0.016937255859375,
-0.047607421875,
-0.00749969482421875,
-0.0007047653198242188,
0.0142974853515625,
0.005519866943359375,
-0.051513671875,
0.0283203125,
0.01519775390625,
0.021759033203125,
0.022216796875
] |
90226b5212095bfb5068e5b49908a3eae3e983d7
|
Wordpress Stackexchange
Q: Checking if Database Table exists I read the wordpress codex and professional wordpress. It seems both use something like
if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
to determine if the table exists. Is there any reason why CREATE TABLE IF NOT EXISTS ( ... ) is not used? It will check and create the table in 1 query, won't it be better? Or am I missing something?
A: Try this one:
global $wpdb;
$table_name = $wpdb->base_prefix.'custom_prices';
$query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $table_name ) );
if ( ! $wpdb->get_var( $query ) == $table_name ) {
// go go
}
|
Q: Checking if Database Table exists I read the wordpress codex and professional wordpress. It seems both use something like
if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
to determine if the table exists. Is there any reason why CREATE TABLE IF NOT EXISTS ( ... ) is not used? It will check and create the table in 1 query, won't it be better? Or am I missing something?
A: Try this one:
global $wpdb;
$table_name = $wpdb->base_prefix.'custom_prices';
$query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $table_name ) );
if ( ! $wpdb->get_var( $query ) == $table_name ) {
// go go
}
A: DISCLAIMER : I'm not a WordPress Guru, only a MySQL DBA
If you want to user a different query, try this
SELECT COUNT(1) FROM information_schema.tables WHERE table_schema='dbname' AND table_name='tbname';
It will either return 0 (if table does not exist) or 1 (if table does exist)
A: TL;DR
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
global $wpdb;
$tablename = 'myTable';
$main_sql_create = "CREATE TABLE $tablename";
maybe_create_table( $wpdb->prefix . $tablename, $main_sql_create );
WordPress now provides the maybe_create_table function - see https://developer.wordpress.org/reference/functions/maybe_create_table/
Before calling this function you have to manually include the upgrade.php file, otherwise you will get a fatal error like follows:
PHP Fatal error: Uncaught Error: Call to undefined function maybe_create_table()
A: Not sure how or why this works, but I can do:
if (in_array('snippets', $wpdb->tables)) {
// do something if wp_snippets exists
}
A: If you use "IF NOT EXISTS" then the dbdelta script will not upgrade your database with delta's appeared after the initial creation of the database.
(assuming you want to re-use the same sql script)
at least... that is what i think
A: I understand this is really old question, but maybe some one find it usefull.
Small calss that handle function on new DB, version of table and create if does not exists.
class ACCESS_TBDB {
private $wpdb = null;
private $accessTable = 'table_prefix'; // just name of your table prefix
private $accessTableVer = '1.0.7'; // table version
private $accessTableOptName = 'access_db_ver'; // name for option for db version
public function __construct()
{
global $wpdb;
//I does not like to call global $wpdb in every function in the class
$this->wpdb = $wpdb;
$tablename = $this->accessTable;
//set our table prefix
$this->wpdb->access_table = $this->wpdb->prefix . $tablename;
// every time check if db need to be created or not
$this->checkAccessDatabase();
}
private function createDBSQL(){
// create db sql for table
$charset = $this->wpdb->get_charset_collate();
$sql = "
CREATE TABLE {$this->wpdb->access_table} (
id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
name TINYTEXT,
type VARCHAR(10),
value SMALLINT DEFAULT 0 NOT NULL,
created_at DATETIME DEFAULT NULL,
PRIMARY KEY (id)
) $charset;
";
return $sql;
}
private function checkAccessDatabase(){
$version = $this->accessTableVer;
//handle DB versions
$db_version = get_option( $this->accessTableOptName , '0.0.0');
//Without we will face error on dbDelta and maybe_create_table
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
$dbCreateSql = $this->createDBSQL();
// check if maybe DB need upgrade
if (version_compare($version, $db_version, '>')) {
// if it contain old dev/legacy versions
if (version_compare($db_version, '1.0.0', '<')) {
$this->wpdb->query("DROP TABLE IF EXISTS {$this->wpdb->access_table};");
}
dbDelta($dbCreateSql);
update_option( $this->accessTableOptName , $version);
}else{
//https://developer.wordpress.org/reference/functions/maybe_create_table/
// just check DB if exist in case it was deleted because of reasons ... :)
$recreate = maybe_create_table( $this->wpdb->access_table, $dbCreateSql );
if(!$recreate){
update_option( $this->accessTableOptName , $version);
}
}
}
... other functions ...
}
A: Use get_var function from wpdb class with an exception handling:
try {
$wpdb->hide_errors();
$wpdb->get_var( 'SELECT COUNT(*) FROM ' . $wpdb->prefix . 'translator' );
$wpdb->show_errors();
} catch (Exception $e) {
error_log($e);
} finally {
translator_create_db();
}
Reference: SELECT a Variable
|
wordpress
|
{
"language": "en",
"length": 582,
"provenance": "stackexchange_00019.jsonl.gz:407618",
"question_score": "20",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11641"
}
|
[
0.031341552734375,
0.0256195068359375,
0.008880615234375,
-0.004058837890625,
0.032501220703125,
-0.0212860107421875,
0.040008544921875,
-0.047882080078125,
0.009918212890625,
0.0267181396484375,
-0.07562255859375,
0.0084075927734375,
0.00494384765625,
0.00620269775390625,
-0.00879669189453125,
-0.05072021484375,
0.04241943359375,
-0.0302886962890625,
0.0182342529296875,
-0.0124053955078125,
0.01727294921875,
0.0009450912475585938,
0.02667236328125,
0.01468658447265625,
0.021942138671875,
-0.10137939453125,
0.06280517578125,
-0.01114654541015625,
0.038421630859375,
-0.01568603515625,
0.03271484375,
-0.01422119140625,
-0.01192474365234375,
0.023162841796875,
0.0399169921875,
0.041656494140625,
0.0211639404296875,
0.0204620361328125,
0.037353515625,
0.0161895751953125,
0.0266876220703125,
-0.0069580078125,
0.04156494140625,
-0.020782470703125,
0.010223388671875,
-0.027618408203125,
0.0302276611328125,
-0.03448486328125,
0.0170135498046875,
0.0224456787109375,
-0.0041046142578125,
0.0224456787109375,
-0.005207061767578125,
-0.034576416015625,
-0.005886077880859375,
-0.0131378173828125,
0.026611328125,
-0.03399658203125,
0.01666259765625,
-0.0211944580078125,
-0.0201416015625,
0.0191802978515625,
0.0215911865234375,
0.023162841796875,
0.0027675628662109375,
0.01277923583984375,
0.0197296142578125,
0.01263427734375,
-0.002941131591796875,
-0.02593994140625,
-0.0028667449951171875,
0.0018215179443359375,
-0.0203399658203125,
0.01055908203125,
-0.035888671875,
-0.024505615234375,
0.032073974609375,
-0.028350830078125,
-0.006366729736328125,
0.0479736328125,
-0.0023193359375,
0.0008563995361328125,
-0.0177154541015625,
-0.043701171875,
0.0234527587890625,
-0.00646209716796875,
-0.009490966796875,
-0.005847930908203125,
-0.01849365234375,
-0.047119140625,
-0.00830078125,
-0.0302734375,
-0.067626953125,
0.003482818603515625,
0.004344940185546875,
-0.06402587890625,
0.041015625,
0.107666015625,
-0.0298004150390625,
0.0118560791015625,
-0.035552978515625,
-0.01203155517578125,
-0.018463134765625,
-0.043914794921875,
0.04180908203125,
0.053131103515625,
-0.0294342041015625,
-0.0645751953125,
0.03289794921875,
0.0011157989501953125,
0.0035228729248046875,
0.0193939208984375,
-0.040435791015625,
-0.04998779296875,
-0.0140380859375,
0.0294647216796875,
-0.05718994140625,
-0.0167083740234375,
0.006443023681640625,
-0.030792236328125,
-0.0093536376953125,
0.0196533203125,
-0.052154541015625,
-0.0251007080078125,
0.02142333984375,
-0.0180511474609375,
-0.0138092041015625,
0.042022705078125,
-0.06890869140625,
0.0227813720703125,
-0.0135040283203125,
0.0185089111328125,
0.0516357421875,
0.0367431640625,
-0.00849151611328125,
-0.0153045654296875,
0.047027587890625,
-0.00872039794921875,
-0.0118408203125,
0.013458251953125,
0.0267486572265625,
-0.004245758056640625,
-0.01043701171875,
-0.017333984375,
-0.03961181640625,
0.0224609375,
0.026336669921875,
0.003719329833984375,
-0.055572509765625,
-0.054229736328125,
-0.024932861328125,
0.02996826171875,
0.00992584228515625,
-0.00702667236328125,
0.00794219970703125,
-0.0178375244140625,
-0.0163116455078125,
-0.0031452178955078125,
0.00557708740234375,
0.0015993118286132812,
0.0003998279571533203,
-0.035888671875,
-0.004772186279296875,
-0.0513916015625,
-0.07000732421875,
0.040191650390625,
-0.0567626953125,
-0.0057220458984375,
0.024658203125,
0.0197601318359375,
-0.00966644287109375,
-0.0225982666015625,
0.06146240234375,
0.0187225341796875,
-0.018310546875,
0.033843994140625,
0.007007598876953125,
-0.0305023193359375,
0.05133056640625,
0.0060577392578125,
-0.0302581787109375,
-0.01450347900390625,
0.06207275390625,
-0.0225982666015625,
-0.060455322265625,
0.067138671875,
-0.01556396484375,
0.053253173828125,
0.0189971923828125,
-0.0023326873779296875,
0.0246734619140625,
0.0213623046875,
-0.0253753662109375,
0.03753662109375,
-0.00921630859375,
-0.056732177734375,
-0.01146697998046875,
-0.034210205078125,
-0.02716064453125,
0.011505126953125,
-0.005092620849609375,
-0.0091705322265625,
0.008453369140625,
-0.0248260498046875,
-0.0574951171875,
0.0030689239501953125,
-0.023773193359375,
0.036956787109375,
0.005023956298828125,
0.0211639404296875,
0.015411376953125,
0.004486083984375,
-0.028106689453125,
-0.00896453857421875,
-0.02911376953125,
-0.022308349609375,
-0.0296783447265625,
0.0170135498046875,
-0.007740020751953125,
0.04083251953125,
-0.0157623291015625,
-0.01010894775390625,
-0.0130615234375,
-0.016448974609375,
-0.01032257080078125,
0.0092010498046875,
-0.00559234619140625,
0.01288604736328125,
0.0282440185546875,
0.024444580078125,
0.042816162109375,
-0.030242919921875,
0.0736083984375,
0.0311279296875,
-0.03057861328125,
-0.0022716522216796875,
-0.007068634033203125,
-0.079833984375,
-0.01178741455078125,
0.0689697265625,
0.0404052734375,
0.03179931640625,
-0.0296478271484375,
-0.0281829833984375,
0.0333251953125,
-0.08056640625,
-0.023651123046875,
-0.00638580322265625,
0.001934051513671875,
0.048095703125,
-0.0269622802734375,
0.01374053955078125,
0.004383087158203125,
-0.0203857421875,
-0.020477294921875,
0.050537109375,
-0.036590576171875,
0.0251312255859375,
0.016265869140625,
-0.009796142578125,
-0.0179901123046875,
0.0047454833984375,
0.046661376953125,
-0.028289794921875,
0.018707275390625,
0.0150604248046875,
0.0287017822265625,
0.016326904296875,
-0.0105133056640625,
0.01314544677734375,
-0.0003046989440917969,
-0.05426025390625,
0.0075836181640625,
0.0226593017578125,
-0.049591064453125,
0.0797119140625,
-0.06402587890625,
0.01422882080078125,
0.0496826171875,
0.031097412109375,
-0.0162200927734375,
0.02001953125,
-0.06976318359375,
-0.0282135009765625,
0.00473785400390625,
-0.0171356201171875,
-0.035614013671875,
-0.03546142578125,
-0.006565093994140625,
-0.032928466796875,
0.020050048828125,
-0.003269195556640625,
-0.03765869140625,
0.0341796875,
0.00693511962890625,
-0.043212890625,
0.0304107666015625,
-0.0216064453125,
0.0290069580078125,
-0.0169525146484375,
0.00621795654296875,
0.05950927734375,
-0.0014123916625976562,
0.0039520263671875,
-0.017913818359375,
0.002666473388671875,
-0.001964569091796875,
-0.01219940185546875,
-0.0306854248046875,
-0.00742340087890625,
-0.05267333984375,
0.018646240234375,
0.041778564453125,
0.069580078125,
0.0272979736328125,
-0.033111572265625,
0.02630615234375,
0.05950927734375,
-0.03045654296875,
-0.08123779296875,
-0.04693603515625,
0.007625579833984375,
-0.006244659423828125,
-0.0012035369873046875,
0.0173797607421875,
0.01409912109375,
-0.023040771484375,
0.0103607177734375,
-0.0164031982421875,
-0.03009033203125,
-0.038299560546875,
-0.0675048828125,
-0.055938720703125,
-0.034454345703125,
-0.01212310791015625,
0.007183074951171875,
-0.01084136962890625,
0.05352783203125,
-0.006183624267578125,
-0.04229736328125,
-0.01043701171875,
-0.0218353271484375,
0.004955291748046875,
0.004611968994140625,
0.023712158203125,
-0.04656982421875,
0.01788330078125,
0.00811004638671875,
0.0279998779296875,
0.0261077880859375,
-0.00804901123046875,
-0.0204315185546875,
0.038299560546875,
0.007720947265625,
0.039306640625,
0.046051025390625,
-0.049591064453125,
-0.001453399658203125,
0.0391845703125,
-0.046630859375,
-0.007297515869140625,
0.00823211669921875,
-0.0167999267578125,
-0.012481689453125,
-0.02142333984375,
-0.00806427001953125,
0.0216522216796875,
0.00531005859375,
0.05755615234375,
0.05267333984375,
-0.005863189697265625,
0.00754547119140625,
0.0182342529296875,
0.01422882080078125,
0.022491455078125,
-0.04046630859375,
0.0428466796875,
-0.042236328125,
-0.01763916015625,
0.00669097900390625,
-0.037750244140625,
-0.006237030029296875,
-0.037689208984375,
-0.01513671875,
-0.0301666259765625,
0.034088134765625,
-0.0026607513427734375,
0.05645751953125,
-0.05108642578125,
-0.03271484375,
-0.031585693359375,
0.0831298828125,
0.004940032958984375,
-0.01202392578125,
-0.0121917724609375,
0.00543212890625,
-0.041961669921875,
-0.035247802734375,
-0.033172607421875,
0.0161895751953125,
-0.049407958984375,
-0.0011692047119140625,
0.0047760009765625,
-0.049346923828125,
0.0005755424499511719,
-0.0286407470703125,
-0.0347900390625,
-0.0279388427734375,
0.038360595703125,
-0.058258056640625,
0.029876708984375,
0.0234222412109375,
0.01085662841796875,
0.00640869140625,
-0.0084381103515625,
-0.047607421875,
-0.047119140625,
-0.0031375885009765625,
-0.0489501953125,
0.035980224609375,
0.021087646484375,
0.023773193359375,
-0.00411224365234375,
0.0307159423828125,
0.0178680419921875,
0.0217132568359375,
-0.0015115737915039062,
-0.012359619140625,
-0.00003910064697265625,
0.006496429443359375,
0.01511383056640625,
-0.02581787109375,
-0.01078033447265625,
-0.053802490234375,
-0.015899658203125,
-0.0014829635620117188,
-0.02276611328125,
0.034515380859375,
-0.0178375244140625,
0.0062103271484375,
0.041412353515625,
-0.0083770751953125,
-0.024566650390625,
0.0164947509765625,
-0.04425048828125,
0.012908935546875,
-0.005035400390625,
0.0198822021484375,
0.055145263671875,
-0.00811767578125,
-0.0256195068359375,
0.017425537109375,
0.09088134765625,
0.0156707763671875,
-0.02203369140625,
-0.097900390625,
-0.003021240234375,
0.0308074951171875,
0.0258026123046875,
0.027587890625,
0.0029392242431640625,
-0.03167724609375,
0.0338134765625,
0.021087646484375,
-0.02593994140625,
0.0098114013671875,
0.03326416015625,
0.004547119140625,
-0.006999969482421875,
-0.021209716796875,
-0.022613525390625,
0.0248870849609375,
0.06927490234375,
0.0166778564453125,
-0.00830078125,
0.0289154052734375,
0.014373779296875,
-0.01152801513671875,
-0.05517578125,
-0.028350830078125,
-0.0251617431640625,
-0.007480621337890625,
0.0180206298828125,
0.029754638671875,
0.018585205078125,
-0.0009641647338867188,
0.005126953125,
0.01549530029296875,
0.01494598388671875,
0.00034356117248535156,
0.0740966796875,
-0.0283203125,
0.0540771484375,
-0.007762908935546875,
-0.01180267333984375,
-0.04925537109375,
-0.0162811279296875,
0.07769775390625,
0.007801055908203125,
-0.037689208984375,
0.01192474365234375,
-0.0194091796875,
-0.0123291015625,
0.01558685302734375,
0.00954437255859375,
0.028350830078125,
0.0015211105346679688,
-0.01522064208984375,
0.00033926963806152344,
-0.02227783203125,
0.003692626953125,
-0.0279388427734375,
-0.011749267578125,
0.008026123046875,
-0.01029205322265625,
0.01122283935546875,
0.03045654296875,
-0.011199951171875,
0.0263214111328125,
-0.00914764404296875,
0.05877685546875,
0.0501708984375,
0.053802490234375,
0.024932861328125,
-0.05126953125,
0.00653839111328125,
0.00362396240234375,
-0.058929443359375,
-0.0478515625,
-0.05816650390625,
0.00691986083984375,
0.0538330078125,
-0.0445556640625,
-0.01122283935546875,
0.048797607421875,
0.020660400390625,
-0.01708984375,
0.0201568603515625,
0.025726318359375,
-0.021240234375,
-0.032257080078125,
-0.00722503662109375,
0.016510009765625,
0.0226593017578125,
-0.01971435546875,
0.0254974365234375,
-0.032684326171875,
0.0270538330078125,
-0.003086090087890625,
0.0003802776336669922,
-0.00508880615234375,
0.0040130615234375,
-0.01239776611328125,
-0.0310516357421875,
-0.03143310546875,
0.040008544921875,
0.00925445556640625,
-0.0189666748046875,
-0.033477783203125,
0.006500244140625,
-0.0229339599609375,
0.038909912109375,
-0.028076171875,
-0.0169219970703125,
-0.004085540771484375,
0.00983428955078125,
0.051239013671875,
0.0176849365234375,
0.0021762847900390625,
-0.0206756591796875,
-0.05828857421875,
-0.035125732421875,
-0.03594970703125,
-0.035675048828125,
-0.031646728515625,
-0.0067138671875,
0.00684356689453125,
-0.006717681884765625,
0.01251220703125,
0.0005197525024414062,
-0.0261993408203125,
0.0288848876953125,
0.0252685546875,
-0.036102294921875,
-0.0187530517578125,
0.07525634765625,
-0.0057220458984375,
0.0338134765625,
0.016571044921875,
0.033538818359375,
-0.0106964111328125,
-0.02056884765625,
0.0270233154296875,
-0.0231475830078125,
-0.02642822265625,
-0.0333251953125,
-0.00904083251953125,
-0.04345703125,
-0.02093505859375,
-0.01210784912109375,
0.041290283203125,
-0.002471923828125,
-0.00390625,
-0.0041351318359375,
-0.0010023117065429688,
-0.0134429931640625,
0.0379638671875,
0.022003173828125,
-0.04937744140625,
0.004413604736328125,
0.00711822509765625,
-0.0171051025390625,
0.040740966796875,
-0.0247344970703125,
0.0176849365234375,
0.036376953125,
-0.0714111328125,
0.0806884765625,
0.057952880859375,
0.01517486572265625,
0.047821044921875,
-0.0165557861328125,
0.0106048583984375,
0.0092926025390625,
-0.0199432373046875,
-0.04180908203125,
-0.00507354736328125,
0.051025390625,
0.0149688720703125,
-0.0084686279296875,
0.0699462890625,
-0.0133209228515625,
0.0113067626953125,
0.06683349609375,
0.0692138671875,
-0.06719970703125,
-0.0151519775390625,
0.02325439453125,
-0.04156494140625,
-0.0136871337890625,
-0.0272216796875,
-0.0024814605712890625,
-0.0210113525390625,
0.053741455078125,
0.0004940032958984375,
-0.0234375,
-0.006633758544921875,
-0.001003265380859375,
0.006500244140625,
-0.03216552734375,
0.041015625,
0.0029964447021484375,
-0.02496337890625,
0.01983642578125,
0.006130218505859375,
-0.0011091232299804688,
0.007659912109375,
0.033355712890625,
-0.013458251953125,
0.0160980224609375,
-0.01171112060546875,
0.0210723876953125,
-0.0249176025390625,
0.003467559814453125,
-0.004589080810546875,
0.015655517578125,
0.020233154296875,
0.051910400390625,
-0.01509857177734375,
0.01184844970703125,
0.0268707275390625,
0.001392364501953125,
-0.04986572265625,
0.01488494873046875,
0.0188446044921875,
-0.01165008544921875,
-0.03955078125,
0.01491546630859375,
-0.08502197265625,
0.0125732421875,
-0.002285003662109375,
-0.03277587890625,
0.03619384765625,
-0.0274200439453125,
-0.01641845703125,
0.006763458251953125,
0.0174102783203125,
0.0141143798828125,
0.0031280517578125,
0.015228271484375,
-0.040252685546875,
-0.0112152099609375,
0.00510406494140625,
-0.02764892578125,
-0.005886077880859375,
0.0053253173828125,
-0.0237884521484375,
0.019439697265625,
-0.0162200927734375,
-0.022216796875,
0.0214385986328125,
0.01270294189453125,
-0.0025157928466796875,
0.01137542724609375,
-0.056610107421875,
0.0273895263671875,
0.0012788772583007812,
0.0811767578125,
-0.0361328125,
0.01467132568359375,
0.0286102294921875,
0.0086669921875,
0.03643798828125,
-0.0038280487060546875,
0.0170745849609375,
0.0014905929565429688,
0.039459228515625,
0.0279083251953125,
-0.023193359375,
0.0036373138427734375,
-0.032928466796875,
0.0244903564453125,
0.0372314453125,
-0.03045654296875,
0.022857666015625,
0.0087432861328125,
-0.044586181640625,
-0.01087188720703125,
0.0234527587890625,
0.045928955078125,
-0.0115509033203125,
-0.02288818359375,
0.02447509765625,
-0.0235595703125,
-0.0021572113037109375,
-0.04119873046875,
-0.00719451904296875,
0.021240234375,
0.0117950439453125,
-0.0517578125,
-0.0303192138671875,
-0.0273284912109375,
0.0274505615234375,
0.00984954833984375,
-0.0018053054809570312,
0.02362060546875,
0.0096282958984375,
0.0124359130859375,
0.007480621337890625,
-0.00908660888671875,
0.021881103515625,
-0.0024089813232421875,
0.06781005859375,
0.0560302734375,
0.028228759765625,
-0.03643798828125,
-0.03411865234375,
0.03369140625,
0.09393310546875,
-0.035491943359375,
-0.0139617919921875,
0.0151519775390625,
-0.0022296905517578125,
-0.01800537109375,
-0.0173492431640625,
-0.0225830078125,
0.051177978515625,
0.06097412109375,
-0.025238037109375,
0.013031005859375,
0.02886962890625,
-0.00923919677734375,
-0.01025390625,
-0.000244140625,
-0.01374053955078125,
0.0103759765625,
-0.0158843994140625,
-0.000904083251953125,
0.025146484375,
0.044586181640625,
0.006114959716796875,
0.0205078125,
0.0016164779663085938,
-0.013031005859375,
-0.050689697265625,
0.01218414306640625,
-0.001781463623046875,
0.06939697265625,
-0.09783935546875,
-0.015869140625,
0.0394287109375,
0.06536865234375,
0.01343536376953125,
0.0443115234375,
0.0236663818359375,
0.0098876953125,
0.0244293212890625,
0.01056671142578125,
0.016998291015625,
-0.022125244140625,
-0.01641845703125,
-0.041412353515625,
0.0283050537109375,
0.0231781005859375,
0.0222625732421875,
-0.0036258697509765625,
0.029693603515625,
0.0120849609375,
-0.007648468017578125,
0.0260467529296875,
-0.006122589111328125,
-0.010406494140625,
0.025726318359375,
-0.014404296875,
0.039825439453125,
-0.00022113323211669922,
-0.0295867919921875,
-0.023345947265625,
0.00519561767578125,
0.007022857666015625,
-0.00933074951171875,
0.035491943359375,
0.0262298583984375,
0.00037288665771484375,
0.02349853515625,
-0.0002923011779785156,
-0.022857666015625,
0.007480621337890625,
0.00838470458984375,
0.0089111328125,
0.033905029296875,
0.02471923828125,
-0.01343536376953125,
-0.00548553466796875,
0.02850341796875,
0.00988006591796875,
-0.0189361572265625,
0.081298828125,
-0.0264739990234375,
-0.0165863037109375,
0.0163116455078125,
0.0462646484375,
-0.0301361083984375,
-0.01080322265625,
0.0589599609375,
-0.0248260498046875,
0.01161956787109375,
-0.008575439453125,
-0.06243896484375,
-0.00737762451171875,
0.03131103515625,
-0.018951416015625,
-0.012542724609375,
-0.00164794921875,
0.042694091796875,
0.006778717041015625,
-0.003681182861328125,
-0.0294952392578125,
-0.046905517578125,
0.026153564453125,
0.04534912109375,
-0.01357269287109375,
0.009246826171875,
0.00955963134765625,
0.0205078125,
0.0027790069580078125,
-0.0270233154296875,
0.02978515625,
-0.050567626953125,
0.040924072265625,
0.029876708984375,
0.00949859619140625,
0.006038665771484375,
-0.02886962890625,
-0.0187835693359375,
-0.00852203369140625,
0.01242828369140625,
-0.02410888671875,
-0.004116058349609375,
0.03570556640625,
-0.0006117820739746094,
0.033203125,
0.01806640625,
-0.047698974609375,
0.0115966796875,
0.04058837890625,
-0.0037059783935546875,
0.04498291015625,
-0.0032100677490234375,
-0.0119171142578125,
-0.01309967041015625,
-0.0254974365234375,
-0.002262115478515625,
-0.002124786376953125,
-0.0031070709228515625,
0.0018835067749023438,
0.0254058837890625,
0.040618896484375,
-0.01192474365234375,
-0.06109619140625,
0.029876708984375,
-0.046844482421875,
0.0682373046875,
-0.03192138671875,
0.031524658203125,
0.01242828369140625,
0.06097412109375,
-0.0240478515625,
-0.0003807544708251953,
0.0161590576171875,
0.004100799560546875,
0.0240020751953125,
0.0234222412109375,
0.0243377685546875,
-0.043670654296875,
-0.032257080078125,
0.012847900390625,
0.0369873046875,
0.038818359375,
0.061676025390625,
-0.0267791748046875,
0.01137542724609375,
-0.027374267578125,
-0.0178375244140625,
-0.055450439453125,
0.02130126953125,
-0.09759521484375,
-0.0253753662109375,
-0.06365966796875,
0.054351806640625,
0.04925537109375,
-0.0216827392578125,
-0.07733154296875,
0.07135009765625,
-0.044464111328125,
-0.01116180419921875,
-0.0255889892578125,
-0.021331787109375,
-0.046417236328125,
0.039093017578125,
-0.0103759765625,
0.0019369125366210938,
0.01250457763671875,
0.060150146484375,
0.00408172607421875,
0.0056915283203125,
0.0215301513671875,
-0.006343841552734375,
-0.0860595703125,
-0.01971435546875,
-0.0302581787109375,
-0.0027256011962890625,
-0.0004949569702148438,
0.01345062255859375,
-0.0141143798828125,
0.03277587890625,
-0.00951385498046875,
-0.09844970703125,
-0.028839111328125,
-0.0474853515625,
0.0022678375244140625,
-0.04095458984375,
0.00450897216796875,
0.0016651153564453125,
0.038848876953125,
0.03662109375,
0.0148773193359375,
-0.051239013671875,
-0.033294677734375,
-0.0477294921875,
-0.03753662109375,
-0.0033473968505859375,
0.015960693359375,
-0.044525146484375,
0.0347900390625,
0.003284454345703125,
-0.00997161865234375,
-0.01412200927734375,
0.034759521484375,
-0.025543212890625,
0.0009050369262695312,
0.00710296630859375,
-0.02490234375,
-0.030487060546875,
-0.0214385986328125,
0.024688720703125,
-0.0220489501953125,
-0.024871826171875,
-0.01953125,
0.031524658203125,
-0.0196533203125,
-0.03192138671875,
-0.004077911376953125,
-0.0029087066650390625,
0.002166748046875,
0.0017709732055664062,
0.0041351318359375,
-0.036834716796875,
-0.0016717910766601562,
-0.0021457672119140625,
0.01337432861328125,
0.02239990234375,
-0.017974853515625,
0.00864410400390625,
-0.00434112548828125,
0.052398681640625,
-0.02252197265625,
0.0843505859375,
0.011749267578125,
0.025421142578125,
-0.00986480712890625,
0.046722412109375,
0.019683837890625,
-0.02703857421875,
0.026458740234375,
-0.031951904296875,
-0.0157012939453125,
-0.0003643035888671875,
-0.0189056396484375,
-0.06988525390625,
0.041168212890625,
-0.00640106201171875,
0.0089569091796875,
0.033721923828125
] |
944b855bbead25d1e6f3f224688dedc38dfbadbf
|
Wordpress Stackexchange
Q: Get All Images in Media Gallery? Is there a way to fetch the URLs of ALL images in the media gallery?
I think this would be an easy way for a website to have a Pictures page that just pulls all of the images from the media gallery, granted it would only be necessary in certain scenarios.
I don't need instructions on how to create a Pictures page, just how to pull all of the image URLs. Thanks!
A: $query_images_args = array(
'post_type' => 'attachment',
'post_mime_type' => 'image',
'post_status' => 'inherit',
'posts_per_page' => - 1,
);
$query_images = new WP_Query( $query_images_args );
$images = array();
foreach ( $query_images->posts as $image ) {
$images[] = wp_get_attachment_url( $image->ID );
}
All the images url are now in $images;
|
Q: Get All Images in Media Gallery? Is there a way to fetch the URLs of ALL images in the media gallery?
I think this would be an easy way for a website to have a Pictures page that just pulls all of the images from the media gallery, granted it would only be necessary in certain scenarios.
I don't need instructions on how to create a Pictures page, just how to pull all of the image URLs. Thanks!
A: $query_images_args = array(
'post_type' => 'attachment',
'post_mime_type' => 'image',
'post_status' => 'inherit',
'posts_per_page' => - 1,
);
$query_images = new WP_Query( $query_images_args );
$images = array();
foreach ( $query_images->posts as $image ) {
$images[] = wp_get_attachment_url( $image->ID );
}
All the images url are now in $images;
A: <?php
$attachments = get_children( array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' =>'image') );
foreach ( $attachments as $attachment_id => $attachment ) {
echo wp_get_attachment_image( $attachment_id, 'medium' );
}
?>
This pulls all attachments for a post/page.
Attach more images to a post, and it will be listed
A: ok y used this code for show ALL images in media Library!
$args = array(
'post_type' => 'attachment',
'post_status' => 'published',
'posts_per_page' =>25,
'post_parent' => 210, // Post-> ID;
'numberposts' => null,
);
$attachments = get_posts($args);
$post_count = count ($attachments);
if ($attachments) {
foreach ($attachments as $attachment) {
echo "<div class=\"post photo col3\">";
$url = get_attachment_link($attachment->ID);// extraigo la _posturl del attachmnet
$img = wp_get_attachment_url($attachment->ID);
$title = get_the_title($attachment->post_parent);//extraigo titulo
echo '<a href="'.$url.'"><img title="'.$title.'" src="'.get_bloginfo('template_url').'/timthumb.php?src='.$img.'&w=350&h=500&zc=3"></a>';
echo "</div>";
}
}
and if you know method for show pagination, please answer.
A: This is just a shorter version of this answer using get_posts() and array_map().
$image_ids = get_posts(
array(
'post_type' => 'attachment',
'post_mime_type' => 'image',
'post_status' => 'inherit',
'posts_per_page' => - 1,
'fields' => 'ids',
) );
$images = array_map( "wp_get_attachment_url", $image_ids );
A: It looks as though it hasn't been updated in a while, but the Media Library Gallery plugin might be a good example to start looking at.
A: $media_query = new WP_Query(
array(
'post_type' => 'attachment',
'post_status' => 'inherit',
'posts_per_page' => -1,
)
);
$list = array();
foreach ($media_query->posts as $post) {
$list[] = wp_get_attachment_url($post->ID);
}
// do something with $list here;
Query the db for all media library items (not just ones attached to posts), grab their url, dump them all in $list array.
|
wordpress
|
{
"language": "en",
"length": 390,
"provenance": "stackexchange_00019.jsonl.gz:407627",
"question_score": "34",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11662"
}
|
[
0.06964111328125,
-0.0091094970703125,
0.048736572265625,
-0.020263671875,
0.00611114501953125,
-0.026519775390625,
0.08892822265625,
-0.0181732177734375,
0.01531219482421875,
0.03704833984375,
-0.01212310791015625,
-0.006969451904296875,
-0.0128021240234375,
-0.0184783935546875,
-0.043365478515625,
-0.038116455078125,
0.038970947265625,
-0.023284912109375,
0.0318603515625,
0.0155181884765625,
0.0191497802734375,
0.03753662109375,
0.033966064453125,
0.0262451171875,
-0.01393890380859375,
0.0340576171875,
0.03729248046875,
-0.0217132568359375,
-0.029510498046875,
-0.032745361328125,
0.000843048095703125,
0.0216217041015625,
-0.0037975311279296875,
0.002532958984375,
0.014312744140625,
-0.01995849609375,
0.00226593017578125,
-0.0037403106689453125,
-0.0006842613220214844,
0.01224517822265625,
0.0193634033203125,
-0.00677490234375,
0.0004246234893798828,
0.044158935546875,
-0.034332275390625,
-0.0004029273986816406,
-0.0141754150390625,
-0.030914306640625,
-0.0013647079467773438,
0.0249786376953125,
0.0199432373046875,
-0.00931549072265625,
0.031707763671875,
0.00756072998046875,
-0.0279083251953125,
-0.0293121337890625,
0.02496337890625,
-0.021453857421875,
0.041107177734375,
-0.0682373046875,
-0.0718994140625,
-0.006221771240234375,
0.05462646484375,
0.00011736154556274414,
-0.0289459228515625,
-0.01003265380859375,
0.0006651878356933594,
0.0117950439453125,
-0.062469482421875,
-0.062469482421875,
0.040191650390625,
-0.0302276611328125,
-0.010223388671875,
-0.05621337890625,
0.0014553070068359375,
0.043701171875,
-0.041290283203125,
-0.023895263671875,
0.020904541015625,
-0.013702392578125,
0.048309326171875,
-0.01336669921875,
-0.037384033203125,
0.0251007080078125,
0.0198822021484375,
0.0228118896484375,
0.011566162109375,
-0.03466796875,
-0.01323699951171875,
-0.0189056396484375,
-0.02227783203125,
-0.00012421607971191406,
-0.03662109375,
0.0128631591796875,
-0.00673675537109375,
-0.0266571044921875,
0.0102996826171875,
0.01910400390625,
-0.0067596435546875,
0.00981903076171875,
-0.0322265625,
-0.00879669189453125,
-0.004550933837890625,
-0.0259857177734375,
0.006099700927734375,
-0.029937744140625,
-0.00751495361328125,
-0.00047469139099121094,
0.0391845703125,
0.049041748046875,
-0.020782470703125,
0.050994873046875,
-0.034515380859375,
-0.003696441650390625,
0.0006866455078125,
0.040374755859375,
-0.052734375,
0.02703857421875,
-0.021759033203125,
0.0275115966796875,
0.00617218017578125,
0.0234832763671875,
0.0023250579833984375,
0.0113067626953125,
-0.0221405029296875,
0.004604339599609375,
0.0010633468627929688,
-0.043670654296875,
-0.01265716552734375,
0.01190948486328125,
-0.021484375,
0.027984619140625,
0.01145172119140625,
-0.015838623046875,
-0.023345947265625,
-0.019012451171875,
-0.01058197021484375,
0.002864837646484375,
0.017608642578125,
-0.0050201416015625,
0.036590576171875,
-0.0252685546875,
0.01380157470703125,
0.041473388671875,
0.005695343017578125,
-0.01186370849609375,
0.0188751220703125,
0.027008056640625,
-0.00714111328125,
-0.0112152099609375,
-0.01068115234375,
0.049102783203125,
0.01123046875,
0.02508544921875,
0.0311431884765625,
-0.01038360595703125,
0.08123779296875,
-0.04656982421875,
0.0079193115234375,
-0.06298828125,
0.0099334716796875,
0.040252685546875,
0.0270538330078125,
0.038543701171875,
0.052886962890625,
-0.05865478515625,
0.0016546249389648438,
0.0083770751953125,
0.026275634765625,
0.0313720703125,
-0.0210113525390625,
-0.03912353515625,
0.0299530029296875,
0.04681396484375,
-0.002971649169921875,
0.054351806640625,
0.0004780292510986328,
-0.015625,
0.00576019287109375,
0.05841064453125,
-0.00829315185546875,
-0.031005859375,
0.007049560546875,
-0.009429931640625,
-0.040863037109375,
0.003017425537109375,
0.0049591064453125,
0.03350830078125,
0.0296173095703125,
0.00962066650390625,
0.024749755859375,
-0.0014448165893554688,
-0.03826904296875,
0.04986572265625,
-0.01342010498046875,
0.0123748779296875,
-0.0233306884765625,
0.026153564453125,
-0.021270751953125,
-0.04998779296875,
0.0406494140625,
0.0089263916015625,
-0.0101165771484375,
0.01293182373046875,
-0.017486572265625,
-0.0027408599853515625,
0.0102386474609375,
-0.0030117034912109375,
-0.05023193359375,
0.037200927734375,
0.0236968994140625,
-0.006587982177734375,
-0.028045654296875,
0.0192108154296875,
0.0285491943359375,
0.0126800537109375,
-0.005321502685546875,
0.000041961669921875,
-0.018524169921875,
0.025665283203125,
-0.033050537109375,
-0.0269927978515625,
-0.026092529296875,
0.04754638671875,
0.060272216796875,
0.016387939453125,
-0.031097412109375,
-0.0180511474609375,
0.033294677734375,
0.0257110595703125,
-0.08349609375,
0.0250396728515625,
-0.017791748046875,
0.02105712890625,
-0.027801513671875,
-0.0340576171875,
-0.0048370361328125,
-0.021453857421875,
0.03668212890625,
0.038330078125,
0.033447265625,
0.0179595947265625,
0.0009813308715820312,
-0.006732940673828125,
0.045623779296875,
-0.01910400390625,
0.019744873046875,
-0.031829833984375,
-0.0008535385131835938,
0.01174163818359375,
0.00211334228515625,
0.0155029296875,
0.01486968994140625,
-0.006847381591796875,
0.0305938720703125,
0.03411865234375,
0.013885498046875,
0.0118865966796875,
-0.045166015625,
0.047454833984375,
0.0021190643310546875,
0.031890869140625,
-0.01107025146484375,
0.0084686279296875,
-0.0249176025390625,
0.07159423828125,
0.01666259765625,
0.024383544921875,
-0.047454833984375,
0.0496826171875,
0.013519287109375,
-0.0004360675811767578,
0.00972747802734375,
0.0231170654296875,
0.0002321004867553711,
0.0007977485656738281,
-0.0016345977783203125,
-0.00887298583984375,
-0.01209259033203125,
0.00959014892578125,
-0.0088043212890625,
-0.00174713134765625,
-0.02630615234375,
-0.0021457672119140625,
0.00708770751953125,
-0.05426025390625,
0.01134490966796875,
0.01458740234375,
-0.039947509765625,
0.01238250732421875,
0.0211944580078125,
0.041229248046875,
0.0073699951171875,
-0.0025348663330078125,
-0.022216796875,
0.01215362548828125,
0.00629425048828125,
-0.0655517578125,
0.055908203125,
-0.038909912109375,
0.091796875,
0.0888671875,
-0.042816162109375,
0.056304931640625,
-0.0201416015625,
-0.0279693603515625,
-0.0026607513427734375,
0.007190704345703125,
-0.0214080810546875,
-0.037689208984375,
-0.044708251953125,
-0.020904541015625,
0.0122833251953125,
0.006343841552734375,
-0.00508880615234375,
-0.02752685546875,
-0.01922607421875,
0.0006861686706542969,
-0.10528564453125,
-0.06768798828125,
0.003070831298828125,
-0.05230712890625,
-0.050201416015625,
-0.0032939910888671875,
-0.035797119140625,
0.0255126953125,
0.004119873046875,
-0.01116943359375,
-0.0171051025390625,
0.033203125,
-0.0430908203125,
0.0002751350402832031,
-0.036468505859375,
0.0199737548828125,
-0.0241546630859375,
0.0174102783203125,
0.0038909912109375,
0.062469482421875,
0.01222991943359375,
-0.023956298828125,
0.0119476318359375,
0.040283203125,
-0.00020456314086914062,
-0.0052947998046875,
0.003299713134765625,
-0.01009368896484375,
0.01107025146484375,
-0.00585174560546875,
0.046234130859375,
0.040191650390625,
-0.02569580078125,
-0.003040313720703125,
-0.01265716552734375,
-0.0202178955078125,
0.005153656005859375,
0.0390625,
0.0115203857421875,
0.006175994873046875,
0.035552978515625,
-0.0309600830078125,
-0.02252197265625,
-0.0306854248046875,
-0.048736572265625,
0.054473876953125,
0.04248046875,
-0.0084991455078125,
-0.0072174072265625,
0.015106201171875,
-0.0029582977294921875,
0.005115509033203125,
-0.0013866424560546875,
-0.0233917236328125,
0.060333251953125,
-0.0070648193359375,
0.0126190185546875,
-0.0144500732421875,
0.034942626953125,
-0.002956390380859375,
0.00627899169921875,
0.0078277587890625,
0.006626129150390625,
-0.01543426513671875,
0.01361846923828125,
-0.0352783203125,
-0.0110015869140625,
0.037078857421875,
-0.00551605224609375,
0.0421142578125,
-0.04266357421875,
-0.022430419921875,
-0.02978515625,
0.0633544921875,
-0.002735137939453125,
-0.03643798828125,
-0.0286102294921875,
0.01200103759765625,
-0.0130462646484375,
-0.033843994140625,
0.01326751708984375,
-0.0101318359375,
-0.08526611328125,
-0.004634857177734375,
-0.0037860870361328125,
-0.056488037109375,
0.03057861328125,
-0.06854248046875,
-0.039093017578125,
-0.0460205078125,
0.0169219970703125,
0.03076171875,
0.0068206787109375,
0.0018024444580078125,
-0.005767822265625,
0.0146026611328125,
0.005725860595703125,
-0.013519287109375,
-0.124267578125,
-0.035614013671875,
0.0183563232421875,
0.1011962890625,
-0.0230712890625,
-0.01502227783203125,
-0.019317626953125,
0.0821533203125,
-0.0195159912109375,
0.044036865234375,
-0.024261474609375,
0.008819580078125,
-0.0161895751953125,
0.0005860328674316406,
-0.008148193359375,
-0.028167724609375,
-0.01123046875,
-0.04339599609375,
0.003940582275390625,
-0.035125732421875,
-0.047119140625,
-0.005596160888671875,
-0.039520263671875,
0.00707244873046875,
0.0026340484619140625,
0.003864288330078125,
0.0168914794921875,
0.0087432861328125,
0.0168609619140625,
-0.0273590087890625,
-0.012451171875,
-0.0120697021484375,
-0.0253753662109375,
0.0005483627319335938,
-0.02459716796875,
0.03021240234375,
0.033782958984375,
0.006866455078125,
-0.003307342529296875,
-0.08685302734375,
0.0032138824462890625,
0.0310516357421875,
-0.0233001708984375,
0.0262908935546875,
0.0073089599609375,
-0.00809478759765625,
0.0140228271484375,
-0.0120086669921875,
-0.01334381103515625,
0.01433563232421875,
0.06488037109375,
-0.004367828369140625,
-0.040313720703125,
0.025604248046875,
-0.013427734375,
-0.025543212890625,
0.06561279296875,
-0.01163482666015625,
-0.0119476318359375,
-0.017608642578125,
0.04193115234375,
-0.00994873046875,
-0.0086517333984375,
-0.046142578125,
-0.016143798828125,
-0.005535125732421875,
0.0164794921875,
0.050384521484375,
0.0341796875,
-0.0107574462890625,
0.027801513671875,
0.0435791015625,
0.0131378173828125,
0.011993408203125,
0.0289459228515625,
-0.00522613525390625,
0.044342041015625,
-0.0102996826171875,
-0.004421234130859375,
0.00809478759765625,
0.01132965087890625,
-0.041473388671875,
-0.0120086669921875,
-0.040618896484375,
-0.006072998046875,
-0.0016546249389648438,
0.0089874267578125,
0.0289459228515625,
-0.0188751220703125,
0.0628662109375,
0.0411376953125,
-0.008880615234375,
-0.03448486328125,
-0.0701904296875,
-0.0008726119995117188,
-0.0634765625,
0.04022216796875,
-0.0038623809814453125,
0.000926971435546875,
0.027374267578125,
0.040863037109375,
-0.07781982421875,
0.05279541015625,
0.0138397216796875,
-0.019317626953125,
-0.01947021484375,
0.031951904296875,
0.0148773193359375,
0.0107421875,
-0.00841522216796875,
0.01157379150390625,
0.045623779296875,
-0.042999267578125,
0.0257415771484375,
0.031402587890625,
0.05291748046875,
0.044647216796875,
-0.035552978515625,
-0.0256805419921875,
-0.0506591796875,
-0.0246734619140625,
0.0289306640625,
-0.02374267578125,
-0.039398193359375,
-0.046630859375,
-0.0160369873046875,
0.048736572265625,
0.0016803741455078125,
-0.0340576171875,
0.040283203125,
0.0210723876953125,
0.033905029296875,
-0.0006957054138183594,
-0.055023193359375,
0.04632568359375,
0.06365966796875,
-0.060882568359375,
-0.04608154296875,
-0.0190582275390625,
-0.009918212890625,
0.00263214111328125,
-0.01236724853515625,
-0.039306640625,
0.03460693359375,
-0.0010318756103515625,
0.007549285888671875,
-0.0207061767578125,
-0.0108184814453125,
-0.0587158203125,
0.01540374755859375,
0.029998779296875,
0.0131988525390625,
0.049285888671875,
-0.033447265625,
-0.0151214599609375,
-0.0173797607421875,
0.0574951171875,
-0.03179931640625,
0.017486572265625,
-0.0599365234375,
0.024627685546875,
0.0291595458984375,
0.009796142578125,
-0.01409912109375,
0.0169830322265625,
0.00957489013671875,
0.004444122314453125,
0.046783447265625,
0.017425537109375,
-0.00884246826171875,
0.024078369140625,
0.018798828125,
0.0027217864990234375,
-0.0323486328125,
-0.06298828125,
-0.0102081298828125,
-0.0204315185546875,
-0.031402587890625,
-0.0045623779296875,
0.04119873046875,
-0.0291595458984375,
-0.0038204193115234375,
0.0187225341796875,
0.015716552734375,
-0.0147247314453125,
-0.02874755859375,
-0.01751708984375,
-0.02508544921875,
0.08709716796875,
-0.0047149658203125,
0.02264404296875,
-0.0102996826171875,
-0.0020694732666015625,
0.0186614990234375,
-0.034423828125,
-0.03741455078125,
0.021636962890625,
0.005039215087890625,
0.0135345458984375,
0.00850677490234375,
-0.00811767578125,
0.0283050537109375,
0.07403564453125,
-0.0228118896484375,
0.037689208984375,
0.040252685546875,
0.003780364990234375,
0.031646728515625,
0.038818359375,
0.0204620361328125,
-0.048980712890625,
0.0545654296875,
0.0202178955078125,
-0.01549530029296875,
0.04437255859375,
-0.031097412109375,
-0.0014238357543945312,
-0.025360107421875,
0.0185546875,
0.026123046875,
0.021331787109375,
0.006923675537109375,
-0.009429931640625,
0.0217437744140625,
-0.005069732666015625,
-0.035552978515625,
-0.053558349609375,
0.058502197265625,
-0.04388427734375,
-0.0223388671875,
0.002017974853515625,
-0.01247406005859375,
0.02386474609375,
0.01143646240234375,
0.053558349609375,
-0.0125579833984375,
-0.057952880859375,
-0.0770263671875,
0.05059814453125,
-0.064208984375,
-0.00489044189453125,
0.006725311279296875,
-0.0196990966796875,
-0.0014972686767578125,
-0.0225067138671875,
0.0023593902587890625,
-0.028839111328125,
0.007793426513671875,
-0.0070037841796875,
0.0019168853759765625,
-0.00977325439453125,
0.038909912109375,
-0.03179931640625,
0.0091094970703125,
0.0214385986328125,
-0.05126953125,
-0.038116455078125,
-0.0002570152282714844,
0.005641937255859375,
0.009002685546875,
-0.0163421630859375,
0.017242431640625,
-0.050506591796875,
0.00954437255859375,
-0.023193359375,
-0.04083251953125,
0.07489013671875,
-0.052825927734375,
0.007328033447265625,
0.0240325927734375,
0.03875732421875,
-0.0128326416015625,
0.01464080810546875,
0.03863525390625,
-0.0161590576171875,
0.0123443603515625,
0.031890869140625,
0.024200439453125,
-0.0181884765625,
0.006969451904296875,
-0.05352783203125,
0.038055419921875,
-0.0423583984375,
0.038909912109375,
0.047149658203125,
-0.0012636184692382812,
-0.0200042724609375,
-0.0242156982421875,
-0.0010824203491210938,
0.040191650390625,
0.0226287841796875,
-0.01282501220703125,
-0.0289459228515625,
-0.00957489013671875,
-0.0162200927734375,
0.056671142578125,
0.05523681640625,
0.011138916015625,
-0.0482177734375,
-0.041046142578125,
0.031219482421875,
0.06787109375,
0.036895751953125,
0.0232391357421875,
-0.00608062744140625,
0.006160736083984375,
0.056488037109375,
-0.037139892578125,
0.038543701171875,
-0.0254058837890625,
0.0141143798828125,
0.0084381103515625,
0.0002911090850830078,
0.011627197265625,
0.026519775390625,
0.005168914794921875,
-0.0254974365234375,
0.0016775131225585938,
0.035186767578125,
-0.056365966796875,
0.034637451171875,
0.01044464111328125,
0.01103973388671875,
-0.01103973388671875,
0.01178741455078125,
-0.00023746490478515625,
0.05194091796875,
-0.022369384765625,
0.0003478527069091797,
0.02935791015625,
0.0059814453125,
0.047943115234375,
0.00527191162109375,
-0.01021575927734375,
0.01491546630859375,
0.034637451171875,
0.0325927734375,
0.0135040283203125,
0.005672454833984375,
-0.07794189453125,
-0.034423828125,
0.07244873046875,
0.060516357421875,
-0.029388427734375,
-0.061126708984375,
0.01154327392578125,
-0.01519775390625,
0.00762176513671875,
0.023193359375,
0.0311737060546875,
-0.04833984375,
0.0011320114135742188,
-0.003673553466796875,
-0.01495361328125,
-0.005092620849609375,
0.050079345703125,
-0.020782470703125,
-0.042755126953125,
-0.00010758638381958008,
-0.0237579345703125,
-0.0201416015625,
0.00273895263671875,
-0.00994110107421875,
-0.004627227783203125,
-0.0013475418090820312,
0.0225982666015625,
0.00033092498779296875,
0.00930023193359375,
-0.0223541259765625,
0.049957275390625,
-0.02178955078125,
0.033935546875,
-0.0372314453125,
-0.0309295654296875,
-0.0124969482421875,
0.03448486328125,
0.03961181640625,
-0.005092620849609375,
0.0297393798828125,
0.03485107421875,
-0.00830841064453125,
-0.004726409912109375,
0.026702880859375,
-0.001308441162109375,
0.0263519287109375,
-0.0341796875,
0.00689697265625,
0.02459716796875,
-0.022003173828125,
0.00487518310546875,
-0.0279388427734375,
0.0650634765625,
-0.0270233154296875,
0.05181884765625,
-0.0198974609375,
-0.0176239013671875,
0.022705078125,
-0.0286102294921875,
0.052154541015625,
-0.0313720703125,
-0.0859375,
-0.027557373046875,
-0.024688720703125,
-0.007587432861328125,
0.040374755859375,
0.041015625,
-0.01300811767578125,
0.01503753662109375,
-0.02911376953125,
-0.0330810546875,
0.006103515625,
-0.00197601318359375,
-0.01108551025390625,
-0.0300140380859375,
0.00720977783203125,
-0.036285400390625,
-0.0443115234375,
-0.01422882080078125,
-0.0252685546875,
0.00986480712890625,
0.034454345703125,
0.056915283203125,
0.00634765625,
0.0293426513671875,
0.01971435546875,
-0.01548004150390625,
0.00809478759765625,
0.0238800048828125,
-0.05377197265625,
-0.0027923583984375,
0.0165557861328125,
-0.0072479248046875,
0.0660400390625,
0.053802490234375,
0.02410888671875,
-0.0487060546875,
0.010955810546875,
-0.0347900390625,
-0.0081939697265625,
0.006488800048828125,
0.0245819091796875,
-0.016021728515625,
-0.0274505615234375,
-0.0272369384765625,
0.005649566650390625,
0.035919189453125,
0.036956787109375,
-0.0217742919921875,
0.024627685546875,
0.018890380859375,
-0.0263824462890625,
0.0194244384765625,
-0.0237579345703125,
0.04302978515625,
0.04168701171875,
-0.017974853515625,
-0.051666259765625,
-0.045806884765625,
-0.0168914794921875,
-0.04638671875,
0.00868988037109375,
0.0200958251953125,
-0.0384521484375,
0.01007080078125,
-0.02581787109375,
-0.0006051063537597656,
0.0143890380859375,
-0.0219879150390625,
0.00714111328125,
0.006542205810546875,
0.0004911422729492188,
-0.027557373046875,
-0.025146484375,
-0.01263427734375,
-0.058349609375,
-0.0133056640625,
0.0255279541015625,
-0.0305328369140625,
-0.00341033935546875,
0.001277923583984375,
-0.0197906494140625,
0.01934814453125,
0.00791168212890625,
-0.04534912109375,
0.0357666015625,
-0.0181732177734375,
-0.01500701904296875,
-0.0255279541015625,
-0.0279693603515625,
0.003997802734375,
0.0345458984375,
-0.00836944580078125,
-0.0310211181640625,
-0.030609130859375,
0.0192413330078125,
-0.0177764892578125,
0.0255279541015625,
0.020843505859375,
-0.037506103515625,
0.00982666015625,
0.058197021484375,
0.05230712890625,
0.091796875,
0.0125885009765625,
-0.03277587890625,
-0.0195465087890625,
0.0114288330078125,
-0.015899658203125,
-0.0166778564453125,
0.0299835205078125,
-0.0186004638671875,
-0.00431060791015625,
-0.01568603515625,
0.017852783203125,
0.020477294921875,
-0.034088134765625,
-0.07806396484375,
0.061004638671875,
-0.0182342529296875,
-0.0299530029296875,
-0.058013916015625,
0.034454345703125,
0.01273345947265625,
-0.0017099380493164062,
-0.017913818359375,
0.00914764404296875,
-0.009368896484375,
0.01280975341796875,
0.033905029296875,
0.0108795166015625,
0.0126953125,
0.037567138671875,
-0.0307769775390625,
0.04107666015625,
0.0122222900390625,
0.0233154296875,
0.0048675537109375,
-0.01538848876953125,
0.0245513916015625,
0.0286865234375,
-0.0231475830078125,
-0.0265045166015625,
0.0006575584411621094,
-0.01407623291015625,
-0.03643798828125,
-0.023223876953125,
-0.00827789306640625,
0.0024509429931640625,
0.053466796875,
0.052154541015625,
0.007579803466796875,
-0.0390625,
0.0203857421875,
0.035186767578125,
-0.01290130615234375,
-0.0213775634765625,
0.0024318695068359375,
-0.020782470703125,
-0.01947021484375,
-0.04461669921875,
-0.02203369140625,
-0.0032291412353515625,
-0.051971435546875,
-0.040618896484375,
-0.007251739501953125,
-0.061798095703125,
-0.00677490234375,
0.0260467529296875,
0.07489013671875,
0.06768798828125,
-0.056182861328125,
0.019195556640625,
-0.043914794921875,
-0.0113525390625,
0.0565185546875,
-0.09857177734375,
-0.01357269287109375,
0.006011962890625,
0.01282501220703125,
-0.0021228790283203125,
0.0198974609375,
-0.033050537109375,
0.042572021484375,
0.006328582763671875,
-0.0125732421875,
0.019195556640625,
0.023956298828125,
0.0140380859375,
-0.01023101806640625,
0.03131103515625,
0.0279388427734375,
0.0188751220703125,
-0.006488800048828125,
0.02325439453125,
-0.00887298583984375,
0.0265960693359375,
0.00034689903259277344,
-0.0137939453125,
0.04901123046875,
-0.053863525390625,
-0.00279998779296875,
0.03436279296875,
-0.0609130859375,
-0.020233154296875,
0.004657745361328125,
0.0157470703125,
-0.01247406005859375,
0.005809783935546875
] |
dbd4b61c474d4c94c8c399e6a745928575571583
|
Wordpress Stackexchange
Q: Is it possible to create an "export to PDF" option? I have a custom post-type "model", and I want to be able to export certain values (eg Name, Height, Shoe Size, etc) and a set number of images from the gallery, from each Model to a PDF.
Ultimately, what I want to be able to do is:
*
*From the Admin backend, click an "options tab" or some such
*select a number of Models,
*enter an email (or multiple, comma separated emails)
*Click a "send" button
*and have the PDFs generated and emailed off without further intervention.
Is this at all possible in WordPress? Or is this too complex? Surely you can do anything with PHP and WordPress ;)
A: To answer your questions:
*
*Yes, it is possible.
*Depends on what you consider to be "too complex".
*No, you cannot do anything... For example, WordPress and PHP will not bring your deceased loved ones back.
|
Q: Is it possible to create an "export to PDF" option? I have a custom post-type "model", and I want to be able to export certain values (eg Name, Height, Shoe Size, etc) and a set number of images from the gallery, from each Model to a PDF.
Ultimately, what I want to be able to do is:
*
*From the Admin backend, click an "options tab" or some such
*select a number of Models,
*enter an email (or multiple, comma separated emails)
*Click a "send" button
*and have the PDFs generated and emailed off without further intervention.
Is this at all possible in WordPress? Or is this too complex? Surely you can do anything with PHP and WordPress ;)
A: To answer your questions:
*
*Yes, it is possible.
*Depends on what you consider to be "too complex".
*No, you cannot do anything... For example, WordPress and PHP will not bring your deceased loved ones back.
|
wordpress
|
{
"language": "en",
"length": 157,
"provenance": "stackexchange_00019.jsonl.gz:407628",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11663"
}
|
[
0.0455322265625,
-0.024932861328125,
0.047698974609375,
0.041229248046875,
-0.0198516845703125,
-0.033447265625,
0.091552734375,
-0.05810546875,
0.01849365234375,
0.0201263427734375,
0.01419830322265625,
-0.033935546875,
-0.0147705078125,
-0.037017822265625,
-0.039642333984375,
-0.025054931640625,
0.04632568359375,
-0.0013027191162109375,
0.046600341796875,
0.0175933837890625,
0.0065155029296875,
0.046356201171875,
0.0164794921875,
0.0274505615234375,
0.003910064697265625,
0.051177978515625,
-0.0056304931640625,
-0.002521514892578125,
-0.006389617919921875,
0.00739288330078125,
0.0090789794921875,
-0.0224761962890625,
0.01580810546875,
0.0078277587890625,
-0.0039215087890625,
0.0162811279296875,
0.0010671615600585938,
-0.0025234222412109375,
-0.004726409912109375,
0.03607177734375,
0.004360198974609375,
-0.0006232261657714844,
0.006072998046875,
-0.028167724609375,
-0.0193023681640625,
-0.01277923583984375,
-0.0008554458618164062,
-0.0262451171875,
0.00681304931640625,
0.06805419921875,
-0.0021038055419921875,
0.004547119140625,
-0.0238800048828125,
0.0318603515625,
0.00341796875,
-0.037017822265625,
-0.0076904296875,
0.0745849609375,
0.047943115234375,
-0.0548095703125,
-0.06494140625,
-0.0157470703125,
0.03570556640625,
0.002033233642578125,
0.0264892578125,
-0.004085540771484375,
-0.091552734375,
0.0280303955078125,
0.0220947265625,
0.0259857177734375,
-0.0031299591064453125,
-0.0330810546875,
0.028533935546875,
-0.0670166015625,
0.0006995201110839844,
0.03802490234375,
0.00569915771484375,
-0.0015211105346679688,
-0.002567291259765625,
-0.0309600830078125,
0.030364990234375,
0.007312774658203125,
-0.021820068359375,
-0.01788330078125,
0.049774169921875,
0.0169525146484375,
0.0017919540405273438,
-0.0308380126953125,
-0.00974273681640625,
-0.01345062255859375,
-0.0085906982421875,
-0.01390838623046875,
-0.04901123046875,
0.04949951171875,
0.004734039306640625,
0.0004718303680419922,
-0.033172607421875,
-0.079345703125,
0.024688720703125,
0.054534912109375,
0.00525665283203125,
-0.038360595703125,
0.07501220703125,
-0.01320648193359375,
-0.0103912353515625,
0.043701171875,
0.0010023117065429688,
-0.01959228515625,
0.001712799072265625,
0.0099945068359375,
-0.00830841064453125,
-0.0238037109375,
-0.007427215576171875,
-0.036163330078125,
0.0112457275390625,
0.039093017578125,
-0.0109100341796875,
0.03631591796875,
0.0103302001953125,
0.0175018310546875,
-0.01214599609375,
0.022857666015625,
-0.01580810546875,
0.005710601806640625,
-0.00994873046875,
-0.003368377685546875,
0.0115814208984375,
-0.0276947021484375,
0.0806884765625,
-0.0030059814453125,
-0.07037353515625,
0.0225982666015625,
0.06646728515625,
0.01367950439453125,
0.0300750732421875,
-0.00707244873046875,
0.0259246826171875,
-0.0223236083984375,
0.01189422607421875,
0.01318359375,
0.0188446044921875,
-0.0222930908203125,
-0.0029201507568359375,
0.006443023681640625,
0.006832122802734375,
0.004150390625,
0.0265350341796875,
0.042999267578125,
-0.010223388671875,
-0.032867431640625,
0.0119476318359375,
0.02838134765625,
0.0025634765625,
-0.0034275054931640625,
0.028961181640625,
-0.01373291015625,
0.0031642913818359375,
-0.01031494140625,
0.033416748046875,
-0.003917694091796875,
0.00981903076171875,
0.004161834716796875,
0.0380859375,
-0.0152130126953125,
-0.006122589111328125,
0.00550079345703125,
-0.0848388671875,
-0.01326751708984375,
0.0244140625,
0.0216522216796875,
0.00018095970153808594,
-0.0251922607421875,
-0.0173797607421875,
0.02044677734375,
-0.0104522705078125,
0.0296630859375,
-0.05322265625,
-0.035369873046875,
0.041900634765625,
-0.00861358642578125,
-0.01611328125,
-0.0162811279296875,
0.0208740234375,
0.0259552001953125,
-0.013946533203125,
-0.00006502866744995117,
-0.00434112548828125,
0.03411865234375,
0.024261474609375,
0.0197601318359375,
-0.0521240234375,
-0.00901031494140625,
0.00005704164505004883,
-0.029632568359375,
-0.0439453125,
-0.0218963623046875,
0.0280914306640625,
0.0102996826171875,
-0.0115203857421875,
0.0254974365234375,
0.023345947265625,
0.00751495361328125,
0.004772186279296875,
-0.0200042724609375,
0.00843048095703125,
-0.0304412841796875,
0.019561767578125,
0.0153961181640625,
-0.049774169921875,
0.02386474609375,
0.032440185546875,
0.0130767822265625,
-0.04168701171875,
0.0011243820190429688,
0.01505279541015625,
-0.004695892333984375,
0.045928955078125,
-0.010986328125,
-0.00402069091796875,
-0.01446533203125,
0.0028324127197265625,
0.012725830078125,
-0.0251922607421875,
0.06890869140625,
-0.002803802490234375,
0.0020046234130859375,
-0.0309600830078125,
-0.0085906982421875,
-0.014373779296875,
-0.0206451416015625,
0.0201416015625,
0.048492431640625,
-0.006679534912109375,
0.011871337890625,
-0.0301361083984375,
-0.0195770263671875,
-0.0147247314453125,
-0.0238494873046875,
0.00858306884765625,
0.0360107421875,
0.02862548828125,
0.03839111328125,
0.0172119140625,
0.0172882080078125,
0.06085205078125,
0.00786590576171875,
0.033721923828125,
-0.0265655517578125,
-0.00397491455078125,
-0.0156707763671875,
0.0191650390625,
-0.00844573974609375,
0.02294921875,
-0.044189453125,
0.009735107421875,
0.0494384765625,
-0.0296783447265625,
-0.0164642333984375,
0.01024627685546875,
0.0021953582763671875,
0.0094451904296875,
0.00466156005859375,
0.000804901123046875,
-0.00867462158203125,
-0.021697998046875,
-0.004390716552734375,
0.01068115234375,
0.0016832351684570312,
-0.01367950439453125,
-0.019866943359375,
0.0144500732421875,
0.005603790283203125,
0.01079559326171875,
0.0181121826171875,
-0.002044677734375,
0.048980712890625,
-0.047943115234375,
-0.00015652179718017578,
0.021636962890625,
0.017547607421875,
-0.007526397705078125,
0.0029888153076171875,
0.0017194747924804688,
-0.0184173583984375,
0.026702880859375,
-0.01493072509765625,
0.0170440673828125,
-0.0227203369140625,
-0.04547119140625,
-0.0036792755126953125,
0.0360107421875,
0.01256561279296875,
-0.0096893310546875,
-0.0087890625,
-0.0254058837890625,
0.00452423095703125,
0.0684814453125,
-0.0294189453125,
0.0487060546875,
-0.017333984375,
0.08251953125,
0.062744140625,
-0.04730224609375,
0.050018310546875,
-0.01328277587890625,
0.0122222900390625,
0.00926971435546875,
-0.0245513916015625,
-0.027740478515625,
-0.051116943359375,
-0.01532745361328125,
0.002796173095703125,
0.00682830810546875,
0.029022216796875,
-0.0206298828125,
-0.0157623291015625,
-0.0208892822265625,
0.000004470348358154297,
-0.03582763671875,
-0.021575927734375,
0.038482666015625,
-0.056549072265625,
0.0154266357421875,
0.0222625732421875,
-0.02984619140625,
-0.02679443359375,
0.0850830078125,
-0.006870269775390625,
0.03302001953125,
-0.033599853515625,
-0.0181427001953125,
-0.0443115234375,
-0.060394287109375,
-0.053497314453125,
0.016632080078125,
-0.0037364959716796875,
0.0067596435546875,
0.072021484375,
-0.003986358642578125,
-0.0748291015625,
-0.0227813720703125,
0.007556915283203125,
-0.01519775390625,
0.010284423828125,
0.01197052001953125,
-0.05572509765625,
-0.019775390625,
-0.0164794921875,
0.08551025390625,
0.0008702278137207031,
0.0037689208984375,
0.008697509765625,
-0.0259246826171875,
0.0012722015380859375,
-0.041961669921875,
-0.01202392578125,
0.039215087890625,
-0.045684814453125,
-0.06744384765625,
-0.0699462890625,
0.0128173828125,
0.01300048828125,
-0.0188751220703125,
-0.00562286376953125,
-0.009918212890625,
-0.018402099609375,
-0.004840850830078125,
0.00830078125,
-0.012603759765625,
0.01526641845703125,
-0.0081939697265625,
-0.0182647705078125,
0.004589080810546875,
-0.0196380615234375,
-0.005397796630859375,
0.0163726806640625,
0.057708740234375,
-0.01084136962890625,
0.0251617431640625,
0.0293731689453125,
-0.0083465576171875,
-0.00604248046875,
-0.01003265380859375,
-0.0153961181640625,
-0.11737060546875,
0.0665283203125,
-0.0313720703125,
-0.0285186767578125,
-0.0238800048828125,
-0.031646728515625,
0.047576904296875,
0.1357421875,
0.022064208984375,
-0.01934814453125,
-0.00492095947265625,
0.01983642578125,
-0.036102294921875,
-0.0401611328125,
0.0004432201385498047,
-0.0016088485717773438,
-0.018890380859375,
0.01192474365234375,
0.0130767822265625,
-0.0294342041015625,
0.00325775146484375,
-0.060821533203125,
-0.004138946533203125,
-0.0389404296875,
0.00974273681640625,
0.063720703125,
0.0022716522216796875,
-0.01297760009765625,
-0.0017538070678710938,
-0.004520416259765625,
0.01493072509765625,
-0.002849578857421875,
-0.07928466796875,
-0.01071929931640625,
-0.0204925537109375,
0.0460205078125,
-0.00713348388671875,
0.00542449951171875,
0.0005931854248046875,
0.053314208984375,
-0.015716552734375,
0.015869140625,
-0.01010894775390625,
0.01047515869140625,
0.00682830810546875,
0.0011892318725585938,
-0.01393890380859375,
-0.01366424560546875,
-0.0193939208984375,
-0.056121826171875,
-0.030731201171875,
-0.004955291748046875,
-0.02789306640625,
0.00548553466796875,
-0.02667236328125,
0.0015087127685546875,
-0.0226593017578125,
-0.0282135009765625,
-0.0357666015625,
0.00992584228515625,
-0.01140594482421875,
-0.00957489013671875,
-0.038726806640625,
-0.058074951171875,
-0.0099945068359375,
0.0054473876953125,
-0.017547607421875,
0.0243377685546875,
0.0443115234375,
0.0209808349609375,
-0.003993988037109375,
-0.07012939453125,
-0.0175323486328125,
0.021453857421875,
-0.010284423828125,
0.036376953125,
0.0167999267578125,
-0.0169830322265625,
0.034454345703125,
-0.00341033935546875,
-0.006053924560546875,
-0.0784912109375,
0.07025146484375,
-0.01296234130859375,
-0.012451171875,
0.01885986328125,
-0.035736083984375,
0.06134033203125,
0.03173828125,
-0.0022144317626953125,
-0.031036376953125,
-0.027252197265625,
0.038360595703125,
0.0214996337890625,
-0.0167999267578125,
-0.03997802734375,
-0.0199127197265625,
-0.0025539398193359375,
-0.00676727294921875,
0.024658203125,
0.0260467529296875,
-0.01300048828125,
0.0008368492126464844,
0.0117034912109375,
0.02276611328125,
0.0266876220703125,
0.00022900104522705078,
-0.00992584228515625,
0.05120849609375,
0.01044464111328125,
0.0064849853515625,
0.03399658203125,
-0.01116943359375,
0.0035495758056640625,
0.0133209228515625,
-0.037811279296875,
0.003448486328125,
0.0010128021240234375,
-0.0172882080078125,
-0.0130462646484375,
-0.037109375,
0.0283355712890625,
0.0233154296875,
-0.017822265625,
0.01105499267578125,
-0.0443115234375,
-0.005619049072265625,
-0.046539306640625,
0.007904052734375,
0.0029582977294921875,
-0.007335662841796875,
0.023956298828125,
0.03167724609375,
-0.0213165283203125,
0.03497314453125,
-0.005756378173828125,
0.031890869140625,
0.056915283203125,
0.005340576171875,
0.018463134765625,
0.01177215576171875,
0.00830841064453125,
-0.025360107421875,
-0.00609588623046875,
-0.0307769775390625,
0.037506103515625,
0.00952911376953125,
0.034454345703125,
0.006443023681640625,
-0.04241943359375,
0.0295257568359375,
-0.049560546875,
-0.0207977294921875,
-0.0220184326171875,
-0.0105743408203125,
-0.01300811767578125,
0.0008287429809570312,
-0.00830841064453125,
-0.038726806640625,
0.0221405029296875,
-0.0161590576171875,
-0.005069732666015625,
-0.03485107421875,
-0.0004401206970214844,
-0.00917816162109375,
-0.0005488395690917969,
-0.0131683349609375,
-0.0307464599609375,
-0.050689697265625,
-0.007183074951171875,
0.02032470703125,
-0.0325927734375,
-0.0309906005859375,
-0.00836944580078125,
-0.034759521484375,
0.06683349609375,
-0.0102691650390625,
-0.01360321044921875,
-0.040496826171875,
0.0222930908203125,
-0.02679443359375,
0.00010919570922851562,
0.035552978515625,
-0.008544921875,
-0.01020050048828125,
-0.018157958984375,
-0.044891357421875,
-0.018310546875,
-0.00572967529296875,
-0.0189666748046875,
-0.0181121826171875,
-0.010894775390625,
0.027557373046875,
0.0325927734375,
-0.01013946533203125,
-0.07305908203125,
-0.0018301010131835938,
-0.0291595458984375,
0.0234527587890625,
-0.01140594482421875,
0.035308837890625,
0.034149169921875,
-0.025299072265625,
0.06768798828125,
0.01094818115234375,
0.0006456375122070312,
-0.047821044921875,
-0.0262908935546875,
0.004611968994140625,
-0.0263519287109375,
-0.0037860870361328125,
0.002315521240234375,
0.0127716064453125,
-0.01261138916015625,
-0.01019287109375,
-0.0103302001953125,
-0.00489044189453125,
-0.0185394287109375,
-0.0008521080017089844,
-0.007076263427734375,
-0.009124755859375,
-0.0169219970703125,
-0.0170745849609375,
0.0007009506225585938,
-0.042266845703125,
0.0121002197265625,
0.0209503173828125,
-0.01180267333984375,
0.039642333984375,
-0.03155517578125,
0.007080078125,
0.049835205078125,
-0.0033931732177734375,
0.01209259033203125,
0.0168914794921875,
-0.020599365234375,
0.01544952392578125,
0.02850341796875,
-0.0060577392578125,
0.01340484619140625,
0.002002716064453125,
-0.01018524169921875,
0.0202789306640625,
0.044586181640625,
-0.0211639404296875,
-0.0228271484375,
-0.01374053955078125,
-0.032562255859375,
0.059783935546875,
0.0660400390625,
0.089599609375,
-0.11065673828125,
0.037933349609375,
0.01514434814453125,
0.00023508071899414062,
0.06854248046875,
-0.0189208984375,
-0.0147552490234375,
-0.0751953125,
0.07757568359375,
-0.007022857666015625,
-0.0140533447265625,
0.002902984619140625,
-0.0189056396484375,
-0.016571044921875,
-0.00794219970703125,
0.0102081298828125,
-0.001956939697265625,
-0.0633544921875,
-0.00489044189453125,
0.0362548828125,
-0.04058837890625,
-0.041717529296875,
0.0158233642578125,
-0.00672149658203125,
0.0013256072998046875,
-0.0206451416015625,
0.04852294921875,
-0.0224151611328125,
0.03765869140625,
-0.05242919921875,
-0.004238128662109375,
0.0740966796875,
0.057220458984375,
-0.0031566619873046875,
-0.0102386474609375,
0.036865234375,
0.02105712890625,
-0.006168365478515625,
-0.0167236328125,
0.0114288330078125,
0.0127410888671875,
-0.0526123046875,
0.01788330078125,
-0.0305938720703125,
0.00675201416015625,
-0.0213165283203125,
0.01082611083984375,
0.08935546875,
0.020904541015625,
-0.051849365234375,
0.032073974609375,
0.01010894775390625,
-0.0460205078125,
0.023529052734375,
-0.01027679443359375,
-0.023956298828125,
-0.0247039794921875,
0.01194000244140625,
-0.0517578125,
0.03240966796875,
0.046234130859375,
-0.05413818359375,
0.10174560546875,
-0.050933837890625,
0.032470703125,
0.020172119140625,
0.046051025390625,
-0.00423431396484375,
0.021392822265625,
-0.020751953125,
0.0227813720703125,
0.05450439453125,
0.01036834716796875,
-0.03717041015625,
-0.0247039794921875,
0.0003731250762939453,
0.057647705078125,
0.0033550262451171875,
-0.005786895751953125,
-0.0106201171875,
-0.00005310773849487305,
0.06146240234375,
0.019744873046875,
0.01024627685546875,
0.036834716796875,
0.0213775634765625,
-0.03533935546875,
0.0338134765625,
0.00850677490234375,
0.03314208984375,
-0.0219268798828125,
0.020233154296875,
0.029541015625,
-0.020904541015625,
-0.0180816650390625,
-0.01485443115234375,
-0.00457763671875,
0.0297088623046875,
-0.034637451171875,
-0.03460693359375,
-0.031524658203125,
-0.0023822784423828125,
0.045166015625,
0.040618896484375,
-0.0250091552734375,
0.04217529296875,
-0.033843994140625,
0.055694580078125,
0.011444091796875,
-0.01513671875,
0.00803375244140625,
0.0034427642822265625,
-0.007099151611328125,
-0.027984619140625,
-0.028533935546875,
-0.004077911376953125,
0.0035495758056640625,
0.0215606689453125,
-0.0208892822265625,
0.01320648193359375,
-0.053009033203125,
0.0095977783203125,
0.049285888671875,
0.041107177734375,
-0.03350830078125,
-0.017364501953125,
0.0055999755859375,
0.0099334716796875,
0.0185089111328125,
0.0004658699035644531,
0.042877197265625,
-0.002422332763671875,
0.01238250732421875,
-0.04608154296875,
-0.01361083984375,
0.02685546875,
0.039703369140625,
-0.0107574462890625,
-0.0037136077880859375,
-0.0245361328125,
-0.046142578125,
-0.00496673583984375,
0.005519866943359375,
0.0078887939453125,
0.01361846923828125,
-0.01114654541015625,
0.0330810546875,
0.00801849365234375,
0.0038700103759765625,
-0.0173187255859375,
0.0362548828125,
-0.00878143310546875,
0.017486572265625,
-0.01861572265625,
-0.01654052734375,
-0.00003814697265625,
0.0243377685546875,
-0.013763427734375,
0.03424072265625,
0.0400390625,
0.051727294921875,
0.0012826919555664062,
-0.0174560546875,
0.02264404296875,
-0.0209503173828125,
0.00884246826171875,
-0.02398681640625,
0.0093994140625,
0.021209716796875,
-0.01065826416015625,
-0.0219268798828125,
-0.0005555152893066406,
0.06256103515625,
-0.056915283203125,
0.059722900390625,
-0.01548004150390625,
-0.01557159423828125,
0.06549072265625,
-0.014892578125,
0.106201171875,
-0.01419830322265625,
-0.09063720703125,
-0.0207672119140625,
-0.00527191162109375,
-0.020843505859375,
0.009368896484375,
0.02545166015625,
-0.0237579345703125,
0.0240325927734375,
-0.0012159347534179688,
0.0025997161865234375,
0.022674560546875,
-0.01873779296875,
0.0005927085876464844,
0.002307891845703125,
0.0272064208984375,
0.00582122802734375,
-0.08184814453125,
-0.04534912109375,
-0.07623291015625,
0.0712890625,
0.042816162109375,
0.10150146484375,
-0.03558349609375,
0.0452880859375,
0.003387451171875,
0.02752685546875,
-0.0421142578125,
-0.030426025390625,
0.056182861328125,
-0.0300750732421875,
-0.005031585693359375,
-0.006683349609375,
0.00934600830078125,
-0.032135009765625,
0.03643798828125,
-0.058441162109375,
-0.0716552734375,
-0.01296234130859375,
0.0430908203125,
0.03204345703125,
0.0211334228515625,
-0.01727294921875,
-0.0167388916015625,
0.00908660888671875,
0.0025081634521484375,
0.016693115234375,
0.0367431640625,
0.0245361328125,
0.022216796875,
0.0278472900390625,
-0.029327392578125,
0.029632568359375,
-0.053131103515625,
0.0517578125,
0.047210693359375,
0.019073486328125,
-0.0765380859375,
0.01611328125,
0.0034332275390625,
-0.020660400390625,
0.0145111083984375,
0.09112548828125,
0.0008516311645507812,
-0.03375244140625,
-0.0177764892578125,
0.00585174560546875,
-0.01029205322265625,
-0.0357666015625,
0.0003311634063720703,
0.0214691162109375,
-0.01788330078125,
0.00180816650390625,
-0.007129669189453125,
-0.0189361572265625,
-0.038360595703125,
-0.01471710205078125,
0.014007568359375,
-0.017852783203125,
-0.0193023681640625,
-0.052825927734375,
-0.0171051025390625,
0.0237884521484375,
0.0186614990234375,
-0.0399169921875,
0.024322509765625,
0.0026397705078125,
-0.02935791015625,
0.006877899169921875,
0.013671875,
0.0008835792541503906,
-0.0001844167709350586,
-0.01326751708984375,
-0.045257568359375,
-0.01468658447265625,
0.0623779296875,
0.0029010772705078125,
0.0271759033203125,
0.032379150390625,
-0.031890869140625,
0.021331787109375,
0.03631591796875,
0.0238189697265625,
0.08148193359375,
0.002124786376953125,
-0.034423828125,
-0.0107574462890625,
-0.01082611083984375,
0.00007814168930053711,
-0.0168914794921875,
0.0284576416015625,
-0.07293701171875,
-0.01149749755859375,
-0.002353668212890625,
0.00754547119140625,
0.03857421875,
-0.037109375,
-0.1138916015625,
0.038665771484375,
-0.021820068359375,
-0.051971435546875,
-0.00421142578125,
0.01311492919921875,
-0.01494598388671875,
-0.0118560791015625,
-0.007289886474609375,
0.0006074905395507812,
0.00612640380859375,
0.0166473388671875,
0.0169525146484375,
0.0156707763671875,
-0.0168609619140625,
0.028717041015625,
-0.053070068359375,
0.042022705078125,
0.01904296875,
0.019622802734375,
0.01462554931640625,
-0.0009555816650390625,
0.03228759765625,
0.0648193359375,
-0.004619598388671875,
0.0069580078125,
-0.00830841064453125,
-0.07891845703125,
-0.0162200927734375,
-0.0038089752197265625,
-0.0305633544921875,
0.0290374755859375,
0.00832366943359375,
0.10455322265625,
0.01084136962890625,
-0.0440673828125,
-0.0069427490234375,
-0.0228271484375,
-0.006809234619140625,
-0.005313873291015625,
-0.0013151168823242188,
-0.043670654296875,
-0.0083465576171875,
0.015411376953125,
-0.00160980224609375,
0.012969970703125,
0.025634765625,
-0.0017194747924804688,
-0.008087158203125,
0.032745361328125,
-0.032867431640625,
-0.036224365234375,
-0.016754150390625,
-0.0035457611083984375,
-0.007724761962890625,
0.0016851425170898438,
-0.016357421875,
0.0157928466796875,
-0.0239715576171875,
0.0335693359375,
0.00861358642578125,
0.027252197265625,
-0.0018510818481445312,
0.00806427001953125,
0.0212249755859375,
-0.0218658447265625,
0.01338958740234375,
0.00347137451171875,
0.0217132568359375,
0.01506805419921875,
0.0083770751953125,
0.0224151611328125,
-0.043243408203125,
0.0290069580078125,
-0.007244110107421875,
-0.008697509765625,
-0.047271728515625,
-0.0206298828125,
-0.050018310546875,
0.011444091796875,
-0.0199737548828125,
0.023468017578125,
0.05487060546875,
-0.0292205810546875,
0.0190277099609375,
-0.006565093994140625,
0.0098876953125,
-0.017486572265625,
0.0009622573852539062,
0.021575927734375,
0.0016412734985351562,
0.01239776611328125
] |
fdb99ae2851e67f446317aad698280c43c9fd5b4
|
Wordpress Stackexchange
Q: How can I determine if a post has an image attachment? As far as I know, there's not a simple function that will return true if a post has an attachment. With that in mind, what's the best way to determine if a post has an attachment (or even better, has an image attachment)? I'm automatically inserting a shortcode on posts, but would like that to only happen if there is actually an image attached to the post.
A: I think this should work:
$attachments = get_children( array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image') );
if ( $attachments ) {
// do conditional stuff here
}
|
Q: How can I determine if a post has an image attachment? As far as I know, there's not a simple function that will return true if a post has an attachment. With that in mind, what's the best way to determine if a post has an attachment (or even better, has an image attachment)? I'm automatically inserting a shortcode on posts, but would like that to only happen if there is actually an image attached to the post.
A: I think this should work:
$attachments = get_children( array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image') );
if ( $attachments ) {
// do conditional stuff here
}
|
wordpress
|
{
"language": "en",
"length": 109,
"provenance": "stackexchange_00019.jsonl.gz:407639",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11691"
}
|
[
0.0557861328125,
-0.0011749267578125,
0.02362060546875,
0.006336212158203125,
0.00511932373046875,
-0.017791748046875,
0.059234619140625,
-0.060302734375,
0.01160430908203125,
0.0143280029296875,
-0.0295562744140625,
0.009735107421875,
-0.04351806640625,
-0.01371002197265625,
-0.041473388671875,
-0.034027099609375,
0.049163818359375,
-0.0153045654296875,
0.055877685546875,
0.0005655288696289062,
0.00884246826171875,
0.039947509765625,
0.044586181640625,
0.003894805908203125,
0.005767822265625,
0.0240325927734375,
0.084228515625,
-0.0189666748046875,
-0.003574371337890625,
-0.005023956298828125,
0.0245819091796875,
-0.0235748291015625,
0.031341552734375,
0.023193359375,
-0.0312042236328125,
0.0400390625,
-0.037841796875,
0.0179290771484375,
-0.0136260986328125,
0.0298919677734375,
0.01044464111328125,
-0.0023822784423828125,
0.033416748046875,
-0.0136566162109375,
-0.00443267822265625,
0.01107025146484375,
-0.0178680419921875,
-0.043975830078125,
0.0269622802734375,
-0.0270233154296875,
0.00878143310546875,
0.043212890625,
0.028076171875,
-0.03485107421875,
-0.01306915283203125,
0.01537322998046875,
-0.06207275390625,
0.0377197265625,
0.026397705078125,
-0.020233154296875,
-0.020599365234375,
-0.032440185546875,
0.031463623046875,
0.016265869140625,
0.0033931732177734375,
0.0004017353057861328,
0.01104736328125,
0.0081329345703125,
-0.03387451171875,
-0.01457977294921875,
0.02838134765625,
-0.0261993408203125,
-0.0255584716796875,
-0.0252685546875,
0.0006909370422363281,
-0.0159759521484375,
0.00943756103515625,
-0.031890869140625,
-0.0119476318359375,
0.01436614990234375,
-0.0017499923706054688,
0.005474090576171875,
-0.0247955322265625,
0.007709503173828125,
-0.00115203857421875,
0.0350341796875,
-0.005954742431640625,
-0.02667236328125,
-0.0116729736328125,
-0.046112060546875,
0.0018138885498046875,
-0.0064849853515625,
-0.029541015625,
-0.0041046142578125,
-0.026580810546875,
-0.042877197265625,
0.04058837890625,
0.04345703125,
-0.0095977783203125,
-0.006725311279296875,
-0.00974273681640625,
-0.041748046875,
0.0026569366455078125,
-0.0277557373046875,
0.010345458984375,
0.01123809814453125,
0.001506805419921875,
-0.0618896484375,
0.015838623046875,
0.0196533203125,
-0.0215301513671875,
0.06927490234375,
0.0085296630859375,
0.0210418701171875,
-0.0088958740234375,
-0.00323486328125,
-0.03668212890625,
0.0318603515625,
-0.0255889892578125,
0.041473388671875,
-0.0210113525390625,
-0.000446319580078125,
0.02264404296875,
-0.00862884521484375,
0.0025196075439453125,
0.01080322265625,
-0.0129547119140625,
-0.03594970703125,
0.0760498046875,
0.0304718017578125,
-0.038421630859375,
0.0009851455688476562,
0.0161285400390625,
-0.029571533203125,
-0.0022335052490234375,
-0.01763916015625,
-0.040252685546875,
-0.017181396484375,
0.0024471282958984375,
-0.003208160400390625,
0.010955810546875,
-0.032073974609375,
0.020416259765625,
0.016082763671875,
-0.03021240234375,
0.036895751953125,
0.018035888671875,
0.01971435546875,
-0.021728515625,
-0.10296630859375,
0.048614501953125,
-0.05767822265625,
0.016143798828125,
0.0297698974609375,
-0.01334381103515625,
0.0194549560546875,
0.010711669921875,
0.0008730888366699219,
-0.00820159912109375,
-0.032501220703125,
0.057891845703125,
0.01517486572265625,
0.012176513671875,
0.04119873046875,
0.0023021697998046875,
-0.00807952880859375,
-0.038299560546875,
-0.00814056396484375,
0.0217742919921875,
0.0286102294921875,
0.0085296630859375,
0.0003554821014404297,
-0.0203857421875,
-0.000308990478515625,
-0.006267547607421875,
-0.00543212890625,
0.0045318603515625,
-0.0144195556640625,
0.0279541015625,
0.055755615234375,
0.005207061767578125,
-0.00969696044921875,
0.058013916015625,
-0.021759033203125,
-0.0254364013671875,
0.0248565673828125,
0.005008697509765625,
0.0281982421875,
0.0233154296875,
0.0270538330078125,
-0.0017910003662109375,
0.019439697265625,
-0.01294708251953125,
-0.0157318115234375,
-0.0051727294921875,
-0.0160675048828125,
0.0066986083984375,
-0.0111541748046875,
-0.0016965866088867188,
0.025482177734375,
0.0279083251953125,
-0.023895263671875,
0.0178375244140625,
-0.02789306640625,
-0.00594329833984375,
-0.02227783203125,
-0.0084228515625,
0.01419830322265625,
-0.041900634765625,
0.039276123046875,
0.0285491943359375,
-0.00682830810546875,
-0.038848876953125,
0.0294189453125,
0.042724609375,
0.022613525390625,
-0.0296173095703125,
-0.017913818359375,
-0.052978515625,
0.0163116455078125,
-0.07904052734375,
-0.009368896484375,
-0.072509765625,
0.026123046875,
0.048980712890625,
0.0124053955078125,
-0.0113067626953125,
-0.00614166259765625,
0.024139404296875,
0.033966064453125,
-0.0474853515625,
-0.0001513957977294922,
-0.035919189453125,
-0.056060791015625,
-0.0277862548828125,
-0.0010271072387695312,
-0.01483154296875,
-0.07537841796875,
0.012481689453125,
0.0716552734375,
0.054595947265625,
0.0277557373046875,
0.00260162353515625,
-0.0082855224609375,
0.09881591796875,
0.00823211669921875,
0.0114898681640625,
-0.030792236328125,
0.0092926025390625,
0.01715087890625,
0.019866943359375,
0.0216522216796875,
0.0069427490234375,
-0.044403076171875,
0.045867919921875,
0.028533935546875,
0.00861358642578125,
0.01371002197265625,
-0.006557464599609375,
0.0243377685546875,
-0.0003371238708496094,
0.0791015625,
0.02093505859375,
0.02569580078125,
0.02276611328125,
0.039398193359375,
0.0413818359375,
0.026031494140625,
-0.04180908203125,
0.03497314453125,
0.0088348388671875,
-0.022674560546875,
0.0172271728515625,
0.07568359375,
0.059234619140625,
0.050994873046875,
-0.02911376953125,
-0.0550537109375,
0.04443359375,
0.06439208984375,
-0.032470703125,
-0.0037517547607421875,
0.00043773651123046875,
-0.0007252693176269531,
-0.01529693603515625,
-0.045135498046875,
0.038543701171875,
-0.008514404296875,
-0.00024068355560302734,
0.010589599609375,
0.02044677734375,
0.0472412109375,
0.027740478515625,
0.01548004150390625,
0.02618408203125,
0.00853729248046875,
-0.02435302734375,
-0.056304931640625,
0.074951171875,
-0.064208984375,
0.001140594482421875,
0.0753173828125,
-0.023956298828125,
0.049591064453125,
-0.00859832763671875,
0.016387939453125,
-0.0232391357421875,
0.0268096923828125,
0.010498046875,
-0.033172607421875,
-0.0155029296875,
0.019805908203125,
-0.0007500648498535156,
0.0469970703125,
-0.04608154296875,
-0.067626953125,
-0.021820068359375,
-0.00710296630859375,
-0.09259033203125,
-0.060089111328125,
-0.0266571044921875,
-0.055389404296875,
0.0079498291015625,
-0.01279449462890625,
-0.01363372802734375,
-0.01519012451171875,
0.0204620361328125,
0.01390838623046875,
-0.04803466796875,
-0.005886077880859375,
-0.034149169921875,
-0.045379638671875,
-0.039642333984375,
0.010101318359375,
-0.0007505416870117188,
0.01312255859375,
0.01145172119140625,
0.053497314453125,
0.01049041748046875,
-0.037139892578125,
0.0190887451171875,
0.00882720947265625,
-0.00531005859375,
0.020538330078125,
-0.004093170166015625,
0.0227813720703125,
-0.0426025390625,
0.00695037841796875,
0.00926971435546875,
-0.007678985595703125,
-0.0105743408203125,
-0.01552581787109375,
-0.00872039794921875,
-0.003040313720703125,
0.01305389404296875,
0.01453399658203125,
-0.00478363037109375,
-0.01248931884765625,
0.025604248046875,
-0.04388427734375,
-0.00426483154296875,
-0.0275115966796875,
-0.045257568359375,
-0.01190185546875,
0.00852203369140625,
0.00807952880859375,
-0.00970458984375,
-0.0018529891967773438,
0.013153076171875,
-0.00453948974609375,
0.004184722900390625,
-0.0221710205078125,
0.061859130859375,
0.0005388259887695312,
0.027130126953125,
-0.0183563232421875,
-0.004978179931640625,
-0.0306549072265625,
0.00836944580078125,
-0.024627685546875,
-0.005901336669921875,
-0.039581298828125,
0.035736083984375,
-0.0292510986328125,
-0.051025390625,
0.054718017578125,
-0.0091552734375,
0.01177215576171875,
-0.049957275390625,
-0.034027099609375,
-0.022064208984375,
0.0797119140625,
0.0201568603515625,
-0.032867431640625,
-0.028717041015625,
-0.000347137451171875,
-0.02252197265625,
-0.0185699462890625,
0.028533935546875,
0.004474639892578125,
-0.043548583984375,
-0.0021076202392578125,
-0.01302337646484375,
-0.021148681640625,
-0.04486083984375,
-0.01500701904296875,
-0.057647705078125,
-0.0213165283203125,
0.01953125,
-0.0275726318359375,
0.0192413330078125,
0.04144287109375,
-0.007053375244140625,
0.02947998046875,
-0.0281982421875,
-0.040618896484375,
-0.0762939453125,
0.005954742431640625,
-0.01148223876953125,
0.00616455078125,
-0.020111083984375,
0.005764007568359375,
-0.018310546875,
0.0230255126953125,
0.00971221923828125,
0.002197265625,
-0.014434814453125,
0.0017118453979492188,
-0.031280517578125,
-0.0218353271484375,
-0.00672149658203125,
-0.0241851806640625,
0.01212310791015625,
-0.027313232421875,
-0.047149658203125,
-0.05926513671875,
-0.059478759765625,
-0.01012420654296875,
0.0013484954833984375,
-0.0253448486328125,
0.023681640625,
0.015350341796875,
0.0108489990234375,
0.05224609375,
-0.021270751953125,
0.006465911865234375,
-0.03045654296875,
-0.01534271240234375,
0.017333984375,
0.0055084228515625,
-0.024078369140625,
0.0145416259765625,
0.04949951171875,
0.006195068359375,
-0.013824462890625,
-0.08636474609375,
0.052337646484375,
0.0517578125,
-0.005252838134765625,
0.036865234375,
0.045074462890625,
-0.023193359375,
0.0221405029296875,
0.04071044921875,
0.00824737548828125,
-0.04449462890625,
0.0628662109375,
-0.0028820037841796875,
0.0026569366455078125,
0.0093841552734375,
-0.011444091796875,
0.03509521484375,
-0.023681640625,
-0.01233673095703125,
-0.03265380859375,
-0.00021028518676757812,
0.039215087890625,
-0.01678466796875,
0.0628662109375,
-0.007495880126953125,
-0.03839111328125,
0.00829315185546875,
-0.0008726119995117188,
0.0085906982421875,
0.010955810546875,
-0.00302886962890625,
0.014404296875,
0.0222320556640625,
0.0005140304565429688,
-0.0076751708984375,
0.0204925537109375,
-0.003887176513671875,
0.058197021484375,
-0.02130126953125,
0.00542449951171875,
-0.0177001953125,
0.006011962890625,
0.0119781494140625,
0.001049041748046875,
-0.019073486328125,
-0.04913330078125,
-0.01171875,
0.005413055419921875,
-0.006557464599609375,
-0.004119873046875,
0.05657958984375,
-0.01258087158203125,
-0.055419921875,
-0.0103302001953125,
-0.0587158203125,
-0.031829833984375,
-0.08636474609375,
-0.019989013671875,
-0.0095367431640625,
-0.021453857421875,
0.0665283203125,
-0.025787353515625,
-0.05084228515625,
0.02142333984375,
0.007808685302734375,
-0.0020084381103515625,
0.01047515869140625,
0.017333984375,
0.0250091552734375,
0.0185089111328125,
-0.018798828125,
-0.0005483627319335938,
0.0205078125,
-0.059844970703125,
0.0120697021484375,
0.0155029296875,
0.07623291015625,
-0.04730224609375,
-0.07366943359375,
0.052947998046875,
-0.0474853515625,
-0.037445068359375,
0.038787841796875,
0.05279541015625,
-0.01094818115234375,
-0.034759521484375,
-0.0109710693359375,
0.026824951171875,
0.0298309326171875,
-0.02691650390625,
-0.0029163360595703125,
-0.0021305084228515625,
0.029022216796875,
0.039306640625,
-0.0487060546875,
0.038238525390625,
0.034423828125,
-0.04022216796875,
-0.0220489501953125,
-0.0206298828125,
0.042633056640625,
-0.01113128662109375,
-0.0035457611083984375,
-0.017425537109375,
0.039581298828125,
0.00667572021484375,
0.0184783935546875,
-0.03436279296875,
-0.014801025390625,
-0.0141448974609375,
-0.00447845458984375,
0.0511474609375,
0.00470733642578125,
-0.031707763671875,
0.005474090576171875,
-0.060882568359375,
-0.0008916854858398438,
0.01739501953125,
-0.04254150390625,
-0.03375244140625,
-0.024139404296875,
-0.00909423828125,
0.037841796875,
-0.014129638671875,
0.0200042724609375,
0.004352569580078125,
0.0247802734375,
-0.0084686279296875,
0.069091796875,
0.037811279296875,
-0.000058650970458984375,
-0.003940582275390625,
0.03582763671875,
0.025848388671875,
-0.01506805419921875,
-0.0265350341796875,
-0.03521728515625,
-0.0164337158203125,
-0.0491943359375,
0.032806396484375,
0.031829833984375,
0.040191650390625,
-0.04754638671875,
-0.06329345703125,
0.0206451416015625,
-0.024139404296875,
-0.0094146728515625,
-0.01052093505859375,
-0.0234832763671875,
0.04833984375,
0.01338958740234375,
0.004619598388671875,
-0.005214691162109375,
-0.0309906005859375,
0.02105712890625,
-0.0009632110595703125,
-0.003040313720703125,
0.016082763671875,
-0.0245819091796875,
0.002559661865234375,
0.03399658203125,
0.002899169921875,
0.035858154296875,
0.0675048828125,
-0.034088134765625,
0.0208587646484375,
0.0452880859375,
-0.005474090576171875,
0.016143798828125,
0.055450439453125,
-0.02239990234375,
-0.0567626953125,
0.07232666015625,
0.0384521484375,
-0.02728271484375,
0.04815673828125,
-0.033599853515625,
0.034637451171875,
-0.01548004150390625,
0.053466796875,
0.0085296630859375,
0.0234375,
0.0179901123046875,
-0.0194091796875,
0.038299560546875,
-0.0209197998046875,
0.007053375244140625,
-0.00910186767578125,
0.05548095703125,
-0.035247802734375,
-0.0227203369140625,
0.00890350341796875,
-0.047760009765625,
0.01253509521484375,
-0.00859832763671875,
0.044036865234375,
0.01324462890625,
-0.044525146484375,
-0.0130462646484375,
0.055419921875,
-0.012908935546875,
-0.035186767578125,
0.011932373046875,
-0.026031494140625,
-0.0220489501953125,
-0.051666259765625,
-0.01195526123046875,
-0.0207977294921875,
0.027618408203125,
-0.010711669921875,
-0.01314544677734375,
0.036224365234375,
0.048248291015625,
-0.01776123046875,
0.00922393798828125,
0.025848388671875,
-0.04327392578125,
-0.028656005859375,
-0.007160186767578125,
0.0240631103515625,
0.045989990234375,
-0.055023193359375,
0.0244140625,
-0.04022216796875,
0.0209808349609375,
-0.00960540771484375,
-0.048980712890625,
0.068603515625,
-0.08599853515625,
0.0214385986328125,
0.015594482421875,
0.03662109375,
0.0027599334716796875,
-0.00868988037109375,
0.035675048828125,
-0.0245361328125,
-0.01238250732421875,
-0.0092010498046875,
-0.051177978515625,
-0.0599365234375,
-0.07049560546875,
-0.07098388671875,
0.05218505859375,
-0.0009322166442871094,
0.049407958984375,
-0.021087646484375,
0.01169586181640625,
0.024810791015625,
0.01175689697265625,
-0.033050537109375,
0.06292724609375,
0.00861358642578125,
0.0294952392578125,
-0.04766845703125,
-0.0015735626220703125,
0.01338958740234375,
0.036041259765625,
0.052490234375,
0.0033855438232421875,
0.01015472412109375,
-0.0188140869140625,
0.057098388671875,
0.03741455078125,
-0.003570556640625,
0.00815582275390625,
0.005664825439453125,
-0.01029205322265625,
0.035247802734375,
-0.0185546875,
0.035400390625,
-0.0343017578125,
0.00910186767578125,
0.01088714599609375,
0.006427764892578125,
0.0025043487548828125,
0.01502227783203125,
0.0367431640625,
-0.023529052734375,
0.00666046142578125,
0.039398193359375,
-0.043487548828125,
0.017242431640625,
0.0310516357421875,
0.032623291015625,
-0.052459716796875,
-0.0235443115234375,
-0.015777587890625,
0.046295166015625,
-0.00566864013671875,
0.019287109375,
0.0182647705078125,
0.010101318359375,
0.007366180419921875,
0.020965576171875,
0.026611328125,
0.054168701171875,
-0.032257080078125,
-0.01194000244140625,
-0.005794525146484375,
-0.003810882568359375,
-0.053436279296875,
-0.0197906494140625,
0.0611572265625,
0.00925445556640625,
-0.01271820068359375,
-0.0235137939453125,
0.0293121337890625,
-0.002132415771484375,
-0.033294677734375,
-0.01238250732421875,
-0.0284423828125,
-0.01226806640625,
0.0256805419921875,
-0.050506591796875,
0.01004791259765625,
0.04510498046875,
0.041107177734375,
0.00428009033203125,
0.01342010498046875,
-0.06500244140625,
-0.026092529296875,
-0.0114288330078125,
-0.005214691162109375,
0.00739288330078125,
0.022552490234375,
-0.00251007080078125,
0.0263671875,
-0.0134124755859375,
0.01004791259765625,
-0.001178741455078125,
0.036834716796875,
-0.01222991943359375,
0.01447296142578125,
-0.00458526611328125,
-0.046478271484375,
-0.01422882080078125,
0.022552490234375,
0.041748046875,
-0.032958984375,
0.0214385986328125,
0.0173187255859375,
-0.0150146484375,
-0.009918212890625,
-0.01458740234375,
-0.01409912109375,
0.0028133392333984375,
-0.03521728515625,
0.01561737060546875,
0.029754638671875,
-0.0010280609130859375,
-0.00800323486328125,
-0.030303955078125,
0.07647705078125,
-0.0262451171875,
0.04693603515625,
-0.004444122314453125,
0.0044708251953125,
0.04547119140625,
0.0194549560546875,
0.04486083984375,
0.03363037109375,
-0.04791259765625,
-0.00521087646484375,
-0.0020599365234375,
-0.06854248046875,
0.007274627685546875,
0.0306243896484375,
-0.0361328125,
0.0263519287109375,
-0.0235595703125,
-0.022308349609375,
0.0270233154296875,
0.00732421875,
-0.01557159423828125,
-0.01544952392578125,
0.00849151611328125,
-0.036224365234375,
-0.00455474853515625,
-0.0212554931640625,
0.00261688232421875,
0.03204345703125,
0.0135498046875,
0.0186767578125,
0.0017709732055664062,
0.0058441162109375,
-0.007038116455078125,
0.0136566162109375,
-0.037200927734375,
0.00705718994140625,
0.00632476806640625,
-0.0197296142578125,
-0.0162353515625,
-0.0010061264038085938,
-0.00319671630859375,
0.022918701171875,
0.0157623291015625,
-0.01103973388671875,
-0.03387451171875,
-0.004302978515625,
0.026458740234375,
0.02978515625,
0.0243682861328125,
-0.03106689453125,
-0.01509857177734375,
-0.033294677734375,
-0.021575927734375,
0.0241546630859375,
0.00411224365234375,
0.0244293212890625,
0.02105712890625,
0.0198516845703125,
-0.01031494140625,
0.026519775390625,
-0.01849365234375,
0.0295562744140625,
0.04083251953125,
-0.03460693359375,
-0.02655029296875,
-0.0076141357421875,
-0.024078369140625,
0.013092041015625,
-0.005428314208984375,
0.041351318359375,
0.00572967529296875,
-0.0289764404296875,
-0.013671875,
0.0163421630859375,
0.022491455078125,
-0.0186767578125,
-0.004665374755859375,
0.0081024169921875,
-0.016693115234375,
-0.01470184326171875,
-0.00740814208984375,
-0.00931549072265625,
-0.037353515625,
0.00530242919921875,
0.0178985595703125,
0.0015087127685546875,
0.01465606689453125,
0.01387786865234375,
-0.0177154541015625,
0.0080108642578125,
0.0019445419311523438,
-0.0307769775390625,
0.00714111328125,
0.004138946533203125,
-0.017913818359375,
-0.0199432373046875,
0.017181396484375,
0.007251739501953125,
0.031768798828125,
-0.00023257732391357422,
-0.01953125,
-0.0188140869140625,
0.04168701171875,
-0.01174163818359375,
0.0654296875,
0.0654296875,
-0.074951171875,
0.0142974853515625,
0.05328369140625,
0.0810546875,
0.07568359375,
0.04217529296875,
-0.03057861328125,
-0.0111541748046875,
0.024505615234375,
-0.01274871826171875,
-0.0168914794921875,
0.02276611328125,
-0.0292205810546875,
-0.0087738037109375,
-0.09014892578125,
0.05755615234375,
0.041778564453125,
-0.03900146484375,
-0.10498046875,
0.05633544921875,
-0.0609130859375,
-0.0254058837890625,
-0.0682373046875,
0.04736328125,
0.007282257080078125,
-0.0204925537109375,
-0.01520538330078125,
0.002651214599609375,
0.0014371871948242188,
0.0266265869140625,
0.01190185546875,
-0.0247955322265625,
0.05224609375,
-0.0015201568603515625,
-0.06976318359375,
-0.01522064208984375,
-0.032012939453125,
0.0003464221954345703,
0.0081024169921875,
-0.01258087158203125,
0.032440185546875,
0.061431884765625,
-0.018341064453125,
-0.007289886474609375,
0.004123687744140625,
-0.031890869140625,
-0.024017333984375,
-0.0201263427734375,
-0.01148223876953125,
0.028961181640625,
0.053955078125,
0.09771728515625,
0.01407623291015625,
-0.056549072265625,
-0.01102447509765625,
-0.01318359375,
-0.0595703125,
-0.0157012939453125,
0.01218414306640625,
-0.00261688232421875,
0.025787353515625,
-0.0516357421875,
-0.0113983154296875,
-0.039031982421875,
-0.022125244140625,
-0.051055908203125,
-0.0149993896484375,
-0.023590087890625,
0.01247406005859375,
-0.00998687744140625,
0.0115814208984375,
0.04364013671875,
-0.03753662109375,
0.022003173828125,
-0.0001901388168334961,
0.003673553466796875,
0.040313720703125,
0.0205078125,
0.053253173828125,
0.03814697265625,
-0.02288818359375,
-0.0176239013671875,
0.046234130859375,
-0.0020904541015625,
0.01119232177734375,
-0.038360595703125,
0.0028362274169921875,
0.00518798828125,
0.004154205322265625,
-0.003047943115234375,
-0.00414276123046875,
0.0237579345703125,
0.003055572509765625,
0.0119171142578125,
0.0011396408081054688,
0.0298004150390625,
0.0178985595703125,
0.0231781005859375,
-0.021881103515625,
-0.013427734375,
0.016021728515625,
-0.059906005859375,
-0.00724029541015625,
0.0174407958984375,
-0.00788116455078125,
-0.0430908203125,
0.0202178955078125,
-0.02191162109375,
0.01358795166015625,
0.0174560546875
] |
ff6d3aae89ede8f395b69a10644dfd6c12bd9d5e
|
Wordpress Stackexchange
Q: Why are my roles not visible in a Multi-site/Network? My network is showing roles in some sites and not in others.
For some reason that I can't explain, when I add a new user, I have no roles to choose from in the drop down box of a sub-site in my network. Also, my new user assigned to a site is not showing on my list of users for that site.
Is this something fixable?
Below an image of the current situation.
Below is the picture showing the main site with the roles properly there, but the sub-sites of the network don't.
A: I had this problem with a Multisite installation after reinstalling WordPress and restoring from an Updraft Plus backup.
When I checked the user_roles record, the option_name was still set to the original four character prefix, such as pre1_user_roles, whereas the prefix for the second installation was something like pre2_user_roles.
I updated this to pre2_user_roles and the options immediately reappeared in the user options page.
|
Q: Why are my roles not visible in a Multi-site/Network? My network is showing roles in some sites and not in others.
For some reason that I can't explain, when I add a new user, I have no roles to choose from in the drop down box of a sub-site in my network. Also, my new user assigned to a site is not showing on my list of users for that site.
Is this something fixable?
Below an image of the current situation.
Below is the picture showing the main site with the roles properly there, but the sub-sites of the network don't.
A: I had this problem with a Multisite installation after reinstalling WordPress and restoring from an Updraft Plus backup.
When I checked the user_roles record, the option_name was still set to the original four character prefix, such as pre1_user_roles, whereas the prefix for the second installation was something like pre2_user_roles.
I updated this to pre2_user_roles and the options immediately reappeared in the user options page.
A: *
*Determine your Multisite Blog ID. I will use 99 as an example
*Go into the database
*Go to this table: wp_##_options (wp_99_options) — you will have a table for each blog
*Find the record where option_name = wp_user_roles
*Change the text wp_user_roles to wp_##_user_roles ("wp_99_user_roles")
The table you are editing will have option_id, blog_id, option_name, option_value, autoload. However, DO NOT CHANGE ANY RECORD except the record where option_name = wp_user_roles. There will only be a single record in this table like this.
wp_user_roles is used when there is no Multisite install, and here, it appears as though it was just a bug when the table was created.
A: If this is the problem I know so well, you are running a memcache setup behind your MU install? I've found that there's apparently a cache issue (witnessed in 2.9) for the options object where something good (like the wp_user_roles key) gets stuck in the "notoptions" memcache array.
If you do run atop memcache, and this sounds like a possiblity, try telnetting into the machine via 11211. Type delete blogid:options:notoptions, where the blogid is the id of the blog on which you see the issue. Refresh the admin panel and see if there are roles in the dropdown. If so, you've found your problem.
UPDATE: OK, so you did not find your problem -- you weren't running memcache. I would still check out the roles object, looking for a corrupt or non-existant one. I believe it's your best lead. You can use this code to dump the options table:
global $wpdb;
$array = $wpdb->get_col("SELECT option_name FROM $wpdb->options");
foreach ($array as $key) {
echo $key . ": <code>";
var_dump(get_option($key), true));
echo "</code><br/>";
}
A: THANK YOU. This issue represents a solid 10 hours of debugging. This was a real bear for me.
To expand on this a bit, I added a function to my site that will allow you to resolve this issue if you're creating sites programmatically.
Basically, this will check to see if wp_user_roles was set in the specified blog. If it is, the function will use wp_user_roles to set a new option in the correct manner.
/**
* Sometimes, user roles do not properly get set when a new site is set up
* To fix this issue, we check to make sure the data is added properly and update if not
* See https://wordpress.stackexchange.com/questions/11725/why-are-my-roles-not-visible-in-a-multi-site-network
*/
function maybeAddUserRoles($blog_id){
switch_to_blog($blog_id);
if(get_option('wp_user_roles')){
update_option('wp_'.$blog_id.'_user_roles', get_option('wp_user_roles'));
delete_option('wp_user_roles');
}
restore_current_blog();
}
A: I just wanted to say thank you for this article because I've been searching for a solution to this problem for a long time.
It was simply because I had used a plugin to clone my sites and it never updated the wp_##_user_roles properly. When the site copied over from wp_13... it was cloned over to a new site wp_81... but this entry was still stuck at wp_13.
A: I just want to point out that some people may still have an empty site users table—specifically for their root site. If this problem occurs, the way to fix it issue is by doing the following:
*
*Go to the table wp_usermeta
*Find any entries with the meta_key wp_capabilities
*Change the meta_key from wp_capabilities to wp_1_capabilities
I believe "1" is always the ID of the root site.
Cheers.
A: Install this plugin: https://wordpress.org/plugins/capability-manager-enhanced/
Go into your site > Capabilities > Settings > Backup > Reset Roles, click "Reset to WordPress Defaults" and it will fix your site.
Nothing else worked for me.
|
wordpress
|
{
"language": "en",
"length": 748,
"provenance": "stackexchange_00019.jsonl.gz:407653",
"question_score": "16",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11725"
}
|
[
0.02398681640625,
-0.02349853515625,
-0.00609588623046875,
0.01128387451171875,
-0.033599853515625,
-0.03619384765625,
0.02825927734375,
-0.0367431640625,
0.0316162109375,
0.01812744140625,
-0.00785064697265625,
-0.0247955322265625,
0.004852294921875,
-0.03582763671875,
-0.02569580078125,
-0.021392822265625,
0.00873565673828125,
0.00464630126953125,
-0.006618499755859375,
-0.007587432861328125,
-0.0232696533203125,
0.01012420654296875,
-0.00745391845703125,
0.0249176025390625,
0.01256561279296875,
-0.042633056640625,
0.031280517578125,
-0.021575927734375,
0.024139404296875,
0.0067291259765625,
0.01910400390625,
-0.002307891845703125,
-0.0027103424072265625,
-0.0114288330078125,
0.032012939453125,
-0.047515869140625,
0.0123443603515625,
-0.01311492919921875,
0.01465606689453125,
0.0215606689453125,
-0.00862884521484375,
0.024505615234375,
0.0972900390625,
-0.0112152099609375,
0.0263671875,
-0.0589599609375,
0.037200927734375,
-0.050537109375,
-0.01788330078125,
-0.029632568359375,
0.044219970703125,
-0.036224365234375,
0.08392333984375,
-0.0012788772583007812,
-0.032440185546875,
-0.03729248046875,
-0.0252532958984375,
0.072265625,
0.0313720703125,
0.0037670135498046875,
-0.0238189697265625,
0.0141143798828125,
-0.0064849853515625,
-0.041290283203125,
0.0006175041198730469,
0.007537841796875,
0.0693359375,
0.00605010986328125,
-0.055694580078125,
-0.03778076171875,
0.014404296875,
-0.010528564453125,
0.01331329345703125,
-0.0283355712890625,
-0.030059814453125,
0.0181121826171875,
-0.01309967041015625,
-0.01364898681640625,
0.04876708984375,
-0.044677734375,
0.002246856689453125,
0.01206207275390625,
-0.02301025390625,
0.0038280487060546875,
-0.00618743896484375,
0.00836181640625,
-0.0095977783203125,
-0.0128326416015625,
-0.0256805419921875,
0.01422882080078125,
-0.01474761962890625,
-0.053375244140625,
-0.00555419921875,
0.03912353515625,
0.003864288330078125,
-0.012176513671875,
0.042144775390625,
0.07830810546875,
-0.00927734375,
-0.0306854248046875,
-0.00608062744140625,
-0.032012939453125,
-0.03533935546875,
-0.028656005859375,
-0.0143280029296875,
0.01541900634765625,
0.011627197265625,
0.02783203125,
0.0205535888671875,
0.042327880859375,
-0.00513458251953125,
0.00920867919921875,
0.004047393798828125,
-0.01143646240234375,
-0.050201416015625,
-0.0180816650390625,
-0.035614013671875,
-0.0202178955078125,
0.0005192756652832031,
-0.0294036865234375,
0.005130767822265625,
0.044586181640625,
-0.0275726318359375,
-0.042236328125,
-0.0070648193359375,
-0.031036376953125,
-0.01690673828125,
-0.0018167495727539062,
-0.07305908203125,
0.0216064453125,
-0.02178955078125,
0.0246124267578125,
0.05987548828125,
0.037628173828125,
-0.01531982421875,
-0.01983642578125,
-0.0241241455078125,
0.0161895751953125,
-0.0115509033203125,
0.0286712646484375,
0.013824462890625,
-0.05816650390625,
-0.0234375,
0.00839996337890625,
0.001033782958984375,
0.030059814453125,
0.014129638671875,
0.0036754608154296875,
0.01543426513671875,
-0.0297088623046875,
-0.0238189697265625,
-0.0174102783203125,
-0.011474609375,
0.0177154541015625,
0.046844482421875,
0.00482940673828125,
0.037384033203125,
-0.01525115966796875,
0.00791168212890625,
0.00870513916015625,
0.0272216796875,
0.02630615234375,
0.047821044921875,
-0.024627685546875,
-0.037017822265625,
-0.064208984375,
-0.058380126953125,
-0.007106781005859375,
0.0257568359375,
-0.07757568359375,
0.003704071044921875,
-0.02911376953125,
0.06549072265625,
0.006500244140625,
0.012115478515625,
0.0677490234375,
0.01531219482421875,
0.0172882080078125,
0.007198333740234375,
0.007717132568359375,
-0.007305145263671875,
-0.0260772705078125,
0.049530029296875,
-0.00614166259765625,
-0.048675537109375,
0.00016391277313232422,
-0.0234527587890625,
0.01468658447265625,
0.033233642578125,
0.01042938232421875,
0.035980224609375,
0.03582763671875,
0.0011091232299804688,
-0.00878143310546875,
-0.020355224609375,
-0.0179901123046875,
0.00720977783203125,
0.01373291015625,
-0.011077880859375,
-0.002742767333984375,
-0.0279998779296875,
-0.01349639892578125,
0.011260986328125,
0.0101470947265625,
0.0046234130859375,
-0.0032711029052734375,
-0.01236724853515625,
0.0121002197265625,
0.026580810546875,
0.004505157470703125,
-0.006793975830078125,
0.01558685302734375,
0.0022373199462890625,
-0.09619140625,
-0.04541015625,
0.056610107421875,
-0.0259552001953125,
0.047821044921875,
0.0092315673828125,
0.00107574462890625,
0.00905609130859375,
-0.007366180419921875,
0.0146026611328125,
-0.01183319091796875,
0.0479736328125,
-0.0099639892578125,
-0.0113525390625,
-0.0193023681640625,
0.0731201171875,
-0.01232147216796875,
0.045135498046875,
0.00553131103515625,
0.0235748291015625,
0.0273895263671875,
-0.02947998046875,
0.015655517578125,
0.017120361328125,
0.006916046142578125,
-0.0173187255859375,
0.0205841064453125,
0.0268402099609375,
0.051605224609375,
-0.0010166168212890625,
0.0167999267578125,
-0.0036449432373046875,
-0.060333251953125,
0.024627685546875,
-0.0160675048828125,
-0.006038665771484375,
0.0281219482421875,
0.0313720703125,
0.0252532958984375,
0.01166534423828125,
0.0021610260009765625,
-0.00853729248046875,
0.039215087890625,
-0.0017919540405273438,
-0.00431060791015625,
-0.0195465087890625,
-0.009796142578125,
0.01509857177734375,
-0.01320648193359375,
-0.0150604248046875,
0.00537109375,
-0.00009351968765258789,
-0.0265960693359375,
-0.0007791519165039062,
-0.01200103759765625,
0.01029205322265625,
-0.0160980224609375,
0.0258026123046875,
-0.04132080078125,
0.01198577880859375,
0.02313232421875,
0.0291748046875,
-0.020355224609375,
-0.0195159912109375,
-0.02239990234375,
0.00931549072265625,
0.008270263671875,
-0.00960540771484375,
0.021820068359375,
-0.005588531494140625,
-0.01261138916015625,
0.004299163818359375,
-0.00662994384765625,
0.00911712646484375,
-0.0029754638671875,
0.040740966796875,
-0.004261016845703125,
0.0305633544921875,
0.00848388671875,
0.01145172119140625,
0.0286712646484375,
0.004756927490234375,
-0.0301513671875,
-0.01462554931640625,
-0.0423583984375,
0.0203094482421875,
-0.01509857177734375,
0.009796142578125,
0.07379150390625,
0.033905029296875,
-0.0272369384765625,
-0.0095672607421875,
-0.017242431640625,
-0.029022216796875,
0.0209503173828125,
-0.00884246826171875,
-0.04168701171875,
-0.0286865234375,
0.0205535888671875,
0.01153564453125,
-0.054901123046875,
0.0028095245361328125,
0.0014142990112304688,
-0.0142364501953125,
-0.01519775390625,
-0.03009033203125,
0.01190948486328125,
-0.08087158203125,
-0.050140380859375,
0.005756378173828125,
-0.009674072265625,
-0.014556884765625,
0.0079193115234375,
-0.00968170166015625,
0.0260467529296875,
-0.0233306884765625,
-0.0421142578125,
-0.035247802734375,
-0.0665283203125,
-0.057464599609375,
0.030609130859375,
0.01340484619140625,
0.021209716796875,
0.0014371871948242188,
0.051910400390625,
0.0024929046630859375,
-0.0259857177734375,
-0.005405426025390625,
-0.005550384521484375,
-0.0014619827270507812,
-0.0288543701171875,
0.0187530517578125,
-0.01751708984375,
0.01248931884765625,
0.005924224853515625,
0.00949859619140625,
0.0160369873046875,
-0.0204925537109375,
-0.022125244140625,
0.0267333984375,
-0.047210693359375,
0.030548095703125,
-0.008209228515625,
-0.0418701171875,
0.0008912086486816406,
0.038360595703125,
-0.0389404296875,
-0.013641357421875,
-0.0012407302856445312,
-0.00875091552734375,
0.01267242431640625,
-0.0157318115234375,
-0.01953125,
-0.00283050537109375,
0.037933349609375,
-0.0113372802734375,
-0.01318359375,
-0.02142333984375,
-0.0156402587890625,
-0.01526641845703125,
0.0066986083984375,
-0.0063934326171875,
0.033172607421875,
0.00783538818359375,
-0.00907135009765625,
0.0255126953125,
-0.00661468505859375,
0.0167694091796875,
-0.0207672119140625,
0.0654296875,
-0.0220794677734375,
-0.07794189453125,
0.034912109375,
-0.076904296875,
-0.0086822509765625,
-0.06402587890625,
-0.0104522705078125,
-0.00835418701171875,
0.10870361328125,
-0.021453857421875,
-0.0009675025939941406,
-0.00699615478515625,
0.01287841796875,
-0.0293731689453125,
-0.034088134765625,
-0.03814697265625,
-0.0005097389221191406,
-0.053253173828125,
0.0177764892578125,
-0.006229400634765625,
0.004482269287109375,
-0.02606201171875,
-0.003910064697265625,
-0.0164031982421875,
-0.041595458984375,
0.0296478271484375,
-0.025634765625,
0.0030422210693359375,
-0.037109375,
-0.00015294551849365234,
-0.07623291015625,
-0.006877899169921875,
-0.02215576171875,
-0.03192138671875,
0.0008387565612792969,
-0.0211944580078125,
0.0191650390625,
-0.005031585693359375,
0.04736328125,
-0.04730224609375,
0.00936126708984375,
0.0252838134765625,
-0.007160186767578125,
0.01226043701171875,
-0.02044677734375,
0.0196075439453125,
0.0229644775390625,
0.0043792724609375,
-0.0095062255859375,
-0.00223541259765625,
-0.020751953125,
-0.043487548828125,
-0.0258331298828125,
-0.03143310546875,
-0.0003113746643066406,
-0.0054931640625,
-0.01800537109375,
-0.01203155517578125,
-0.025726318359375,
-0.01096343994140625,
0.01462554931640625,
-0.01517486572265625,
0.01202392578125,
-0.037506103515625,
-0.009185791015625,
-0.021759033203125,
-0.06011962890625,
-0.0167999267578125,
0.031585693359375,
0.0261688232421875,
0.0246734619140625,
0.0199432373046875,
0.0242919921875,
0.00925445556640625,
0.039703369140625,
0.033843994140625,
0.02764892578125,
0.05279541015625,
0.01038360595703125,
-0.0421142578125,
0.031524658203125,
0.03363037109375,
-0.003093719482421875,
-0.00653076171875,
0.024139404296875,
-0.027587890625,
0.034637451171875,
0.05694580078125,
-0.038970947265625,
-0.023345947265625,
0.0103912353515625,
-0.033538818359375,
0.03131103515625,
0.035888671875,
-0.003574371337890625,
0.0094451904296875,
-0.016143798828125,
-0.0452880859375,
0.004528045654296875,
-0.057586669921875,
0.0350341796875,
0.02008056640625,
0.0121002197265625,
0.0089874267578125,
0.0160980224609375,
-0.0139312744140625,
-0.00588226318359375,
-0.01861572265625,
-0.03955078125,
0.0265350341796875,
-0.05914306640625,
-0.0313720703125,
0.0121612548828125,
-0.044952392578125,
0.1357421875,
-0.00009804964065551758,
-0.07818603515625,
0.061676025390625,
-0.047271728515625,
0.0611572265625,
0.044342041015625,
0.0211639404296875,
-0.0209503173828125,
0.0214996337890625,
0.01241302490234375,
0.01280975341796875,
0.055877685546875,
0.0267486572265625,
0.004817962646484375,
0.00624847412109375,
-0.0198822021484375,
0.002155303955078125,
0.01554107666015625,
0.045745849609375,
-0.029571533203125,
0.037567138671875,
-0.0086517333984375,
0.017913818359375,
0.038421630859375,
-0.03314208984375,
-0.0090484619140625,
0.06689453125,
-0.005008697509765625,
-0.0305938720703125,
0.048553466796875,
-0.0230712890625,
0.0017671585083007812,
0.053375244140625,
0.048095703125,
0.022369384765625,
-0.01367950439453125,
-0.032440185546875,
-0.036590576171875,
-0.00044608116149902344,
0.07861328125,
-0.02984619140625,
-0.0994873046875,
-0.038604736328125,
0.0301513671875,
0.04730224609375,
-0.06866455078125,
-0.005420684814453125,
-0.047119140625,
-0.01922607421875,
-0.01488494873046875,
0.003803253173828125,
-0.051055908203125,
-0.0017843246459960938,
0.0008311271667480469,
-0.04132080078125,
-0.0193634033203125,
0.0019073486328125,
-0.01110076904296875,
-0.006420135498046875,
-0.01457977294921875,
-0.035400390625,
0.03936767578125,
-0.045166015625,
0.01238250732421875,
-0.039306640625,
0.024871826171875,
-0.080810546875,
0.0259552001953125,
0.03271484375,
0.035430908203125,
-0.045562744140625,
0.0171966552734375,
-0.02252197265625,
-0.020477294921875,
-0.0183868408203125,
-0.0069122314453125,
-0.060546875,
-0.007511138916015625,
0.027801513671875,
0.018035888671875,
-0.0196685791015625,
-0.0765380859375,
-0.0389404296875,
0.01080322265625,
0.061492919921875,
0.036468505859375,
-0.010009765625,
0.01290130615234375,
-0.0023040771484375,
0.0355224609375,
0.0031528472900390625,
-0.012908935546875,
-0.01084136962890625,
-0.00494384765625,
-0.0097198486328125,
-0.01227569580078125,
-0.0015001296997070312,
0.012725830078125,
-0.00560760498046875,
0.007457733154296875,
0.03533935546875,
0.0021572113037109375,
0.038848876953125,
0.01064300537109375,
0.0097503662109375,
-0.017333984375,
-0.060150146484375,
0.01245880126953125,
0.026611328125,
0.006656646728515625,
-0.025390625,
0.01548004150390625,
0.00612640380859375,
-0.01806640625,
0.0146636962890625,
-0.0137176513671875,
0.0169677734375,
0.0246124267578125,
-0.034149169921875,
0.036865234375,
0.068115234375,
-0.01531219482421875,
0.0189208984375,
0.005710601806640625,
-0.01513671875,
-0.005603790283203125,
-0.026580810546875,
-0.0273590087890625,
-0.00792694091796875,
-0.00914764404296875,
-0.0196380615234375,
0.01189422607421875,
-0.006145477294921875,
-0.0012960433959960938,
0.0010814666748046875,
0.04815673828125,
0.026519775390625,
-0.07135009765625,
-0.0073089599609375,
-0.034912109375,
-0.0040283203125,
0.0285186767578125,
-0.017822265625,
0.0030975341796875,
-0.035797119140625,
0.051727294921875,
-0.0010738372802734375,
-0.0174713134765625,
0.025054931640625,
-0.025787353515625,
-0.0163726806640625,
-0.016876220703125,
-0.011322021484375,
0.0192413330078125,
0.0462646484375,
0.034454345703125,
-0.03759765625,
0.07147216796875,
-0.00809478759765625,
-0.0251617431640625,
0.01386260986328125,
-0.036163330078125,
-0.0771484375,
-0.03399658203125,
-0.029693603515625,
-0.031494140625,
0.0013093948364257812,
-0.0182647705078125,
-0.002994537353515625,
0.041015625,
-0.03546142578125,
0.0057525634765625,
0.0270233154296875,
-0.037628173828125,
0.0118865966796875,
-0.022918701171875,
0.0239105224609375,
-0.0198974609375,
-0.03900146484375,
0.006397247314453125,
-0.0232086181640625,
-0.018707275390625,
-0.0143585205078125,
-0.0246429443359375,
0.0228118896484375,
-0.01268768310546875,
0.00469207763671875,
0.046234130859375,
0.0416259765625,
-0.0220947265625,
0.014404296875,
0.00649261474609375,
-0.04229736328125,
-0.02734375,
0.0161590576171875,
-0.017486572265625,
0.0232696533203125,
0.0609130859375,
-0.06158447265625,
0.07000732421875,
-0.007564544677734375,
0.0323486328125,
0.0036716461181640625,
0.0184478759765625,
-0.025726318359375,
-0.01053619384765625,
-0.046295166015625,
0.04833984375,
0.0015211105346679688,
0.061676025390625,
-0.041595458984375,
-0.0007505416870117188,
0.0146331787109375,
0.036376953125,
0.008148193359375,
0.00872802734375,
-0.0347900390625,
-0.031829833984375,
-0.0146331787109375,
0.0203399658203125,
0.006847381591796875,
0.0367431640625,
-0.0154876708984375,
0.027008056640625,
0.0074310302734375,
-0.018768310546875,
0.028045654296875,
-0.01605224609375,
-0.0555419921875,
0.0029087066650390625,
0.00917816162109375,
0.006641387939453125,
0.01629638671875,
0.0179595947265625,
-0.05316162109375,
0.018951416015625,
0.04620361328125,
-0.0227203369140625,
0.006565093994140625,
-0.00443267822265625,
-0.005229949951171875,
-0.00835418701171875,
0.0143280029296875,
-0.0146331787109375,
0.027099609375,
0.01477813720703125,
0.0214996337890625,
-0.01128387451171875,
0.0182342529296875,
0.005542755126953125,
-0.00884246826171875,
0.007354736328125,
0.042755126953125,
-0.039520263671875,
0.017059326171875,
0.02392578125,
0.0323486328125,
-0.0185089111328125,
-0.0106658935546875,
0.04071044921875,
0.04217529296875,
-0.0126190185546875,
-0.05523681640625,
0.0084075927734375,
0.010894775390625,
0.01593017578125,
0.031402587890625,
0.023590087890625,
-0.021270751953125,
0.041900634765625,
-0.026580810546875,
-0.0070953369140625,
-0.01108551025390625,
-0.00891876220703125,
-0.0088043212890625,
0.0182342529296875,
0.01111602783203125,
0.00803375244140625,
-0.016937255859375,
0.011505126953125,
-0.01441192626953125,
-0.00595855712890625,
0.01080322265625,
0.0223236083984375,
0.00989532470703125,
0.0100860595703125,
-0.00249481201171875,
0.030914306640625,
-0.026763916015625,
-0.0005640983581542969,
-0.035369873046875,
-0.07891845703125,
-0.00647735595703125,
0.042816162109375,
0.008453369140625,
0.01461029052734375,
0.01390838623046875,
0.0031108856201171875,
-0.0236663818359375,
0.00005525350570678711,
0.03680419921875,
-0.0248565673828125,
0.025482177734375,
-0.01995849609375,
0.01528167724609375,
0.00867462158203125,
-0.0203399658203125,
-0.0333251953125,
0.0299835205078125,
0.050140380859375,
-0.02606201171875,
0.0556640625,
-0.0214080810546875,
-0.01287078857421875,
-0.011962890625,
-0.0286407470703125,
0.047088623046875,
-0.008880615234375,
-0.030120849609375,
0.0192108154296875,
-0.0986328125,
-0.024200439453125,
0.0160369873046875,
0.032867431640625,
0.018524169921875,
-0.0030193328857421875,
0.0174102783203125,
-0.03253173828125,
0.00469970703125,
0.04669189453125,
0.0014448165893554688,
0.0116729736328125,
0.01099395751953125,
-0.00785064697265625,
-0.035491943359375,
-0.00971221923828125,
0.01438140869140625,
0.004459381103515625,
-0.03192138671875,
0.10888671875,
-0.028472900390625,
-0.0112152099609375,
-0.02740478515625,
0.0253143310546875,
-0.058868408203125,
-0.056640625,
0.048431396484375,
-0.01346588134765625,
-0.011962890625,
0.014801025390625,
-0.018280029296875,
0.038726806640625,
0.0302581787109375,
-0.02679443359375,
0.0233001708984375,
0.014495849609375,
0.0007510185241699219,
-0.0083160400390625,
0.03472900390625,
-0.0181121826171875,
-0.041839599609375,
-0.0760498046875,
-0.00042510032653808594,
0.0386962890625,
0.04083251953125,
-0.05279541015625,
0.024505615234375,
-0.01039886474609375,
-0.026885986328125,
-0.003509521484375,
-0.017791748046875,
-0.02947998046875,
0.0223388671875,
-0.00885772705078125,
0.01363372802734375,
0.019287109375,
-0.009552001953125,
0.01042938232421875,
0.01873779296875,
-0.00046706199645996094,
0.038604736328125,
-0.01100921630859375,
0.04052734375,
0.02728271484375,
0.05316162109375,
-0.0195770263671875,
0.00772857666015625,
0.0347900390625,
0.006717681884765625,
-0.0074005126953125,
-0.00789642333984375,
-0.02252197265625,
-0.00933074951171875,
-0.01296234130859375,
0.017730712890625,
0.004093170166015625,
-0.0297698974609375,
-0.05926513671875,
0.0039043426513671875,
0.04547119140625,
0.034423828125,
-0.10986328125,
0.05804443359375,
-0.0174713134765625,
0.041412353515625,
-0.0012760162353515625,
-0.082275390625,
0.050201416015625,
0.06585693359375,
-0.0052032470703125,
0.064453125,
0.0087127685546875,
-0.10491943359375,
0.04730224609375,
-0.0101318359375,
-0.01215362548828125,
0.022979736328125,
0.019073486328125,
0.01204681396484375,
-0.025787353515625,
0.04150390625,
-0.038421630859375,
-0.005828857421875,
-0.03350830078125,
0.00806427001953125,
-0.0253143310546875,
0.0018625259399414062,
0.04571533203125,
-0.043609619140625,
-0.07958984375,
-0.06597900390625,
0.034912109375,
0.01200103759765625,
-0.0307159423828125,
-0.0262298583984375,
0.1109619140625,
-0.0240325927734375,
0.0030574798583984375,
-0.07415771484375,
-0.0190887451171875,
-0.0092620849609375,
0.045318603515625,
-0.008453369140625,
-0.03192138671875,
-0.034912109375,
0.05474853515625,
-0.0002741813659667969,
-0.0220184326171875,
0.0196533203125,
-0.029693603515625,
-0.03594970703125,
0.0236358642578125,
0.045989990234375,
-0.0274505615234375,
0.03167724609375,
-0.0307464599609375,
0.04327392578125,
0.060638427734375,
-0.0193328857421875,
-0.059112548828125,
-0.007785797119140625,
-0.045745849609375,
0.00312042236328125,
0.003009796142578125,
-0.0234375,
-0.051910400390625,
0.0079193115234375,
0.023193359375,
-0.006744384765625,
0.0241851806640625,
0.0063629150390625,
-0.037078857421875,
-0.049224853515625,
-0.005527496337890625,
0.0321044921875,
-0.056365966796875,
0.0032806396484375,
0.014251708984375,
-0.042083740234375,
0.0528564453125,
-0.0288238525390625,
-0.0595703125,
0.0345458984375,
-0.027679443359375,
-0.0032958984375,
-0.06298828125,
0.032562255859375,
-0.0117645263671875,
-0.0294647216796875,
-0.04248046875,
-0.013641357421875,
-0.0199432373046875,
-0.050567626953125,
-0.0017871856689453125,
-0.01116180419921875,
-0.0310821533203125,
-0.026275634765625,
0.04052734375,
-0.014495849609375,
0.0225067138671875,
-0.043243408203125,
-0.01522064208984375,
0.01953125,
0.0198211669921875,
-0.0280609130859375,
0.0204010009765625,
0.03240966796875,
0.041473388671875,
-0.024078369140625,
0.0628662109375,
-0.033416748046875,
0.046966552734375,
-0.0462646484375,
0.051177978515625,
-0.0140228271484375,
0.01146697998046875,
0.0187225341796875,
0.0164031982421875,
0.006916046142578125,
-0.00615692138671875,
-0.044891357421875,
-0.01800537109375,
-0.006805419921875,
0.0054168701171875,
-0.025054931640625,
0.0062408447265625
] |
5de8e8af5f34c72bec0697ac8ee90c9103d801cb
|
Wordpress Stackexchange
Q: Extending the search context in the admin list post screen I have created a custom post type and have attached some custom fields to it. Now I would like to the search that authors can perform on the custom post list screen (in the admin backend) to also be performed on the meta fields and not only look in the title and content as usual.
Where can I hook in and what code I have to use?
Example image
Stefano
A: This will work,
function custom_search_query( $query ) {
$custom_fields = array(
// put all the meta fields you want to search for here
"rg_first_name",
"rg_1job_designation"
);
$searchterm = $query->query_vars['s'];
// we have to remove the "s" parameter from the query, because it will prevent the posts from being found
$query->query_vars['s'] = "";
if ($searchterm != "") {
$meta_query = array('relation' => 'OR');
foreach($custom_fields as $cf) {
array_push($meta_query, array(
'key' => $cf,
'value' => $searchterm,
'compare' => 'LIKE'
));
}
$query->set("meta_query", $meta_query);
};
}
add_filter( "pre_get_posts", "custom_search_query");
|
Q: Extending the search context in the admin list post screen I have created a custom post type and have attached some custom fields to it. Now I would like to the search that authors can perform on the custom post list screen (in the admin backend) to also be performed on the meta fields and not only look in the title and content as usual.
Where can I hook in and what code I have to use?
Example image
Stefano
A: This will work,
function custom_search_query( $query ) {
$custom_fields = array(
// put all the meta fields you want to search for here
"rg_first_name",
"rg_1job_designation"
);
$searchterm = $query->query_vars['s'];
// we have to remove the "s" parameter from the query, because it will prevent the posts from being found
$query->query_vars['s'] = "";
if ($searchterm != "") {
$meta_query = array('relation' => 'OR');
foreach($custom_fields as $cf) {
array_push($meta_query, array(
'key' => $cf,
'value' => $searchterm,
'compare' => 'LIKE'
));
}
$query->set("meta_query", $meta_query);
};
}
add_filter( "pre_get_posts", "custom_search_query");
A: I solved filtering the query by adding the join on the postmeta table and changing the where clause.
tips on filtering the WHERE clause (often require regular expression search&replace) are here on codex:
add_filter( 'posts_join', 'segnalazioni_search_join' );
function segnalazioni_search_join ( $join ) {
global $pagenow, $wpdb;
// I want the filter only when performing a search on edit page of Custom Post Type named "segnalazioni".
if ( is_admin() && 'edit.php' === $pagenow && 'segnalazioni' === $_GET['post_type'] && ! empty( $_GET['s'] ) ) {
$join .= 'LEFT JOIN ' . $wpdb->postmeta . ' ON ' . $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';
}
return $join;
}
add_filter( 'posts_where', 'segnalazioni_search_where' );
function segnalazioni_search_where( $where ) {
global $pagenow, $wpdb;
// I want the filter only when performing a search on edit page of Custom Post Type named "segnalazioni".
if ( is_admin() && 'edit.php' === $pagenow && 'segnalazioni' === $_GET['post_type'] && ! empty( $_GET['s'] ) ) {
$where = preg_replace(
"/\(\s*" . $wpdb->posts . ".post_title\s+LIKE\s*(\'[^\']+\')\s*\)/",
"(" . $wpdb->posts . ".post_title LIKE $1) OR (" . $wpdb->postmeta . ".meta_value LIKE $1)", $where );
$where.= " GROUP BY {$wpdb->posts}.id"; // Solves duplicated results
}
return $where;
}
A: Answer 1:
Add this code in function file, and change and add more columns name, that you have used in your custom post type
function extend_admin_search( $query ) {
// use your post type
$post_type = 'document';
// Use your Custom fields/column name to search for
$custom_fields = array(
"_file_name",
);
if( ! is_admin() )
return;
if ( $query->query['post_type'] != $post_type )
return;
$search_term = $query->query_vars['s'];
// Set to empty, otherwise it won't find anything
$query->query_vars['s'] = '';
if ( $search_term != '' ) {
$meta_query = array( 'relation' => 'OR' );
foreach( $custom_fields as $custom_field ) {
array_push( $meta_query, array(
'key' => $custom_field,
'value' => $search_term,
'compare' => 'LIKE'
));
}
$query->set( 'meta_query', $meta_query );
};
}
add_action( 'pre_get_posts', 'extend_admin_search' );
Answer 2: Recommended
Use this code in function file without any change
function cf_search_join( $join ) {
global $wpdb;
if ( is_search() ) {
$join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';
}
return $join;
}
add_filter('posts_join', 'cf_search_join' );
function cf_search_where( $where ) {
global $pagenow, $wpdb;
if ( is_search() ) {
$where = preg_replace(
"/\(\s*".$wpdb->posts.".post_title\s+LIKE\s*(\'[^\']+\')\s*\)/",
"(".$wpdb->posts.".post_title LIKE $1) OR (".$wpdb->postmeta.".meta_value LIKE $1)", $where );
}
return $where;
}
add_filter( 'posts_where', 'cf_search_where' );
function cf_search_distinct( $where ) {
global $wpdb;
if ( is_search() ) {
return "DISTINCT";
}
return $where;
}
add_filter( 'posts_distinct', 'cf_search_distinct' );
A: With this code you can search in post list in WordPress Admin Panel with custom post meta values along with title and other default fields.
Please, add below code in functions.php file:
if (!function_exists('extend_admin_search')) {
add_action('admin_init', 'extend_admin_search');
/**
* hook the posts search if we're on the admin page for our type
*/
function extend_admin_search() {
global $typenow;
if ($typenow === 'your_custom_post_type') {
add_filter('posts_search', 'posts_search_custom_post_type', 10, 2);
}
}
/**
* add query condition for custom meta
* @param string $search the search string so far
* @param WP_Query $query
* @return string
*/
function posts_search_custom_post_type($search, $query) {
global $wpdb;
if ($query->is_main_query() && !empty($query->query['s'])) {
$sql = "
or exists (
select * from {$wpdb->postmeta} where post_id={$wpdb->posts}.ID
and meta_key in ('custom_field1','custom_field2')
and meta_value like %s
)
";
$like = '%' . $wpdb->esc_like($query->query['s']) . '%';
$search = preg_replace("#\({$wpdb->posts}.post_title LIKE [^)]+\)\K#",
$wpdb->prepare($sql, $like), $search);
}
return $search;
}
}
A: Stefano answer is great but it lacks a distinct clause :
function segnalazioni_search_distinct( $where ){
global $pagenow, $wpdb;
if ( is_admin() && $pagenow=='edit.php' && $_GET['post_type']=='segnalazioni' && $_GET['s'] != '') {
return "DISTINCT";
}
return $where;
}
add_filter( 'posts_distinct', 'segnalazioni_search_distinct' );
Add the code above update it and it will work with no duplicates.
A: The version of the code here in a couple answers that modifies the meta_query parameter of the search's WP_Query in pre_get_posts was no longer searching the post_title. Adding the ability to search either the post title, OR meta values can't be done directly in WP_Query without modifying SQL unfortunately, as this question elaborates upon: Using meta query ('meta_query') with a search query ('s')
I've combined some of the techniques here to get a working version that avoids preg_replaces and too much SQL modification (I wish it could be avoided entirely). The only downside being that after a search, subtitle text at the top of the page says "Search results for ''". I've just hidden that with CSS for my plugin's custom post type.
/**
* Extend custom post type search to also search meta fields
* @param WP_Query $query
*/
function extend_cpt_admin_search( $query ) {
// Make sure we're in the admin area and that this is our custom post type
if ( !is_admin() || $query->query['post_type'] != 'your_custom_post_type' ){
return;
}
// Put all the meta fields you want to search for here
$custom_fields = array(
"your_custom_meta_field",
"your_custom_meta_field2",
"your_custom_meta_field3"
);
// The string submitted via the search form
$searchterm = $query->query_vars['s'];
// Set to empty, otherwise no results will be returned.
// The one downside is that the displayed search text is empty at the top of the page.
$query->query_vars['s'] = '';
if ($searchterm != ""){
// Add additional meta_query parameter to the WP_Query object.
// Reference: https://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters
$meta_query = array();
foreach($custom_fields as $cf) {
array_push($meta_query, array(
'key' => $cf,
'value' => $searchterm,
'compare' => 'LIKE'
));
}
// Use an 'OR' comparison for each additional custom meta field.
if (count($meta_query) > 1){
$meta_query['relation'] = 'OR';
}
// Set the meta_query parameter
$query->set('meta_query', $meta_query);
// To allow the search to also return "OR" results on the post_title
$query->set('_meta_or_title', $searchterm);
}
}
add_action('pre_get_posts', 'extend_cpt_admin_search');
/**
* WP_Query parameter _meta_or_title to allow searching post_title when also
* checking searching custom meta values
* https://wordpress.stackexchange.com/questions/78649/using-meta-query-meta-query-with-a-search-query-s
* https://wordpress.stackexchange.com/a/178492
* This looks a little scary, but basically it's modifying the WHERE clause in the
* SQL to say "[like the post_title] OR [the existing WHERE clause]"
* @param WP_Query $q
*/
function meta_or_title_search( $q ){
if( $title = $q->get( '_meta_or_title' ) ){
add_filter( 'get_meta_sql', function( $sql ) use ( $title ){
global $wpdb;
// Only run once:
static $nr = 0;
if( 0 != $nr++ ) return $sql;
// Modified WHERE
$sql['where'] = sprintf(
" AND ( (%s) OR (%s) ) ",
$wpdb->prepare( "{$wpdb->posts}.post_title LIKE '%%%s%%'", $title),
mb_substr( $sql['where'], 5, mb_strlen( $sql['where'] ) )
);
return $sql;
});
}
}
add_action('pre_get_posts', 'meta_or_title_search');
|
wordpress
|
{
"language": "en",
"length": 1233,
"provenance": "stackexchange_00019.jsonl.gz:407664",
"question_score": "48",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11758"
}
|
[
0.053192138671875,
0.021697998046875,
0.047576904296875,
-0.020904541015625,
0.01261138916015625,
0.00908660888671875,
0.033355712890625,
-0.06475830078125,
0.0286712646484375,
0.02081298828125,
-0.0147247314453125,
0.007526397705078125,
-0.02081298828125,
-0.025970458984375,
-0.01258087158203125,
-0.0240020751953125,
0.0272674560546875,
-0.033660888671875,
0.006465911865234375,
-0.0214996337890625,
0.019287109375,
-0.013458251953125,
0.034454345703125,
-0.006839752197265625,
0.0301055908203125,
-0.042633056640625,
0.053466796875,
-0.01099395751953125,
0.050689697265625,
0.0142974853515625,
0.03326416015625,
-0.0626220703125,
0.0240936279296875,
0.01128387451171875,
0.0110321044921875,
0.0285491943359375,
0.0045623779296875,
0.017242431640625,
0.0081939697265625,
0.03192138671875,
0.040283203125,
-0.01580810546875,
-0.057159423828125,
0.051544189453125,
-0.023193359375,
-0.075439453125,
0.0640869140625,
-0.0283355712890625,
0.031768798828125,
0.014404296875,
-0.0095367431640625,
0.0273590087890625,
-0.0115966796875,
-0.052032470703125,
-0.0043487548828125,
-0.0017557144165039062,
-0.02032470703125,
-0.0273895263671875,
0.04290771484375,
-0.032928466796875,
-0.0157012939453125,
-0.04510498046875,
0.033721923828125,
0.01971435546875,
-0.006885528564453125,
-0.0261383056640625,
-0.0026493072509765625,
0.0146484375,
0.004253387451171875,
-0.02264404296875,
0.0258941650390625,
0.00696563720703125,
0.027496337890625,
0.00675201416015625,
-0.01465606689453125,
-0.061126708984375,
0.031463623046875,
-0.0205078125,
0.006191253662109375,
0.01000213623046875,
0.00003516674041748047,
0.01203155517578125,
-0.005458831787109375,
-0.0034637451171875,
-0.0226898193359375,
-0.0013027191162109375,
-0.02685546875,
-0.0032711029052734375,
-0.0189971923828125,
-0.036773681640625,
-0.00905609130859375,
-0.08050537109375,
-0.03485107421875,
0.002185821533203125,
0.01190185546875,
-0.0474853515625,
0.029083251953125,
0.052978515625,
0.0163421630859375,
0.00646209716796875,
-0.0029048919677734375,
-0.039642333984375,
0.0029430389404296875,
-0.03741455078125,
0.00751495361328125,
0.035614013671875,
-0.024200439453125,
0.022674560546875,
0.05609130859375,
0.05133056640625,
0.0367431640625,
-0.02130126953125,
-0.0160675048828125,
0.0251007080078125,
-0.053680419921875,
0.0164794921875,
-0.01020050048828125,
-0.03955078125,
-0.0223846435546875,
-0.0097808837890625,
0.019744873046875,
0.02484130859375,
0.0175323486328125,
-0.041046142578125,
-0.00167083740234375,
-0.01377105712890625,
-0.039398193359375,
-0.02276611328125,
0.004482269287109375,
0.00958251953125,
-0.018707275390625,
0.002105712890625,
0.04620361328125,
0.03216552734375,
-0.004199981689453125,
-0.006256103515625,
0.030242919921875,
-0.0014209747314453125,
0.00527191162109375,
0.00399017333984375,
0.0232696533203125,
-0.0295562744140625,
-0.006366729736328125,
0.02349853515625,
0.023895263671875,
-0.002361297607421875,
0.021514892578125,
0.029571533203125,
-0.00733184814453125,
-0.007358551025390625,
-0.00336456298828125,
0.032562255859375,
0.04473876953125,
0.0121307373046875,
-0.040618896484375,
-0.0040435791015625,
0.03131103515625,
-0.0179595947265625,
-0.039276123046875,
-0.041473388671875,
0.0006518363952636719,
-0.007472991943359375,
0.034149169921875,
-0.051239013671875,
-0.040283203125,
-0.0010356903076171875,
-0.053924560546875,
-0.0103302001953125,
0.0021839141845703125,
-0.0184173583984375,
0.0230865478515625,
0.0004303455352783203,
-0.00156402587890625,
-0.01255035400390625,
-0.00426483154296875,
-0.0216217041015625,
0.0108642578125,
0.0283355712890625,
0.020111083984375,
0.016571044921875,
-0.0153045654296875,
-0.029449462890625,
0.040985107421875,
-0.03546142578125,
-0.0726318359375,
0.061279296875,
0.0043792724609375,
0.08416748046875,
0.0083465576171875,
0.007411956787109375,
0.04486083984375,
0.0016689300537109375,
-0.0367431640625,
0.0093994140625,
-0.002246856689453125,
-0.0187225341796875,
-0.02520751953125,
-0.0234222412109375,
-0.00910186767578125,
0.02728271484375,
0.0205841064453125,
0.032867431640625,
-0.0028629302978515625,
0.01229095458984375,
-0.03790283203125,
0.033843994140625,
-0.0273895263671875,
0.04449462890625,
0.0202484130859375,
0.0159149169921875,
0.004451751708984375,
-0.010955810546875,
-0.004001617431640625,
-0.019256591796875,
-0.0228271484375,
-0.0089569091796875,
0.0278778076171875,
-0.004688262939453125,
0.02392578125,
-0.035003662109375,
0.039886474609375,
-0.0159759521484375,
0.02032470703125,
0.0202789306640625,
0.07110595703125,
0.0121612548828125,
-0.004161834716796875,
-0.0047760009765625,
0.089599609375,
0.0081024169921875,
-0.0173187255859375,
0.0237274169921875,
0.057769775390625,
0.0269317626953125,
-0.00684356689453125,
0.00438690185546875,
0.039337158203125,
-0.05609130859375,
-0.00009870529174804688,
0.03369140625,
0.05584716796875,
0.0265350341796875,
0.0011768341064453125,
-0.023529052734375,
0.080078125,
-0.0220947265625,
0.004734039306640625,
-0.023895263671875,
0.005764007568359375,
0.08612060546875,
-0.0462646484375,
0.027435302734375,
0.0035305023193359375,
-0.04071044921875,
0.00848388671875,
0.044647216796875,
0.0029773712158203125,
0.0211639404296875,
-0.0081329345703125,
-0.03521728515625,
0.01314544677734375,
-0.03924560546875,
-0.05517578125,
0.010894775390625,
0.0281219482421875,
0.0151214599609375,
0.046875,
0.0316162109375,
-0.05340576171875,
-0.00390625,
0.0201263427734375,
0.054840087890625,
-0.0035915374755859375,
-0.00958251953125,
-0.042999267578125,
-0.013427734375,
-0.037811279296875,
0.04791259765625,
-0.01421356201171875,
-0.031829833984375,
0.00949859619140625,
0.0229949951171875,
-0.031829833984375,
0.012359619140625,
-0.02325439453125,
-0.047943115234375,
0.01373291015625,
0.06597900390625,
0.01543426513671875,
0.007465362548828125,
0.0289764404296875,
0.0166015625,
0.007778167724609375,
0.01525115966796875,
-0.0250244140625,
-0.0133056640625,
0.01983642578125,
-0.054595947265625,
0.057373046875,
-0.04833984375,
0.048309326171875,
0.057403564453125,
-0.0203704833984375,
0.0298919677734375,
-0.0228729248046875,
-0.02862548828125,
-0.06201171875,
0.046142578125,
0.004657745361328125,
-0.06103515625,
0.0031375885009765625,
0.0298004150390625,
0.029510498046875,
0.02777099609375,
0.0177459716796875,
-0.0096588134765625,
0.004428863525390625,
0.0173187255859375,
-0.053924560546875,
-0.07220458984375,
0.0203704833984375,
-0.055938720703125,
-0.038299560546875,
-0.0289459228515625,
-0.042327880859375,
0.0220489501953125,
-0.0165863037109375,
-0.0207977294921875,
0.03271484375,
-0.03173828125,
-0.08135986328125,
-0.031829833984375,
-0.0887451171875,
0.011962890625,
0.0014600753784179688,
0.00725555419921875,
0.01189422607421875,
0.045562744140625,
0.0173187255859375,
-0.061065673828125,
0.0276641845703125,
0.05364990234375,
-0.01690673828125,
0.023712158203125,
0.00667572021484375,
-0.018310546875,
0.0341796875,
-0.019134521484375,
0.044464111328125,
0.03875732421875,
-0.022705078125,
-0.01203155517578125,
-0.01513671875,
0.029388427734375,
0.039459228515625,
-0.03118896484375,
-0.0167694091796875,
0.03509521484375,
0.018798828125,
-0.022705078125,
-0.0020999908447265625,
-0.024566650390625,
-0.01678466796875,
0.0236358642578125,
-0.019256591796875,
0.01525115966796875,
-0.0074005126953125,
0.05010986328125,
0.0330810546875,
0.0194091796875,
-0.0161895751953125,
-0.004802703857421875,
-0.0287628173828125,
0.034027099609375,
0.055389404296875,
0.0131683349609375,
0.01134490966796875,
-0.03582763671875,
0.0556640625,
0.0132904052734375,
0.0049591064453125,
0.01006317138671875,
-0.010101318359375,
-0.0021266937255859375,
-0.034454345703125,
0.06072998046875,
0.003612518310546875,
0.017425537109375,
-0.050323486328125,
-0.046600341796875,
-0.032501220703125,
0.07366943359375,
-0.03228759765625,
-0.0223541259765625,
0.0059661865234375,
-0.004589080810546875,
-0.004680633544921875,
-0.0006279945373535156,
-0.0189208984375,
-0.0217742919921875,
-0.11322021484375,
0.00893402099609375,
-0.01611328125,
-0.033477783203125,
-0.012908935546875,
0.0296173095703125,
-0.05145263671875,
-0.0399169921875,
0.0136871337890625,
0.00299835205078125,
-0.014892578125,
0.005359649658203125,
-0.01102447509765625,
-0.023834228515625,
0.018341064453125,
-0.02081298828125,
-0.095703125,
-0.01413726806640625,
-0.007080078125,
0.0611572265625,
-0.0101470947265625,
0.006992340087890625,
-0.0256500244140625,
0.049560546875,
0.049713134765625,
0.02813720703125,
0.00536346435546875,
-0.04754638671875,
0.05999755859375,
-0.003879547119140625,
-0.0037403106689453125,
-0.01318359375,
-0.003204345703125,
0.00858306884765625,
-0.01068878173828125,
0.0018301010131835938,
-0.036651611328125,
-0.04827880859375,
-0.010528564453125,
-0.048797607421875,
-0.009063720703125,
-0.0251922607421875,
-0.0244293212890625,
0.004932403564453125,
-0.0455322265625,
0.012176513671875,
0.0027313232421875,
-0.0232391357421875,
0.05999755859375,
0.0189056396484375,
-0.01056671142578125,
-0.0151824951171875,
0.038543701171875,
0.00360107421875,
-0.045806884765625,
-0.0171966552734375,
-0.041595458984375,
0.0025234222412109375,
-0.012939453125,
0.005680084228515625,
-0.0161285400390625,
-0.0177459716796875,
0.044952392578125,
-0.044525146484375,
-0.026611328125,
-0.00579071044921875,
0.0562744140625,
-0.01047515869140625,
-0.02752685546875,
0.0116119384765625,
-0.045196533203125,
0.023040771484375,
0.033203125,
-0.007801055908203125,
-0.00833892822265625,
0.00960540771484375,
0.03570556640625,
-0.033538818359375,
0.021728515625,
-0.0184173583984375,
-0.02410888671875,
-0.0012493133544921875,
-0.0180206298828125,
0.0192108154296875,
0.014739990234375,
-0.002971649169921875,
0.005084991455078125,
-0.0103607177734375,
0.012451171875,
-0.01058197021484375,
0.02362060546875,
-0.03826904296875,
0.0212554931640625,
-0.01806640625,
-0.024169921875,
-0.0120849609375,
-0.0028781890869140625,
0.065673828125,
-0.00487518310546875,
-0.0340576171875,
-0.002140045166015625,
-0.025115966796875,
-0.0187225341796875,
0.01483154296875,
0.00897216796875,
0.0081634521484375,
0.056854248046875,
-0.00186920166015625,
0.01025390625,
0.0262451171875,
0.031829833984375,
-0.0283203125,
0.01515960693359375,
-0.0016584396362304688,
0.023406982421875,
0.0116729736328125,
0.10546875,
-0.039398193359375,
0.0789794921875,
-0.020538330078125,
0.04058837890625,
0.017913818359375,
0.006893157958984375,
0.01279449462890625,
0.000036656856536865234,
0.0240020751953125,
-0.035430908203125,
-0.013092041015625,
0.0027923583984375,
0.0119781494140625,
-0.02099609375,
0.0036640167236328125,
0.01065826416015625,
-0.00815582275390625,
0.03448486328125,
-0.0288543701171875,
-0.027374267578125,
0.0035114288330078125,
-0.0013370513916015625,
-0.013519287109375,
-0.0281524658203125,
-0.0574951171875,
-0.0068817138671875,
-0.009765625,
-0.01934814453125,
0.05242919921875,
-0.0310821533203125,
0.039886474609375,
-0.07012939453125,
0.0338134765625,
-0.0225830078125,
-0.0187835693359375,
-0.0245361328125,
-0.006694793701171875,
0.010894775390625,
-0.0286712646484375,
-0.0347900390625,
-0.00800323486328125,
-0.0005736351013183594,
0.0177001953125,
0.00011819601058959961,
0.01116943359375,
-0.035369873046875,
0.01337432861328125,
0.01071929931640625,
-0.000049948692321777344,
0.0308990478515625,
-0.01788330078125,
-0.0430908203125,
0.007457733154296875,
-0.041748046875,
-0.0014095306396484375,
0.00276947021484375,
-0.02001953125,
-0.005519866943359375,
-0.013458251953125,
0.02838134765625,
0.02947998046875,
0.0084686279296875,
-0.041534423828125,
-0.03094482421875,
-0.0224151611328125,
0.0263671875,
0.0109710693359375,
-0.01332855224609375,
0.05181884765625,
0.00726318359375,
0.040618896484375,
0.01282501220703125,
0.02935791015625,
-0.0242462158203125,
-0.0168914794921875,
-0.01447296142578125,
-0.08251953125,
-0.0215301513671875,
0.019012451171875,
-0.03118896484375,
0.072265625,
0.046630859375,
0.01837158203125,
0.004444122314453125,
-0.004451751708984375,
-0.005466461181640625,
-0.00775146484375,
0.006519317626953125,
0.0178375244140625,
0.0276641845703125,
0.014129638671875,
0.0034389495849609375,
0.025177001953125,
-0.033477783203125,
-0.02972412109375,
0.023406982421875,
0.00860595703125,
0.0172882080078125,
-0.0007390975952148438,
-0.03289794921875,
0.032806396484375,
0.03240966796875,
0.01314544677734375,
0.01474761962890625,
-0.002193450927734375,
0.00357818603515625,
-0.0164947509765625,
-0.0292510986328125,
0.0196533203125,
0.0248565673828125,
0.03656005859375,
-0.0280303955078125,
0.0124969482421875,
0.03192138671875,
-0.00799560546875,
-0.0183868408203125,
0.01526641845703125,
0.0207977294921875,
-0.049591064453125,
0.009002685546875,
0.03240966796875,
0.03717041015625,
0.013580322265625,
0.0213165283203125,
-0.018890380859375,
-0.0253448486328125,
0.00951385498046875,
-0.026885986328125,
-0.00897979736328125,
0.009185791015625,
0.017730712890625,
-0.00372314453125,
-0.025909423828125,
0.027069091796875,
-0.0192413330078125,
0.00926971435546875,
-0.00984954833984375,
-0.0299224853515625,
0.006160736083984375,
-0.007099151611328125,
0.0250396728515625,
-0.0174713134765625,
-0.0179443359375,
-0.0555419921875,
-0.01171112060546875,
-0.0295562744140625,
-0.00916290283203125,
0.01549530029296875,
0.06317138671875,
0.0499267578125,
0.0513916015625,
0.031829833984375,
-0.037628173828125,
0.025909423828125,
0.01154327392578125,
-0.005218505859375,
-0.043914794921875,
-0.0097198486328125,
0.0258941650390625,
-0.0207061767578125,
0.022705078125,
-0.0018968582153320312,
-0.033233642578125,
-0.0083465576171875,
-0.051300048828125,
0.061370849609375,
-0.0182037353515625,
-0.01290130615234375,
0.00038695335388183594,
-0.00214385986328125,
0.008880615234375,
0.04571533203125,
0.0018854141235351562,
-0.037994384765625,
-0.040679931640625,
0.0225067138671875,
-0.0711669921875,
0.0006270408630371094,
0.021026611328125,
-0.041748046875,
0.04168701171875,
0.0070953369140625,
0.0015764236450195312,
0.008941650390625,
0.02301025390625,
-0.0281219482421875,
0.001495361328125,
-0.035186767578125,
0.0247955322265625,
-0.00859832763671875,
0.050018310546875,
-0.07952880859375,
-0.0280609130859375,
-0.002857208251953125,
0.061737060546875,
0.055755615234375,
0.00786590576171875,
-0.0509033203125,
-0.0125274658203125,
0.0215301513671875,
0.03662109375,
-0.0021343231201171875,
0.04644775390625,
0.022430419921875,
0.045013427734375,
0.058074951171875,
-0.026153564453125,
0.05230712890625,
-0.044189453125,
0.004604339599609375,
0.03289794921875,
0.01122283935546875,
0.0219573974609375,
-0.031463623046875,
-0.018646240234375,
-0.03704833984375,
-0.0194549560546875,
0.03131103515625,
-0.052093505859375,
0.024139404296875,
0.02008056640625,
0.050811767578125,
-0.0587158203125,
-0.04046630859375,
-0.0078887939453125,
0.04052734375,
0.027008056640625,
0.05670166015625,
0.0229034423828125,
0.02392578125,
0.0772705078125,
-0.01409912109375,
0.033172607421875,
0.01184844970703125,
-0.017242431640625,
0.0236968994140625,
-0.0294036865234375,
0.0064239501953125,
-0.05877685546875,
0.0215911865234375,
0.02752685546875,
0.0379638671875,
-0.035797119140625,
-0.06292724609375,
0.006378173828125,
-0.0124664306640625,
-0.00701141357421875,
0.0160064697265625,
-0.0301513671875,
0.063232421875,
0.09674072265625,
-0.0584716796875,
0.0204925537109375,
0.000518798828125,
-0.0007696151733398438,
-0.03900146484375,
-0.0117340087890625,
0.008819580078125,
0.0178985595703125,
-0.01560211181640625,
-0.0287017822265625,
0.02679443359375,
0.04486083984375,
0.02734375,
0.026641845703125,
0.00726318359375,
-0.01482391357421875,
-0.01824951171875,
-0.00537109375,
-0.014129638671875,
0.039215087890625,
-0.057342529296875,
-0.01073455810546875,
0.0173797607421875,
0.045928955078125,
0.0128936767578125,
0.039764404296875,
0.016876220703125,
-0.00952911376953125,
-0.004608154296875,
0.00794219970703125,
0.036712646484375,
-0.0245513916015625,
-0.0265045166015625,
-0.027923583984375,
0.00934600830078125,
0.0222320556640625,
0.01050567626953125,
-0.010986328125,
0.033782958984375,
0.010101318359375,
0.027374267578125,
0.00365447998046875,
0.0167999267578125,
-0.03564453125,
-0.001888275146484375,
0.0099639892578125,
0.08270263671875,
0.0501708984375,
-0.05645751953125,
0.0185394287109375,
-0.047210693359375,
-0.10076904296875,
0.026885986328125,
0.051727294921875,
-0.013427734375,
-0.02435302734375,
0.0088958740234375,
-0.0223388671875,
0.006107330322265625,
0.0128631591796875,
0.020294189453125,
0.0157318115234375,
-0.0031185150146484375,
0.0009851455688476562,
-0.016448974609375,
0.004596710205078125,
0.0340576171875,
0.0017642974853515625,
-0.001399993896484375,
0.037017822265625,
0.004192352294921875,
-0.00024366378784179688,
-0.004062652587890625,
0.006732940673828125,
-0.005161285400390625,
-0.0234832763671875,
0.060028076171875,
-0.022857666015625,
-0.00995635986328125,
-0.005878448486328125,
0.010711669921875,
0.0081024169921875,
0.06878662109375,
-0.0494384765625,
-0.006988525390625,
0.0165252685546875,
0.010162353515625,
-0.053558349609375,
-0.0411376953125,
-0.0367431640625,
0.017974853515625,
0.01459503173828125,
-0.037139892578125,
0.03338623046875,
-0.031219482421875,
-0.007228851318359375,
-0.006805419921875,
0.00627899169921875,
-0.035125732421875,
0.044830322265625,
-0.00928497314453125,
0.0723876953125,
0.06231689453125,
-0.033782958984375,
-0.006107330322265625,
-0.019805908203125,
-0.029052734375,
0.01593017578125,
0.0026397705078125,
-0.002391815185546875,
-0.0005640983581542969,
-0.00897979736328125,
-0.00025916099548339844,
-0.006591796875,
0.051239013671875,
0.001659393310546875,
0.0099945068359375,
-0.0139312744140625,
0.00563812255859375,
-0.037841796875,
0.00823974609375,
-0.0360107421875,
-0.0019006729125976562,
0.0130462646484375,
0.01519012451171875,
0.045257568359375,
-0.0499267578125,
-0.041778564453125,
-0.0020580291748046875,
0.0421142578125,
0.013946533203125,
-0.057373046875,
0.036376953125,
-0.037353515625,
-0.0028533935546875,
0.01348114013671875,
-0.008575439453125,
0.01496124267578125,
0.0670166015625,
-0.007549285888671875,
0.0313720703125,
-0.021270751953125,
-0.0379638671875,
-0.00017881393432617188,
0.0141448974609375,
0.027099609375,
-0.01727294921875,
-0.027374267578125,
0.008209228515625,
0.01207733154296875,
0.03997802734375,
0.0123443603515625,
-0.01172637939453125,
0.01219940185546875,
0.0232086181640625,
-0.045013427734375,
-0.07025146484375,
0.019012451171875,
-0.034210205078125,
0.00470733642578125,
0.005950927734375,
0.037689208984375,
0.0789794921875,
-0.002460479736328125,
-0.1260986328125,
0.022491455078125,
-0.0257720947265625,
-0.05413818359375,
-0.05914306640625,
0.00698089599609375,
-0.0026340484619140625,
0.01160430908203125,
-0.00048661231994628906,
-0.044952392578125,
-0.053009033203125,
-0.0017004013061523438,
0.01074981689453125,
-0.0154266357421875,
0.024322509765625,
0.01004791259765625,
-0.0958251953125,
-0.0077362060546875,
-0.0225372314453125,
-0.0167083740234375,
0.01605224609375,
-0.0028285980224609375,
-0.004558563232421875,
-0.0020008087158203125,
-0.03924560546875,
-0.048980712890625,
-0.01128387451171875,
-0.01273345947265625,
-0.0170745849609375,
-0.012786865234375,
-0.00730133056640625,
0.0088348388671875,
0.050262451171875,
0.03863525390625,
0.00788116455078125,
-0.047027587890625,
0.0009698867797851562,
-0.02178955078125,
0.035675048828125,
-0.0306396484375,
-0.023193359375,
-0.03521728515625,
-0.0333251953125,
-0.019775390625,
-0.0037326812744140625,
0.003894805908203125,
0.0200958251953125,
-0.01352691650390625,
-0.0067291259765625,
0.036376953125,
0.0005931854248046875,
-0.061279296875,
0.0195770263671875,
0.0452880859375,
-0.0498046875,
-0.047576904296875,
0.004802703857421875,
-0.005329132080078125,
-0.03167724609375,
-0.0491943359375,
-0.00753021240234375,
-0.03582763671875,
0.0187225341796875,
0.00415802001953125,
0.01507568359375,
-0.0024471282958984375,
0.035186767578125,
-0.013092041015625,
-0.0259246826171875,
0.022857666015625,
-0.0005407333374023438,
0.00991058349609375,
-0.021514892578125,
0.034149169921875,
0.007495880126953125,
0.08880615234375,
0.0003345012664794922,
0.008697509765625,
-0.01409912109375,
0.0262908935546875,
0.012359619140625,
-0.017547607421875,
0.046539306640625,
-0.027740478515625,
0.00621795654296875,
-0.00991058349609375,
-0.052276611328125,
-0.03131103515625,
-0.01387786865234375,
0.029571533203125,
-0.03155517578125,
0.0186920166015625
] |
d64bad23bd1ad3c9ac1f8796992427b69ef04f89
|
Wordpress Stackexchange
Q: What is the role and history of the $content_width global variable? I just stumbled over a global variable called $content_width. It was new to me, so far I could see that it's used in themes, both the standard twenty ten one and third party ones.
It looks like that it contains the width of the content area in pixels. Since global variables are not documented in the codex, I had trouble finding information about it.
When was the $content_width global variable introduced and for what reason? Is there a ticket related to it?
A: I believe it was added back on WordPress 2.6 (maybe 2.5). It's there to allow you to set a maximum width on images being displayed as content in your theme. E.g. If your main content area is only 475px wide, you could set $content_width = 450 to make sure your image doesn't break out of your main content area.
|
Q: What is the role and history of the $content_width global variable? I just stumbled over a global variable called $content_width. It was new to me, so far I could see that it's used in themes, both the standard twenty ten one and third party ones.
It looks like that it contains the width of the content area in pixels. Since global variables are not documented in the codex, I had trouble finding information about it.
When was the $content_width global variable introduced and for what reason? Is there a ticket related to it?
A: I believe it was added back on WordPress 2.6 (maybe 2.5). It's there to allow you to set a maximum width on images being displayed as content in your theme. E.g. If your main content area is only 475px wide, you could set $content_width = 450 to make sure your image doesn't break out of your main content area.
A: Somewhat related: I don't know if it's reasonable to use $content_width if you plan on developing a theme that allows flexible design options. For example, let's say that your #content will be set to 512px if a user has sidebar widgets active and 768px if a user has no sidebar widgets active. I see no reason why CSS isn't enough to handle image overflows in main content areas:
.size-auto,
.size-full,
.size-large,
.size-medium,
.size-thumbnail {
height: auto;
max-width: 100%; }
This CSS works perfectly fine to not only a) protect against image overflows into adjacent DIVs but also b) properly vertically resize images when they are shrunken down to fit into #content. Maybe I'm missing something but I don't quite get the need for $content_width.
A: $content_width is used for limit the image width in post content. It will overwrite setting in Media section for large size. If you define this variable in functions.php file, then the width of large size of uploaded image will be $content_width.
Here is a post about this.
|
wordpress
|
{
"language": "en",
"length": 327,
"provenance": "stackexchange_00019.jsonl.gz:407669",
"question_score": "18",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11766"
}
|
[
-0.07244873046875,
-0.07470703125,
-0.057891845703125,
0.0164947509765625,
-0.07177734375,
-0.02044677734375,
-0.01849365234375,
0.05548095703125,
0.0491943359375,
0.0228271484375,
-0.04400634765625,
0.0216217041015625,
-0.01506805419921875,
0.0075836181640625,
-0.0247039794921875,
-0.004108428955078125,
0.054107666015625,
-0.056793212890625,
-0.00679779052734375,
0.006435394287109375,
-0.00232696533203125,
0.0517578125,
-0.016448974609375,
0.045501708984375,
0.0208587646484375,
-0.00629425048828125,
0.043701171875,
-0.0228271484375,
0.0193939208984375,
-0.016387939453125,
0.01605224609375,
0.0030517578125,
0.0013570785522460938,
0.02703857421875,
0.006534576416015625,
-0.0015115737915039062,
0.0204620361328125,
0.0229034423828125,
0.0304412841796875,
-0.006755828857421875,
0.0094451904296875,
-0.00882720947265625,
0.05767822265625,
-0.005336761474609375,
0.0234832763671875,
-0.00788116455078125,
0.0030460357666015625,
-0.0875244140625,
-0.015167236328125,
0.0013265609741210938,
0.02423095703125,
0.0236968994140625,
0.040771484375,
0.01088714599609375,
-0.00946807861328125,
-0.0017709732055664062,
-0.0306549072265625,
0.0131378173828125,
0.032012939453125,
-0.006313323974609375,
-0.0166473388671875,
-0.006931304931640625,
0.0193328857421875,
-0.00021147727966308594,
0.005420684814453125,
-0.0245513916015625,
0.031097412109375,
0.024200439453125,
-0.06243896484375,
-0.0239410400390625,
0.0439453125,
-0.004024505615234375,
0.00258636474609375,
-0.04412841796875,
0.00791168212890625,
-0.00213623046875,
-0.0063323974609375,
-0.050872802734375,
0.004428863525390625,
0.006122589111328125,
-0.040435791015625,
-0.0178985595703125,
-0.0411376953125,
-0.042022705078125,
0.040496826171875,
0.01224517822265625,
-0.01580810546875,
0.006450653076171875,
0.0007534027099609375,
-0.03155517578125,
-0.01143646240234375,
0.0125732421875,
0.01485443115234375,
-0.0240020751953125,
-0.048583984375,
-0.03369140625,
0.0278167724609375,
0.03289794921875,
-0.027374267578125,
-0.00302886962890625,
0.0092620849609375,
-0.039398193359375,
0.043212890625,
-0.02685546875,
-0.01186370849609375,
0.0208282470703125,
-0.003978729248046875,
0.03460693359375,
0.0203094482421875,
0.0312347412109375,
-0.01145172119140625,
-0.0355224609375,
-0.01387786865234375,
0.02801513671875,
-0.049285888671875,
-0.031280517578125,
-0.06146240234375,
0.0022869110107421875,
-0.02947998046875,
0.005817413330078125,
0.01529693603515625,
0.01404571533203125,
0.01367950439453125,
0.0298919677734375,
0.0178070068359375,
0.0281982421875,
-0.005168914794921875,
-0.049774169921875,
-0.035400390625,
0.0538330078125,
-0.0037555694580078125,
-0.0179443359375,
0.0194244384765625,
0.0155792236328125,
-0.01084136962890625,
-0.0274505615234375,
0.00739288330078125,
-0.056549072265625,
-0.022552490234375,
0.06414794921875,
-0.064697265625,
-0.055023193359375,
0.0325927734375,
-0.042510986328125,
0.00182342529296875,
-0.00446319580078125,
0.02532958984375,
0.042755126953125,
-0.01029205322265625,
-0.07861328125,
0.061737060546875,
0.0035572052001953125,
0.032928466796875,
0.0213623046875,
-0.03662109375,
-0.0195159912109375,
0.03143310546875,
-0.0350341796875,
-0.0452880859375,
-0.0455322265625,
-0.0102386474609375,
0.01128387451171875,
0.048797607421875,
-0.03253173828125,
-0.0194091796875,
-0.0290374755859375,
-0.06475830078125,
0.003757476806640625,
0.0167236328125,
-0.0131683349609375,
0.01178741455078125,
-0.00273895263671875,
-0.0164337158203125,
-0.007259368896484375,
-0.005710601806640625,
0.016571044921875,
0.01371002197265625,
-0.0162200927734375,
0.0004343986511230469,
0.07000732421875,
0.004787445068359375,
-0.0264129638671875,
0.0185089111328125,
-0.01593017578125,
-0.0014829635620117188,
-0.0234222412109375,
-0.025115966796875,
-0.065673828125,
0.0384521484375,
-0.0034580230712890625,
-0.00567626953125,
0.01546478271484375,
-0.041259765625,
0.0242919921875,
-0.00994873046875,
0.012969970703125,
-0.0132293701171875,
0.0249786376953125,
-0.0106048583984375,
-0.033966064453125,
0.061553955078125,
-0.0228424072265625,
0.0262908935546875,
-0.026885986328125,
-0.07659912109375,
0.0006427764892578125,
-0.0247344970703125,
0.013336181640625,
-0.022918701171875,
0.004421234130859375,
0.0140533447265625,
-0.01392364501953125,
0.0139007568359375,
-0.06756591796875,
-0.0295562744140625,
0.0109405517578125,
0.01739501953125,
0.057708740234375,
0.02154541015625,
0.046051025390625,
0.0182342529296875,
-0.036834716796875,
0.0224761962890625,
0.0015354156494140625,
0.0185089111328125,
0.0202789306640625,
-0.04071044921875,
0.006061553955078125,
0.0101318359375,
0.0031909942626953125,
0.00313568115234375,
0.0467529296875,
0.0199127197265625,
0.0662841796875,
-0.00876617431640625,
-0.0309906005859375,
-0.0245513916015625,
-0.06829833984375,
0.01349639892578125,
0.046600341796875,
0.0615234375,
0.0675048828125,
-0.0172119140625,
-0.0595703125,
0.079345703125,
-0.013397216796875,
0.0269927978515625,
-0.04217529296875,
0.00826263427734375,
0.01397705078125,
0.0004096031188964844,
-0.0208892822265625,
0.031951904296875,
-0.050323486328125,
0.0052032470703125,
0.033782958984375,
-0.0152587890625,
0.030731201171875,
-0.0163421630859375,
0.054718017578125,
-0.0380859375,
0.037750244140625,
0.044036865234375,
-0.02911376953125,
0.0020084381103515625,
-0.03509521484375,
0.005573272705078125,
-0.0160369873046875,
-0.007701873779296875,
-0.00911712646484375,
0.0242767333984375,
-0.031768798828125,
-0.00013756752014160156,
0.01873779296875,
0.0020599365234375,
0.0188140869140625,
-0.032073974609375,
0.015960693359375,
0.017669677734375,
0.007080078125,
-0.044891357421875,
-0.0188140869140625,
-0.0855712890625,
-0.0122528076171875,
-0.030120849609375,
-0.072265625,
0.00879669189453125,
0.0295257568359375,
0.04132080078125,
-0.00409698486328125,
-0.0059051513671875,
0.07696533203125,
0.00830841064453125,
0.070068359375,
0.01560211181640625,
-0.0025806427001953125,
0.003955841064453125,
-0.01552581787109375,
0.0149383544921875,
-0.016082763671875,
0.044097900390625,
0.0516357421875,
-0.0236968994140625,
0.012725830078125,
-0.005405426025390625,
0.0201568603515625,
-0.0049285888671875,
0.002079010009765625,
0.007114410400390625,
0.01032257080078125,
-0.022857666015625,
0.0266265869140625,
0.003997802734375,
-0.0060577392578125,
-0.0234375,
-0.0303497314453125,
-0.03875732421875,
-0.01079559326171875,
-0.053314208984375,
0.01303863525390625,
-0.032501220703125,
-0.102294921875,
-0.01151275634765625,
-0.00514984130859375,
-0.05072021484375,
0.00817108154296875,
0.047210693359375,
0.005474090576171875,
-0.02398681640625,
-0.03448486328125,
-0.06072998046875,
-0.067626953125,
-0.052734375,
0.03759765625,
-0.00870513916015625,
0.018035888671875,
-0.0085601806640625,
0.08489990234375,
0.002582550048828125,
-0.0254669189453125,
-0.0135650634765625,
-0.01258087158203125,
-0.00331878662109375,
-0.0146026611328125,
0.021881103515625,
-0.029022216796875,
-0.036529541015625,
0.01512908935546875,
-0.003185272216796875,
-0.002391815185546875,
-0.0160064697265625,
-0.00437164306640625,
-0.00769805908203125,
-0.005889892578125,
0.0012331008911132812,
0.0419921875,
0.0080718994140625,
-0.07208251953125,
-0.01800537109375,
-0.09442138671875,
-0.03912353515625,
0.00568389892578125,
-0.043792724609375,
0.0318603515625,
0.04840087890625,
-0.018707275390625,
0.0088653564453125,
0.000904083251953125,
-0.016571044921875,
-0.0120086669921875,
0.022918701171875,
-0.0787353515625,
0.07080078125,
0.00939178466796875,
0.004306793212890625,
-0.0231475830078125,
-0.0005769729614257812,
-0.03131103515625,
0.049224853515625,
0.0100555419921875,
0.01534271240234375,
0.0017566680908203125,
-0.005840301513671875,
0.00452423095703125,
-0.0231781005859375,
0.056732177734375,
0.06365966796875,
0.051849365234375,
-0.018341064453125,
-0.06048583984375,
-0.018218994140625,
0.07452392578125,
-0.040618896484375,
-0.0250091552734375,
0.0236968994140625,
0.0123138427734375,
-0.012420654296875,
-0.007427215576171875,
-0.032012939453125,
-0.022918701171875,
-0.06817626953125,
0.027008056640625,
0.0267333984375,
-0.01788330078125,
-0.040496826171875,
0.0926513671875,
-0.056396484375,
-0.0200958251953125,
-0.006927490234375,
0.01043701171875,
-0.02496337890625,
0.0237884521484375,
-0.061767578125,
0.058074951171875,
0.0296173095703125,
-0.053741455078125,
-0.06072998046875,
-0.0157318115234375,
-0.01288604736328125,
0.052734375,
0.0277557373046875,
-0.050323486328125,
0.003284454345703125,
0.03607177734375,
0.040771484375,
-0.0249786376953125,
0.01751708984375,
-0.02130126953125,
0.025726318359375,
-0.0009908676147460938,
-0.00501251220703125,
-0.01678466796875,
0.008453369140625,
0.0092315673828125,
-0.026947021484375,
0.00287628173828125,
-0.004360198974609375,
-0.022369384765625,
0.043304443359375,
-0.040985107421875,
-0.05560302734375,
0.0003561973571777344,
0.006366729736328125,
0.0272064208984375,
0.003131866455078125,
0.003536224365234375,
-0.0202484130859375,
-0.0635986328125,
0.042724609375,
0.0341796875,
-0.0249481201171875,
0.01055908203125,
0.045989990234375,
0.01436614990234375,
-0.031982421875,
-0.0755615234375,
0.0323486328125,
0.0640869140625,
-0.0153350830078125,
0.023345947265625,
0.00412750244140625,
-0.04541015625,
0.05438232421875,
0.038116455078125,
-0.00518798828125,
-0.00024330615997314453,
0.06219482421875,
-0.0111236572265625,
-0.047088623046875,
0.039825439453125,
-0.0244903564453125,
-0.006412506103515625,
-0.01506805419921875,
-0.01529693603515625,
-0.039581298828125,
0.0030384063720703125,
0.058685302734375,
-0.02349853515625,
0.0675048828125,
-0.028289794921875,
-0.0287322998046875,
0.00304412841796875,
0.04388427734375,
0.038055419921875,
0.005218505859375,
0.02178955078125,
-0.01020050048828125,
0.01605224609375,
0.0211639404296875,
0.01617431640625,
-0.0372314453125,
0.0089874267578125,
0.033538818359375,
0.0209808349609375,
0.0287628173828125,
0.0133209228515625,
0.00788116455078125,
-0.0148773193359375,
-0.006763458251953125,
-0.005413055419921875,
-0.05157470703125,
0.0251312255859375,
0.0083160400390625,
0.00531768798828125,
-0.00698089599609375,
0.053863525390625,
0.0100860595703125,
-0.0252838134765625,
-0.01568603515625,
-0.0258026123046875,
-0.031463623046875,
-0.0660400390625,
0.044708251953125,
0.0219573974609375,
0.0023288726806640625,
0.01012420654296875,
0.0372314453125,
0.0074005126953125,
0.01416015625,
-0.0160064697265625,
0.01273345947265625,
0.032745361328125,
0.0172576904296875,
0.0167236328125,
0.0131378173828125,
-0.0120849609375,
0.0160980224609375,
0.0093994140625,
-0.00640869140625,
-0.0104827880859375,
0.003631591796875,
0.0293121337890625,
-0.027984619140625,
0.0134735107421875,
0.0017595291137695312,
-0.03192138671875,
-0.004673004150390625,
0.0125579833984375,
-0.041595458984375,
-0.060791015625,
-0.015289306640625,
0.0198211669921875,
0.0218658447265625,
-0.040252685546875,
-0.010589599609375,
-0.024383544921875,
-0.057861328125,
-0.017730712890625,
0.010284423828125,
-0.03826904296875,
0.0135040283203125,
0.0033702850341796875,
-0.0811767578125,
-0.0174102783203125,
-0.01529693603515625,
0.00171661376953125,
-0.037445068359375,
0.0030574798583984375,
-0.0281219482421875,
0.040740966796875,
-0.025177001953125,
0.0178680419921875,
-0.0200347900390625,
-0.00798797607421875,
-0.00893402099609375,
0.01375579833984375,
0.043487548828125,
0.0201263427734375,
-0.00582122802734375,
-0.006793975830078125,
-0.026214599609375,
-0.00644683837890625,
-0.0232696533203125,
-0.058349609375,
-0.025482177734375,
-0.0096588134765625,
-0.013763427734375,
-0.00811767578125,
-0.0242919921875,
-0.008697509765625,
-0.01111602783203125,
0.07025146484375,
0.03411865234375,
0.037750244140625,
-0.002674102783203125,
-0.0036067962646484375,
0.0215911865234375,
0.007175445556640625,
0.0027561187744140625,
-0.0173492431640625,
0.004352569580078125,
-0.028076171875,
0.005680084228515625,
0.00582122802734375,
-0.002513885498046875,
-0.0028400421142578125,
0.0114898681640625,
0.0025463104248046875,
0.0555419921875,
-0.0023651123046875,
0.0169219970703125,
-0.0362548828125,
0.002605438232421875,
-0.0184173583984375,
0.0046844482421875,
-0.049835205078125,
-0.021514892578125,
0.04571533203125,
-0.0032024383544921875,
0.021209716796875,
-0.01065826416015625,
-0.007244110107421875,
0.002201080322265625,
0.00335693359375,
0.004909515380859375,
0.0102691650390625,
-0.052001953125,
0.035125732421875,
0.0889892578125,
0.0097808837890625,
0.05596923828125,
-0.008758544921875,
0.0092010498046875,
0.056427001953125,
0.007640838623046875,
-0.07049560546875,
-0.0274200439453125,
-0.0155487060546875,
0.010284423828125,
0.0217742919921875,
0.0116729736328125,
0.0130767822265625,
0.019012451171875,
0.0295867919921875,
0.0670166015625,
-0.0263824462890625,
0.00301361083984375,
0.0108489990234375,
-0.03643798828125,
0.030487060546875,
-0.0172576904296875,
-0.0155487060546875,
-0.01395416259765625,
0.039825439453125,
0.0006451606750488281,
-0.018341064453125,
0.015869140625,
0.0061187744140625,
-0.0124053955078125,
0.00980377197265625,
0.056182861328125,
0.0308380126953125,
-0.048828125,
0.0203704833984375,
0.0244903564453125,
0.029815673828125,
-0.025177001953125,
0.043701171875,
-0.0236358642578125,
0.0160064697265625,
-0.018768310546875,
0.0293121337890625,
0.01323699951171875,
0.0033969879150390625,
-0.03424072265625,
0.00461578369140625,
-0.033935546875,
0.049468994140625,
-0.04071044921875,
0.01065826416015625,
0.0214996337890625,
-0.0318603515625,
-0.036376953125,
-0.0009441375732421875,
0.048980712890625,
0.004817962646484375,
-0.0303192138671875,
0.0250396728515625,
-0.0389404296875,
-0.02734375,
-0.0041961669921875,
0.0086212158203125,
0.06072998046875,
-0.03302001953125,
-0.0034999847412109375,
0.0241546630859375,
0.031524658203125,
-0.003871917724609375,
-0.0014142990112304688,
0.0116119384765625,
-0.050689697265625,
-0.033935546875,
0.004131317138671875,
-0.0426025390625,
-0.0217132568359375,
-0.01824951171875,
-0.059295654296875,
0.0257720947265625,
-0.018402099609375,
0.0296783447265625,
-0.0016422271728515625,
-0.00716400146484375,
0.0006594657897949219,
-0.0218353271484375,
0.00034880638122558594,
0.039398193359375,
0.01081085205078125,
-0.007022857666015625,
-0.04254150390625,
-0.01189422607421875,
-0.003849029541015625,
0.054595947265625,
-0.00640869140625,
-0.01239776611328125,
0.00801849365234375,
-0.03948974609375,
0.033416748046875,
0.055389404296875,
0.03662109375,
-0.01483917236328125,
0.012603759765625,
0.0003440380096435547,
-0.016998291015625,
-0.01421356201171875,
0.0178985595703125,
-0.0572509765625,
-0.025360107421875,
0.02789306640625,
0.0290374755859375,
0.018707275390625,
0.044219970703125,
0.01544189453125,
-0.04974365234375,
0.0196075439453125,
0.042205810546875,
-0.005062103271484375,
0.0011262893676757812,
0.0216522216796875,
-0.008087158203125,
-0.012725830078125,
0.008697509765625,
-0.01488494873046875,
0.036102294921875,
-0.01543426513671875,
0.035369873046875,
0.0185394287109375,
0.00760650634765625,
0.07623291015625,
0.01446533203125,
0.0124664306640625,
0.043426513671875,
0.0037975311279296875,
-0.0120391845703125,
0.012298583984375,
0.01314544677734375,
-0.0333251953125,
-0.01523590087890625,
0.0706787109375,
0.0166015625,
-0.00457000732421875,
-0.022216796875,
0.002445220947265625,
-0.0112762451171875,
-0.0025997161865234375,
-0.029815673828125,
-0.01116943359375,
-0.017791748046875,
-0.0061187744140625,
-0.019256591796875,
0.005825042724609375,
0.044189453125,
0.0025177001953125,
0.0258026123046875,
0.029022216796875,
-0.06109619140625,
-0.0099029541015625,
-0.07177734375,
-0.0178985595703125,
0.0208587646484375,
0.0709228515625,
0.0498046875,
0.04498291015625,
0.051544189453125,
-0.043487548828125,
-0.0250244140625,
0.00766754150390625,
0.0015325546264648438,
0.0281219482421875,
-0.037078857421875,
-0.004909515380859375,
0.0214996337890625,
0.046112060546875,
-0.0008478164672851562,
-0.052093505859375,
0.0102996826171875,
0.0179290771484375,
-0.055694580078125,
-0.0230255126953125,
-0.01354217529296875,
-0.0309600830078125,
0.0244903564453125,
-0.024139404296875,
0.0219879150390625,
0.01265716552734375,
-0.0252838134765625,
-0.0214080810546875,
-0.00540924072265625,
0.04962158203125,
-0.00045037269592285156,
-0.0094757080078125,
0.00893402099609375,
-0.0531005859375,
-0.028350830078125,
0.006275177001953125,
0.03118896484375,
0.017852783203125,
-0.058746337890625,
-0.01055145263671875,
-0.017333984375,
-0.042205810546875,
0.033477783203125,
0.03668212890625,
-0.00843048095703125,
0.00981903076171875,
-0.01158905029296875,
-0.0144500732421875,
-0.00882720947265625,
0.00888824462890625,
-0.012481689453125,
-0.004337310791015625,
0.0121612548828125,
-0.012054443359375,
-0.0205841064453125,
-0.027984619140625,
-0.01611328125,
0.045440673828125,
0.01424407958984375,
0.038055419921875,
-0.01383209228515625,
0.041961669921875,
0.0843505859375,
-0.0216522216796875,
0.059478759765625,
0.05731201171875,
0.014129638671875,
-0.004467010498046875,
0.017730712890625,
-0.055694580078125,
-0.021942138671875,
-0.01236724853515625,
0.046875,
-0.053009033203125,
-0.0174102783203125,
0.0091552734375,
0.0168304443359375,
-0.0220947265625,
0.004055023193359375,
-0.00943756103515625,
-0.014007568359375,
0.0033397674560546875,
0.0009121894836425781,
0.0199737548828125,
0.0293121337890625,
0.01309967041015625,
0.01482391357421875,
-0.00405120849609375,
-0.03497314453125,
0.040618896484375,
-0.025177001953125,
0.0250396728515625,
0.022979736328125,
0.01446533203125,
-0.037811279296875,
-0.015838623046875,
-0.0135650634765625,
-0.0020961761474609375,
-0.003528594970703125,
0.06085205078125,
-0.0244140625,
0.01119232177734375,
0.034210205078125,
0.0066680908203125,
0.036407470703125,
-0.04718017578125,
-0.0162506103515625,
0.047576904296875,
0.0188140869140625,
-0.020782470703125,
0.006816864013671875,
-0.0027008056640625,
-0.0275115966796875,
-0.002712249755859375,
0.00749969482421875,
0.0198822021484375,
0.0001653432846069336,
0.0130615234375,
-0.0173187255859375,
0.03369140625,
0.0169677734375,
-0.0311737060546875,
-0.00017404556274414062,
0.0013828277587890625,
-0.007488250732421875,
0.034027099609375,
-0.0313720703125,
0.01422882080078125,
0.04864501953125,
-0.022430419921875,
-0.016326904296875,
-0.03680419921875,
-0.00798797607421875,
-0.0211334228515625,
0.0421142578125,
0.0677490234375,
-0.04669189453125,
0.01071929931640625,
0.0562744140625,
0.06365966796875,
0.09600830078125,
-0.025970458984375,
-0.040374755859375,
0.0151214599609375,
0.01438140869140625,
0.003887176513671875,
-0.046478271484375,
-0.0206298828125,
-0.035186767578125,
0.0242156982421875,
-0.01983642578125,
-0.004726409912109375,
-0.010498046875,
-0.038604736328125,
-0.05902099609375,
-0.03759765625,
0.0015668869018554688,
-0.03863525390625,
-0.0029277801513671875,
-0.032989501953125,
0.0063323974609375,
-0.0036029815673828125,
0.0096435546875,
-0.03253173828125,
-0.039306640625,
0.01160430908203125,
-0.00022041797637939453,
-0.01824951171875,
0.045806884765625,
-0.046600341796875,
-0.061370849609375,
-0.01033782958984375,
0.0208587646484375,
0.01262664794921875,
-0.0177764892578125,
0.00601959228515625,
0.0006957054138183594,
0.0277557373046875,
-0.00896453857421875,
-0.0264892578125,
0.00789642333984375,
-0.02978515625,
-0.00955963134765625,
-0.01258087158203125,
0.00406646728515625,
0.01061248779296875,
0.0738525390625,
0.00264739990234375,
0.013641357421875,
-0.026275634765625,
0.01410675048828125,
0.01751708984375,
-0.0731201171875,
-0.0017833709716796875,
0.036163330078125,
-0.06097412109375,
-0.0251312255859375,
-0.0025463104248046875,
-0.00616455078125,
0.0179290771484375,
-0.043792724609375,
-0.033782958984375,
-0.00783538818359375,
-0.0272674560546875,
0.01149749755859375,
-0.034881591796875,
-0.0079193115234375,
0.02227783203125,
-0.021453857421875,
-0.0006041526794433594,
-0.01511383056640625,
0.021728515625,
-0.0022602081298828125,
0.0155029296875,
0.003978729248046875,
0.06640625,
-0.08953857421875,
-0.01372528076171875,
-0.0007252693176269531,
0.036224365234375,
-0.047271728515625,
0.0085906982421875,
0.0014276504516601562,
0.005916595458984375,
-0.0269927978515625,
-0.0009541511535644531,
0.0204010009765625,
0.00994110107421875,
-0.0213165283203125,
0.0401611328125,
-0.036163330078125,
-0.00974273681640625,
-0.03497314453125,
0.0311431884765625,
-0.006946563720703125,
-0.006420135498046875,
0.0426025390625,
-0.03656005859375,
0.006855010986328125,
-0.002292633056640625,
-0.018341064453125,
-0.037628173828125,
0.01739501953125,
-0.00917816162109375,
-0.002552032470703125,
0.01873779296875
] |
86309ab29503c6dac5f9043688d615fca37b1e17
|
Wordpress Stackexchange
Q: Best way to automate the page/post publication process? I'm working on a spreadsheet that has the contact information for thousands of training programs related to my niche. I'm wondering if any of you know a way to automate the process of creating a landing page for each entry. Each page will contain:
*
*School name
*School address
*School phone number
*School website
*School accreditation date
Since this is a very routine process, there must be a way to automate it all instead of posting 3,000+ landing pages. Let me know if you have any suggestions.
Thank you.
A: You can use the CSV Importer plugin to import your spreadsheet into posts or even better a custom post type say "school" import school name as post title and the rest as custom fields. Then create a single-school.php file in your theme directory and pull out the name and other fields and you are done.
Each school will have Its own page
|
Q: Best way to automate the page/post publication process? I'm working on a spreadsheet that has the contact information for thousands of training programs related to my niche. I'm wondering if any of you know a way to automate the process of creating a landing page for each entry. Each page will contain:
*
*School name
*School address
*School phone number
*School website
*School accreditation date
Since this is a very routine process, there must be a way to automate it all instead of posting 3,000+ landing pages. Let me know if you have any suggestions.
Thank you.
A: You can use the CSV Importer plugin to import your spreadsheet into posts or even better a custom post type say "school" import school name as post title and the rest as custom fields. Then create a single-school.php file in your theme directory and pull out the name and other fields and you are done.
Each school will have Its own page
|
wordpress
|
{
"language": "en",
"length": 161,
"provenance": "stackexchange_00019.jsonl.gz:407670",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11770"
}
|
[
0.0188140869140625,
-0.010986328125,
-0.0005183219909667969,
0.020660400390625,
-0.0280609130859375,
-0.0281829833984375,
0.031341552734375,
-0.020355224609375,
-0.04364013671875,
-0.004390716552734375,
-0.0364990234375,
0.06573486328125,
-0.0731201171875,
-0.0111541748046875,
0.029022216796875,
-0.050689697265625,
-0.0004012584686279297,
-0.007190704345703125,
-0.00444793701171875,
-0.025848388671875,
0.00628662109375,
-0.046783447265625,
0.0240631103515625,
0.01177978515625,
0.0219879150390625,
0.03851318359375,
-0.036041259765625,
0.007549285888671875,
-0.01320648193359375,
-0.0045928955078125,
0.00714111328125,
-0.0038356781005859375,
0.007137298583984375,
-0.00205230712890625,
0.0369873046875,
0.0215606689453125,
0.03057861328125,
-0.00823974609375,
0.005847930908203125,
0.047454833984375,
0.02166748046875,
-0.000934600830078125,
0.036376953125,
0.004787445068359375,
0.00901031494140625,
-0.0034427642822265625,
-0.006969451904296875,
-0.03863525390625,
0.0030307769775390625,
-0.026458740234375,
0.0038623809814453125,
0.054229736328125,
0.0158233642578125,
-0.00995635986328125,
-0.004940032958984375,
0.0340576171875,
-0.0200653076171875,
0.0244598388671875,
0.0206756591796875,
-0.0404052734375,
-0.0192413330078125,
-0.0012140274047851562,
0.032623291015625,
0.0321044921875,
-0.05389404296875,
-0.002887725830078125,
-0.0784912109375,
0.0019159317016601562,
0.00136566162109375,
-0.053253173828125,
0.0122528076171875,
-0.024627685546875,
-0.01114654541015625,
-0.0116424560546875,
-0.019622802734375,
-0.0242156982421875,
0.00412750244140625,
-0.029754638671875,
0.005298614501953125,
0.0167694091796875,
0.005462646484375,
0.0374755859375,
-0.00872039794921875,
-0.044708251953125,
0.0177764892578125,
-0.0232696533203125,
-0.0095672607421875,
-0.01678466796875,
-0.0643310546875,
-0.0347900390625,
-0.0394287109375,
-0.08880615234375,
-0.03253173828125,
-0.0023174285888671875,
-0.0127716064453125,
-0.0265655517578125,
0.02386474609375,
0.033905029296875,
0.0032749176025390625,
0.024993896484375,
-0.0223388671875,
-0.04608154296875,
0.04254150390625,
-0.036407470703125,
0.00428009033203125,
0.074951171875,
-0.003505706787109375,
-0.0250396728515625,
0.0217132568359375,
-0.01404571533203125,
0.01959228515625,
-0.008026123046875,
-0.006008148193359375,
0.0065155029296875,
-0.045196533203125,
0.019683837890625,
-0.013458251953125,
0.005298614501953125,
-0.0027904510498046875,
0.0347900390625,
-0.01103973388671875,
0.0003840923309326172,
0.002410888671875,
-0.037567138671875,
0.00598907470703125,
-0.009307861328125,
-0.02227783203125,
-0.0010967254638671875,
0.04400634765625,
-0.019012451171875,
-0.0289764404296875,
0.023162841796875,
0.039337158203125,
-0.0056304931640625,
0.0004773139953613281,
-0.00036406517028808594,
-0.0138397216796875,
-0.01334381103515625,
0.0002899169921875,
-0.007183074951171875,
0.0027828216552734375,
-0.05322265625,
-0.00022172927856445312,
0.036895751953125,
-0.0263671875,
0.0210418701171875,
0.0201416015625,
-0.0025844573974609375,
-0.033172607421875,
-0.0028171539306640625,
-0.05609130859375,
0.017669677734375,
0.0280914306640625,
-0.038726806640625,
0.01593017578125,
-0.06243896484375,
-0.0265350341796875,
-0.01202392578125,
0.0311737060546875,
-0.005893707275390625,
0.066650390625,
0.03192138671875,
0.034454345703125,
0.01461029052734375,
0.00804901123046875,
-0.050445556640625,
-0.0791015625,
-0.0011396408081054688,
0.0245819091796875,
-0.0199127197265625,
0.03515625,
-0.0005288124084472656,
-0.0010595321655273438,
-0.009613037109375,
0.00418853759765625,
0.0016336441040039062,
-0.0013093948364257812,
-0.002529144287109375,
0.0098876953125,
-0.00656890869140625,
-0.010284423828125,
-0.035369873046875,
0.0133514404296875,
-0.010467529296875,
-0.02081298828125,
0.0266876220703125,
0.0036869049072265625,
0.047698974609375,
0.015045166015625,
0.027618408203125,
-0.0236358642578125,
0.006786346435546875,
-0.01458740234375,
0.026885986328125,
0.03228759765625,
-0.0238800048828125,
-0.052764892578125,
-0.013916015625,
-0.00313568115234375,
-0.0302734375,
-0.037384033203125,
0.04541015625,
-0.01702880859375,
0.059661865234375,
0.08123779296875,
-0.0115966796875,
0.02490234375,
0.00910186767578125,
-0.0158233642578125,
0.00414276123046875,
0.0161590576171875,
-0.007099151611328125,
-0.004138946533203125,
-0.033660888671875,
-0.0100860595703125,
0.0004296302795410156,
-0.00751495361328125,
-0.020294189453125,
-0.023284912109375,
-0.0089111328125,
-0.0188446044921875,
-0.013275146484375,
-0.03729248046875,
0.0206146240234375,
0.024017333984375,
-0.0157012939453125,
-0.0286102294921875,
-0.031005859375,
-0.01122283935546875,
-0.00994110107421875,
-0.024169921875,
0.076416015625,
-0.00901031494140625,
-0.004383087158203125,
-0.01526641845703125,
0.01337432861328125,
-0.00620269775390625,
-0.0219879150390625,
-0.0037593841552734375,
0.03448486328125,
0.0172119140625,
0.0301971435546875,
0.02459716796875,
0.05462646484375,
0.0187530517578125,
-0.01470184326171875,
0.015777587890625,
0.0242462158203125,
0.0016069412231445312,
0.06353759765625,
-0.018463134765625,
0.0191192626953125,
0.00542449951171875,
-0.06427001953125,
-0.0184173583984375,
0.052703857421875,
-0.00870513916015625,
-0.043914794921875,
0.0181121826171875,
-0.0269012451171875,
0.031951904296875,
-0.0572509765625,
-0.061676025390625,
-0.01031494140625,
0.0169525146484375,
0.0032558441162109375,
0.02178955078125,
0.00830841064453125,
-0.05316162109375,
0.01287841796875,
0.0294036865234375,
0.021209716796875,
0.0003428459167480469,
-0.020050048828125,
-0.054473876953125,
-0.020111083984375,
0.01226806640625,
0.00734710693359375,
-0.0177764892578125,
-0.03131103515625,
-0.00904083251953125,
0.03936767578125,
0.0345458984375,
-0.01015472412109375,
-0.0028285980224609375,
-0.02691650390625,
0.01500701904296875,
-0.006931304931640625,
0.0147857666015625,
-0.00659942626953125,
0.00585174560546875,
0.0474853515625,
-0.0201263427734375,
0.0643310546875,
0.0225067138671875,
-0.0234832763671875,
0.06781005859375,
-0.035919189453125,
0.036865234375,
-0.03564453125,
0.052825927734375,
0.036285400390625,
-0.02142333984375,
0.0002605915069580078,
-0.022308349609375,
0.0080108642578125,
-0.0158843994140625,
-0.017974853515625,
-0.02398681640625,
-0.0528564453125,
0.009307861328125,
0.01515960693359375,
0.03057861328125,
0.1259765625,
-0.040069580078125,
-0.05975341796875,
0.0127410888671875,
0.04168701171875,
-0.056671142578125,
-0.09808349609375,
0.032257080078125,
-0.0225677490234375,
0.0047760009765625,
-0.0028438568115234375,
-0.0159454345703125,
-0.034637451171875,
0.0254364013671875,
-0.0210113525390625,
-0.034393310546875,
0.0203399658203125,
-0.035888671875,
-0.0274810791015625,
-0.04669189453125,
0.005191802978515625,
-0.01244354248046875,
0.0176849365234375,
0.01715087890625,
0.0029621124267578125,
0.006893157958984375,
-0.02813720703125,
0.007354736328125,
0.0177154541015625,
-0.0217437744140625,
-0.00345611572265625,
0.0010843276977539062,
0.00021469593048095703,
0.0212860107421875,
0.0107879638671875,
-0.0250091552734375,
-0.0003559589385986328,
0.01082611083984375,
-0.029815673828125,
-0.025390625,
-0.016693115234375,
-0.01496124267578125,
0.0161895751953125,
0.007427215576171875,
-0.043182373046875,
-0.0277252197265625,
-0.08251953125,
0.0143280029296875,
0.003185272216796875,
-0.0164947509765625,
-0.0484619140625,
-0.0214385986328125,
0.004756927490234375,
-0.0184478759765625,
0.0018644332885742188,
-0.0164031982421875,
-0.01276397705078125,
0.020660400390625,
-0.0211639404296875,
-0.0003681182861328125,
-0.0175933837890625,
-0.0219879150390625,
-0.0039005279541015625,
0.0748291015625,
0.0125885009765625,
-0.0012331008911132812,
0.039154052734375,
0.0294189453125,
0.0108489990234375,
0.005573272705078125,
-0.027191162109375,
-0.092529296875,
0.038665771484375,
-0.06134033203125,
-0.0079345703125,
-0.027923583984375,
-0.01483154296875,
0.0275726318359375,
0.1112060546875,
-0.046875,
0.00568389892578125,
0.01450347900390625,
0.005580902099609375,
-0.0218048095703125,
-0.037139892578125,
-0.081787109375,
0.0003342628479003906,
-0.06414794921875,
-0.01030731201171875,
-0.0025577545166015625,
-0.04718017578125,
-0.006343841552734375,
-0.0186004638671875,
-0.042236328125,
-0.04217529296875,
0.0321044921875,
0.007259368896484375,
-0.030120849609375,
0.027679443359375,
-0.02178955078125,
-0.00099945068359375,
0.009246826171875,
-0.000888824462890625,
-0.006748199462890625,
-0.005443572998046875,
-0.0180511474609375,
0.0294036865234375,
0.021575927734375,
-0.005146026611328125,
0.013092041015625,
0.0267486572265625,
-0.016815185546875,
0.002208709716796875,
0.01165008544921875,
0.0250244140625,
0.01470947265625,
0.01190185546875,
-0.00678253173828125,
-0.004703521728515625,
-0.0058135986328125,
-0.01070404052734375,
-0.04266357421875,
0.0179595947265625,
-0.0063018798828125,
0.0172119140625,
0.00966644287109375,
-0.0148468017578125,
-0.003055572509765625,
-0.02947998046875,
0.01232147216796875,
0.00994873046875,
0.0002636909484863281,
-0.004261016845703125,
-0.0261077880859375,
0.007354736328125,
0.0241851806640625,
0.0160675048828125,
-0.0015039443969726562,
0.016448974609375,
0.054962158203125,
-0.00374603271484375,
-0.0173187255859375,
-0.0916748046875,
0.051483154296875,
0.02490234375,
-0.004894256591796875,
0.0102081298828125,
-0.005767822265625,
-0.02130126953125,
0.017425537109375,
-0.008575439453125,
-0.01611328125,
0.0390625,
0.023162841796875,
0.0189056396484375,
0.0143890380859375,
-0.00655364990234375,
0.0168304443359375,
-0.0159454345703125,
0.0287017822265625,
0.0006880760192871094,
-0.0218353271484375,
-0.03436279296875,
0.0271759033203125,
-0.0051422119140625,
0.030975341796875,
-0.01245880126953125,
0.02862548828125,
-0.0283050537109375,
0.10015869140625,
-0.015411376953125,
0.006755828857421875,
0.01262664794921875,
-0.06158447265625,
-0.01055145263671875,
-0.005863189697265625,
-0.0269012451171875,
-0.01374053955078125,
0.00998687744140625,
-0.01000213623046875,
0.0251617431640625,
-0.004070281982421875,
-0.01332855224609375,
-0.004245758056640625,
0.03277587890625,
0.006145477294921875,
-0.007717132568359375,
-0.04058837890625,
-0.0222015380859375,
-0.0223236083984375,
-0.006591796875,
0.0186004638671875,
0.05096435546875,
0.08099365234375,
0.0162506103515625,
-0.00547027587890625,
0.01166534423828125,
0.056060791015625,
-0.04742431640625,
-0.09039306640625,
-0.0186767578125,
-0.024871826171875,
0.035858154296875,
-0.0164947509765625,
-0.046966552734375,
0.027435302734375,
-0.01055145263671875,
0.036773681640625,
0.037750244140625,
-0.02880859375,
0.004993438720703125,
0.03753662109375,
0.0177154541015625,
-0.06402587890625,
0.02178955078125,
-0.042266845703125,
0.01102447509765625,
0.0081939697265625,
0.08160400390625,
-0.03485107421875,
-0.053802490234375,
0.0201263427734375,
-0.06829833984375,
-0.037109375,
-0.006946563720703125,
0.031768798828125,
0.0213623046875,
-0.0188751220703125,
0.0120697021484375,
0.01409149169921875,
0.058013916015625,
0.005344390869140625,
-0.026458740234375,
-0.031341552734375,
-0.0002892017364501953,
-0.006526947021484375,
-0.007289886474609375,
-0.018280029296875,
-0.0292816162109375,
0.0291748046875,
-0.024932861328125,
-0.0274505615234375,
-0.0638427734375,
-0.01324462890625,
-0.01134490966796875,
0.018798828125,
0.0199127197265625,
-0.03619384765625,
0.013092041015625,
-0.0164031982421875,
-0.0040435791015625,
-0.0007839202880859375,
0.021514892578125,
0.0321044921875,
0.0079345703125,
0.0279998779296875,
-0.03631591796875,
-0.04449462890625,
-0.03668212890625,
-0.01482391357421875,
0.0214691162109375,
-0.017486572265625,
0.02166748046875,
0.0176849365234375,
0.0209808349609375,
0.00428009033203125,
0.0020465850830078125,
-0.00890350341796875,
0.019989013671875,
0.00843048095703125,
0.029022216796875,
-0.0107269287109375,
0.052276611328125,
-0.06195068359375,
0.049468994140625,
-0.01092529296875,
0.024200439453125,
0.0019474029541015625,
-0.014739990234375,
-0.00847625732421875,
-0.059967041015625,
-0.034912109375,
0.0033359527587890625,
-0.048919677734375,
0.069091796875,
0.06646728515625,
-0.0007300376892089844,
0.00905609130859375,
-0.00594329833984375,
0.004367828369140625,
-0.00185394287109375,
0.015777587890625,
-0.01157379150390625,
-0.02093505859375,
0.037322998046875,
0.01094818115234375,
0.033538818359375,
-0.005401611328125,
-0.010498046875,
-0.0099945068359375,
-0.005626678466796875,
0.0106201171875,
-0.004070281982421875,
-0.00531768798828125,
0.01168060302734375,
0.032806396484375,
-0.0251007080078125,
0.0084686279296875,
0.02471923828125,
-0.01517486572265625,
0.004283905029296875,
0.051116943359375,
-0.016937255859375,
-0.0347900390625,
0.0826416015625,
0.02227783203125,
-0.0452880859375,
0.0222930908203125,
-0.04034423828125,
-0.0223388671875,
0.0226593017578125,
0.0132293701171875,
-0.05426025390625,
0.017425537109375,
0.01361846923828125,
0.003093719482421875,
-0.004306793212890625,
0.0005474090576171875,
0.01824951171875,
0.0223541259765625,
0.00836181640625,
-0.0022449493408203125,
-0.01617431640625,
-0.0167999267578125,
-0.00600433349609375,
-0.0077972412109375,
-0.006107330322265625,
0.0251617431640625,
0.006740570068359375,
-0.031524658203125,
-0.0030574798583984375,
0.0287322998046875,
0.0022106170654296875,
-0.055145263671875,
-0.0171661376953125,
0.01367950439453125,
-0.02227783203125,
-0.046295166015625,
0.0293731689453125,
-0.053558349609375,
0.0460205078125,
-0.036376953125,
0.022491455078125,
0.043731689453125,
0.0310516357421875,
-0.006481170654296875,
-0.012725830078125,
-0.005184173583984375,
0.048370361328125,
-0.0244903564453125,
-0.011627197265625,
0.01389312744140625,
0.0124664306640625,
-0.0191497802734375,
0.01343536376953125,
-0.0333251953125,
-0.0262603759765625,
-0.019683837890625,
-0.023529052734375,
0.0831298828125,
-0.0034542083740234375,
-0.025634765625,
-0.002651214599609375,
-0.0202484130859375,
-0.0013132095336914062,
-0.019744873046875,
0.00507354736328125,
-0.04254150390625,
-0.005413055419921875,
-0.0157928466796875,
-0.0303192138671875,
-0.0150604248046875,
-0.049957275390625,
-0.012054443359375,
0.102294921875,
0.003520965576171875,
-0.0447998046875,
-0.01215362548828125,
0.0777587890625,
-0.0010404586791992188,
0.0751953125,
-0.0293426513671875,
0.072021484375,
0.042999267578125,
0.005779266357421875,
-0.0195770263671875,
-0.01007843017578125,
0.00463104248046875,
-0.00440216064453125,
-0.01220703125,
-0.00457763671875,
-0.021942138671875,
-0.0103302001953125,
0.03131103515625,
0.034271240234375,
0.0160980224609375,
0.0109405517578125,
0.0153045654296875,
0.08984375,
0.08184814453125,
-0.100341796875,
0.01003265380859375,
0.03118896484375,
0.01885986328125,
0.039306640625,
0.0132293701171875,
0.01543426513671875,
-0.037445068359375,
-0.01195526123046875,
-0.047393798828125,
-0.01641845703125,
0.04559326171875,
0.0188140869140625,
0.016021728515625,
0.053131103515625,
0.046630859375,
-0.0252532958984375,
0.0118865966796875,
-0.0279541015625,
0.053680419921875,
0.0062103271484375,
0.01302337646484375,
0.0240020751953125,
0.01110076904296875,
0.06884765625,
0.00408172607421875,
0.00952911376953125,
0.0301666259765625,
0.0133819580078125,
-0.0399169921875,
-0.00909423828125,
0.0215606689453125,
-0.00949859619140625,
0.0021209716796875,
0.031829833984375,
-0.037445068359375,
-0.0017023086547851562,
-0.0180206298828125,
-0.0064849853515625,
-0.0194854736328125,
0.017425537109375,
-0.0158233642578125,
0.0289306640625,
0.00801849365234375,
-0.0171356201171875,
0.021728515625,
-0.047210693359375,
-0.007274627685546875,
-0.023223876953125,
-0.00289154052734375,
0.0021076202392578125,
0.07513427734375,
0.0106048583984375,
-0.01155853271484375,
-0.017578125,
0.016693115234375,
0.046661376953125,
0.01105499267578125,
0.0037593841552734375,
-0.05181884765625,
-0.01152801513671875,
-0.056915283203125,
0.03173828125,
0.0234222412109375,
0.08245849609375,
-0.045501708984375,
0.041107177734375,
0.033538818359375,
0.0292205810546875,
-0.020751953125,
0.042510986328125,
0.056671142578125,
0.043914794921875,
-0.0222015380859375,
-0.0295562744140625,
0.0224456787109375,
-0.0297088623046875,
-0.020050048828125,
-0.050750732421875,
-0.054473876953125,
-0.03778076171875,
-0.032196044921875,
0.00714111328125,
0.0341796875,
-0.05419921875,
-0.041046142578125,
0.02777099609375,
0.004283905029296875,
-0.023956298828125,
0.05426025390625,
-0.0251617431640625,
0.086181640625,
0.0014181137084960938,
-0.0836181640625,
-0.0047454833984375,
-0.03326416015625,
-0.050445556640625,
0.0223388671875,
0.0260467529296875,
-0.048248291015625,
0.036529541015625,
-0.034515380859375,
0.0300445556640625,
0.0184783935546875,
-0.02349853515625,
-0.030609130859375,
0.05621337890625,
0.04803466796875,
0.01047515869140625,
-0.00540924072265625,
-0.003147125244140625,
-0.01187896728515625,
0.041656494140625,
0.0259552001953125,
0.0665283203125,
-0.0156402587890625,
0.03704833984375,
0.00922393798828125,
0.002010345458984375,
-0.00347900390625,
-0.00862884521484375,
0.0307159423828125,
-0.0242767333984375,
0.005321502685546875,
-0.000537872314453125,
-0.01824951171875,
0.031646728515625,
-0.0062408447265625,
-0.0298919677734375,
-0.01105499267578125,
-0.016143798828125,
0.0110321044921875,
0.025604248046875,
0.007061004638671875,
-0.0276031494140625,
-0.0323486328125,
-0.0245361328125,
0.0001112222671508789,
0.0248260498046875,
0.018218994140625,
-0.03253173828125,
0.07086181640625,
-0.0155181884765625,
0.0279083251953125,
0.0226898193359375,
-0.057586669921875,
0.03131103515625,
0.0313720703125,
-0.0282745361328125,
0.019622802734375,
0.044158935546875,
-0.0139617919921875,
0.0286102294921875,
0.0233154296875,
-0.0003917217254638672,
0.047943115234375,
-0.03411865234375,
0.017608642578125,
0.057281494140625,
0.04583740234375,
-0.0205535888671875,
0.0194244384765625,
0.024078369140625,
-0.023773193359375,
0.02069091796875,
-0.0167694091796875,
-0.01849365234375,
-0.01152801513671875,
-0.00237274169921875,
0.0238494873046875,
0.005603790283203125,
0.0011749267578125,
-0.0300750732421875,
-0.01291656494140625,
-0.010345458984375,
-0.01425933837890625,
-0.007049560546875,
-0.0223846435546875,
0.00189971923828125,
0.0246429443359375,
-0.03790283203125,
0.0179595947265625,
-0.00949859619140625,
0.01169586181640625,
-0.0230560302734375,
0.04217529296875,
-0.0225067138671875,
-0.01200103759765625,
0.0247344970703125,
-0.0127410888671875,
0.00489044189453125,
0.0115203857421875,
-0.02130126953125,
-0.0439453125,
-0.016754150390625,
0.00592041015625,
-0.00679779052734375,
-0.0180816650390625,
0.0181427001953125,
-0.0016183853149414062,
0.001506805419921875,
-0.0533447265625,
-0.0172576904296875,
-0.01087188720703125,
0.020660400390625,
0.026763916015625,
-0.0010232925415039062,
0.0169830322265625,
-0.02069091796875,
-0.03656005859375,
0.03948974609375,
0.0114593505859375,
-0.0274200439453125,
-0.047607421875,
0.01751708984375,
0.021728515625,
-0.056060791015625,
-0.03424072265625,
-0.0261383056640625,
-0.03240966796875,
0.008453369140625,
-0.0095672607421875,
0.07586669921875,
0.00928497314453125,
-0.01226806640625,
-0.004680633544921875,
-0.0167388916015625,
-0.036529541015625,
-0.01396942138671875,
0.07415771484375,
-0.05206298828125,
0.073974609375,
0.063232421875,
-0.04864501953125,
0.008148193359375,
-0.03076171875,
-0.042022705078125,
-0.00830078125,
-0.0005311965942382812,
-0.0206146240234375,
0.003387451171875,
0.046234130859375,
0.07952880859375,
0.01038360595703125,
-0.041290283203125,
0.047821044921875,
0.00913238525390625,
-0.0121917724609375,
0.036376953125,
-0.0030002593994140625,
0.0196685791015625,
0.017486572265625,
-0.0178985595703125,
0.01007843017578125,
-0.016998291015625,
-0.044525146484375,
-0.0087890625,
-0.020355224609375,
-0.0150909423828125,
0.01837158203125,
-0.0178985595703125,
0.004985809326171875,
0.06719970703125,
-0.049285888671875,
-0.033294677734375,
0.029205322265625,
-0.00006145238876342773,
-0.0039215087890625,
0.0016393661499023438,
0.01007080078125,
0.0269927978515625,
-0.08477783203125,
-0.0006990432739257812,
-0.021697998046875,
0.07421875,
-0.06982421875,
-0.02294921875,
-0.0016078948974609375,
0.047119140625,
-0.0016765594482421875,
0.053924560546875,
-0.02398681640625,
0.0863037109375,
0.032562255859375,
0.0328369140625,
-0.01061248779296875,
0.002841949462890625,
-0.00995635986328125,
0.0330810546875,
0.008819580078125,
-0.02490234375,
0.06182861328125,
-0.042999267578125,
0.0168609619140625,
-0.0164337158203125,
0.034759521484375,
0.0031719207763671875,
0.0019168853759765625,
-0.020721435546875,
-0.00695037841796875,
0.006717681884765625
] |
91c72833d09949aa9869c314d86d8a59ed096ab7
|
Wordpress Stackexchange
Q: Wordpress as College Application System (Embark) Anyone knows of any plugin or anyone has been using WordPress to serve as a College Application system similar to those by Embark?
If not, I'm looking for idea of using current plugins to accomplish this.
The system would allow students to create an account, upload their documents, check their status, invite people to submit a letter of recommendation.
The admin would then be able to manage those applications, change the status, notify the applicants.
A: I've not heard of any plugin that currently provides this functionality. This sounds like a perfect opportunity for custom WP development - either you hiring someone to code this for you (which could then be very useful to others desiring the same functionality), or someone in the WP community spontaneously filling a need ;-)
I've been customizing Wordpress lately to serve as a web app for all sorts of purposes I couldn't have imagined just a year ago. What you want might not exist yet, but it's totally doable...
|
Q: Wordpress as College Application System (Embark) Anyone knows of any plugin or anyone has been using WordPress to serve as a College Application system similar to those by Embark?
If not, I'm looking for idea of using current plugins to accomplish this.
The system would allow students to create an account, upload their documents, check their status, invite people to submit a letter of recommendation.
The admin would then be able to manage those applications, change the status, notify the applicants.
A: I've not heard of any plugin that currently provides this functionality. This sounds like a perfect opportunity for custom WP development - either you hiring someone to code this for you (which could then be very useful to others desiring the same functionality), or someone in the WP community spontaneously filling a need ;-)
I've been customizing Wordpress lately to serve as a web app for all sorts of purposes I couldn't have imagined just a year ago. What you want might not exist yet, but it's totally doable...
A: If you're looking to take user-submitted content and make something useful of it, TDO Mini Forms (free) and Gravity Forms (commercial, starts at $39) are very good places to start. Simply create a form and start collecting responses.
|
wordpress
|
{
"language": "en",
"length": 211,
"provenance": "stackexchange_00019.jsonl.gz:407679",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11816"
}
|
[
0.004192352294921875,
0.00237274169921875,
-0.0014743804931640625,
0.0631103515625,
-0.00748443603515625,
-0.03118896484375,
0.10107421875,
-0.03857421875,
0.01375579833984375,
0.0181121826171875,
-0.037933349609375,
0.01476287841796875,
-0.03717041015625,
-0.01215362548828125,
-0.01605224609375,
-0.033660888671875,
-0.01242828369140625,
-0.007068634033203125,
-0.0203704833984375,
-0.049407958984375,
0.0196075439453125,
-0.05010986328125,
-0.0184173583984375,
-0.0187530517578125,
0.03350830078125,
0.0616455078125,
-0.0274658203125,
0.0120697021484375,
0.00833892822265625,
0.0142669677734375,
0.0189361572265625,
-0.045257568359375,
0.038330078125,
0.0239410400390625,
-0.0621337890625,
-0.0031642913818359375,
-0.0152435302734375,
-0.0079803466796875,
-0.0298004150390625,
0.04302978515625,
0.040130615234375,
-0.04058837890625,
0.005664825439453125,
0.0162811279296875,
0.01358795166015625,
-0.047943115234375,
0.0587158203125,
-0.05291748046875,
0.03619384765625,
-0.021026611328125,
-0.024566650390625,
0.0296173095703125,
-0.00559234619140625,
-0.05926513671875,
0.0033321380615234375,
0.046630859375,
-0.0103607177734375,
0.05401611328125,
-0.01447296142578125,
-0.0049896240234375,
0.0007343292236328125,
0.058837890625,
-0.0025386810302734375,
0.0533447265625,
-0.025390625,
-0.0028324127197265625,
-0.071533203125,
0.0004851818084716797,
0.00870513916015625,
-0.016448974609375,
0.00513458251953125,
-0.019805908203125,
-0.0110931396484375,
-0.00511932373046875,
-0.019134521484375,
-0.019317626953125,
0.03582763671875,
-0.02142333984375,
-0.0010976791381835938,
0.024383544921875,
0.0021572113037109375,
-0.04248046875,
-0.042724609375,
-0.034759521484375,
0.02569580078125,
-0.00038909912109375,
-0.007328033447265625,
0.002033233642578125,
-0.027984619140625,
0.004058837890625,
-0.0226593017578125,
-0.044952392578125,
0.006999969482421875,
0.0227508544921875,
-0.0208892822265625,
0.0113372802734375,
0.03790283203125,
-0.00811004638671875,
0.0213470458984375,
-0.0025787353515625,
0.045135498046875,
-0.06561279296875,
0.03546142578125,
0.010986328125,
-0.006954193115234375,
0.0750732421875,
0.032196044921875,
-0.0007071495056152344,
-0.0165557861328125,
-0.02099609375,
-0.012939453125,
-0.0244293212890625,
0.02337646484375,
0.0101776123046875,
-0.0258941650390625,
-0.0291290283203125,
-0.0173797607421875,
0.00937652587890625,
-0.0135040283203125,
0.004665374755859375,
-0.007373809814453125,
0.0130462646484375,
0.0210723876953125,
-0.00010401010513305664,
-0.02215576171875,
-0.03009033203125,
-0.0010423660278320312,
-0.03173828125,
0.024200439453125,
-0.047515869140625,
-0.01708984375,
0.054534912109375,
0.0276641845703125,
0.007396697998046875,
-0.0168304443359375,
0.01580810546875,
0.0263519287109375,
0.03924560546875,
0.01849365234375,
-0.0272674560546875,
-0.00934600830078125,
0.01515960693359375,
0.033233642578125,
-0.01273345947265625,
0.007198333740234375,
0.006389617919921875,
0.0280303955078125,
0.03204345703125,
-0.01690673828125,
-0.0167999267578125,
0.0091400146484375,
0.004547119140625,
0.0021266937255859375,
0.01629638671875,
0.0208587646484375,
0.02117919921875,
0.018585205078125,
-0.0178070068359375,
-0.0106964111328125,
0.0191192626953125,
-0.0007128715515136719,
-0.0068817138671875,
0.00334930419921875,
-0.02044677734375,
-0.01495361328125,
0.0037822723388671875,
-0.03717041015625,
0.00977325439453125,
0.0189361572265625,
-0.00399017333984375,
0.040924072265625,
-0.01148223876953125,
0.0203857421875,
0.00571441650390625,
0.0027008056640625,
0.0098114013671875,
0.001007080078125,
-0.000888824462890625,
0.0504150390625,
-0.0017156600952148438,
-0.02471923828125,
-0.0302276611328125,
0.10357666015625,
-0.049591064453125,
-0.014251708984375,
0.0163421630859375,
0.018768310546875,
0.00675201416015625,
-0.0169830322265625,
0.01061248779296875,
0.0273284912109375,
0.06427001953125,
0.01421356201171875,
0.03521728515625,
-0.039642333984375,
-0.047088623046875,
-0.008636474609375,
0.025390625,
-0.0347900390625,
-0.008087158203125,
-0.05975341796875,
0.03338623046875,
-0.01087188720703125,
0.0352783203125,
0.037811279296875,
0.0157318115234375,
-0.00899505615234375,
0.032989501953125,
-0.01531219482421875,
0.0244598388671875,
0.01222991943359375,
0.04150390625,
-0.042755126953125,
-0.0296173095703125,
0.00342559814453125,
0.0205841064453125,
-0.0222930908203125,
-0.01287078857421875,
-0.004180908203125,
-0.01222991943359375,
0.0224151611328125,
-0.0006861686706542969,
0.002658843994140625,
0.03515625,
-0.01509857177734375,
0.0272216796875,
-0.0285186767578125,
0.024658203125,
-0.0128631591796875,
0.0093536376953125,
0.043182373046875,
0.00652313232421875,
0.01383209228515625,
-0.00835418701171875,
-0.03692626953125,
-0.0174713134765625,
-0.03497314453125,
-0.0836181640625,
0.0166778564453125,
0.082275390625,
0.03338623046875,
0.0323486328125,
-0.0175323486328125,
-0.01416778564453125,
0.03387451171875,
-0.056243896484375,
0.00997161865234375,
-0.01222991943359375,
-0.037384033203125,
0.01508331298828125,
-0.017608642578125,
0.040191650390625,
0.0185546875,
0.02508544921875,
-0.0231475830078125,
0.03741455078125,
-0.0258636474609375,
-0.02001953125,
0.02679443359375,
-0.036376953125,
0.0084991455078125,
-0.04901123046875,
-0.0220184326171875,
-0.0195770263671875,
-0.037811279296875,
-0.0157012939453125,
0.01337432861328125,
0.01389312744140625,
0.00196075439453125,
-0.05084228515625,
0.027130126953125,
0.038787841796875,
0.00604248046875,
0.00284576416015625,
0.0098114013671875,
0.003246307373046875,
-0.02532958984375,
-0.00864410400390625,
0.00807952880859375,
-0.0037059783935546875,
-0.016204833984375,
-0.0225830078125,
-0.0305633544921875,
-0.007389068603515625,
0.0172576904296875,
-0.053558349609375,
0.00624847412109375,
0.007110595703125,
0.01934814453125,
-0.01287078857421875,
0.0179595947265625,
0.00701904296875,
-0.025238037109375,
0.054840087890625,
0.0173187255859375,
-0.044525146484375,
-0.00554656982421875,
-0.01123046875,
0.011444091796875,
-0.0191802978515625,
0.01319122314453125,
0.05035400390625,
0.013946533203125,
-0.03204345703125,
-0.005413055419921875,
0.037384033203125,
-0.0095672607421875,
-0.0002849102020263672,
-0.0182952880859375,
-0.034454345703125,
-0.0084991455078125,
-0.0033359527587890625,
0.007740020751953125,
0.03936767578125,
0.0020351409912109375,
-0.04443359375,
0.0209808349609375,
0.021331787109375,
-0.01258087158203125,
-0.040863037109375,
-0.04840087890625,
-0.06060791015625,
0.0367431640625,
-0.02093505859375,
-0.00493621826171875,
-0.004688262939453125,
0.00830841064453125,
0.0229949951171875,
-0.06195068359375,
0.013153076171875,
-0.018524169921875,
-0.07421875,
-0.054840087890625,
-0.0231170654296875,
0.000286102294921875,
0.043212890625,
0.0189361572265625,
-0.030059814453125,
0.0025959014892578125,
-0.0016431808471679688,
0.00865936279296875,
0.036895751953125,
-0.0194549560546875,
-0.055877685546875,
0.004795074462890625,
-0.038330078125,
0.0193023681640625,
-0.02001953125,
0.0170440673828125,
0.020111083984375,
0.0012454986572265625,
0.0007176399230957031,
0.002796173095703125,
-0.00446319580078125,
-0.038909912109375,
-0.01947021484375,
0.029876708984375,
-0.0330810546875,
-0.0748291015625,
-0.0682373046875,
0.05096435546875,
0.0035152435302734375,
0.00237274169921875,
-0.0406494140625,
-0.017181396484375,
-0.031951904296875,
-0.0008344650268554688,
-0.035125732421875,
-0.047119140625,
-0.018524169921875,
0.005367279052734375,
-0.0474853515625,
0.04644775390625,
-0.0268096923828125,
-0.03973388671875,
0.01415252685546875,
-0.0047454833984375,
-0.0300445556640625,
0.01393890380859375,
-0.0163116455078125,
-0.007083892822265625,
-0.0253753662109375,
0.040679931640625,
-0.0458984375,
-0.09521484375,
0.06329345703125,
-0.0223388671875,
0.007678985595703125,
-0.049530029296875,
-0.035888671875,
0.019561767578125,
0.1219482421875,
-0.032745361328125,
0.00528717041015625,
0.02081298828125,
0.0011930465698242188,
-0.0111846923828125,
0.0128021240234375,
-0.06915283203125,
-0.019073486328125,
0.0006709098815917969,
0.0096893310546875,
-0.0132293701171875,
-0.0245361328125,
-0.0186004638671875,
-0.06317138671875,
-0.015228271484375,
-0.0185394287109375,
0.00966644287109375,
-0.045440673828125,
-0.0079345703125,
0.0002589225769042969,
0.01239013671875,
-0.0831298828125,
0.028900146484375,
-0.0450439453125,
-0.048370361328125,
-0.0023097991943359375,
0.0230255126953125,
0.023773193359375,
-0.0306549072265625,
0.0168304443359375,
-0.01617431640625,
0.03619384765625,
0.01446533203125,
0.03216552734375,
-0.001613616943359375,
-0.00047016143798828125,
0.0010251998901367188,
-0.01367950439453125,
-0.0024890899658203125,
-0.0089569091796875,
-0.0211334228515625,
-0.05889892578125,
-0.0212860107421875,
-0.033966064453125,
-0.018280029296875,
-0.004444122314453125,
-0.0141448974609375,
-0.006008148193359375,
-0.00015425682067871094,
-0.024383544921875,
-0.01715087890625,
0.02545166015625,
0.0038890838623046875,
-0.0023651123046875,
-0.0306549072265625,
-0.0088043212890625,
-0.031280517578125,
0.006591796875,
-0.0246124267578125,
0.035552978515625,
0.027587890625,
0.042694091796875,
-0.0021610260009765625,
-0.05975341796875,
0.00041675567626953125,
0.0145263671875,
0.0034389495849609375,
0.0428466796875,
0.006938934326171875,
-0.01497650146484375,
0.06768798828125,
-0.002674102783203125,
-0.01305389404296875,
0.0400390625,
-0.0343017578125,
0.0389404296875,
0.0018939971923828125,
-0.01568603515625,
0.048553466796875,
-0.01494598388671875,
0.0221099853515625,
0.0007801055908203125,
-0.0186004638671875,
-0.0015869140625,
0.01392364501953125,
-0.0250701904296875,
0.0199737548828125,
0.0021572113037109375,
-0.0038127899169921875,
0.01332855224609375,
-0.02093505859375,
-0.034942626953125,
-0.024932861328125,
0.0047454833984375,
-0.0731201171875,
-0.048126220703125,
-0.025970458984375,
-0.0305938720703125,
-0.01461029052734375,
-0.01311492919921875,
-0.006893157958984375,
0.01003265380859375,
-0.0156707763671875,
-0.0249176025390625,
-0.0093841552734375,
0.07135009765625,
0.0034046173095703125,
-0.052581787109375,
0.01119232177734375,
-0.0207366943359375,
-0.0252532958984375,
0.01019287109375,
-0.0225067138671875,
0.0213775634765625,
0.04461669921875,
0.0177459716796875,
0.027923583984375,
-0.02191162109375,
0.0306854248046875,
-0.01849365234375,
-0.031280517578125,
-0.03704833984375,
0.0030384063720703125,
-0.01983642578125,
0.047149658203125,
-0.043914794921875,
0.034149169921875,
-0.0012178421020507812,
0.0218048095703125,
0.0196533203125,
0.00826263427734375,
0.03564453125,
-0.0225982666015625,
0.0161895751953125,
-0.048736572265625,
-0.012115478515625,
-0.0418701171875,
-0.0124969482421875,
-0.00031876564025878906,
0.046142578125,
-0.06494140625,
-0.05255126953125,
0.05926513671875,
-0.021636962890625,
-0.00994873046875,
0.01049041748046875,
-0.00763702392578125,
0.007755279541015625,
-0.04412841796875,
-0.03021240234375,
0.044830322265625,
0.0178070068359375,
0.007720947265625,
-0.0240325927734375,
0.00041103363037109375,
-0.0330810546875,
0.002506256103515625,
-0.047149658203125,
-0.0018253326416015625,
0.02252197265625,
0.041473388671875,
0.0186309814453125,
-0.00821685791015625,
-0.043914794921875,
-0.0313720703125,
-0.0197296142578125,
0.0203857421875,
0.060516357421875,
-0.0175933837890625,
0.0099639892578125,
-0.03131103515625,
0.005756378173828125,
-0.0316162109375,
-0.01092529296875,
0.0767822265625,
0.036407470703125,
-0.07135009765625,
-0.02783203125,
-0.025421142578125,
-0.023345947265625,
-0.044464111328125,
0.003971099853515625,
-0.045654296875,
0.043853759765625,
-0.0236053466796875,
-0.0011653900146484375,
-0.0154876708984375,
-0.033111572265625,
-0.002658843994140625,
0.0289306640625,
0.01526641845703125,
-0.0218963623046875,
0.0257720947265625,
0.03375244140625,
-0.006496429443359375,
0.06982421875,
0.039764404296875,
0.027557373046875,
-0.03289794921875,
-0.04449462890625,
-0.0133056640625,
-0.06024169921875,
-0.018707275390625,
0.00507354736328125,
0.013214111328125,
0.0777587890625,
0.048370361328125,
-0.0006551742553710938,
0.032440185546875,
-0.007476806640625,
0.0205535888671875,
0.001308441162109375,
-0.01113128662109375,
-0.01611328125,
-0.02642822265625,
0.059539794921875,
-0.02191162109375,
-0.0148468017578125,
0.01016998291015625,
0.0215301513671875,
-0.009429931640625,
-0.005092620849609375,
-0.005695343017578125,
-0.0106964111328125,
-0.0236663818359375,
0.051513671875,
0.0435791015625,
-0.022674560546875,
0.0175323486328125,
0.01287841796875,
-0.0029392242431640625,
0.001949310302734375,
-0.00624847412109375,
0.01739501953125,
0.00021207332611083984,
0.035064697265625,
-0.004123687744140625,
0.00669097900390625,
0.0252227783203125,
-0.017242431640625,
0.006511688232421875,
-0.0291900634765625,
-0.005725860595703125,
-0.0540771484375,
0.052490234375,
-0.0002620220184326172,
0.0213165283203125,
-0.0012788772583007812,
-0.0058135986328125,
0.0221710205078125,
0.014434814453125,
0.007110595703125,
0.019378662109375,
-0.0134735107421875,
0.015838623046875,
-0.00226593017578125,
0.01727294921875,
-0.042877197265625,
0.07958984375,
0.0235137939453125,
-0.06817626953125,
0.031341552734375,
0.040802001953125,
-0.0008635520935058594,
-0.035675048828125,
-0.0013170242309570312,
-0.018463134765625,
-0.025787353515625,
-0.0347900390625,
0.0157318115234375,
-0.035125732421875,
0.0233306884765625,
0.00887298583984375,
0.022216796875,
0.00356292724609375,
0.03021240234375,
-0.0035076141357421875,
-0.0112457275390625,
0.01491546630859375,
-0.0017919540405273438,
-0.0279388427734375,
-0.0237884521484375,
0.0126190185546875,
0.002227783203125,
-0.0007805824279785156,
0.0252685546875,
-0.00894927978515625,
-0.05108642578125,
0.0074615478515625,
0.031951904296875,
0.05145263671875,
-0.0122222900390625,
-0.022216796875,
0.0208587646484375,
-0.0099029541015625,
-0.0012197494506835938,
-0.024810791015625,
0.0027828216552734375,
-0.0794677734375,
-0.059539794921875,
-0.01348876953125,
-0.06591796875,
0.0028533935546875,
-0.0256500244140625,
-0.0369873046875,
0.09698486328125,
0.0217132568359375,
0.0089874267578125,
0.028717041015625,
0.040802001953125,
-0.048187255859375,
0.0116729736328125,
-0.0606689453125,
0.056793212890625,
0.0110321044921875,
0.0281219482421875,
-0.06005859375,
-0.0033321380615234375,
-0.00514984130859375,
-0.0016260147094726562,
-0.006801605224609375,
-0.0008482933044433594,
-0.036407470703125,
-0.00658416748046875,
0.0440673828125,
0.030517578125,
0.036468505859375,
0.0266876220703125,
0.017364501953125,
0.00397491455078125,
0.05120849609375,
-0.0174407958984375,
0.032196044921875,
0.000545501708984375,
0.0240631103515625,
0.026153564453125,
0.00980377197265625,
0.0035762786865234375,
-0.00464630126953125,
0.08746337890625,
-0.056854248046875,
-0.0104522705078125,
0.048187255859375,
-0.025726318359375,
-0.005168914794921875,
0.034698486328125,
0.01480865478515625,
-0.024444580078125,
0.01629638671875,
-0.04144287109375,
0.052490234375,
-0.020477294921875,
0.0091400146484375,
0.01605224609375,
0.010833740234375,
0.0263671875,
-0.037017822265625,
-0.004367828369140625,
0.01033782958984375,
-0.03363037109375,
0.008270263671875,
-0.00391387939453125,
0.01186370849609375,
-0.031646728515625,
-0.0010786056518554688,
0.0672607421875,
0.0282745361328125,
-0.0341796875,
-0.051971435546875,
0.00788116455078125,
0.00830841064453125,
0.03460693359375,
0.01499176025390625,
0.04876708984375,
-0.004756927490234375,
0.016998291015625,
0.0209503173828125,
-0.00931549072265625,
-0.0044708251953125,
-0.024566650390625,
0.007282257080078125,
0.01169586181640625,
0.0305023193359375,
0.0281829833984375,
0.0279541015625,
0.009552001953125,
0.022674560546875,
-0.0294189453125,
-0.047149658203125,
0.0109710693359375,
-0.0228424072265625,
0.03668212890625,
-0.034454345703125,
0.04791259765625,
0.0193023681640625,
0.040008544921875,
-0.034454345703125,
-0.005229949951171875,
0.0272369384765625,
0.036346435546875,
0.019317626953125,
0.0897216796875,
0.07501220703125,
0.043548583984375,
0.01068115234375,
-0.0020122528076171875,
0.0389404296875,
-0.0203094482421875,
-0.05194091796875,
-0.020233154296875,
-0.036407470703125,
0.02142333984375,
-0.026153564453125,
0.0159759521484375,
-0.004383087158203125,
0.026123046875,
0.012603759765625,
-0.01221466064453125,
0.01035308837890625,
-0.0297698974609375,
0.0208282470703125,
-0.0193023681640625,
0.0289306640625,
0.00260162353515625,
-0.1300048828125,
-0.029937744140625,
-0.043792724609375,
0.0250396728515625,
0.0118255615234375,
0.025665283203125,
-0.00904083251953125,
0.043731689453125,
0.01009368896484375,
0.00208282470703125,
0.043243408203125,
-0.0305328369140625,
-0.00821685791015625,
-0.031280517578125,
0.0172882080078125,
-0.0161895751953125,
-0.061920166015625,
-0.0184173583984375,
-0.021881103515625,
0.03125,
0.0122833251953125,
0.06256103515625,
-0.01087188720703125,
0.0014448165893554688,
0.021697998046875,
0.006610870361328125,
0.011871337890625,
0.002044677734375,
0.02972412109375,
-0.03143310546875,
0.0030460357666015625,
-0.00949859619140625,
-0.045562744140625,
0.0029888153076171875,
0.00353240966796875,
-0.043975830078125,
-0.006298065185546875,
-0.00785064697265625,
0.0182037353515625,
0.003307342529296875,
-0.02606201171875,
-0.032562255859375,
-0.061737060546875,
-0.022308349609375,
0.023223876953125,
-0.0037822723388671875,
0.03851318359375,
-0.00667572021484375,
0.0865478515625,
-0.0195770263671875,
-0.0011110305786132812,
0.004302978515625,
-0.07763671875,
-0.0130462646484375,
0.026824951171875,
0.0124053955078125,
-0.0178680419921875,
0.0209808349609375,
-0.006977081298828125,
-0.01242828369140625,
0.034393310546875,
0.0022754669189453125,
0.038604736328125,
-0.07489013671875,
0.0810546875,
0.031036376953125,
0.0634765625,
-0.0291900634765625,
0.01009368896484375,
0.04351806640625,
0.0069122314453125,
0.01306915283203125,
-0.07904052734375,
-0.05303955078125,
-0.06427001953125,
0.01398468017578125,
0.03485107421875,
-0.01184844970703125,
-0.0345458984375,
-0.0631103515625,
-0.00737762451171875,
-0.036865234375,
0.003620147705078125,
-0.026580810546875,
0.021484375,
0.00775909423828125,
-0.031494140625,
-0.01332855224609375,
0.040496826171875,
-0.013214111328125,
-0.024932861328125,
-0.0213623046875,
0.003116607666015625,
-0.01047515869140625,
0.032989501953125,
0.04058837890625,
0.0264434814453125,
0.049102783203125,
-0.05145263671875,
-0.056060791015625,
0.01313018798828125,
0.047515869140625,
0.0440673828125,
0.04766845703125,
-0.00604248046875,
0.0100250244140625,
0.017486572265625,
-0.0212554931640625,
-0.0309600830078125,
0.01104736328125,
-0.01226043701171875,
-0.0121917724609375,
-0.021240234375,
0.005466461181640625,
0.005664825439453125,
-0.0626220703125,
-0.1524658203125,
0.024505615234375,
-0.034149169921875,
-0.054595947265625,
-0.04547119140625,
0.03582763671875,
0.012481689453125,
-0.0212249755859375,
-0.01971435546875,
0.01262664794921875,
-0.000518798828125,
0.019439697265625,
0.0008130073547363281,
0.03680419921875,
-0.01073455810546875,
0.00482940673828125,
-0.0594482421875,
0.0079193115234375,
-0.0096588134765625,
-0.0070037841796875,
-0.0008082389831542969,
-0.00934600830078125,
0.033843994140625,
0.044769287109375,
-0.01030731201171875,
-0.0016345977783203125,
0.007427215576171875,
-0.058258056640625,
0.0137939453125,
-0.0386962890625,
-0.01464080810546875,
0.003387451171875,
0.004795074462890625,
0.046295166015625,
0.006618499755859375,
-0.026763916015625,
0.0019893646240234375,
-0.03857421875,
-0.03759765625,
-0.0335693359375,
0.020782470703125,
-0.0670166015625,
-0.016143798828125,
-0.0001837015151977539,
-0.0024089813232421875,
-0.0214691162109375,
0.0302276611328125,
-0.0225830078125,
-0.00878143310546875,
0.017364501953125,
-0.03955078125,
-0.021148681640625,
-0.0037975311279296875,
0.059478759765625,
-0.024749755859375,
0.0111236572265625,
0.0095977783203125,
0.00785064697265625,
0.02349853515625,
0.0218505859375,
0.0170440673828125,
-0.015838623046875,
-0.0232086181640625,
0.0251617431640625,
0.005046844482421875,
0.0289154052734375,
-0.0177764892578125,
-0.031402587890625,
-0.01268768310546875,
0.00949859619140625,
-0.0152740478515625,
0.007572174072265625,
-0.01346588134765625,
0.0325927734375,
0.0167083740234375,
0.0478515625,
-0.036712646484375,
-0.0772705078125,
-0.0215606689453125,
-0.006954193115234375,
-0.050628662109375,
0.042694091796875,
0.0242462158203125,
-0.0631103515625,
0.01239013671875,
0.0024814605712890625,
0.0104522705078125,
-0.01708984375,
0.0005459785461425781,
-0.029693603515625,
-0.0167999267578125,
0.004650115966796875
] |
e5a4fbc1a9ad0d9137fae9d8bf78c0d44efa6eaf
|
Wordpress Stackexchange
Q: how to limit search to post titles? Is there a way to limit search to post titles? I know I can modify query.php core file but there must be a way to do it with hooks right?
Thanks in advance!
A: Here's a filter that'll do the trick. Drop it into your theme's functions.php or a plugin.
/**
* Search SQL filter for matching against post title only.
*
* @link http://wordpress.stackexchange.com/a/11826/1685
*
* @param string $search
* @param WP_Query $wp_query
*/
function wpse_11826_search_by_title( $search, $wp_query ) {
if ( ! empty( $search ) && ! empty( $wp_query->query_vars['search_terms'] ) ) {
global $wpdb;
$q = $wp_query->query_vars;
$n = ! empty( $q['exact'] ) ? '' : '%';
$search = array();
foreach ( ( array ) $q['search_terms'] as $term )
$search[] = $wpdb->prepare( "$wpdb->posts.post_title LIKE %s", $n . $wpdb->esc_like( $term ) . $n );
if ( ! is_user_logged_in() )
$search[] = "$wpdb->posts.post_password = ''";
$search = ' AND ' . implode( ' AND ', $search );
}
return $search;
}
add_filter( 'posts_search', 'wpse_11826_search_by_title', 10, 2 );
Most of the code is just copied from the WP_Query class, except with the post_content LIKE's removed.
UPDATE: Removed deprecated like_escape() since 4.0
|
Q: how to limit search to post titles? Is there a way to limit search to post titles? I know I can modify query.php core file but there must be a way to do it with hooks right?
Thanks in advance!
A: Here's a filter that'll do the trick. Drop it into your theme's functions.php or a plugin.
/**
* Search SQL filter for matching against post title only.
*
* @link http://wordpress.stackexchange.com/a/11826/1685
*
* @param string $search
* @param WP_Query $wp_query
*/
function wpse_11826_search_by_title( $search, $wp_query ) {
if ( ! empty( $search ) && ! empty( $wp_query->query_vars['search_terms'] ) ) {
global $wpdb;
$q = $wp_query->query_vars;
$n = ! empty( $q['exact'] ) ? '' : '%';
$search = array();
foreach ( ( array ) $q['search_terms'] as $term )
$search[] = $wpdb->prepare( "$wpdb->posts.post_title LIKE %s", $n . $wpdb->esc_like( $term ) . $n );
if ( ! is_user_logged_in() )
$search[] = "$wpdb->posts.post_password = ''";
$search = ' AND ' . implode( ' AND ', $search );
}
return $search;
}
add_filter( 'posts_search', 'wpse_11826_search_by_title', 10, 2 );
Most of the code is just copied from the WP_Query class, except with the post_content LIKE's removed.
UPDATE: Removed deprecated like_escape() since 4.0
|
wordpress
|
{
"language": "en",
"length": 198,
"provenance": "stackexchange_00019.jsonl.gz:407682",
"question_score": "29",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11822"
}
|
[
0.046966552734375,
-0.003368377685546875,
0.050933837890625,
0.0732421875,
0.003963470458984375,
-0.02825927734375,
0.1153564453125,
-0.074462890625,
0.035919189453125,
0.006626129150390625,
-0.0572509765625,
0.0159454345703125,
-0.031646728515625,
-0.009368896484375,
-0.0194244384765625,
-0.026275634765625,
0.0116119384765625,
-0.026519775390625,
0.01322174072265625,
-0.029296875,
0.028045654296875,
-0.03204345703125,
0.03546142578125,
-0.0013093948364257812,
-0.0105438232421875,
-0.023406982421875,
0.133056640625,
-0.027435302734375,
0.03851318359375,
-0.0204925537109375,
0.0262908935546875,
-0.0443115234375,
0.01517486572265625,
0.0116119384765625,
0.0028133392333984375,
0.0218505859375,
-0.003963470458984375,
0.01488494873046875,
-0.0019664764404296875,
0.037628173828125,
0.02496337890625,
-0.00800323486328125,
-0.052642822265625,
0.025177001953125,
-0.022430419921875,
-0.05902099609375,
0.056915283203125,
0.0016412734985351562,
0.0247039794921875,
-0.0276947021484375,
-0.0016536712646484375,
0.01549530029296875,
0.028167724609375,
-0.07421875,
-0.0108184814453125,
0.0009908676147460938,
0.007171630859375,
-0.0169219970703125,
0.03369140625,
-0.0478515625,
-0.03729248046875,
-0.031707763671875,
0.02935791015625,
-0.00665283203125,
-0.005458831787109375,
0.0174560546875,
0.0587158203125,
-0.004718780517578125,
0.016632080078125,
-0.01033782958984375,
0.0016345977783203125,
0.0115203857421875,
0.0003600120544433594,
0.00341796875,
-0.017303466796875,
-0.0263214111328125,
0.005962371826171875,
-0.03857421875,
0.023345947265625,
0.0322265625,
-0.000012099742889404297,
-0.0271453857421875,
-0.024169921875,
-0.00757598876953125,
-0.00019466876983642578,
-0.0101318359375,
-0.0146331787109375,
0.01219940185546875,
0.0053253173828125,
-0.0440673828125,
-0.0023345947265625,
-0.006023406982421875,
-0.0447998046875,
0.014190673828125,
0.0008568763732910156,
-0.037078857421875,
0.038665771484375,
0.037750244140625,
-0.01137542724609375,
-0.0191802978515625,
0.0134735107421875,
-0.037841796875,
0.0010042190551757812,
-0.0121307373046875,
0.0255584716796875,
0.03741455078125,
-0.0242156982421875,
0.0028362274169921875,
0.04852294921875,
0.029052734375,
0.01537322998046875,
0.00250244140625,
-0.0286102294921875,
0.00799560546875,
-0.0533447265625,
0.0208587646484375,
-0.038543701171875,
-0.01113128662109375,
-0.006839752197265625,
0.0274658203125,
-0.00185394287109375,
-0.016510009765625,
0.03607177734375,
-0.0177459716796875,
0.0290679931640625,
0.01486968994140625,
-0.050689697265625,
-0.00553131103515625,
-0.0122222900390625,
0.036163330078125,
-0.004138946533203125,
-0.003627777099609375,
0.031341552734375,
0.035430908203125,
-0.014251708984375,
-0.0246429443359375,
-0.007228851318359375,
-0.002643585205078125,
-0.0186309814453125,
-0.034271240234375,
0.0406494140625,
0.00958251953125,
0.0144805908203125,
0.0022373199462890625,
0.029449462890625,
-0.01311492919921875,
0.007236480712890625,
0.045318603515625,
0.02691650390625,
-0.030853271484375,
0.037139892578125,
0.00911712646484375,
0.054229736328125,
0.018524169921875,
-0.07147216796875,
0.0006127357482910156,
0.038665771484375,
-0.0217742919921875,
-0.059234619140625,
-0.0643310546875,
0.0255126953125,
-0.0015001296997070312,
0.010284423828125,
-0.01175689697265625,
-0.02703857421875,
0.01293182373046875,
-0.0394287109375,
-0.001911163330078125,
-0.00518798828125,
-0.0117645263671875,
0.019378662109375,
0.0126800537109375,
-0.0121002197265625,
-0.0188140869140625,
-0.0203399658203125,
-0.027435302734375,
0.0082855224609375,
-0.004154205322265625,
0.0163726806640625,
0.028778076171875,
0.0056915283203125,
-0.026336669921875,
0.055511474609375,
-0.0264434814453125,
-0.04083251953125,
0.0050811767578125,
0.0213775634765625,
0.015594482421875,
-0.0026531219482421875,
0.0082855224609375,
0.0596923828125,
0.03460693359375,
-0.03326416015625,
-0.01123046875,
-0.0305938720703125,
-0.054534912109375,
-0.0024929046630859375,
-0.026885986328125,
-0.0189361572265625,
0.08465576171875,
0.05816650390625,
-0.01277923583984375,
0.0297393798828125,
-0.006916046142578125,
-0.04766845703125,
-0.0110931396484375,
-0.0200347900390625,
0.01024627685546875,
-0.00864410400390625,
0.02294921875,
0.035308837890625,
0.0071868896484375,
-0.030853271484375,
-0.00485992431640625,
-0.0231781005859375,
-0.01739501953125,
-0.006160736083984375,
0.003055572509765625,
0.01410675048828125,
-0.01163482666015625,
0.0293121337890625,
-0.01605224609375,
0.022369384765625,
0.03338623046875,
0.087158203125,
-0.01470184326171875,
0.0156402587890625,
-0.0176239013671875,
0.078125,
0.0276336669921875,
-0.052947998046875,
-0.008453369140625,
0.07598876953125,
0.07196044921875,
0.001529693603515625,
-0.002292633056640625,
0.0172271728515625,
-0.04998779296875,
-0.00366973876953125,
0.04547119140625,
0.0416259765625,
0.0589599609375,
0.0015811920166015625,
-0.0055084228515625,
0.05523681640625,
-0.06268310546875,
0.0008363723754882812,
-0.013916015625,
0.01119232177734375,
0.05078125,
-0.040130615234375,
0.004177093505859375,
0.031585693359375,
-0.0002465248107910156,
0.0025882720947265625,
0.043243408203125,
-0.00806427001953125,
0.03076171875,
-0.032440185546875,
-0.00787353515625,
-0.0014181137084960938,
-0.0231170654296875,
-0.0018024444580078125,
0.008636474609375,
0.01324462890625,
0.0187530517578125,
0.023773193359375,
0.0251007080078125,
-0.037445068359375,
0.0179901123046875,
0.02764892578125,
0.01204681396484375,
0.0123443603515625,
0.007228851318359375,
0.0025730133056640625,
0.0040130615234375,
-0.048187255859375,
0.030914306640625,
0.0083160400390625,
-0.01251220703125,
0.0201568603515625,
0.041229248046875,
0.01157379150390625,
-0.0105133056640625,
-0.014312744140625,
-0.059844970703125,
0.01287841796875,
0.0267791748046875,
-0.01514434814453125,
-0.03082275390625,
-0.01459503173828125,
0.04107666015625,
-0.006137847900390625,
0.03912353515625,
0.025238037109375,
-0.0037899017333984375,
-0.00843048095703125,
-0.06060791015625,
0.0528564453125,
-0.039337158203125,
0.055084228515625,
0.0714111328125,
-0.0166015625,
0.027862548828125,
-0.001903533935546875,
0.019134521484375,
-0.029266357421875,
0.0016775131225585938,
-0.0222930908203125,
0.008270263671875,
-0.10223388671875,
-0.023101806640625,
0.0229339599609375,
0.034332275390625,
0.028076171875,
-0.0218963623046875,
0.0247344970703125,
0.02777099609375,
-0.050140380859375,
-0.0728759765625,
0.00458526611328125,
-0.05364990234375,
0.00225067138671875,
-0.00818634033203125,
-0.01087188720703125,
-0.0096588134765625,
0.0065155029296875,
-0.004657745361328125,
-0.002429962158203125,
-0.00568389892578125,
-0.061126708984375,
-0.002681732177734375,
-0.045379638671875,
0.035614013671875,
-0.0267486572265625,
0.0075836181640625,
0.005687713623046875,
0.062408447265625,
0.0209503173828125,
-0.04156494140625,
0.0345458984375,
0.06964111328125,
-0.01178741455078125,
0.01885986328125,
0.0029621124267578125,
-0.026214599609375,
0.0110931396484375,
0.0102691650390625,
-0.0232086181640625,
-0.003795623779296875,
0.0201873779296875,
-0.01242828369140625,
0.0033512115478515625,
0.041961669921875,
0.047088623046875,
0.004245758056640625,
-0.0279388427734375,
0.0604248046875,
0.05230712890625,
-0.0029296875,
-0.02880859375,
-0.023834228515625,
-0.052734375,
0.00928497314453125,
0.0173187255859375,
0.0215301513671875,
-0.017181396484375,
0.0082855224609375,
0.0552978515625,
0.02911376953125,
-0.0271759033203125,
-0.01009368896484375,
0.046478271484375,
0.0291595458984375,
0.058563232421875,
-0.0232391357421875,
0.0019521713256835938,
-0.036712646484375,
0.045013427734375,
0.0102386474609375,
0.006954193115234375,
0.00363922119140625,
-0.01262664794921875,
-0.0241241455078125,
-0.0316162109375,
0.05157470703125,
0.020294189453125,
0.05621337890625,
-0.063720703125,
-0.06658935546875,
-0.04425048828125,
0.088623046875,
-0.08978271484375,
-0.0241851806640625,
-0.0199432373046875,
0.006885528564453125,
0.02532958984375,
-0.033447265625,
-0.0003006458282470703,
-0.0396728515625,
-0.11260986328125,
0.0272674560546875,
-0.0196990966796875,
-0.0214996337890625,
0.004608154296875,
-0.0243377685546875,
-0.02593994140625,
-0.047576904296875,
0.0287628173828125,
-0.0017747879028320312,
0.0267333984375,
-0.00742340087890625,
-0.0009441375732421875,
-0.01221466064453125,
-0.0247802734375,
-0.00736236572265625,
-0.0865478515625,
-0.0164337158203125,
0.0205230712890625,
0.0258026123046875,
-0.0211334228515625,
0.0024738311767578125,
-0.03802490234375,
0.03656005859375,
0.0213623046875,
0.0233001708984375,
0.01519775390625,
-0.037628173828125,
0.02984619140625,
0.05157470703125,
0.010223388671875,
-0.0029506683349609375,
-0.00135040283203125,
0.0000737309455871582,
-0.00934600830078125,
0.05084228515625,
-0.0156707763671875,
0.0251007080078125,
-0.0091552734375,
-0.01508331298828125,
-0.03765869140625,
-0.037200927734375,
-0.00083160400390625,
0.027191162109375,
-0.032501220703125,
0.016754150390625,
-0.037689208984375,
-0.06024169921875,
0.09625244140625,
0.055145263671875,
0.01178741455078125,
-0.0215606689453125,
0.07940673828125,
-0.004779815673828125,
-0.07501220703125,
-0.03179931640625,
-0.019012451171875,
0.0117034912109375,
0.00007802248001098633,
0.03216552734375,
-0.04302978515625,
-0.042999267578125,
0.11602783203125,
-0.037109375,
-0.02911376953125,
-0.0033550262451171875,
0.02178955078125,
-0.0019168853759765625,
-0.034210205078125,
0.01385498046875,
-0.02667236328125,
0.048736572265625,
0.029205322265625,
-0.0121917724609375,
-0.03692626953125,
0.01549530029296875,
0.05224609375,
-0.0164337158203125,
0.03558349609375,
-0.01555633544921875,
-0.037689208984375,
0.003910064697265625,
0.00362396240234375,
0.0007710456848144531,
0.00598907470703125,
0.00382232666015625,
-0.0194549560546875,
0.0038299560546875,
-0.00325775146484375,
-0.01326751708984375,
0.038116455078125,
-0.0150299072265625,
0.038787841796875,
-0.01323699951171875,
-0.01165771484375,
-0.032257080078125,
-0.0120391845703125,
0.059326171875,
-0.01262664794921875,
-0.029052734375,
0.0014715194702148438,
-0.0254364013671875,
0.0224456787109375,
0.017425537109375,
0.036224365234375,
0.0165863037109375,
0.0264434814453125,
-0.003692626953125,
0.003696441650390625,
-0.0204315185546875,
0.049407958984375,
-0.02947998046875,
0.0628662109375,
0.031341552734375,
-0.0027637481689453125,
0.0360107421875,
0.05255126953125,
-0.04266357421875,
0.06005859375,
-0.0080413818359375,
0.035797119140625,
0.027069091796875,
0.0181427001953125,
0.0033740997314453125,
-0.021820068359375,
0.01403045654296875,
0.0138702392578125,
0.0275726318359375,
-0.0024547576904296875,
-0.0280609130859375,
0.0002918243408203125,
-0.0244903564453125,
-0.0248870849609375,
0.016143798828125,
0.055755615234375,
0.046051025390625,
-0.01186370849609375,
-0.00336456298828125,
0.030181884765625,
0.005657196044921875,
-0.020904541015625,
-0.026519775390625,
0.00623321533203125,
0.03729248046875,
0.00110626220703125,
-0.0228118896484375,
-0.030242919921875,
-0.0198516845703125,
0.00038504600524902344,
-0.026611328125,
-0.007793426513671875,
0.003963470458984375,
-0.031494140625,
-0.013275146484375,
0.0188446044921875,
-0.018890380859375,
-0.0212249755859375,
-0.0079345703125,
-0.01137542724609375,
0.027008056640625,
-0.00867462158203125,
0.0826416015625,
-0.0272979736328125,
-0.0282135009765625,
0.0269317626953125,
0.017791748046875,
0.01128387451171875,
-0.00923919677734375,
-0.006969451904296875,
0.00374603271484375,
-0.048187255859375,
-0.023590087890625,
-0.025634765625,
-0.020660400390625,
-0.038543701171875,
-0.024627685546875,
0.010467529296875,
0.01110076904296875,
0.0184783935546875,
-0.0188446044921875,
-0.02276611328125,
0.0135040283203125,
0.0282745361328125,
0.0017576217651367188,
-0.0389404296875,
0.06280517578125,
0.0120391845703125,
0.02410888671875,
-0.007320404052734375,
0.0252227783203125,
0.0207366943359375,
-0.013153076171875,
0.0148162841796875,
-0.08197021484375,
-0.06121826171875,
0.01468658447265625,
-0.06658935546875,
0.0643310546875,
0.03643798828125,
-0.003360748291015625,
-0.0014972686767578125,
-0.00034499168395996094,
-0.007587432861328125,
-0.0151214599609375,
0.01163482666015625,
0.008575439453125,
0.01236724853515625,
0.0236663818359375,
-0.002197265625,
0.052490234375,
-0.04913330078125,
-0.018646240234375,
0.04046630859375,
-0.027679443359375,
0.0350341796875,
0.0106964111328125,
-0.01367950439453125,
0.0193023681640625,
0.02276611328125,
0.006500244140625,
0.024139404296875,
-0.004734039306640625,
0.00933837890625,
-0.019287109375,
-0.017242431640625,
-0.0232086181640625,
0.0176239013671875,
0.04534912109375,
-0.012359619140625,
-0.0163116455078125,
0.03570556640625,
-0.038726806640625,
-0.01386260986328125,
0.004425048828125,
0.016448974609375,
-0.00600433349609375,
-0.006591796875,
0.0170745849609375,
0.0030422210693359375,
-0.00032067298889160156,
0.0216064453125,
0.01364898681640625,
-0.020233154296875,
-0.004673004150390625,
-0.00337982177734375,
-0.0157623291015625,
-0.0098419189453125,
-0.0194091796875,
-0.0006365776062011719,
0.00789642333984375,
0.041015625,
0.00868988037109375,
-0.06182861328125,
-0.013702392578125,
0.0287322998046875,
0.00031375885009765625,
-0.0457763671875,
-0.003688812255859375,
0.014739990234375,
-0.042266845703125,
-0.114990234375,
-0.00193023681640625,
0.00887298583984375,
-0.01042938232421875,
0.0258026123046875,
0.033782958984375,
0.0279998779296875,
0.058258056640625,
0.006622314453125,
0.0168914794921875,
0.025909423828125,
0.0098724365234375,
-0.01470184326171875,
-0.0172882080078125,
-0.0214691162109375,
0.058258056640625,
-0.0252685546875,
0.0311279296875,
-0.018157958984375,
0.01081085205078125,
0.00015544891357421875,
-0.043548583984375,
0.0361328125,
-0.002216339111328125,
-0.0179290771484375,
-0.0045166015625,
0.019927978515625,
0.026458740234375,
-0.0014553070068359375,
-0.00727081298828125,
-0.0213775634765625,
-0.00015091896057128906,
-0.01184844970703125,
-0.0251617431640625,
0.01392364501953125,
-0.004486083984375,
-0.0270538330078125,
0.0240478515625,
-0.00106048583984375,
-0.002105712890625,
0.01380157470703125,
0.0187225341796875,
-0.0155029296875,
0.009124755859375,
-0.034271240234375,
0.083740234375,
-0.0219573974609375,
0.03692626953125,
-0.042877197265625,
0.00286102294921875,
0.0306854248046875,
0.014923095703125,
0.0265350341796875,
-0.007259368896484375,
-0.0195159912109375,
-0.0426025390625,
0.0268402099609375,
0.06805419921875,
0.01149749755859375,
0.01221466064453125,
0.01334381103515625,
0.031646728515625,
0.050689697265625,
-0.026580810546875,
0.04132080078125,
-0.0213775634765625,
0.0030727386474609375,
0.019439697265625,
0.0139007568359375,
0.0251922607421875,
-0.00830078125,
-0.0237884521484375,
-0.01067352294921875,
-0.00812530517578125,
0.01107025146484375,
-0.0298309326171875,
0.003204345703125,
0.02960205078125,
0.04840087890625,
-0.083251953125,
-0.029266357421875,
-0.036346435546875,
0.04376220703125,
0.0215606689453125,
0.05584716796875,
0.045501708984375,
0.024383544921875,
0.063232421875,
-0.01462554931640625,
0.0413818359375,
-0.01153564453125,
-0.0203857421875,
0.0166015625,
-0.0032806396484375,
0.0123291015625,
-0.05865478515625,
0.01519012451171875,
0.04486083984375,
0.046478271484375,
-0.0440673828125,
-0.034515380859375,
0.01416778564453125,
0.015869140625,
-0.01509857177734375,
-0.007144927978515625,
-0.0439453125,
0.0479736328125,
0.0928955078125,
-0.020599365234375,
0.0262603759765625,
0.046630859375,
0.00820159912109375,
-0.01282501220703125,
-0.0000749826431274414,
-0.035186767578125,
0.0232391357421875,
-0.0081939697265625,
0.00946807861328125,
0.01020050048828125,
0.037506103515625,
0.002040863037109375,
0.0301971435546875,
-0.05474853515625,
0.0031223297119140625,
0.0011377334594726562,
0.0177154541015625,
-0.014495849609375,
0.001316070556640625,
-0.038116455078125,
-0.0616455078125,
-0.0159759521484375,
0.03515625,
0.052154541015625,
0.00627899169921875,
0.0257720947265625,
-0.0016012191772460938,
-0.0192413330078125,
0.003818511962890625,
-0.0294342041015625,
-0.0247955322265625,
-0.01384735107421875,
-0.003665924072265625,
0.0247650146484375,
0.0244293212890625,
-0.002925872802734375,
-0.004825592041015625,
0.05206298828125,
-0.00624847412109375,
0.027740478515625,
0.0006060600280761719,
0.01715087890625,
-0.0218658447265625,
-0.0192108154296875,
0.00016033649444580078,
-0.003391265869140625,
0.0224761962890625,
-0.0858154296875,
-0.0039215087890625,
0.008453369140625,
-0.08709716796875,
0.01134490966796875,
0.042022705078125,
-0.0246124267578125,
-0.0107421875,
0.0259552001953125,
-0.04742431640625,
-0.0009226799011230469,
0.040283203125,
0.0099029541015625,
0.0290069580078125,
0.012847900390625,
0.0016460418701171875,
-0.0307769775390625,
-0.01238250732421875,
0.01451873779296875,
0.03515625,
-0.0119171142578125,
0.021270751953125,
-0.0174713134765625,
0.00296783447265625,
-0.02264404296875,
0.022125244140625,
-0.0229339599609375,
-0.01739501953125,
0.011199951171875,
-0.005218505859375,
0.01056671142578125,
-0.01085662841796875,
-0.035186767578125,
-0.005130767822265625,
0.034149169921875,
0.003810882568359375,
0.01372528076171875,
-0.044158935546875,
0.0338134765625,
-0.0237884521484375,
0.01146697998046875,
-0.0254974365234375,
0.024810791015625,
0.0038299560546875,
-0.04571533203125,
0.049346923828125,
0.0036144256591796875,
0.0162811279296875,
0.02239990234375,
-0.03277587890625,
-0.00010013580322265625,
0.0233306884765625,
-0.032501220703125,
0.0241546630859375,
0.041107177734375,
-0.06103515625,
0.0156707763671875,
0.006687164306640625,
-0.00501251220703125,
-0.0291595458984375,
0.04290771484375,
-0.0570068359375,
0.00765228271484375,
-0.036468505859375,
-0.060546875,
-0.014678955078125,
0.0249481201171875,
0.006717681884765625,
0.017608642578125,
-0.043548583984375,
-0.024078369140625,
-0.04302978515625,
-0.0081939697265625,
-0.023590087890625,
-0.0301666259765625,
-0.0301361083984375,
0.003704071044921875,
-0.0170745849609375,
-0.053131103515625,
-0.0260467529296875,
0.0134124755859375,
0.0159454345703125,
0.005626678466796875,
-0.030792236328125,
0.02960205078125,
-0.026397705078125,
-0.01255035400390625,
0.0208282470703125,
-0.003917694091796875,
0.0004906654357910156,
0.02691650390625,
-0.0218505859375,
-0.005523681640625,
-0.01346588134765625,
0.01026153564453125,
-0.01190185546875,
-0.01483154296875,
0.0182952880859375,
0.00921630859375,
-0.052520751953125,
-0.00982666015625,
-0.02838134765625,
0.0223541259765625,
-0.0019216537475585938,
-0.0166168212890625,
0.03265380859375,
0.0093536376953125,
-0.036041259765625,
-0.07623291015625,
-0.0014934539794921875,
-0.05419921875,
0.003345489501953125,
0.004871368408203125,
-0.0207366943359375,
-0.010711669921875,
-0.04339599609375,
-0.0770263671875,
0.06097412109375,
-0.01157379150390625,
-0.0265655517578125,
-0.072021484375,
0.0137481689453125,
0.013946533203125,
-0.0225830078125,
-0.0072174072265625,
-0.0259552001953125,
-0.057281494140625,
0.019012451171875,
0.01496124267578125,
0.02001953125,
-0.0086822509765625,
0.019012451171875,
-0.031951904296875,
0.0458984375,
0.033233642578125,
-0.01861572265625,
0.0031452178955078125,
-0.0004949569702148438,
0.0235595703125,
0.03125,
-0.044158935546875,
0.031036376953125,
-0.02752685546875,
-0.002285003662109375,
-0.0139923095703125,
-0.0275726318359375,
-0.0305328369140625,
-0.0001322031021118164,
0.055755615234375,
0.0660400390625,
0.0109100341796875,
-0.0460205078125,
0.0034656524658203125,
-0.007568359375,
-0.00965118408203125,
0.0091552734375,
0.00917816162109375,
-0.0199127197265625,
-0.007476806640625,
0.00229644775390625,
0.004581451416015625,
-0.0226593017578125,
-0.04193115234375,
-0.023712158203125,
-0.0281524658203125,
-0.0159912109375,
0.0186920166015625,
-0.0233154296875,
0.0207977294921875,
0.062286376953125,
-0.06024169921875,
-0.052398681640625,
0.00852203369140625,
0.00733184814453125,
-0.01666259765625,
-0.049713134765625,
-0.022064208984375,
0.02081298828125,
0.0223236083984375,
0.0049896240234375,
0.0174560546875,
-0.0137939453125,
0.00335693359375,
0.0251617431640625,
-0.03387451171875,
0.0252838134765625,
0.035919189453125,
0.0216522216796875,
-0.06805419921875,
0.0288238525390625,
0.01486968994140625,
0.045684814453125,
-0.0018787384033203125,
0.01132965087890625,
0.0209808349609375,
0.01342010498046875,
0.0005750656127929688,
-0.010101318359375,
0.039459228515625,
-0.040374755859375,
0.0189666748046875,
0.0032138824462890625,
0.01352691650390625,
0.003406524658203125,
-0.01207733154296875,
-0.0105133056640625,
-0.0095977783203125,
0.0061798095703125
] |
640b42f274566774fa22cd52103a0b4480a60718
|
Wordpress Stackexchange
Q: Remove path from the create/edit a post view Been fiddling around, trying to remove the "path" info that's shown when you create/edit a post in wordpress. Been able to remove word count and the saving draft info, but not the path thingie
This is what I'm talking about:
http://dl.dropbox.com/u/3618143/Sk%C3%A4rmavbild%202011-03-13%20kl.%2001.08.11.png
Also, the autosave-info that shows up on posts that's being edited. "Last edited by admin" etc. Can't seem to find that either.
Any ideas?
A: Use the filter tiny_mce_before_init to customise the default configuration;
function wpse_11867_tiny_mce( $config ) {
$config['theme_advanced_path'] = false;
return $config;
}
add_filter( 'tiny_mce_before_init', 'wpse_11867_tiny_mce' );
Check out all the options available on the Tiny MCE documentation.
|
Q: Remove path from the create/edit a post view Been fiddling around, trying to remove the "path" info that's shown when you create/edit a post in wordpress. Been able to remove word count and the saving draft info, but not the path thingie
This is what I'm talking about:
http://dl.dropbox.com/u/3618143/Sk%C3%A4rmavbild%202011-03-13%20kl.%2001.08.11.png
Also, the autosave-info that shows up on posts that's being edited. "Last edited by admin" etc. Can't seem to find that either.
Any ideas?
A: Use the filter tiny_mce_before_init to customise the default configuration;
function wpse_11867_tiny_mce( $config ) {
$config['theme_advanced_path'] = false;
return $config;
}
add_filter( 'tiny_mce_before_init', 'wpse_11867_tiny_mce' );
Check out all the options available on the Tiny MCE documentation.
|
wordpress
|
{
"language": "en",
"length": 110,
"provenance": "stackexchange_00019.jsonl.gz:407695",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11867"
}
|
[
-0.0124053955078125,
-0.0276641845703125,
-0.0283050537109375,
0.00445556640625,
-0.0245208740234375,
-0.03839111328125,
0.0400390625,
0.01445770263671875,
-0.00794219970703125,
0.00176239013671875,
0.01047515869140625,
-0.009918212890625,
-0.022613525390625,
-0.05377197265625,
0.032440185546875,
-0.0220947265625,
0.03125,
-0.0159149169921875,
0.054168701171875,
-0.007228851318359375,
-0.0080108642578125,
0.0164794921875,
0.07330322265625,
0.023895263671875,
0.0025119781494140625,
0.03399658203125,
0.05499267578125,
-0.0308990478515625,
-0.018768310546875,
-0.03851318359375,
0.01189422607421875,
0.01419830322265625,
0.01529693603515625,
0.01514434814453125,
-0.01387786865234375,
0.021392822265625,
-0.01000213623046875,
0.01152801513671875,
0.03179931640625,
-0.0185699462890625,
0.019989013671875,
-0.01053619384765625,
-0.00232696533203125,
-0.031494140625,
-0.035736083984375,
0.0089111328125,
0.01070404052734375,
0.004261016845703125,
0.017120361328125,
0.039276123046875,
-0.01126861572265625,
0.02545166015625,
-0.0130157470703125,
0.048583984375,
-0.00514984130859375,
-0.03125,
-0.034027099609375,
0.01873779296875,
0.01493072509765625,
-0.02435302734375,
0.01479339599609375,
0.003925323486328125,
0.027496337890625,
0.024322509765625,
-0.0233306884765625,
-0.008087158203125,
0.00031948089599609375,
0.0201263427734375,
-0.04974365234375,
-0.0455322265625,
0.033447265625,
-0.031280517578125,
0.006946563720703125,
-0.040191650390625,
-0.004764556884765625,
0.049468994140625,
-0.03460693359375,
0.0007281303405761719,
0.042449951171875,
-0.01184844970703125,
-0.0012273788452148438,
-0.01555633544921875,
0.006519317626953125,
-0.016937255859375,
0.0110015869140625,
0.01163482666015625,
-0.020050048828125,
0.0022373199462890625,
-0.0221405029296875,
0.0112457275390625,
-0.0225982666015625,
-0.0667724609375,
0.02288818359375,
0.036376953125,
-0.0361328125,
0.0276031494140625,
0.016265869140625,
0.005718231201171875,
-0.0212860107421875,
0.0007200241088867188,
-0.0015125274658203125,
-0.0303802490234375,
0.018218994140625,
-0.011322021484375,
0.007305145263671875,
0.0211334228515625,
-0.00629425048828125,
-0.01396942138671875,
0.0282440185546875,
0.01727294921875,
0.002471923828125,
0.013153076171875,
-0.048492431640625,
-0.0166015625,
-0.03497314453125,
0.051971435546875,
-0.04022216796875,
-0.01412200927734375,
-0.022552490234375,
0.020477294921875,
-0.016937255859375,
-0.0139617919921875,
-0.0183258056640625,
-0.005832672119140625,
0.038177490234375,
0.0011625289916992188,
-0.040679931640625,
0.04998779296875,
0.0270538330078125,
0.0174102783203125,
-0.047149658203125,
-0.0092620849609375,
0.06170654296875,
0.05023193359375,
0.023712158203125,
-0.0177154541015625,
-0.0118560791015625,
-0.0279998779296875,
-0.0306396484375,
0.039398193359375,
-0.0206451416015625,
-0.0338134765625,
0.007415771484375,
-0.016265869140625,
-0.06732177734375,
0.03948974609375,
0.01125335693359375,
0.0229644775390625,
-0.0190277099609375,
-0.07940673828125,
-0.036285400390625,
-0.0273284912109375,
0.023284912109375,
0.0184783935546875,
0.01056671142578125,
-0.024078369140625,
0.0372314453125,
-0.044342041015625,
0.0172119140625,
-0.03643798828125,
0.0538330078125,
0.00695037841796875,
0.039306640625,
-0.01053619384765625,
-0.01953125,
-0.00963592529296875,
-0.09222412109375,
-0.01502227783203125,
0.01546478271484375,
-0.00884246826171875,
0.031829833984375,
-0.01087188720703125,
-0.022735595703125,
0.0076751708984375,
0.01406097412109375,
0.019317626953125,
0.019439697265625,
-0.01320648193359375,
-0.0290679931640625,
0.08123779296875,
0.023773193359375,
-0.037139892578125,
-0.01100921630859375,
-0.0009260177612304688,
-0.055023193359375,
0.036865234375,
-0.026214599609375,
0.0028133392333984375,
0.0203094482421875,
-0.01201629638671875,
0.039215087890625,
0.03460693359375,
0.0195465087890625,
0.0006518363952636719,
0.0240325927734375,
-0.01273345947265625,
-0.035552978515625,
-0.016204833984375,
-0.0006585121154785156,
-0.00983428955078125,
0.0248260498046875,
0.0187835693359375,
-0.007785797119140625,
-0.01544952392578125,
-0.07818603515625,
0.006511688232421875,
-0.031402587890625,
0.04052734375,
-0.0189208984375,
-0.02606201171875,
0.026397705078125,
-0.0159759521484375,
-0.0042266845703125,
-0.033416748046875,
-0.0295867919921875,
0.05352783203125,
-0.0123748779296875,
-0.0014982223510742188,
-0.01097869873046875,
0.0026912689208984375,
0.0156707763671875,
-0.0010938644409179688,
-0.0022716522216796875,
0.035736083984375,
0.033294677734375,
-0.026702880859375,
-0.0199127197265625,
-0.0209503173828125,
0.0162200927734375,
-0.0198211669921875,
0.00197601318359375,
0.0557861328125,
0.00323486328125,
0.0153961181640625,
-0.0160064697265625,
-0.032806396484375,
-0.036346435546875,
-0.1263427734375,
0.0247039794921875,
0.08233642578125,
0.0227508544921875,
0.0311737060546875,
-0.021881103515625,
0.0106353759765625,
0.05499267578125,
-0.034912109375,
-0.00909423828125,
0.0104217529296875,
0.0421142578125,
0.0699462890625,
-0.0017852783203125,
0.0112152099609375,
0.0027599334716796875,
-0.043548583984375,
0.034576416015625,
0.020294189453125,
-0.01041412353515625,
0.01332855224609375,
0.04986572265625,
-0.0489501953125,
0.01016998291015625,
-0.00250244140625,
-0.016632080078125,
0.004154205322265625,
0.00640106201171875,
0.01088714599609375,
0.04571533203125,
0.0347900390625,
0.0021343231201171875,
0.0011491775512695312,
0.01727294921875,
0.0143280029296875,
-0.01479339599609375,
0.0264892578125,
0.044891357421875,
-0.0338134765625,
-0.051788330078125,
0.005859375,
0.0011653900146484375,
-0.0046844482421875,
-0.02587890625,
-0.0189971923828125,
0.0450439453125,
-0.006145477294921875,
0.0126495361328125,
-0.057342529296875,
0.051483154296875,
-0.027191162109375,
0.031524658203125,
-0.00032448768615722656,
0.020751953125,
-0.01021575927734375,
-0.0233001708984375,
0.042694091796875,
0.004314422607421875,
-0.035247802734375,
-0.005794525146484375,
-0.017120361328125,
0.008758544921875,
-0.018341064453125,
0.0289764404296875,
0.060272216796875,
0.013580322265625,
-0.0258941650390625,
0.00778961181640625,
0.0241241455078125,
0.0217132568359375,
0.0054931640625,
0.0059356689453125,
-0.0016231536865234375,
-0.0234527587890625,
-0.0017786026000976562,
0.0245513916015625,
-0.03729248046875,
0.0205078125,
-0.0005764961242675781,
-0.020843505859375,
0.01439666748046875,
-0.041961669921875,
-0.0019588470458984375,
0.015380859375,
-0.059722900390625,
-0.041595458984375,
0.00928497314453125,
-0.061492919921875,
0.0032138824462890625,
0.034637451171875,
0.00806427001953125,
-0.0183563232421875,
-0.024139404296875,
-0.049072265625,
-0.055877685546875,
-0.03521728515625,
-0.0509033203125,
-0.01953125,
-0.0187835693359375,
0.0258941650390625,
0.09869384765625,
0.0258636474609375,
-0.059844970703125,
0.0282440185546875,
-0.042266845703125,
-0.036529541015625,
0.0535888671875,
-0.029815673828125,
-0.0016498565673828125,
0.005176544189453125,
-0.000017404556274414062,
0.011993408203125,
0.00917816162109375,
-0.0101470947265625,
-0.0148773193359375,
-0.0084228515625,
0.003978729248046875,
0.0036182403564453125,
-0.0016717910766601562,
0.00539398193359375,
0.008453369140625,
-0.005474090576171875,
-0.0404052734375,
-0.06646728515625,
0.0293426513671875,
-0.034576416015625,
0.053802490234375,
0.0023670196533203125,
-0.0224761962890625,
0.003780364990234375,
0.06304931640625,
0.01971435546875,
0.00667572021484375,
0.016082763671875,
-0.0103759765625,
0.037933349609375,
-0.00388336181640625,
0.005794525146484375,
-0.038818359375,
0.0467529296875,
-0.00696563720703125,
0.0193023681640625,
0.014739990234375,
0.017303466796875,
0.01352691650390625,
-0.035125732421875,
-0.0308074951171875,
0.016082763671875,
0.01107025146484375,
-0.057464599609375,
0.0225372314453125,
-0.0290069580078125,
0.0095977783203125,
-0.013824462890625,
0.03033447265625,
-0.01071929931640625,
-0.0137786865234375,
-0.005764007568359375,
0.0112762451171875,
-0.0474853515625,
-0.051116943359375,
-0.0142059326171875,
-0.0015993118286132812,
-0.0989990234375,
0.0340576171875,
0.01314544677734375,
-0.0313720703125,
-0.055389404296875,
0.02655029296875,
-0.09197998046875,
-0.03594970703125,
0.0340576171875,
-0.033538818359375,
0.00708770751953125,
0.005535125732421875,
0.0004200935363769531,
-0.024993896484375,
-0.0291900634765625,
-0.01885986328125,
-0.047393798828125,
-0.011322021484375,
-0.016876220703125,
0.03802490234375,
-0.0095062255859375,
0.02496337890625,
-0.01519012451171875,
0.054595947265625,
0.0239410400390625,
0.0095977783203125,
0.01479339599609375,
-0.01715087890625,
-0.025634765625,
0.0259246826171875,
0.0147705078125,
-0.033416748046875,
-0.01678466796875,
-0.038421630859375,
-0.05078125,
-0.033172607421875,
-0.0155029296875,
0.0263671875,
0.0303955078125,
-0.029083251953125,
-0.0611572265625,
-0.052978515625,
-0.044891357421875,
0.031768798828125,
-0.0199737548828125,
-0.009429931640625,
-0.09033203125,
-0.09613037109375,
0.0673828125,
0.0122528076171875,
0.0043792724609375,
-0.01445770263671875,
0.08203125,
0.00737762451171875,
-0.031494140625,
0.0025844573974609375,
-0.001953125,
0.029144287109375,
-0.0238800048828125,
0.03955078125,
0.025238037109375,
0.002658843994140625,
0.024566650390625,
-0.032958984375,
0.00032258033752441406,
-0.03131103515625,
0.04681396484375,
-0.01232147216796875,
-0.0008435249328613281,
0.004970550537109375,
-0.0161590576171875,
0.048431396484375,
-0.033599853515625,
-0.018707275390625,
0.01617431640625,
0.0202178955078125,
0.01216888427734375,
0.01299285888671875,
-0.0249176025390625,
-0.02020263671875,
-0.023590087890625,
0.0096893310546875,
0.044097900390625,
-0.0210723876953125,
0.040374755859375,
0.0022258758544921875,
-0.01328277587890625,
-0.003467559814453125,
-0.0205535888671875,
0.00604248046875,
-0.0174560546875,
-0.006931304931640625,
0.0165557861328125,
-0.0175323486328125,
-0.04010009765625,
0.014007568359375,
-0.0307769775390625,
0.0574951171875,
0.0029697418212890625,
-0.06964111328125,
0.043304443359375,
-0.0263214111328125,
0.048431396484375,
0.0211639404296875,
0.0103302001953125,
0.01137542724609375,
0.032379150390625,
-0.0098724365234375,
-0.01361846923828125,
0.037261962890625,
-0.00789642333984375,
-0.0282135009765625,
0.033599853515625,
0.00495147705078125,
-0.0080108642578125,
0.05853271484375,
-0.0008711814880371094,
-0.01453399658203125,
0.03594970703125,
-0.01030731201171875,
0.00579071044921875,
0.0224609375,
0.0154876708984375,
-0.00969696044921875,
0.04010009765625,
-0.007694244384765625,
0.0230865478515625,
0.032989501953125,
-0.0300140380859375,
-0.022613525390625,
0.0268096923828125,
0.032958984375,
-0.034423828125,
-0.0321044921875,
0.042510986328125,
-0.0160369873046875,
0.0156707763671875,
0.024017333984375,
0.029144287109375,
-0.043975830078125,
0.039703369140625,
0.048187255859375,
-0.0230560302734375,
-0.04437255859375,
-0.0128173828125,
-0.0394287109375,
-0.0557861328125,
-0.0178375244140625,
0.024993896484375,
-0.02728271484375,
-0.0181884765625,
-0.0226287841796875,
-0.007717132568359375,
-0.015411376953125,
0.01000213623046875,
-0.0301666259765625,
-0.013885498046875,
-0.01806640625,
-0.0018377304077148438,
0.048370361328125,
-0.0281829833984375,
0.034637451171875,
-0.00957489013671875,
-0.0134429931640625,
0.05999755859375,
0.033111572265625,
-0.00024890899658203125,
-0.024261474609375,
-0.0301361083984375,
-0.0184326171875,
-0.058197021484375,
-0.040924072265625,
-0.0628662109375,
-0.045318603515625,
-0.04754638671875,
0.0172576904296875,
-0.01812744140625,
-0.004528045654296875,
0.0155792236328125,
0.03326416015625,
0.0037326812744140625,
0.033843994140625,
-0.02117919921875,
0.0125274658203125,
-0.00298309326171875,
0.047149658203125,
-0.0218963623046875,
0.0645751953125,
0.01068878173828125,
0.009521484375,
-0.015869140625,
-0.0240478515625,
0.053070068359375,
-0.01483917236328125,
-0.0294952392578125,
-0.040618896484375,
-0.022216796875,
-0.02557373046875,
0.0214996337890625,
-0.0274810791015625,
-0.014251708984375,
0.003017425537109375,
0.0110321044921875,
-0.036834716796875,
0.011627197265625,
-0.0003001689910888672,
0.00830841064453125,
-0.0523681640625,
-0.0257415771484375,
0.034820556640625,
0.00496673583984375,
0.0255584716796875,
-0.0220794677734375,
-0.032012939453125,
-0.004547119140625,
0.0234222412109375,
-0.0052947998046875,
0.02471923828125,
0.0526123046875,
-0.0274505615234375,
0.03216552734375,
0.03924560546875,
0.01166534423828125,
0.036956787109375,
-0.047943115234375,
-0.00533294677734375,
0.0009255409240722656,
0.0277862548828125,
0.006435394287109375,
0.01377105712890625,
0.06341552734375,
-0.02410888671875,
0.021392822265625,
0.061737060546875,
0.05810546875,
-0.07635498046875,
0.007053375244140625,
-0.0002853870391845703,
-0.019134521484375,
0.0723876953125,
0.0196685791015625,
0.018218994140625,
0.02099609375,
-0.0222625732421875,
0.007709503173828125,
-0.000331878662109375,
-0.0008106231689453125,
0.004634857177734375,
-0.02947998046875,
0.01177215576171875,
0.024871826171875,
0.0166473388671875,
-0.0137786865234375,
-0.01104736328125,
0.0185394287109375,
-0.0053253173828125,
-0.05218505859375,
-0.006072998046875,
0.0178985595703125,
-0.0027217864990234375,
-0.0859375,
0.0258331298828125,
-0.0235595703125,
0.0165252685546875,
0.04339599609375,
-0.0244903564453125,
0.006420135498046875,
0.0305023193359375,
-0.039459228515625,
0.0550537109375,
-0.0134735107421875,
-0.030517578125,
0.041107177734375,
-0.026947021484375,
-0.0169219970703125,
0.00528717041015625,
-0.052001953125,
-0.0090179443359375,
-0.0257568359375,
0.0158233642578125,
0.01519775390625,
0.016448974609375,
0.047576904296875,
-0.03302001953125,
-0.027252197265625,
0.05535888671875,
-0.048919677734375,
-0.026641845703125,
-0.0230865478515625,
-0.000022709369659423828,
-0.03424072265625,
-0.00244903564453125,
-0.01776123046875,
-0.0008273124694824219,
0.017364501953125,
-0.037261962890625,
-0.0670166015625,
0.12939453125,
0.0045928955078125,
0.0238037109375,
-0.0206756591796875,
0.044586181640625,
-0.032989501953125,
0.034271240234375,
-0.04876708984375,
0.08184814453125,
0.027191162109375,
0.044586181640625,
-0.041595458984375,
-0.00986480712890625,
0.009033203125,
0.04296875,
0.059326171875,
0.0133209228515625,
0.0268402099609375,
-0.022430419921875,
0.00860595703125,
0.034027099609375,
-0.03173828125,
-0.01031494140625,
0.0252685546875,
0.006622314453125,
0.029022216796875,
-0.0323486328125,
0.029815673828125,
-0.040802001953125,
0.0210113525390625,
0.04180908203125,
0.009063720703125,
-0.004375457763671875,
0.029693603515625,
-0.00009942054748535156,
0.0140380859375,
-0.0029735565185546875,
-0.0163726806640625,
-0.062744140625,
-0.01024627685546875,
0.04925537109375,
0.0267791748046875,
-0.06207275390625,
-0.076171875,
-0.0218505859375,
0.04229736328125,
0.01898193359375,
0.02880859375,
0.0132904052734375,
0.0162353515625,
0.041412353515625,
0.010894775390625,
0.013031005859375,
0.04833984375,
-0.0231781005859375,
-0.01446533203125,
0.023681640625,
0.0247039794921875,
0.0027332305908203125,
0.05841064453125,
0.025726318359375,
0.006870269775390625,
-0.038818359375,
-0.0105743408203125,
0.00560760498046875,
-0.0290069580078125,
-0.045806884765625,
-0.05401611328125,
-0.05047607421875,
-0.0187225341796875,
0.0105743408203125,
-0.0350341796875,
0.009918212890625,
0.0196380615234375,
0.0202178955078125,
-0.0008516311645507812,
-0.024810791015625,
-0.0229644775390625,
-0.00739288330078125,
-0.025848388671875,
-0.045013427734375,
-0.0118560791015625,
0.0305328369140625,
0.08380126953125,
-0.0261688232421875,
0.03515625,
-0.015228271484375,
-0.0165863037109375,
0.037200927734375,
0.01678466796875,
0.005832672119140625,
-0.0292816162109375,
-0.02252197265625,
0.017669677734375,
0.0045013427734375,
0.049591064453125,
0.04248046875,
0.062286376953125,
0.0095672607421875,
-0.04132080078125,
0.008331298828125,
0.0016107559204101562,
-0.03631591796875,
-0.003719329833984375,
-0.057830810546875,
0.024810791015625,
0.043212890625,
0.01116943359375,
0.0017681121826171875,
-0.01123046875,
0.05535888671875,
-0.01425933837890625,
0.006282806396484375,
-0.0024356842041015625,
-0.0447998046875,
0.001644134521484375,
-0.033905029296875,
0.006420135498046875,
-0.0192108154296875,
-0.00048732757568359375,
0.020111083984375,
-0.0009741783142089844,
-0.049224853515625,
-0.02362060546875,
0.0256195068359375,
-0.01285552978515625,
0.02886962890625,
-0.0019130706787109375,
0.00749969482421875,
0.01374053955078125,
-0.03240966796875,
-0.0019130706787109375,
-0.029693603515625,
0.01013946533203125,
-0.0213623046875,
-0.0224456787109375,
-0.0230560302734375,
-0.0139617919921875,
0.048583984375,
0.032379150390625,
0.0771484375,
-0.0225067138671875,
0.02294921875,
-0.0038089752197265625,
0.05413818359375,
-0.047210693359375,
0.0126190185546875,
0.0194549560546875,
0.0090484619140625,
0.0110626220703125,
-0.0232391357421875,
-0.04071044921875,
0.029693603515625,
0.03143310546875,
-0.032379150390625,
0.022064208984375,
0.0300140380859375,
0.0010662078857421875,
-0.042205810546875,
0.01788330078125,
-0.017425537109375,
-0.0121917724609375,
0.001979827880859375,
-0.0125274658203125,
0.01123809814453125,
0.0325927734375,
-0.0012159347534179688,
0.033538818359375,
0.0458984375,
-0.0222625732421875,
0.05157470703125,
-0.0305633544921875,
0.08935546875,
0.04302978515625,
-0.0021495819091796875,
0.003292083740234375,
0.03680419921875,
-0.0164642333984375,
0.0007014274597167969,
0.032470703125,
0.004669189453125,
0.034881591796875,
-0.02362060546875,
-0.0435791015625,
-0.0272216796875,
0.036895751953125,
0.01031494140625,
0.011566162109375,
-0.07183837890625,
0.021392822265625,
-0.0207977294921875,
-0.03216552734375,
-0.022308349609375,
-0.0302276611328125,
-0.00107574462890625,
0.022796630859375,
-0.0021495819091796875,
-0.01525115966796875,
0.00849151611328125,
-0.003910064697265625,
0.024932861328125,
0.03131103515625,
-0.080810546875,
0.062255859375,
-0.01479339599609375,
-0.0241546630859375,
0.021575927734375,
0.005130767822265625,
-0.0208587646484375,
-0.007007598876953125,
0.003936767578125,
-0.01117706298828125,
-0.050140380859375,
0.0452880859375,
-0.0162200927734375,
0.012237548828125,
0.0217437744140625,
0.004276275634765625,
-0.0008673667907714844,
-0.0025691986083984375,
-0.007106781005859375,
0.042236328125,
-0.02191162109375,
-0.061004638671875,
-0.01546478271484375,
0.01303863525390625,
0.0399169921875,
-0.02105712890625,
-0.01934814453125,
0.001209259033203125,
-0.0042572021484375,
0.00139617919921875,
-0.020263671875,
-0.016510009765625,
-0.043914794921875,
-0.0682373046875,
0.029937744140625,
0.0101318359375,
-0.0408935546875,
-0.020050048828125,
-0.0015287399291992188,
-0.0462646484375,
0.049407958984375,
0.015716552734375,
0.01424407958984375,
0.027801513671875,
0.052734375,
0.008270263671875,
0.07623291015625,
-0.0033550262451171875,
0.01088714599609375,
-0.04193115234375,
0.006557464599609375,
-0.0181121826171875,
0.02655029296875,
0.0225067138671875,
-0.0048980712890625,
0.01197052001953125,
0.04949951171875,
-0.024139404296875,
-0.075439453125,
-0.04327392578125,
-0.05419921875,
-0.0181121826171875,
-0.033294677734375,
-0.03155517578125,
-0.0247802734375,
0.07470703125,
0.06158447265625,
0.0262298583984375,
-0.019500732421875,
0.00838470458984375,
-0.028076171875,
-0.05401611328125,
-0.01143646240234375,
0.023956298828125,
-0.056243896484375,
-0.00015175342559814453,
0.005748748779296875,
0.00705718994140625,
-0.0504150390625,
-0.0175323486328125,
-0.0279541015625,
-0.0340576171875,
0.00653839111328125,
0.0070953369140625,
0.0085296630859375,
0.0426025390625,
-0.0002684593200683594,
-0.0284881591796875,
-0.01397705078125,
-0.00669097900390625,
-0.02191162109375,
-0.01117706298828125,
0.0263824462890625,
-0.02276611328125,
-0.01076507568359375,
-0.03125,
0.05108642578125,
-0.0245513916015625,
0.01392364501953125,
-0.06488037109375,
0.00220489501953125,
-0.0144805908203125,
-0.00455474853515625,
0.0036602020263671875,
-0.0005927085876464844,
0.005840301513671875,
-0.0215911865234375,
0.004669189453125,
0.004150390625,
-0.0156402587890625,
0.053314208984375,
-0.0202789306640625,
0.031341552734375,
-0.03521728515625,
0.00820159912109375,
0.0011968612670898438,
-0.00363922119140625,
-0.0197601318359375,
0.0279388427734375,
-0.060638427734375,
-0.035400390625,
-0.0018072128295898438,
-0.00345611572265625,
-0.0036754608154296875,
0.007534027099609375
] |
ce4f4b96196a877876865466263aa88e07e34c0e
|
Wordpress Stackexchange
Q: How can I include custom post types on a tag page? I'm using custom post types, but they don't appear on tag pages along with regular posts and i'd like to include both standard and custom post types on tag or category pages.
What would be required before the loop to include all posts? (including custom type).
Updated:
To add, I found this code here, which worked perfectly for the first part:
add_filter('pre_get_posts', 'query_post_type');
function query_post_type($query) {
if ( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
$post_type = get_query_var('post_type');
if($post_type)
$post_type = $post_type;
else
$post_type = array('post','cpt'); // replace cpt to your custom post type
$query->set('post_type',$post_type);
return $query;
}
}
Second question still remains though:
Is there a way to allow readers to filter by post type?
So either of the following would work..
*
*example.com/tag/blue?post_type=custom
*example.com/tag/blue?post_type=post
A: function post_type_tags_fix($request) {
if ( isset($request['tag']) && !isset($request['post_type']) )
$request['post_type'] = 'any';
return $request;
}
add_filter('request', 'post_type_tags_fix');
You can alter the post type to your liking.
From this post.
Custom post type tag archives don't work for basic loop?
|
Q: How can I include custom post types on a tag page? I'm using custom post types, but they don't appear on tag pages along with regular posts and i'd like to include both standard and custom post types on tag or category pages.
What would be required before the loop to include all posts? (including custom type).
Updated:
To add, I found this code here, which worked perfectly for the first part:
add_filter('pre_get_posts', 'query_post_type');
function query_post_type($query) {
if ( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
$post_type = get_query_var('post_type');
if($post_type)
$post_type = $post_type;
else
$post_type = array('post','cpt'); // replace cpt to your custom post type
$query->set('post_type',$post_type);
return $query;
}
}
Second question still remains though:
Is there a way to allow readers to filter by post type?
So either of the following would work..
*
*example.com/tag/blue?post_type=custom
*example.com/tag/blue?post_type=post
A: function post_type_tags_fix($request) {
if ( isset($request['tag']) && !isset($request['post_type']) )
$request['post_type'] = 'any';
return $request;
}
add_filter('request', 'post_type_tags_fix');
You can alter the post type to your liking.
From this post.
Custom post type tag archives don't work for basic loop?
A: just to answer the second part, the syntax is:
example.com/tag/blue?post_type[]=custom
example.com/tag/blue?post_type[]=post
or for multiple types:
example.com/tag/blue?post_type[]=custom&post_type[]=post
|
wordpress
|
{
"language": "en",
"length": 197,
"provenance": "stackexchange_00019.jsonl.gz:407697",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11871"
}
|
[
0.0867919921875,
0.006069183349609375,
0.01334381103515625,
-0.045989990234375,
0.049468994140625,
-0.03582763671875,
0.06756591796875,
-0.0095062255859375,
-0.0338134765625,
0.00637054443359375,
-0.0180206298828125,
0.0023632049560546875,
-0.0172119140625,
-0.0300445556640625,
0.025543212890625,
-0.039886474609375,
0.026641845703125,
-0.0189666748046875,
0.028533935546875,
-0.0247039794921875,
0.0347900390625,
-0.0237579345703125,
0.041595458984375,
0.041015625,
0.01042938232421875,
0.0163726806640625,
0.0241546630859375,
-0.00707244873046875,
-0.0013933181762695312,
0.00555419921875,
0.0104217529296875,
-0.0228118896484375,
0.0247955322265625,
0.00555419921875,
-0.018280029296875,
0.0293731689453125,
0.01483154296875,
0.003475189208984375,
0.0013456344604492188,
0.034637451171875,
0.01418304443359375,
-0.003086090087890625,
0.044677734375,
0.01464080810546875,
0.01215362548828125,
-0.040740966796875,
0.03070068359375,
-0.051116943359375,
0.025421142578125,
-0.03619384765625,
0.004787445068359375,
-0.0034084320068359375,
0.0272064208984375,
-0.03179931640625,
-0.0234832763671875,
0.0079498291015625,
0.032073974609375,
-0.0606689453125,
0.040740966796875,
-0.051666259765625,
-0.0253143310546875,
-0.047943115234375,
0.048583984375,
0.0146331787109375,
-0.00601959228515625,
-0.0007238388061523438,
0.0499267578125,
0.001178741455078125,
-0.0860595703125,
-0.017791748046875,
0.0740966796875,
-0.0237274169921875,
0.016510009765625,
0.0193634033203125,
-0.006961822509765625,
-0.025299072265625,
0.02117919921875,
0.0062713623046875,
0.0228118896484375,
0.014892578125,
0.0171356201171875,
-0.00007677078247070312,
-0.0111541748046875,
-0.01239776611328125,
-0.005016326904296875,
-0.0041351318359375,
-0.0123138427734375,
-0.0077667236328125,
-0.040313720703125,
-0.0195465087890625,
-0.030548095703125,
-0.06402587890625,
-0.043701171875,
0.0263824462890625,
0.02099609375,
-0.028106689453125,
0.00916290283203125,
0.017547607421875,
-0.0026760101318359375,
0.039337158203125,
0.0142974853515625,
-0.057769775390625,
0.08819580078125,
-0.0556640625,
0.04876708984375,
0.051666259765625,
-0.038909912109375,
0.0271759033203125,
0.0936279296875,
0.028350830078125,
0.040679931640625,
0.0555419921875,
-0.0078125,
0.0250244140625,
-0.0638427734375,
-0.0005512237548828125,
-0.0299835205078125,
-0.028564453125,
-0.03521728515625,
0.0162811279296875,
0.003978729248046875,
0.04925537109375,
0.02581787109375,
-0.058380126953125,
0.005718231201171875,
-0.00453948974609375,
0.0043487548828125,
-0.06964111328125,
0.004749298095703125,
0.023529052734375,
-0.0183868408203125,
0.0019702911376953125,
0.0285491943359375,
0.005985260009765625,
-0.011138916015625,
-0.0311431884765625,
0.00746917724609375,
-0.061004638671875,
-0.0142974853515625,
0.01377105712890625,
0.03179931640625,
-0.01580810546875,
0.00765228271484375,
0.00438690185546875,
0.03778076171875,
0.0231475830078125,
0.0284576416015625,
0.0137786865234375,
-0.01416015625,
-0.031585693359375,
0.05029296875,
-0.0232696533203125,
0.0418701171875,
0.0016870498657226562,
-0.03912353515625,
-0.00988006591796875,
0.0004229545593261719,
-0.01206207275390625,
-0.03173828125,
-0.03375244140625,
-0.008758544921875,
-0.016510009765625,
0.0157318115234375,
-0.0139617919921875,
-0.034820556640625,
0.036529541015625,
-0.0132598876953125,
-0.0103759765625,
0.0182952880859375,
-0.004207611083984375,
0.02313232421875,
-0.0000011324882507324219,
0.03216552734375,
0.018768310546875,
-0.0008702278137207031,
0.006214141845703125,
-0.00560760498046875,
0.0223541259765625,
0.032745361328125,
0.0149688720703125,
-0.0021305084228515625,
-0.0257415771484375,
0.06915283203125,
-0.019989013671875,
-0.0843505859375,
0.0517578125,
0.003448486328125,
0.076904296875,
0.00971221923828125,
0.002506256103515625,
0.044952392578125,
0.0241241455078125,
-0.025604248046875,
0.026214599609375,
-0.0089111328125,
-0.0251312255859375,
-0.01056671142578125,
0.0002493858337402344,
-0.0249481201171875,
0.01727294921875,
-0.052886962890625,
0.00872039794921875,
0.00817108154296875,
0.00848388671875,
-0.023101806640625,
0.01739501953125,
-0.01342010498046875,
0.051605224609375,
0.02685546875,
0.00687408447265625,
0.006931304931640625,
-0.007648468017578125,
-0.02166748046875,
0.00803375244140625,
-0.0162353515625,
0.051300048828125,
0.0032444000244140625,
0.004810333251953125,
-0.01090240478515625,
0.018890380859375,
-0.0094146728515625,
-0.00472259521484375,
-0.01494598388671875,
0.033294677734375,
0.049224853515625,
0.034515380859375,
-0.01151275634765625,
0.01126861572265625,
0.0209503173828125,
0.06463623046875,
-0.08575439453125,
-0.0149993896484375,
0.03594970703125,
0.0037212371826171875,
-0.058197021484375,
-0.0106201171875,
-0.01041412353515625,
-0.0258636474609375,
-0.006320953369140625,
0.06005859375,
0.0196990966796875,
0.00910186767578125,
-0.0128326416015625,
0.01514434814453125,
0.0264739990234375,
-0.0019197463989257812,
0.02392578125,
-0.00916290283203125,
0.0102081298828125,
0.0316162109375,
0.01206207275390625,
-0.01279449462890625,
0.025177001953125,
-0.04339599609375,
0.029571533203125,
0.014739990234375,
0.003204345703125,
-0.0183563232421875,
0.0087432861328125,
-0.0139617919921875,
0.00691986083984375,
-0.035003662109375,
-0.03961181640625,
-0.005977630615234375,
0.054534912109375,
0.006107330322265625,
0.06488037109375,
0.049285888671875,
-0.0231781005859375,
-0.0166778564453125,
0.0003936290740966797,
0.0281219482421875,
-0.0033245086669921875,
0.0198211669921875,
-0.007129669189453125,
0.03448486328125,
-0.047515869140625,
0.009796142578125,
0.00994110107421875,
0.0152587890625,
-0.00557708740234375,
0.052154541015625,
-0.032501220703125,
-0.001987457275390625,
-0.03729248046875,
-0.059326171875,
-0.001678466796875,
0.036651611328125,
-0.0027790069580078125,
-0.01482391357421875,
0.0041046142578125,
0.026702880859375,
-0.01165008544921875,
0.02972412109375,
0.00904083251953125,
-0.0131072998046875,
-0.0037708282470703125,
-0.07568359375,
0.0504150390625,
-0.05560302734375,
0.0780029296875,
0.07598876953125,
-0.0158538818359375,
0.006816864013671875,
0.02197265625,
0.01490020751953125,
0.005840301513671875,
0.036346435546875,
0.0029926300048828125,
-0.0212249755859375,
-0.03515625,
0.0133056640625,
0.0272369384765625,
0.0153656005859375,
0.01532745361328125,
-0.027923583984375,
0.0167694091796875,
0.0231170654296875,
-0.042877197265625,
-0.03271484375,
0.0662841796875,
-0.05596923828125,
-0.031829833984375,
-0.048431396484375,
-0.046478271484375,
0.005138397216796875,
-0.051483154296875,
-0.0274200439453125,
-0.0212554931640625,
-0.006381988525390625,
-0.060821533203125,
-0.0572509765625,
-0.0638427734375,
0.00341796875,
-0.01451873779296875,
0.005138397216796875,
0.00966644287109375,
0.09588623046875,
0.027191162109375,
-0.0362548828125,
0.026519775390625,
0.01219940185546875,
-0.03570556640625,
0.006099700927734375,
0.0189666748046875,
-0.03271484375,
0.0836181640625,
-0.00211334228515625,
0.0032291412353515625,
0.050201416015625,
-0.01123809814453125,
-0.039947509765625,
-0.0138397216796875,
-0.0217132568359375,
0.0169219970703125,
0.017578125,
0.00902557373046875,
-0.004047393798828125,
0.039764404296875,
-0.038787841796875,
-0.00860595703125,
-0.005706787109375,
-0.0219268798828125,
-0.0003848075866699219,
0.003360748291015625,
-0.0198822021484375,
-0.0237274169921875,
0.032958984375,
0.041412353515625,
0.0220489501953125,
0.0141143798828125,
-0.018035888671875,
0.0411376953125,
0.0161895751953125,
0.04949951171875,
-0.037506103515625,
0.01523590087890625,
-0.017303466796875,
0.061767578125,
0.0197601318359375,
0.0103302001953125,
0.00457763671875,
-0.005550384521484375,
-0.024566650390625,
-0.05096435546875,
0.04376220703125,
-0.035430908203125,
-0.0012540817260742188,
-0.0499267578125,
-0.0240020751953125,
-0.0211029052734375,
0.08245849609375,
-0.03277587890625,
-0.007137298583984375,
-0.049407958984375,
-0.0047607421875,
0.024566650390625,
-0.05352783203125,
-0.00750732421875,
-0.0154876708984375,
-0.0272064208984375,
0.000034809112548828125,
-0.018951416015625,
-0.01493072509765625,
-0.01337432861328125,
-0.0245819091796875,
-0.0140228271484375,
-0.029510498046875,
0.03961181640625,
-0.042877197265625,
0.01363372802734375,
-0.0034198760986328125,
0.00473785400390625,
-0.02032470703125,
-0.0250396728515625,
-0.021697998046875,
-0.047637939453125,
-0.007415771484375,
-0.0221405029296875,
0.032318115234375,
0.007354736328125,
-0.01305389404296875,
-0.0149383544921875,
0.0247955322265625,
0.051361083984375,
-0.0014600753784179688,
0.007762908935546875,
-0.0340576171875,
-0.005802154541015625,
0.0000972747802734375,
-0.002765655517578125,
-0.0174407958984375,
-0.0301361083984375,
-0.007350921630859375,
-0.0114288330078125,
0.038726806640625,
-0.00930023193359375,
-0.02008056640625,
0.0177459716796875,
-0.02728271484375,
-0.048370361328125,
-0.045989990234375,
-0.040374755859375,
-0.00096893310546875,
-0.0004305839538574219,
-0.027496337890625,
-0.045745849609375,
-0.06341552734375,
0.04290771484375,
0.0234832763671875,
-0.00951385498046875,
0.003894805908203125,
0.033233642578125,
0.0021533966064453125,
-0.04425048828125,
-0.049560546875,
0.0228424072265625,
0.0204925537109375,
-0.04547119140625,
0.06329345703125,
0.0200653076171875,
-0.006221771240234375,
0.0552978515625,
-0.02203369140625,
-0.01204681396484375,
-0.0281524658203125,
0.054351806640625,
0.0024871826171875,
-0.02020263671875,
0.00861358642578125,
-0.0374755859375,
0.046356201171875,
0.0032196044921875,
-0.00958251953125,
-0.0164642333984375,
0.029296875,
0.02752685546875,
-0.0294647216796875,
0.032562255859375,
-0.0035457611083984375,
0.0020771026611328125,
0.01012420654296875,
0.048248291015625,
0.0210723876953125,
0.00812530517578125,
0.01242828369140625,
-0.0260772705078125,
-0.043426513671875,
-0.0031566619873046875,
-0.006832122802734375,
0.032745361328125,
0.00009948015213012695,
0.0289459228515625,
0.031341552734375,
-0.00665283203125,
-0.0300445556640625,
0.003757476806640625,
-0.02545166015625,
-0.0177154541015625,
-0.046966552734375,
-0.00904083251953125,
-0.01204681396484375,
0.005878448486328125,
0.0240936279296875,
-0.007541656494140625,
0.01079559326171875,
0.040313720703125,
-0.00601959228515625,
0.0111083984375,
0.016082763671875,
0.0104827880859375,
-0.022552490234375,
-0.013397216796875,
0.0040740966796875,
-0.002002716064453125,
-0.017486572265625,
0.056549072265625,
0.006732940673828125,
0.01363372802734375,
-0.0138092041015625,
0.034759521484375,
0.042144775390625,
0.0215301513671875,
0.021270751953125,
-0.0105743408203125,
-0.02691650390625,
0.0250396728515625,
-0.0167236328125,
0.005985260009765625,
-0.005786895751953125,
-0.005947113037109375,
0.016632080078125,
-0.037689208984375,
-0.005672454833984375,
0.03265380859375,
-0.031524658203125,
-0.004913330078125,
-0.008941650390625,
0.002574920654296875,
-0.003208160400390625,
-0.0151824951171875,
-0.0301361083984375,
0.00829315185546875,
0.005950927734375,
-0.03741455078125,
0.063232421875,
-0.03485107421875,
0.052642822265625,
-0.022216796875,
0.0011377334594726562,
0.0188140869140625,
0.025970458984375,
-0.007297515869140625,
-0.0234527587890625,
-0.0253143310546875,
0.006862640380859375,
0.0004963874816894531,
-0.0012598037719726562,
-0.0165252685546875,
0.00797271728515625,
-0.022064208984375,
0.03521728515625,
-0.006900787353515625,
-0.0267791748046875,
0.021575927734375,
0.002803802490234375,
0.064208984375,
0.0284423828125,
-0.037353515625,
-0.0028476715087890625,
-0.058929443359375,
-0.0225372314453125,
0.00484466552734375,
-0.01343536376953125,
-0.047119140625,
-0.00977325439453125,
0.0143585205078125,
0.0242156982421875,
0.0026912689208984375,
-0.0113372802734375,
-0.02685546875,
0.0086822509765625,
0.0265655517578125,
0.0511474609375,
-0.01153564453125,
0.046356201171875,
-0.0166778564453125,
0.01654052734375,
-0.0151824951171875,
0.019989013671875,
0.0044403076171875,
0.00954437255859375,
-0.025665283203125,
-0.08453369140625,
0.005702972412109375,
0.0029296875,
0.0030517578125,
0.08575439453125,
0.06134033203125,
0.0212249755859375,
0.00142669677734375,
-0.021728515625,
0.00180816650390625,
-0.0279388427734375,
0.03857421875,
-0.02239990234375,
-0.004024505615234375,
0.02923583984375,
0.017852783203125,
-0.01071929931640625,
0.0008459091186523438,
-0.00786590576171875,
-0.0225372314453125,
0.034393310546875,
-0.0012149810791015625,
-0.0418701171875,
-0.05010986328125,
0.04827880859375,
0.06536865234375,
0.0264739990234375,
0.037322998046875,
-0.013885498046875,
0.0031604766845703125,
0.006771087646484375,
-0.0164642333984375,
-0.0040283203125,
0.004192352294921875,
0.033172607421875,
-0.007144927978515625,
-0.0027408599853515625,
0.046600341796875,
-0.0156707763671875,
-0.0159759521484375,
0.05352783203125,
0.030181884765625,
-0.0709228515625,
-0.021331787109375,
0.016754150390625,
0.0016927719116210938,
-0.0170440673828125,
-0.00618743896484375,
-0.009185791015625,
-0.0194549560546875,
0.0254974365234375,
-0.006267547607421875,
-0.0133819580078125,
0.00698089599609375,
0.0108489990234375,
-0.004688262939453125,
-0.0228729248046875,
0.0430908203125,
-0.005496978759765625,
0.005245208740234375,
-0.0204620361328125,
-0.025360107421875,
-0.01483154296875,
0.002590179443359375,
0.042724609375,
-0.051116943359375,
-0.0037403106689453125,
-0.0269927978515625,
-0.0053558349609375,
-0.019500732421875,
-0.033294677734375,
0.030517578125,
-0.0121917724609375,
0.0186614990234375,
0.0308685302734375,
-0.01030731201171875,
0.006984710693359375,
-0.0027332305908203125,
-0.0404052734375,
-0.038299560546875,
-0.031524658203125,
-0.005496978759765625,
0.048553466796875,
0.0004818439483642578,
0.03338623046875,
-0.0018939971923828125,
-0.0178985595703125,
-0.01134490966796875,
-0.0162353515625,
0.066650390625,
-0.020172119140625,
-0.02386474609375,
0.0311126708984375,
0.024749755859375,
-0.003955841064453125,
0.024688720703125,
-0.0293121337890625,
-0.0249176025390625,
-0.02593994140625,
-0.0109710693359375,
-0.06756591796875,
0.01084136962890625,
0.023101806640625,
-0.06689453125,
0.08502197265625,
0.01444244384765625,
0.0384521484375,
0.0355224609375,
0.01462554931640625,
-0.054046630859375,
-0.0134429931640625,
-0.041015625,
0.023651123046875,
-0.00843048095703125,
0.037353515625,
-0.058380126953125,
-0.02008056640625,
-0.005710601806640625,
0.046844482421875,
0.0716552734375,
0.006160736083984375,
-0.05389404296875,
0.0031490325927734375,
0.08154296875,
0.0628662109375,
0.01245880126953125,
0.0309295654296875,
0.0008616447448730469,
0.017822265625,
0.033294677734375,
-0.01788330078125,
0.039337158203125,
-0.0223846435546875,
-0.02435302734375,
0.0205535888671875,
0.0166168212890625,
0.0166778564453125,
-0.0031871795654296875,
-0.034332275390625,
-0.01198577880859375,
-0.0024356842041015625,
0.01390838623046875,
-0.00399017333984375,
0.02215576171875,
0.0192718505859375,
0.038330078125,
-0.057525634765625,
-0.0259857177734375,
-0.018341064453125,
0.04669189453125,
0.001148223876953125,
0.0300750732421875,
-0.006175994873046875,
0.0026397705078125,
0.052337646484375,
-0.038177490234375,
-0.0165863037109375,
0.0035800933837890625,
-0.0116729736328125,
0.070556640625,
0.0202789306640625,
0.024383544921875,
-0.047943115234375,
0.02386474609375,
0.0247039794921875,
0.06903076171875,
-0.06585693359375,
-0.057830810546875,
0.00817108154296875,
0.00942230224609375,
0.0020580291748046875,
0.00536346435546875,
0.0100860595703125,
-0.0231475830078125,
0.01739501953125,
-0.06634521484375,
0.0041046142578125,
0.010528564453125,
0.049072265625,
-0.0209197998046875,
-0.032379150390625,
-0.039794921875,
-0.019561767578125,
-0.08428955078125,
0.00846099853515625,
0.0295257568359375,
0.08587646484375,
0.028350830078125,
0.06622314453125,
0.02374267578125,
-0.04815673828125,
-0.01270294189453125,
0.0196990966796875,
-0.00926971435546875,
0.0090484619140625,
-0.01073455810546875,
-0.030303955078125,
-0.00867462158203125,
0.0265960693359375,
0.021728515625,
-0.004261016845703125,
0.0312042236328125,
0.0178985595703125,
-0.031219482421875,
-0.005260467529296875,
0.03900146484375,
-0.01177215576171875,
-0.01016998291015625,
-0.0303192138671875,
-0.01983642578125,
0.003345489501953125,
-0.01776123046875,
0.0494384765625,
-0.02001953125,
0.01331329345703125,
0.01007843017578125,
0.03900146484375,
-0.0005984306335449219,
-0.00533294677734375,
0.0587158203125,
0.0114593505859375,
0.0794677734375,
0.034271240234375,
-0.064453125,
-0.01513671875,
-0.0604248046875,
-0.042327880859375,
0.07183837890625,
0.054595947265625,
0.0067138671875,
-0.0217437744140625,
0.048095703125,
-0.0207061767578125,
0.01520538330078125,
0.006862640380859375,
0.02032470703125,
0.030853271484375,
0.020233154296875,
0.024932861328125,
-0.0589599609375,
-0.041412353515625,
-0.01898193359375,
0.04345703125,
0.0200042724609375,
0.05609130859375,
0.005374908447265625,
0.029052734375,
-0.017364501953125,
0.07159423828125,
-0.069580078125,
-0.0291748046875,
0.057220458984375,
-0.0107269287109375,
0.0008249282836914062,
-0.00127410888671875,
0.01253509521484375,
0.015533447265625,
0.040679931640625,
-0.042327880859375,
-0.00485992431640625,
0.00399017333984375,
0.017181396484375,
-0.022918701171875,
0.0183258056640625,
-0.026275634765625,
-0.01294708251953125,
-0.0191497802734375,
-0.0144500732421875,
0.01529693603515625,
0.011199951171875,
0.0080108642578125,
0.04669189453125,
0.0164642333984375,
0.00439453125,
0.0174102783203125,
-0.03106689453125,
0.027374267578125,
0.02496337890625,
-0.0190277099609375,
-0.042449951171875,
0.03131103515625,
-0.01425933837890625,
0.003940582275390625,
0.0283203125,
0.054534912109375,
0.0009140968322753906,
0.002758026123046875,
-0.007671356201171875,
0.00815582275390625,
0.0304412841796875,
-0.0243682861328125,
0.01953125,
-0.01763916015625,
0.0080108642578125,
0.01418304443359375,
0.0186767578125,
-0.034637451171875,
-0.0004093647003173828,
-0.001667022705078125,
-0.005626678466796875,
0.0092010498046875,
-0.07196044921875,
-0.07373046875,
-0.0157318115234375,
0.0321044921875,
-0.0208282470703125,
-0.010162353515625,
-0.003002166748046875,
-0.05401611328125,
0.03546142578125,
-0.0256195068359375,
-0.04315185546875,
0.02801513671875,
0.037628173828125,
-0.0137176513671875,
0.0159149169921875,
-0.026824951171875,
-0.044097900390625,
0.0059051513671875,
0.0256500244140625,
0.064208984375,
-0.051025390625,
-0.05340576171875,
0.0171966552734375,
0.0129852294921875,
0.0567626953125,
0.00949859619140625,
-0.0168304443359375,
-0.00788116455078125,
0.01134490966796875,
-0.0276947021484375,
-0.0745849609375,
0.0282135009765625,
-0.090576171875,
-0.0165252685546875,
-0.02392578125,
0.0101776123046875,
0.0203857421875,
-0.01690673828125,
-0.070556640625,
0.06890869140625,
-0.0217132568359375,
-0.025848388671875,
-0.05572509765625,
0.01476287841796875,
0.0035839080810546875,
0.0177459716796875,
-0.004268646240234375,
-0.0361328125,
-0.0254058837890625,
0.0123138427734375,
-0.003261566162109375,
0.036529541015625,
0.027923583984375,
-0.0159912109375,
-0.03155517578125,
-0.029998779296875,
-0.03240966796875,
0.005279541015625,
0.0241546630859375,
-0.0296173095703125,
0.025909423828125,
0.0182952880859375,
-0.0621337890625,
-0.0117950439453125,
-0.01316070556640625,
0.0299224853515625,
0.027740478515625,
-0.023162841796875,
-0.061370849609375,
-0.044586181640625,
0.043365478515625,
0.0294036865234375,
0.02899169921875,
-0.00342559814453125,
0.007411956787109375,
-0.022674560546875,
-0.05682373046875,
-0.00986480712890625,
0.0193634033203125,
-0.036834716796875,
0.004444122314453125,
-0.0009112358093261719,
0.011688232421875,
-0.01222991943359375,
-0.01218414306640625,
-0.00714111328125,
-0.023040771484375,
-0.018463134765625,
-0.0203857421875,
-0.0243988037109375,
0.07293701171875,
-0.0311279296875,
0.002582550048828125,
0.001087188720703125,
-0.03631591796875,
-0.0218505859375,
-0.0156707763671875,
-0.032745361328125,
-0.038238525390625,
-0.025177001953125,
0.044403076171875,
0.018890380859375,
0.0175018310546875,
-0.00978851318359375,
0.03759765625,
0.024749755859375,
-0.0095672607421875,
0.005077362060546875,
0.0031147003173828125,
-0.006561279296875,
-0.0247802734375,
0.04644775390625,
0.01285552978515625,
0.043548583984375,
0.01526641845703125,
0.0306854248046875,
-0.00693511962890625,
0.042205810546875,
-0.001819610595703125,
-0.0307769775390625,
-0.0060882568359375,
-0.0265350341796875,
-0.003368377685546875,
0.0006780624389648438,
-0.050689697265625,
-0.035919189453125,
0.013031005859375,
0.015289306640625,
-0.0258026123046875,
0.016845703125
] |
886c719f50a409312396bd75d8cf5155f1b21e59
|
Wordpress Stackexchange
Q: Targeting specific menu with wp_nav_menu_items Hey! I have added a wp_loginout() to my header using a snippet in my functions.php:
add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);
function add_login_logout_link($items, $args) {
ob_start();
wp_loginout('index.php');
$loginoutlink = ob_get_contents();
ob_end_clean();
$items .= '<li>'. $loginoutlink .'</li>';
return $items;
}
The thing is that it shows the login link in every one of my three menues:
function register_main_menus() {
register_nav_menus(
array(
'primary-menu' => __( 'Primary Menu' ),
'secondary-menu' => __( 'Secondary Menu' ),
'footer-menu' => __( 'Footer Menu' ),
)
);
};
I would like to target the wp_nav_menu_items filter to only include the login link in the primary menu. Ideas? Thanks in advance
A: See this related question. I guess in your case you'd wrap your code in if( $args->theme_location == 'primary-menu' ).
|
Q: Targeting specific menu with wp_nav_menu_items Hey! I have added a wp_loginout() to my header using a snippet in my functions.php:
add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);
function add_login_logout_link($items, $args) {
ob_start();
wp_loginout('index.php');
$loginoutlink = ob_get_contents();
ob_end_clean();
$items .= '<li>'. $loginoutlink .'</li>';
return $items;
}
The thing is that it shows the login link in every one of my three menues:
function register_main_menus() {
register_nav_menus(
array(
'primary-menu' => __( 'Primary Menu' ),
'secondary-menu' => __( 'Secondary Menu' ),
'footer-menu' => __( 'Footer Menu' ),
)
);
};
I would like to target the wp_nav_menu_items filter to only include the login link in the primary menu. Ideas? Thanks in advance
A: See this related question. I guess in your case you'd wrap your code in if( $args->theme_location == 'primary-menu' ).
A: Please modify your code with the following code
You forgot to add condition if ($args->theme_location == 'primary-menu') this condition check if menu is primary menu or not.
add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);
function add_login_logout_link($items, $args) {
if ($args->theme_location == 'primary-menu') {
ob_start();
wp_loginout('index.php');
$loginoutlink = ob_get_contents();
ob_end_clean();
$items .= '<li>' . $loginoutlink . '</li>';
return $items;
}
}
function register_main_menus() {
register_nav_menus(
array(
'primary-menu' => __( 'Primary Menu' ),
'secondary-menu' => __( 'Secondary Menu' ),
'footer-menu' => __( 'Footer Menu' ),
)
);
};
A: Actually, I am fairly new to WordPress development, and am trying to fully understand the documentation.
I find that there are so many ways to skin a cat, and some are a lot more complicated than others.
in the case of the above, the probem is solved much easier than previous described;
add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);
the wp_nav_menu_items hook is actually dynamic and you can simply add in between wp_nav_menu__items to target the specific menu.
example;
add_filter('wp_nav_primary-menu_menu_items', 'add_login_logout_link', 10, 2);
if you inspect the wp-includes/nav-menu-template.php you can verify this fact.
|
wordpress
|
{
"language": "en",
"length": 302,
"provenance": "stackexchange_00019.jsonl.gz:407717",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11914"
}
|
[
0.0697021484375,
0.0141143798828125,
0.03155517578125,
0.0088043212890625,
0.0297698974609375,
-0.03826904296875,
0.0736083984375,
-0.057098388671875,
-0.047332763671875,
0.030792236328125,
0.0246429443359375,
0.0245819091796875,
-0.06622314453125,
-0.0309600830078125,
-0.0008835792541503906,
-0.031982421875,
0.016265869140625,
-0.0043487548828125,
0.018829345703125,
-0.011505126953125,
0.0265655517578125,
-0.01226043701171875,
0.011016845703125,
0.032958984375,
0.01035308837890625,
-0.0283660888671875,
0.05364990234375,
-0.039337158203125,
0.0250396728515625,
0.0012912750244140625,
-0.00215911865234375,
-0.0335693359375,
0.007534027099609375,
0.00470733642578125,
0.01372528076171875,
-0.00907135009765625,
-0.01715087890625,
0.01081085205078125,
0.006198883056640625,
0.0131378173828125,
0.0194549560546875,
-0.0156097412109375,
0.004360198974609375,
0.031494140625,
-0.02838134765625,
0.0033416748046875,
0.0031147003173828125,
-0.0180511474609375,
0.03271484375,
-0.045013427734375,
0.01451873779296875,
0.0225830078125,
0.036865234375,
-0.064697265625,
-0.01983642578125,
0.0303497314453125,
-0.00936126708984375,
-0.017669677734375,
0.0229034423828125,
0.069580078125,
-0.0053253173828125,
-0.005527496337890625,
-0.00785064697265625,
-0.078369140625,
-0.027374267578125,
0.007579803466796875,
-0.00984954833984375,
0.0008292198181152344,
-0.041534423828125,
-0.032135009765625,
0.01910400390625,
-0.03179931640625,
-0.013458251953125,
0.01248931884765625,
-0.042083740234375,
-0.041290283203125,
0.031768798828125,
-0.0185394287109375,
0.01715087890625,
0.01343536376953125,
-0.0230255126953125,
0.0221710205078125,
-0.055511474609375,
0.0039215087890625,
0.00614166259765625,
0.034423828125,
-0.030548095703125,
-0.02166748046875,
-0.004058837890625,
-0.0018062591552734375,
-0.0167999267578125,
0.0200958251953125,
-0.0037994384765625,
-0.0149688720703125,
-0.035369873046875,
-0.0252532958984375,
0.0277099609375,
0.055511474609375,
0.01047515869140625,
0.0213775634765625,
-0.033782958984375,
-0.036651611328125,
0.03253173828125,
-0.05682373046875,
0.005664825439453125,
0.11151123046875,
0.034759521484375,
0.02783203125,
0.024078369140625,
-0.00843048095703125,
0.050201416015625,
0.0016040802001953125,
-0.0285797119140625,
-0.0447998046875,
-0.015716552734375,
0.0280303955078125,
-0.027740478515625,
-0.00975799560546875,
0.018280029296875,
0.0029163360595703125,
-0.033172607421875,
-0.0099945068359375,
-0.01190948486328125,
-0.005962371826171875,
-0.00356292724609375,
-0.0311279296875,
0.0019702911376953125,
0.0228424072265625,
-0.01934814453125,
0.031829833984375,
-0.02471923828125,
0.0177459716796875,
0.034698486328125,
-0.0069427490234375,
-0.01934814453125,
-0.027587890625,
0.030487060546875,
-0.032440185546875,
0.0185546875,
0.00980377197265625,
0.04339599609375,
-0.0263214111328125,
-0.02447509765625,
0.0258941650390625,
0.0228729248046875,
0.00934600830078125,
0.0205078125,
0.0057220458984375,
-0.01215362548828125,
-0.018341064453125,
0.004634857177734375,
-0.003955841064453125,
0.01465606689453125,
0.007335662841796875,
-0.025848388671875,
0.044403076171875,
-0.0080108642578125,
0.01468658447265625,
-0.04364013671875,
0.004451751708984375,
-0.040313720703125,
-0.0239105224609375,
-0.010589599609375,
-0.07757568359375,
-0.0703125,
0.0276947021484375,
-0.0015764236450195312,
0.00753021240234375,
0.02996826171875,
0.0180206298828125,
0.019500732421875,
-0.03826904296875,
0.019561767578125,
0.022674560546875,
-0.0021495819091796875,
0.022674560546875,
0.00791168212890625,
0.06231689453125,
-0.00368499755859375,
0.026702880859375,
0.0134124755859375,
-0.048248291015625,
0.051239013671875,
-0.008544921875,
-0.056549072265625,
0.037750244140625,
-0.005092620849609375,
0.0626220703125,
0.0174713134765625,
0.010528564453125,
0.0218505859375,
-0.0023174285888671875,
-0.05987548828125,
-0.0033435821533203125,
-0.020111083984375,
-0.0216522216796875,
0.029541015625,
0.007526397705078125,
0.004535675048828125,
0.021026611328125,
0.01200103759765625,
0.006519317626953125,
0.0154571533203125,
-0.00556182861328125,
-0.0538330078125,
0.031646728515625,
-0.032745361328125,
0.04541015625,
0.00974273681640625,
-0.004451751708984375,
0.0037441253662109375,
0.01849365234375,
-0.00482177734375,
-0.06817626953125,
-0.047943115234375,
0.0283660888671875,
-0.0352783203125,
0.028656005859375,
-0.0188446044921875,
0.00801849365234375,
-0.0024585723876953125,
-0.0222015380859375,
0.004390716552734375,
0.0006699562072753906,
0.03729248046875,
-0.01371002197265625,
-0.017364501953125,
-0.0180816650390625,
0.014007568359375,
0.004543304443359375,
-0.031494140625,
0.039306640625,
0.044525146484375,
0.006378173828125,
-0.048248291015625,
0.0204010009765625,
0.001605987548828125,
-0.015869140625,
-0.036102294921875,
0.0243377685546875,
0.050811767578125,
0.019195556640625,
0.02020263671875,
0.01319122314453125,
0.035552978515625,
-0.0849609375,
0.00948333740234375,
-0.0103607177734375,
0.015289306640625,
0.01445770263671875,
0.0103759765625,
-0.017486572265625,
0.04168701171875,
-0.0064239501953125,
0.023773193359375,
0.02130126953125,
-0.0218963623046875,
-0.026702880859375,
0.00762939453125,
-0.01202392578125,
0.01418304443359375,
-0.022247314453125,
-0.026641845703125,
-0.005130767822265625,
0.0171356201171875,
-0.027252197265625,
0.014739990234375,
-0.0089569091796875,
-0.027069091796875,
-0.035858154296875,
0.039337158203125,
0.025634765625,
-0.0227508544921875,
0.0175323486328125,
0.0215911865234375,
-0.0080718994140625,
-0.038970947265625,
0.0184173583984375,
-0.0236358642578125,
0.005558013916015625,
-0.0146331787109375,
0.0330810546875,
0.03460693359375,
-0.0188446044921875,
0.0006351470947265625,
-0.03228759765625,
0.011474609375,
-0.040771484375,
0.028289794921875,
-0.0187530517578125,
0.02069091796875,
-0.01052093505859375,
-0.0254974365234375,
0.028106689453125,
0.0208892822265625,
-0.0535888671875,
0.0504150390625,
-0.0171051025390625,
0.0244140625,
-0.04107666015625,
0.030364990234375,
0.0235748291015625,
-0.029541015625,
0.0037097930908203125,
-0.0084381103515625,
0.0208892822265625,
-0.042877197265625,
0.0311126708984375,
-0.01160430908203125,
-0.0296478271484375,
0.00653076171875,
0.048858642578125,
0.0196685791015625,
-0.00797271728515625,
-0.0018138885498046875,
-0.02874755859375,
-0.0292510986328125,
-0.0292816162109375,
-0.060333251953125,
-0.02020263671875,
-0.0074005126953125,
-0.03497314453125,
0.0240020751953125,
0.019439697265625,
-0.0129547119140625,
-0.0193634033203125,
0.04791259765625,
0.0166168212890625,
0.0258331298828125,
-0.01751708984375,
-0.048065185546875,
-0.00731658935546875,
-0.05194091796875,
0.0306396484375,
-0.002994537353515625,
0.0035495758056640625,
0.00414276123046875,
0.0609130859375,
0.019256591796875,
-0.0036067962646484375,
0.04937744140625,
0.027435302734375,
0.007129669189453125,
0.00994110107421875,
0.0130615234375,
-0.0291748046875,
-0.02984619140625,
0.0055694580078125,
-0.01641845703125,
-0.0088958740234375,
0.0034465789794921875,
-0.0022182464599609375,
-0.00656890869140625,
-0.032806396484375,
0.041168212890625,
-0.033172607421875,
-0.02008056640625,
0.0279693603515625,
0.04522705078125,
-0.011260986328125,
0.00630950927734375,
-0.0255126953125,
-0.036895751953125,
0.0161285400390625,
0.03753662109375,
-0.013458251953125,
-0.007205963134765625,
-0.026031494140625,
0.00600433349609375,
-0.01202392578125,
0.032623291015625,
-0.010650634765625,
0.005062103271484375,
-0.01502227783203125,
-0.0194854736328125,
-0.015350341796875,
0.06719970703125,
-0.0093536376953125,
-0.0021457672119140625,
0.0253143310546875,
-0.0027370452880859375,
-0.017822265625,
-0.01511383056640625,
-0.0701904296875,
-0.040802001953125,
0.049407958984375,
-0.0101776123046875,
0.0271148681640625,
-0.034210205078125,
-0.02642822265625,
-0.030364990234375,
0.07794189453125,
-0.054534912109375,
-0.031097412109375,
0.0204315185546875,
0.018890380859375,
0.026580810546875,
-0.01403045654296875,
-0.0016317367553710938,
-0.039764404296875,
-0.08343505859375,
0.0095672607421875,
-0.013275146484375,
-0.02825927734375,
0.01441192626953125,
-0.0367431640625,
-0.013763427734375,
-0.06146240234375,
0.0364990234375,
0.01434326171875,
0.023406982421875,
0.0621337890625,
-0.0054168701171875,
0.03790283203125,
-0.033721923828125,
-0.0116729736328125,
-0.0187530517578125,
-0.00432586669921875,
-0.050048828125,
0.041717529296875,
0.05926513671875,
-0.042236328125,
0.0035228729248046875,
0.016357421875,
0.038482666015625,
0.00868988037109375,
0.0111083984375,
-0.0269927978515625,
0.0278778076171875,
0.005084991455078125,
0.0052642822265625,
-0.00887298583984375,
0.0100250244140625,
-0.001552581787109375,
-0.052337646484375,
0.0026111602783203125,
-0.021697998046875,
0.0219268798828125,
0.03167724609375,
-0.0416259765625,
-0.07415771484375,
-0.0419921875,
0.038055419921875,
-0.010833740234375,
0.0102386474609375,
0.0049285888671875,
-0.0170440673828125,
-0.034637451171875,
0.00876617431640625,
-0.0085296630859375,
-0.0304107666015625,
0.0140838623046875,
0.0211944580078125,
0.024322509765625,
-0.0233917236328125,
0.0335693359375,
0.00533294677734375,
0.0156402587890625,
-0.04046630859375,
0.06427001953125,
0.0037994384765625,
-0.01253509521484375,
0.09710693359375,
-0.0335693359375,
0.03607177734375,
-0.027435302734375,
0.022430419921875,
0.004695892333984375,
-0.0027179718017578125,
0.00957489013671875,
-0.011199951171875,
0.0029754638671875,
-0.00225830078125,
0.026275634765625,
-0.052978515625,
0.020843505859375,
0.041961669921875,
0.00836181640625,
0.0184783935546875,
-0.0241851806640625,
0.0114593505859375,
-0.0240936279296875,
0.039031982421875,
0.05169677734375,
0.07611083984375,
-0.01517486572265625,
0.0161285400390625,
0.027862548828125,
-0.0106658935546875,
-0.0310821533203125,
-0.00588226318359375,
-0.0196990966796875,
0.017669677734375,
-0.0020122528076171875,
-0.005695343017578125,
-0.0173797607421875,
-0.024566650390625,
0.1026611328125,
0.031463623046875,
-0.02655029296875,
0.01081085205078125,
-0.0218505859375,
0.0256805419921875,
-0.004150390625,
0.00908660888671875,
0.06805419921875,
-0.0294952392578125,
-0.0243988037109375,
-0.031341552734375,
-0.0217132568359375,
-0.0665283203125,
-0.060333251953125,
-0.023223876953125,
-0.01873779296875,
-0.0072021484375,
0.01239776611328125,
0.0281829833984375,
0.0205230712890625,
0.013275146484375,
-0.0227508544921875,
-0.01520538330078125,
0.0196380615234375,
0.01244354248046875,
0.0306854248046875,
0.007511138916015625,
-0.0218658447265625,
0.011566162109375,
0.042236328125,
0.0015211105346679688,
-0.0207672119140625,
0.0082550048828125,
0.0034809112548828125,
-0.01204681396484375,
0.0230255126953125,
0.0157928466796875,
0.004489898681640625,
0.0039520263671875,
0.07244873046875,
-0.03912353515625,
-0.128662109375,
-0.0272216796875,
0.055389404296875,
0.053863525390625,
-0.0794677734375,
-0.01971435546875,
-0.020111083984375,
-0.017120361328125,
-0.03155517578125,
0.0103302001953125,
-0.07122802734375,
0.02410888671875,
0.03863525390625,
-0.06634521484375,
-0.046875,
0.0105438232421875,
-0.10015869140625,
-0.0074920654296875,
-0.0088653564453125,
-0.018096923828125,
-0.00914764404296875,
-0.03729248046875,
0.02783203125,
-0.0097808837890625,
-0.0099639892578125,
0.01351165771484375,
-0.0002028942108154297,
0.051849365234375,
0.0248565673828125,
-0.044952392578125,
0.0020580291748046875,
-0.0035266876220703125,
0.011749267578125,
0.01251220703125,
-0.045867919921875,
0.00937652587890625,
-0.0215606689453125,
0.01474761962890625,
0.01032257080078125,
0.0123138427734375,
-0.006504058837890625,
-0.034759521484375,
0.0140838623046875,
0.0200653076171875,
0.012847900390625,
-0.0150909423828125,
0.0694580078125,
0.005809783935546875,
-0.0014982223510742188,
0.015533447265625,
0.04449462890625,
-0.0184173583984375,
0.00348663330078125,
0.01393890380859375,
-0.0209503173828125,
-0.017822265625,
-0.0369873046875,
-0.0101776123046875,
0.02667236328125,
0.061767578125,
-0.01508331298828125,
0.00255584716796875,
-0.0232391357421875,
-0.01641845703125,
-0.005840301513671875,
0.04510498046875,
0.0001443624496459961,
-0.00806427001953125,
0.045440673828125,
0.028106689453125,
0.0531005859375,
-0.032928466796875,
0.02349853515625,
-0.02734375,
-0.007755279541015625,
0.01271820068359375,
-0.01508331298828125,
-0.06414794921875,
0.0494384765625,
0.0802001953125,
0.0108184814453125,
0.05126953125,
0.0085906982421875,
0.0122833251953125,
0.021484375,
-0.043426513671875,
0.00238800048828125,
0.050628662109375,
0.057098388671875,
-0.017242431640625,
-0.020782470703125,
0.03045654296875,
-0.0246429443359375,
-0.004955291748046875,
0.03399658203125,
0.0604248046875,
-0.062164306640625,
0.0188446044921875,
0.01474761962890625,
0.0196533203125,
0.047637939453125,
0.01442718505859375,
-0.01155853271484375,
0.027496337890625,
-0.01428985595703125,
-0.024139404296875,
-0.02789306640625,
0.002429962158203125,
0.01285552978515625,
0.0018787384033203125,
0.0048828125,
-0.0023479461669921875,
-0.0174560546875,
-0.05987548828125,
-0.0380859375,
0.0313720703125,
-0.0615234375,
-0.0288238525390625,
-0.00653076171875,
0.0162353515625,
-0.020538330078125,
-0.06756591796875,
0.0103607177734375,
-0.0015439987182617188,
0.004856109619140625,
0.03509521484375,
-0.0180206298828125,
0.0293426513671875,
0.0167999267578125,
-0.006946563720703125,
0.0214996337890625,
-0.041412353515625,
0.025787353515625,
0.03155517578125,
-0.006526947021484375,
0.0266571044921875,
0.00899505615234375,
-0.048828125,
0.005706787109375,
-0.01251220703125,
-0.0078887939453125,
-0.01364898681640625,
-0.041473388671875,
0.06292724609375,
-0.0211944580078125,
-0.01904296875,
-0.001964569091796875,
0.024505615234375,
0.00786590576171875,
-0.0308837890625,
0.04742431640625,
-0.0941162109375,
-0.07684326171875,
0.0004601478576660156,
-0.05157470703125,
-0.006572723388671875,
-0.0399169921875,
-0.02349853515625,
0.080322265625,
-0.053619384765625,
0.005855560302734375,
0.01171875,
0.049713134765625,
0.012664794921875,
0.05419921875,
-0.046173095703125,
0.08099365234375,
0.0108642578125,
0.023101806640625,
-0.014801025390625,
0.01187896728515625,
0.01398468017578125,
-0.01611328125,
-0.01239776611328125,
0.00916290283203125,
-0.033538818359375,
0.00330352783203125,
0.0210418701171875,
0.03790283203125,
0.0273284912109375,
0.022125244140625,
-0.0223236083984375,
0.0127410888671875,
-0.0008053779602050781,
-0.031707763671875,
0.0181427001953125,
0.0028133392333984375,
-0.054473876953125,
-0.00756072998046875,
0.00960540771484375,
-0.0157928466796875,
-0.01039886474609375,
0.040863037109375,
-0.0709228515625,
0.018157958984375,
0.0307769775390625,
0.049560546875,
0.006076812744140625,
0.0269775390625,
0.01898193359375,
-0.00627899169921875,
0.00827789306640625,
-0.0232696533203125,
0.036590576171875,
0.01142120361328125,
-0.0024566650390625,
0.05572509765625,
0.034271240234375,
0.0008616447448730469,
-0.04132080078125,
-0.00859832763671875,
-0.01038360595703125,
-0.0203704833984375,
0.03729248046875,
0.0003044605255126953,
0.041748046875,
-0.0538330078125,
-0.0175323486328125,
0.0214080810546875,
0.048858642578125,
-0.0242462158203125,
-0.041046142578125,
-0.00612640380859375,
0.0144195556640625,
0.03802490234375,
0.028961181640625,
0.08673095703125,
-0.02142333984375,
-0.00392913818359375,
0.01134490966796875,
-0.0036869049072265625,
0.014190673828125,
0.01214599609375,
0.00537872314453125,
0.01561737060546875,
-0.0269927978515625,
0.02728271484375,
-0.02423095703125,
0.036895751953125,
0.0130462646484375,
0.00893402099609375,
-0.0311737060546875,
0.0450439453125,
-0.0012292861938476562,
0.0008897781372070312,
-0.01161956787109375,
0.00753021240234375,
-0.049774169921875,
0.0263671875,
-0.00978851318359375,
-0.039581298828125,
-0.04022216796875,
0.025543212890625,
0.016571044921875,
0.010711669921875,
0.0206298828125,
-0.026275634765625,
-0.055206298828125,
0.006252288818359375,
0.04315185546875,
-0.048431396484375,
-0.004993438720703125,
0.0009217262268066406,
-0.00231170654296875,
0.0433349609375,
0.00396728515625,
-0.0169219970703125,
0.02911376953125,
0.03497314453125,
-0.03399658203125,
0.00672149658203125,
-0.005390167236328125,
-0.046783447265625,
-0.02349853515625,
0.0102081298828125,
0.0382080078125,
0.006526947021484375,
-0.08148193359375,
-0.0160369873046875,
-0.0018405914306640625,
-0.045806884765625,
0.04364013671875,
0.05792236328125,
-0.038604736328125,
0.02825927734375,
0.042327880859375,
0.00542449951171875,
-0.0276031494140625,
-0.00940704345703125,
0.019134521484375,
-0.01158905029296875,
0.0202484130859375,
0.024200439453125,
-0.061920166015625,
-0.0157623291015625,
-0.017364501953125,
-0.006649017333984375,
0.053253173828125,
0.0214691162109375,
0.050994873046875,
0.034332275390625,
-0.0338134765625,
0.006374359130859375,
-0.042633056640625,
-0.025390625,
-0.01349639892578125,
-0.01386260986328125,
0.005031585693359375,
0.00763702392578125,
-0.08770751953125,
0.0131988525390625,
0.03594970703125,
-0.0229339599609375,
0.040283203125,
0.01507568359375,
0.00035691261291503906,
-0.046417236328125,
0.0304412841796875,
-0.0156097412109375,
-0.032867431640625,
-0.0250244140625,
-0.0102996826171875,
0.0183258056640625,
0.0479736328125,
0.03143310546875,
0.057586669921875,
0.00707244873046875,
-0.016815185546875,
-0.00510406494140625,
-0.042816162109375,
-0.0162506103515625,
0.02581787109375,
0.026885986328125,
0.022369384765625,
-0.007640838623046875,
-0.024749755859375,
0.017333984375,
0.001857757568359375,
-0.02288818359375,
0.0010366439819335938,
0.0023174285888671875,
0.080322265625,
0.06170654296875,
0.07623291015625,
-0.013671875,
0.0243682861328125,
0.0498046875,
-0.0009379386901855469,
0.03826904296875,
-0.021636962890625,
-0.05047607421875,
-0.0623779296875,
0.008880615234375,
-0.0023212432861328125,
-0.0264892578125,
-0.07537841796875,
-0.0596923828125,
0.004459381103515625,
0.036712646484375,
-0.00829315185546875,
-0.045135498046875,
0.0163726806640625,
-0.0298309326171875,
0.0419921875,
-0.039947509765625,
0.020050048828125,
-0.0261077880859375,
-0.03955078125,
-0.036529541015625,
0.0009250640869140625,
-0.04461669921875,
0.0323486328125,
-0.0112762451171875,
-0.031951904296875,
0.0186004638671875,
0.00933074951171875,
-0.0390625,
-0.05657958984375,
-0.03375244140625,
0.00008988380432128906,
-0.03729248046875,
-0.033294677734375,
0.00423431396484375,
-0.02520751953125,
0.0297698974609375,
0.0145721435546875,
0.001453399658203125,
-0.01158905029296875,
-0.0266571044921875,
0.00951385498046875,
-0.0312042236328125,
-0.02764892578125,
-0.056793212890625,
-0.0772705078125,
0.049957275390625,
0.00789642333984375,
-0.03857421875,
-0.032623291015625,
0.041595458984375,
-0.025604248046875,
-0.01241302490234375,
-0.007427215576171875,
-0.045379638671875,
0.042938232421875,
0.05712890625,
-0.0027027130126953125,
0.018951416015625,
0.01245880126953125,
0.01898193359375,
-0.0018949508666992188,
0.0183563232421875,
0.03240966796875,
-0.0239410400390625,
-0.004425048828125,
-0.0008683204650878906,
0.029052734375,
0.0288848876953125,
-0.0248565673828125,
0.047637939453125,
-0.004329681396484375,
-0.004241943359375,
0.01320648193359375,
-0.023529052734375,
-0.007640838623046875,
-0.00627899169921875,
0.025360107421875,
0.009979248046875,
0.00792694091796875,
-0.02325439453125,
-0.030059814453125,
-0.0211944580078125,
-0.01398468017578125,
0.0021209716796875,
0.0068359375,
-0.04388427734375,
0.00969696044921875,
-0.0146484375,
-0.0282745361328125,
-0.035888671875,
0.03564453125,
-0.051513671875,
0.005680084228515625,
0.042083740234375,
0.0228271484375,
-0.033416748046875,
-0.031890869140625,
0.055145263671875,
-0.037322998046875,
-0.007686614990234375,
-0.00821685791015625,
0.0263824462890625,
0.01306915283203125,
-0.02978515625,
-0.000980377197265625,
-0.0190582275390625,
-0.042266845703125,
0.001369476318359375,
-0.006801605224609375,
0.033447265625,
-0.02484130859375,
-0.038299560546875,
-0.035919189453125,
-0.0026702880859375,
0.0299835205078125,
-0.00501251220703125,
-0.037994384765625,
0.0067291259765625,
0.025909423828125,
0.0241546630859375,
-0.0176849365234375,
-0.006259918212890625,
-0.03094482421875,
0.043792724609375,
0.0237579345703125,
-0.0253448486328125,
0.043304443359375,
0.00586700439453125,
0.00759124755859375,
-0.032012939453125,
-0.00384521484375,
-0.055633544921875,
0.0286712646484375,
0.00390625,
-0.02056884765625,
0.030242919921875
] |
fc8da11a66c1a8ec0c965c86bcf66951a1d324f4
|
Wordpress Stackexchange
Q: Make my wordpress blog remember my login "forever" Is there a way to make Wordpress' "Remember Me" login checkbox work for a really long time, like a year? Currently I think it only works for a few days or a week max, usually I am not remembered.
A: Wordpress versions great than 2.4 store two cookies that set to expire in two weeks according to the Codex. According to this blog post (linked in the Codex), you can edit the wp_set_auth_cookie function in the pluggable.php file in the wp-includes folder of Wordpress. The exact line will depend on which version of Wordpress you are using.
What is probably better is to write or use a plug-in to replace the wp_set_auth_cookie function instead. If you edit the Wordpress core files, they will be replaced if you use the auto-updater or do a manual installation of Wordpress and copy the files without preserving whatever changes you made.
|
Q: Make my wordpress blog remember my login "forever" Is there a way to make Wordpress' "Remember Me" login checkbox work for a really long time, like a year? Currently I think it only works for a few days or a week max, usually I am not remembered.
A: Wordpress versions great than 2.4 store two cookies that set to expire in two weeks according to the Codex. According to this blog post (linked in the Codex), you can edit the wp_set_auth_cookie function in the pluggable.php file in the wp-includes folder of Wordpress. The exact line will depend on which version of Wordpress you are using.
What is probably better is to write or use a plug-in to replace the wp_set_auth_cookie function instead. If you edit the Wordpress core files, they will be replaced if you use the auto-updater or do a manual installation of Wordpress and copy the files without preserving whatever changes you made.
A:
I think I'll wait for such a plugin
Save this code in a file named set-cookie-expire.php and upload it your plugins folder.
The plugin will give you the ability to set a time (in days) that cookies expire within the WordPress Settings admin.
<?php
/**
* Plugin Name: Set Cookie Expire
* Plugin URI: http://wordpress.stackexchange.com/a/11991/1685
* Version: 0.1
* Description: Set the expire time for cookies in your <a href="options-general.php">general settings</a>.
* Author: WordPress Development Stack Exchange
* Author URI: http://wordpress.stackexchange.com/a/11991/1685
*/
/**
* Set our user-specified expire times.
*
* @param int $default
* @param int $user_id
* @param bool $remember
* @return int
*/
function wpse_11979_set_cookie_expire( $default, $user_id, $remember ) {
$days = get_option( $remember ? 'remember_cookie_expire' : 'normal_cookie_expire' );
if ( $days === false )
$days = $remember ? 14 : 2;
else
$days = ( int ) $days;
return $days * DAY_IN_SECONDS;
}
add_filter( 'auth_cookie_expiration', 'wpse_11979_set_cookie_expire', 10, 3 );
/**
* Register settings.
*/
function wpse_11979_set_cookie_expire_settings() {
$settings = array(
'normal_cookie_expire' => 'Normal Cookie Expire',
'remember_cookie_expire' => 'Remember Cookie Expire',
);
foreach ( $settings as $id => $label ) {
add_settings_field(
$id,
$label,
'wpse_11979_set_cookie_expire_field',
'general',
'default',
array(
'label_for' => $id,
)
);
register_setting( 'general', $id, 'absint' );
}
}
add_action( 'admin_init', 'wpse_11979_set_cookie_expire_settings' );
/**
* Render settings field.
*
* @param array $args
*/
function wpse_11979_set_cookie_expire_field( $args ) {
$id = $args['label_for'];
printf(
'<input id="%2$s" type="text" name="%2$s" value="%1$d" class="small-text" /> days',
( int ) get_option( $id, $id === 'normal_cookie_expire' ? 2 : 14 ),
$id
);
}
|
wordpress
|
{
"language": "en",
"length": 408,
"provenance": "stackexchange_00019.jsonl.gz:407734",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11979"
}
|
[
0.04931640625,
-0.003932952880859375,
0.0179901123046875,
-0.020294189453125,
-0.0009484291076660156,
-0.032806396484375,
0.0325927734375,
-0.033447265625,
0.00800323486328125,
0.02081298828125,
-0.01343536376953125,
-0.00861358642578125,
-0.0157470703125,
-0.02459716796875,
-0.0117645263671875,
-0.031982421875,
-0.005451202392578125,
0.02069091796875,
0.0186767578125,
-0.029632568359375,
0.026947021484375,
-0.0360107421875,
-0.0031909942626953125,
0.003238677978515625,
0.031707763671875,
-0.0291290283203125,
0.093505859375,
-0.030364990234375,
0.05950927734375,
-0.0082550048828125,
0.039306640625,
-0.049896240234375,
0.0079345703125,
0.055816650390625,
-0.06494140625,
-0.06488037109375,
-0.036163330078125,
0.03594970703125,
-0.0101318359375,
0.013671875,
-0.002964019775390625,
-0.0022945404052734375,
0.019134521484375,
-0.0176544189453125,
-0.01235198974609375,
-0.013763427734375,
-0.00991058349609375,
-0.0260467529296875,
0.0206146240234375,
0.0046844482421875,
0.001895904541015625,
0.0155487060546875,
0.0080718994140625,
0.018798828125,
-0.014678955078125,
0.0035114288330078125,
0.01154327392578125,
-0.01361846923828125,
0.033782958984375,
-0.036285400390625,
-0.0248565673828125,
-0.0236968994140625,
0.028961181640625,
0.006130218505859375,
-0.00948333740234375,
0.0170440673828125,
0.006488800048828125,
0.0029697418212890625,
-0.03875732421875,
0.004299163818359375,
0.036773681640625,
-0.043731689453125,
0.0012674331665039062,
-0.015838623046875,
-0.0164642333984375,
0.024383544921875,
-0.0011949539184570312,
0.0164947509765625,
0.014373779296875,
-0.006023406982421875,
0.0322265625,
0.007843017578125,
-0.0113983154296875,
-0.0173797607421875,
0.03265380859375,
0.0202178955078125,
0.0021820068359375,
-0.026214599609375,
-0.0163726806640625,
-0.051483154296875,
-0.0184478759765625,
-0.048583984375,
-0.034912109375,
-0.0042877197265625,
-0.0183258056640625,
-0.034027099609375,
0.0112152099609375,
0.051483154296875,
-0.0139007568359375,
-0.00873565673828125,
-0.0439453125,
-0.0020008087158203125,
-0.0302276611328125,
-0.02069091796875,
-0.00007396936416625977,
0.0692138671875,
0.046112060546875,
0.0494384765625,
0.0109710693359375,
-0.004810333251953125,
0.01348114013671875,
-0.03594970703125,
-0.0045013427734375,
-0.0435791015625,
0.0168304443359375,
0.02606201171875,
-0.016998291015625,
0.04705810546875,
0.0155792236328125,
0.023101806640625,
-0.038330078125,
-0.03985595703125,
-0.0197296142578125,
0.019989013671875,
0.0121002197265625,
-0.035736083984375,
-0.0158538818359375,
0.06268310546875,
0.00945281982421875,
0.026275634765625,
-0.057769775390625,
0.0191650390625,
0.048248291015625,
-0.01137542724609375,
-0.01308441162109375,
-0.02593994140625,
0.03387451171875,
-0.0236968994140625,
-0.006195068359375,
0.031036376953125,
-0.028778076171875,
-0.0517578125,
0.01288604736328125,
-0.0027484893798828125,
0.03326416015625,
0.0229644775390625,
0.03912353515625,
0.00794219970703125,
-0.012939453125,
-0.052886962890625,
0.03216552734375,
-0.01470947265625,
0.0168609619140625,
-0.00849151611328125,
-0.0009679794311523438,
-0.0299072265625,
-0.01331329345703125,
-0.0169830322265625,
0.0096435546875,
-0.01049041748046875,
0.0081787109375,
-0.0176849365234375,
0.0016021728515625,
-0.01215362548828125,
-0.0201416015625,
0.0087738037109375,
-0.041778564453125,
-0.005382537841796875,
0.026702880859375,
0.00928497314453125,
0.0024051666259765625,
-0.032806396484375,
0.0169219970703125,
-0.0112762451171875,
-0.0105133056640625,
0.0224456787109375,
-0.0290069580078125,
0.06317138671875,
0.041229248046875,
-0.0266571044921875,
-0.01131439208984375,
-0.0374755859375,
0.0843505859375,
-0.0147705078125,
-0.01309967041015625,
-0.0217742919921875,
0.0150299072265625,
0.0286102294921875,
-0.006015777587890625,
0.0306549072265625,
0.0019063949584960938,
0.0175323486328125,
-0.0487060546875,
0.053436279296875,
-0.0457763671875,
-0.0135498046875,
0.0017518997192382812,
0.041412353515625,
-0.039794921875,
-0.00978851318359375,
0.08270263671875,
-0.01568603515625,
0.003559112548828125,
-0.05804443359375,
-0.095947265625,
-0.0130767822265625,
-0.024017333984375,
0.0283203125,
0.0215606689453125,
0.01708984375,
0.0202484130859375,
0.0298919677734375,
-0.012542724609375,
-0.03289794921875,
-0.0491943359375,
0.005199432373046875,
-0.017791748046875,
0.0478515625,
0.005130767822265625,
0.043365478515625,
-0.01253509521484375,
-0.0157012939453125,
-0.0162811279296875,
-0.06085205078125,
0.00801849365234375,
-0.043365478515625,
-0.00911712646484375,
-0.0260009765625,
-0.01235198974609375,
-0.022796630859375,
-0.004825592041015625,
0.053558349609375,
0.00554656982421875,
0.032745361328125,
-0.0241241455078125,
-0.02587890625,
-0.033447265625,
-0.05682373046875,
0.0164031982421875,
0.04901123046875,
0.0455322265625,
-0.004119873046875,
-0.00321197509765625,
0.0197906494140625,
-0.0028095245361328125,
-0.06988525390625,
-0.0011739730834960938,
0.01343536376953125,
-0.001987457275390625,
0.03265380859375,
0.0157318115234375,
-0.01021575927734375,
0.01132965087890625,
-0.0283355712890625,
-0.01385498046875,
0.016876220703125,
-0.031280517578125,
0.0299072265625,
0.007381439208984375,
-0.00815582275390625,
-0.0215911865234375,
-0.051116943359375,
0.016876220703125,
-0.04595947265625,
-0.00811004638671875,
-0.018798828125,
0.0033168792724609375,
-0.014434814453125,
-0.0158843994140625,
-0.01219940185546875,
0.033233642578125,
-0.00843048095703125,
-0.0083465576171875,
0.00653076171875,
0.046173095703125,
-0.03656005859375,
-0.048828125,
0.0161590576171875,
0.0038661956787109375,
-0.0019741058349609375,
-0.0218963623046875,
0.0031490325927734375,
-0.0135040283203125,
-0.004863739013671875,
0.004947662353515625,
-0.031585693359375,
0.003875732421875,
-0.01105499267578125,
0.0209503173828125,
-0.0004968643188476562,
0.039703369140625,
-0.0026264190673828125,
-0.0264739990234375,
0.041900634765625,
-0.031036376953125,
-0.03997802734375,
-0.0294952392578125,
-0.043212890625,
0.04156494140625,
-0.0394287109375,
0.0115203857421875,
0.068115234375,
-0.00858306884765625,
0.042327880859375,
-0.017364501953125,
0.053009033203125,
-0.0177154541015625,
0.016754150390625,
-0.0018901824951171875,
-0.01007080078125,
-0.0003902912139892578,
0.0215911865234375,
0.02130126953125,
0.03570556640625,
0.01251220703125,
-0.03656005859375,
0.0133056640625,
0.0190582275390625,
-0.05230712890625,
-0.08447265625,
-0.067138671875,
-0.035614013671875,
0.00848388671875,
-0.00505828857421875,
-0.0016813278198242188,
0.007785797119140625,
0.012542724609375,
0.0125732421875,
-0.042449951171875,
-0.0247802734375,
0.01275634765625,
-0.05029296875,
-0.00501251220703125,
-0.0263824462890625,
0.007503509521484375,
-0.01093292236328125,
-0.018524169921875,
0.07159423828125,
-0.014923095703125,
-0.08721923828125,
-0.07049560546875,
0.016510009765625,
-0.004550933837890625,
-0.01824951171875,
-0.0178680419921875,
-0.0008678436279296875,
-0.00040912628173828125,
0.0010385513305664062,
-0.00830078125,
-0.004047393798828125,
-0.00030422210693359375,
-0.006336212158203125,
0.01300811767578125,
-0.0168914794921875,
0.01702880859375,
-0.0019683837890625,
-0.031463623046875,
0.030548095703125,
0.004116058349609375,
-0.0245208740234375,
0.005893707275390625,
0.0282745361328125,
-0.00457000732421875,
-0.0210723876953125,
0.0022869110107421875,
-0.03326416015625,
-0.00661468505859375,
-0.0077972412109375,
-0.028656005859375,
0.005840301513671875,
-0.00926971435546875,
-0.0308380126953125,
0.01255035400390625,
-0.009429931640625,
-0.043243408203125,
0.0208740234375,
0.02197265625,
-0.01751708984375,
-0.00666046142578125,
-0.0018758773803710938,
-0.0037593841552734375,
-0.018798828125,
-0.002147674560546875,
-0.055267333984375,
-0.06683349609375,
0.04656982421875,
-0.0438232421875,
-0.006866455078125,
-0.058380126953125,
-0.0270843505859375,
-0.008392333984375,
0.10809326171875,
-0.047882080078125,
-0.0011224746704101562,
0.01209259033203125,
0.00923919677734375,
-0.0110931396484375,
-0.01311492919921875,
-0.05841064453125,
-0.01401519775390625,
-0.0870361328125,
-0.00475311279296875,
-0.0006947517395019531,
-0.032379150390625,
0.00205230712890625,
0.009521484375,
-0.035491943359375,
-0.0501708984375,
0.02984619140625,
-0.0009274482727050781,
0.0245819091796875,
-0.030914306640625,
0.0203094482421875,
-0.039520263671875,
0.0272216796875,
-0.0244903564453125,
-0.060028076171875,
-0.0184478759765625,
-0.01000213623046875,
0.049102783203125,
0.0181884765625,
-0.0174407958984375,
0.00015425682067871094,
0.04083251953125,
-0.0032482147216796875,
-0.004161834716796875,
0.020660400390625,
0.00649261474609375,
0.01219940185546875,
0.02996826171875,
0.008514404296875,
-0.00901031494140625,
-0.0161895751953125,
-0.0266876220703125,
-0.01110076904296875,
0.030487060546875,
-0.014434814453125,
0.003398895263671875,
0.0145416259765625,
-0.0015172958374023438,
-0.0152130126953125,
-0.040863037109375,
-0.03033447265625,
0.0301055908203125,
0.0018548965454101562,
0.0146484375,
-0.06646728515625,
-0.03826904296875,
0.05499267578125,
0.0274200439453125,
-0.02880859375,
-0.0027484893798828125,
0.090087890625,
0.01898193359375,
-0.026824951171875,
-0.05499267578125,
-0.004856109619140625,
0.0194854736328125,
-0.0034427642822265625,
0.04754638671875,
0.007282257080078125,
-0.005001068115234375,
0.0806884765625,
-0.01180267333984375,
0.0010356903076171875,
-0.06787109375,
0.0733642578125,
-0.01540374755859375,
0.0005736351013183594,
0.003063201904296875,
-0.054412841796875,
0.046966552734375,
-0.0012502670288085938,
0.0050201416015625,
-0.017547607421875,
-0.00787353515625,
0.042755126953125,
0.0240020751953125,
-0.00821685791015625,
-0.030059814453125,
-0.044219970703125,
0.026336669921875,
-0.0767822265625,
0.01611328125,
0.0217742919921875,
-0.0169525146484375,
0.01922607421875,
-0.004047393798828125,
-0.031463623046875,
-0.0230712890625,
-0.0491943359375,
-0.01166534423828125,
-0.00933074951171875,
0.0013942718505859375,
-0.030242919921875,
-0.0013065338134765625,
-0.0235443115234375,
0.08697509765625,
0.0194091796875,
-0.06793212890625,
0.04827880859375,
-0.007732391357421875,
-0.0090484619140625,
0.032928466796875,
-0.044769287109375,
0.032318115234375,
0.0173797607421875,
-0.0029087066650390625,
-0.017120361328125,
-0.04547119140625,
-0.02471923828125,
-0.044219970703125,
0.01195526123046875,
-0.006702423095703125,
-0.005611419677734375,
0.0121917724609375,
0.032806396484375,
-0.0082244873046875,
0.01551055908203125,
-0.0069580078125,
0.048065185546875,
0.017120361328125,
0.04974365234375,
0.020477294921875,
-0.0269927978515625,
0.01177978515625,
0.0088958740234375,
-0.0228729248046875,
-0.0221710205078125,
-0.0254364013671875,
0.032470703125,
0.00470733642578125,
0.0312042236328125,
0.034515380859375,
-0.0178680419921875,
0.0223846435546875,
0.0196533203125,
0.0239410400390625,
-0.03021240234375,
-0.0684814453125,
0.012847900390625,
0.0208282470703125,
0.00275421142578125,
-0.0589599609375,
-0.01141357421875,
-0.019378662109375,
-0.064697265625,
-0.045074462890625,
0.06646728515625,
-0.03863525390625,
-0.0166168212890625,
-0.035064697265625,
-0.027862548828125,
-0.00833892822265625,
-0.0196075439453125,
-0.0140228271484375,
-0.0280609130859375,
0.01258087158203125,
-0.0018024444580078125,
0.007701873779296875,
-0.04388427734375,
0.01555633544921875,
-0.01409149169921875,
0.0092620849609375,
0.054351806640625,
0.014251708984375,
0.061370849609375,
0.031768798828125,
-0.051361083984375,
-0.0199432373046875,
-0.0217437744140625,
-0.0215911865234375,
-0.01438140869140625,
-0.01410675048828125,
-0.053253173828125,
0.007617950439453125,
0.01483917236328125,
0.025360107421875,
-0.0256195068359375,
-0.040557861328125,
-0.01325225830078125,
-0.00394439697265625,
0.0175933837890625,
0.04534912109375,
0.003570556640625,
0.00460052490234375,
0.00506591796875,
0.0012683868408203125,
0.002773284912109375,
0.003871917724609375,
0.0022220611572265625,
-0.0194549560546875,
0.04412841796875,
0.0203094482421875,
-0.052978515625,
-0.06365966796875,
-0.0033016204833984375,
0.01120758056640625,
0.08489990234375,
-0.03924560546875,
0.0298309326171875,
-0.004825592041015625,
0.0165557861328125,
-0.01849365234375,
0.0011434555053710938,
-0.03546142578125,
-0.006443023681640625,
0.031707763671875,
-0.04278564453125,
0.01483154296875,
0.025970458984375,
0.0001430511474609375,
0.01354217529296875,
-0.03338623046875,
0.0162506103515625,
0.047760009765625,
-0.034820556640625,
0.0258331298828125,
-0.008392333984375,
0.0267486572265625,
0.0404052734375,
-0.0172271728515625,
0.048431396484375,
-0.0019130706787109375,
0.003414154052734375,
-0.050079345703125,
-0.00653839111328125,
0.005584716796875,
-0.010009765625,
-0.02532958984375,
-0.00791168212890625,
-0.01349639892578125,
0.01322174072265625,
0.02532958984375,
0.054046630859375,
-0.0282440185546875,
0.00882720947265625,
-0.007213592529296875,
-0.02069091796875,
0.052734375,
-0.0135650634765625,
-0.0150146484375,
-0.0426025390625,
0.0487060546875,
0.0139312744140625,
-0.01025390625,
0.01345062255859375,
0.0019683837890625,
0.0081634521484375,
0.03240966796875,
0.046722412109375,
-0.00030493736267089844,
-0.09368896484375,
-0.029541015625,
0.05438232421875,
-0.020660400390625,
-0.01395416259765625,
-0.0157928466796875,
-0.0047607421875,
-0.045013427734375,
-0.06927490234375,
-0.0262603759765625,
-0.0265960693359375,
-0.0171966552734375,
0.03057861328125,
-0.0006852149963378906,
0.05609130859375,
0.039337158203125,
0.005615234375,
-0.0004029273986816406,
-0.01329803466796875,
-0.00461578369140625,
0.0276947021484375,
-0.0401611328125,
0.025634765625,
0.007190704345703125,
-0.03826904296875,
0.01326751708984375,
0.0077056884765625,
-0.059844970703125,
-0.017333984375,
-0.0237579345703125,
0.0784912109375,
-0.035308837890625,
-0.0066070556640625,
0.018951416015625,
0.02001953125,
-0.00499725341796875,
-0.03765869140625,
0.04193115234375,
-0.06884765625,
-0.0175628662109375,
-0.0060882568359375,
-0.01556396484375,
-0.01873779296875,
-0.043914794921875,
-0.069091796875,
0.1488037109375,
0.0069732666015625,
0.0094146728515625,
-0.029083251953125,
0.0826416015625,
-0.0276336669921875,
0.0654296875,
-0.01995849609375,
0.05023193359375,
-0.01206207275390625,
0.01113128662109375,
-0.01617431640625,
-0.003971099853515625,
-0.007595062255859375,
0.0010652542114257812,
0.04681396484375,
0.0178375244140625,
-0.026885986328125,
-0.03338623046875,
-0.0142822265625,
-0.003215789794921875,
-0.0255279541015625,
0.058563232421875,
-0.0291595458984375,
0.0212249755859375,
0.0238800048828125,
-0.051055908203125,
0.0175018310546875,
-0.0095672607421875,
-0.025390625,
-0.01264190673828125,
0.00005066394805908203,
-0.007610321044921875,
-0.006103515625,
0.0293426513671875,
-0.0278472900390625,
0.0025482177734375,
0.01244354248046875,
0.01245880126953125,
-0.0078887939453125,
0.03057861328125,
0.00966644287109375,
-0.0178985595703125,
-0.0002238750457763672,
-0.027130126953125,
0.0380859375,
-0.0117645263671875,
0.0279083251953125,
0.019989013671875,
0.020111083984375,
0.00226593017578125,
0.0156707763671875,
0.01971435546875,
0.0418701171875,
-0.05078125,
0.027099609375,
0.0248565673828125,
0.0274658203125,
-0.044677734375,
-0.0110626220703125,
0.0657958984375,
0.060943603515625,
-0.0231475830078125,
-0.041473388671875,
-0.00788116455078125,
0.0002493858337402344,
0.0302734375,
-0.010498046875,
0.04541015625,
0.00838470458984375,
0.005603790283203125,
0.0411376953125,
0.013397216796875,
0.007457733154296875,
-0.02978515625,
0.031402587890625,
0.109619140625,
-0.03082275390625,
0.046600341796875,
-0.005523681640625,
-0.009918212890625,
-0.013397216796875,
-0.0205535888671875,
0.0182037353515625,
-0.016204833984375,
0.05108642578125,
0.027618408203125,
0.004230499267578125,
0.0186920166015625,
0.017730712890625,
-0.0222930908203125,
-0.01273345947265625,
-0.035064697265625,
0.0203704833984375,
0.0289764404296875,
-0.00007855892181396484,
-0.0015201568603515625,
0.05596923828125,
0.049224853515625,
-0.038543701171875,
-0.0221710205078125,
0.023834228515625,
-0.02435302734375,
0.0237274169921875,
-0.0272369384765625,
0.0220947265625,
0.0243682861328125,
-0.011993408203125,
-0.00661468505859375,
0.003322601318359375,
0.046844482421875,
0.0031032562255859375,
0.020263671875,
0.00469207763671875,
-0.0178985595703125,
-0.01410675048828125,
0.0100555419921875,
0.031005859375,
0.032806396484375,
-0.0015115737915039062,
0.0189056396484375,
-0.023223876953125,
-0.0506591796875,
0.0066680908203125,
0.0206146240234375,
-0.0253143310546875,
0.023284912109375,
0.011932373046875,
0.00829315185546875,
-0.0011119842529296875,
0.002521514892578125,
-0.005168914794921875,
-0.033843994140625,
0.03692626953125,
-0.01296234130859375,
-0.07696533203125,
-0.038177490234375,
-0.04742431640625,
0.0284881591796875,
0.034942626953125,
0.0244293212890625,
0.032073974609375,
0.0249176025390625,
-0.02227783203125,
-0.00670623779296875,
-0.0150604248046875,
-0.0100250244140625,
-0.020782470703125,
-0.002422332763671875,
-0.0035419464111328125,
0.01085662841796875,
-0.0238800048828125,
0.08795166015625,
-0.032440185546875,
0.0288543701171875,
0.062225341796875,
-0.041107177734375,
-0.0097503662109375,
0.0114898681640625,
0.005889892578125,
-0.0382080078125,
-0.059295654296875,
-0.0249786376953125,
0.0278778076171875,
-0.01343536376953125,
-0.03936767578125,
-0.05712890625,
0.04388427734375,
-0.01171875,
-0.01473236083984375,
0.00765228271484375,
-0.05206298828125,
-0.004848480224609375,
0.014007568359375,
0.03369140625,
0.0036907196044921875,
-0.038330078125,
-0.0281219482421875,
-0.0156402587890625,
0.00521087646484375,
-0.0478515625,
-0.00868988037109375,
-0.0408935546875,
0.0419921875,
0.072998046875,
0.04876708984375,
-0.039794921875,
0.0215301513671875,
0.077880859375,
-0.02020263671875,
0.05718994140625,
-0.0501708984375,
-0.0423583984375,
-0.036285400390625,
-0.0011453628540039062,
0.02001953125,
-0.01495361328125,
-0.04852294921875,
-0.038055419921875,
0.0369873046875,
0.01123809814453125,
0.00800323486328125,
-0.05169677734375,
0.0323486328125,
-0.016082763671875,
0.053802490234375,
0.006076812744140625,
-0.0192108154296875,
0.00032067298889160156,
0.016448974609375,
0.0005440711975097656,
-0.0026798248291015625,
-0.042999267578125,
0.0119781494140625,
-0.0196990966796875,
-0.024322509765625,
0.0288238525390625,
0.007709503173828125,
-0.0259552001953125,
-0.047332763671875,
-0.033203125,
0.0003151893615722656,
-0.044342041015625,
-0.006439208984375,
0.04022216796875,
-0.0084228515625,
-0.020904541015625,
-0.062347412109375,
0.0005021095275878906,
-0.038543701171875,
-0.0015382766723632812,
0.008056640625,
-0.01145172119140625,
0.00807952880859375,
-0.03509521484375,
-0.0714111328125,
0.012542724609375,
0.00502777099609375,
-0.040496826171875,
-0.08148193359375,
-0.0009317398071289062,
-0.0018625259399414062,
0.019744873046875,
-0.023895263671875,
0.004425048828125,
-0.0252685546875,
0.052276611328125,
0.0007915496826171875,
0.023193359375,
-0.00518798828125,
0.03985595703125,
-0.0025272369384765625,
0.05145263671875,
0.037506103515625,
-0.012969970703125,
0.04058837890625,
-0.00244903564453125,
0.0286712646484375,
0.0628662109375,
-0.045989990234375,
0.0245361328125,
-0.04437255859375,
-0.0155792236328125,
-0.0079345703125,
-0.02752685546875,
0.00562286376953125,
0.0111236572265625,
0.0416259765625,
-0.0006041526794433594,
-0.0009655952453613281,
-0.0316162109375,
-0.00798797607421875,
-0.01532745361328125,
0.00511932373046875,
-0.00160980224609375,
-0.0017900466918945312,
-0.016510009765625,
-0.0011453628540039062,
-0.02972412109375,
-0.015777587890625,
0.001682281494140625,
-0.008392333984375,
-0.0279541015625,
0.00794219970703125,
0.0328369140625,
0.00955963134765625,
-0.018768310546875,
0.0092620849609375,
0.0289154052734375,
-0.017242431640625,
0.016143798828125,
-0.003604888916015625,
0.00743865966796875,
0.038482666015625,
0.041778564453125,
0.038665771484375,
0.04083251953125,
-0.050018310546875,
-0.016387939453125,
0.0220489501953125,
-0.01399993896484375,
-0.0198211669921875,
-0.036041259765625,
-0.006877899169921875,
-0.00487518310546875,
-0.0191497802734375,
-0.00850677490234375,
0.0240325927734375,
-0.0153961181640625,
-0.0235595703125,
0.05596923828125,
0.0110015869140625,
-0.062347412109375,
-0.0183563232421875,
0.029541015625,
-0.00435638427734375,
-0.0155181884765625,
0.00548553466796875,
-0.01267242431640625,
0.026641845703125,
-0.008758544921875,
0.1002197265625,
-0.0113067626953125,
0.0190277099609375,
-0.060394287109375,
0.002696990966796875,
0.00336456298828125
] |
20d410f0473d8e7fef1f54c4e6691b8ed6688765
|
Wordpress Stackexchange
Q: Wordpress hook before inserting post into database I need to do check the inserted post for certain keywords and perform some functions depending on the keywords found.
is there a wordpress hook that executes "just before the post is inserted into the database" ? Or will i have to modify wordpress core ?
Also, i will need to prevent the post from being inserted into the database if some keywords are found. is this something that can be done with a hook ? Or will a core modification be needed ?
A: Available actions:
*
*pre_post_update - Runs just before a post or page is updated.
*publish_post - Runs when a post is published, or if it is edited and its status is "published".
*save_post - Runs whenever a post or page is created or updated, which could be from an import, post/page edit form, xmlrpc, or post by email.
*wp_insert_post - Same as save_post, runs immediately afterwards.
More info: Plugin API/Action Reference
Usage:
<?php
add_action('action_name', 'callback_name');
|
Q: Wordpress hook before inserting post into database I need to do check the inserted post for certain keywords and perform some functions depending on the keywords found.
is there a wordpress hook that executes "just before the post is inserted into the database" ? Or will i have to modify wordpress core ?
Also, i will need to prevent the post from being inserted into the database if some keywords are found. is this something that can be done with a hook ? Or will a core modification be needed ?
A: Available actions:
*
*pre_post_update - Runs just before a post or page is updated.
*publish_post - Runs when a post is published, or if it is edited and its status is "published".
*save_post - Runs whenever a post or page is created or updated, which could be from an import, post/page edit form, xmlrpc, or post by email.
*wp_insert_post - Same as save_post, runs immediately afterwards.
More info: Plugin API/Action Reference
Usage:
<?php
add_action('action_name', 'callback_name');
A: The hook is save_post:
add_action('save_post', 'dosomething'), 10, 2);
A: the hook is wp_insert_post_data
which as two parameters ($data, $postarr) and its a filter hook that fires before inserting the post into the database so:
add_filter('wp_insert_post_data','callback_function');
as for save_post hook it happens after inserting the post to database.
|
wordpress
|
{
"language": "en",
"length": 216,
"provenance": "stackexchange_00019.jsonl.gz:407739",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/11993"
}
|
[
0.0357666015625,
0.0034847259521484375,
-0.006465911865234375,
0.0104522705078125,
0.006988525390625,
-0.039947509765625,
0.089599609375,
-0.028594970703125,
0.005672454833984375,
0.01290130615234375,
-0.0406494140625,
0.033477783203125,
-0.01067352294921875,
-0.01049041748046875,
0.0208587646484375,
-0.01389312744140625,
0.0262451171875,
-0.01318359375,
0.041961669921875,
-0.016204833984375,
0.00722503662109375,
0.0012216567993164062,
0.052490234375,
0.0004341602325439453,
0.01239776611328125,
-0.01934814453125,
0.06597900390625,
-0.01274871826171875,
0.042449951171875,
0.0218048095703125,
0.039398193359375,
-0.0748291015625,
0.0167236328125,
0.0287017822265625,
-0.023223876953125,
0.04840087890625,
-0.00701904296875,
0.0269622802734375,
0.009857177734375,
0.0296783447265625,
0.0312347412109375,
-0.00519561767578125,
0.01541900634765625,
0.036895751953125,
-0.0158843994140625,
-0.038055419921875,
0.039337158203125,
-0.0223846435546875,
0.0285797119140625,
-0.026519775390625,
0.01959228515625,
0.032318115234375,
0.027862548828125,
-0.00745391845703125,
-0.010223388671875,
0.027618408203125,
-0.0819091796875,
0.0467529296875,
0.041290283203125,
0.061614990234375,
-0.006595611572265625,
-0.0298614501953125,
-0.005825042724609375,
-0.06805419921875,
0.0217437744140625,
0.0010585784912109375,
0.035980224609375,
0.017425537109375,
-0.0677490234375,
0.01418304443359375,
0.03619384765625,
-0.0521240234375,
-0.0172576904296875,
-0.0012378692626953125,
-0.005321502685546875,
-0.004497528076171875,
0.05194091796875,
0.0115203857421875,
-0.0221099853515625,
0.036407470703125,
0.0282135009765625,
-0.0005211830139160156,
0.044158935546875,
-0.03790283203125,
-0.00934600830078125,
-0.03948974609375,
-0.00801849365234375,
0.01580810546875,
-0.024139404296875,
-0.029937744140625,
-0.0291595458984375,
0.021759033203125,
-0.0270538330078125,
-0.045501708984375,
-0.0281524658203125,
-0.022552490234375,
-0.006649017333984375,
0.0391845703125,
-0.02325439453125,
0.021240234375,
-0.01500701904296875,
-0.02362060546875,
0.03521728515625,
-0.04022216796875,
-0.0050048828125,
0.0260162353515625,
-0.00817108154296875,
-0.050048828125,
-0.007781982421875,
0.020355224609375,
-0.01293182373046875,
-0.0161590576171875,
0.005535125732421875,
-0.01265716552734375,
-0.024200439453125,
-0.0045013427734375,
-0.0190887451171875,
-0.004192352294921875,
0.005855560302734375,
-0.0069580078125,
-0.002826690673828125,
0.013916015625,
-0.0108642578125,
-0.074951171875,
0.0338134765625,
-0.01473236083984375,
-0.040435791015625,
0.00670623779296875,
-0.032867431640625,
0.0260772705078125,
-0.0084686279296875,
0.0114288330078125,
0.08984375,
0.042236328125,
0.004047393798828125,
-0.021881103515625,
-0.01175689697265625,
0.01015472412109375,
0.0047607421875,
0.00046563148498535156,
-0.01168060302734375,
-0.060577392578125,
-0.0203857421875,
0.0034351348876953125,
0.041259765625,
0.0311737060546875,
0.00817108154296875,
0.00946044921875,
0.0257110595703125,
-0.0171051025390625,
0.0008230209350585938,
-0.00450897216796875,
0.033599853515625,
0.0029850006103515625,
-0.00492095947265625,
-0.0282745361328125,
-0.0012750625610351562,
-0.0214080810546875,
0.00685882568359375,
-0.0190582275390625,
-0.01428985595703125,
-0.0260467529296875,
0.0054473876953125,
-0.0360107421875,
-0.051025390625,
0.031890869140625,
-0.03497314453125,
0.009765625,
0.0219268798828125,
0.022979736328125,
0.01360321044921875,
0.035736083984375,
0.035125732421875,
-0.0084381103515625,
-0.020965576171875,
-0.034393310546875,
0.005588531494140625,
-0.0174560546875,
0.046173095703125,
0.0084686279296875,
-0.0166473388671875,
-0.0089111328125,
0.055023193359375,
-0.0155181884765625,
-0.0374755859375,
0.057464599609375,
0.033782958984375,
0.0831298828125,
-0.0341796875,
0.030609130859375,
0.007659912109375,
0.0496826171875,
-0.029266357421875,
0.04498291015625,
-0.0188140869140625,
-0.03607177734375,
0.0025882720947265625,
0.01313018798828125,
-0.028106689453125,
-0.02069091796875,
0.003948211669921875,
0.026611328125,
-0.02520751953125,
0.01261138916015625,
-0.07318115234375,
0.0006613731384277344,
-0.026947021484375,
0.039642333984375,
-0.017791748046875,
0.0088348388671875,
0.0240325927734375,
0.001972198486328125,
0.004261016845703125,
-0.0687255859375,
-0.043365478515625,
-0.025543212890625,
-0.052764892578125,
0.01049041748046875,
0.0007810592651367188,
0.065185546875,
-0.007190704345703125,
-0.0178070068359375,
-0.019866943359375,
-0.059326171875,
0.04095458984375,
-0.008819580078125,
-0.007114410400390625,
-0.0150604248046875,
0.01275634765625,
0.0234375,
-0.038330078125,
0.0013828277587890625,
0.045074462890625,
0.017669677734375,
-0.036712646484375,
-0.011016845703125,
-0.0207672119140625,
-0.06658935546875,
0.0063018798828125,
0.06494140625,
0.0184173583984375,
0.050567626953125,
-0.013824462890625,
-0.0135498046875,
0.008453369140625,
-0.04583740234375,
0.01552581787109375,
-0.016448974609375,
0.0289459228515625,
0.10614013671875,
-0.0321044921875,
0.028228759765625,
-0.0137939453125,
-0.07830810546875,
-0.0010061264038085938,
0.04815673828125,
-0.0174560546875,
-0.042022705078125,
-0.0186920166015625,
-0.0029144287109375,
0.02008056640625,
-0.05987548828125,
-0.050048828125,
-0.005645751953125,
-0.0025463104248046875,
-0.0284881591796875,
0.01386260986328125,
0.00795745849609375,
0.0077362060546875,
-0.033416748046875,
0.0190277099609375,
-0.00928497314453125,
-0.0025691986083984375,
0.036346435546875,
0.01071929931640625,
0.028533935546875,
-0.04827880859375,
0.00507354736328125,
0.006473541259765625,
0.0200653076171875,
-0.0262603759765625,
0.02545166015625,
0.002681732177734375,
-0.0163726806640625,
-0.015960693359375,
-0.039825439453125,
0.006252288818359375,
-0.0205841064453125,
-0.006771087646484375,
-0.029510498046875,
-0.006252288818359375,
0.0172119140625,
-0.031402587890625,
0.04364013671875,
0.0140838623046875,
-0.032440185546875,
-0.0384521484375,
-0.033447265625,
0.023956298828125,
-0.0148773193359375,
0.0030269622802734375,
0.06964111328125,
0.0195465087890625,
0.004901885986328125,
0.0008378028869628906,
-0.0260772705078125,
-0.01258087158203125,
0.00835418701171875,
-0.019073486328125,
-0.0263671875,
-0.042266845703125,
0.0254058837890625,
0.0224151611328125,
0.06610107421875,
-0.01934814453125,
-0.048065185546875,
0.0098876953125,
0.0199432373046875,
-0.0421142578125,
-0.06927490234375,
-0.0465087890625,
-0.01898193359375,
-0.0026798248291015625,
-0.0075531005859375,
0.01430511474609375,
0.00583648681640625,
-0.0079193115234375,
0.0008873939514160156,
-0.054229736328125,
-0.025054931640625,
-0.0225067138671875,
-0.05584716796875,
-0.030059814453125,
0.044219970703125,
0.008056640625,
0.01531219482421875,
0.0052490234375,
0.0882568359375,
0.01065826416015625,
-0.0572509765625,
0.0058135986328125,
-0.0311431884765625,
-0.049346923828125,
0.010711669921875,
-0.019622802734375,
-0.0251617431640625,
0.017547607421875,
-0.00933837890625,
0.008544921875,
0.0002713203430175781,
0.0228118896484375,
-0.00811767578125,
-0.01325225830078125,
-0.015777587890625,
0.01093292236328125,
0.035003662109375,
0.007640838623046875,
-0.0024013519287109375,
0.0408935546875,
-0.03924560546875,
0.027099609375,
-0.0127716064453125,
-0.030670166015625,
-0.035919189453125,
-0.00704193115234375,
0.0083465576171875,
-0.0117950439453125,
-0.010528564453125,
-0.003421783447265625,
-0.0014123916625976562,
0.0096435546875,
0.012481689453125,
-0.00246429443359375,
-0.0247955322265625,
-0.0294189453125,
-0.01421356201171875,
0.0002651214599609375,
-0.006366729736328125,
0.0264739990234375,
-0.006744384765625,
0.0462646484375,
-0.016998291015625,
0.044952392578125,
-0.06109619140625,
-0.01788330078125,
0.01499176025390625,
-0.017578125,
0.04986572265625,
-0.042236328125,
-0.018218994140625,
-0.0038318634033203125,
0.0682373046875,
-0.034820556640625,
0.000038623809814453125,
-0.00733184814453125,
0.004619598388671875,
-0.01227569580078125,
-0.022613525390625,
-0.068359375,
-0.005573272705078125,
-0.0245513916015625,
0.011627197265625,
-0.00788116455078125,
0.0006957054138183594,
-0.033111572265625,
0.03680419921875,
-0.0276947021484375,
-0.019256591796875,
0.033843994140625,
-0.03619384765625,
0.0229644775390625,
0.0200653076171875,
-0.01483154296875,
0.009552001953125,
-0.0225067138671875,
-0.030029296875,
-0.0809326171875,
-0.0043487548828125,
-0.0205841064453125,
0.02740478515625,
0.02337646484375,
-0.0394287109375,
-0.024871826171875,
0.00936126708984375,
0.0184173583984375,
0.0259857177734375,
0.0236358642578125,
0.02813720703125,
-0.0111083984375,
-0.035919189453125,
0.0189208984375,
-0.04522705078125,
0.0013780593872070312,
-0.0007467269897460938,
-0.0013513565063476562,
0.0213470458984375,
-0.04962158203125,
-0.023040771484375,
-0.01351165771484375,
-0.023468017578125,
-0.00020313262939453125,
-0.042205810546875,
-0.015380859375,
0.0263671875,
0.0002841949462890625,
0.004131317138671875,
-0.048095703125,
-0.0218658447265625,
0.03173828125,
-0.03680419921875,
0.0138092041015625,
-0.0083770751953125,
0.089111328125,
0.0181884765625,
0.009246826171875,
0.00960540771484375,
-0.0061187744140625,
0.036102294921875,
-0.0077056884765625,
0.036468505859375,
0.0201873779296875,
-0.01508331298828125,
0.031463623046875,
0.01300048828125,
-0.0145111083984375,
-0.034820556640625,
0.0631103515625,
0.0122222900390625,
0.0160064697265625,
-0.0170745849609375,
-0.01629638671875,
0.0416259765625,
-0.00705718994140625,
-0.0194549560546875,
-0.0180206298828125,
0.0089874267578125,
0.02581787109375,
-0.038330078125,
0.07928466796875,
-0.01078033447265625,
-0.007110595703125,
-0.0022296905517578125,
0.061248779296875,
-0.03167724609375,
0.007305145263671875,
0.0130462646484375,
-0.032012939453125,
-0.01058197021484375,
-0.023162841796875,
0.0003829002380371094,
-0.0116119384765625,
-0.00689697265625,
0.010955810546875,
-0.01439666748046875,
-0.0302581787109375,
-0.003040313720703125,
0.001739501953125,
0.0039215087890625,
-0.01898193359375,
-0.050262451171875,
-0.027587890625,
-0.005168914794921875,
0.01479339599609375,
0.0304107666015625,
0.003131866455078125,
0.013427734375,
0.028076171875,
0.00003713369369506836,
-0.00885009765625,
-0.0005307197570800781,
0.01279449462890625,
-0.0221099853515625,
-0.0291900634765625,
0.0151824951171875,
-0.0218505859375,
0.04296875,
-0.025238037109375,
0.00934600830078125,
-0.0120086669921875,
-0.0232696533203125,
0.07427978515625,
0.064208984375,
0.0099029541015625,
0.0153656005859375,
0.004123687744140625,
0.00926971435546875,
-0.0362548828125,
-0.0222625732421875,
-0.0309600830078125,
0.011383056640625,
-0.0190582275390625,
-0.00710296630859375,
-0.021942138671875,
-0.039337158203125,
0.07574462890625,
-0.0027923583984375,
-0.0185394287109375,
0.05657958984375,
0.044219970703125,
-0.03851318359375,
-0.0173797607421875,
0.0078887939453125,
0.0192413330078125,
0.0019092559814453125,
0.023681640625,
0.02166748046875,
0.023040771484375,
0.0310821533203125,
-0.0262603759765625,
0.0234375,
-0.0401611328125,
-0.0254669189453125,
0.00466156005859375,
-0.0325927734375,
-0.018035888671875,
0.05029296875,
0.027313232421875,
-0.0247650146484375,
-0.011322021484375,
0.008331298828125,
0.0003561973571777344,
0.0132904052734375,
-0.03863525390625,
0.0007076263427734375,
-0.01201629638671875,
-0.0032711029052734375,
0.0396728515625,
0.005184173583984375,
0.01113128662109375,
-0.00945281982421875,
-0.025421142578125,
-0.03948974609375,
0.012237548828125,
0.0003306865692138672,
-0.0333251953125,
-0.011871337890625,
0.0010919570922851562,
0.00266265869140625,
0.0005741119384765625,
-0.01200103759765625,
0.0133056640625,
0.023895263671875,
-0.001911163330078125,
-0.0092926025390625,
-0.0207977294921875,
0.0860595703125,
-0.0109100341796875,
0.040618896484375,
0.0037689208984375,
0.03485107421875,
-0.005954742431640625,
-0.005229949951171875,
-0.0245361328125,
-0.07220458984375,
0.0008955001831054688,
0.0290985107421875,
0.01306915283203125,
0.0399169921875,
-0.00765228271484375,
0.01335906982421875,
-0.0161590576171875,
0.01251983642578125,
0.0027370452880859375,
-0.00775909423828125,
0.01059722900390625,
0.04534912109375,
-0.0341796875,
0.065673828125,
-0.034271240234375,
-0.0009484291076660156,
0.006237030029296875,
-0.003509521484375,
0.0200347900390625,
-0.0217742919921875,
0.00402069091796875,
0.018890380859375,
0.01326751708984375,
0.0193328857421875,
0.0596923828125,
0.006786346435546875,
0.058197021484375,
0.0219268798828125,
0.016632080078125,
0.004547119140625,
-0.004119873046875,
-0.058868408203125,
-0.0438232421875,
0.053070068359375,
0.01678466796875,
-0.0322265625,
0.07415771484375,
-0.02838134765625,
0.006465911865234375,
0.048309326171875,
0.043975830078125,
-0.0550537109375,
-0.0029430389404296875,
0.006992340087890625,
-0.05096435546875,
-0.0214385986328125,
-0.0199432373046875,
0.006046295166015625,
-0.0156707763671875,
0.062164306640625,
0.0184326171875,
-0.0077667236328125,
0.035491943359375,
-0.0038967132568359375,
-0.01087188720703125,
-0.048828125,
0.00811004638671875,
0.0090789794921875,
-0.0211029052734375,
0.049285888671875,
-0.00164794921875,
0.01476287841796875,
-0.032257080078125,
0.0161895751953125,
0.003910064697265625,
-0.0171966552734375,
-0.06640625,
0.01142120361328125,
0.0019245147705078125,
-0.0130615234375,
0.007381439208984375,
0.00536346435546875,
0.035400390625,
0.04180908203125,
0.00579071044921875,
-0.020721435546875,
0.0340576171875,
-0.0098724365234375,
-0.08770751953125,
-0.007442474365234375,
0.0204315185546875,
0.042144775390625,
-0.039642333984375,
0.0302276611328125,
-0.04083251953125,
-0.00911712646484375,
0.00542449951171875,
-0.01922607421875,
0.05950927734375,
-0.04119873046875,
-0.01503753662109375,
-0.00434112548828125,
-0.0234527587890625,
0.0207366943359375,
-0.0204010009765625,
0.0247802734375,
-0.0386962890625,
0.01216888427734375,
-0.024810791015625,
-0.00551605224609375,
-0.03704833984375,
-0.046966552734375,
-0.06146240234375,
0.1224365234375,
0.0035572052001953125,
0.008819580078125,
-0.0137939453125,
0.05810546875,
-0.019378662109375,
0.03887939453125,
-0.0650634765625,
0.077880859375,
-0.0013875961303710938,
0.056182861328125,
-0.07427978515625,
0.0018358230590820312,
0.0107421875,
0.0015535354614257812,
0.04107666015625,
0.0084381103515625,
0.01605224609375,
-0.00603485107421875,
0.05694580078125,
0.045654296875,
0.0029239654541015625,
0.0016603469848632812,
-0.01264190673828125,
0.01361083984375,
0.00799560546875,
-0.022216796875,
0.03448486328125,
-0.02276611328125,
-0.036956787109375,
-0.0011415481567382812,
0.0133056640625,
0.0132598876953125,
-0.005184173583984375,
0.023590087890625,
0.013275146484375,
-0.01326751708984375,
-0.0045166015625,
-0.037139892578125,
0.01849365234375,
0.003330230712890625,
0.026641845703125,
-0.05059814453125,
-0.0285491943359375,
-0.029388427734375,
0.03839111328125,
0.0121002197265625,
0.03985595703125,
0.049957275390625,
0.0222930908203125,
0.035247802734375,
0.0301666259765625,
0.022613525390625,
0.045013427734375,
-0.017578125,
0.0645751953125,
0.036529541015625,
0.0144805908203125,
-0.0428466796875,
-0.0160369873046875,
0.050750732421875,
0.0836181640625,
-0.05523681640625,
-0.000030040740966796875,
0.01409912109375,
0.00806427001953125,
-0.0263214111328125,
-0.0169677734375,
-0.01003265380859375,
0.0005702972412109375,
0.0222015380859375,
0.009033203125,
-0.0312347412109375,
-0.006866455078125,
0.02386474609375,
0.01050567626953125,
0.0247650146484375,
0.01410675048828125,
-0.04302978515625,
-0.03125,
0.00328826904296875,
0.031158447265625,
0.04034423828125,
-0.003910064697265625,
0.041778564453125,
0.005462646484375,
-0.006824493408203125,
-0.0206756591796875,
0.020751953125,
-0.007785797119140625,
0.035919189453125,
-0.0357666015625,
-0.03662109375,
0.02252197265625,
0.0276031494140625,
0.0277099609375,
0.07904052734375,
0.0562744140625,
0.036041259765625,
-0.001331329345703125,
0.01453399658203125,
0.05938720703125,
-0.025360107421875,
-0.0609130859375,
-0.019256591796875,
-0.011505126953125,
0.0079498291015625,
0.007965087890625,
0.002956390380859375,
0.07867431640625,
-0.0208587646484375,
-0.0211639404296875,
0.038848876953125,
-0.0083465576171875,
-0.018280029296875,
0.057159423828125,
0.0164031982421875,
0.07464599609375,
0.0182647705078125,
-0.027252197265625,
0.0264434814453125,
-0.060546875,
-0.08233642578125,
0.0054473876953125,
0.027313232421875,
-0.02911376953125,
0.0271759033203125,
0.040557861328125,
-0.0013074874877929688,
0.0179290771484375,
-0.01291656494140625,
0.0164031982421875,
-0.016632080078125,
0.0242462158203125,
0.0117034912109375,
-0.00400543212890625,
0.0178375244140625,
0.02215576171875,
0.01023101806640625,
-0.02728271484375,
0.04498291015625,
-0.016754150390625,
-0.01244354248046875,
0.0079193115234375,
-0.0179595947265625,
-0.00725555419921875,
-0.004852294921875,
-0.0123748779296875,
-0.0218658447265625,
0.00685882568359375,
0.008026123046875,
-0.040557861328125,
0.01242828369140625,
0.03204345703125,
0.0123138427734375,
0.0062713623046875,
-0.045501708984375,
0.036712646484375,
0.029571533203125,
0.03973388671875,
-0.00762176513671875,
0.00856781005859375,
-0.009857177734375,
-0.006763458251953125,
0.041168212890625,
0.01416778564453125,
-0.0095672607421875,
0.0211334228515625,
-0.023040771484375,
-0.01436614990234375,
0.00994873046875,
-0.02294921875,
-0.0089263916015625,
0.0163726806640625,
-0.0231170654296875,
0.011444091796875,
-0.01139068603515625,
-0.013214111328125,
-0.007144927978515625,
0.02490234375,
-0.01169586181640625,
-0.005523681640625,
-0.0030689239501953125,
-0.039154052734375,
0.020355224609375,
0.062042236328125,
0.014678955078125,
0.05035400390625,
-0.0306549072265625,
0.00922393798828125,
0.003841400146484375,
-0.01641845703125,
-0.033111572265625,
-0.0211334228515625,
-0.0253143310546875,
0.004058837890625,
-0.0396728515625,
-0.09600830078125,
-0.08966064453125,
-0.0037994384765625,
0.054046630859375,
-0.00302886962890625,
-0.0206451416015625,
-0.0233001708984375,
-0.024322509765625,
0.067138671875,
0.008331298828125,
-0.0016422271728515625,
0.003139495849609375,
0.047027587890625,
-0.0194549560546875,
-0.030914306640625,
-0.006011962890625,
0.0204315185546875,
-0.00905609130859375,
0.0040283203125,
0.0222625732421875,
-0.0284881591796875,
-0.0672607421875,
-0.00946044921875,
0.0121612548828125,
0.027374267578125,
0.039886474609375,
-0.02471923828125,
0.00789642333984375,
0.00720977783203125,
-0.005840301513671875,
-0.067626953125,
0.00482177734375,
-0.07269287109375,
0.0034999847412109375,
-0.039825439453125,
0.018890380859375,
0.0234832763671875,
-0.029937744140625,
-0.08184814453125,
0.06427001953125,
-0.039276123046875,
-0.0281219482421875,
-0.041656494140625,
0.039154052734375,
-0.01324462890625,
0.005229949951171875,
-0.0183258056640625,
0.0080108642578125,
0.0013751983642578125,
0.02703857421875,
0.0038890838623046875,
-0.03411865234375,
0.03912353515625,
-0.034393310546875,
-0.046051025390625,
0.0005159378051757812,
0.0146331787109375,
-0.001556396484375,
0.024688720703125,
-0.0197601318359375,
0.058074951171875,
0.0458984375,
-0.0333251953125,
0.060760498046875,
0.0003490447998046875,
-0.031158447265625,
-0.03863525390625,
-0.022552490234375,
0.00635528564453125,
0.0178985595703125,
0.11187744140625,
0.05450439453125,
0.0192413330078125,
-0.054656982421875,
-0.0012197494506835938,
-0.0222625732421875,
-0.045623779296875,
0.01197052001953125,
0.0255584716796875,
-0.03900146484375,
0.022308349609375,
0.010833740234375,
0.0126495361328125,
-0.0227508544921875,
-0.00409698486328125,
0.0020294189453125,
-0.037200927734375,
-0.00836181640625,
-0.0210113525390625,
-0.00001430511474609375,
-0.0269775390625,
0.08831787109375,
-0.041900634765625,
-0.01348876953125,
0.0260467529296875,
0.0101165771484375,
0.01873779296875,
0.03558349609375,
0.0396728515625,
0.0219268798828125,
-0.0400390625,
-0.002777099609375,
0.0247650146484375,
0.0117034912109375,
-0.020965576171875,
-0.033050537109375,
-0.01099395751953125,
0.025299072265625,
-0.0035572052001953125,
0.019866943359375,
0.002178192138671875,
0.01312255859375,
-0.016021728515625,
0.1279296875,
-0.029296875,
0.00897979736328125,
-0.0200958251953125,
0.0148773193359375,
-0.0255126953125,
0.0159454345703125,
0.0198211669921875,
-0.0082244873046875,
-0.00498199462890625,
0.046661376953125,
-0.01861572265625,
0.00637054443359375,
-0.0126190185546875,
0.0263824462890625,
0.0018682479858398438,
-0.0250091552734375
] |
6f42c354bdb7d6eb56c669d486725e75cfc77c56
|
Wordpress Stackexchange
Q: How can I convert Posts into Custom type posts? I have a Wordpress site that I just updated to 3.1. I want to make use of custom post types now, my question is how can I assign (transfer?) a post to a newly created custom post type ?
For example, all my articles (news, poems, ideas to change the world) are in Posts. Now I have created the custom post types News, Poems, etc. and I want to transfer my old posts to these new custom post types.
I hope this is clear enough, anybody ?
A: there is a great plugin Post Type Switcher
that gives you simple way to change a post type in WordPress.
|
Q: How can I convert Posts into Custom type posts? I have a Wordpress site that I just updated to 3.1. I want to make use of custom post types now, my question is how can I assign (transfer?) a post to a newly created custom post type ?
For example, all my articles (news, poems, ideas to change the world) are in Posts. Now I have created the custom post types News, Poems, etc. and I want to transfer my old posts to these new custom post types.
I hope this is clear enough, anybody ?
A: there is a great plugin Post Type Switcher
that gives you simple way to change a post type in WordPress.
A: For those who are looking for a code solution:
$post_id = 123; // Set this to the ID of the post you want to update.
$post_obj = get_post( $post_id );
$post_obj->post_type = 'custom-post-type'; // Set this to the slug of your custom post type.
wp_update_post( $post_obj );
A: You can use "Convert Post Type" to convert from your categories to custom post types that you have already defined.
This plugin will convert all your selected categories to a custom post type that you can choose.
A: It seems that the easiest way is to do it manually in the DB. If you don't have access to the DB, or if you don't want to do it manually, you can install a plugin that will do it one post at a time, or a plugin that will bulk convert a lot of posts at once
A: This query will convert all posts to a different post type. You need to make sure that both the previous and new post types share the same categories and taxonomies when you register it with register_post_type.
UPDATE `wp_posts` SET `post_type` = 'blog' WHERE `post_type` = 'post';
A: You can try this plugin, it simply does the job.
|
wordpress
|
{
"language": "en",
"length": 321,
"provenance": "stackexchange_00019.jsonl.gz:407770",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12087"
}
|
[
0.042327880859375,
0.0093994140625,
-0.00665283203125,
0.0271453857421875,
0.0195465087890625,
-0.039459228515625,
0.083251953125,
-0.034698486328125,
-0.026336669921875,
-0.0165863037109375,
-0.0010976791381835938,
0.01326751708984375,
-0.055267333984375,
-0.03533935546875,
0.034423828125,
-0.03704833984375,
0.049560546875,
-0.00931549072265625,
0.0279388427734375,
-0.025970458984375,
0.0252532958984375,
-0.01171875,
0.0592041015625,
0.06793212890625,
0.03228759765625,
0.01245880126953125,
0.0191802978515625,
-0.0172271728515625,
0.025299072265625,
-0.0007805824279785156,
0.027618408203125,
-0.0305023193359375,
0.0034351348876953125,
0.0263671875,
-0.0191192626953125,
0.0209503173828125,
0.03656005859375,
0.005889892578125,
0.0165557861328125,
0.03485107421875,
0.034088134765625,
-0.01555633544921875,
0.0294342041015625,
-0.00937652587890625,
0.0048828125,
-0.0224456787109375,
0.041412353515625,
-0.02874755859375,
0.024871826171875,
-0.037689208984375,
-0.004772186279296875,
-0.01297760009765625,
0.024505615234375,
-0.0278167724609375,
-0.0312042236328125,
-0.0226287841796875,
-0.015106201171875,
-0.009918212890625,
0.0244598388671875,
0.0034084320068359375,
0.003814697265625,
-0.01447296142578125,
0.02239990234375,
0.0103302001953125,
0.0016632080078125,
0.0281219482421875,
0.060089111328125,
0.00647735595703125,
-0.031005859375,
-0.006725311279296875,
0.01128387451171875,
-0.016265869140625,
0.034088134765625,
-0.027374267578125,
0.03240966796875,
0.0121917724609375,
-0.0009741783142089844,
0.0162506103515625,
0.01251220703125,
-0.0015850067138671875,
0.01947021484375,
0.0139923095703125,
0.033660888671875,
-0.06591796875,
-0.007648468017578125,
-0.07427978515625,
-0.0019006729125976562,
0.0159454345703125,
-0.0186004638671875,
-0.02410888671875,
-0.011383056640625,
-0.0224761962890625,
-0.053680419921875,
0.04351806640625,
0.00582122802734375,
-0.0211029052734375,
-0.033203125,
-0.003265380859375,
-0.01470947265625,
0.046356201171875,
-0.004932403564453125,
-0.0263824462890625,
0.064208984375,
-0.040771484375,
0.0401611328125,
-0.007595062255859375,
-0.04705810546875,
-0.06488037109375,
0.0731201171875,
0.0377197265625,
-0.01348114013671875,
0.09429931640625,
0.005519866943359375,
0.0160369873046875,
-0.0247650146484375,
0.017578125,
-0.005252838134765625,
0.016815185546875,
-0.0241851806640625,
0.053070068359375,
-0.005275726318359375,
0.01611328125,
0.00821685791015625,
-0.0224456787109375,
0.0221405029296875,
0.0019407272338867188,
-0.006450653076171875,
-0.028717041015625,
0.032196044921875,
0.0167083740234375,
-0.031768798828125,
0.009490966796875,
0.0677490234375,
0.034576416015625,
0.005397796630859375,
-0.01041412353515625,
0.0474853515625,
-0.0296173095703125,
-0.0179595947265625,
0.03167724609375,
0.005275726318359375,
-0.07696533203125,
-0.0653076171875,
0.0176239013671875,
0.04248046875,
0.046783447265625,
0.01837158203125,
-0.0023288726806640625,
-0.0181121826171875,
-0.0487060546875,
0.016998291015625,
-0.040130615234375,
0.01873779296875,
0.006771087646484375,
0.00968170166015625,
-0.061004638671875,
0.0330810546875,
-0.054656982421875,
0.03289794921875,
-0.047393798828125,
0.01134490966796875,
0.007305145263671875,
0.005779266357421875,
0.0112152099609375,
-0.001010894775390625,
0.007171630859375,
-0.014312744140625,
0.01220703125,
0.0207672119140625,
0.0088653564453125,
-0.01212310791015625,
-0.0051116943359375,
0.0013017654418945312,
-0.01184844970703125,
-0.0157623291015625,
0.01012420654296875,
-0.025848388671875,
-0.0192413330078125,
0.01287841796875,
0.037353515625,
0.00795745849609375,
-0.021270751953125,
-0.01390838623046875,
0.024169921875,
-0.04107666015625,
-0.001102447509765625,
0.031463623046875,
0.039947509765625,
0.009124755859375,
0.0225982666015625,
0.03125,
0.0111083984375,
-0.024658203125,
-0.00556182861328125,
-0.006771087646484375,
-0.0178680419921875,
0.01203155517578125,
0.00409698486328125,
-0.0008516311645507812,
0.0299072265625,
-0.05694580078125,
0.037139892578125,
-0.023956298828125,
0.041107177734375,
0.0019741058349609375,
0.01509857177734375,
-0.00234222412109375,
0.05218505859375,
0.032012939453125,
0.0006704330444335938,
0.01421356201171875,
0.0023479461669921875,
-0.01009368896484375,
-0.0220947265625,
-0.040374755859375,
0.01153564453125,
-0.01375579833984375,
-0.007808685302734375,
-0.030364990234375,
-0.0286865234375,
-0.0168609619140625,
-0.02825927734375,
-0.030487060546875,
0.038848876953125,
0.030242919921875,
-0.01806640625,
-0.0120697021484375,
-0.0171356201171875,
0.003658294677734375,
0.03314208984375,
-0.07562255859375,
-0.002399444580078125,
-0.004852294921875,
-0.0509033203125,
-0.037109375,
0.002132415771484375,
0.0184326171875,
-0.03680419921875,
0.00405120849609375,
0.052093505859375,
0.018798828125,
0.00830841064453125,
-0.0195465087890625,
0.0106353759765625,
0.0302734375,
0.018402099609375,
0.029205322265625,
0.002658843994140625,
0.043426513671875,
0.08697509765625,
0.0116729736328125,
-0.01190948486328125,
0.006343841552734375,
-0.0372314453125,
0.0242156982421875,
0.023101806640625,
0.00624847412109375,
-0.0099029541015625,
0.00560760498046875,
0.0004448890686035156,
0.0034008026123046875,
-0.00598907470703125,
-0.0287322998046875,
0.0012941360473632812,
0.045867919921875,
-0.005496978759765625,
0.05120849609375,
0.029541015625,
-0.04180908203125,
-0.00701141357421875,
0.0205078125,
0.0311279296875,
-0.0008440017700195312,
0.005817413330078125,
0.033660888671875,
0.039337158203125,
-0.02752685546875,
-0.022552490234375,
0.042816162109375,
0.02557373046875,
-0.01335906982421875,
0.0268707275390625,
-0.042938232421875,
-0.01505279541015625,
-0.0026340484619140625,
-0.03948974609375,
-0.008941650390625,
0.00835418701171875,
-0.0430908203125,
-0.0245819091796875,
0.0106353759765625,
0.02947998046875,
-0.0230712890625,
0.01361846923828125,
0.031768798828125,
-0.0042724609375,
0.039703369140625,
-0.08673095703125,
0.053314208984375,
-0.047149658203125,
0.022216796875,
0.06494140625,
0.0014209747314453125,
-0.01434326171875,
0.006214141845703125,
0.0295257568359375,
0.0247955322265625,
0.031402587890625,
0.0096282958984375,
-0.041656494140625,
-0.0340576171875,
-0.05670166015625,
0.01090240478515625,
0.052215576171875,
-0.0265350341796875,
-0.042816162109375,
0.0071258544921875,
0.0256500244140625,
-0.0101470947265625,
0.01483917236328125,
0.00604248046875,
-0.0484619140625,
-0.039398193359375,
-0.037322998046875,
-0.0335693359375,
0.0151824951171875,
-0.036712646484375,
-0.007640838623046875,
0.050140380859375,
0.0245513916015625,
-0.0343017578125,
0.0100860595703125,
-0.054443359375,
-0.034027099609375,
-0.009033203125,
0.0038318634033203125,
0.012237548828125,
-0.00612640380859375,
-0.0005340576171875,
-0.05047607421875,
0.01097869873046875,
0.07110595703125,
-0.0035400390625,
0.009124755859375,
0.035797119140625,
-0.0217437744140625,
0.054656982421875,
0.0083770751953125,
0.03240966796875,
0.06793212890625,
-0.0650634765625,
-0.021270751953125,
-0.02532958984375,
0.03936767578125,
-0.0036106109619140625,
-0.007709503173828125,
0.032135009765625,
0.028594970703125,
-0.018890380859375,
-0.0292510986328125,
-0.027496337890625,
0.00690460205078125,
-0.0281524658203125,
-0.005695343017578125,
-0.012786865234375,
-0.01107025146484375,
-0.018890380859375,
0.050567626953125,
-0.0159912109375,
0.00820159912109375,
0.022125244140625,
-0.0268402099609375,
0.037841796875,
-0.00478363037109375,
-0.0121002197265625,
-0.0322265625,
-0.0288238525390625,
-0.04339599609375,
0.09228515625,
0.010101318359375,
0.022430419921875,
0.0162353515625,
0.016571044921875,
0.004871368408203125,
-0.112060546875,
0.064208984375,
-0.0723876953125,
-0.040313720703125,
-0.033172607421875,
-0.0325927734375,
0.03436279296875,
0.13134765625,
-0.043670654296875,
0.0079498291015625,
-0.01038360595703125,
-0.0193939208984375,
0.02838134765625,
-0.00022327899932861328,
-0.06402587890625,
-0.02655029296875,
0.01145172119140625,
-0.003841400146484375,
-0.0148773193359375,
0.0110931396484375,
-0.042724609375,
0.053955078125,
-0.0036334991455078125,
-0.00774383544921875,
0.03863525390625,
-0.03668212890625,
0.0088043212890625,
0.0107574462890625,
-0.0056915283203125,
-0.0162353515625,
-0.0297698974609375,
-0.0077056884765625,
-0.09173583984375,
-0.0178985595703125,
-0.02423095703125,
0.060333251953125,
0.0253753662109375,
-0.033050537109375,
0.00798797607421875,
0.041534423828125,
0.023284912109375,
0.01324462890625,
-0.017608642578125,
-0.0084686279296875,
-0.01554107666015625,
-0.005893707275390625,
-0.0133056640625,
-0.0247802734375,
-0.0423583984375,
-0.049468994140625,
-0.022613525390625,
-0.006694793701171875,
0.0004119873046875,
0.02606201171875,
0.0143280029296875,
-0.0008192062377929688,
-0.0252838134765625,
-0.01593017578125,
-0.008819580078125,
0.0297698974609375,
-0.00482940673828125,
-0.0006632804870605469,
-0.036895751953125,
-0.03857421875,
0.045013427734375,
-0.017242431640625,
-0.00792694091796875,
0.00553131103515625,
0.0670166015625,
0.01357269287109375,
-0.007843017578125,
-0.02386474609375,
-0.01377105712890625,
0.0308837890625,
0.00949859619140625,
0.0088653564453125,
0.00984954833984375,
-0.006427764892578125,
0.0167236328125,
-0.0033397674560546875,
-0.020263671875,
-0.026275634765625,
0.044677734375,
0.007671356201171875,
-0.00016617774963378906,
-0.0013828277587890625,
-0.02557373046875,
0.053619384765625,
0.038604736328125,
-0.01419830322265625,
-0.0258331298828125,
-0.0023517608642578125,
0.06182861328125,
-0.036346435546875,
0.022125244140625,
-0.04803466796875,
-0.037109375,
0.038238525390625,
-0.00792694091796875,
-0.01462554931640625,
-0.00997161865234375,
0.007442474365234375,
-0.0005879402160644531,
-0.04241943359375,
-0.0002968311309814453,
-0.0175628662109375,
-0.0006008148193359375,
-0.016754150390625,
0.0201263427734375,
-0.006557464599609375,
-0.0107269287109375,
-0.0173492431640625,
-0.0017995834350585938,
0.00909423828125,
-0.0253448486328125,
-0.06378173828125,
-0.01491546630859375,
-0.0159454345703125,
0.03167724609375,
0.0279083251953125,
-0.0283203125,
0.03729248046875,
0.03973388671875,
-0.00988006591796875,
0.006282806396484375,
-0.034423828125,
0.0181884765625,
-0.042083740234375,
-0.0272216796875,
0.0165252685546875,
-0.0230712890625,
-0.0169830322265625,
0.0189361572265625,
0.0293121337890625,
-0.0178680419921875,
-0.0218505859375,
0.056884765625,
0.05706787109375,
0.00542449951171875,
0.011077880859375,
0.0212860107421875,
-0.0198516845703125,
-0.019805908203125,
-0.01003265380859375,
-0.040069580078125,
-0.0205841064453125,
0.0180816650390625,
0.0379638671875,
0.001804351806640625,
-0.0014600753784179688,
0.01467132568359375,
-0.0091094970703125,
-0.0088958740234375,
-0.005329132080078125,
0.0084228515625,
-0.0288238525390625,
-0.003208160400390625,
0.02069091796875,
0.018341064453125,
-0.0031719207763671875,
-0.016632080078125,
0.005535125732421875,
-0.0406494140625,
0.0211639404296875,
-0.032989501953125,
-0.0004210472106933594,
-0.004894256591796875,
-0.0045166015625,
-0.04052734375,
-0.0263214111328125,
0.0163116455078125,
-0.0275726318359375,
0.0010652542114257812,
-0.0167236328125,
-0.033660888671875,
0.021148681640625,
-0.00843048095703125,
0.003936767578125,
-0.01461029052734375,
-0.01262664794921875,
0.0019664764404296875,
0.0185394287109375,
0.013824462890625,
-0.036376953125,
-0.0239715576171875,
-0.01605224609375,
-0.0245361328125,
-0.0179290771484375,
-0.038177490234375,
-0.02978515625,
-0.040191650390625,
-0.0019989013671875,
0.0229644775390625,
0.01047515869140625,
-0.0164337158203125,
-0.05682373046875,
-0.00688934326171875,
-0.0010213851928710938,
0.0246124267578125,
-0.01432037353515625,
0.00769805908203125,
0.039306640625,
0.0045166015625,
0.04412841796875,
0.004322052001953125,
-0.00441741943359375,
-0.0386962890625,
-0.0018033981323242188,
-0.022796630859375,
-0.0460205078125,
-0.025299072265625,
0.0152130126953125,
-0.0171966552734375,
0.06207275390625,
0.05169677734375,
-0.0005779266357421875,
0.0033016204833984375,
-0.014801025390625,
0.00780487060546875,
-0.0261077880859375,
0.010009765625,
-0.0280303955078125,
0.0007190704345703125,
-0.014373779296875,
0.00276947021484375,
0.01922607421875,
0.0045623779296875,
0.00653076171875,
-0.019775390625,
0.01476287841796875,
-0.00696563720703125,
-0.00922393798828125,
-0.037933349609375,
0.0167236328125,
0.016265869140625,
0.00882720947265625,
0.02880859375,
-0.0183563232421875,
0.02001953125,
0.0149383544921875,
-0.00823974609375,
0.03857421875,
0.017303466796875,
0.045318603515625,
-0.0161590576171875,
-0.03314208984375,
-0.0094451904296875,
-0.041351318359375,
0.0267181396484375,
0.08013916015625,
0.09820556640625,
-0.1243896484375,
0.0195770263671875,
0.035064697265625,
-0.00995635986328125,
0.04193115234375,
0.0207672119140625,
-0.0108184814453125,
-0.0161895751953125,
-0.0161285400390625,
-0.0009450912475585938,
-0.0195159912109375,
-0.01513671875,
-0.0001735687255859375,
0.004123687744140625,
-0.01010894775390625,
0.033935546875,
0.01372528076171875,
-0.006412506103515625,
0.003368377685546875,
0.0004978179931640625,
0.0128936767578125,
-0.02374267578125,
0.0244140625,
-0.0294189453125,
0.00957489013671875,
-0.016632080078125,
0.03973388671875,
-0.0242156982421875,
0.01531219482421875,
-0.02197265625,
0.0002187490463256836,
0.0333251953125,
0.056182861328125,
-0.0223388671875,
0.0060272216796875,
0.02227783203125,
0.018798828125,
-0.07025146484375,
-0.048095703125,
0.00019073486328125,
0.05181884765625,
-0.00835418701171875,
0.041717529296875,
0.005340576171875,
-0.044586181640625,
-0.0146484375,
-0.024566650390625,
0.061370849609375,
-0.00569915771484375,
-0.026580810546875,
0.03369140625,
0.00847625732421875,
-0.0179595947265625,
-0.0189056396484375,
-0.0017614364624023438,
-0.04779052734375,
-0.00443267822265625,
-0.0222015380859375,
-0.03277587890625,
-0.00786590576171875,
-0.03533935546875,
-0.07647705078125,
0.12548828125,
0.0216064453125,
0.0228424072265625,
0.006618499755859375,
0.05865478515625,
-0.058258056640625,
0.01319122314453125,
-0.0179901123046875,
0.043487548828125,
-0.0210418701171875,
0.0189208984375,
-0.056793212890625,
-0.01297760009765625,
-0.005367279052734375,
0.043243408203125,
0.030487060546875,
0.0002963542938232422,
0.00033473968505859375,
-0.00044274330139160156,
0.06671142578125,
0.054443359375,
0.0196533203125,
-0.0031490325927734375,
0.006053924560546875,
0.0286407470703125,
0.054718017578125,
-0.01007843017578125,
0.045806884765625,
0.0233001708984375,
-0.0297088623046875,
0.0274200439453125,
0.016143798828125,
0.00897979736328125,
0.004451751708984375,
-0.020477294921875,
-0.02716064453125,
-0.0009517669677734375,
0.010101318359375,
0.01381683349609375,
0.0272674560546875,
0.0210723876953125,
0.03265380859375,
-0.0024356842041015625,
0.045623779296875,
-0.022491455078125,
0.052337646484375,
-0.00814056396484375,
0.0418701171875,
-0.004730224609375,
0.0110321044921875,
0.03814697265625,
-0.01438140869140625,
0.01531219482421875,
0.0265960693359375,
-0.0190582275390625,
0.0657958984375,
0.038818359375,
0.02203369140625,
-0.0121917724609375,
0.01302337646484375,
0.0240936279296875,
0.072021484375,
-0.048736572265625,
-0.0518798828125,
0.016845703125,
0.021636962890625,
0.03515625,
0.00507354736328125,
0.0526123046875,
-0.03192138671875,
0.004100799560546875,
-0.046112060546875,
0.001956939697265625,
0.01079559326171875,
0.0301513671875,
-0.01480865478515625,
0.004314422607421875,
-0.027984619140625,
-0.0258636474609375,
-0.055694580078125,
-0.0015821456909179688,
0.030853271484375,
0.04949951171875,
0.029510498046875,
0.050018310546875,
0.0239105224609375,
-0.0231475830078125,
0.0217132568359375,
-0.01421356201171875,
0.015594482421875,
-0.031280517578125,
0.00908660888671875,
-0.0184173583984375,
0.01010894775390625,
0.0238494873046875,
-0.012786865234375,
0.032257080078125,
0.03466796875,
0.0239715576171875,
-0.0213775634765625,
-0.01154327392578125,
0.042724609375,
-0.0264129638671875,
-0.0005083084106445312,
-0.0164642333984375,
-0.040191650390625,
-0.019378662109375,
-0.034393310546875,
0.003711700439453125,
-0.0083770751953125,
0.02081298828125,
0.01336669921875,
0.053436279296875,
-0.006153106689453125,
-0.0139312744140625,
0.054595947265625,
-0.0043182373046875,
0.11944580078125,
0.0384521484375,
-0.06939697265625,
-0.004566192626953125,
-0.0272216796875,
-0.06573486328125,
0.0208740234375,
0.037872314453125,
-0.037841796875,
0.005733489990234375,
-0.0102996826171875,
-0.014617919921875,
0.019744873046875,
-0.013763427734375,
0.01140594482421875,
0.0023136138916015625,
0.006561279296875,
-0.004344940185546875,
-0.0960693359375,
-0.067138671875,
-0.0433349609375,
0.042205810546875,
0.0322265625,
0.03643798828125,
0.01299285888671875,
0.042205810546875,
-0.0455322265625,
0.0540771484375,
-0.057861328125,
-0.05120849609375,
0.02490234375,
0.035064697265625,
0.032470703125,
-0.0128326416015625,
-0.023773193359375,
-0.0082855224609375,
0.03594970703125,
-0.03912353515625,
-0.045928955078125,
0.01209259033203125,
0.0313720703125,
0.00453948974609375,
0.0010423660278320312,
-0.034332275390625,
-0.0020999908447265625,
-0.005786895751953125,
-0.032958984375,
0.0289764404296875,
-0.00875091552734375,
0.0138092041015625,
0.05523681640625,
0.042694091796875,
-0.00966644287109375,
0.009552001953125,
-0.0430908203125,
0.009979248046875,
0.034088134765625,
0.0435791015625,
-0.06475830078125,
0.06158447265625,
0.0001989603042602539,
0.005474090576171875,
0.0248565673828125,
0.09375,
0.03704833984375,
-0.039886474609375,
-0.00608062744140625,
-0.030364990234375,
0.0086517333984375,
-0.028228759765625,
-0.0140380859375,
-0.0157012939453125,
-0.00426483154296875,
-0.01800537109375,
-0.0162811279296875,
-0.026947021484375,
-0.043426513671875,
0.011688232421875,
0.01549530029296875,
-0.00978851318359375,
-0.0213470458984375,
-0.0517578125,
-0.027984619140625,
0.043609619140625,
0.0038318634033203125,
-0.035491943359375,
0.0285797119140625,
-0.03704833984375,
-0.016326904296875,
0.0189971923828125,
-0.056396484375,
0.0236053466796875,
0.06585693359375,
0.0146636962890625,
-0.01678466796875,
-0.032745361328125,
-0.01194000244140625,
-0.033233642578125,
0.05242919921875,
0.0596923828125,
-0.057159423828125,
-0.009857177734375,
0.040985107421875,
0.05670166015625,
0.078125,
0.036285400390625,
-0.0007052421569824219,
0.01265716552734375,
-0.0080718994140625,
-0.056671142578125,
-0.04046630859375,
0.044769287109375,
-0.079833984375,
-0.05206298828125,
-0.0204620361328125,
0.0214385986328125,
0.03485107421875,
-0.00821685791015625,
-0.0482177734375,
0.0300445556640625,
-0.0251617431640625,
-0.022491455078125,
-0.06640625,
-0.0161590576171875,
0.002170562744140625,
0.0282745361328125,
-0.01409912109375,
-0.03509521484375,
-0.049285888671875,
0.03619384765625,
-0.018402099609375,
0.07568359375,
-0.00457763671875,
-0.016632080078125,
-0.018463134765625,
-0.009552001953125,
-0.007030487060546875,
0.00026798248291015625,
-0.0199127197265625,
0.0080108642578125,
-0.017120361328125,
0.0153350830078125,
-0.040313720703125,
-0.0231781005859375,
-0.0108642578125,
0.03668212890625,
-0.004238128662109375,
-0.02587890625,
-0.016845703125,
-0.0158843994140625,
0.032684326171875,
0.05340576171875,
0.00856781005859375,
-0.0150299072265625,
0.0166473388671875,
-0.0155487060546875,
-0.0509033203125,
-0.0020275115966796875,
0.01418304443359375,
-0.02935791015625,
-0.003574371337890625,
-0.0005660057067871094,
-0.005489349365234375,
-0.0205230712890625,
-0.02679443359375,
-0.0249786376953125,
-0.015411376953125,
-0.0285186767578125,
-0.00926971435546875,
-0.0129547119140625,
0.050628662109375,
0.016571044921875,
-0.0178070068359375,
0.0169219970703125,
0.0041351318359375,
-0.017181396484375,
0.0220947265625,
0.01482391357421875,
0.0031528472900390625,
-0.0172271728515625,
-0.0053863525390625,
0.021270751953125,
0.004543304443359375,
0.019622802734375,
-0.01953125,
-0.015228271484375,
0.0164642333984375,
0.0180816650390625,
0.002712249755859375,
0.02685546875,
-0.023345947265625,
0.02581787109375,
-0.01641845703125,
0.040313720703125,
0.006664276123046875,
-0.0107574462890625,
-0.005954742431640625,
0.023345947265625,
-0.03955078125,
-0.0011138916015625,
-0.0200347900390625,
-0.0177001953125,
0.0181884765625,
0.0008311271667480469,
-0.0173492431640625,
-0.0175018310546875,
-0.01149749755859375,
0.041748046875,
-0.0103759765625,
0.0012998580932617188
] |
6174693642fce79cdbd912a75b097f6103947a87
|
Wordpress Stackexchange
Q: getting video dimensions when attaching videos (eg. .flv) to a post - is it possible to query its dimensions?
the problem is - i've got videos in 4:3 and 16:9 format and i need to get this information.
any ideas?
thanks
A: This is how I retrieve video (or any non-image) meta data.
// assuming you have an attachment ID
$meta = wp_get_attachment_metadata( $attachment->ID );
// See what meta data is available
print_r( $meta );
// always check for the property's existence before trying to display it
if ( ! empty( $meta['width'] ) )
echo $meta['width'];
You can echo any meta that is returned with print. Hope it helps someone.
|
Q: getting video dimensions when attaching videos (eg. .flv) to a post - is it possible to query its dimensions?
the problem is - i've got videos in 4:3 and 16:9 format and i need to get this information.
any ideas?
thanks
A: This is how I retrieve video (or any non-image) meta data.
// assuming you have an attachment ID
$meta = wp_get_attachment_metadata( $attachment->ID );
// See what meta data is available
print_r( $meta );
// always check for the property's existence before trying to display it
if ( ! empty( $meta['width'] ) )
echo $meta['width'];
You can echo any meta that is returned with print. Hope it helps someone.
A: You would need a plugin to do this. It would need to parse the video and save the meta information.
I'd recommend taking a look at this library for starters: http://code.google.com/p/flv4php/
As for implementing this as a WordPress plugin, you would need to write a function and hook it to the wp_generate_attachment_metadata filter. The code will basically look something like this:
function my_attachment_metadata($meta, $attachment_id) {
$attachment = get_post( $attachment_id );
$mime = get_post_mime_type( $attachment );
$file = get_attached_file( $attachment_id );
// use the $mime value to determine if you need to scan the file (video/x-flv)
// use the $file for scanning for any meta data
// store the meta data in $meta['whatever'] for each piece of info
return $meta;
}
add_filter('wp_generate_attachment_metadata','my_attachment_metadata',10,2);
Any meta data you add to $meta and return there will be stored along with the attachment post. You can then later retrieve it, without having to reparse the file or anything, with wp_get_attachment_metadata( $attachment_id ).
A: I don't use videos to test. My quick guess would be to try wp_get_attachment_metadata() function.
A: php-flvinfo and php-mp4info are php classes for reading flv and mp4 metadata. you could read it on the fly, or it may be possible to hook a save to get this info in the db somewhere.
|
wordpress
|
{
"language": "en",
"length": 322,
"provenance": "stackexchange_00019.jsonl.gz:407785",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12137"
}
|
[
-0.0301361083984375,
-0.01435089111328125,
-0.047637939453125,
0.0126495361328125,
-0.0137939453125,
-0.0074005126953125,
0.0157623291015625,
-0.00792694091796875,
0.01189422607421875,
0.0244293212890625,
-0.03466796875,
-0.007568359375,
-0.0198822021484375,
-0.0196380615234375,
-0.0316162109375,
-0.04144287109375,
0.056854248046875,
-0.0023555755615234375,
0.06591796875,
0.0151519775390625,
0.00689697265625,
0.05657958984375,
0.06280517578125,
0.0214385986328125,
-0.004497528076171875,
0.004665374755859375,
0.0274505615234375,
-0.02490234375,
-0.01495361328125,
-0.0167388916015625,
0.00960540771484375,
0.0029773712158203125,
0.006969451904296875,
0.005413055419921875,
0.0205078125,
-0.0299072265625,
-0.0016727447509765625,
-0.0013399124145507812,
0.01114654541015625,
0.001705169677734375,
0.01605224609375,
0.00568389892578125,
0.03076171875,
0.01238250732421875,
-0.00482177734375,
-0.003162384033203125,
-0.00994873046875,
-0.042938232421875,
0.03436279296875,
0.037445068359375,
-0.0157012939453125,
-0.006984710693359375,
-0.01837158203125,
0.038726806640625,
-0.0209197998046875,
-0.04486083984375,
-0.0173187255859375,
0.03369140625,
0.0195465087890625,
-0.0286102294921875,
-0.01366424560546875,
0.0036106109619140625,
0.026123046875,
0.0140533447265625,
-0.00812530517578125,
-0.00934600830078125,
-0.0152587890625,
-0.00650787353515625,
-0.00839996337890625,
-0.0032100677490234375,
0.0238494873046875,
-0.007476806640625,
-0.006195068359375,
-0.0123443603515625,
-0.007282257080078125,
-0.04046630859375,
0.03173828125,
-0.052276611328125,
-0.0084075927734375,
0.0030994415283203125,
0.0180511474609375,
0.0200347900390625,
-0.00563812255859375,
-0.0293426513671875,
0.0166473388671875,
-0.0160064697265625,
-0.01421356201171875,
-0.006893157958984375,
-0.0205535888671875,
-0.036041259765625,
-0.01861572265625,
-0.053436279296875,
-0.01287078857421875,
-0.0235443115234375,
-0.029205322265625,
-0.047454833984375,
0.01134490966796875,
-0.01500701904296875,
-0.015899658203125,
-0.01311492919921875,
-0.007305145263671875,
-0.0400390625,
0.00933837890625,
-0.0170135498046875,
0.01861572265625,
-0.030059814453125,
-0.01268768310546875,
-0.030670166015625,
0.040496826171875,
0.034637451171875,
-0.037750244140625,
0.048614501953125,
-0.0262908935546875,
0.00287628173828125,
-0.04034423828125,
0.05303955078125,
-0.01059722900390625,
-0.0164794921875,
-0.031219482421875,
0.028564453125,
0.017852783203125,
0.0277252197265625,
0.0283203125,
-0.04254150390625,
0.010772705078125,
0.0036563873291015625,
-0.02459716796875,
-0.034149169921875,
0.01873779296875,
0.059051513671875,
-0.0196380615234375,
0.00180816650390625,
0.0203857421875,
-0.0299530029296875,
-0.038116455078125,
-0.0231475830078125,
-0.0213775634765625,
-0.03814697265625,
-0.03936767578125,
0.03643798828125,
-0.06353759765625,
-0.04022216796875,
0.043548583984375,
-0.052886962890625,
-0.0221710205078125,
-0.0090179443359375,
0.0106658935546875,
0.03411865234375,
-0.0037860870361328125,
-0.043304443359375,
0.01561737060546875,
-0.0247955322265625,
0.0078887939453125,
0.033538818359375,
0.035888671875,
0.043731689453125,
0.09881591796875,
-0.017547607421875,
-0.06689453125,
-0.025543212890625,
0.015625,
0.01387786865234375,
0.0276336669921875,
-0.0177764892578125,
0.01203155517578125,
-0.0203399658203125,
-0.0665283203125,
0.0172271728515625,
0.007038116455078125,
0.08221435546875,
0.0035190582275390625,
0.007709503173828125,
-0.010589599609375,
-0.01251983642578125,
-0.03076171875,
-0.0284271240234375,
-0.0152587890625,
0.006023406982421875,
0.01486968994140625,
0.027435302734375,
0.00983428955078125,
-0.0189971923828125,
0.055145263671875,
-0.0144805908203125,
0.00351715087890625,
0.0030536651611328125,
-0.0027599334716796875,
-0.01380157470703125,
0.01312255859375,
0.008087158203125,
0.004863739013671875,
0.0220794677734375,
-0.0216064453125,
0.0302734375,
-0.00690460205078125,
0.015533447265625,
0.01465606689453125,
0.0330810546875,
0.002880096435546875,
-0.061370849609375,
0.06268310546875,
0.0186614990234375,
-0.0022735595703125,
-0.01126861572265625,
-0.037689208984375,
0.010772705078125,
-0.0133819580078125,
0.020477294921875,
-0.0162353515625,
0.023345947265625,
0.01352691650390625,
-0.01410675048828125,
-0.01261138916015625,
0.0090484619140625,
0.01407623291015625,
0.0047454833984375,
0.01274871826171875,
0.0005884170532226562,
-0.0283966064453125,
0.016754150390625,
-0.036895751953125,
-0.01323699951171875,
-0.044708251953125,
0.03460693359375,
0.0027713775634765625,
0.0239715576171875,
-0.00634002685546875,
0.0128326416015625,
0.047943115234375,
0.0040435791015625,
0.07220458984375,
-0.00931549072265625,
-0.02001953125,
-0.03057861328125,
-0.0096893310546875,
0.00165557861328125,
0.00455474853515625,
-0.07415771484375,
0.0183868408203125,
0.048583984375,
0.026611328125,
0.047210693359375,
-0.013458251953125,
0.0323486328125,
0.04632568359375,
-0.03826904296875,
-0.0036449432373046875,
0.00966644287109375,
-0.007717132568359375,
0.0299530029296875,
0.01166534423828125,
0.004180908203125,
0.009979248046875,
-0.020050048828125,
0.005084991455078125,
0.03326416015625,
0.002101898193359375,
0.01039886474609375,
-0.054962158203125,
0.09197998046875,
-0.03948974609375,
0.06915283203125,
0.07000732421875,
-0.0002586841583251953,
0.039703369140625,
0.005870819091796875,
0.043487548828125,
0.034881591796875,
-0.02294921875,
0.01153564453125,
0.0186004638671875,
0.041015625,
0.0033283233642578125,
0.016448974609375,
0.031402587890625,
-0.029266357421875,
-0.02801513671875,
-0.008453369140625,
0.002552032470703125,
-0.00782012939453125,
0.00872802734375,
0.047637939453125,
-0.059234619140625,
-0.01971435546875,
-0.00274658203125,
-0.037567138671875,
-0.05853271484375,
-0.00539398193359375,
0.0273284912109375,
0.028045654296875,
0.038848876953125,
0.04449462890625,
0.0270233154296875,
0.03033447265625,
0.0208587646484375,
0.00629425048828125,
0.0243072509765625,
-0.034942626953125,
0.051239013671875,
-0.0167999267578125,
0.033172607421875,
0.0615234375,
-0.0343017578125,
0.036102294921875,
-0.0098876953125,
-0.0034198760986328125,
-0.0303802490234375,
0.0312347412109375,
-0.0014963150024414062,
-0.026214599609375,
-0.0193634033203125,
0.0162811279296875,
-0.0016269683837890625,
-0.00783538818359375,
-0.0283203125,
-0.0556640625,
-0.022979736328125,
-0.0131988525390625,
-0.11065673828125,
-0.04150390625,
0.04833984375,
-0.11309814453125,
-0.00444793701171875,
-0.032470703125,
-0.076904296875,
-0.0034923553466796875,
0.0179901123046875,
-0.0130767822265625,
0.019195556640625,
0.00978851318359375,
-0.01377105712890625,
0.00891876220703125,
-0.0259857177734375,
-0.0276947021484375,
-0.0098876953125,
-0.00887298583984375,
0.0037784576416015625,
0.005420684814453125,
0.0036907196044921875,
0.01531982421875,
-0.01424407958984375,
0.0207672119140625,
-0.0088043212890625,
-0.06536865234375,
-0.0003178119659423828,
0.0156707763671875,
-0.01091766357421875,
0.015838623046875,
-0.052215576171875,
-0.00896453857421875,
0.0149688720703125,
-0.034027099609375,
0.0160064697265625,
-0.059295654296875,
0.010894775390625,
0.03692626953125,
-0.028045654296875,
-0.04559326171875,
0.042022705078125,
-0.069580078125,
-0.0010004043579101562,
-0.01284027099609375,
-0.0185089111328125,
0.004611968994140625,
0.0120391845703125,
-0.019378662109375,
-0.0309906005859375,
0.005649566650390625,
0.006099700927734375,
-0.008270263671875,
-0.017974853515625,
-0.006839752197265625,
0.018829345703125,
0.0009222030639648438,
0.0162200927734375,
0.0088958740234375,
-0.053070068359375,
-0.03753662109375,
0.062408447265625,
-0.03350830078125,
0.003398895263671875,
-0.004573822021484375,
0.0046539306640625,
-0.0165557861328125,
-0.0210418701171875,
0.061309814453125,
0.01155853271484375,
0.042633056640625,
-0.04779052734375,
-0.06744384765625,
-0.0328369140625,
0.09442138671875,
-0.0330810546875,
-0.040130615234375,
-0.005290985107421875,
0.0209197998046875,
-0.0245208740234375,
-0.041107177734375,
0.0020732879638671875,
-0.00580596923828125,
-0.050811767578125,
-0.013458251953125,
0.0148162841796875,
-0.052459716796875,
-0.0253143310546875,
0.03076171875,
-0.075927734375,
-0.01324462890625,
0.035247802734375,
0.078857421875,
-0.00295257568359375,
0.0095977783203125,
0.004413604736328125,
0.0162200927734375,
-0.0236968994140625,
0.0311431884765625,
-0.051849365234375,
-0.0189056396484375,
0.045806884765625,
0.03961181640625,
-0.026611328125,
-0.0106964111328125,
-0.020904541015625,
0.042327880859375,
0.027374267578125,
-0.0136566162109375,
0.0161895751953125,
-0.004138946533203125,
-0.040283203125,
-0.00791168212890625,
0.01457977294921875,
-0.0369873046875,
-0.01207733154296875,
-0.0804443359375,
-0.027435302734375,
-0.0360107421875,
-0.05670166015625,
0.015533447265625,
-0.0665283203125,
0.0335693359375,
-0.01580810546875,
-0.0223236083984375,
0.0297088623046875,
0.039642333984375,
0.01181793212890625,
0.01340484619140625,
-0.042327880859375,
-0.007965087890625,
0.018096923828125,
0.08740234375,
-0.01259613037109375,
0.00026679039001464844,
-0.003322601318359375,
0.0151824951171875,
-0.057525634765625,
-0.0902099609375,
0.03399658203125,
0.053680419921875,
-0.0112152099609375,
0.02178955078125,
0.01071929931640625,
-0.057525634765625,
0.08349609375,
0.038116455078125,
0.06640625,
-0.030242919921875,
0.0038776397705078125,
-0.00806427001953125,
-0.027587890625,
0.054290771484375,
0.01125335693359375,
-0.01763916015625,
-0.007904052734375,
-0.021484375,
0.0101776123046875,
0.019439697265625,
-0.002086639404296875,
-0.01381683349609375,
0.01300811767578125,
0.00963592529296875,
-0.0421142578125,
0.0283660888671875,
-0.040496826171875,
0.036956787109375,
0.040130615234375,
-0.006809234619140625,
0.01617431640625,
-0.0078277587890625,
-0.0043487548828125,
0.00780487060546875,
0.0181121826171875,
-0.0186920166015625,
0.01934814453125,
0.0101470947265625,
-0.0262298583984375,
-0.010284423828125,
0.015228271484375,
-0.0377197265625,
-0.03326416015625,
-0.053009033203125,
-0.072021484375,
0.025543212890625,
0.03253173828125,
0.040740966796875,
0.0177001953125,
0.05712890625,
0.0172271728515625,
-0.04022216796875,
-0.037109375,
-0.025360107421875,
0.01273345947265625,
-0.07049560546875,
0.042816162109375,
-0.02276611328125,
0.0115966796875,
-0.01477813720703125,
0.0977783203125,
-0.0298614501953125,
0.05340576171875,
-0.00756072998046875,
-0.0032062530517578125,
-0.00992584228515625,
0.046600341796875,
0.02862548828125,
-0.027587890625,
-0.00882720947265625,
0.026824951171875,
-0.0018243789672851562,
0.01319122314453125,
0.027252197265625,
-0.01213836669921875,
-0.0139923095703125,
-0.04144287109375,
-0.0211944580078125,
0.06451416015625,
-0.035003662109375,
-0.01160430908203125,
0.004985809326171875,
-0.01995849609375,
-0.016937255859375,
-0.0166168212890625,
-0.0014295578002929688,
0.0212860107421875,
-0.01531982421875,
-0.0005178451538085938,
-0.0227813720703125,
0.0037631988525390625,
0.01525115966796875,
-0.02825927734375,
-0.01873779296875,
0.0274200439453125,
0.03631591796875,
-0.035400390625,
-0.0257110595703125,
-0.00336456298828125,
-0.061859130859375,
0.001926422119140625,
-0.01427459716796875,
-0.0251312255859375,
0.048919677734375,
-0.02850341796875,
0.0255889892578125,
-0.0238800048828125,
0.01334381103515625,
-0.0031528472900390625,
0.0215911865234375,
0.01519775390625,
-0.0107879638671875,
0.012542724609375,
-0.0156707763671875,
0.00571441650390625,
-0.01287841796875,
0.043853759765625,
-0.03961181640625,
-0.0098114013671875,
-0.05059814453125,
-0.051849365234375,
-0.0023403167724609375,
0.009429931640625,
0.08062744140625,
0.0265960693359375,
0.035430908203125,
-0.05950927734375,
-0.00240325927734375,
0.0139923095703125,
0.0215606689453125,
0.00846099853515625,
0.0103759765625,
0.0193939208984375,
0.0198516845703125,
-0.035797119140625,
-0.0181427001953125,
-0.0017681121826171875,
0.00496673583984375,
-0.00738525390625,
-0.009185791015625,
0.022125244140625,
-0.051849365234375,
0.0017499923706054688,
-0.00527191162109375,
-0.0276336669921875,
-0.04583740234375,
-0.01551055908203125,
-0.035736083984375,
0.108642578125,
-0.003143310546875,
0.0006098747253417969,
0.0168609619140625,
-0.030914306640625,
-0.00469970703125,
-0.005748748779296875,
-0.0126495361328125,
0.038055419921875,
-0.01024627685546875,
0.0190887451171875,
0.034149169921875,
0.0125274658203125,
-0.01407623291015625,
0.048004150390625,
0.018707275390625,
0.04974365234375,
0.0164947509765625,
0.0233001708984375,
0.0176849365234375,
-0.00691986083984375,
-0.0169677734375,
0.032958984375,
0.0212249755859375,
-0.016510009765625,
-0.0140533447265625,
-0.01337432861328125,
-0.012725830078125,
0.0301055908203125,
-0.06121826171875,
0.0172271728515625,
0.0308074951171875,
0.0272979736328125,
-0.004627227783203125,
-0.0513916015625,
0.037261962890625,
-0.031646728515625,
0.0131988525390625,
-0.01480865478515625,
0.007701873779296875,
0.049285888671875,
-0.03643798828125,
-0.01457977294921875,
0.003490447998046875,
-0.0242156982421875,
-0.01285552978515625,
-0.0159149169921875,
0.0069732666015625,
0.0109100341796875,
-0.00205230712890625,
-0.007801055908203125,
-0.0137481689453125,
-0.0148162841796875,
0.031341552734375,
-0.01000213623046875,
-0.004344940185546875,
-0.0189361572265625,
0.0233154296875,
-0.0026645660400390625,
-0.0157470703125,
0.004947662353515625,
0.0303497314453125,
0.045257568359375,
0.03680419921875,
0.01092529296875,
-0.00128936767578125,
0.002246856689453125,
-0.0009784698486328125,
-0.035308837890625,
-0.033355712890625,
0.0010433197021484375,
0.037811279296875,
-0.0260467529296875,
0.0307159423828125,
-0.01219940185546875,
-0.006084442138671875,
-0.0030059814453125,
-0.03948974609375,
0.0010194778442382812,
-0.0011749267578125,
-0.017425537109375,
0.0311431884765625,
0.0164794921875,
-0.016265869140625,
0.02642822265625,
0.006877899169921875,
-0.045166015625,
-0.013214111328125,
0.0252227783203125,
-0.023284912109375,
-0.0199432373046875,
0.03302001953125,
-0.0297393798828125,
0.00467681884765625,
0.025482177734375,
-0.00466156005859375,
0.0009832382202148438,
-0.0016994476318359375,
-0.0081024169921875,
-0.0221405029296875,
-0.0166473388671875,
0.05169677734375,
0.045989990234375,
-0.0156097412109375,
-0.02587890625,
-0.01654052734375,
-0.011138916015625,
0.054534912109375,
0.02044677734375,
-0.019927978515625,
-0.01232147216796875,
0.00403594970703125,
0.0909423828125,
0.07415771484375,
0.05523681640625,
-0.004993438720703125,
0.02227783203125,
0.023345947265625,
0.0550537109375,
-0.02239990234375,
0.05072021484375,
-0.02691650390625,
0.003253936767578125,
0.0176239013671875,
0.01026153564453125,
0.00560760498046875,
-0.0269622802734375,
0.048126220703125,
0.0251922607421875,
-0.029876708984375,
-0.00229644775390625,
-0.056976318359375,
0.0164337158203125,
0.0279388427734375,
0.0212860107421875,
-0.0484619140625,
-0.0013933181762695312,
-0.0246429443359375,
0.03955078125,
-0.016815185546875,
-0.03887939453125,
-0.008941650390625,
-0.0024166107177734375,
0.01629638671875,
-0.046600341796875,
-0.046173095703125,
-0.00469970703125,
0.0249481201171875,
0.036773681640625,
-0.0006642341613769531,
0.01169586181640625,
-0.0440673828125,
0.00044155120849609375,
0.012054443359375,
0.033477783203125,
-0.0307464599609375,
-0.0419921875,
0.0201873779296875,
-0.00635528564453125,
-0.013824462890625,
-0.0014333724975585938,
-0.0106658935546875,
-0.0159454345703125,
0.01105499267578125,
-0.05035400390625,
-0.0024471282958984375,
0.003810882568359375,
0.059539794921875,
-0.004756927490234375,
0.007579803466796875,
-0.05181884765625,
-0.0487060546875,
-0.0706787109375,
0.00669097900390625,
0.0085296630859375,
0.086181640625,
0.0555419921875,
0.0418701171875,
0.006427764892578125,
-0.031494140625,
-0.0187225341796875,
0.05804443359375,
-0.00627899169921875,
0.014678955078125,
-0.04119873046875,
-0.056732177734375,
0.0008640289306640625,
0.033782958984375,
0.004734039306640625,
0.004302978515625,
0.036834716796875,
0.0245819091796875,
-0.052001953125,
-0.0079803466796875,
0.0004801750183105469,
-0.034088134765625,
0.00853729248046875,
-0.047607421875,
0.038604736328125,
0.03662109375,
0.0117340087890625,
0.0007929801940917969,
-0.0007257461547851562,
0.0718994140625,
-0.01788330078125,
0.0273895263671875,
-0.0028076171875,
0.02520751953125,
0.0304718017578125,
-0.01514434814453125,
-0.037689208984375,
-0.007785797119140625,
-0.03271484375,
0.00788116455078125,
-0.061920166015625,
-0.0147857666015625,
0.01276397705078125,
0.00986480712890625,
-0.007568359375,
0.032012939453125,
-0.0035228729248046875,
-0.032958984375,
0.0309600830078125,
0.0032634735107421875,
0.0133514404296875,
0.0309906005859375,
0.0107421875,
0.0066680908203125,
-0.1038818359375,
-0.07745361328125,
-0.05816650390625,
0.04974365234375,
-0.013824462890625,
0.061981201171875,
-0.00946807861328125,
0.0234222412109375,
0.0257110595703125,
-0.02099609375,
0.036102294921875,
0.0022296905517578125,
0.0299835205078125,
-0.01291656494140625,
-0.0205841064453125,
-0.02581787109375,
0.031463623046875,
0.021514892578125,
0.04669189453125,
-0.027984619140625,
-0.023468017578125,
0.030548095703125,
0.0167388916015625,
-0.0137176513671875,
0.0086212158203125,
-0.0219879150390625,
-0.029571533203125,
-0.0205078125,
0.0012292861938476562,
0.0152130126953125,
0.0264434814453125,
-0.0019474029541015625,
0.022430419921875,
0.044219970703125,
0.0013065338134765625,
0.034454345703125,
-0.0008473396301269531,
0.0574951171875,
0.034912109375,
-0.061798095703125,
-0.0084991455078125,
0.021148681640625,
-0.0184478759765625,
0.0400390625,
-0.0092315673828125,
0.053863525390625,
0.030792236328125,
-0.0213470458984375,
0.043060302734375,
0.036102294921875,
0.065185546875,
-0.0163726806640625,
0.00551605224609375,
0.037322998046875,
0.0031642913818359375,
0.01312255859375,
-0.0262451171875,
-0.0052337646484375,
-0.04522705078125,
-0.005828857421875,
0.0193634033203125,
-0.01447296142578125,
0.00653839111328125,
0.024322509765625,
-0.0233306884765625,
0.026092529296875,
0.0082855224609375,
-0.029449462890625,
0.01032257080078125,
-0.0165863037109375,
-0.0089569091796875,
0.0216064453125,
0.00026869773864746094,
0.0026874542236328125,
0.036224365234375,
0.0018911361694335938,
0.000827789306640625,
-0.0177001953125,
0.01715087890625,
0.007228851318359375,
0.0389404296875,
0.032806396484375,
-0.043701171875,
-0.01294708251953125,
0.0654296875,
0.04705810546875,
0.09820556640625,
0.04638671875,
-0.0293121337890625,
-0.05059814453125,
0.03814697265625,
0.0186004638671875,
-0.0019426345825195312,
0.0078277587890625,
-0.005950927734375,
-0.020172119140625,
0.0050506591796875,
-0.00377655029296875,
0.019439697265625,
-0.0256805419921875,
-0.04998779296875,
0.040283203125,
-0.001033782958984375,
-0.028076171875,
-0.031768798828125,
-0.016082763671875,
-0.000030279159545898438,
0.035980224609375,
-0.00603485107421875,
-0.0015354156494140625,
-0.0618896484375,
-0.004352569580078125,
0.0198516845703125,
-0.056854248046875,
0.053955078125,
-0.00839996337890625,
-0.10015869140625,
-0.0045318603515625,
-0.006317138671875,
-0.010772705078125,
-0.023284912109375,
0.0148773193359375,
-0.0012416839599609375,
-0.0013761520385742188,
-0.05743408203125,
-0.0197296142578125,
-0.00226593017578125,
0.0595703125,
0.0215301513671875,
-0.006591796875,
-0.045684814453125,
0.0022335052490234375,
0.0230255126953125,
0.044677734375,
0.010650634765625,
-0.032867431640625,
-0.0153045654296875,
-0.00868988037109375,
-0.0357666015625,
-0.023284912109375,
0.01715087890625,
-0.062225341796875,
-0.0234527587890625,
-0.027191162109375,
0.01226043701171875,
-0.00232696533203125,
0.006832122802734375,
-0.018524169921875,
-0.030975341796875,
-0.01104736328125,
-0.0016508102416992188,
-0.058380126953125,
0.046783447265625,
0.0562744140625,
-0.06640625,
-0.006832122802734375,
-0.0088348388671875,
-0.0136566162109375,
0.01348876953125,
-0.0499267578125,
0.00522613525390625,
-0.0192108154296875,
-0.005641937255859375,
0.00035190582275390625,
0.0100250244140625,
0.02374267578125,
0.0108489990234375,
-0.047271728515625,
0.007511138916015625,
-0.001422882080078125,
-0.0176544189453125,
0.0070343017578125,
0.031707763671875,
-0.025634765625,
-0.011444091796875,
-0.027313232421875,
-0.02044677734375,
-0.01248931884765625,
-0.026397705078125,
0.0124664306640625,
0.029541015625,
-0.0013761520385742188,
0.0626220703125,
-0.006725311279296875,
0.003475189208984375,
-0.00624847412109375,
-0.035736083984375,
-0.0411376953125,
-0.005855560302734375,
-0.041595458984375,
-0.01331329345703125,
0.0209808349609375
] |
f52d3288265f1ec5d620dbf3532ddb9673a988b2
|
Wordpress Stackexchange
Q: Custom Post Type: Get most recent permalink Stupid question, I bet: I'm doing a website for an artist where I have a custom post type of "Painting". How do I get the permalink of the one added most recently?
A: Here is a simple function that will return the Permalink of the last painting post:
function Get_most_recent_permalink(){
global $post;
$tmp_post = $post;
$args = array(
'numberposts' => 1,
'offset' => 0,
'orderby' => 'post_date',
'order' => 'DESC',
'post_type' => 'Painting',
'post_status' => 'publish' );
$myposts = get_posts( $args );
$permalink = get_permalink($myposts[0]->ID);
$post = $tmp_post;
return $permalink;
}
so once you paste that function in your theme's functions.php file you can just call it whenever you want:
<a href="<?php echo Get_most_recent_permalink(); ?>">last painting</a>
|
Q: Custom Post Type: Get most recent permalink Stupid question, I bet: I'm doing a website for an artist where I have a custom post type of "Painting". How do I get the permalink of the one added most recently?
A: Here is a simple function that will return the Permalink of the last painting post:
function Get_most_recent_permalink(){
global $post;
$tmp_post = $post;
$args = array(
'numberposts' => 1,
'offset' => 0,
'orderby' => 'post_date',
'order' => 'DESC',
'post_type' => 'Painting',
'post_status' => 'publish' );
$myposts = get_posts( $args );
$permalink = get_permalink($myposts[0]->ID);
$post = $tmp_post;
return $permalink;
}
so once you paste that function in your theme's functions.php file you can just call it whenever you want:
<a href="<?php echo Get_most_recent_permalink(); ?>">last painting</a>
|
wordpress
|
{
"language": "en",
"length": 124,
"provenance": "stackexchange_00019.jsonl.gz:407787",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12143"
}
|
[
0.062255859375,
-0.0074462890625,
0.01366424560546875,
-0.0238494873046875,
0.0146942138671875,
-0.0178680419921875,
0.053375244140625,
-0.01427459716796875,
-0.0290069580078125,
0.01110076904296875,
0.02178955078125,
0.0193939208984375,
-0.055084228515625,
-0.04376220703125,
0.030059814453125,
-0.0106201171875,
0.0560302734375,
-0.052734375,
0.034759521484375,
0.0022430419921875,
-0.0201263427734375,
0.030731201171875,
0.07855224609375,
0.007419586181640625,
-0.00212860107421875,
0.0077362060546875,
0.06817626953125,
-0.0225067138671875,
0.0084228515625,
-0.030487060546875,
0.00940704345703125,
0.001068115234375,
-0.016326904296875,
0.0186920166015625,
0.031707763671875,
0.0177001953125,
0.0251617431640625,
0.01392364501953125,
0.051239013671875,
0.0023479461669921875,
0.0017795562744140625,
0.0216217041015625,
-0.02154541015625,
0.0293121337890625,
-0.052886962890625,
-0.01528167724609375,
-0.032135009765625,
-0.010406494140625,
-0.0189056396484375,
-0.01180267333984375,
-0.0002701282501220703,
-0.01058197021484375,
0.0301971435546875,
-0.004993438720703125,
-0.02056884765625,
-0.0215911865234375,
0.00760650634765625,
-0.0209503173828125,
0.039947509765625,
-0.026275634765625,
-0.04510498046875,
-0.028961181640625,
0.036468505859375,
-0.0181732177734375,
-0.032073974609375,
0.007396697998046875,
0.01042938232421875,
0.0252838134765625,
-0.045745849609375,
-0.06103515625,
0.01056671142578125,
-0.0127105712890625,
0.006504058837890625,
-0.0323486328125,
-0.0008320808410644531,
-0.034698486328125,
0.00016021728515625,
-0.055389404296875,
-0.00992584228515625,
0.000545501708984375,
0.014190673828125,
-0.01079559326171875,
-0.046844482421875,
-0.00913238525390625,
-0.005764007568359375,
0.00855255126953125,
0.0014209747314453125,
-0.0106048583984375,
-0.0389404296875,
-0.0247650146484375,
-0.03228759765625,
-0.0163116455078125,
-0.02447509765625,
0.00038361549377441406,
-0.0245819091796875,
-0.0119171142578125,
0.0219268798828125,
0.019866943359375,
-0.004932403564453125,
-0.01275634765625,
0.01108551025390625,
-0.0477294921875,
0.0242462158203125,
-0.03570556640625,
-0.00495147705078125,
-0.0038547515869140625,
-0.00617218017578125,
-0.0072479248046875,
0.04583740234375,
0.0328369140625,
0.006763458251953125,
0.0254974365234375,
0.01007843017578125,
-0.0039520263671875,
-0.0066375732421875,
0.00048542022705078125,
-0.04400634765625,
0.038177490234375,
0.0002856254577636719,
0.032379150390625,
-0.03314208984375,
-0.0036296844482421875,
0.004741668701171875,
0.0004038810729980469,
0.0206298828125,
0.00582122802734375,
-0.02911376953125,
0.0079803466796875,
0.042388916015625,
0.05633544921875,
-0.049774169921875,
-0.02685546875,
0.06689453125,
0.0125579833984375,
0.0273895263671875,
-0.04644775390625,
0.036895751953125,
-0.01898193359375,
0.00595855712890625,
0.0240325927734375,
-0.006744384765625,
-0.0187835693359375,
0.014190673828125,
-0.0167388916015625,
0.0031757354736328125,
0.0201873779296875,
-0.01123809814453125,
0.00688934326171875,
0.02105712890625,
-0.01393890380859375,
-0.0031604766845703125,
-0.0384521484375,
0.039276123046875,
-0.00705718994140625,
-0.035552978515625,
-0.00785064697265625,
0.0076446533203125,
-0.0016393661499023438,
-0.0262908935546875,
-0.033294677734375,
0.06414794921875,
0.003047943115234375,
-0.01129913330078125,
0.03265380859375,
-0.0207366943359375,
0.01439666748046875,
-0.045806884765625,
-0.0141143798828125,
0.02593994140625,
0.05584716796875,
-0.005100250244140625,
-0.0210723876953125,
0.0252532958984375,
0.0121917724609375,
-0.0223388671875,
-0.005100250244140625,
0.0150146484375,
0.031463623046875,
0.0064544677734375,
0.00008046627044677734,
-0.026031494140625,
-0.04150390625,
0.03997802734375,
-0.0248565673828125,
-0.03466796875,
0.021484375,
0.03216552734375,
0.046051025390625,
-0.0156097412109375,
0.0212249755859375,
0.022125244140625,
0.0343017578125,
-0.047821044921875,
0.017120361328125,
-0.029388427734375,
-0.00008237361907958984,
-0.0139007568359375,
0.0106964111328125,
-0.0355224609375,
0.02960205078125,
-0.00568389892578125,
0.01280975341796875,
0.005107879638671875,
0.01470184326171875,
-0.021636962890625,
0.0294036865234375,
-0.016448974609375,
0.02777099609375,
0.00762176513671875,
0.0125885009765625,
0.018524169921875,
0.00856781005859375,
-0.02532958984375,
-0.052825927734375,
-0.0235443115234375,
0.048095703125,
-0.032623291015625,
0.017333984375,
-0.05596923828125,
0.036773681640625,
-0.043670654296875,
-0.0726318359375,
-0.04754638671875,
0.01444244384765625,
0.0298309326171875,
0.028594970703125,
-0.033599853515625,
0.007007598876953125,
-0.0190887451171875,
0.05511474609375,
-0.07843017578125,
-0.0017995834350585938,
0.019378662109375,
-0.0125274658203125,
-0.01220703125,
-0.0021514892578125,
0.014923095703125,
-0.0728759765625,
0.0027751922607421875,
0.05548095703125,
0.0269012451171875,
0.0355224609375,
0.0166168212890625,
0.03314208984375,
0.058807373046875,
-0.04058837890625,
0.003925323486328125,
0.0033054351806640625,
0.0222625732421875,
0.05950927734375,
0.016876220703125,
0.01666259765625,
0.0015392303466796875,
-0.0025959014892578125,
0.0196380615234375,
0.0325927734375,
-0.0139312744140625,
0.0280914306640625,
-0.025115966796875,
0.029541015625,
-0.006134033203125,
-0.0006189346313476562,
-0.008270263671875,
-0.0233917236328125,
0.0266265869140625,
0.01154327392578125,
0.034942626953125,
0.036651611328125,
-0.001880645751953125,
-0.01012420654296875,
-0.002788543701171875,
0.0013399124145507812,
0.012786865234375,
0.0191650390625,
0.036712646484375,
-0.00904083251953125,
-0.00861358642578125,
-0.020050048828125,
0.018951416015625,
-0.002452850341796875,
-0.04547119140625,
-0.005458831787109375,
-0.01328277587890625,
-0.01073455810546875,
-0.0112152099609375,
-0.05731201171875,
0.020294189453125,
-0.01065826416015625,
0.01508331298828125,
0.032684326171875,
0.042449951171875,
0.0211029052734375,
-0.0362548828125,
0.03802490234375,
0.01303863525390625,
-0.0133514404296875,
-0.0030612945556640625,
-0.061309814453125,
0.054901123046875,
-0.045806884765625,
0.03253173828125,
0.06744384765625,
-0.01084136962890625,
0.03466796875,
-0.002490997314453125,
-0.0227813720703125,
-0.0021514892578125,
-0.0142669677734375,
-0.029541015625,
-0.01373291015625,
-0.07928466796875,
-0.010406494140625,
0.024169921875,
0.033538818359375,
-0.01374053955078125,
-0.045135498046875,
-0.0019817352294921875,
0.017120361328125,
-0.0870361328125,
-0.05633544921875,
0.007404327392578125,
-0.02447509765625,
-0.032684326171875,
0.0016851425170898438,
-0.01129150390625,
0.0009126663208007812,
0.009002685546875,
-0.006916046142578125,
-0.0008211135864257812,
-0.000713348388671875,
-0.031890869140625,
-0.0211944580078125,
-0.054290771484375,
-0.0126953125,
0.0028591156005859375,
0.01268768310546875,
-0.0007543563842773438,
0.06903076171875,
-0.005573272705078125,
-0.03509521484375,
0.004486083984375,
-0.0168304443359375,
-0.00919342041015625,
-0.00788116455078125,
0.01377105712890625,
0.021697998046875,
-0.003330230712890625,
0.013885498046875,
0.037933349609375,
0.0399169921875,
-0.05633544921875,
-0.00844573974609375,
-0.04583740234375,
-0.00855255126953125,
-0.0135650634765625,
0.0474853515625,
0.062103271484375,
0.012847900390625,
0.036895751953125,
-0.024749755859375,
-0.03076171875,
-0.0165863037109375,
-0.038665771484375,
0.035614013671875,
0.0165557861328125,
0.000507354736328125,
-0.001216888427734375,
0.029327392578125,
-0.023773193359375,
0.0079803466796875,
0.0277557373046875,
-0.032501220703125,
0.039947509765625,
0.0013055801391601562,
-0.01107025146484375,
-0.0201873779296875,
0.031402587890625,
-0.0224761962890625,
0.0504150390625,
0.0195159912109375,
0.0023937225341796875,
0.01013946533203125,
-0.0199127197265625,
-0.026824951171875,
-0.037506103515625,
0.048309326171875,
-0.0621337890625,
-0.005496978759765625,
-0.0703125,
-0.03387451171875,
-0.02349853515625,
0.08013916015625,
0.017974853515625,
-0.02215576171875,
-0.01123046875,
-0.018890380859375,
-0.00827789306640625,
0.00264739990234375,
-0.044281005859375,
-0.0029621124267578125,
-0.09912109375,
-0.00913238525390625,
0.0012683868408203125,
-0.03753662109375,
-0.021087646484375,
0.03656005859375,
-0.08026123046875,
-0.0261383056640625,
0.04547119140625,
-0.0164642333984375,
-0.029449462890625,
0.0692138671875,
-0.03558349609375,
0.02081298828125,
-0.057586669921875,
0.00804901123046875,
-0.0277252197265625,
-0.0198822021484375,
0.00875091552734375,
0.02008056640625,
0.00646209716796875,
-0.0301361083984375,
-0.0122833251953125,
0.0284576416015625,
0.0303497314453125,
0.0225982666015625,
0.0052947998046875,
-0.0225982666015625,
0.01117706298828125,
0.0008897781372070312,
0.00841522216796875,
-0.01309967041015625,
0.0269622802734375,
0.017303466796875,
-0.0543212890625,
-0.0275726318359375,
-0.049896240234375,
-0.0340576171875,
0.01435089111328125,
-0.062103271484375,
-0.0196075439453125,
-0.0207977294921875,
-0.0164642333984375,
0.04638671875,
-0.0274658203125,
0.00860595703125,
-0.048248291015625,
-0.061920166015625,
0.049285888671875,
-0.01392364501953125,
-0.004329681396484375,
0.00667572021484375,
0.1124267578125,
0.010711669921875,
-0.00980377197265625,
-0.057586669921875,
0.0210723876953125,
0.0281524658203125,
-0.044586181640625,
0.023681640625,
0.0261688232421875,
-0.0173187255859375,
-0.004608154296875,
-0.0192413330078125,
-0.040679931640625,
-0.0007266998291015625,
0.03125,
0.0101318359375,
0.01448822021484375,
-0.03594970703125,
-0.047760009765625,
0.07440185546875,
0.0158538818359375,
-0.051971435546875,
-0.0180816650390625,
-0.051483154296875,
0.07269287109375,
-0.0177764892578125,
0.059906005859375,
-0.059173583984375,
-0.035247802734375,
0.016876220703125,
0.0020503997802734375,
0.04168701171875,
0.030853271484375,
-0.0164642333984375,
0.04058837890625,
0.02093505859375,
-0.00925445556640625,
-0.009613037109375,
0.008544921875,
0.032562255859375,
0.043212890625,
-0.0092926025390625,
0.0066680908203125,
-0.009124755859375,
0.004558563232421875,
0.033447265625,
0.003997802734375,
-0.017852783203125,
-0.02789306640625,
-0.01708984375,
0.002239227294921875,
-0.00923919677734375,
0.0103912353515625,
0.06158447265625,
0.0189971923828125,
0.0017795562744140625,
-0.0181427001953125,
-0.032379150390625,
0.0212554931640625,
-0.05047607421875,
-0.006565093994140625,
-0.006465911865234375,
-0.0086517333984375,
-0.041778564453125,
0.09515380859375,
0.01378631591796875,
0.0296173095703125,
-0.0135650634765625,
-0.004638671875,
-0.006900787353515625,
0.031829833984375,
0.0214691162109375,
-0.01190948486328125,
0.00803375244140625,
-0.0089569091796875,
0.033721923828125,
-0.024261474609375,
-0.0211029052734375,
0.01763916015625,
0.06591796875,
-0.036224365234375,
-0.0107421875,
0.0182342529296875,
-0.018157958984375,
-0.047332763671875,
0.0296783447265625,
0.062225341796875,
-0.009002685546875,
-0.012359619140625,
0.00543975830078125,
0.004608154296875,
0.0452880859375,
-0.019805908203125,
0.040252685546875,
-0.00672149658203125,
0.0275726318359375,
-0.039093017578125,
-0.00501251220703125,
0.01386260986328125,
0.0208587646484375,
-0.05523681640625,
-0.05218505859375,
0.0132904052734375,
-0.002521514892578125,
0.0215301513671875,
-0.0198516845703125,
-0.041229248046875,
0.014251708984375,
0.01885986328125,
0.0704345703125,
-0.044097900390625,
-0.05645751953125,
0.006229400634765625,
-0.02276611328125,
0.05975341796875,
0.0021076202392578125,
-0.02435302734375,
0.002719879150390625,
-0.017547607421875,
0.00366973876953125,
0.0245208740234375,
-0.0252227783203125,
0.0006222724914550781,
-0.02972412109375,
0.02178955078125,
0.0285491943359375,
0.0021514892578125,
-0.0037174224853515625,
0.00145721435546875,
0.0194091796875,
0.0020542144775390625,
0.0833740234375,
0.00864410400390625,
0.06463623046875,
0.00970458984375,
0.0703125,
0.0247344970703125,
0.0168609619140625,
-0.06689453125,
-0.0197601318359375,
0.00978851318359375,
-0.007389068603515625,
-0.0182952880859375,
0.0018825531005859375,
-0.01666259765625,
-0.039764404296875,
0.019500732421875,
-0.01435089111328125,
0.00299072265625,
-0.00357818603515625,
0.01465606689453125,
-0.0193939208984375,
-0.0247344970703125,
-0.01067352294921875,
-0.035064697265625,
0.0151824951171875,
0.00313568115234375,
0.02899169921875,
-0.004703521728515625,
-0.0214996337890625,
-0.0006341934204101562,
0.0042266845703125,
0.00778961181640625,
0.012603759765625,
0.0074920654296875,
0.01045989990234375,
0.061065673828125,
0.042724609375,
0.0648193359375,
0.009063720703125,
0.043060302734375,
0.0177001953125,
0.0025501251220703125,
0.03192138671875,
0.003574371337890625,
0.053924560546875,
0.01511383056640625,
0.040618896484375,
0.054901123046875,
0.0033016204833984375,
-0.008087158203125,
0.00421142578125,
0.0423583984375,
0.00435638427734375,
-0.005916595458984375,
0.0002541542053222656,
-0.011627197265625,
0.03509521484375,
0.01290130615234375,
-0.00940704345703125,
-0.0183868408203125,
0.026031494140625,
-0.07513427734375,
-0.01092529296875,
-0.003940582275390625,
-0.041473388671875,
0.00501251220703125,
-0.009429931640625,
0.048248291015625,
0.001873016357421875,
-0.022735595703125,
-0.046844482421875,
0.0210723876953125,
-0.04541015625,
-0.000019550323486328125,
0.022705078125,
-0.038360595703125,
0.0200347900390625,
0.0019216537475585938,
0.02606201171875,
-0.032318115234375,
0.020477294921875,
0.0070953369140625,
-0.025726318359375,
0.0203094482421875,
0.029052734375,
-0.025146484375,
0.0026702880859375,
0.0137939453125,
-0.0372314453125,
-0.0030727386474609375,
-0.0246734619140625,
-0.00342559814453125,
0.042236328125,
-0.01076507568359375,
0.0185546875,
0.0022182464599609375,
-0.0254058837890625,
-0.0161895751953125,
0.0035915374755859375,
0.109130859375,
-0.0626220703125,
-0.005313873291015625,
0.0511474609375,
0.00311279296875,
-0.033447265625,
-0.007312774658203125,
-0.0062713623046875,
-0.046875,
-0.00867462158203125,
-0.0136871337890625,
-0.0261383056640625,
0.02642822265625,
-0.01418304443359375,
-0.0667724609375,
0.11322021484375,
0.0154266357421875,
0.05712890625,
0.038848876953125,
0.03192138671875,
-0.038604736328125,
-0.00827789306640625,
-0.0394287109375,
0.060272216796875,
-0.0226593017578125,
0.05096435546875,
-0.06280517578125,
0.0011224746704101562,
-0.00366973876953125,
0.0227203369140625,
0.083251953125,
0.0159454345703125,
-0.062408447265625,
-0.0014295578002929688,
0.08135986328125,
0.035003662109375,
0.005031585693359375,
0.054779052734375,
0.01611328125,
0.03582763671875,
0.0684814453125,
-0.01181793212890625,
0.050323486328125,
-0.0015735626220703125,
-0.00859832763671875,
0.0213623046875,
0.0249481201171875,
0.03857421875,
-0.01451873779296875,
-0.0279693603515625,
-0.04150390625,
0.0017223358154296875,
0.0577392578125,
-0.03814697265625,
0.00989532470703125,
0.034637451171875,
0.0716552734375,
-0.05023193359375,
-0.0200042724609375,
-0.02294921875,
0.057891845703125,
0.028106689453125,
0.007526397705078125,
0.027069091796875,
0.0182647705078125,
0.021759033203125,
-0.0196533203125,
0.00597381591796875,
0.004566192626953125,
-0.01141357421875,
0.09234619140625,
0.056732177734375,
0.0293426513671875,
-0.0274658203125,
-0.032562255859375,
0.06805419921875,
0.10888671875,
-0.0460205078125,
-0.02166748046875,
0.0139312744140625,
0.0192108154296875,
0.0029926300048828125,
-0.0171356201171875,
0.0091094970703125,
-0.0211944580078125,
0.01148223876953125,
-0.037017822265625,
-0.03179931640625,
0.0210418701171875,
0.062744140625,
-0.0004718303680419922,
-0.0648193359375,
-0.026336669921875,
-0.04815673828125,
-0.0433349609375,
-0.004238128662109375,
0.026947021484375,
0.05291748046875,
0.0172576904296875,
0.033721923828125,
-0.0182952880859375,
-0.00955963134765625,
0.003520965576171875,
-0.0034236907958984375,
-0.0275115966796875,
0.0200653076171875,
-0.019439697265625,
-0.0240478515625,
0.01125335693359375,
0.044708251953125,
0.0238189697265625,
-0.035064697265625,
0.0193023681640625,
0.00087738037109375,
-0.031951904296875,
-0.0016069412231445312,
0.023162841796875,
-0.0208740234375,
0.0188446044921875,
-0.052215576171875,
0.0030879974365234375,
-0.01611328125,
-0.022857666015625,
0.003314971923828125,
-0.043731689453125,
0.04302978515625,
-0.034149169921875,
0.048126220703125,
-0.005157470703125,
-0.00836944580078125,
0.043609619140625,
0.007965087890625,
0.04779052734375,
0.0009360313415527344,
-0.026947021484375,
0.013153076171875,
-0.029571533203125,
-0.05401611328125,
0.01146697998046875,
0.021514892578125,
-0.012176513671875,
-0.00534820556640625,
0.00066375732421875,
-0.0240936279296875,
0.055419921875,
-0.0120849609375,
-0.0067901611328125,
0.041351318359375,
0.025146484375,
0.0074310302734375,
-0.03802490234375,
-0.027191162109375,
-0.0006971359252929688,
0.0217742919921875,
0.0293426513671875,
-0.0198516845703125,
0.043701171875,
0.0294036865234375,
-0.004085540771484375,
-0.00003337860107421875,
-0.01763916015625,
-0.0053558349609375,
0.03369140625,
-0.0152435302734375,
-0.0106964111328125,
0.0023746490478515625,
-0.02935791015625,
-0.01534271240234375,
0.0535888671875,
-0.0361328125,
-0.02886962890625,
0.0224609375,
0.0264892578125,
-0.01313018798828125,
0.0244598388671875,
-0.041839599609375,
-0.034271240234375,
-0.055694580078125,
-0.0325927734375,
0.020782470703125,
-0.02581787109375,
-0.01285552978515625,
0.035858154296875,
0.0343017578125,
-0.036041259765625,
0.021453857421875,
-0.0440673828125,
0.0609130859375,
0.041168212890625,
0.0038585662841796875,
0.0094451904296875,
-0.0240020751953125,
-0.0176239013671875,
0.0012445449829101562,
0.00010228157043457031,
-0.01435089111328125,
-0.01010894775390625,
-0.0257415771484375,
0.00711822509765625,
-0.04876708984375,
0.01465606689453125,
-0.014892578125,
-0.00562286376953125,
-0.031158447265625,
0.013916015625,
0.006744384765625,
-0.035308837890625,
-0.0200653076171875,
-0.0650634765625,
0.03143310546875,
0.020751953125,
0.00951385498046875,
0.013336181640625,
0.034088134765625,
0.02105712890625,
0.00215911865234375,
-0.00641632080078125,
-0.0286102294921875,
0.053802490234375,
-0.047698974609375,
0.0146026611328125,
-0.0247955322265625,
-0.0765380859375,
0.0216827392578125,
0.0312347412109375,
0.0211334228515625,
-0.0246734619140625,
-0.03375244140625,
0.008514404296875,
-0.03228759765625,
-0.0041656494140625,
0.0116119384765625,
-0.0085296630859375,
0.00548553466796875,
-0.0197296142578125,
-0.0160675048828125,
0.0283203125,
-0.01971435546875,
-0.00347900390625,
0.0369873046875,
-0.0169830322265625,
-0.05377197265625,
-0.0545654296875,
0.0377197265625,
-0.059478759765625,
-0.0049896240234375,
-0.0157928466796875,
0.0006194114685058594,
0.0231781005859375,
-0.0210418701171875,
-0.0293731689453125,
0.02490234375,
-0.0158843994140625,
-0.031341552734375,
-0.07623291015625,
0.015899658203125,
0.0133514404296875,
0.01245880126953125,
-0.01480865478515625,
-0.0238800048828125,
-0.0270538330078125,
0.0171966552734375,
0.017578125,
0.00705718994140625,
0.0274200439453125,
0.011383056640625,
-0.0274810791015625,
0.01593017578125,
0.002872467041015625,
0.009307861328125,
0.018157958984375,
-0.023406982421875,
0.040191650390625,
0.035186767578125,
-0.04833984375,
0.01158905029296875,
-0.0079345703125,
0.042999267578125,
-0.00856781005859375,
-0.05816650390625,
-0.041107177734375,
-0.027679443359375,
0.06475830078125,
0.042724609375,
0.0288238525390625,
-0.02276611328125,
0.0033321380615234375,
0.005779266357421875,
-0.0269927978515625,
-0.0015420913696289062,
0.025299072265625,
-0.043243408203125,
-0.0123748779296875,
0.00003254413604736328,
-0.00963592529296875,
-0.019073486328125,
0.0011081695556640625,
-0.0430908203125,
0.021728515625,
0.019744873046875,
0.006351470947265625,
-0.0286102294921875,
0.056427001953125,
0.0287933349609375,
-0.031036376953125,
0.015625,
-0.019744873046875,
-0.0226287841796875,
0.0237884521484375,
-0.0238800048828125,
0.02447509765625,
0.0389404296875,
-0.0023193359375,
-0.004169464111328125,
0.04852294921875,
0.0110931396484375,
0.01800537109375,
-0.01495361328125,
-0.0083465576171875,
-0.0005488395690917969,
0.006572723388671875,
-0.029998779296875,
-0.01092529296875,
-0.0042724609375,
-0.01027679443359375,
0.054443359375,
-0.006969451904296875,
0.06939697265625,
0.0123291015625,
0.037200927734375,
-0.0228424072265625,
-0.002429962158203125,
0.01287841796875,
-0.0435791015625,
0.0021724700927734375,
-0.0016946792602539062,
0.00875091552734375,
-0.038116455078125,
0.0258941650390625,
-0.01094818115234375,
0.0016202926635742188,
0.0214385986328125
] |
e2f055854f5ed55f93971c26251c13624150723e
|
Wordpress Stackexchange
Q: Proper way to get page content I have to get specific page content (like page(12))
I used that :
<?php $id=47; $post = get_page($id); echo $post->post_content; ?>
Work nice execpt for compatibility with qtranslate it return french and english text
But the loop is fine, return only the good language version
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<div id="post">
<?php the_content(); ?>
</div> <!-- .post -->
So the question.... HOW to get a specific page content insite the loop...
A: Here is the solution i have founs that work fine...the codex should be more specific about the apply_filter ... used it all everytime
$id=47;
$post = get_page($id);
$content = apply_filters('the_content', $post->post_content);
echo $content;
But i have found a great place to ask question (HERE)! thanks guys !
|
Q: Proper way to get page content I have to get specific page content (like page(12))
I used that :
<?php $id=47; $post = get_page($id); echo $post->post_content; ?>
Work nice execpt for compatibility with qtranslate it return french and english text
But the loop is fine, return only the good language version
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<div id="post">
<?php the_content(); ?>
</div> <!-- .post -->
So the question.... HOW to get a specific page content insite the loop...
A: Here is the solution i have founs that work fine...the codex should be more specific about the apply_filter ... used it all everytime
$id=47;
$post = get_page($id);
$content = apply_filters('the_content', $post->post_content);
echo $content;
But i have found a great place to ask question (HERE)! thanks guys !
A: Just to clarify:
You mixed two things here. qTranslate stores the different languages in the same post. If you call get_content(), $post->content or an other direct query, you will get the whole content with all different languages from the database.
What qTranslates do, it creates a filter-hook which is attached to the_content hook. If somebody call the_content() in a page template, all other languages will be filtered out.
So you're right. To filter the other languages, you have to apply the filter-hook the_content to your output.
A: It's not used often, but myself I like get_post_field() function. It is compact, yet flexible for when you need to pull single specific field.
A: You can use get_page, like so:
http://codex.wordpress.org/Function_Reference/get_page
|
wordpress
|
{
"language": "en",
"length": 249,
"provenance": "stackexchange_00019.jsonl.gz:407792",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12161"
}
|
[
-0.00327301025390625,
-0.007144927978515625,
0.0079345703125,
0.0178680419921875,
0.00832366943359375,
-0.0233154296875,
0.046478271484375,
-0.036041259765625,
0.021728515625,
0.0150299072265625,
-0.0318603515625,
-0.031097412109375,
-0.04095458984375,
-0.022430419921875,
-0.01438140869140625,
-0.06195068359375,
0.0241241455078125,
-0.022705078125,
0.03436279296875,
-0.0014791488647460938,
-0.000453948974609375,
0.0029697418212890625,
0.048187255859375,
-0.0244140625,
0.0290374755859375,
-0.0692138671875,
0.0699462890625,
0.006389617919921875,
0.00812530517578125,
-0.0145416259765625,
0.0223541259765625,
-0.00554656982421875,
0.046478271484375,
-0.00885009765625,
-0.03369140625,
-0.01479339599609375,
-0.001338958740234375,
-0.0170135498046875,
-0.0302886962890625,
0.034912109375,
0.003444671630859375,
0.0158233642578125,
0.0094146728515625,
0.053680419921875,
-0.018096923828125,
-0.0400390625,
0.006000518798828125,
-0.053466796875,
-0.01465606689453125,
0.048583984375,
0.0288848876953125,
0.01116943359375,
0.02178955078125,
0.0198974609375,
0.0096893310546875,
0.0029735565185546875,
-0.0012798309326171875,
-0.0232391357421875,
0.03741455078125,
-0.052154541015625,
-0.047515869140625,
-0.020965576171875,
0.044342041015625,
0.01445770263671875,
-0.034088134765625,
0.0023136138916015625,
0.044097900390625,
-0.00789642333984375,
-0.07684326171875,
-0.04681396484375,
0.072265625,
-0.0213165283203125,
-0.0008702278137207031,
-0.05255126953125,
-0.03167724609375,
0.0247039794921875,
-0.01134490966796875,
-0.057891845703125,
-0.005100250244140625,
-0.0233306884765625,
-0.0400390625,
0.028228759765625,
-0.0750732421875,
0.007610321044921875,
-0.021514892578125,
-0.0019254684448242188,
-0.0259857177734375,
-0.004802703857421875,
-0.037689208984375,
-0.03436279296875,
-0.02911376953125,
0.0016508102416992188,
-0.02276611328125,
-0.053955078125,
-0.04217529296875,
-0.0193023681640625,
0.01554107666015625,
0.036651611328125,
0.0027141571044921875,
0.036163330078125,
-0.003437042236328125,
-0.056182861328125,
0.06854248046875,
-0.056884765625,
0.0374755859375,
0.00264739990234375,
-0.01873779296875,
0.00904083251953125,
0.07318115234375,
0.0296783447265625,
-0.009552001953125,
0.06903076171875,
0.00516510009765625,
-0.014801025390625,
-0.0174560546875,
0.037841796875,
-0.0037593841552734375,
-0.0182952880859375,
0.0017337799072265625,
-0.01483917236328125,
0.0290374755859375,
0.0218353271484375,
0.01611328125,
-0.0260162353515625,
0.007137298583984375,
0.003627777099609375,
-0.047271728515625,
-0.0269927978515625,
0.037811279296875,
0.01678466796875,
-0.02410888671875,
-0.0164794921875,
0.0301971435546875,
0.0084228515625,
0.006114959716796875,
-0.0235443115234375,
-0.00127410888671875,
-0.0311126708984375,
-0.004459381103515625,
0.01102447509765625,
-0.0328369140625,
0.00830078125,
0.065185546875,
-0.042083740234375,
-0.07080078125,
-0.006072998046875,
-0.0146331787109375,
0.0321044921875,
0.005382537841796875,
-0.036041259765625,
-0.0223846435546875,
-0.01033782958984375,
0.027099609375,
-0.020538330078125,
-0.0311279296875,
-0.041046142578125,
-0.02642822265625,
-0.0234527587890625,
0.018829345703125,
-0.030853271484375,
0.05682373046875,
-0.006175994873046875,
-0.019866943359375,
0.0308990478515625,
-0.0084381103515625,
-0.0166168212890625,
-0.033843994140625,
-0.00959014892578125,
0.01515960693359375,
0.025146484375,
0.0148162841796875,
-0.036468505859375,
-0.04901123046875,
-0.0193939208984375,
-0.00727081298828125,
0.016754150390625,
-0.005474090576171875,
0.003650665283203125,
0.0182647705078125,
0.021453857421875,
-0.00948333740234375,
-0.0143585205078125,
0.0295562744140625,
0.002346038818359375,
-0.044189453125,
0.0022258758544921875,
0.01953125,
0.057952880859375,
0.01055908203125,
0.020050048828125,
0.0276947021484375,
0.00455474853515625,
-0.076171875,
0.033905029296875,
0.004611968994140625,
-0.0227203369140625,
-0.0282745361328125,
-0.015838623046875,
-0.00484466552734375,
-0.00444793701171875,
0.037078857421875,
-0.038177490234375,
0.035400390625,
0.0224456787109375,
-0.0211334228515625,
-0.00606536865234375,
-0.01242828369140625,
-0.003185272216796875,
-0.0010538101196289062,
-0.00775146484375,
0.01776123046875,
-0.01116943359375,
-0.0215606689453125,
-0.032257080078125,
-0.037841796875,
0.01953125,
-0.0204925537109375,
-0.031341552734375,
-0.010986328125,
0.016021728515625,
-0.007293701171875,
-0.00823974609375,
-0.0246734619140625,
0.020782470703125,
0.05328369140625,
-0.006000518798828125,
-0.007415771484375,
-0.01526641845703125,
0.051361083984375,
0.00946044921875,
-0.0183258056640625,
0.0227813720703125,
0.037750244140625,
0.03961181640625,
-0.0396728515625,
0.006988525390625,
0.01641845703125,
-0.02252197265625,
-0.0013456344604492188,
0.0380859375,
0.032958984375,
0.041534423828125,
-0.029388427734375,
-0.03564453125,
0.068359375,
-0.06280517578125,
-0.0213165283203125,
-0.01078033447265625,
0.03814697265625,
0.10479736328125,
-0.005802154541015625,
0.012359619140625,
-0.0042572021484375,
-0.04779052734375,
0.0178985595703125,
0.027099609375,
-0.00274658203125,
0.033233642578125,
-0.045166015625,
0.0207061767578125,
-0.006549835205078125,
0.0006527900695800781,
-0.0040283203125,
-0.01445770263671875,
-0.0018177032470703125,
0.0214996337890625,
0.0131988525390625,
0.0262298583984375,
-0.0049591064453125,
0.002346038818359375,
-0.0083465576171875,
0.005741119384765625,
0.01293182373046875,
0.04241943359375,
-0.03057861328125,
-0.00536346435546875,
-0.01047515869140625,
-0.004913330078125,
0.01119232177734375,
0.00841522216796875,
0.0179290771484375,
0.0382080078125,
0.0014848709106445312,
-0.0186920166015625,
0.00972747802734375,
-0.01323699951171875,
-0.017578125,
0.018096923828125,
0.02789306640625,
-0.0022487640380859375,
0.01337432861328125,
0.047119140625,
-0.0101776123046875,
0.0408935546875,
0.02020263671875,
-0.0086517333984375,
0.10693359375,
-0.01531982421875,
0.01335906982421875,
0.0017843246459960938,
0.060546875,
0.049285888671875,
-0.0178680419921875,
0.006107330322265625,
0.01221466064453125,
0.0029754638671875,
0.034515380859375,
0.00011354684829711914,
-0.004428863525390625,
0.02276611328125,
-0.07135009765625,
0.004764556884765625,
0.01096343994140625,
0.0849609375,
-0.042510986328125,
-0.06829833984375,
-0.005283355712890625,
0.017730712890625,
-0.1162109375,
-0.0968017578125,
0.015045166015625,
-0.060791015625,
-0.0247039794921875,
0.0002570152282714844,
-0.036590576171875,
0.01506805419921875,
0.01174163818359375,
-0.015289306640625,
-0.00035643577575683594,
0.017822265625,
-0.08135986328125,
-0.01140594482421875,
-0.06744384765625,
0.0230712890625,
-0.042999267578125,
0.03521728515625,
0.00833892822265625,
0.00891876220703125,
0.01004791259765625,
-0.04779052734375,
0.00749969482421875,
0.07305908203125,
-0.01861572265625,
0.005870819091796875,
-0.044189453125,
-0.0016107559204101562,
-0.024749755859375,
0.004180908203125,
-0.01074981689453125,
-0.036468505859375,
0.032684326171875,
-0.0174102783203125,
-0.0282440185546875,
0.05841064453125,
0.01995849609375,
-0.01442718505859375,
0.037078857421875,
0.06695556640625,
0.0193328857421875,
-0.0130767822265625,
-0.039703369140625,
0.0036449432373046875,
-0.04052734375,
0.009918212890625,
0.038604736328125,
-0.004970550537109375,
-0.0044708251953125,
0.00714874267578125,
-0.006561279296875,
0.0005025863647460938,
0.00910186767578125,
-0.033966064453125,
0.02435302734375,
0.0064544677734375,
0.004428863525390625,
0.0022449493408203125,
0.03955078125,
-0.0008158683776855469,
0.022918701171875,
0.034027099609375,
0.00977325439453125,
0.012054443359375,
-0.0113983154296875,
0.00652313232421875,
-0.05157470703125,
0.050567626953125,
0.025421142578125,
0.01641845703125,
-0.007061004638671875,
-0.052734375,
0.01253509521484375,
0.1051025390625,
-0.0259857177734375,
-0.016204833984375,
-0.032867431640625,
0.0009160041809082031,
-0.00038886070251464844,
-0.0396728515625,
-0.01558685302734375,
-0.00566864013671875,
-0.051910400390625,
0.0046844482421875,
-0.022064208984375,
-0.012054443359375,
-0.0152130126953125,
-0.01059722900390625,
-0.0204010009765625,
-0.03009033203125,
0.041046142578125,
-0.0076904296875,
-0.0076751708984375,
0.0521240234375,
-0.0166473388671875,
0.02691650390625,
-0.03790283203125,
-0.00350189208984375,
-0.082275390625,
-0.01788330078125,
0.0218963623046875,
0.05291748046875,
0.0082244873046875,
-0.055755615234375,
-0.0220489501953125,
0.043731689453125,
0.01239013671875,
0.046783447265625,
-0.01372528076171875,
-0.01505279541015625,
0.026763916015625,
-0.00995635986328125,
0.00524139404296875,
-0.0219879150390625,
-0.02423095703125,
-0.0030994415283203125,
0.007472991943359375,
0.034912109375,
-0.0300750732421875,
-0.01313018798828125,
-0.033416748046875,
-0.0142059326171875,
-0.08795166015625,
-0.0148773193359375,
0.016571044921875,
-0.01544952392578125,
-0.00020956993103027344,
0.0019311904907226562,
0.00423431396484375,
-0.06353759765625,
0.06744384765625,
0.0550537109375,
-0.0299530029296875,
-0.01678466796875,
0.042205810546875,
0.005146026611328125,
-0.0660400390625,
-0.06536865234375,
0.011474609375,
0.04034423828125,
-0.02752685546875,
0.08184814453125,
0.0413818359375,
-0.042236328125,
0.1357421875,
0.02374267578125,
-0.007183074951171875,
0.03125,
0.051483154296875,
0.01425933837890625,
-0.0020465850830078125,
0.007305145263671875,
-0.00045752525329589844,
-0.0160369873046875,
0.03240966796875,
-0.035919189453125,
0.0114593505859375,
0.02850341796875,
0.01338958740234375,
-0.058013916015625,
0.03729248046875,
-0.009185791015625,
-0.0287322998046875,
0.01235198974609375,
0.058563232421875,
0.0178375244140625,
0.00299072265625,
0.0236358642578125,
0.01507568359375,
0.03704833984375,
0.0011224746704101562,
0.08514404296875,
0.0408935546875,
0.0206451416015625,
0.031707763671875,
0.060760498046875,
-0.0204925537109375,
0.0150909423828125,
-0.00689697265625,
0.0185089111328125,
-0.015838623046875,
-0.036590576171875,
-0.0029125213623046875,
-0.0092926025390625,
0.01192474365234375,
0.051666259765625,
0.0241241455078125,
0.017333984375,
0.006191253662109375,
-0.01593017578125,
0.0010585784912109375,
0.03594970703125,
-0.013427734375,
-0.0260467529296875,
-0.0408935546875,
-0.0185394287109375,
-0.01023101806640625,
-0.041259765625,
0.0810546875,
-0.07244873046875,
0.04376220703125,
-0.0029582977294921875,
0.0287933349609375,
0.05511474609375,
0.0210418701171875,
0.0286407470703125,
-0.0222625732421875,
-0.021697998046875,
-0.0028362274169921875,
0.004970550537109375,
-0.00792694091796875,
-0.006778717041015625,
0.04083251953125,
0.048858642578125,
-0.048065185546875,
-0.00592041015625,
-0.018310546875,
-0.03765869140625,
0.0018768310546875,
0.0212860107421875,
0.0131988525390625,
-0.033477783203125,
-0.00899505615234375,
-0.0014858245849609375,
-0.00978851318359375,
-0.0013055801391601562,
-0.002651214599609375,
0.0097503662109375,
-0.00896453857421875,
0.006011962890625,
0.032012939453125,
-0.0230712890625,
0.0023059844970703125,
-0.002155303955078125,
0.0164794921875,
-0.04400634765625,
-0.016845703125,
-0.046173095703125,
0.0211334228515625,
-0.00730133056640625,
0.014495849609375,
0.00838470458984375,
0.006023406982421875,
0.0726318359375,
-0.0246734619140625,
-0.04278564453125,
-0.015350341796875,
0.01285552978515625,
0.0164642333984375,
-0.0010404586791992188,
-0.0212249755859375,
0.016021728515625,
-0.034088134765625,
-0.0131988525390625,
-0.039276123046875,
-0.043975830078125,
-0.041900634765625,
-0.022430419921875,
0.0118408203125,
-0.000766754150390625,
0.0184478759765625,
0.017547607421875,
-0.01189422607421875,
0.0288238525390625,
-0.0022220611572265625,
0.060302734375,
-0.0112457275390625,
0.07586669921875,
-0.02398681640625,
0.06170654296875,
-0.002147674560546875,
0.034332275390625,
-0.0195465087890625,
-0.01552581787109375,
0.0024051666259765625,
-0.046600341796875,
0.00443267822265625,
0.01029205322265625,
-0.0018796920776367188,
-0.0034923553466796875,
-0.0052642822265625,
0.016815185546875,
0.0077362060546875,
-0.0191650390625,
-0.013397216796875,
-0.018890380859375,
0.045074462890625,
-0.0221099853515625,
-0.0223846435546875,
0.021087646484375,
-0.023345947265625,
-0.020538330078125,
0.00838470458984375,
0.01617431640625,
-0.00589752197265625,
-0.00553131103515625,
-0.0175323486328125,
0.0009746551513671875,
0.01549530029296875,
0.004791259765625,
0.051300048828125,
0.0055084228515625,
0.060272216796875,
0.013702392578125,
0.030120849609375,
0.0482177734375,
0.0322265625,
-0.0208282470703125,
-0.00910186767578125,
0.045318603515625,
0.00856781005859375,
-0.02325439453125,
0.00821685791015625,
-0.0172882080078125,
-0.01293182373046875,
0.05523681640625,
0.058258056640625,
-0.072509765625,
0.0041656494140625,
0.0203094482421875,
-0.01168060302734375,
-0.02398681640625,
-0.00035858154296875,
-0.0297698974609375,
-0.024932861328125,
0.06158447265625,
-0.00921630859375,
-0.0087890625,
0.035736083984375,
0.0097198486328125,
-0.01497650146484375,
-0.0099639892578125,
0.0281982421875,
-0.003509521484375,
-0.029022216796875,
-0.0123138427734375,
0.012908935546875,
-0.0022430419921875,
-0.0296783447265625,
-0.0160980224609375,
-0.0231781005859375,
-0.01067352294921875,
-0.055023193359375,
-0.0238189697265625,
-0.03192138671875,
0.0265960693359375,
-0.00936126708984375,
0.00803375244140625,
0.013702392578125,
0.07049560546875,
-0.02166748046875,
0.0097503662109375,
0.056182861328125,
-0.04296875,
-0.03680419921875,
0.006103515625,
0.0255126953125,
-0.00435638427734375,
-0.019195556640625,
0.0091552734375,
-0.04132080078125,
-0.0209503173828125,
-0.01300048828125,
-0.07049560546875,
0.055206298828125,
-0.043853759765625,
-0.00024235248565673828,
0.0206298828125,
0.00748443603515625,
-0.02337646484375,
0.0017147064208984375,
0.0255126953125,
-0.043426513671875,
0.009429931640625,
0.0086517333984375,
0.00897216796875,
-0.007526397705078125,
0.0144805908203125,
-0.0655517578125,
0.020843505859375,
0.0230560302734375,
0.01053619384765625,
-0.0123138427734375,
0.004459381103515625,
-0.018280029296875,
-0.02099609375,
-0.036224365234375,
0.062347412109375,
0.00397491455078125,
0.0478515625,
-0.06451416015625,
-0.024169921875,
0.0174713134765625,
0.050750732421875,
0.004741668701171875,
-0.0057830810546875,
-0.034210205078125,
-0.01837158203125,
0.021240234375,
0.06414794921875,
0.042755126953125,
0.00960540771484375,
-0.00390625,
0.0238037109375,
0.032440185546875,
-0.0889892578125,
0.005062103271484375,
-0.03289794921875,
0.0269775390625,
0.0180511474609375,
0.00977325439453125,
-0.0081939697265625,
0.01739501953125,
0.0269927978515625,
-0.085693359375,
0.00988006591796875,
0.04913330078125,
-0.005458831787109375,
0.0014829635620117188,
0.040283203125,
0.042327880859375,
-0.0577392578125,
-0.039093017578125,
-0.032928466796875,
0.037841796875,
0.013946533203125,
0.044464111328125,
0.0428466796875,
0.0268707275390625,
0.08587646484375,
-0.004825592041015625,
0.025665283203125,
0.001926422119140625,
0.00014400482177734375,
0.0310211181640625,
0.020965576171875,
0.0133514404296875,
-0.017852783203125,
0.033599853515625,
0.00884246826171875,
0.0231475830078125,
-0.040924072265625,
-0.0253753662109375,
0.02392578125,
-0.01448822021484375,
-0.00804901123046875,
-0.0040130615234375,
0.004520416259765625,
0.02142333984375,
0.022857666015625,
-0.0249481201171875,
-0.0136871337890625,
0.01457977294921875,
0.006717681884765625,
-0.00969696044921875,
-0.006160736083984375,
0.003086090087890625,
0.0031280517578125,
-0.0247802734375,
0.0174102783203125,
0.0230865478515625,
0.0186309814453125,
-0.0081787109375,
0.045623779296875,
-0.032958984375,
0.006076812744140625,
0.0254364013671875,
-0.0220489501953125,
-0.01041412353515625,
-0.018890380859375,
-0.01427459716796875,
-0.036651611328125,
0.0013294219970703125,
0.028564453125,
0.0281524658203125,
-0.056640625,
0.01016998291015625,
0.01776123046875,
-0.023468017578125,
-0.01322174072265625,
-0.0188446044921875,
-0.008941650390625,
0.0443115234375,
-0.03692626953125,
-0.0087890625,
-0.007537841796875,
-0.03350830078125,
0.0085906982421875,
-0.0160980224609375,
0.03204345703125,
0.01148223876953125,
0.04864501953125,
0.0013580322265625,
-0.0137786865234375,
-0.007404327392578125,
-0.014923095703125,
0.06085205078125,
0.0271759033203125,
-0.0819091796875,
0.01045989990234375,
-0.041290283203125,
-0.07177734375,
0.02545166015625,
0.041656494140625,
-0.0029144287109375,
-0.00836181640625,
0.0078125,
0.005985260009765625,
0.0113677978515625,
-0.017059326171875,
0.0083465576171875,
0.0809326171875,
0.02032470703125,
0.033294677734375,
0.0003833770751953125,
-0.0266876220703125,
0.0038051605224609375,
0.047088623046875,
0.0290374755859375,
0.0308990478515625,
0.01358795166015625,
0.046783447265625,
-0.0211639404296875,
0.00847625732421875,
-0.0160675048828125,
-0.0247650146484375,
0.04791259765625,
0.0236968994140625,
0.011383056640625,
-0.031494140625,
-0.01557159423828125,
-0.0093231201171875,
0.03814697265625,
-0.034820556640625,
-0.027130126953125,
0.00762176513671875,
0.0307769775390625,
-0.00554656982421875,
-0.0252685546875,
-0.018646240234375,
-0.0002027750015258789,
-0.0285186767578125,
-0.032440185546875,
0.06634521484375,
0.057586669921875,
0.0222930908203125,
0.005077362060546875,
-0.003108978271484375,
0.0038242340087890625,
0.01202392578125,
0.01511383056640625,
0.005767822265625,
0.0303192138671875,
-0.0279998779296875,
-0.0067901611328125,
0.002918243408203125,
-0.004131317138671875,
0.00548553466796875,
0.0288543701171875,
-0.003387451171875,
0.011077880859375,
0.02117919921875,
-0.0030689239501953125,
-0.03131103515625,
0.023712158203125,
-0.02288818359375,
-0.0073089599609375,
0.00449371337890625,
0.00750732421875,
-0.0126953125,
-0.003231048583984375,
0.01605224609375,
0.003265380859375,
-0.02813720703125,
-0.00031375885009765625,
0.0220489501953125,
-0.0167236328125,
0.0174102783203125,
-0.0191497802734375,
0.00794219970703125,
0.00212860107421875,
-0.06463623046875,
0.0024700164794921875,
0.0017538070678710938,
0.049530029296875,
-0.04779052734375,
0.06463623046875,
-0.002468109130859375,
0.01004791259765625,
-0.06982421875,
0.0266265869140625,
-0.014373779296875,
-0.00930023193359375,
0.0121917724609375,
-0.0017032623291015625,
0.00814056396484375,
0.0024013519287109375,
-0.025360107421875,
0.01142120361328125,
-0.024749755859375,
0.060028076171875,
-0.00814056396484375,
0.006832122802734375,
0.057891845703125,
-0.0237884521484375,
-0.051361083984375,
-0.037322998046875,
0.0299530029296875,
-0.043182373046875,
-0.034088134765625,
0.0276031494140625,
-0.0143890380859375,
0.0172119140625,
-0.031036376953125,
-0.061859130859375,
0.036346435546875,
0.0043487548828125,
-0.0250244140625,
-0.0204620361328125,
0.022216796875,
0.0112762451171875,
-0.041259765625,
-0.007595062255859375,
-0.04229736328125,
-0.01611328125,
-0.0031280517578125,
0.00566864013671875,
0.0219268798828125,
0.017974853515625,
0.013458251953125,
-0.0638427734375,
-0.01514434814453125,
-0.041290283203125,
-0.004608154296875,
-0.00881195068359375,
-0.0044097900390625,
0.01324462890625,
0.01284027099609375,
-0.04254150390625,
-0.02191162109375,
-0.00226593017578125,
0.032257080078125,
-0.010955810546875,
-0.0235137939453125,
-0.01284027099609375,
-0.0003597736358642578,
0.053802490234375,
0.0416259765625,
0.012359619140625,
-0.0367431640625,
0.030609130859375,
0.004772186279296875,
-0.0501708984375,
0.007198333740234375,
0.040985107421875,
-0.0704345703125,
-0.0137939453125,
0.01129913330078125,
-0.0271453857421875,
0.00897979736328125,
-0.0169525146484375,
-0.039581298828125,
-0.006031036376953125,
-0.0469970703125,
-0.0191650390625,
-0.00936126708984375,
-0.034423828125,
0.048248291015625,
-0.0245208740234375,
0.004848480224609375,
0.0101318359375,
0.0175628662109375,
0.030487060546875,
0.0452880859375,
0.005870819091796875,
0.0312042236328125,
-0.042938232421875,
-0.0170745849609375,
0.018218994140625,
0.0019407272338867188,
-0.001888275146484375,
-0.007213592529296875,
-0.00734710693359375,
0.03936767578125,
0.0016078948974609375,
0.04986572265625,
0.01141357421875,
-0.00434112548828125,
0.01025390625,
-0.0215606689453125,
-0.001392364501953125,
0.0692138671875,
0.00714874267578125,
0.02801513671875,
0.0173492431640625,
-0.040435791015625,
0.058013916015625,
-0.066650390625,
0.0059356689453125,
-0.01025390625,
-0.0301666259765625,
-0.0179595947265625,
-0.003139495849609375,
-0.01526641845703125,
-0.038726806640625,
0.0023193359375
] |
36bb6c0fa5a3d68ce1352f9000793740c554020b
|
Wordpress Stackexchange
Q: How do I make an HTML table from a database table? is there a built-in wordpress function to make the HTML or should I use plain-old PHP?
A: Since 3.1 there's a class WP_List_Table which makes it a hella lot easier to render tables for an array of data objects.
There's very little documentation (read: none) on it yet, but you can check out the source if you're familiar with PHP.
|
Q: How do I make an HTML table from a database table? is there a built-in wordpress function to make the HTML or should I use plain-old PHP?
A: Since 3.1 there's a class WP_List_Table which makes it a hella lot easier to render tables for an array of data objects.
There's very little documentation (read: none) on it yet, but you can check out the source if you're familiar with PHP.
|
wordpress
|
{
"language": "en",
"length": 72,
"provenance": "stackexchange_00019.jsonl.gz:407799",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12183"
}
|
[
0.052978515625,
-0.00001150369644165039,
-0.0297088623046875,
-0.048553466796875,
0.0207061767578125,
-0.032257080078125,
0.0221710205078125,
0.0129547119140625,
0.0085601806640625,
0.0029582977294921875,
-0.042327880859375,
0.00685882568359375,
-0.056610107421875,
-0.0177154541015625,
-0.003803253173828125,
-0.051239013671875,
0.051300048828125,
-0.0435791015625,
0.017181396484375,
-0.005321502685546875,
0.006153106689453125,
0.0267181396484375,
0.0216522216796875,
0.036651611328125,
0.0217437744140625,
-0.01143646240234375,
0.0306243896484375,
-0.005176544189453125,
0.033050537109375,
0.00827789306640625,
0.029327392578125,
-0.04449462890625,
0.01532745361328125,
0.036834716796875,
-0.0310211181640625,
0.0190887451171875,
0.020843505859375,
0.01145172119140625,
0.0102996826171875,
0.025390625,
0.0265655517578125,
-0.0192413330078125,
0.0224456787109375,
-0.012786865234375,
-0.007282257080078125,
-0.0026397705078125,
0.018798828125,
-0.028350830078125,
-0.0005016326904296875,
-0.02166748046875,
0.0057830810546875,
0.04852294921875,
0.01342010498046875,
-0.0211181640625,
0.0031185150146484375,
0.01507568359375,
0.041778564453125,
-0.046844482421875,
0.0205841064453125,
-0.05377197265625,
-0.027099609375,
-0.006816864013671875,
0.039581298828125,
0.032928466796875,
-0.01280975341796875,
0.001392364501953125,
0.037017822265625,
0.01393890380859375,
0.006099700927734375,
-0.0191497802734375,
-0.0070648193359375,
0.01311492919921875,
-0.01470947265625,
-0.03656005859375,
-0.000904083251953125,
0.043914794921875,
-0.010833740234375,
-0.0009946823120117188,
0.005321502685546875,
0.0114593505859375,
-0.01230621337890625,
0.0262603759765625,
-0.01556396484375,
-0.050384521484375,
0.00975799560546875,
-0.0174407958984375,
-0.017303466796875,
-0.00867462158203125,
0.005954742431640625,
-0.0176849365234375,
-0.00269317626953125,
0.0152435302734375,
-0.018157958984375,
0.0208282470703125,
-0.0174407958984375,
-0.03814697265625,
-0.011199951171875,
0.0230560302734375,
0.002685546875,
0.03375244140625,
0.0227508544921875,
-0.04949951171875,
0.056243896484375,
-0.043426513671875,
-0.0121307373046875,
0.033172607421875,
0.0034694671630859375,
0.02532958984375,
0.0278167724609375,
0.0216522216796875,
0.00945281982421875,
-0.0056915283203125,
-0.024017333984375,
-0.052825927734375,
-0.003849029541015625,
0.039520263671875,
-0.035491943359375,
0.007137298583984375,
0.01174163818359375,
-0.0180816650390625,
-0.02716064453125,
-0.0013704299926757812,
-0.005054473876953125,
0.00933074951171875,
0.01175689697265625,
0.00455474853515625,
0.013427734375,
-0.0102691650390625,
0.00411224365234375,
-0.004726409912109375,
-0.0274810791015625,
0.0242462158203125,
0.07293701171875,
0.03350830078125,
-0.003742218017578125,
0.005222320556640625,
0.0377197265625,
-0.0340576171875,
-0.016998291015625,
0.0426025390625,
-0.02099609375,
-0.041046142578125,
-0.018402099609375,
-0.0154571533203125,
0.01473236083984375,
0.0298919677734375,
0.03265380859375,
-0.008209228515625,
-0.0290069580078125,
-0.05615234375,
-0.0076904296875,
0.034423828125,
-0.00537872314453125,
0.01666259765625,
0.067626953125,
-0.0251922607421875,
0.020904541015625,
-0.0290374755859375,
0.0419921875,
0.0059661865234375,
-0.0005841255187988281,
-0.0156707763671875,
-0.004871368408203125,
-0.039825439453125,
-0.057281494140625,
0.01258087158203125,
-0.02362060546875,
-0.0012464523315429688,
0.042938232421875,
-0.021484375,
0.0033321380615234375,
-0.0166015625,
0.06756591796875,
0.015411376953125,
-0.0059356689453125,
0.036651611328125,
-0.035064697265625,
-0.032196044921875,
0.0264434814453125,
0.04986572265625,
0.0038604736328125,
-0.024261474609375,
-0.02587890625,
0.0285491943359375,
-0.050048828125,
0.056915283203125,
-0.0023250579833984375,
0.07293701171875,
0.029937744140625,
0.01166534423828125,
-0.0017986297607421875,
-0.0016965866088867188,
-0.0143890380859375,
0.032318115234375,
0.01227569580078125,
-0.041259765625,
-0.050384521484375,
-0.03472900390625,
-0.02288818359375,
0.007289886474609375,
-0.0379638671875,
0.01277923583984375,
-0.0043182373046875,
0.032958984375,
-0.0173797607421875,
0.01220703125,
-0.0195465087890625,
0.03204345703125,
0.0134124755859375,
0.014007568359375,
0.0079803466796875,
0.00859832763671875,
-0.01374053955078125,
-0.035980224609375,
-0.02978515625,
0.00484466552734375,
-0.031951904296875,
0.0247802734375,
0.007419586181640625,
-0.0035228729248046875,
0.02001953125,
-0.0312042236328125,
0.0179595947265625,
0.00640869140625,
0.007228851318359375,
-0.00833892822265625,
-0.024444580078125,
-0.01502227783203125,
0.0002646446228027344,
-0.00576019287109375,
0.00904083251953125,
0.0303802490234375,
0.0295257568359375,
0.06683349609375,
-0.02239990234375,
-0.016571044921875,
-0.0210723876953125,
-0.01556396484375,
-0.0010881423950195312,
0.0280303955078125,
0.0391845703125,
0.0357666015625,
-0.0142364501953125,
-0.0311126708984375,
0.06951904296875,
0.0066986083984375,
0.030364990234375,
-0.037872314453125,
-0.01158905029296875,
0.0232086181640625,
-0.0012617111206054688,
0.00792694091796875,
0.0293731689453125,
-0.031524658203125,
-0.01377105712890625,
0.048828125,
0.0019426345825195312,
0.047882080078125,
-0.010833740234375,
0.0017862319946289062,
-0.0067138671875,
0.0238800048828125,
0.020050048828125,
-0.01218414306640625,
0.020721435546875,
0.003665924072265625,
0.0258636474609375,
0.0174407958984375,
-0.018096923828125,
0.01212310791015625,
0.0187225341796875,
-0.00939178466796875,
0.003017425537109375,
0.0484619140625,
-0.054473876953125,
0.0489501953125,
-0.050689697265625,
0.0076904296875,
0.0131683349609375,
0.0172576904296875,
-0.00662994384765625,
0.0251312255859375,
0.00946807861328125,
-0.0148162841796875,
-0.004787445068359375,
-0.0115509033203125,
0.00400543212890625,
-0.0081634521484375,
-0.0260162353515625,
-0.0074005126953125,
0.01506805419921875,
0.033599853515625,
-0.024749755859375,
0.0291595458984375,
0.00598907470703125,
0.00209808349609375,
0.03875732421875,
0.0032367706298828125,
0.006866455078125,
-0.030364990234375,
0.0012531280517578125,
0.02667236328125,
-0.004711151123046875,
-0.0335693359375,
-0.01393890380859375,
0.01512908935546875,
0.0299835205078125,
-0.016510009765625,
-0.0226593017578125,
-0.038330078125,
-0.00653076171875,
-0.01473236083984375,
0.0360107421875,
0.07452392578125,
-0.00839996337890625,
-0.05035400390625,
-0.01593017578125,
0.0401611328125,
-0.07769775390625,
-0.080078125,
0.006591796875,
-0.0304107666015625,
-0.042877197265625,
-0.0009164810180664062,
-0.02288818359375,
0.02294921875,
-0.004901885986328125,
-0.00603485107421875,
0.0220947265625,
-0.0174407958984375,
-0.015960693359375,
-0.0380859375,
-0.06671142578125,
-0.035003662109375,
0.0164794921875,
0.006443023681640625,
-0.01708984375,
0.028656005859375,
-0.0209197998046875,
-0.05389404296875,
-0.056732177734375,
0.011474609375,
0.0158843994140625,
-0.0269622802734375,
0.0248565673828125,
-0.03912353515625,
-0.015777587890625,
0.0120086669921875,
-0.0036773681640625,
0.00736236572265625,
-0.0123748779296875,
-0.0233001708984375,
-0.0135345458984375,
0.0223388671875,
0.00081634521484375,
0.0260467529296875,
0.02105712890625,
-0.0113067626953125,
-0.0155181884765625,
-0.05279541015625,
-0.006175994873046875,
0.0258331298828125,
-0.0034923553466796875,
-0.045867919921875,
-0.034698486328125,
-0.0263671875,
-0.0073394775390625,
0.01256561279296875,
0.022247314453125,
0.02618408203125,
-0.020782470703125,
0.0174102783203125,
-0.00583648681640625,
-0.0013189315795898438,
0.0159912109375,
0.01284027099609375,
0.038421630859375,
-0.02276611328125,
-0.028076171875,
-0.0012178421020507812,
-0.005573272705078125,
-0.0007805824279785156,
-0.040924072265625,
-0.04058837890625,
-0.056915283203125,
0.060455322265625,
0.016448974609375,
0.0301055908203125,
-0.0340576171875,
-0.046966552734375,
0.00951385498046875,
0.11700439453125,
0.0089111328125,
-0.02630615234375,
0.00458526611328125,
0.0272216796875,
-0.05584716796875,
-0.034881591796875,
-0.040802001953125,
-0.003620147705078125,
-0.01395416259765625,
-0.0199432373046875,
-0.0156402587890625,
-0.01080322265625,
-0.025299072265625,
0.024383544921875,
-0.0167999267578125,
-0.01149749755859375,
0.016204833984375,
-0.04638671875,
-0.0169830322265625,
0.004230499267578125,
-0.0135955810546875,
-0.0440673828125,
-0.01263427734375,
-0.0295562744140625,
-0.044891357421875,
-0.00748443603515625,
-0.06121826171875,
0.042816162109375,
0.0499267578125,
-0.0312042236328125,
0.006793975830078125,
0.0343017578125,
0.009368896484375,
-0.00039577484130859375,
0.02618408203125,
0.0215301513671875,
0.003997802734375,
-0.0298004150390625,
0.007110595703125,
-0.045562744140625,
-0.046905517578125,
-0.0927734375,
0.019989013671875,
0.005130767822265625,
-0.0290374755859375,
0.0222625732421875,
-0.06793212890625,
0.03887939453125,
0.00557708740234375,
-0.0276336669921875,
-0.044647216796875,
0.03192138671875,
-0.040863037109375,
0.00753021240234375,
-0.01824951171875,
-0.02587890625,
0.036865234375,
0.0130157470703125,
-0.02197265625,
0.020904541015625,
0.064697265625,
0.01183319091796875,
-0.02020263671875,
-0.11175537109375,
0.01641845703125,
0.0609130859375,
0.0032634735107421875,
0.053741455078125,
0.034820556640625,
-0.035491943359375,
0.056610107421875,
0.0286102294921875,
-0.0009698867797851562,
-0.0278472900390625,
0.035858154296875,
0.01038360595703125,
0.00447845458984375,
-0.00970458984375,
0.00850677490234375,
0.004283905029296875,
0.037384033203125,
0.035064697265625,
-0.006458282470703125,
0.01537322998046875,
0.004695892333984375,
0.022857666015625,
-0.0660400390625,
-0.023101806640625,
-0.035247802734375,
0.017791748046875,
-0.0254364013671875,
0.050018310546875,
0.02783203125,
0.0031757354736328125,
0.033203125,
0.01226043701171875,
0.039459228515625,
-0.007511138916015625,
-0.0011386871337890625,
-0.0340576171875,
0.044158935546875,
-0.00882720947265625,
0.00643157958984375,
0.01013946533203125,
-0.0101318359375,
0.06304931640625,
0.031768798828125,
-0.041656494140625,
0.0109405517578125,
0.002490997314453125,
0.00443267822265625,
-0.00724029541015625,
-0.01074981689453125,
0.0197296142578125,
0.045379638671875,
-0.00937652587890625,
-0.0008397102355957031,
-0.0017194747924804688,
0.0239410400390625,
-0.031036376953125,
-0.0011348724365234375,
0.02081298828125,
-0.0028705596923828125,
0.0101470947265625,
0.031280517578125,
0.029632568359375,
0.003803253173828125,
-0.0260772705078125,
0.04449462890625,
0.0235748291015625,
0.025970458984375,
0.01111602783203125,
-0.0033779144287109375,
-0.005916595458984375,
-0.01055145263671875,
-0.0308074951171875,
-0.0537109375,
-0.032470703125,
0.035430908203125,
0.06378173828125,
-0.00803375244140625,
-0.02886962890625,
0.00679779052734375,
-0.02069091796875,
-0.0022602081298828125,
0.0042572021484375,
-0.004756927490234375,
-0.0182952880859375,
-0.0079345703125,
0.0211181640625,
0.0224456787109375,
-0.00911712646484375,
0.006999969482421875,
0.01812744140625,
-0.00551605224609375,
0.045074462890625,
-0.0261383056640625,
0.032196044921875,
-0.03387451171875,
-0.037506103515625,
-0.08038330078125,
-0.025115966796875,
-0.01464080810546875,
-0.01132965087890625,
-0.05023193359375,
0.021820068359375,
-0.0237884521484375,
0.01049041748046875,
-0.04071044921875,
0.02703857421875,
-0.027130126953125,
0.01366424560546875,
-0.0595703125,
0.00618743896484375,
0.051849365234375,
0.037750244140625,
-0.031280517578125,
-0.0184783935546875,
-0.043792724609375,
-0.0135345458984375,
-0.0238037109375,
-0.042449951171875,
-0.038848876953125,
0.01105499267578125,
0.004886627197265625,
0.0017728805541992188,
-0.007297515869140625,
-0.034027099609375,
-0.024627685546875,
0.01369476318359375,
0.01470947265625,
-0.0187835693359375,
-0.0082550048828125,
0.09814453125,
-0.032989501953125,
0.048828125,
0.01549530029296875,
0.051116943359375,
-0.035308837890625,
-0.001678466796875,
0.043701171875,
-0.049072265625,
-0.053375244140625,
-0.0011138916015625,
-0.054107666015625,
-0.044464111328125,
-0.032379150390625,
-0.01467132568359375,
0.039337158203125,
-0.051116943359375,
-0.0035724639892578125,
-0.00997161865234375,
0.060333251953125,
-0.091796875,
0.018096923828125,
-0.0022735595703125,
-0.0207366943359375,
0.0013761520385742188,
-0.02154541015625,
0.003963470458984375,
0.01239013671875,
-0.0194549560546875,
-0.004512786865234375,
0.008453369140625,
-0.0643310546875,
0.08013916015625,
0.05682373046875,
-0.0087432861328125,
0.0192718505859375,
0.01324462890625,
-0.01406097412109375,
-0.0015926361083984375,
0.042633056640625,
-0.02947998046875,
-0.052032470703125,
0.051025390625,
0.0160980224609375,
-0.0396728515625,
0.0300140380859375,
-0.04193115234375,
0.029815673828125,
0.0611572265625,
0.0836181640625,
-0.1011962890625,
0.037384033203125,
0.0265960693359375,
-0.0136871337890625,
0.0097503662109375,
-0.0240020751953125,
-0.0118408203125,
-0.041107177734375,
0.04315185546875,
0.0164337158203125,
-0.030548095703125,
-0.01355743408203125,
0.0022106170654296875,
0.0011081695556640625,
-0.0078887939453125,
0.06878662109375,
0.01338958740234375,
-0.00705718994140625,
-0.0224609375,
-0.006923675537109375,
0.029998779296875,
-0.032501220703125,
0.05450439453125,
-0.00876617431640625,
0.0268402099609375,
-0.01444244384765625,
0.052703857421875,
0.01194000244140625,
-0.00971221923828125,
-0.01123809814453125,
-0.007686614990234375,
0.0014295578002929688,
0.0255584716796875,
-0.02667236328125,
0.01165008544921875,
0.0023746490478515625,
-0.02056884765625,
0.020172119140625,
0.0183868408203125,
0.01029205322265625,
-0.0204620361328125,
-0.035308837890625,
-0.000354766845703125,
-0.05780029296875,
0.023345947265625,
-0.01221466064453125,
-0.0185546875,
0.049957275390625,
-0.0227203369140625,
-0.0209503173828125,
0.032623291015625,
-0.00731658935546875,
-0.021636962890625,
-0.034393310546875,
-0.02777099609375,
-0.046783447265625,
0.021392822265625,
-0.04364013671875,
-0.00717926025390625,
0.0293121337890625,
-0.038330078125,
-0.0364990234375,
0.036529541015625,
0.0133056640625,
-0.005603790283203125,
0.016448974609375,
0.01139068603515625,
-0.035491943359375,
-0.018798828125,
-0.0223236083984375,
0.03314208984375,
-0.006664276123046875,
0.046051025390625,
-0.042816162109375,
-0.00856781005859375,
0.0202484130859375,
0.052947998046875,
-0.044708251953125,
-0.021148681640625,
0.00882720947265625,
-0.0031871795654296875,
0.01079559326171875,
0.053955078125,
0.027679443359375,
-0.01171875,
-0.0106353759765625,
0.06158447265625,
0.032562255859375,
-0.0482177734375,
0.0269622802734375,
-0.0029392242431640625,
-0.041412353515625,
0.006900787353515625,
0.0009088516235351562,
-0.0248870849609375,
0.0168304443359375,
-0.0232391357421875,
-0.024139404296875,
0.0125885009765625,
-0.026763916015625,
0.0182342529296875,
-0.002227783203125,
0.028564453125,
0.01947021484375,
-0.042083740234375,
-0.0276336669921875,
-0.0276031494140625,
0.03155517578125,
-0.002178192138671875,
0.00833892822265625,
0.0234222412109375,
0.01143646240234375,
-0.0003631114959716797,
0.0181884765625,
-0.00021636486053466797,
0.0283203125,
0.0009860992431640625,
0.06524658203125,
0.02032470703125,
0.026641845703125,
-0.085693359375,
-0.07452392578125,
0.072509765625,
0.1080322265625,
-0.0281829833984375,
-0.006641387939453125,
0.01165771484375,
0.0240325927734375,
0.00807952880859375,
-0.01384735107421875,
0.046051025390625,
0.00980377197265625,
0.0273590087890625,
-0.006683349609375,
-0.0335693359375,
0.00457000732421875,
0.00933837890625,
0.0117034912109375,
0.004180908203125,
0.0257720947265625,
-0.04071044921875,
-0.02020263671875,
-0.0023193359375,
0.01284027099609375,
0.01488494873046875,
0.010986328125,
0.038299560546875,
0.0018320083618164062,
-0.011993408203125,
-0.01161956787109375,
0.043609619140625,
0.01220703125,
0.016571044921875,
-0.036773681640625,
-0.01372528076171875,
0.0223236083984375,
0.0321044921875,
0.0333251953125,
0.035858154296875,
0.058074951171875,
0.0187225341796875,
-0.0297088623046875,
0.004199981689453125,
0.00739288330078125,
-0.0313720703125,
-0.038299560546875,
-0.035980224609375,
0.01311492919921875,
0.0244293212890625,
0.0129547119140625,
0.023681640625,
0.0087890625,
0.032470703125,
-0.048065185546875,
0.060394287109375,
-0.0253753662109375,
-0.00885772705078125,
0.02398681640625,
-0.0264129638671875,
0.04046630859375,
-0.0203704833984375,
-0.046234130859375,
-0.0160675048828125,
0.00045108795166015625,
-0.0258941650390625,
0.0288238525390625,
0.041717529296875,
-0.02215576171875,
0.025848388671875,
0.02813720703125,
-0.004817962646484375,
-0.01422119140625,
0.01299285888671875,
0.0211029052734375,
0.0026454925537109375,
0.025634765625,
0.0157470703125,
-0.0531005859375,
-0.0191802978515625,
-0.0335693359375,
0.03717041015625,
0.0229644775390625,
0.07904052734375,
-0.029266357421875,
0.040679931640625,
-0.0001283884048461914,
0.032928466796875,
-0.033050537109375,
-0.0243682861328125,
0.07904052734375,
-0.01146697998046875,
-0.007080078125,
-0.0187835693359375,
-0.0286407470703125,
-0.007022857666015625,
0.03228759765625,
-0.053863525390625,
-0.03302001953125,
0.00629425048828125,
0.030548095703125,
-0.0015687942504882812,
0.030731201171875,
-0.01085662841796875,
0.0082550048828125,
0.0215606689453125,
-0.0224609375,
0.03900146484375,
0.0394287109375,
0.04840087890625,
0.03179931640625,
-0.0058746337890625,
-0.045257568359375,
0.0101318359375,
-0.054595947265625,
0.026458740234375,
0.032135009765625,
-0.0040283203125,
-0.0123748779296875,
0.022308349609375,
-0.01187896728515625,
0.021697998046875,
0.0003681182861328125,
0.034820556640625,
0.01995849609375,
-0.048553466796875,
0.057586669921875,
0.05914306640625,
0.05096435546875,
-0.006267547607421875,
0.0188751220703125,
0.041015625,
-0.0166778564453125,
0.0235595703125,
0.03118896484375,
-0.0198211669921875,
-0.0222625732421875,
-0.0164031982421875,
-0.0146484375,
-0.03314208984375,
-0.06890869140625,
-0.0557861328125,
-0.0008063316345214844,
0.01090240478515625,
0.00579071044921875,
-0.047454833984375,
0.007598876953125,
-0.00469970703125,
0.03607177734375,
-0.013763427734375,
0.006427764892578125,
0.0216522216796875,
0.06744384765625,
-0.033966064453125,
-0.03564453125,
-0.00408172607421875,
0.0158233642578125,
-0.0259552001953125,
0.0570068359375,
0.059967041015625,
-0.06591796875,
0.0155487060546875,
0.0687255859375,
0.057464599609375,
0.12017822265625,
0.00943756103515625,
-0.013763427734375,
0.045623779296875,
-0.0202484130859375,
-0.0081329345703125,
-0.07574462890625,
-0.015777587890625,
-0.07086181640625,
0.021636962890625,
0.003559112548828125,
-0.0014982223510742188,
0.029327392578125,
-0.049224853515625,
-0.14453125,
0.08160400390625,
-0.04339599609375,
-0.04052734375,
0.0015535354614257812,
0.004222869873046875,
0.00023245811462402344,
-0.024810791015625,
-0.0255889892578125,
0.00800323486328125,
-0.005771636962890625,
0.005535125732421875,
0.042022705078125,
0.01904296875,
0.041015625,
0.005146026611328125,
-0.0709228515625,
0.0005884170532226562,
-0.0215911865234375,
0.055267333984375,
-0.026824951171875,
0.0110321044921875,
0.01332855224609375,
0.0333251953125,
-0.00983428955078125,
-0.01190185546875,
0.01641845703125,
0.016357421875,
0.003665924072265625,
-0.037109375,
0.00150299072265625,
-0.032684326171875,
0.026153564453125,
-0.007656097412109375,
0.003208160400390625,
0.00450897216796875,
-0.0002899169921875,
-0.056365966796875,
-0.0188751220703125,
-0.01104736328125,
0.00368499755859375,
-0.0635986328125,
-0.01129913330078125,
0.03326416015625,
-0.0032176971435546875,
0.020294189453125,
0.016143798828125,
-0.00817108154296875,
-0.022796630859375,
-0.00997161865234375,
-0.043426513671875,
-0.02593994140625,
-0.0161285400390625,
0.049530029296875,
-0.036163330078125,
-0.01175689697265625,
0.0007510185241699219,
0.0103912353515625,
-0.0010080337524414062,
-0.02520751953125,
-0.0005445480346679688,
-0.04461669921875,
0.0312347412109375,
0.046356201171875,
0.008209228515625,
-0.0200042724609375,
-0.0008068084716796875,
-0.0295257568359375,
0.00757598876953125,
0.0293121337890625,
0.010589599609375,
0.02593994140625,
-0.0290985107421875,
0.035369873046875,
0.001209259033203125,
0.0163726806640625,
-0.0093841552734375,
-0.00634002685546875,
-0.0233306884765625,
0.053192138671875,
-0.0194091796875,
-0.0150604248046875,
0.01416778564453125,
-0.030517578125,
0.0005483627319335938,
-0.01551055908203125,
0.0017232894897460938,
-0.0386962890625,
0.023193359375,
-0.0660400390625,
-0.00441741943359375,
0.02142333984375
] |
74dc2e8ebcadee7c112b3fb592c251cf06d1ea1f
|
Wordpress Stackexchange
Q: Send automatic mail to Admin when user/member changes/adds profile Is there a way to send the updated/added values from profile, when a member/user updates his/hers data, to the admin of the site or another emailadress?
Can this be the first step?
/* do something when user edits profile */
add_action('personal_options_update', 'notify_admin_on_update');
function notify_admin_on_update(){
// send a mail with the updated values to [email protected]
exit;
}
What is best pracice to send emails from within WordPress?
A: you got the first part right about using personal_options_update but to be on the safe side add edit_user_profile_update also.
and as for sending emails within WordPress the best way would be to use wp_mail, So something like this:
add_action( 'personal_options_update', 'notify_admin_on_update' );
add_action( 'edit_user_profile_update','notify_admin_on_update');
function notify_admin_on_update(){
global $current_user;
get_currentuserinfo();
if (!current_user_can( 'administrator' )){// avoid sending emails when admin is updating user profiles
$to = '[email protected]';
$subject = 'user updated profile';
$message = "the user : " .$current_user->display_name . " has updated his profile with:\n";
foreach($_POST as $key => $value){
$message .= $key . ": ". $value ."\n";
}
wp_mail( $to, $subject, $message);
}
}
|
Q: Send automatic mail to Admin when user/member changes/adds profile Is there a way to send the updated/added values from profile, when a member/user updates his/hers data, to the admin of the site or another emailadress?
Can this be the first step?
/* do something when user edits profile */
add_action('personal_options_update', 'notify_admin_on_update');
function notify_admin_on_update(){
// send a mail with the updated values to [email protected]
exit;
}
What is best pracice to send emails from within WordPress?
A: you got the first part right about using personal_options_update but to be on the safe side add edit_user_profile_update also.
and as for sending emails within WordPress the best way would be to use wp_mail, So something like this:
add_action( 'personal_options_update', 'notify_admin_on_update' );
add_action( 'edit_user_profile_update','notify_admin_on_update');
function notify_admin_on_update(){
global $current_user;
get_currentuserinfo();
if (!current_user_can( 'administrator' )){// avoid sending emails when admin is updating user profiles
$to = '[email protected]';
$subject = 'user updated profile';
$message = "the user : " .$current_user->display_name . " has updated his profile with:\n";
foreach($_POST as $key => $value){
$message .= $key . ": ". $value ."\n";
}
wp_mail( $to, $subject, $message);
}
}
|
wordpress
|
{
"language": "en",
"length": 181,
"provenance": "stackexchange_00019.jsonl.gz:407803",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12193"
}
|
[
0.06585693359375,
-0.02325439453125,
0.03369140625,
-0.04132080078125,
-0.0026531219482421875,
-0.018890380859375,
0.021484375,
-0.0261383056640625,
-0.01361083984375,
0.04241943359375,
0.0308685302734375,
-0.0086822509765625,
0.031646728515625,
-0.0274505615234375,
-0.005435943603515625,
0.0015125274658203125,
0.004787445068359375,
-0.00380706787109375,
-0.001995086669921875,
-0.00457000732421875,
-0.0107879638671875,
-0.000014662742614746094,
-0.025299072265625,
0.0010395050048828125,
-0.038543701171875,
0.0166168212890625,
0.05999755859375,
-0.0299530029296875,
-0.0208587646484375,
-0.017822265625,
-0.01407623291015625,
0.0106964111328125,
0.0128021240234375,
0.041168212890625,
-0.051727294921875,
-0.00595855712890625,
-0.00615692138671875,
0.01007843017578125,
0.0195770263671875,
0.00800323486328125,
0.0176849365234375,
0.01023101806640625,
0.034698486328125,
0.042205810546875,
0.0011816024780273438,
-0.048126220703125,
0.044952392578125,
-0.03509521484375,
0.029296875,
0.03887939453125,
0.0169525146484375,
-0.01519012451171875,
0.013214111328125,
-0.00499725341796875,
0.00021827220916748047,
0.00907135009765625,
-0.036895751953125,
0.0418701171875,
0.033538818359375,
0.006061553955078125,
-0.0413818359375,
-0.01395416259765625,
0.006198883056640625,
-0.04132080078125,
-0.02069091796875,
-0.018096923828125,
0.0087432861328125,
0.0059356689453125,
-0.052520751953125,
-0.029296875,
0.05499267578125,
-0.0104827880859375,
-0.01157379150390625,
-0.0098419189453125,
-0.0038585662841796875,
-0.016571044921875,
-0.0070953369140625,
-0.01812744140625,
0.00965118408203125,
0.0340576171875,
-0.0261993408203125,
0.0030879974365234375,
-0.034332275390625,
-0.002162933349609375,
-0.004543304443359375,
0.038360595703125,
-0.0213775634765625,
-0.0201873779296875,
-0.0012607574462890625,
0.0016012191772460938,
-0.01535797119140625,
-0.00884246826171875,
-0.00016450881958007812,
0.004695892333984375,
-0.01210784912109375,
-0.02008056640625,
0.0126495361328125,
0.04998779296875,
-0.030303955078125,
-0.021484375,
-0.0335693359375,
0.005474090576171875,
-0.03558349609375,
-0.0026149749755859375,
-0.01076507568359375,
0.060699462890625,
0.00518035888671875,
-0.0189056396484375,
-0.006683349609375,
0.0013170242309570312,
-0.003108978271484375,
-0.0330810546875,
0.006740570068359375,
0.006198883056640625,
0.01287841796875,
-0.0050201416015625,
-0.04156494140625,
0.07635498046875,
-0.006099700927734375,
0.0712890625,
-0.0137481689453125,
0.0079498291015625,
-0.0263214111328125,
-0.0251007080078125,
0.0158233642578125,
-0.0016279220581054688,
-0.019073486328125,
0.01242828369140625,
0.037200927734375,
-0.0071258544921875,
-0.0655517578125,
0.0156707763671875,
0.1051025390625,
0.022796630859375,
0.0335693359375,
-0.0228729248046875,
-0.007904052734375,
-0.01363372802734375,
-0.026763916015625,
0.033416748046875,
-0.00457000732421875,
-0.0304107666015625,
-0.00902557373046875,
-0.0294647216796875,
0.006168365478515625,
0.0236358642578125,
0.0157928466796875,
-0.003490447998046875,
0.00658416748046875,
-0.00508880615234375,
-0.03271484375,
-0.0016679763793945312,
0.006984710693359375,
0.043304443359375,
-0.00519561767578125,
0.046295166015625,
0.0294342041015625,
0.00909423828125,
-0.04705810546875,
-0.006290435791015625,
0.018585205078125,
-0.023834228515625,
0.0225830078125,
-0.00785064697265625,
-0.041656494140625,
0.03936767578125,
-0.07623291015625,
-0.01372528076171875,
0.03204345703125,
-0.0445556640625,
0.06451416015625,
-0.0122222900390625,
0.057220458984375,
0.00122833251953125,
0.0016765594482421875,
-0.00521087646484375,
-0.00785064697265625,
0.01788330078125,
0.028564453125,
-0.0156097412109375,
-0.0291595458984375,
-0.0316162109375,
0.06365966796875,
-0.0274810791015625,
-0.0097503662109375,
0.0084991455078125,
0.0012807846069335938,
0.022064208984375,
0.01751708984375,
0.0193634033203125,
-0.00738525390625,
0.0149383544921875,
0.029266357421875,
-0.019195556640625,
-0.037322998046875,
-0.014190673828125,
0.0007219314575195312,
0.018646240234375,
-0.040374755859375,
0.0232391357421875,
-0.025909423828125,
-0.01467132568359375,
0.0300750732421875,
-0.01445770263671875,
-0.03631591796875,
-0.007080078125,
-0.023681640625,
0.041748046875,
0.009735107421875,
0.0027370452880859375,
-0.0013246536254882812,
-0.0116424560546875,
-0.007404327392578125,
-0.0260009765625,
-0.037353515625,
-0.0178070068359375,
-0.0261383056640625,
0.06732177734375,
-0.00589752197265625,
0.08209228515625,
-0.0224151611328125,
-0.07171630859375,
-0.02423095703125,
-0.0244140625,
-0.027618408203125,
-0.009429931640625,
-0.01751708984375,
0.00262451171875,
-0.041839599609375,
-0.00341033935546875,
0.01971435546875,
0.034759521484375,
-0.020172119140625,
-0.020904541015625,
-0.04266357421875,
-0.017364501953125,
-0.01934814453125,
-0.05047607421875,
0.0153350830078125,
0.049468994140625,
0.0229644775390625,
0.0014238357543945312,
0.020751953125,
0.057342529296875,
0.044342041015625,
0.037261962890625,
0.045806884765625,
0.004840850830078125,
0.0061492919921875,
0.029510498046875,
0.004962921142578125,
-0.0255889892578125,
0.0279693603515625,
-0.12176513671875,
-0.000058650970458984375,
0.06201171875,
0.0155181884765625,
0.0307769775390625,
-0.0206451416015625,
-0.007190704345703125,
-0.0013551712036132812,
-0.0204925537109375,
-0.023101806640625,
-0.00141143798828125,
0.030975341796875,
-0.0286102294921875,
0.0183868408203125,
-0.005947113037109375,
-0.00881195068359375,
-0.021148681640625,
0.0113067626953125,
-0.035980224609375,
0.010406494140625,
0.028778076171875,
-0.01042938232421875,
0.0170745849609375,
-0.02008056640625,
-0.0120697021484375,
0.02838134765625,
0.004261016845703125,
-0.0239410400390625,
-0.00785064697265625,
0.0026416778564453125,
-0.0112152099609375,
0.035064697265625,
0.00563812255859375,
0.0198974609375,
-0.044677734375,
0.0208587646484375,
-0.006381988525390625,
0.03216552734375,
-0.0134735107421875,
-0.045257568359375,
0.0374755859375,
-0.0131378173828125,
-0.042327880859375,
-0.0204925537109375,
0.00794219970703125,
0.00501251220703125,
-0.0031681060791015625,
0.0178375244140625,
0.062286376953125,
0.01812744140625,
-0.01549530029296875,
-0.01296234130859375,
-0.004138946533203125,
-0.033172607421875,
0.0367431640625,
0.0134429931640625,
-0.06866455078125,
0.046295166015625,
0.06781005859375,
0.01100921630859375,
0.04168701171875,
-0.049163818359375,
-0.0635986328125,
-0.03973388671875,
-0.01264190673828125,
-0.07232666015625,
-0.0306854248046875,
-0.0171661376953125,
-0.08050537109375,
-0.0484619140625,
0.01079559326171875,
-0.04974365234375,
0.027862548828125,
0.0284271240234375,
0.00878143310546875,
-0.01505279541015625,
-0.0312347412109375,
-0.06341552734375,
-0.05224609375,
-0.045562744140625,
0.00940704345703125,
-0.00383758544921875,
-0.00800323486328125,
-0.00878143310546875,
0.058746337890625,
-0.007080078125,
-0.060272216796875,
-0.0166015625,
-0.006793975830078125,
0.00827789306640625,
0.01654052734375,
-0.004032135009765625,
-0.0023822784423828125,
0.018951416015625,
-0.0005893707275390625,
0.01508331298828125,
0.0123138427734375,
-0.0171661376953125,
-0.0156097412109375,
-0.002285003662109375,
-0.007717132568359375,
0.01329803466796875,
-0.056640625,
-0.0012044906616210938,
0.0200653076171875,
-0.0206756591796875,
-0.034637451171875,
0.0347900390625,
0.0005059242248535156,
-0.006317138671875,
0.0191497802734375,
-0.011688232421875,
-0.0335693359375,
0.0207366943359375,
-0.0007886886596679688,
-0.01739501953125,
0.020050048828125,
0.0095062255859375,
-0.00576019287109375,
-0.0284881591796875,
-0.0135345458984375,
-0.043914794921875,
0.0255279541015625,
-0.01044464111328125,
-0.010162353515625,
0.040771484375,
-0.01312255859375,
0.042449951171875,
-0.01141357421875,
0.06231689453125,
-0.0345458984375,
-0.07000732421875,
0.048187255859375,
-0.0252685546875,
-0.00982666015625,
-0.042572021484375,
-0.01306915283203125,
-0.002593994140625,
0.083740234375,
0.02191162109375,
-0.00962066650390625,
-0.0007963180541992188,
0.0182647705078125,
-0.07562255859375,
-0.028594970703125,
-0.032928466796875,
0.024810791015625,
-0.009185791015625,
-0.00803375244140625,
-0.01727294921875,
-0.003467559814453125,
-0.03631591796875,
0.018341064453125,
-0.0066070556640625,
-0.0192108154296875,
0.031463623046875,
-0.028167724609375,
0.00650787353515625,
0.033172607421875,
-0.013641357421875,
-0.007205963134765625,
-0.00634002685546875,
-0.0207366943359375,
-0.0362548828125,
-0.0044097900390625,
0.0040283203125,
0.0211334228515625,
0.0030803680419921875,
0.0030689239501953125,
-0.02117919921875,
0.0105438232421875,
-0.0009813308715820312,
-0.0107269287109375,
-0.0243682861328125,
0.0010271072387695312,
-0.01268768310546875,
0.004486083984375,
-0.0217132568359375,
-0.00946044921875,
-0.02264404296875,
-0.0220489501953125,
-0.03167724609375,
0.00910186767578125,
-0.0161590576171875,
0.01149749755859375,
0.0160064697265625,
-0.02117919921875,
-0.09356689453125,
-0.03399658203125,
-0.0262908935546875,
-0.00579833984375,
-0.0338134765625,
0.00333404541015625,
-0.024261474609375,
-0.08984375,
0.027618408203125,
-0.029388427734375,
-0.005809783935546875,
0.00493621826171875,
0.051300048828125,
0.0169219970703125,
-0.00769805908203125,
0.0034275054931640625,
0.00859832763671875,
0.05426025390625,
0.016082763671875,
0.01284027099609375,
0.038299560546875,
-0.039031982421875,
0.039886474609375,
0.049560546875,
-0.004791259765625,
-0.03619384765625,
0.0654296875,
0.0115203857421875,
-0.01122283935546875,
0.0011615753173828125,
-0.0097198486328125,
0.00783538818359375,
-0.006725311279296875,
-0.017608642578125,
-0.005496978759765625,
-0.024932861328125,
0.014007568359375,
0.0044403076171875,
0.027496337890625,
-0.0178680419921875,
-0.04345703125,
0.0237884521484375,
-0.032745361328125,
-0.04052734375,
-0.0169830322265625,
0.0005955696105957031,
-0.03533935546875,
-0.0259552001953125,
-0.0088958740234375,
-0.024810791015625,
-0.028411865234375,
0.00672149658203125,
0.01061248779296875,
-0.034942626953125,
-0.00600433349609375,
-0.01983642578125,
-0.001506805419921875,
0.041748046875,
0.0003364086151123047,
-0.02294921875,
-0.0239715576171875,
-0.01036834716796875,
0.045166015625,
0.0022792816162109375,
0.001155853271484375,
0.0693359375,
0.0364990234375,
-0.01690673828125,
-0.0379638671875,
-0.0289459228515625,
0.005451202392578125,
-0.06414794921875,
0.0113372802734375,
0.021820068359375,
-0.0165252685546875,
0.01476287841796875,
0.038421630859375,
0.0015516281127929688,
0.0261383056640625,
-0.0127410888671875,
0.06732177734375,
0.0927734375,
-0.03851318359375,
0.01153564453125,
0.046844482421875,
-0.0051727294921875,
-0.05853271484375,
-0.0019359588623046875,
-0.01479339599609375,
-0.004604339599609375,
0.0015811920166015625,
0.0274200439453125,
0.05047607421875,
0.0258331298828125,
-0.00853729248046875,
-0.0264892578125,
-0.0149688720703125,
0.036712646484375,
0.03216552734375,
-0.028961181640625,
-0.013824462890625,
0.0195159912109375,
-0.0021953582763671875,
-0.022125244140625,
0.015716552734375,
-0.0100250244140625,
-0.0150604248046875,
-0.004627227783203125,
-0.03125,
-0.004070281982421875,
-0.04608154296875,
-0.033966064453125,
-0.0072479248046875,
-0.0269622802734375,
0.00901031494140625,
-0.043975830078125,
0.0008702278137207031,
-0.02972412109375,
-0.023681640625,
0.0618896484375,
0.0236053466796875,
-0.0005402565002441406,
-0.0465087890625,
0.01001739501953125,
-0.031585693359375,
-0.00567626953125,
0.034637451171875,
-0.0204010009765625,
-0.057525634765625,
0.028778076171875,
-0.05169677734375,
0.0131072998046875,
-0.0305938720703125,
-0.058135986328125,
-0.01953125,
-0.033905029296875,
0.00678253173828125,
0.0069427490234375,
-0.0012693405151367188,
-0.034088134765625,
-0.01361846923828125,
0.002979278564453125,
0.033843994140625,
0.01503753662109375,
0.00499725341796875,
0.07147216796875,
-0.03570556640625,
0.06866455078125,
0.0164337158203125,
0.0177154541015625,
-0.052093505859375,
-0.00904083251953125,
0.005107879638671875,
-0.006832122802734375,
0.0013599395751953125,
-0.026611328125,
0.00144195556640625,
-0.0274658203125,
0.032989501953125,
-0.0093994140625,
0.01361846923828125,
-0.0163726806640625,
0.00737762451171875,
-0.0285797119140625,
0.015045166015625,
-0.03765869140625,
-0.01239013671875,
0.00638580322265625,
-0.0012302398681640625,
-0.0217132568359375,
-0.003414154052734375,
-0.025665283203125,
-0.005016326904296875,
0.0246429443359375,
-0.027923583984375,
-0.0078277587890625,
-0.0162200927734375,
0.051422119140625,
0.0609130859375,
-0.0214691162109375,
0.022003173828125,
0.0179290771484375,
0.005157470703125,
0.035308837890625,
-0.007732391357421875,
0.022216796875,
-0.0013294219970703125,
0.0673828125,
-0.0002639293670654297,
-0.007343292236328125,
0.05133056640625,
-0.0301971435546875,
0.04986572265625,
0.10302734375,
0.1173095703125,
-0.1097412109375,
0.0107879638671875,
0.009429931640625,
-0.033294677734375,
0.052520751953125,
-0.023101806640625,
-0.0330810546875,
-0.06903076171875,
0.06646728515625,
-0.0229644775390625,
-0.0204010009765625,
-0.00289154052734375,
-0.02667236328125,
-0.006591796875,
-0.00799560546875,
0.038909912109375,
0.0008029937744140625,
0.01100921630859375,
-0.03143310546875,
-0.006740570068359375,
-0.0223846435546875,
-0.022796630859375,
-0.0176544189453125,
0.0220947265625,
-0.04620361328125,
-0.0888671875,
-0.022216796875,
-0.0018568038940429688,
-0.0086212158203125,
-0.03289794921875,
-0.0014886856079101562,
0.042572021484375,
0.040618896484375,
0.003871917724609375,
-0.026885986328125,
0.04296875,
-0.0167083740234375,
-0.026702880859375,
-0.039794921875,
-0.00196075439453125,
0.0504150390625,
-0.02496337890625,
0.035247802734375,
0.016082763671875,
-0.020355224609375,
-0.00739288330078125,
-0.018524169921875,
0.047637939453125,
-0.00669097900390625,
-0.0193939208984375,
0.0259552001953125,
0.0188751220703125,
-0.01837158203125,
0.005828857421875,
0.0024280548095703125,
-0.03759765625,
-0.03741455078125,
-0.00864410400390625,
-0.0865478515625,
0.00469970703125,
-0.004779815673828125,
-0.054229736328125,
0.09466552734375,
-0.0106658935546875,
0.00020420551300048828,
-0.0050506591796875,
0.04541015625,
-0.01317596435546875,
0.0291290283203125,
-0.040740966796875,
0.051788330078125,
0.024139404296875,
0.0224456787109375,
-0.05072021484375,
-0.01369476318359375,
-0.00726318359375,
0.022369384765625,
0.062408447265625,
0.047821044921875,
-0.067626953125,
-0.0096282958984375,
-0.0003714561462402344,
0.0027751922607421875,
-0.021087646484375,
0.07080078125,
0.01364898681640625,
0.0010366439819335938,
0.03863525390625,
-0.0140838623046875,
0.0298919677734375,
-0.0009183883666992188,
-0.007434844970703125,
0.04376220703125,
0.025787353515625,
0.0199127197265625,
-0.0243377685546875,
0.0274505615234375,
-0.0157318115234375,
-0.0142364501953125,
0.01019287109375,
0.019317626953125,
-0.0152435302734375,
-0.005401611328125,
-0.018035888671875,
0.0139312744140625,
0.04705810546875,
-0.02899169921875,
0.033203125,
-0.001453399658203125,
0.001987457275390625,
0.05242919921875,
0.019256591796875,
0.0499267578125,
0.007537841796875,
-0.00907135009765625,
-0.004932403564453125,
0.03802490234375,
0.040435791015625,
-0.0013761520385742188,
0.029998779296875,
-0.051971435546875,
-0.032073974609375,
0.002162933349609375,
0.050628662109375,
-0.0196075439453125,
-0.017578125,
0.0135345458984375,
0.003940582275390625,
0.0070343017578125,
-0.006122589111328125,
0.0147552490234375,
-0.04278564453125,
-0.01523590087890625,
-0.0533447265625,
-0.01163482666015625,
0.04229736328125,
0.0120391845703125,
-0.002391815185546875,
-0.0181427001953125,
0.003997802734375,
-0.024383544921875,
-0.032073974609375,
0.013946533203125,
0.03338623046875,
-0.0026798248291015625,
-0.022003173828125,
0.027313232421875,
0.03973388671875,
0.01374053955078125,
-0.016021728515625,
-0.03765869140625,
0.02740478515625,
-0.002178192138671875,
-0.008026123046875,
0.02423095703125,
0.0115203857421875,
0.0406494140625,
0.005950927734375,
0.01047515869140625,
0.045989990234375,
0.043701171875,
-0.0185089111328125,
-0.01568603515625,
0.0033779144287109375,
-0.0262603759765625,
0.0177001953125,
-0.0400390625,
0.027008056640625,
-0.01039886474609375,
0.0030727386474609375,
-0.01690673828125,
0.0186004638671875,
0.0311126708984375,
-0.0234527587890625,
0.0280303955078125,
0.00006389617919921875,
-0.0024814605712890625,
0.035308837890625,
0.01306915283203125,
0.01206207275390625,
0.02728271484375,
-0.055999755859375,
-0.018707275390625,
-0.0106201171875,
-0.0197296142578125,
0.01476287841796875,
0.0335693359375,
-0.022369384765625,
0.03094482421875,
-0.006435394287109375,
0.02294921875,
0.0173187255859375,
-0.036407470703125,
-0.01934814453125,
-0.0198822021484375,
0.036102294921875,
-0.01904296875,
0.013824462890625,
0.0179901123046875,
0.00006324052810668945,
0.033843994140625,
0.03448486328125,
0.044036865234375,
-0.01800537109375,
0.03570556640625,
-0.040557861328125,
0.036163330078125,
-0.07470703125,
-0.03973388671875,
0.050262451171875,
-0.02862548828125,
-0.037078857421875,
0.02117919921875,
-0.0482177734375,
0.048919677734375,
0.028411865234375,
-0.0154876708984375,
0.03936767578125,
0.034912109375,
-0.0175933837890625,
-0.03375244140625,
0.002704620361328125,
-0.036773681640625,
-0.03826904296875,
-0.03509521484375,
-0.0145721435546875,
0.01007843017578125,
0.0235137939453125,
0.0162506103515625,
0.01275634765625,
-0.0016021728515625,
-0.0031986236572265625,
0.00435638427734375,
0.01373291015625,
0.004199981689453125,
0.02398681640625,
-0.0198822021484375,
0.004413604736328125,
-0.0009365081787109375,
-0.020904541015625,
0.0214080810546875,
-0.006366729736328125,
0.0269317626953125,
0.00447845458984375,
0.01507568359375,
-0.028076171875,
0.01438140869140625,
0.0531005859375,
0.02716064453125,
0.022186279296875,
-0.041595458984375,
-0.01312255859375,
0.013153076171875,
0.008514404296875,
-0.0196380615234375,
-0.07220458984375,
0.0164947509765625,
0.0164031982421875,
-0.039398193359375,
0.0010700225830078125,
-0.034088134765625,
0.02178955078125,
0.0390625,
0.0016222000122070312,
-0.048675537109375,
0.005016326904296875,
-0.0129241943359375,
0.0789794921875,
-0.004543304443359375,
-0.033721923828125,
0.00244140625,
0.033294677734375,
-0.0237579345703125,
-0.028472900390625,
-0.055633544921875,
-0.00394439697265625,
-0.0504150390625,
-0.0287017822265625,
0.02093505859375,
0.0308837890625,
-0.04241943359375,
-0.048797607421875,
-0.048370361328125,
0.004123687744140625,
-0.0728759765625,
-0.01055908203125,
0.019317626953125,
-0.007686614990234375,
-0.0013914108276367188,
-0.0546875,
-0.021759033203125,
-0.0217132568359375,
0.0207061767578125,
0.003391265869140625,
-0.0011281967163085938,
0.018096923828125,
-0.0355224609375,
-0.07403564453125,
0.0390625,
-0.010528564453125,
-0.04180908203125,
-0.0023097991943359375,
-0.01349639892578125,
-0.0170440673828125,
-0.022857666015625,
-0.0118408203125,
-0.05316162109375,
-0.02734375,
0.036407470703125,
0.0111846923828125,
0.037811279296875,
-0.0003612041473388672,
0.0205078125,
-0.06005859375,
0.0096282958984375,
-0.01788330078125,
0.0012273788452148438,
0.00872039794921875,
-0.0228424072265625,
0.038421630859375,
0.038177490234375,
-0.019744873046875,
-0.01529693603515625,
0.016815185546875,
-0.040374755859375,
-0.037933349609375,
-0.02618408203125,
-0.05108642578125,
-0.0198516845703125,
0.1392822265625,
0.08990478515625,
0.038238525390625,
-0.033294677734375,
0.005237579345703125,
-0.0030422210693359375,
-0.007678985595703125,
0.0032501220703125,
0.01090240478515625,
-0.046051025390625,
-0.0003039836883544922,
0.0251007080078125,
-0.004642486572265625,
-0.0517578125,
0.01012420654296875,
-0.01203155517578125,
-0.0203857421875,
0.043792724609375,
0.00801849365234375,
0.049102783203125,
-0.0645751953125,
0.0269012451171875,
-0.021270751953125,
-0.006900787353515625,
0.037994384765625,
0.010009765625,
-0.0083465576171875,
0.10992431640625,
0.0249176025390625,
0.01157379150390625,
-0.05126953125,
0.01158905029296875,
0.005908966064453125,
0.0280914306640625,
-0.039642333984375,
-0.041961669921875,
-0.01152801513671875,
0.0212249755859375,
0.0003924369812011719,
0.002483367919921875,
-0.017852783203125,
0.076416015625,
0.01499176025390625,
0.07513427734375,
-0.0105133056640625,
-0.004184722900390625,
-0.039337158203125,
0.045867919921875,
0.0037937164306640625,
-0.0208892822265625,
0.039581298828125,
-0.036407470703125,
0.00537109375,
0.0089263916015625,
0.04693603515625,
-0.042266845703125,
0.0150299072265625,
0.038970947265625,
0.0498046875,
0.0228118896484375
] |
6621473bb83fcaac824a2bffc27fa7c7b1a4dee3
|
Wordpress Stackexchange
Q: How do I exclude a custom taxonomy from the post loop Is there a simple or easy way to exclude all posts from a custom taxonomy in the loop? I've been looking high and low, and neither SE, SO or Google seem to have a straight answer.
I know it can be done via a WPDB query, but that just seems like massive rope to jump for something that should be fairly simple.
A: Here's how to do it for custom post types and custom taxonomies:
$happening = new WP_Query(
array(
'post_type' => 'news', // only query News post type
'tax_query' => array(
array(
'taxonomy' => 'news-cat',
'field' => 'slug',
'terms' => 'media', // exclude items media items in the news-cat custom taxonomy
'operator' => 'NOT IN')
),
)
);
This worked perfectly to exclude custom taxonomy from custom post type..
Just wanted to add the query loop code to finish off the snippet:
while ( $the_query->have_posts() ) : $the_query->the_post();
|
Q: How do I exclude a custom taxonomy from the post loop Is there a simple or easy way to exclude all posts from a custom taxonomy in the loop? I've been looking high and low, and neither SE, SO or Google seem to have a straight answer.
I know it can be done via a WPDB query, but that just seems like massive rope to jump for something that should be fairly simple.
A: Here's how to do it for custom post types and custom taxonomies:
$happening = new WP_Query(
array(
'post_type' => 'news', // only query News post type
'tax_query' => array(
array(
'taxonomy' => 'news-cat',
'field' => 'slug',
'terms' => 'media', // exclude items media items in the news-cat custom taxonomy
'operator' => 'NOT IN')
),
)
);
This worked perfectly to exclude custom taxonomy from custom post type..
Just wanted to add the query loop code to finish off the snippet:
while ( $the_query->have_posts() ) : $the_query->the_post();
A: The solution to this isn't really that publicised, but it should be.
You can do the following:
$args['tax_query'] = array(
array(
'taxonomy' => 'category',
'terms' => array('cat', 'dog'),
'field' => 'slug',
'operator' => 'NOT IN',
),
);
query_posts($args);
The operator argument can take other terms, but the above code is basically saying get all posts from the taxonomy 'category' that don't have the terms 'cat' or 'dog'.
A: You would want to use the NOT EXISTS operator along with passing the taxonomy slug, which tells the query not to include any of a chosen category from your custom taxonomy inside the loop.
To exclude all posts that are in the taxonomy "fruit" (regardless of fruit kind), here is the snippet:
$args = array(
'post_type' => 'post',
'tax_query' => array(
array(
'taxonomy' => 'fruit',
'operator' => 'NOT EXISTS'
)
)
);
$query = new WP_Query( $args );
A: query_posts( array(
'post_type' => 'listings',
'tax_query' => array(
array(
'taxonomy' => 'status',
'field' => 'slug',
'terms' => 'sold',
'operator' => 'NOT IN'
),
)
)
);
This code excludes status => sold from post_type => listings
A: I did the following to exclude posts from a certain taxonomy term:
$argos = array(
'tax_query' => array (
array(
'taxonomy' => 'topics', // My Custom Taxonomy
'terms' => 'college', // My Taxonomy Term that I wanted to exclude
'field' => 'slug', // Whether I am passing term Slug or term ID
'operator' => 'NOT IN', // Selection operator - use IN to include, NOT IN to exclude
),
),
'post_type'=>'page', // Post type I want to show, can be a custom post type too
'posts_per_page' => -1,
'orderby' => 'title',
'order'=>'ASC',
'post_parent' =>$post->ID // show child posts or pages of current page/post
);
$query = new WP_Query( $args );
A: I use the "RYO ‘Category Visibility’ WordPress Plugin" that seems to work pretty well.
You can decide on an admin page what categories are visible or excluded from various areas.
http://ryowebsite.com/wp-plugins/category-visibility/
-Adam
|
wordpress
|
{
"language": "en",
"length": 489,
"provenance": "stackexchange_00019.jsonl.gz:407810",
"question_score": "27",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12217"
}
|
[
0.060699462890625,
0.004909515380859375,
0.00972747802734375,
-0.00730133056640625,
0.0361328125,
-0.03753662109375,
0.07916259765625,
-0.02056884765625,
-0.01021575927734375,
0.0139312744140625,
-0.03472900390625,
-0.005229949951171875,
-0.025054931640625,
-0.01491546630859375,
-0.0120697021484375,
-0.047332763671875,
0.017364501953125,
-0.004940032958984375,
0.039276123046875,
-0.010223388671875,
0.021148681640625,
-0.0303802490234375,
0.05218505859375,
0.004192352294921875,
0.0185699462890625,
-0.0127716064453125,
0.06597900390625,
-0.019744873046875,
0.00641632080078125,
-0.02703857421875,
0.0227508544921875,
-0.005908966064453125,
-0.004520416259765625,
0.034881591796875,
-0.00615692138671875,
-0.0009717941284179688,
0.020355224609375,
0.01128387451171875,
0.034881591796875,
0.00450897216796875,
0.0035457611083984375,
-0.00765228271484375,
-0.0194244384765625,
0.0164031982421875,
-0.03619384765625,
-0.027069091796875,
0.000036716461181640625,
-0.009674072265625,
0.038787841796875,
-0.037139892578125,
0.01922607421875,
-0.0194244384765625,
0.0467529296875,
-0.0219268798828125,
-0.038055419921875,
0.007965087890625,
-0.004894256591796875,
0.01049041748046875,
0.033538818359375,
-0.0211944580078125,
-0.03863525390625,
-0.0112457275390625,
0.03692626953125,
-0.0124969482421875,
0.00820159912109375,
-0.00150299072265625,
0.017486572265625,
0.029693603515625,
-0.0736083984375,
-0.0162200927734375,
0.053131103515625,
-0.046234130859375,
0.0004754066467285156,
0.00644683837890625,
-0.040496826171875,
-0.047515869140625,
0.05609130859375,
-0.02728271484375,
-0.01009368896484375,
0.00350189208984375,
-0.0003330707550048828,
0.007434844970703125,
-0.0484619140625,
-0.0131072998046875,
0.0147247314453125,
0.0092315673828125,
-0.0159454345703125,
-0.0123748779296875,
-0.01398468017578125,
-0.023590087890625,
-0.0103759765625,
-0.003368377685546875,
-0.068359375,
0.0282135009765625,
0.0190582275390625,
-0.0269317626953125,
0.0285491943359375,
0.037994384765625,
-0.039398193359375,
-0.01123046875,
-0.004589080810546875,
-0.032989501953125,
0.0077056884765625,
-0.0241546630859375,
0.04486083984375,
0.01169586181640625,
-0.050201416015625,
0.0012226104736328125,
0.07391357421875,
0.048614501953125,
0.01904296875,
0.0056610107421875,
-0.03643798828125,
-0.022705078125,
-0.0191192626953125,
0.02410888671875,
-0.029754638671875,
-0.009307861328125,
-0.01074981689453125,
-0.0230255126953125,
0.009857177734375,
0.0439453125,
-0.01165771484375,
-0.0104522705078125,
0.00684356689453125,
0.0164337158203125,
-0.01441192626953125,
-0.033966064453125,
0.0198822021484375,
0.0438232421875,
-0.058013916015625,
-0.0224456787109375,
0.10302734375,
0.043426513671875,
0.04278564453125,
-0.0445556640625,
0.02410888671875,
-0.024658203125,
-0.0005240440368652344,
-0.00592041015625,
0.026580810546875,
-0.0242156982421875,
-0.01702880859375,
-0.0006685256958007812,
0.0204010009765625,
0.030517578125,
0.0255126953125,
0.0016527175903320312,
0.007720947265625,
-0.036895751953125,
0.0047760009765625,
-0.0213623046875,
0.0498046875,
0.0003113746643066406,
-0.033416748046875,
-0.03155517578125,
0.042083740234375,
-0.045806884765625,
-0.01496124267578125,
-0.06298828125,
0.0122833251953125,
-0.01068878173828125,
-0.004375457763671875,
-0.0205230712890625,
-0.040863037109375,
0.03887939453125,
-0.03759765625,
-0.0159454345703125,
0.031341552734375,
-0.0096893310546875,
0.029876708984375,
-0.0283660888671875,
0.032501220703125,
-0.00197601318359375,
-0.01055145263671875,
0.021270751953125,
-0.01473236083984375,
-0.0221099853515625,
0.023193359375,
0.0294036865234375,
-0.00775909423828125,
-0.036346435546875,
0.01195526123046875,
0.006290435791015625,
-0.07171630859375,
0.01904296875,
0.01264190673828125,
0.0517578125,
0.007785797119140625,
0.0157470703125,
0.06494140625,
0.0208587646484375,
-0.030731201171875,
0.01255035400390625,
0.01044464111328125,
-0.0164794921875,
-0.0306549072265625,
-0.01280975341796875,
-0.005756378173828125,
0.004581451416015625,
-0.033294677734375,
0.0236968994140625,
-0.0304412841796875,
-0.01090240478515625,
-0.06561279296875,
0.00365447998046875,
-0.0151824951171875,
0.055267333984375,
-0.04266357421875,
-0.002910614013671875,
0.045867919921875,
-0.004283905029296875,
-0.060546875,
0.0151214599609375,
-0.044403076171875,
-0.04852294921875,
-0.0023937225341796875,
0.01171112060546875,
-0.0033721923828125,
-0.01399993896484375,
0.0122833251953125,
-0.0325927734375,
0.01323699951171875,
0.037139892578125,
0.0614013671875,
-0.0007996559143066406,
-0.0121917724609375,
-0.021942138671875,
0.04364013671875,
0.025543212890625,
-0.06536865234375,
0.0223236083984375,
0.0281524658203125,
-0.0109100341796875,
-0.053558349609375,
0.00040268898010253906,
-0.001399993896484375,
-0.0265350341796875,
-0.01351165771484375,
0.0557861328125,
0.0216064453125,
0.0218658447265625,
-0.039581298828125,
-0.021636962890625,
0.0673828125,
-0.01338958740234375,
-0.01605224609375,
-0.00391387939453125,
0.017303466796875,
0.04150390625,
0.017822265625,
0.01444244384765625,
0.02154541015625,
0.01213836669921875,
0.03411865234375,
0.026275634765625,
0.0186004638671875,
0.0164642333984375,
0.00991058349609375,
-0.01666259765625,
0.01195526123046875,
-0.01256561279296875,
-0.05194091796875,
0.00954437255859375,
0.0450439453125,
-0.0156402587890625,
0.007717132568359375,
0.00579833984375,
-0.0189208984375,
-0.005023956298828125,
0.021728515625,
-0.039306640625,
0.003696441650390625,
0.00899505615234375,
0.005016326904296875,
0.0143280029296875,
-0.0278167724609375,
0.0035552978515625,
0.0303497314453125,
0.01062774658203125,
0.00856781005859375,
0.0745849609375,
0.00992584228515625,
-0.0167999267578125,
-0.0379638671875,
-0.07659912109375,
-0.0043487548828125,
0.0017404556274414062,
-0.046844482421875,
-0.044647216796875,
-0.0233917236328125,
0.040374755859375,
-0.0217132568359375,
0.007205963134765625,
0.0312347412109375,
-0.004863739013671875,
-0.0126800537109375,
-0.03558349609375,
0.0474853515625,
-0.0274658203125,
0.0157470703125,
0.065673828125,
0.01271820068359375,
0.0020122528076171875,
0.0088653564453125,
-0.01641845703125,
-0.019744873046875,
0.034820556640625,
0.01184844970703125,
0.00173187255859375,
-0.05377197265625,
0.01134490966796875,
0.014068603515625,
0.00738525390625,
0.0174407958984375,
-0.01476287841796875,
0.0194549560546875,
0.0124969482421875,
-0.01016998291015625,
-0.0212554931640625,
0.07818603515625,
0.0087738037109375,
-0.0010852813720703125,
-0.033660888671875,
-0.0019989013671875,
-0.048248291015625,
-0.042724609375,
-0.034515380859375,
0.01715087890625,
-0.036285400390625,
-0.09564208984375,
-0.07867431640625,
-0.07110595703125,
-0.0225677490234375,
-0.004405975341796875,
0.0007843971252441406,
0.0254364013671875,
0.1251220703125,
0.040374755859375,
-0.06585693359375,
0.03753662109375,
-0.017791748046875,
-0.0482177734375,
0.05865478515625,
0.00611114501953125,
0.0002510547637939453,
-0.01190185546875,
0.01224517822265625,
0.040771484375,
0.01200103759765625,
-0.0236358642578125,
-0.007732391357421875,
0.0061798095703125,
-0.004009246826171875,
0.01450347900390625,
-0.00106048583984375,
0.0033855438232421875,
0.00939178466796875,
0.018890380859375,
-0.034515380859375,
-0.029937744140625,
-0.00865936279296875,
-0.01224517822265625,
0.018951416015625,
-0.037017822265625,
0.014251708984375,
-0.0247955322265625,
0.07586669921875,
-0.0251007080078125,
0.00933074951171875,
-0.0452880859375,
-0.0295562744140625,
0.06396484375,
-0.0010366439819335938,
0.00995635986328125,
0.0247039794921875,
0.0233612060546875,
-0.033721923828125,
0.0237579345703125,
0.004177093505859375,
-0.01371002197265625,
-0.0205078125,
-0.0173797607421875,
-0.03961181640625,
-0.03912353515625,
0.025787353515625,
-0.0222930908203125,
-0.00724029541015625,
0.0002617835998535156,
-0.0171966552734375,
0.0247955322265625,
0.07855224609375,
-0.039031982421875,
-0.0152130126953125,
-0.048370361328125,
-0.013336181640625,
0.055267333984375,
-0.018310546875,
0.0025691986083984375,
-0.0286865234375,
-0.0916748046875,
0.0088958740234375,
0.004894256591796875,
-0.0177459716796875,
-0.0296478271484375,
0.01331329345703125,
-0.077392578125,
-0.046234130859375,
0.045135498046875,
-0.049957275390625,
0.029571533203125,
-0.035797119140625,
0.037200927734375,
-0.07550048828125,
-0.0113983154296875,
-0.0224456787109375,
-0.0626220703125,
0.019439697265625,
-0.052276611328125,
0.00957489013671875,
-0.005645751953125,
0.040740966796875,
-0.031341552734375,
-0.005290985107421875,
0.0105743408203125,
-0.0187225341796875,
-0.0218505859375,
-0.01117706298828125,
-0.016357421875,
0.061065673828125,
-0.01412200927734375,
0.0245208740234375,
-0.026214599609375,
-0.0035648345947265625,
0.0167236328125,
0.08123779296875,
-0.01064300537109375,
-0.00048828125,
-0.01290130615234375,
-0.0033550262451171875,
-0.0362548828125,
-0.015289306640625,
-0.04144287109375,
-0.01212310791015625,
-0.033111572265625,
-0.01445770263671875,
-0.0166015625,
-0.032928466796875,
0.04913330078125,
0.034698486328125,
-0.030853271484375,
0.018524169921875,
0.08587646484375,
0.01522064208984375,
-0.027587890625,
-0.1226806640625,
-0.0258026123046875,
0.0322265625,
-0.022918701171875,
0.049957275390625,
0.0273895263671875,
-0.018951416015625,
0.07672119140625,
-0.00901031494140625,
-0.02496337890625,
0.0008697509765625,
0.033782958984375,
0.00031495094299316406,
-0.034210205078125,
0.004741668701171875,
-0.0308380126953125,
0.03106689453125,
-0.0028553009033203125,
-0.0021839141845703125,
-0.05059814453125,
0.0288238525390625,
0.05517578125,
-0.00445556640625,
0.02069091796875,
-0.045928955078125,
-0.029815673828125,
0.015960693359375,
-0.0134429931640625,
0.01763916015625,
0.01824951171875,
-0.004825592041015625,
-0.00626373291015625,
-0.038848876953125,
0.026763916015625,
-0.002773284912109375,
0.0187530517578125,
-0.019317626953125,
0.037139892578125,
0.02044677734375,
0.00798797607421875,
-0.010711669921875,
0.001659393310546875,
-0.00975799560546875,
-0.03302001953125,
-0.060882568359375,
0.003841400146484375,
0.0019741058349609375,
0.0297698974609375,
0.039886474609375,
0.0027332305908203125,
0.06787109375,
0.0179901123046875,
-0.0022182464599609375,
0.005558013916015625,
-0.055450439453125,
-0.0026264190673828125,
-0.052154541015625,
0.0201263427734375,
0.00894927978515625,
-0.01123809814453125,
0.006328582763671875,
0.008819580078125,
-0.006412506103515625,
0.0146331787109375,
-0.007495880126953125,
0.055450439453125,
0.01068878173828125,
0.044036865234375,
-0.01262664794921875,
-0.0024509429931640625,
0.0049896240234375,
0.0287628173828125,
-0.0081634521484375,
-0.037139892578125,
-0.040435791015625,
-0.0141448974609375,
0.0283050537109375,
-0.040557861328125,
-0.01551055908203125,
0.046478271484375,
0.0005884170532226562,
-0.0102691650390625,
0.00980377197265625,
0.0263671875,
-0.0007762908935546875,
-0.0234222412109375,
-0.0011119842529296875,
0.0295562744140625,
0.0235137939453125,
-0.00872039794921875,
-0.0019025802612304688,
-0.03277587890625,
0.0085906982421875,
0.0033740997314453125,
-0.01092529296875,
-0.00814056396484375,
-0.00211334228515625,
-0.03564453125,
-0.006839752197265625,
0.0008568763732910156,
-0.0390625,
-0.046417236328125,
0.007205963134765625,
-0.0115509033203125,
0.003993988037109375,
-0.0206756591796875,
0.054656982421875,
-0.0253143310546875,
-0.04736328125,
0.0160064697265625,
0.00455474853515625,
0.07177734375,
0.044464111328125,
-0.023223876953125,
0.005306243896484375,
-0.04742431640625,
-0.002170562744140625,
-0.03875732421875,
-0.0806884765625,
-0.019622802734375,
-0.01629638671875,
0.022308349609375,
0.00411224365234375,
0.0251007080078125,
-0.007137298583984375,
-0.017059326171875,
0.017852783203125,
0.018096923828125,
-0.0014734268188476562,
-0.033782958984375,
0.041839599609375,
0.019378662109375,
0.029876708984375,
-0.018218994140625,
-0.002079010009765625,
0.007534027099609375,
-0.0137939453125,
-0.035064697265625,
-0.11370849609375,
-0.006439208984375,
0.04833984375,
-0.06463623046875,
0.07635498046875,
0.03643798828125,
0.0201873779296875,
-0.003803253173828125,
0.00018787384033203125,
0.007495880126953125,
-0.034576416015625,
-0.01415252685546875,
-0.004840850830078125,
-0.00542449951171875,
0.0007090568542480469,
-0.00003123283386230469,
0.00910186767578125,
-0.01006317138671875,
-0.029449462890625,
0.00911712646484375,
0.0229949951171875,
-0.0007662773132324219,
0.01021575927734375,
0.014617919921875,
0.0302886962890625,
0.020477294921875,
-0.0211639404296875,
0.02911376953125,
0.0115814208984375,
0.0165557861328125,
-0.006145477294921875,
0.00945281982421875,
-0.0165557861328125,
-0.01397705078125,
0.061981201171875,
0.01551055908203125,
-0.00959014892578125,
0.041473388671875,
-0.035003662109375,
-0.0225067138671875,
0.01019287109375,
0.0172882080078125,
-0.041900634765625,
0.00806427001953125,
0.0202789306640625,
0.01213836669921875,
-0.0287017822265625,
0.0032501220703125,
-0.0004062652587890625,
-0.00653839111328125,
-0.0201416015625,
0.0077667236328125,
-0.0382080078125,
-0.0263519287109375,
-0.00013697147369384766,
-0.030120849609375,
-0.005199432373046875,
0.0007615089416503906,
0.021820068359375,
-0.013031005859375,
-0.001110076904296875,
0.0142669677734375,
-0.0280609130859375,
-0.01226043701171875,
0.007503509521484375,
-0.034423828125,
-0.011505126953125,
-0.040069580078125,
0.005451202392578125,
-0.0270233154296875,
0.0174102783203125,
0.05621337890625,
-0.0185546875,
0.006397247314453125,
0.046844482421875,
-0.02294921875,
0.04107666015625,
-0.005809783935546875,
-0.040924072265625,
-0.01074981689453125,
-0.03277587890625,
-0.017181396484375,
0.0183563232421875,
-0.0235748291015625,
0.027679443359375,
-0.00397491455078125,
-0.0171966552734375,
-0.00803375244140625,
-0.0408935546875,
0.07598876953125,
-0.06005859375,
0.0004398822784423828,
0.005458831787109375,
0.032135009765625,
0.00860595703125,
-0.00003641843795776367,
0.035125732421875,
-0.04571533203125,
-0.0229339599609375,
0.01268768310546875,
-0.01448822021484375,
-0.04620361328125,
-0.0238189697265625,
-0.059295654296875,
0.10882568359375,
-0.040252685546875,
0.04046630859375,
0.034332275390625,
0.03765869140625,
-0.0236968994140625,
0.0208740234375,
-0.0511474609375,
0.058624267578125,
0.047760009765625,
0.0274505615234375,
-0.0277862548828125,
-0.00665283203125,
0.005817413330078125,
0.011474609375,
0.04388427734375,
-0.0003502368927001953,
-0.0269317626953125,
-0.0187530517578125,
0.0416259765625,
0.072509765625,
0.013427734375,
-0.005462646484375,
-0.004058837890625,
0.025421142578125,
0.028594970703125,
-0.0124969482421875,
0.04034423828125,
0.0038776397705078125,
-0.03619384765625,
0.008453369140625,
0.01409912109375,
0.0299835205078125,
0.006595611572265625,
-0.0197906494140625,
0.0075531005859375,
-0.00661468505859375,
-0.00004029273986816406,
0.0079803466796875,
-0.004787445068359375,
0.037445068359375,
-0.00048804283142089844,
-0.0160369873046875,
0.017181396484375,
-0.034149169921875,
0.03472900390625,
-0.00893402099609375,
0.06427001953125,
0.006122589111328125,
0.01201629638671875,
0.0643310546875,
-0.0284576416015625,
0.0318603515625,
0.0150604248046875,
-0.0423583984375,
0.035369873046875,
-0.0166168212890625,
0.004367828369140625,
-0.06964111328125,
0.034759521484375,
0.030731201171875,
0.0294342041015625,
-0.0465087890625,
-0.033935546875,
0.01544952392578125,
0.0218963623046875,
-0.0110931396484375,
0.0006995201110839844,
0.0030670166015625,
0.0364990234375,
0.067138671875,
-0.0789794921875,
0.0182037353515625,
0.0262908935546875,
0.03863525390625,
-0.031890869140625,
-0.04437255859375,
-0.026580810546875,
-0.009246826171875,
-0.038360595703125,
-0.023773193359375,
0.01148223876953125,
0.08160400390625,
0.051849365234375,
0.04547119140625,
-0.0322265625,
-0.0452880859375,
-0.000209808349609375,
0.03021240234375,
-0.0137176513671875,
0.004299163818359375,
-0.006755828857421875,
-0.0313720703125,
-0.0072174072265625,
0.00772857666015625,
0.01125335693359375,
0.00946807861328125,
0.032257080078125,
0.0521240234375,
0.00954437255859375,
-0.01715087890625,
0.050018310546875,
0.0030078887939453125,
-0.0504150390625,
-0.040496826171875,
0.0065765380859375,
0.044647216796875,
0.01259613037109375,
0.0318603515625,
0.0011892318725585938,
0.0499267578125,
-0.0023059844970703125,
0.01474761962890625,
0.00257110595703125,
-0.027984619140625,
0.042388916015625,
-0.0167236328125,
0.0726318359375,
0.02484130859375,
-0.08428955078125,
-0.0223236083984375,
-0.0309906005859375,
-0.005687713623046875,
0.009979248046875,
0.018524169921875,
-0.025970458984375,
0.04644775390625,
0.0294342041015625,
-0.020721435546875,
-0.00945281982421875,
0.0105133056640625,
0.00888824462890625,
-0.0076446533203125,
0.006046295166015625,
0.0027141571044921875,
-0.038665771484375,
-0.0168914794921875,
-0.0104827880859375,
0.00894927978515625,
0.0174102783203125,
0.0599365234375,
0.012359619140625,
0.00696563720703125,
-0.032989501953125,
0.041412353515625,
-0.05548095703125,
-0.02618408203125,
0.0006418228149414062,
-0.00270843505859375,
0.0249786376953125,
-0.00557708740234375,
-0.011688232421875,
-0.0153656005859375,
0.054962158203125,
-0.06610107421875,
0.0055084228515625,
-0.0345458984375,
0.0179290771484375,
-0.0638427734375,
0.058319091796875,
-0.01715087890625,
-0.0048675537109375,
-0.043212890625,
-0.029144287109375,
0.0455322265625,
0.0338134765625,
-0.003208160400390625,
0.002933502197265625,
-0.00450897216796875,
-0.0264434814453125,
0.0206146240234375,
-0.01103973388671875,
0.01264190673828125,
0.040740966796875,
-0.0200653076171875,
-0.0244293212890625,
0.01666259765625,
-0.0092010498046875,
-0.006938934326171875,
0.017913818359375,
0.03436279296875,
0.01708984375,
-0.045379638671875,
-0.0183868408203125,
-0.00020313262939453125,
0.01313018798828125,
-0.0318603515625,
0.003971099853515625,
-0.004238128662109375,
-0.01027679443359375,
-0.0004069805145263672,
-0.02386474609375,
-0.02294921875,
-0.0232391357421875,
-0.02215576171875,
0.031341552734375,
-0.025787353515625,
-0.035675048828125,
-0.061920166015625,
-0.027130126953125,
0.0287322998046875,
-0.0004718303680419922,
-0.03863525390625,
0.018524169921875,
-0.0256195068359375,
0.0183258056640625,
-0.027130126953125,
0.0274810791015625,
-0.00835418701171875,
0.039215087890625,
0.00043487548828125,
-0.017120361328125,
-0.006832122802734375,
0.0379638671875,
0.0023708343505859375,
0.007137298583984375,
0.01114654541015625,
-0.02337646484375,
-0.008270263671875,
-0.0035305023193359375,
0.007663726806640625,
0.01788330078125,
0.05694580078125,
-0.016387939453125,
-0.011474609375,
0.0064697265625,
-0.03021240234375,
-0.0379638671875,
0.036529541015625,
-0.05108642578125,
-0.0404052734375,
-0.01593017578125,
-0.00569915771484375,
-0.0035762786865234375,
-0.0286407470703125,
-0.06109619140625,
0.02777099609375,
-0.0057525634765625,
-0.0274200439453125,
-0.044464111328125,
0.027191162109375,
0.02703857421875,
-0.0189666748046875,
-0.0101776123046875,
-0.02740478515625,
-0.035552978515625,
0.005359649658203125,
0.0198516845703125,
0.0189208984375,
0.01068878173828125,
0.022674560546875,
-0.029571533203125,
0.03240966796875,
0.01336669921875,
0.01544952392578125,
-0.00429534912109375,
0.004299163818359375,
0.00824737548828125,
0.0262451171875,
-0.050201416015625,
0.03265380859375,
-0.0188751220703125,
0.04827880859375,
-0.0066375732421875,
-0.0245208740234375,
-0.06280517578125,
-0.050537109375,
0.07708740234375,
0.0460205078125,
0.034820556640625,
0.0002536773681640625,
-0.042449951171875,
-0.037353515625,
-0.0167388916015625,
-0.01708984375,
0.02978515625,
-0.08251953125,
-0.00757598876953125,
0.0252838134765625,
0.007472991943359375,
0.003185272216796875,
-0.01047515869140625,
-0.01079559326171875,
-0.0202484130859375,
-0.0102081298828125,
0.004482269287109375,
-0.060577392578125,
0.08697509765625,
-0.076904296875,
0.00827789306640625,
-0.0089569091796875,
-0.043975830078125,
-0.0221099853515625,
-0.035552978515625,
-0.0322265625,
-0.0161590576171875,
-0.0260467529296875,
0.01568603515625,
0.038726806640625,
-0.0006546974182128906,
0.0098419189453125,
-0.00513458251953125,
0.015167236328125,
-0.0174713134765625,
0.00933837890625,
0.021697998046875,
0.007297515869140625,
-0.026641845703125,
0.00908660888671875,
0.01375579833984375,
0.00922393798828125,
0.006031036376953125,
0.0531005859375,
-0.005382537841796875,
0.0254669189453125,
-0.0040435791015625,
-0.007617950439453125,
0.0214691162109375,
-0.0267791748046875,
0.0037136077880859375,
0.0040740966796875,
-0.0182342529296875,
-0.0163421630859375,
0.0008764266967773438,
-0.01346588134765625,
-0.0002193450927734375,
0.005985260009765625
] |
1bbfd5bad1b02e238f0ed6d473b1a69125b26da6
|
Wordpress Stackexchange
Q: wp_get_object_terms - How can I order the resulting array by hierarchy? I'm returning a custom hierarchal taxonomy via wp_get_object_terms.
The trouble is that the results are being ordered by name or count, neither of which are proving reliable. (I'm using a custom taxonomy for "Location" - City, State, Country - sometimes the State appears before the City)
Is there a way I can order the resulting array by the custom taxonomy hierarchy?
Is there, perhaps, another way I should be looking at this?
A: You could use wp_list_categories to sort out the hierarchy, it started supporting taxonomies as of 3.0.
You can see an example of using a custom taxonomy with wp_list_categories on the codex page for the function.
You'd just need to pass in the term ids from your wp_get_object_terms call to the wp_list_categories include arg, eg.
wp_list_categories( array( 'include' => $your_array_of_ids ) );
It should then list out the terms of your custom taxonomy in a hierarchal format, though it may not appear so if your theme isn't padding list elements(so be sure to apply appropriate styling if the results aren't showing in a hierarchal form).
|
Q: wp_get_object_terms - How can I order the resulting array by hierarchy? I'm returning a custom hierarchal taxonomy via wp_get_object_terms.
The trouble is that the results are being ordered by name or count, neither of which are proving reliable. (I'm using a custom taxonomy for "Location" - City, State, Country - sometimes the State appears before the City)
Is there a way I can order the resulting array by the custom taxonomy hierarchy?
Is there, perhaps, another way I should be looking at this?
A: You could use wp_list_categories to sort out the hierarchy, it started supporting taxonomies as of 3.0.
You can see an example of using a custom taxonomy with wp_list_categories on the codex page for the function.
You'd just need to pass in the term ids from your wp_get_object_terms call to the wp_list_categories include arg, eg.
wp_list_categories( array( 'include' => $your_array_of_ids ) );
It should then list out the terms of your custom taxonomy in a hierarchal format, though it may not appear so if your theme isn't padding list elements(so be sure to apply appropriate styling if the results aren't showing in a hierarchal form).
A: Just a rough sketch to get your idea:
*
*countries (hierarchical taxonomy)
*
*
*France (country - sub taxonomy)
*
*
*
*
*Champagne (state - sub sub taxonomy)
*
*
*
*
*
*
*Le Mans (city - term)
*
*
*
*
*
*
*Angers (city - term)
*
*
*
*
*
*
*Nantes (city - term)
And you want to order:
$query_results = query( 'country' => 'france', 'orderby' => 'state city', 'order' => 'ASC' );
Did i get this right? If not, feel free to edit my answer or update your Q.
|
wordpress
|
{
"language": "en",
"length": 286,
"provenance": "stackexchange_00019.jsonl.gz:407840",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12320"
}
|
[
0.0631103515625,
0.002994537353515625,
-0.0232391357421875,
-0.051666259765625,
0.038543701171875,
-0.03985595703125,
0.04638671875,
0.006687164306640625,
0.007610321044921875,
0.020721435546875,
-0.03936767578125,
-0.0128631591796875,
-0.0196685791015625,
-0.00849151611328125,
-0.037811279296875,
-0.056427001953125,
0.048797607421875,
-0.0305938720703125,
0.032623291015625,
0.00814056396484375,
-0.00031566619873046875,
0.04144287109375,
0.0323486328125,
0.0074310302734375,
0.0325927734375,
-0.022674560546875,
0.030548095703125,
-0.038421630859375,
0.037017822265625,
-0.01479339599609375,
0.031768798828125,
-0.015472412109375,
0.006946563720703125,
-0.004802703857421875,
0.037750244140625,
-0.01526641845703125,
0.05517578125,
-0.0262908935546875,
0.00583648681640625,
0.037261962890625,
0.018157958984375,
-0.004886627197265625,
0.0086822509765625,
0.0123443603515625,
-0.0095672607421875,
-0.032806396484375,
0.02642822265625,
-0.0257568359375,
0.018035888671875,
-0.048095703125,
0.03912353515625,
-0.01092529296875,
0.0626220703125,
-0.058013916015625,
-0.0226287841796875,
-0.00203704833984375,
-0.0010204315185546875,
0.0251617431640625,
0.0166473388671875,
-0.041656494140625,
-0.035919189453125,
0.007495880126953125,
0.037353515625,
0.01157379150390625,
-0.0016527175903320312,
0.01383209228515625,
0.00033783912658691406,
0.01806640625,
-0.042205810546875,
-0.015625,
0.016326904296875,
-0.0245208740234375,
-0.00003236532211303711,
-0.01074981689453125,
0.0051422119140625,
-0.051483154296875,
-0.0030193328857421875,
-0.05413818359375,
0.022552490234375,
0.0255126953125,
0.006206512451171875,
-0.00693511962890625,
-0.01806640625,
0.0027637481689453125,
0.01702880859375,
0.0270843505859375,
-0.0225830078125,
-0.0248565673828125,
-0.03472900390625,
-0.032928466796875,
-0.017730712890625,
-0.0264434814453125,
-0.059356689453125,
0.02935791015625,
-0.005931854248046875,
-0.001178741455078125,
0.0286712646484375,
0.022979736328125,
-0.00971221923828125,
0.000980377197265625,
-0.01413726806640625,
-0.03631591796875,
0.02752685546875,
-0.03131103515625,
0.004047393798828125,
-0.0253753662109375,
-0.004974365234375,
-0.0119781494140625,
0.0423583984375,
0.039276123046875,
-0.01125335693359375,
0.043701171875,
0.01203155517578125,
-0.054229736328125,
0.00994110107421875,
0.020782470703125,
-0.0005011558532714844,
0.032379150390625,
0.03955078125,
-0.0093841552734375,
0.01059722900390625,
0.02972412109375,
-0.0011205673217773438,
0.0191650390625,
-0.009185791015625,
0.0164337158203125,
0.00323486328125,
-0.04351806640625,
0.0028438568115234375,
0.0080413818359375,
-0.05712890625,
0.035491943359375,
0.05267333984375,
0.01282501220703125,
-0.0035419464111328125,
-0.02337646484375,
-0.002017974853515625,
-0.01119232177734375,
0.0018758773803710938,
-0.0175018310546875,
0.054107666015625,
0.01495361328125,
0.015411376953125,
0.00856781005859375,
-0.01065826416015625,
-0.003841400146484375,
0.0097808837890625,
0.0150604248046875,
-0.01384735107421875,
-0.024871826171875,
0.021697998046875,
-0.019744873046875,
0.06195068359375,
-0.003387451171875,
-0.04339599609375,
-0.0173187255859375,
0.0208740234375,
-0.039398193359375,
-0.0443115234375,
-0.0640869140625,
-0.0288848876953125,
-0.0159912109375,
-0.0072174072265625,
-0.0139923095703125,
-0.020843505859375,
0.035125732421875,
-0.00037860870361328125,
0.0022220611572265625,
0.024688720703125,
0.003070831298828125,
0.025604248046875,
-0.048309326171875,
0.0010824203491210938,
0.0130157470703125,
-0.010223388671875,
0.04046630859375,
-0.03521728515625,
-0.041534423828125,
0.0094757080078125,
0.028900146484375,
-0.0268707275390625,
-0.042449951171875,
-0.03466796875,
0.0119171142578125,
-0.0418701171875,
0.049072265625,
-0.0003566741943359375,
0.047271728515625,
0.01512908935546875,
0.0030517578125,
0.01483917236328125,
0.0305023193359375,
-0.10107421875,
0.0621337890625,
0.0191650390625,
0.01175689697265625,
-0.055450439453125,
0.0009207725524902344,
-0.00023818016052246094,
-0.051849365234375,
-0.0229949951171875,
0.00499725341796875,
-0.0035381317138671875,
0.0143890380859375,
0.00865936279296875,
-0.004131317138671875,
0.00800323486328125,
0.0228118896484375,
-0.00007933378219604492,
0.01010894775390625,
0.004917144775390625,
-0.0063934326171875,
-0.0208740234375,
-0.0211639404296875,
-0.034576416015625,
-0.006275177001953125,
0.013214111328125,
-0.00832366943359375,
0.003978729248046875,
-0.0201263427734375,
0.00033593177795410156,
-0.0026836395263671875,
-0.00833892822265625,
0.034576416015625,
0.0281982421875,
0.0156707763671875,
-0.02685546875,
0.01302337646484375,
0.039886474609375,
0.037078857421875,
-0.040191650390625,
-0.00395965576171875,
0.039886474609375,
0.06451416015625,
0.001346588134765625,
-0.002468109130859375,
0.0267333984375,
-0.06256103515625,
0.01230621337890625,
0.0260467529296875,
0.01434326171875,
0.0283966064453125,
-0.01392364501953125,
0.01078033447265625,
0.040374755859375,
-0.0248870849609375,
-0.010528564453125,
0.00865936279296875,
-0.0156707763671875,
0.0215301513671875,
0.0254974365234375,
0.007274627685546875,
0.0150299072265625,
-0.00527191162109375,
0.0031337738037109375,
0.017547607421875,
-0.019134521484375,
0.0150909423828125,
-0.00777435302734375,
0.004085540771484375,
-0.0034008026123046875,
-0.0423583984375,
-0.00560760498046875,
-0.025177001953125,
-0.01172637939453125,
0.0221405029296875,
-0.02130126953125,
-0.009033203125,
-0.0222015380859375,
0.019805908203125,
0.0246124267578125,
-0.043487548828125,
0.001468658447265625,
-0.021087646484375,
0.007244110107421875,
-0.0250244140625,
-0.01172637939453125,
0.007106781005859375,
0.000713348388671875,
-0.038177490234375,
0.01197052001953125,
0.044097900390625,
-0.0120086669921875,
-0.005718231201171875,
-0.0162811279296875,
-0.0341796875,
-0.002593994140625,
0.04656982421875,
-0.06671142578125,
-0.01265716552734375,
-0.0015764236450195312,
0.0418701171875,
-0.0421142578125,
0.01529693603515625,
-0.053680419921875,
0.0224456787109375,
-0.02593994140625,
-0.0091094970703125,
0.01184844970703125,
-0.01983642578125,
0.01042938232421875,
0.053131103515625,
0.0205078125,
-0.01045989990234375,
-0.0046539306640625,
0.00801849365234375,
-0.0040740966796875,
0.0025882720947265625,
-0.01163482666015625,
0.0045166015625,
-0.065185546875,
0.005401611328125,
0.0306243896484375,
0.0225067138671875,
0.02716064453125,
-0.0202789306640625,
0.017913818359375,
0.0158538818359375,
-0.038848876953125,
-0.06353759765625,
0.035125732421875,
-0.01123046875,
-0.005512237548828125,
0.0132293701171875,
-0.01367950439453125,
-0.0171051025390625,
0.00870513916015625,
-0.01161956787109375,
0.032196044921875,
-0.035919189453125,
-0.0654296875,
-0.0288848876953125,
-0.06805419921875,
-0.00543975830078125,
-0.0016040802001953125,
-0.00727081298828125,
0.0024566650390625,
0.058319091796875,
0.0017948150634765625,
-0.053375244140625,
0.00335693359375,
0.056976318359375,
0.00501251220703125,
0.0169677734375,
0.0053253173828125,
-0.04217529296875,
0.005107879638671875,
-0.00530242919921875,
0.011474609375,
0.016357421875,
-0.0034732818603515625,
0.005702972412109375,
-0.01486968994140625,
0.0169219970703125,
0.03619384765625,
-0.024505615234375,
-0.006633758544921875,
0.0251617431640625,
0.01922607421875,
-0.0257110595703125,
-0.01116180419921875,
0.017669677734375,
-0.002437591552734375,
-0.01380157470703125,
-0.043609619140625,
-0.002887725830078125,
-0.005992889404296875,
0.0294647216796875,
-0.005153656005859375,
-0.00295257568359375,
-0.0694580078125,
-0.00403594970703125,
0.0119171142578125,
0.0137481689453125,
0.0224151611328125,
0.0545654296875,
0.0242156982421875,
-0.0270843505859375,
-0.01271820068359375,
0.00495147705078125,
-0.001861572265625,
-0.01148223876953125,
-0.0106201171875,
-0.04022216796875,
-0.056060791015625,
0.048431396484375,
-0.041412353515625,
0.005138397216796875,
-0.0367431640625,
-0.02349853515625,
0.018524169921875,
0.1014404296875,
-0.0062103271484375,
-0.0258636474609375,
-0.0176239013671875,
0.010040283203125,
-0.0276336669921875,
-0.01328277587890625,
-0.01666259765625,
-0.024932861328125,
-0.11700439453125,
0.01007080078125,
0.004337310791015625,
-0.052978515625,
-0.01873779296875,
0.022125244140625,
-0.0833740234375,
-0.040130615234375,
0.0390625,
-0.0550537109375,
0.005527496337890625,
0.0260162353515625,
-0.013824462890625,
-0.00811004638671875,
-0.0287017822265625,
-0.00943756103515625,
-0.07489013671875,
-0.00524139404296875,
0.00966644287109375,
0.019073486328125,
-0.039794921875,
0.0272979736328125,
-0.02862548828125,
0.04913330078125,
-0.01004791259765625,
0.027130126953125,
0.0177154541015625,
0.035400390625,
0.0180206298828125,
-0.00849151611328125,
0.0102996826171875,
-0.033111572265625,
-0.0286865234375,
-0.02984619140625,
-0.00019288063049316406,
0.031646728515625,
-0.01153564453125,
0.0187225341796875,
-0.00391387939453125,
-0.01187896728515625,
-0.052734375,
-0.04644775390625,
-0.08038330078125,
-0.01177978515625,
-0.042266845703125,
-0.004940032958984375,
-0.038787841796875,
-0.0740966796875,
-0.016021728515625,
0.0254364013671875,
-0.027435302734375,
0.033416748046875,
0.03387451171875,
0.0268707275390625,
-0.0088958740234375,
-0.10150146484375,
-0.01220703125,
0.0165252685546875,
-0.0014486312866210938,
0.0028839111328125,
-0.01068878173828125,
-0.02545166015625,
0.027862548828125,
-0.01690673828125,
0.012115478515625,
0.0501708984375,
0.011810302734375,
0.0241241455078125,
-0.0281219482421875,
0.017913818359375,
0.0297698974609375,
-0.074462890625,
0.0290679931640625,
-0.01202392578125,
-0.040985107421875,
-0.019439697265625,
0.0626220703125,
-0.0263671875,
0.04241943359375,
-0.042266845703125,
-0.06903076171875,
0.043914794921875,
-0.05084228515625,
0.0041351318359375,
0.00264739990234375,
-0.016204833984375,
0.03216552734375,
-0.027374267578125,
0.033294677734375,
0.02947998046875,
0.0160675048828125,
-0.00820159912109375,
0.0595703125,
-0.00201416015625,
0.01605224609375,
0.03363037109375,
-0.021270751953125,
0.09539794921875,
0.02520751953125,
-0.0445556640625,
0.0184326171875,
-0.019500732421875,
-0.00453948974609375,
0.01318359375,
-0.032073974609375,
0.042083740234375,
0.0345458984375,
0.01141357421875,
0.007450103759765625,
-0.100830078125,
0.028717041015625,
-0.034637451171875,
-0.01416015625,
-0.0003001689910888672,
-0.0201873779296875,
-0.03375244140625,
0.0716552734375,
-0.023468017578125,
0.02838134765625,
-0.005855560302734375,
0.006740570068359375,
-0.01233673095703125,
0.01058197021484375,
0.0011186599731445312,
0.0149993896484375,
0.0228271484375,
-0.01546478271484375,
0.036834716796875,
-0.042327880859375,
-0.035064697265625,
-0.016143798828125,
0.019775390625,
-0.0418701171875,
-0.0102691650390625,
0.06378173828125,
0.02056884765625,
-0.01132965087890625,
0.0128173828125,
-0.0023097991943359375,
-0.0279541015625,
-0.01068878173828125,
-0.00606536865234375,
-0.005001068115234375,
-0.006229400634765625,
-0.0284271240234375,
0.035797119140625,
-0.029296875,
0.02716064453125,
-0.031524658203125,
0.01467132568359375,
0.00445556640625,
0.0037441253662109375,
-0.08349609375,
-0.01100921630859375,
0.041168212890625,
-0.056976318359375,
-0.04766845703125,
0.005710601806640625,
-0.0426025390625,
0.0180511474609375,
-0.01861572265625,
0.05859375,
-0.037750244140625,
-0.000713348388671875,
-0.032012939453125,
0.0132904052734375,
0.032501220703125,
0.0192413330078125,
-0.063720703125,
0.0115814208984375,
-0.053985595703125,
-0.00826263427734375,
-0.0215301513671875,
-0.0242462158203125,
-0.038848876953125,
-0.00565338134765625,
-0.0007557868957519531,
0.01453399658203125,
0.031158447265625,
-0.00804901123046875,
-0.002269744873046875,
-0.00013434886932373047,
-0.007663726806640625,
-0.0297698974609375,
-0.004779815673828125,
0.066162109375,
-0.01117706298828125,
0.058837890625,
0.01103973388671875,
0.018585205078125,
-0.03643798828125,
-0.026275634765625,
0.00005269050598144531,
-0.08612060546875,
-0.0294647216796875,
0.00467681884765625,
-0.061065673828125,
0.037109375,
0.025848388671875,
0.00440216064453125,
0.042236328125,
-0.01035308837890625,
0.005565643310546875,
0.001964569091796875,
-0.052001953125,
-0.0242767333984375,
0.002223968505859375,
0.01190185546875,
-0.0246734619140625,
0.0005412101745605469,
0.0318603515625,
-0.01349639892578125,
0.023162841796875,
-0.0067901611328125,
0.0241546630859375,
-0.00315093994140625,
-0.037811279296875,
0.02105712890625,
0.0252685546875,
0.03948974609375,
0.034820556640625,
0.0033092498779296875,
0.03485107421875,
-0.035919189453125,
0.01446533203125,
0.037841796875,
-0.05731201171875,
0.07891845703125,
0.0132293701171875,
-0.041961669921875,
0.065673828125,
-0.05035400390625,
-0.0142822265625,
-0.0199737548828125,
0.003063201904296875,
0.002841949462890625,
0.0164794921875,
0.0023441314697265625,
-0.0038166046142578125,
0.00075531005859375,
0.015960693359375,
-0.04193115234375,
-0.03265380859375,
-0.01971435546875,
-0.0439453125,
-0.038787841796875,
-0.01540374755859375,
0.00838470458984375,
-0.00934600830078125,
-0.017852783203125,
0.017730712890625,
0.0243682861328125,
0.01490020751953125,
0.010223388671875,
-0.0191650390625,
0.031646728515625,
-0.00841522216796875,
0.04266357421875,
-0.0238494873046875,
0.0274200439453125,
-0.01324462890625,
0.03326416015625,
-0.038360595703125,
-0.00039577484130859375,
0.0261383056640625,
-0.02581787109375,
0.0179595947265625,
0.0144195556640625,
0.0039520263671875,
-0.01491546630859375,
-0.01314544677734375,
-0.0640869140625,
0.03997802734375,
0.0249481201171875,
-0.0038433074951171875,
-0.002040863037109375,
-0.04473876953125,
-0.011993408203125,
-0.045745849609375,
0.031524658203125,
-0.027740478515625,
-0.03375244140625,
0.056732177734375,
-0.035797119140625,
0.0009202957153320312,
0.026092529296875,
0.068115234375,
-0.002254486083984375,
0.0164794921875,
0.065673828125,
-0.06695556640625,
-0.0467529296875,
0.05340576171875,
-0.012115478515625,
-0.027008056640625,
0.038818359375,
-0.034637451171875,
0.053863525390625,
-0.00830841064453125,
0.005123138427734375,
0.00879669189453125,
0.02178955078125,
-0.01494598388671875,
0.024810791015625,
-0.0270233154296875,
0.0318603515625,
-0.00536346435546875,
0.0311737060546875,
-0.09234619140625,
-0.024993896484375,
-0.0256805419921875,
0.067138671875,
0.01444244384765625,
-0.002292633056640625,
-0.0352783203125,
-0.01222991943359375,
0.04290771484375,
0.0496826171875,
0.0258941650390625,
0.0279693603515625,
0.02197265625,
0.032012939453125,
0.032867431640625,
-0.0089874267578125,
0.0428466796875,
-0.002285003662109375,
-0.0281829833984375,
0.046356201171875,
0.0101470947265625,
0.00684356689453125,
-0.019256591796875,
0.0217132568359375,
-0.0643310546875,
-0.011444091796875,
0.05035400390625,
-0.0168304443359375,
0.013275146484375,
0.041656494140625,
0.0251617431640625,
-0.00614166259765625,
-0.033905029296875,
-0.00865936279296875,
0.0443115234375,
0.0027008056640625,
0.035308837890625,
0.0291290283203125,
0.028045654296875,
0.033477783203125,
-0.0175933837890625,
0.0229949951171875,
0.0181732177734375,
-0.04632568359375,
0.045562744140625,
0.00940704345703125,
0.0213470458984375,
-0.04949951171875,
-0.0155487060546875,
0.048065185546875,
0.06256103515625,
-0.034576416015625,
-0.0400390625,
0.0112762451171875,
0.00907135009765625,
0.0204620361328125,
-0.003971099853515625,
0.01407623291015625,
0.04461669921875,
0.060699462890625,
-0.0516357421875,
-0.0180206298828125,
0.020355224609375,
0.032958984375,
-0.00473785400390625,
0.0013704299926757812,
-0.003475189208984375,
-0.058380126953125,
-0.00746917724609375,
0.00519561767578125,
0.023956298828125,
0.02581787109375,
-0.040191650390625,
0.06695556640625,
-0.0484619140625,
0.0013360977172851562,
0.01331329345703125,
0.02069091796875,
0.013763427734375,
-0.018096923828125,
0.004726409912109375,
-0.0124664306640625,
-0.026458740234375,
0.0097808837890625,
0.0205230712890625,
0.0188140869140625,
0.026031494140625,
0.051910400390625,
0.0205535888671875,
0.0027370452880859375,
0.0955810546875,
0.00409698486328125,
-0.04376220703125,
-0.049591064453125,
0.03350830078125,
0.050933837890625,
0.0254364013671875,
0.031280517578125,
-0.0038166046142578125,
0.06365966796875,
-0.0265045166015625,
0.043670654296875,
0.00206756591796875,
0.0027370452880859375,
0.0306243896484375,
-0.008697509765625,
0.0172271728515625,
0.007732391357421875,
-0.066650390625,
-0.00775909423828125,
-0.035980224609375,
-0.012054443359375,
0.0205535888671875,
0.0430908203125,
0.0269622802734375,
-0.01358795166015625,
-0.012298583984375,
-0.055419921875,
0.007350921630859375,
0.042236328125,
0.01073455810546875,
0.005352020263671875,
0.00391387939453125,
-0.02099609375,
-0.016632080078125,
0.00057220458984375,
0.03363037109375,
0.0018749237060546875,
-0.00292205810546875,
0.051605224609375,
-0.0037631988525390625,
0.0015287399291992188,
-0.06072998046875,
0.026275634765625,
-0.054656982421875,
-0.053070068359375,
0.06671142578125,
0.0189361572265625,
-0.017791748046875,
-0.004177093505859375,
-0.0516357421875,
0.02001953125,
0.035552978515625,
-0.0211181640625,
0.0020503997802734375,
-0.01373291015625,
0.0101470947265625,
-0.01995849609375,
0.07421875,
-0.00908660888671875,
-0.01241302490234375,
-0.050537109375,
-0.057525634765625,
0.056976318359375,
0.0562744140625,
-0.0013265609741210938,
0.0238189697265625,
-0.00974273681640625,
-0.04449462890625,
0.044830322265625,
-0.06610107421875,
0.07623291015625,
0.032806396484375,
-0.0020961761474609375,
-0.007030487060546875,
0.038970947265625,
-0.0168304443359375,
0.0238189697265625,
0.01006317138671875,
0.026702880859375,
0.0271759033203125,
-0.04119873046875,
0.0011386871337890625,
-0.01258087158203125,
0.033355712890625,
-0.018402099609375,
-0.0006208419799804688,
-0.007686614990234375,
0.007297515869140625,
-0.0277862548828125,
-0.056884765625,
-0.045379638671875,
-0.0200958251953125,
0.0183258056640625,
0.032745361328125,
0.0250701904296875,
0.007175445556640625,
-0.037811279296875,
-0.0073394775390625,
0.055084228515625,
0.01389312744140625,
-0.010528564453125,
-0.004405975341796875,
-0.005496978759765625,
-0.0010042190551757812,
0.042449951171875,
-0.0065460205078125,
0.00565338134765625,
0.01727294921875,
-0.0079803466796875,
0.0210418701171875,
-0.01180267333984375,
-0.00739288330078125,
0.01183319091796875,
-0.0030651092529296875,
-0.0048065185546875,
-0.011474609375,
-0.0036907196044921875,
0.002925872802734375,
0.02001953125,
0.03265380859375,
0.04937744140625,
-0.01517486572265625,
-0.00998687744140625,
0.00922393798828125,
-0.03857421875,
-0.037109375,
0.053314208984375,
-0.06890869140625,
-0.03997802734375,
0.0225982666015625,
0.0124053955078125,
0.048583984375,
-0.0194854736328125,
-0.057830810546875,
0.03216552734375,
-0.0036106109619140625,
-0.0400390625,
0.004947662353515625,
-0.01015472412109375,
0.003849029541015625,
-0.0069732666015625,
0.01227569580078125,
-0.0178680419921875,
-0.037261962890625,
-0.0015897750854492188,
0.0238189697265625,
0.039886474609375,
0.0020313262939453125,
0.04364013671875,
-0.064453125,
0.0232086181640625,
-0.01337432861328125,
0.0166015625,
-0.0423583984375,
0.0177459716796875,
-0.0007510185241699219,
0.015777587890625,
-0.024810791015625,
0.0067138671875,
0.0295562744140625,
0.036865234375,
0.004505157470703125,
-0.055267333984375,
-0.018341064453125,
-0.02398681640625,
0.027557373046875,
0.011566162109375,
0.004451751708984375,
-0.01461029052734375,
-0.0306243896484375,
-0.01282501220703125,
-0.02783203125,
-0.016937255859375,
0.034027099609375,
-0.08978271484375,
-0.0238037109375,
0.0175933837890625,
-0.004131317138671875,
0.0265350341796875,
-0.03216552734375,
-0.029754638671875,
-0.00394439697265625,
-0.00728607177734375,
0.0178070068359375,
-0.07275390625,
0.00832366943359375,
-0.036865234375,
-0.0191650390625,
-0.0638427734375,
-0.0261383056640625,
0.009490966796875,
-0.0772705078125,
-0.03570556640625,
-0.048187255859375,
0.00003933906555175781,
0.0221710205078125,
0.0080718994140625,
0.0015707015991210938,
0.0004055500030517578,
0.0308380126953125,
0.047760009765625,
-0.0307159423828125,
0.0172271728515625,
-0.0014247894287109375,
0.0133209228515625,
-0.01323699951171875,
0.0570068359375,
0.039398193359375,
0.035736083984375,
-0.02618408203125,
0.09478759765625,
-0.00421905517578125,
0.0225982666015625,
-0.0276947021484375,
0.006992340087890625,
0.019287109375,
-0.0193328857421875,
0.019744873046875,
-0.02099609375,
0.00466156005859375,
0.006320953369140625,
-0.00848388671875,
0.0208282470703125,
-0.01479339599609375,
0.01023101806640625
] |
ba95e3928823d56c63203fe943716b8eafd7902b
|
Wordpress Stackexchange
Q: Setting up a wordpress network with third level domains I've been looking into setting up a WordPress network install. Everything has been going pretty smoothly until I get to the point where my desired domain layout doesn't fit well.
I would like to have a layout as follows:
blog.*.stackexchange.com
so for example, I would like to have multiple sites in a network that look like:
blog.wordpress.stackexchange.com
blog.apple.stackexchange.com
blog.$site.stackexchange.com
I think I could get this working with some creative re-write rules, and manual DNS intervention but I'd rather have a setup where I can hand off the creation of everything but the DNS to someone else (we already have a process for automatically creating all sub-domains needed in DNS)
From my playing around and reading WP really wants the sites to be the next level domain, so in my above example, it wants the main WP blog to be at stackexchange.com and the network blogs to be at wordpress.stackexchange.com.
Is there any way to achieve my desired effect or should I just go the route of doing blog.stackexchange.com/$site ?
A: You could use the Domain Mapper plugin for this. Drawback being that you'd have manually configure each subblog.
|
Q: Setting up a wordpress network with third level domains I've been looking into setting up a WordPress network install. Everything has been going pretty smoothly until I get to the point where my desired domain layout doesn't fit well.
I would like to have a layout as follows:
blog.*.stackexchange.com
so for example, I would like to have multiple sites in a network that look like:
blog.wordpress.stackexchange.com
blog.apple.stackexchange.com
blog.$site.stackexchange.com
I think I could get this working with some creative re-write rules, and manual DNS intervention but I'd rather have a setup where I can hand off the creation of everything but the DNS to someone else (we already have a process for automatically creating all sub-domains needed in DNS)
From my playing around and reading WP really wants the sites to be the next level domain, so in my above example, it wants the main WP blog to be at stackexchange.com and the network blogs to be at wordpress.stackexchange.com.
Is there any way to achieve my desired effect or should I just go the route of doing blog.stackexchange.com/$site ?
A: You could use the Domain Mapper plugin for this. Drawback being that you'd have manually configure each subblog.
A: You could do this with a customized sunrise.php file. This is essentially how the domain mapping plugin works, however it puts a pretty front end on it. For something custom, you can write some simple PHP to do basically the same thing.
The essence of multisite involves figuring out what site to serve. The Domain mapping plugin does this by creating a wp_domain_mapping table, and storing the information in there. Thus when it gets a request for xxx.com, it looks in that table and sees that that corresponds to blog_id 123.
First, make a WordPress setup, and make it multisite. Doesn't matter where it really lives, because we're going to change all that. For simplicity, I'd put it at blog.stackexchange.com and make it a subdirectory type site (those are easier). The subdirectories created would likely be the slugs. /wordpress, /apple, /whatever.
So yes, to start with, you are indeed making it live at blog.stackexchange.com/wordpress. Consider this your staging environment. When you create each site, you can do stuff to it here until you decide to turn on the mapping.
To do domain mapping yourself, without the plugin, you'd do something like this:
Step one: add define( 'SUNRISE', 'on' ); to the top of your wp-config.php file.
Step two: create a sunrise.php file in the wp-content directory. Put <?php at the top to start with.
Step three: In the sunrise.php file is going to be your logic for determining what site to load.
You're going to base this on the $_SERVER[ 'HTTP_HOST' ] variable. How you do that exactly is easy: however you want to do it. If you want to just write a regex to look for '/blog\.(.*)\.stackexchange\.com/' and then look for that bit in the database, you can do that.
Since you're using the same slug here as the "subdirectory", you don't need a separate table. You can just look in the main wp_blogs table to find the site you need. Something similar to this:
$current_blog = $wpdb->get_var( "SELECT blog_id FROM {$wpdb->blogs} WHERE path = '/wordpress/' LIMIT 1" );
Once you have the $current_blog, then you need the following code:
$current_blog->domain = $_SERVER[ 'HTTP_HOST' ];
$current_blog->path = '/';
$blog_id = $current_blog->blog_id;
$site_id = $current_blog->site_id;
$current_site = $wpdb->get_row( "SELECT * from {$wpdb->site} WHERE id = '{$current_blog->site_id}' LIMIT 0,1" );
$current_site->blog_id = $current_blog->blog_id;
This pre-defines the $current_blog and $current_site global variables instead of letting WordPress' MU functions do it.
This would be enough to get the site up and working (after getting your DNS to point to it and getting the virtual hosting stuff sorted out), however most of the static URLs used in the HTML code would still point to blog.stackexchange.com/wordpress, since that's where the site would really be. Also, the Canonical URL function would probably not like the URL and would redirect you too.
To remedy these problems, you'd also likely want to pre-define several of the URLs associated with the site. Things like WP_SITEURL and WP_HOME. Also, WP_CONTENT_URL, WP_PLUGIN_URL, and WPMU_PLUGIN_URL. That should cover most cases of the URLs being adjusted.
Finally, you'll want to set the 'COOKIE_DOMAIN'. Since you likely want logins to be shared across the whole of the thing, you can set it to stackexchange.com, or even higher if you don't want them to be shared logins.
If you want to talk about integrating the normal stackexchange login system into WordPress, I can answer questions on that too, but it would be a bit more detailed of an answer. :)
Feel free to email me if you want more help with this. Glad to assist: otto at wordpress.org.
|
wordpress
|
{
"language": "en",
"length": 792,
"provenance": "stackexchange_00019.jsonl.gz:407849",
"question_score": "11",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12343"
}
|
[
0.0243377685546875,
-0.0032215118408203125,
0.0005311965942382812,
0.0218048095703125,
-0.019073486328125,
-0.03607177734375,
0.048004150390625,
-0.037353515625,
0.00151824951171875,
0.0031890869140625,
-0.026763916015625,
0.0209197998046875,
-0.0300140380859375,
-0.0189971923828125,
0.0115966796875,
-0.0284576416015625,
0.04461669921875,
-0.03948974609375,
0.01360321044921875,
-0.00891876220703125,
-0.006328582763671875,
0.00571441650390625,
0.037750244140625,
0.0232086181640625,
0.02374267578125,
-0.061767578125,
0.106689453125,
-0.0050811767578125,
0.01580810546875,
-0.0197906494140625,
0.0281829833984375,
-0.023895263671875,
0.0159454345703125,
-0.00014829635620117188,
0.0205841064453125,
0.00591278076171875,
0.008026123046875,
0.002040863037109375,
0.0266571044921875,
0.0008115768432617188,
-0.00650787353515625,
0.0042266845703125,
0.087158203125,
0.01261138916015625,
0.04888916015625,
-0.056610107421875,
0.02764892578125,
-0.08380126953125,
0.0216217041015625,
0.00815582275390625,
-0.0100860595703125,
0.0396728515625,
0.0108642578125,
0.01152801513671875,
-0.018463134765625,
-0.02545166015625,
0.0193634033203125,
0.001895904541015625,
0.017120361328125,
-0.045196533203125,
-0.01641845703125,
0.0128936767578125,
0.02960205078125,
0.047271728515625,
-0.0198822021484375,
-0.0136871337890625,
0.0167388916015625,
-0.0000768899917602539,
-0.01259613037109375,
-0.004299163818359375,
0.04400634765625,
-0.0033721923828125,
0.01525115966796875,
-0.008026123046875,
-0.0191802978515625,
-0.01168060302734375,
0.0298004150390625,
0.012481689453125,
0.01361083984375,
-0.0270233154296875,
0.0136871337890625,
-0.01126861572265625,
-0.03411865234375,
-0.045074462890625,
0.032318115234375,
-0.0210723876953125,
0.00634002685546875,
-0.003887176513671875,
-0.038330078125,
-0.0007824897766113281,
-0.0352783203125,
-0.0347900390625,
0.006168365478515625,
0.014251708984375,
-0.02325439453125,
0.00429534912109375,
0.00893402099609375,
0.018463134765625,
-0.027679443359375,
-0.0249786376953125,
-0.00685882568359375,
-0.012725830078125,
-0.0183563232421875,
-0.007701873779296875,
-0.00566864013671875,
0.0322265625,
0.0091094970703125,
0.001331329345703125,
0.04779052734375,
0.025054931640625,
0.0048065185546875,
0.0302581787109375,
-0.00220489501953125,
-0.0047760009765625,
-0.052734375,
-0.01751708984375,
-0.035125732421875,
-0.01727294921875,
0.007297515869140625,
-0.01183319091796875,
-0.0124969482421875,
0.04107666015625,
-0.0276947021484375,
0.00995635986328125,
-0.01468658447265625,
-0.0006799697875976562,
0.03985595703125,
-0.04388427734375,
-0.050567626953125,
-0.0286407470703125,
-0.018035888671875,
0.05078125,
0.051788330078125,
0.03216552734375,
-0.00791168212890625,
0.01256561279296875,
0.042572021484375,
0.00447845458984375,
0.0110015869140625,
-0.02142333984375,
0.048126220703125,
0.0111083984375,
-0.01983642578125,
0.00862884521484375,
-0.021392822265625,
0.07513427734375,
0.0203399658203125,
-0.020751953125,
-0.019561767578125,
-0.068115234375,
-0.0021648406982421875,
-0.040802001953125,
0.03277587890625,
0.0101470947265625,
-0.0015325546264648438,
-0.060821533203125,
0.01477813720703125,
-0.038177490234375,
0.0173797607421875,
-0.05328369140625,
-0.013824462890625,
0.0177154541015625,
0.041839599609375,
-0.042755126953125,
-0.034881591796875,
-0.040435791015625,
-0.03350830078125,
-0.0018014907836914062,
0.022705078125,
-0.06646728515625,
0.041534423828125,
0.0149993896484375,
0.0258331298828125,
-0.005931854248046875,
0.018096923828125,
0.0005726814270019531,
0.033843994140625,
-0.016632080078125,
-0.0240631103515625,
0.076171875,
0.01995849609375,
-0.034088134765625,
-0.0094146728515625,
0.008056640625,
-0.03582763671875,
0.0184173583984375,
-0.0047607421875,
0.034027099609375,
0.027801513671875,
0.02349853515625,
0.00974273681640625,
-0.0181884765625,
-0.0516357421875,
0.027587890625,
-0.01554107666015625,
-0.021881103515625,
0.037933349609375,
0.0287322998046875,
-0.006450653076171875,
-0.033538818359375,
-0.08349609375,
0.040771484375,
-0.02911376953125,
0.0823974609375,
0.08685302734375,
0.0006804466247558594,
0.0241546630859375,
0.00688934326171875,
0.075927734375,
-0.016082763671875,
-0.033477783203125,
-0.0313720703125,
0.0484619140625,
-0.0914306640625,
-0.08453369140625,
0.061279296875,
-0.018829345703125,
0.0074462890625,
-0.020355224609375,
0.0075531005859375,
-0.02264404296875,
0.004299163818359375,
-0.029937744140625,
-0.003246307373046875,
0.05767822265625,
-0.02081298828125,
-0.025970458984375,
-0.042724609375,
-0.0183563232421875,
0.0287017822265625,
-0.118408203125,
0.0389404296875,
0.00940704345703125,
0.036529541015625,
-0.0222625732421875,
0.0009398460388183594,
0.02105712890625,
0.0140838623046875,
0.0160369873046875,
0.0149688720703125,
0.0161590576171875,
0.0166168212890625,
-0.02191162109375,
-0.029022216796875,
-0.005950927734375,
-0.07635498046875,
-0.007617950439453125,
-0.01229095458984375,
0.01251983642578125,
0.11328125,
-0.0156402587890625,
0.0399169921875,
-0.0260009765625,
-0.00806427001953125,
-0.03179931640625,
0.04779052734375,
-0.0122528076171875,
-0.0260162353515625,
0.0167694091796875,
-0.0195159912109375,
0.0299530029296875,
0.005962371826171875,
-0.03948974609375,
0.00833892822265625,
0.04437255859375,
0.00372314453125,
0.0294952392578125,
0.036590576171875,
-0.007526397705078125,
-0.01056671142578125,
0.0021610260009765625,
-0.0242462158203125,
0.0033588409423828125,
0.00969696044921875,
0.0176544189453125,
0.00611114501953125,
-0.03741455078125,
0.005748748779296875,
-0.0018186569213867188,
0.006427764892578125,
-0.0211639404296875,
0.02496337890625,
-0.0194549560546875,
-0.0249176025390625,
-0.0088653564453125,
-0.00910186767578125,
0.004138946533203125,
-0.0216522216796875,
-0.0230560302734375,
-0.0276947021484375,
0.008087158203125,
0.00677490234375,
-0.01861572265625,
0.0191802978515625,
-0.01125335693359375,
-0.022491455078125,
0.0004940032958984375,
-0.078369140625,
0.06402587890625,
-0.06964111328125,
0.010650634765625,
0.06341552734375,
0.0009007453918457031,
-0.00951385498046875,
-0.0017871856689453125,
-0.0015039443969726562,
0.00917816162109375,
-0.0203094482421875,
-0.01418304443359375,
0.0032482147216796875,
-0.0567626953125,
-0.006351470947265625,
0.01030731201171875,
-0.0145416259765625,
-0.0120849609375,
-0.0214080810546875,
-0.011505126953125,
-0.006015777587890625,
-0.04547119140625,
0.0032787322998046875,
0.049041748046875,
-0.039215087890625,
0.006999969482421875,
-0.00859832763671875,
-0.041229248046875,
-0.039337158203125,
0.0296630859375,
-0.0009322166442871094,
0.0274200439453125,
-0.04620361328125,
-0.07269287109375,
-0.06011962890625,
-0.087890625,
-0.0017414093017578125,
0.0018672943115234375,
0.00331878662109375,
0.0010585784912109375,
-0.005748748779296875,
-0.0113372802734375,
-0.0284881591796875,
0.0180816650390625,
0.0478515625,
0.0018672943115234375,
-0.008544921875,
-0.0143280029296875,
-0.023773193359375,
-0.01355743408203125,
0.003505706787109375,
0.0195770263671875,
0.00047779083251953125,
-0.0028781890869140625,
-0.01299285888671875,
0.0145263671875,
-0.0298309326171875,
0.009033203125,
-0.03619384765625,
-0.0157928466796875,
-0.006671905517578125,
-0.017913818359375,
-0.045654296875,
0.0006384849548339844,
-0.0115509033203125,
-0.03533935546875,
0.00998687744140625,
0.019195556640625,
-0.020355224609375,
-0.014556884765625,
-0.006420135498046875,
-0.00957489013671875,
-0.002166748046875,
0.0195465087890625,
-0.037994384765625,
0.0443115234375,
0.0024013519287109375,
-0.00879669189453125,
-0.01324462890625,
0.004642486572265625,
-0.0416259765625,
-0.035430908203125,
-0.0418701171875,
-0.032958984375,
-0.0445556640625,
0.0019235610961914062,
-0.05474853515625,
-0.0224761962890625,
0.039031982421875,
-0.042327880859375,
0.025970458984375,
-0.051483154296875,
-0.03045654296875,
-0.0186309814453125,
0.0877685546875,
-0.065185546875,
-0.0013971328735351562,
-0.0100555419921875,
0.0198822021484375,
-0.0243682861328125,
-0.037506103515625,
-0.056304931640625,
-0.006137847900390625,
-0.038787841796875,
0.00124359130859375,
-0.022552490234375,
-0.005615234375,
0.0268402099609375,
-0.005096435546875,
0.036407470703125,
-0.04888916015625,
0.01113128662109375,
-0.02264404296875,
-0.0083770751953125,
-0.0249786376953125,
0.004322052001953125,
-0.05029296875,
0.0177459716796875,
-0.0238037109375,
-0.06646728515625,
-0.0293731689453125,
0.0195465087890625,
0.0328369140625,
-0.022308349609375,
-0.013214111328125,
-0.0261688232421875,
0.031005859375,
-0.0272979736328125,
-0.026519775390625,
0.01093292236328125,
0.034088134765625,
-0.0266571044921875,
0.0278472900390625,
-0.00748443603515625,
-0.00945281982421875,
-0.0157318115234375,
-0.04071044921875,
-0.06109619140625,
-0.022064208984375,
-0.0012235641479492188,
0.0182952880859375,
0.040618896484375,
-0.0206756591796875,
-0.03485107421875,
-0.00817108154296875,
0.004154205322265625,
0.0343017578125,
0.00107574462890625,
-0.000957489013671875,
-0.0269622802734375,
-0.035675048828125,
0.0036830902099609375,
0.018035888671875,
-0.01155853271484375,
0.01531982421875,
0.060760498046875,
0.020843505859375,
-0.0144500732421875,
-0.026641845703125,
-0.005275726318359375,
0.031982421875,
-0.00957489013671875,
0.0271148681640625,
0.0191192626953125,
-0.0146331787109375,
0.02020263671875,
0.0052032470703125,
0.0218505859375,
0.037322998046875,
-0.047149658203125,
0.024383544921875,
-0.01346588134765625,
0.0026683807373046875,
0.03399658203125,
-0.033416748046875,
-0.004070281982421875,
-0.0280303955078125,
0.00574493408203125,
-0.018707275390625,
0.041412353515625,
-0.0075225830078125,
0.026947021484375,
-0.04345703125,
-0.037933349609375,
0.020782470703125,
-0.03662109375,
0.031280517578125,
-0.01383209228515625,
0.012939453125,
0.00431060791015625,
0.0002741813659667969,
-0.0171051025390625,
0.047943115234375,
0.0023040771484375,
0.034576416015625,
0.0028209686279296875,
0.046478271484375,
-0.0222015380859375,
0.0090179443359375,
-0.03948974609375,
0.1614990234375,
0.034881591796875,
-0.0546875,
0.07330322265625,
-0.03863525390625,
0.031646728515625,
0.01471710205078125,
-0.0215911865234375,
0.0288543701171875,
0.0197601318359375,
-0.0212860107421875,
-0.00899505615234375,
-0.04833984375,
-0.0182952880859375,
-0.059478759765625,
-0.00501251220703125,
0.005786895751953125,
-0.0017852783203125,
0.0165863037109375,
0.05963134765625,
0.00003784894943237305,
0.0362548828125,
-0.0132904052734375,
0.01534271240234375,
0.062225341796875,
0.0039215087890625,
0.0283203125,
0.019744873046875,
-0.0276031494140625,
0.0018367767333984375,
0.0232086181640625,
-0.026611328125,
-0.00624847412109375,
0.0267181396484375,
0.045654296875,
0.0164947509765625,
-0.014404296875,
-0.01522064208984375,
-0.035430908203125,
0.0093841552734375,
0.0020961761474609375,
-0.0260467529296875,
-0.018890380859375,
-0.004016876220703125,
-0.01314544677734375,
0.01468658447265625,
-0.042724609375,
0.010284423828125,
-0.041656494140625,
-0.00078582763671875,
-0.0214080810546875,
-0.01352691650390625,
-0.028594970703125,
0.010009765625,
0.0149383544921875,
-0.045623779296875,
0.006465911865234375,
0.022186279296875,
-0.0860595703125,
-0.07110595703125,
0.015411376953125,
-0.00295257568359375,
0.0303802490234375,
-0.047637939453125,
0.01629638671875,
-0.02423095703125,
0.0118408203125,
-0.046661376953125,
0.0367431640625,
-0.031463623046875,
-0.006763458251953125,
-0.043304443359375,
-0.00691986083984375,
0.00299072265625,
-0.0262451171875,
-0.00418853759765625,
-0.0032501220703125,
-0.055419921875,
0.0017032623291015625,
0.032928466796875,
0.02642822265625,
0.0025997161865234375,
-0.059295654296875,
-0.00980377197265625,
-0.0202789306640625,
0.0153350830078125,
-0.0352783203125,
-0.0153961181640625,
0.033050537109375,
-0.00921630859375,
0.04010009765625,
0.006900787353515625,
0.0153350830078125,
0.0003025531768798828,
-0.0264434814453125,
0.0125579833984375,
-0.05853271484375,
-0.052398681640625,
0.0128326416015625,
-0.0859375,
0.048248291015625,
0.0579833984375,
-0.01395416259765625,
-0.0017061233520507812,
-0.0182037353515625,
0.009765625,
-0.01003265380859375,
-0.017181396484375,
-0.007106781005859375,
0.006206512451171875,
0.01947021484375,
-0.0019474029541015625,
0.0307464599609375,
-0.025848388671875,
-0.0229034423828125,
-0.01690673828125,
0.01398468017578125,
-0.016510009765625,
0.04046630859375,
-0.039794921875,
0.017852783203125,
0.020782470703125,
0.0261383056640625,
0.036529541015625,
-0.010955810546875,
0.00806427001953125,
-0.00395965576171875,
-0.0146484375,
0.00284576416015625,
-0.0162353515625,
0.018768310546875,
-0.01526641845703125,
0.0033473968505859375,
0.0190277099609375,
-0.033935546875,
-0.00794219970703125,
0.066650390625,
0.037933349609375,
-0.0880126953125,
-0.010009765625,
0.0012025833129882812,
-0.0139617919921875,
-0.0181121826171875,
-0.0106048583984375,
0.0190582275390625,
0.0382080078125,
0.00534820556640625,
-0.05450439453125,
-0.040618896484375,
-0.0179901123046875,
-0.0275115966796875,
-0.0179595947265625,
0.005161285400390625,
0.0615234375,
0.0310211181640625,
0.033905029296875,
-0.02203369140625,
-0.02044677734375,
0.0150299072265625,
-0.005573272705078125,
-0.00971221923828125,
0.0166168212890625,
-0.032318115234375,
-0.0355224609375,
0.0202484130859375,
-0.022216796875,
0.002254486083984375,
-0.0145263671875,
-0.03387451171875,
-0.01221466064453125,
0.05792236328125,
-0.0635986328125,
0.0240020751953125,
0.0292816162109375,
-0.0294189453125,
0.045684814453125,
-0.0189361572265625,
0.0200347900390625,
-0.0173187255859375,
-0.0297698974609375,
-0.00693511962890625,
-0.0186004638671875,
-0.019256591796875,
-0.0264129638671875,
-0.002208709716796875,
0.07830810546875,
0.0201416015625,
-0.038482666015625,
0.0296783447265625,
0.032135009765625,
-0.037994384765625,
-0.0274810791015625,
0.0113983154296875,
-0.06671142578125,
-0.034637451171875,
-0.00901031494140625,
-0.010406494140625,
0.004146575927734375,
-0.0230560302734375,
-0.036834716796875,
0.048187255859375,
-0.0186614990234375,
-0.0008192062377929688,
0.019012451171875,
0.0177154541015625,
-0.0284423828125,
0.0094451904296875,
-0.00943756103515625,
-0.0005869865417480469,
-0.00397491455078125,
0.0275726318359375,
-0.019134521484375,
-0.0191802978515625,
0.00734710693359375,
0.06353759765625,
-0.028076171875,
0.00039315223693847656,
-0.017974853515625,
-0.00789642333984375,
-0.034454345703125,
-0.0007944107055664062,
-0.003162384033203125,
0.035980224609375,
-0.01476287841796875,
0.0207061767578125,
-0.00019681453704833984,
-0.01000213623046875,
0.031829833984375,
-0.0201873779296875,
-0.0494384765625,
-0.0019817352294921875,
0.007659912109375,
-0.0133514404296875,
0.0258636474609375,
0.0399169921875,
-0.06329345703125,
0.0183258056640625,
0.05194091796875,
-0.0184478759765625,
0.06829833984375,
-0.0235443115234375,
0.01548004150390625,
0.036895751953125,
0.02557373046875,
-0.002288818359375,
0.0347900390625,
-0.00975799560546875,
0.006683349609375,
0.031585693359375,
0.02655029296875,
0.05914306640625,
0.0024204254150390625,
0.007289886474609375,
0.0239105224609375,
-0.0120086669921875,
0.047607421875,
0.01418304443359375,
0.03643798828125,
-0.058013916015625,
-0.048431396484375,
0.0262298583984375,
0.0634765625,
-0.0262298583984375,
-0.04876708984375,
0.005825042724609375,
0.0198822021484375,
0.05096435546875,
-0.00664520263671875,
0.048828125,
-0.012451171875,
0.01617431640625,
-0.00255584716796875,
-0.004383087158203125,
0.0208587646484375,
0.0014410018920898438,
0.00937652587890625,
0.032257080078125,
-0.01495361328125,
0.0165557861328125,
0.01788330078125,
-0.0253753662109375,
0.0021724700927734375,
0.0550537109375,
0.004238128662109375,
0.057708740234375,
-0.093994140625,
-0.01690673828125,
0.003093719482421875,
0.00469207763671875,
-0.00968170166015625,
-0.005702972412109375,
-0.0079498291015625,
-0.036895751953125,
0.00994873046875,
0.02178955078125,
0.01227569580078125,
0.042755126953125,
0.0709228515625,
0.0604248046875,
-0.03118896484375,
0.00804901123046875,
0.05499267578125,
-0.022705078125,
0.023712158203125,
-0.02899169921875,
-0.00968170166015625,
0.00904083251953125,
-0.0240325927734375,
-0.007114410400390625,
-0.0027866363525390625,
0.0300140380859375,
-0.003383636474609375,
0.019287109375,
0.004085540771484375,
-0.0063629150390625,
0.005718231201171875,
-0.02392578125,
0.0227508544921875,
0.019683837890625,
-0.063720703125,
-0.0289459228515625,
-0.0023345947265625,
0.0184326171875,
0.0200042724609375,
0.0357666015625,
0.01049041748046875,
-0.00023221969604492188,
-0.00998687744140625,
-0.0543212890625,
0.0101470947265625,
0.0552978515625,
-0.0106353759765625,
0.04852294921875,
0.0199737548828125,
-0.007671356201171875,
-0.043853759765625,
-0.022735595703125,
-0.020721435546875,
0.02978515625,
0.0124359130859375,
0.0853271484375,
-0.0227813720703125,
0.02545166015625,
-0.0092315673828125,
0.00220489501953125,
0.0137176513671875,
-0.0069427490234375,
-0.00417327880859375,
0.01800537109375,
0.01184844970703125,
-0.016387939453125,
-0.01430511474609375,
0.00655364990234375,
0.0135040283203125,
-0.039947509765625,
0.0045623779296875,
-0.029052734375,
0.0196075439453125,
-0.0090789794921875,
0.0081329345703125,
-0.03717041015625,
-0.09197998046875,
-0.0938720703125,
0.01349639892578125,
0.01515960693359375,
0.03131103515625,
-0.038238525390625,
0.052764892578125,
-0.01434326171875,
0.0164031982421875,
0.0090789794921875,
-0.03338623046875,
0.003299713134765625,
0.015716552734375,
-0.01983642578125,
-0.029449462890625,
0.0751953125,
-0.001743316650390625,
0.01551055908203125,
-0.0037441253662109375,
0.057586669921875,
0.025115966796875,
-0.06024169921875,
0.0009918212890625,
0.0115966796875,
0.01488494873046875,
-0.037933349609375,
0.0005106925964355469,
0.0223541259765625,
-0.00606536865234375,
0.01433563232421875,
-0.0037097930908203125,
-0.0274810791015625,
0.01218414306640625,
-0.01230621337890625,
0.0046234130859375,
0.0204315185546875,
-0.045318603515625,
-0.050506591796875,
0.0036468505859375,
0.034942626953125,
0.0084075927734375,
-0.039398193359375,
0.0262298583984375,
-0.02838134765625,
0.047210693359375,
-0.01201629638671875,
0.0157012939453125,
-0.0168609619140625,
-0.0345458984375,
-0.0421142578125,
-0.0178070068359375,
-0.034759521484375,
0.0302276611328125,
-0.011444091796875,
0.0280609130859375,
0.035491943359375,
-0.0164794921875,
0.0034809112548828125,
0.02081298828125,
0.00634002685546875,
0.07366943359375,
-0.022247314453125,
0.00710296630859375,
0.028228759765625,
-0.025238037109375,
-0.0301361083984375,
-0.033203125,
0.026824951171875,
-0.09356689453125,
-0.02569580078125,
-0.02032470703125,
0.004810333251953125,
0.0011920928955078125,
-0.032470703125,
-0.01551055908203125,
0.04962158203125,
0.0026760101318359375,
-0.01093292236328125,
-0.0491943359375,
0.014495849609375,
-0.02056884765625,
0.052215576171875,
-0.00409698486328125,
0.00482177734375,
-0.00408172607421875,
0.0230255126953125,
0.0154571533203125,
0.044586181640625,
-0.02117919921875,
0.0096588134765625,
0.017822265625,
0.0628662109375,
0.06890869140625,
0.0008378028869628906,
0.04180908203125,
-0.019073486328125,
0.03167724609375,
0.0548095703125,
-0.051300048828125,
-0.00814056396484375,
-0.01302337646484375,
0.0118865966796875,
0.0008740425109863281,
-0.0258026123046875,
-0.0284881591796875,
-0.006923675537109375,
0.06671142578125,
0.028167724609375,
0.0263824462890625,
-0.035491943359375,
-0.01146697998046875,
-0.0233154296875,
-0.0237274169921875,
-0.0091094970703125,
0.021087646484375,
-0.0657958984375,
0.00366973876953125,
0.01554107666015625,
-0.004573822021484375,
-0.0357666015625,
0.01151275634765625,
-0.031524658203125,
-0.00325775146484375,
0.023162841796875,
0.01739501953125,
-0.012237548828125,
-0.0267333984375,
0.06317138671875,
-0.039581298828125,
-0.034576416015625,
0.009185791015625,
0.023712158203125,
-0.0194854736328125,
-0.01024627685546875,
0.0032749176025390625,
0.0135040283203125,
-0.05267333984375,
0.0194244384765625,
0.00017201900482177734,
0.027130126953125,
-0.053253173828125,
-0.01177978515625,
-0.0166473388671875,
0.01322174072265625,
0.020965576171875,
0.0163726806640625,
-0.0139312744140625,
0.00814056396484375,
0.01117706298828125,
-0.0037860870361328125,
0.00725555419921875,
0.02642822265625,
-0.00666046142578125,
0.050811767578125,
-0.0546875,
-0.007770538330078125,
-0.044281005859375,
-0.028472900390625,
0.0045623779296875,
0.003925323486328125,
0.0100555419921875,
-0.033233642578125,
0.01290130615234375,
0.0007467269897460938,
0.0103607177734375,
0.00921630859375
] |
4416188aa1e62c324e35e62989c8b101a2b910d8
|
Wordpress Stackexchange
Q: RSS Subscriber count without using FeedBurner I have a blog which is running on WordPress and I want to know how many users subscribe to my feeds. I know that if I used FeedBurner, I can get the counter from there. Is there any other way that I can track the subscribers easily?
A: This is more of a wordpress question, but the Feed Statistics plugin may do what you need.
|
Q: RSS Subscriber count without using FeedBurner I have a blog which is running on WordPress and I want to know how many users subscribe to my feeds. I know that if I used FeedBurner, I can get the counter from there. Is there any other way that I can track the subscribers easily?
A: This is more of a wordpress question, but the Feed Statistics plugin may do what you need.
|
wordpress
|
{
"language": "en",
"length": 72,
"provenance": "stackexchange_00019.jsonl.gz:407854",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12365"
}
|
[
0.0277099609375,
0.030181884765625,
-0.013458251953125,
0.0217437744140625,
0.0258026123046875,
-0.045745849609375,
0.06219482421875,
-0.0626220703125,
0.0232086181640625,
-0.00995635986328125,
-0.050689697265625,
-0.0234527587890625,
-0.048583984375,
-0.01483154296875,
-0.0089874267578125,
-0.069091796875,
0.05242919921875,
-0.025115966796875,
0.03607177734375,
0.004405975341796875,
-0.00405120849609375,
0.03619384765625,
0.04986572265625,
0.029632568359375,
0.0017299652099609375,
0.0176239013671875,
0.04302978515625,
-0.0012617111206054688,
-0.00896453857421875,
-0.01073455810546875,
0.0164337158203125,
-0.0110321044921875,
0.0087890625,
0.0302581787109375,
-0.02301025390625,
0.031646728515625,
0.0038890838623046875,
0.0157623291015625,
0.0257720947265625,
0.004352569580078125,
0.028900146484375,
-0.03228759765625,
0.047393798828125,
-0.033294677734375,
0.040771484375,
-0.0318603515625,
0.050048828125,
-0.07830810546875,
0.0272369384765625,
-0.004390716552734375,
-0.026336669921875,
0.038787841796875,
-0.004207611083984375,
-0.0186309814453125,
-0.026611328125,
-0.04443359375,
0.072021484375,
0.003543853759765625,
0.04107666015625,
-0.10711669921875,
-0.0673828125,
0.0152587890625,
0.056610107421875,
0.03985595703125,
-0.0258636474609375,
0.0035400390625,
-0.01483154296875,
0.0196533203125,
0.025787353515625,
-0.0281982421875,
-0.0184326171875,
0.01837158203125,
0.0024356842041015625,
0.016510009765625,
-0.0249786376953125,
-0.052642822265625,
0.039886474609375,
-0.030914306640625,
0.001850128173828125,
0.03857421875,
-0.026275634765625,
-0.0141754150390625,
-0.064697265625,
-0.01396942138671875,
-0.020721435546875,
-0.0017375946044921875,
-0.01503753662109375,
0.0037746429443359375,
-0.0316162109375,
-0.0350341796875,
-0.0218658447265625,
-0.004650115966796875,
-0.053558349609375,
0.006130218505859375,
-0.0132293701171875,
0.0028362274169921875,
0.01390838623046875,
0.0672607421875,
-0.045013427734375,
-0.05291748046875,
-0.01126861572265625,
-0.00016939640045166016,
-0.0946044921875,
-0.0059814453125,
0.016937255859375,
0.0552978515625,
-0.02337646484375,
0.041168212890625,
0.052032470703125,
0.0296173095703125,
0.022491455078125,
-0.01258087158203125,
0.0240020751953125,
-0.031280517578125,
0.0035114288330078125,
0.007595062255859375,
-0.003543853759765625,
0.03082275390625,
0.016021728515625,
0.005573272705078125,
-0.01074981689453125,
0.03485107421875,
-0.07379150390625,
0.00154876708984375,
0.0010366439819335938,
-0.0176239013671875,
0.0191802978515625,
0.0252227783203125,
-0.041412353515625,
0.0235595703125,
0.0018053054809570312,
0.012298583984375,
0.006908416748046875,
0.044525146484375,
-0.01511383056640625,
0.00020420551300048828,
0.09332275390625,
-0.0139007568359375,
-0.0023365020751953125,
0.0176544189453125,
-0.0002841949462890625,
-0.036102294921875,
-0.0350341796875,
-0.01849365234375,
0.0394287109375,
0.01099395751953125,
0.007251739501953125,
0.0078277587890625,
0.02410888671875,
0.01093292236328125,
0.0090179443359375,
-0.0036525726318359375,
-0.0018301010131835938,
0.024261474609375,
0.011810302734375,
0.00693511962890625,
-0.0189361572265625,
0.0120086669921875,
0.01413726806640625,
0.01477813720703125,
0.02093505859375,
-0.02203369140625,
-0.0286407470703125,
-0.00661468505859375,
-0.048583984375,
0.03173828125,
-0.0013179779052734375,
0.0008826255798339844,
0.0299224853515625,
-0.0263671875,
0.03631591796875,
0.0217742919921875,
0.041961669921875,
0.014404296875,
0.019683837890625,
0.00968170166015625,
0.0091094970703125,
0.05938720703125,
0.00966644287109375,
-0.01042938232421875,
-0.0025386810302734375,
-0.033477783203125,
0.09930419921875,
-0.032958984375,
-0.039337158203125,
0.028717041015625,
-0.00209808349609375,
0.042755126953125,
0.0172576904296875,
-0.0004467964172363281,
0.0282440185546875,
0.027862548828125,
0.0185394287109375,
0.036773681640625,
0.0038967132568359375,
-0.0645751953125,
0.016815185546875,
-0.00458526611328125,
-0.00557708740234375,
-0.016845703125,
0.0169219970703125,
0.0305328369140625,
-0.0208587646484375,
-0.0024967193603515625,
-0.0242462158203125,
0.00970458984375,
-0.004177093505859375,
0.017059326171875,
-0.0165863037109375,
0.020599365234375,
0.0027484893798828125,
-0.0232086181640625,
0.021820068359375,
-0.05633544921875,
-0.0185546875,
-0.034576416015625,
-0.01568603515625,
-0.003131866455078125,
-0.025146484375,
0.012603759765625,
-0.02581787109375,
-0.003955841064453125,
-0.0361328125,
0.016082763671875,
0.057037353515625,
-0.048126220703125,
-0.0119476318359375,
-0.0445556640625,
0.00666046142578125,
-0.0219268798828125,
-0.060821533203125,
0.077880859375,
-0.0196533203125,
0.0080413818359375,
-0.0024776458740234375,
0.016204833984375,
0.04766845703125,
-0.00566864013671875,
0.010467529296875,
0.006072998046875,
0.00921630859375,
0.0258331298828125,
-0.0113372802734375,
0.01045989990234375,
0.0361328125,
-0.003170013427734375,
0.01535797119140625,
-0.0020809173583984375,
-0.006786346435546875,
0.08056640625,
0.0308685302734375,
0.0335693359375,
-0.01227569580078125,
0.0027027130126953125,
-0.041229248046875,
0.03692626953125,
0.02471923828125,
0.026947021484375,
-0.00634765625,
0.028472900390625,
-0.006732940673828125,
0.076904296875,
0.00811004638671875,
0.0208892822265625,
0.0159454345703125,
-0.00927734375,
0.04266357421875,
0.04742431640625,
0.01190185546875,
-0.031982421875,
-0.010894775390625,
0.0019025802612304688,
-0.0004954338073730469,
0.006015777587890625,
0.04510498046875,
0.021087646484375,
-0.019317626953125,
-0.027252197265625,
0.030029296875,
0.00962066650390625,
-0.0026569366455078125,
0.03582763671875,
-0.0146942138671875,
-0.0203399658203125,
-0.009613037109375,
-0.017059326171875,
-0.01302337646484375,
-0.00547027587890625,
-0.0248565673828125,
0.022705078125,
0.03228759765625,
0.03021240234375,
-0.0004973411560058594,
0.003787994384765625,
-0.0103912353515625,
0.0081329345703125,
0.0408935546875,
-0.07470703125,
0.040771484375,
-0.0291748046875,
0.05084228515625,
0.058837890625,
0.009063720703125,
-0.015106201171875,
0.025665283203125,
-0.014892578125,
0.0191650390625,
0.0080718994140625,
0.00769805908203125,
0.03057861328125,
-0.0797119140625,
0.01206207275390625,
0.01047515869140625,
-0.005764007568359375,
0.001613616943359375,
-0.0179443359375,
-0.006153106689453125,
0.0008091926574707031,
-0.033050537109375,
-0.0099334716796875,
-0.0144195556640625,
-0.0814208984375,
-0.012939453125,
0.005237579345703125,
-0.04931640625,
0.01264190673828125,
0.05010986328125,
0.01424407958984375,
-0.07684326171875,
0.0033893585205078125,
-0.0016241073608398438,
-0.058837890625,
-0.0306243896484375,
0.05780029296875,
-0.0013513565063476562,
0.023284912109375,
0.005718231201171875,
-0.0235595703125,
-0.0181121826171875,
-0.0136871337890625,
-0.000152587890625,
0.039276123046875,
0.0025043487548828125,
-0.046661376953125,
-0.017730712890625,
0.0210113525390625,
-0.027587890625,
0.0205841064453125,
0.0189056396484375,
0.01160430908203125,
-0.02252197265625,
-0.01482391357421875,
-0.00986480712890625,
-0.053131103515625,
0.00853729248046875,
0.0036144256591796875,
-0.01488494873046875,
-0.0295867919921875,
0.0098876953125,
-0.055938720703125,
-0.00933074951171875,
0.0036945343017578125,
-0.03851318359375,
-0.025054931640625,
0.0499267578125,
-0.0185546875,
-0.025054931640625,
-0.023101806640625,
0.01003265380859375,
0.0210723876953125,
0.006641387939453125,
0.0028285980224609375,
-0.00836181640625,
-0.00928497314453125,
-0.005146026611328125,
-0.00269317626953125,
0.00278472900390625,
-0.0298919677734375,
0.051849365234375,
-0.0030765533447265625,
0.0021514892578125,
-0.03155517578125,
0.06866455078125,
-0.03802490234375,
-0.0249481201171875,
0.04534912109375,
-0.0008907318115234375,
-0.006420135498046875,
-0.01409912109375,
-0.0230560302734375,
-0.005084991455078125,
0.05615234375,
-0.01401519775390625,
-0.03466796875,
-0.0021228790283203125,
0.01404571533203125,
-0.0159454345703125,
-0.032470703125,
0.0012760162353515625,
-0.0200347900390625,
0.0029125213623046875,
-0.01464080810546875,
-0.04693603515625,
-0.005687713623046875,
-0.0022220611572265625,
-0.046539306640625,
0.014892578125,
-0.030609130859375,
0.0289764404296875,
-0.07037353515625,
0.0249786376953125,
-0.01290130615234375,
0.017730712890625,
-0.055419921875,
0.007015228271484375,
-0.057037353515625,
-0.0125274658203125,
-0.0188751220703125,
0.00748443603515625,
0.016082763671875,
0.01666259765625,
-0.03363037109375,
0.02056884765625,
0.040771484375,
-0.0262603759765625,
0.0218658447265625,
-0.016082763671875,
0.01934814453125,
-0.01346588134765625,
0.01409149169921875,
-0.009796142578125,
-0.01293182373046875,
-0.0257415771484375,
-0.03826904296875,
-0.00035381317138671875,
0.0249176025390625,
-0.005825042724609375,
0.0186920166015625,
-0.035858154296875,
0.005859375,
-0.040191650390625,
-0.056976318359375,
-0.0212554931640625,
0.0031261444091796875,
-0.01727294921875,
0.015411376953125,
-0.046844482421875,
-0.028594970703125,
0.0214691162109375,
0.00826263427734375,
0.004123687744140625,
0.00719451904296875,
0.04913330078125,
0.0123443603515625,
-0.01395416259765625,
-0.0380859375,
-0.006290435791015625,
0.05389404296875,
-0.0019121170043945312,
0.044708251953125,
0.042205810546875,
-0.037017822265625,
0.05694580078125,
0.030914306640625,
0.01690673828125,
-0.0281829833984375,
0.02447509765625,
-0.0137786865234375,
-0.0310516357421875,
0.033905029296875,
-0.00988006591796875,
0.01114654541015625,
0.0076751708984375,
-0.019500732421875,
0.015655517578125,
0.029266357421875,
0.0078582763671875,
-0.048553466796875,
0.0274810791015625,
0.010162353515625,
-0.01241302490234375,
0.0171966552734375,
-0.05767822265625,
0.043975830078125,
-0.001857757568359375,
0.0046844482421875,
0.002658843994140625,
0.00339508056640625,
0.00121307373046875,
0.045928955078125,
0.0239105224609375,
0.0301513671875,
0.03082275390625,
0.03216552734375,
0.006313323974609375,
-0.0173187255859375,
-0.00696563720703125,
0.027557373046875,
0.01904296875,
-0.052001953125,
0.024627685546875,
-0.0025768280029296875,
-0.037261962890625,
0.0029163360595703125,
-0.004619598388671875,
0.08538818359375,
0.061248779296875,
-0.031402587890625,
-0.023284912109375,
-0.006992340087890625,
-0.004795074462890625,
-0.07513427734375,
-0.004825592041015625,
-0.0175323486328125,
-0.005153656005859375,
-0.00431060791015625,
0.0615234375,
-0.04046630859375,
0.045928955078125,
-0.0028705596923828125,
0.036041259765625,
0.039764404296875,
-0.0073394775390625,
0.0118865966796875,
0.0220947265625,
-0.00887298583984375,
-0.03204345703125,
0.00836181640625,
-0.0025043487548828125,
-0.0022296905517578125,
0.03387451171875,
-0.0024967193603515625,
0.0594482421875,
0.0260162353515625,
-0.0328369140625,
-0.0009107589721679688,
-0.022705078125,
0.005092620849609375,
-0.0146942138671875,
0.00823211669921875,
-0.0261077880859375,
-0.0222015380859375,
0.023529052734375,
0.0252685546875,
0.0193328857421875,
-0.05242919921875,
0.017059326171875,
-0.022247314453125,
-0.01953125,
-0.0251312255859375,
-0.017242431640625,
-0.005687713623046875,
-0.045806884765625,
-0.0018138885498046875,
-0.005615234375,
0.0230560302734375,
-0.0272979736328125,
-0.01059722900390625,
-0.0281829833984375,
0.06817626953125,
0.0087738037109375,
0.04364013671875,
-0.058319091796875,
0.003662109375,
-0.09515380859375,
-0.0013704299926757812,
0.0372314453125,
0.03485107421875,
-0.02911376953125,
-0.0252685546875,
-0.0531005859375,
-0.03753662109375,
0.0010662078857421875,
0.00205230712890625,
-0.0345458984375,
0.0014371871948242188,
0.01093292236328125,
0.00927734375,
-0.0022792816162109375,
-0.028656005859375,
-0.0192718505859375,
0.01751708984375,
0.0260009765625,
0.0193023681640625,
0.011474609375,
0.01354217529296875,
-0.0031719207763671875,
0.040802001953125,
0.005767822265625,
0.0035858154296875,
-0.0136260986328125,
-0.04052734375,
0.0416259765625,
0.0212554931640625,
-0.0193939208984375,
-0.034820556640625,
0.034271240234375,
-0.07550048828125,
-0.01354217529296875,
-0.0213470458984375,
-0.000011444091796875,
-0.016693115234375,
0.00981903076171875,
-0.017578125,
0.0032901763916015625,
-0.0038433074951171875,
0.00017654895782470703,
0.006771087646484375,
-0.01546478271484375,
-0.03631591796875,
0.0294189453125,
0.032745361328125,
-0.0299072265625,
0.0257110595703125,
-0.041534423828125,
-0.038177490234375,
0.00403594970703125,
0.0313720703125,
0.0379638671875,
-0.03326416015625,
-0.003108978271484375,
0.0298004150390625,
-0.0241241455078125,
-0.0189971923828125,
0.043182373046875,
-0.0173187255859375,
-0.003398895263671875,
0.03912353515625,
0.00890350341796875,
-0.01332855224609375,
0.01457977294921875,
-0.0218353271484375,
-0.00897216796875,
0.0227203369140625,
0.0198974609375,
-0.03033447265625,
-0.003448486328125,
-0.0218048095703125,
-0.00814056396484375,
0.02471923828125,
-0.0146026611328125,
0.005031585693359375,
-0.0248565673828125,
0.059783935546875,
0.003421783447265625,
-0.01374053955078125,
0.0239410400390625,
-0.01375579833984375,
0.0005574226379394531,
0.0281982421875,
0.0478515625,
0.007965087890625,
0.055908203125,
-0.0816650390625,
-0.049896240234375,
0.005992889404296875,
-0.050628662109375,
-0.00902557373046875,
0.0197296142578125,
0.0213165283203125,
-0.0275421142578125,
0.076416015625,
-0.047332763671875,
0.06170654296875,
-0.0274810791015625,
-0.006191253662109375,
0.03369140625,
0.03485107421875,
-0.01038360595703125,
-0.0142364501953125,
0.02581787109375,
-0.0179901123046875,
-0.033538818359375,
-0.0179443359375,
0.017364501953125,
0.00853729248046875,
-0.016754150390625,
0.0210723876953125,
-0.0166473388671875,
-0.0309295654296875,
-0.01580810546875,
-0.0084991455078125,
0.0882568359375,
-0.048583984375,
-0.002986907958984375,
0.01367950439453125,
0.0298614501953125,
0.009918212890625,
0.0022983551025390625,
0.0098724365234375,
-0.026580810546875,
0.01355743408203125,
0.00850677490234375,
-0.0180511474609375,
0.01800537109375,
0.036163330078125,
-0.04327392578125,
0.10809326171875,
-0.010528564453125,
0.01293182373046875,
0.01364898681640625,
0.048248291015625,
0.0015096664428710938,
0.04803466796875,
-0.034912109375,
0.0328369140625,
-0.0232086181640625,
0.051300048828125,
-0.0523681640625,
-0.0273895263671875,
0.01239013671875,
0.048248291015625,
0.076904296875,
0.016510009765625,
-0.00786590576171875,
-0.04150390625,
0.0009641647338867188,
0.0243988037109375,
-0.0236968994140625,
0.039581298828125,
0.002765655517578125,
0.034423828125,
0.06817626953125,
-0.04559326171875,
0.01611328125,
0.02008056640625,
0.00959014892578125,
0.004901885986328125,
-0.01617431640625,
-0.0229949951171875,
0.0150909423828125,
0.0157012939453125,
0.0021419525146484375,
-0.00891876220703125,
-0.027099609375,
0.0211944580078125,
0.01104736328125,
0.046630859375,
0.03936767578125,
-0.03765869140625,
0.006710052490234375,
-0.036285400390625,
0.05889892578125,
-0.01540374755859375,
0.01210784912109375,
0.00698089599609375,
0.01369476318359375,
0.07574462890625,
-0.031829833984375,
-0.0160675048828125,
0.0167694091796875,
-0.0226287841796875,
-0.00433349609375,
-0.004840850830078125,
0.03875732421875,
-0.0408935546875,
-0.078369140625,
0.003177642822265625,
0.0067138671875,
0.01776123046875,
-0.048858642578125,
0.0069732666015625,
0.0152130126953125,
0.01861572265625,
0.0251922607421875,
0.049560546875,
-0.0034427642822265625,
0.00923919677734375,
-0.031494140625,
-0.026214599609375,
-0.0022106170654296875,
0.036773681640625,
0.0085296630859375,
0.0208892822265625,
-0.000728607177734375,
-0.06658935546875,
0.00862884521484375,
-0.018402099609375,
0.018035888671875,
0.0204315185546875,
-0.017822265625,
0.021331787109375,
-0.0421142578125,
-0.0014944076538085938,
-0.01424407958984375,
0.02154541015625,
0.04010009765625,
-0.0024318695068359375,
0.00469970703125,
-0.002597808837890625,
0.0653076171875,
0.0079498291015625,
-0.0240325927734375,
-0.01479339599609375,
0.021209716796875,
0.0225372314453125,
-0.038909912109375,
-0.03173828125,
-0.011749267578125,
-0.043731689453125,
-0.008270263671875,
0.007694244384765625,
-0.0345458984375,
0.007610321044921875,
-0.021484375,
-0.00015974044799804688,
0.01027679443359375,
0.04302978515625,
-0.0114593505859375,
0.0246734619140625,
0.005588531494140625,
-0.0038051605224609375,
0.01293182373046875,
0.00939178466796875,
-0.00001537799835205078,
0.007434844970703125,
-0.0714111328125,
-0.000385284423828125,
0.0009551048278808594,
-0.04913330078125,
0.018707275390625,
0.0188446044921875,
-0.0823974609375,
0.06158447265625,
-0.04302978515625,
0.029296875,
0.0028438568115234375,
-0.038909912109375,
0.0000018477439880371094,
0.03363037109375,
0.0244598388671875,
-0.0018815994262695312,
-0.0057220458984375,
-0.017608642578125,
0.020172119140625,
0.057830810546875,
-0.00435638427734375,
0.06292724609375,
-0.038818359375,
0.014739990234375,
0.0110626220703125,
-0.037628173828125,
0.05035400390625,
0.01255035400390625,
-0.01425933837890625,
0.01123809814453125,
0.0029926300048828125,
-0.027679443359375,
-0.0511474609375,
0.023193359375,
0.034942626953125,
-0.00848388671875,
0.04022216796875,
-0.033721923828125,
0.016082763671875,
-0.01244354248046875,
-0.0165863037109375,
-0.03826904296875,
-0.01580810546875,
0.010650634765625,
-0.0002868175506591797,
0.00024437904357910156,
0.0014295578002929688,
0.0071563720703125,
0.043731689453125,
-0.044281005859375,
-0.007190704345703125,
-0.0186004638671875,
-0.01800537109375,
-0.05328369140625,
-0.001476287841796875,
-0.0202484130859375,
0.0010843276977539062,
0.0272979736328125,
-0.006622314453125,
0.0031795501708984375,
0.0247039794921875,
-0.007007598876953125,
0.0245208740234375,
-0.02191162109375,
0.056884765625,
0.03277587890625,
0.0672607421875,
-0.003204345703125,
0.020172119140625,
0.013946533203125,
0.01134490966796875,
0.01557159423828125,
-0.019683837890625,
-0.014862060546875,
-0.028167724609375,
-0.002742767333984375,
0.0167388916015625,
-0.01190185546875,
-0.0306243896484375,
-0.04962158203125,
0.00772857666015625,
0.0263824462890625,
-0.0254974365234375,
-0.01540374755859375,
0.019805908203125,
-0.047149658203125,
0.0214385986328125,
-0.029937744140625,
-0.0821533203125,
0.0240478515625,
0.06573486328125,
-0.0021877288818359375,
-0.0482177734375,
-0.047210693359375,
0.01374053955078125,
-0.062164306640625,
0.0213775634765625,
0.0224151611328125,
-0.03857421875,
0.0177001953125,
-0.0015964508056640625,
0.04180908203125,
0.0462646484375,
0.032745361328125,
0.00786590576171875,
-0.002063751220703125,
0.00464630126953125,
-0.0198822021484375,
-0.03692626953125,
0.0311431884765625,
-0.0623779296875,
-0.06671142578125,
-0.0287628173828125,
0.006443023681640625,
0.011322021484375,
-0.02569580078125,
-0.04254150390625,
0.05743408203125,
-0.0227813720703125,
-0.02484130859375,
-0.08416748046875,
0.01806640625,
0.047760009765625,
-0.0523681640625,
-0.06292724609375,
0.032867431640625,
-0.058502197265625,
0.0203857421875,
0.0184478759765625,
-0.0115509033203125,
0.0318603515625,
-0.0182342529296875,
-0.0435791015625,
0.007110595703125,
0.016998291015625,
0.027587890625,
-0.01451873779296875,
0.014892578125,
0.005710601806640625,
0.007701873779296875,
-0.057708740234375,
-0.01357269287109375,
-0.0025386810302734375,
0.06781005859375,
-0.0179901123046875,
-0.018646240234375,
-0.042327880859375,
-0.033477783203125,
0.0384521484375,
0.0677490234375,
0.0166473388671875,
-0.01238250732421875,
-0.0302276611328125,
-0.05303955078125,
-0.01018524169921875,
-0.032318115234375,
0.01177215576171875,
-0.0643310546875,
0.0075225830078125,
-0.003063201904296875,
-0.01512908935546875,
-0.045013427734375,
-0.01143646240234375,
-0.0687255859375,
-0.0300140380859375,
-0.06231689453125,
-0.01270294189453125,
0.00811004638671875,
0.0081787109375,
-0.0179595947265625,
-0.01425933837890625,
-0.03680419921875,
0.0172576904296875,
-0.011199951171875,
-0.043853759765625,
0.01971435546875,
0.032501220703125,
-0.06805419921875,
-0.0045623779296875,
0.05633544921875,
0.0099334716796875,
0.047119140625,
-0.03558349609375,
-0.07061767578125,
0.01763916015625,
0.01485443115234375,
0.004734039306640625,
0.0290679931640625,
-0.014923095703125,
0.006465911865234375,
-0.0222625732421875,
0.020660400390625,
0.01151275634765625,
-0.04656982421875,
-0.0305938720703125,
0.06500244140625,
-0.041534423828125,
-0.019744873046875,
-0.034942626953125,
-0.026397705078125,
-0.01201629638671875,
-0.0007076263427734375,
-0.033538818359375,
-0.081787109375,
0.0259857177734375,
-0.028717041015625,
0.0006933212280273438,
0.03021240234375
] |
85d301721d38a82be2658e6fa7e7550da1b6bb25
|
Wordpress Stackexchange
Q: changing notification emails from WordPress @mydomain.net to something else How do I change notification emails address from WordPress @mydomain.net to something else.
I want to do this because WordPress @mydomain.net ends up getting flagged as junk mail.
Thanks
Daniel
A: There's a great plugin that does this for you called Send From. However, if you want to roll this yourself, it's dead simple. To change the email address add a filter on 'wp_mail_from' like so:
function just_use_my_email(){
return '[email protected]';
}
add_filter( 'wp_mail_from', 'just_use_my_email' );
And you can also change the sender's name using the 'wp_mail_from_name' filter like so (this is entirely optional):
function just_use_my_email_name(){
return 'My Real Name';
}
add_filter( 'wp_mail_from_name', 'just_use_my_email_name' );
Just swap the fake values for your real email address and you're good to go.
|
Q: changing notification emails from WordPress @mydomain.net to something else How do I change notification emails address from WordPress @mydomain.net to something else.
I want to do this because WordPress @mydomain.net ends up getting flagged as junk mail.
Thanks
Daniel
A: There's a great plugin that does this for you called Send From. However, if you want to roll this yourself, it's dead simple. To change the email address add a filter on 'wp_mail_from' like so:
function just_use_my_email(){
return '[email protected]';
}
add_filter( 'wp_mail_from', 'just_use_my_email' );
And you can also change the sender's name using the 'wp_mail_from_name' filter like so (this is entirely optional):
function just_use_my_email_name(){
return 'My Real Name';
}
add_filter( 'wp_mail_from_name', 'just_use_my_email_name' );
Just swap the fake values for your real email address and you're good to go.
A: here:
//email from name function
function my_wp_mail_from_name($name) {
return 'Name';
}
//email from email function
function my_wp_mail_from($content_type) {
return '[email protected]';
}
add_filter('wp_mail_from','my_wp_mail_from');
add_filter('wp_mail_from_name','my_wp_mail_from_name');
Change Name to the name you want and [email protected] to the email address you want.
but if you change the email address most anti span filter will block or spam your mail for spoofing.
A: The existing answers are a better way to do this, however there is an alternative I'd like to mention.
add_action('phpmailer_init','modify_phpmailer');
function modify_phpmailer($phpmailer) {
$phpmailer->From = "Full Name";
$phpmailer->FromName = "[email protected]";
$phpmailer->AddReplyTo("[email protected]");
}
This happens after the *wp_mail_from* and *wp_mail_from_name* filters. So with this you can force a change and prevent other plugins from modifying it. You can also work directly with the phpmailer object and do things such as adding a reply to address (shown above)
A: I use a very similar approach like John P Bloch and Bainternet, just a little bit more flexible, so I don’t have to change the mail address for any client:
<?php # -*- coding: utf-8 -*-
/*
* Plugin Name: Filter System From Mail
* Description: Sets the WP from mail address to the first admin’s mail and the from name to blog name.
* Version: 2012.08.30
* Author: Fuxia Scholz
* Author URI: https://fuxia.me
* License: MIT
*/
if ( ! function_exists( 't5_filter_system_from_mail' ) )
{
/**
* First admin's e-mail address or blog name depending on current filter.
*
* See wp-includes/pluggable.php::wp_mail()
*
* @param $input Name or email address
* @return string
*/
function t5_filter_system_from_mail( $input )
{
// not the default address, probably a comment notification.
if ( 0 !== stripos( $input, 'wordpress' ) )
return $input; // Not auto-generated
return get_option( 'wp_mail_from' === current_filter()
? 'admin_email' : 'blogname' );
}
add_filter( 'wp_mail_from', 't5_filter_system_from_mail' );
add_filter( 'wp_mail_from_name', 't5_filter_system_from_mail' );
}
|
wordpress
|
{
"language": "en",
"length": 429,
"provenance": "stackexchange_00019.jsonl.gz:407855",
"question_score": "15",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12368"
}
|
[
0.0321044921875,
0.0033817291259765625,
0.0017604827880859375,
-0.0038928985595703125,
-0.0109405517578125,
-0.039154052734375,
0.033050537109375,
-0.034454345703125,
0.00231170654296875,
0.0280303955078125,
0.0350341796875,
-0.0240936279296875,
0.028472900390625,
-0.0533447265625,
-0.007450103759765625,
0.0012845993041992188,
-0.0067138671875,
0.01495361328125,
-0.00867462158203125,
-0.0391845703125,
0.030181884765625,
-0.052459716796875,
-0.0208587646484375,
0.06561279296875,
-0.0157928466796875,
0.01238250732421875,
0.144287109375,
-0.043182373046875,
-0.0005106925964355469,
-0.02423095703125,
0.0164794921875,
-0.032958984375,
0.01255035400390625,
0.06793212890625,
-0.06903076171875,
-0.0255126953125,
0.0153350830078125,
0.015289306640625,
0.00726318359375,
0.0286407470703125,
0.0269775390625,
-0.0186920166015625,
0.032012939453125,
-0.0143890380859375,
0.0167236328125,
-0.01284027099609375,
0.032470703125,
-0.06536865234375,
0.01235198974609375,
0.005634307861328125,
0.0031070709228515625,
0.0157470703125,
0.01371002197265625,
0.0018215179443359375,
-0.00959014892578125,
-0.00628662109375,
-0.0526123046875,
0.059234619140625,
0.0107421875,
-0.0089263916015625,
-0.0069427490234375,
0.033477783203125,
0.0002846717834472656,
0.0307159423828125,
-0.0037555694580078125,
-0.003032684326171875,
0.01531219482421875,
0.0069732666015625,
-0.018707275390625,
-0.0136566162109375,
0.0222930908203125,
-0.005428314208984375,
-0.004093170166015625,
-0.0177764892578125,
-0.0206146240234375,
0.0230865478515625,
0.033233642578125,
0.01154327392578125,
-0.0006885528564453125,
-0.006267547607421875,
0.00792694091796875,
-0.040435791015625,
-0.023468017578125,
0.0112762451171875,
-0.0091094970703125,
0.040557861328125,
-0.01531982421875,
-0.0087432861328125,
-0.026519775390625,
-0.01045989990234375,
-0.0162353515625,
-0.00543212890625,
-0.0355224609375,
0.021087646484375,
-0.0155029296875,
0.01122283935546875,
0.00922393798828125,
0.003734588623046875,
0.00119781494140625,
-0.040679931640625,
-0.0296783447265625,
0.0026092529296875,
-0.0618896484375,
0.02410888671875,
-0.0498046875,
0.054412841796875,
0.043548583984375,
0.04034423828125,
-0.00397491455078125,
0.01456451416015625,
-0.0019254684448242188,
-0.006275177001953125,
-0.01314544677734375,
0.0092926025390625,
-0.0018444061279296875,
-0.002986907958984375,
-0.049835205078125,
0.025390625,
-0.02099609375,
0.021636962890625,
0.01473236083984375,
0.043792724609375,
-0.0009775161743164062,
-0.00653839111328125,
-0.029571533203125,
-0.023590087890625,
-0.005893707275390625,
-0.041473388671875,
0.0038852691650390625,
0.01369476318359375,
-0.04266357421875,
0.015350341796875,
0.0826416015625,
0.032867431640625,
0.03155517578125,
-0.0229949951171875,
0.02789306640625,
0.03509521484375,
0.0124053955078125,
-0.005268096923828125,
0.0386962890625,
-0.0301513671875,
-0.02569580078125,
0.0257720947265625,
-0.0095062255859375,
-0.0026702880859375,
0.015625,
0.0271453857421875,
0.0023345947265625,
0.005962371826171875,
-0.0176544189453125,
-0.0048675537109375,
0.0162811279296875,
0.022491455078125,
0.0159912109375,
0.0209197998046875,
0.045562744140625,
-0.02435302734375,
-0.023345947265625,
-0.019378662109375,
-0.0166015625,
-0.0196380615234375,
0.04583740234375,
-0.0099639892578125,
-0.0227203369140625,
0.0509033203125,
-0.06512451171875,
-0.022369384765625,
0.018218994140625,
-0.074462890625,
0.0302734375,
0.037109375,
0.019378662109375,
-0.00914764404296875,
0.01666259765625,
-0.0032253265380859375,
-0.002536773681640625,
0.028717041015625,
0.0286407470703125,
-0.016998291015625,
-0.0301971435546875,
-0.03607177734375,
0.050506591796875,
-0.01035308837890625,
-0.0216522216796875,
-0.005237579345703125,
0.009521484375,
0.0124664306640625,
-0.004810333251953125,
0.024932861328125,
0.0001322031021118164,
0.033905029296875,
-0.003086090087890625,
-0.00534820556640625,
-0.030303955078125,
-0.0275115966796875,
0.019805908203125,
0.01390838623046875,
-0.016265869140625,
0.031005859375,
-0.0231170654296875,
-0.01129150390625,
0.007053375244140625,
-0.0050506591796875,
-0.00908660888671875,
-0.0133819580078125,
-0.0157470703125,
0.036285400390625,
0.03253173828125,
0.00020563602447509766,
-0.0019273757934570312,
0.0032787322998046875,
-0.010223388671875,
-0.06390380859375,
-0.06988525390625,
0.01529693603515625,
-0.0185089111328125,
0.00243377685546875,
-0.017242431640625,
0.0231781005859375,
-0.0256805419921875,
-0.0208740234375,
-0.0273284912109375,
0.01110076904296875,
0.006977081298828125,
-0.03173828125,
-0.0207366943359375,
-0.0284423828125,
-0.047332763671875,
-0.01168060302734375,
-0.04437255859375,
0.07818603515625,
-0.019744873046875,
-0.00809478759765625,
-0.01058197021484375,
0.00688934326171875,
0.028839111328125,
-0.03448486328125,
0.0210418701171875,
0.0341796875,
0.023223876953125,
0.01442718505859375,
0.008209228515625,
0.032958984375,
0.01104736328125,
-0.033294677734375,
0.0196685791015625,
-0.0004315376281738281,
0.0202789306640625,
0.02386474609375,
-0.02386474609375,
-0.0306549072265625,
0.0251617431640625,
-0.06439208984375,
0.0104522705078125,
0.03759765625,
0.048431396484375,
-0.007289886474609375,
-0.0305023193359375,
0.046112060546875,
-0.005558013916015625,
-0.003131866455078125,
-0.0418701171875,
0.0117950439453125,
-0.00479888916015625,
0.00014698505401611328,
0.01392364501953125,
0.015960693359375,
-0.007541656494140625,
-0.0157928466796875,
0.004673004150390625,
-0.02923583984375,
0.0153961181640625,
0.029266357421875,
-0.0170135498046875,
0.04925537109375,
0.005645751953125,
-0.0193939208984375,
0.00980377197265625,
0.024169921875,
-0.06134033203125,
-0.041748046875,
-0.0283050537109375,
-0.0110015869140625,
-0.008209228515625,
-0.0212249755859375,
0.0248565673828125,
-0.0279693603515625,
-0.01898193359375,
-0.017059326171875,
0.0240478515625,
0.03411865234375,
-0.0172271728515625,
0.0290985107421875,
-0.0242767333984375,
-0.01338958740234375,
-0.0308380126953125,
-0.030975341796875,
0.0206146240234375,
-0.0391845703125,
-0.00012671947479248047,
0.057464599609375,
0.0302581787109375,
-0.03125,
0.011993408203125,
-0.036224365234375,
0.0165557861328125,
0.006725311279296875,
0.0057373046875,
-0.0135345458984375,
-0.0340576171875,
0.0278167724609375,
-0.01898193359375,
-0.017822265625,
-0.04742431640625,
-0.044036865234375,
-0.032073974609375,
-0.047882080078125,
-0.07537841796875,
-0.0191192626953125,
-0.0120697021484375,
0.00395965576171875,
-0.036773681640625,
0.00984954833984375,
0.005176544189453125,
0.01218414306640625,
-0.00473785400390625,
0.00720977783203125,
0.01300811767578125,
-0.0282135009765625,
-0.035369873046875,
-0.0205078125,
-0.047943115234375,
0.01494598388671875,
0.01192474365234375,
0.01157379150390625,
0.01226806640625,
-0.0256805419921875,
-0.0025997161865234375,
-0.01342010498046875,
0.00247955322265625,
0.059539794921875,
0.0106658935546875,
-0.038421630859375,
-0.035888671875,
-0.005611419677734375,
0.01025390625,
-0.01186370849609375,
0.05718994140625,
0.018341064453125,
-0.003498077392578125,
0.007755279541015625,
-0.020263671875,
0.001987457275390625,
0.0191650390625,
-0.018524169921875,
-0.0004515647888183594,
0.006999969482421875,
0.0034008026123046875,
-0.042755126953125,
0.01398468017578125,
0.0291748046875,
0.003955841064453125,
-0.010772705078125,
-0.03076171875,
-0.047576904296875,
0.0093231201171875,
-0.0006742477416992188,
-0.0009388923645019531,
-0.01232147216796875,
0.049041748046875,
-0.0221710205078125,
-0.00469207763671875,
-0.005096435546875,
-0.0236663818359375,
-0.0266876220703125,
-0.007610321044921875,
-0.0250396728515625,
-0.0211334228515625,
-0.0318603515625,
0.00476837158203125,
-0.0295257568359375,
0.0267791748046875,
-0.02264404296875,
-0.1009521484375,
0.044952392578125,
-0.07861328125,
-0.04595947265625,
-0.0150299072265625,
-0.002765655517578125,
0.053009033203125,
0.12310791015625,
0.032379150390625,
-0.04302978515625,
0.0250396728515625,
0.022247314453125,
-0.0279998779296875,
-0.0027523040771484375,
-0.002895355224609375,
-0.02044677734375,
-0.05804443359375,
-0.01036834716796875,
-0.021820068359375,
-0.0013036727905273438,
-0.0152435302734375,
0.017547607421875,
-0.016754150390625,
-0.042755126953125,
0.028533935546875,
-0.0212249755859375,
0.0311279296875,
-0.037353515625,
0.0094146728515625,
-0.035369873046875,
-0.01486968994140625,
-0.038055419921875,
-0.0321044921875,
0.005855560302734375,
-0.0265045166015625,
0.00360870361328125,
-0.021484375,
0.06005859375,
-0.0006341934204101562,
0.028717041015625,
-0.0036678314208984375,
0.04443359375,
-0.020355224609375,
0.003582000732421875,
0.035614013671875,
-0.005279541015625,
-0.0059967041015625,
0.001071929931640625,
0.00017881393432617188,
-0.02496337890625,
-0.07769775390625,
0.0005373954772949219,
-0.001018524169921875,
0.06402587890625,
0.053741455078125,
-0.0305023193359375,
-0.04412841796875,
-0.024444580078125,
-0.044769287109375,
0.0091705322265625,
-0.01300048828125,
-0.0382080078125,
-0.028076171875,
-0.057342529296875,
0.03033447265625,
-0.01165008544921875,
-0.01165008544921875,
0.01042938232421875,
0.051177978515625,
0.021484375,
-0.0063018798828125,
-0.0017948150634765625,
-0.0081024169921875,
0.03326416015625,
0.00963592529296875,
0.0311431884765625,
0.01702880859375,
-0.023162841796875,
0.0467529296875,
0.0159759521484375,
-0.00412750244140625,
-0.01337432861328125,
0.048980712890625,
0.0079193115234375,
-0.00023734569549560547,
0.01251983642578125,
-0.00514984130859375,
-0.0013818740844726562,
0.0210723876953125,
0.022857666015625,
-0.037567138671875,
0.0164337158203125,
0.0289306640625,
0.00315093994140625,
0.02398681640625,
-0.0119476318359375,
-0.058563232421875,
0.032867431640625,
-0.0275421142578125,
-0.0268096923828125,
-0.004810333251953125,
0.00737762451171875,
-0.022003173828125,
-0.00560760498046875,
0.01023101806640625,
-0.04595947265625,
-0.0164642333984375,
-0.020782470703125,
0.018280029296875,
-0.01068878173828125,
-0.004955291748046875,
-0.029327392578125,
-0.0110626220703125,
0.053863525390625,
0.0157928466796875,
-0.033416748046875,
-0.0198974609375,
-0.0100555419921875,
0.00019478797912597656,
0.008209228515625,
-0.04827880859375,
0.07257080078125,
0.04266357421875,
-0.0266571044921875,
0.00006282329559326172,
-0.0633544921875,
-0.0054779052734375,
-0.0814208984375,
-0.00018870830535888672,
0.0226593017578125,
-0.0308074951171875,
-0.0087738037109375,
0.02203369140625,
0.0004646778106689453,
-0.016998291015625,
0.0102996826171875,
0.01494598388671875,
0.05426025390625,
-0.0112152099609375,
0.022796630859375,
0.0257720947265625,
-0.00736236572265625,
-0.032440185546875,
0.0295257568359375,
-0.00559234619140625,
-0.01061248779296875,
0.016021728515625,
0.028167724609375,
0.0251922607421875,
0.0279693603515625,
-0.03704833984375,
-0.02728271484375,
-0.0159454345703125,
0.0186004638671875,
0.0011873245239257812,
-0.017242431640625,
-0.03094482421875,
-0.0213775634765625,
0.015350341796875,
-0.0006875991821289062,
0.018524169921875,
-0.0462646484375,
0.0011844635009765625,
-0.01268768310546875,
0.0108489990234375,
-0.003444671630859375,
-0.0163116455078125,
-0.0276336669921875,
0.00884246826171875,
0.01555633544921875,
-0.01105499267578125,
-0.056793212890625,
-0.045318603515625,
-0.01259613037109375,
0.003971099853515625,
0.059326171875,
-0.0013427734375,
0.00199127197265625,
-0.03369140625,
0.0005183219909667969,
-0.054901123046875,
0.0121307373046875,
0.0161285400390625,
-0.0080108642578125,
-0.07537841796875,
0.0196685791015625,
-0.03558349609375,
-0.00904083251953125,
-0.0025177001953125,
-0.0282135009765625,
-0.0438232421875,
-0.016448974609375,
0.03472900390625,
0.0310211181640625,
-0.0008792877197265625,
-0.061431884765625,
-0.0153350830078125,
-0.037506103515625,
0.0268096923828125,
-0.0269622802734375,
0.0164947509765625,
0.0060272216796875,
-0.017333984375,
0.030029296875,
0.0031681060791015625,
-0.0234527587890625,
-0.0289459228515625,
-0.0204925537109375,
0.003887176513671875,
-0.04583740234375,
-0.002025604248046875,
-0.0190582275390625,
-0.01523590087890625,
0.005340576171875,
0.0200042724609375,
-0.00799560546875,
0.0360107421875,
-0.039947509765625,
0.0018205642700195312,
-0.033355712890625,
0.03253173828125,
-0.09405517578125,
0.0435791015625,
-0.04071044921875,
-0.009765625,
0.0007834434509277344,
-0.0157318115234375,
0.0038204193115234375,
-0.018524169921875,
0.010589599609375,
-0.01197052001953125,
-0.0002129077911376953,
-0.02471923828125,
0.041900634765625,
0.0386962890625,
0.0034732818603515625,
0.036346435546875,
0.0019550323486328125,
0.016143798828125,
0.0140228271484375,
0.00882720947265625,
0.00637054443359375,
-0.0152740478515625,
0.055450439453125,
0.01009368896484375,
-0.01654052734375,
0.04241943359375,
-0.0269775390625,
0.035797119140625,
0.0809326171875,
0.11065673828125,
-0.115234375,
0.0160980224609375,
0.03302001953125,
0.0033969879150390625,
0.0184783935546875,
0.0184783935546875,
-0.043792724609375,
-0.0648193359375,
0.049957275390625,
-0.06317138671875,
-0.002208709716796875,
0.00673675537109375,
-0.005107879638671875,
-0.006107330322265625,
0.0200347900390625,
0.06231689453125,
0.0248260498046875,
-0.0166015625,
-0.01384735107421875,
0.00989532470703125,
0.016876220703125,
-0.017425537109375,
0.028839111328125,
0.03680419921875,
-0.0201873779296875,
-0.05474853515625,
0.0244140625,
0.0144805908203125,
-0.037506103515625,
-0.05596923828125,
-0.004253387451171875,
0.0635986328125,
0.048095703125,
0.000988006591796875,
-0.0421142578125,
0.0390625,
-0.0248260498046875,
0.062103271484375,
-0.024017333984375,
-0.0012617111206054688,
0.027679443359375,
-0.049713134765625,
-0.006229400634765625,
-0.0084381103515625,
0.0269775390625,
0.01849365234375,
0.011993408203125,
0.0215606689453125,
-0.0113983154296875,
-0.0270538330078125,
0.02801513671875,
-0.0094757080078125,
-0.0017719268798828125,
-0.0004582405090332031,
-0.005950927734375,
-0.0285186767578125,
-0.0037021636962890625,
-0.004367828369140625,
-0.040771484375,
-0.01355743408203125,
-0.031463623046875,
-0.0916748046875,
0.11968994140625,
0.038177490234375,
0.033935546875,
0.003902435302734375,
0.0548095703125,
-0.054779052734375,
0.00803375244140625,
-0.0190887451171875,
0.006587982177734375,
0.01187896728515625,
0.0216217041015625,
0.004947662353515625,
0.004718780517578125,
-0.0012884140014648438,
0.014892578125,
0.060821533203125,
0.0176544189453125,
0.004489898681640625,
-0.0110015869140625,
0.0220489501953125,
-0.00600433349609375,
-0.04791259765625,
0.0418701171875,
-0.0295257568359375,
0.01227569580078125,
0.00489044189453125,
-0.0220794677734375,
0.01514434814453125,
-0.0013561248779296875,
-0.05035400390625,
-0.004337310791015625,
-0.00600433349609375,
-0.00876617431640625,
-0.0015735626220703125,
0.032684326171875,
-0.0011472702026367188,
-0.0127716064453125,
-0.001857757568359375,
-0.0172271728515625,
-0.0013437271118164062,
0.0209197998046875,
0.011810302734375,
-0.0060882568359375,
0.06646728515625,
-0.044921875,
0.0513916015625,
-0.0091094970703125,
0.0167694091796875,
0.034820556640625,
0.005214691162109375,
0.0706787109375,
0.0031280517578125,
0.01114654541015625,
0.003582000732421875,
0.025787353515625,
0.03778076171875,
-0.01549530029296875,
0.004085540771484375,
-0.0697021484375,
-0.006267547607421875,
0.0241241455078125,
0.05609130859375,
-0.032989501953125,
0.00809478759765625,
0.0212860107421875,
-0.008056640625,
0.0111083984375,
-0.0616455078125,
0.017242431640625,
-0.059356689453125,
-0.07696533203125,
-0.062286376953125,
0.00243377685546875,
0.041748046875,
0.0443115234375,
-0.01161956787109375,
-0.0124664306640625,
-0.05596923828125,
-0.04290771484375,
-0.03900146484375,
0.033447265625,
0.03485107421875,
0.04266357421875,
-0.0172119140625,
0.041717529296875,
-0.0022068023681640625,
-0.0005354881286621094,
-0.00887298583984375,
-0.01244354248046875,
0.036590576171875,
-0.004596710205078125,
0.01512908935546875,
0.0217132568359375,
0.03265380859375,
0.007015228271484375,
0.0012159347534179688,
0.01275634765625,
0.035369873046875,
0.004673004150390625,
-0.055877685546875,
-0.019439697265625,
-0.01442718505859375,
-0.038299560546875,
0.05609130859375,
-0.04864501953125,
0.002468109130859375,
-0.00902557373046875,
-0.01934814453125,
-0.009857177734375,
-0.0247650146484375,
0.05841064453125,
-0.0284576416015625,
0.0178375244140625,
-0.0173492431640625,
-0.013397216796875,
0.06219482421875,
-0.03399658203125,
0.025848388671875,
-0.00605010986328125,
-0.07080078125,
-0.050262451171875,
-0.01288604736328125,
0.02783203125,
0.022674560546875,
0.04193115234375,
0.035247802734375,
-0.01448822021484375,
-0.0047607421875,
-0.004093170166015625,
0.00748443603515625,
-0.01428985595703125,
-0.0140380859375,
-0.0257720947265625,
0.0189056396484375,
-0.024627685546875,
-0.037445068359375,
-0.03619384765625,
-0.0164337158203125,
0.042449951171875,
-0.0019741058349609375,
0.060150146484375,
-0.0111083984375,
0.020904541015625,
-0.036102294921875,
0.034912109375,
-0.07012939453125,
-0.06683349609375,
0.05145263671875,
-0.01412200927734375,
-0.0204620361328125,
0.0014562606811523438,
-0.0887451171875,
0.02008056640625,
0.022613525390625,
-0.0028228759765625,
0.053070068359375,
-0.021331787109375,
-0.0169219970703125,
-0.02569580078125,
0.0421142578125,
-0.01329803466796875,
-0.04620361328125,
-0.038055419921875,
0.0088653564453125,
0.01812744140625,
0.03271484375,
-0.046173095703125,
0.031097412109375,
0.017974853515625,
0.0270538330078125,
0.019927978515625,
-0.015289306640625,
0.03179931640625,
0.02911376953125,
-0.052642822265625,
-0.041259765625,
0.00490570068359375,
-0.0232696533203125,
0.00659942626953125,
-0.0278778076171875,
0.0738525390625,
-0.0074462890625,
-0.00791168212890625,
-0.03570556640625,
-0.054351806640625,
-0.0210418701171875,
-0.0274505615234375,
-0.0007939338684082031,
-0.03936767578125,
0.01059722900390625,
-0.011749267578125,
-0.0229949951171875,
-0.02716064453125,
-0.04180908203125,
0.01222991943359375,
0.0195465087890625,
-0.01073455810546875,
-0.002017974853515625,
-0.0099945068359375,
0.0043182373046875,
0.0254669189453125,
0.00980377197265625,
-0.060546875,
0.0227508544921875,
-0.019866943359375,
0.0369873046875,
-0.00933074951171875,
0.001979827880859375,
-0.01136016845703125,
0.004306793212890625,
-0.018524169921875,
-0.1016845703125,
-0.0523681640625,
0.0938720703125,
-0.0699462890625,
-0.0136260986328125,
0.0272674560546875,
0.004268646240234375,
-0.0433349609375,
-0.0361328125,
-0.037933349609375,
0.009063720703125,
-0.04608154296875,
-0.01171112060546875,
0.022735595703125,
-0.0316162109375,
-0.0144500732421875,
-0.019561767578125,
0.01374053955078125,
-0.06976318359375,
-0.025299072265625,
0.0012025833129882812,
-0.016357421875,
-0.004886627197265625,
-0.03662109375,
-0.042694091796875,
0.039947509765625,
0.00372314453125,
-0.0207366943359375,
-0.05328369140625,
-0.01202392578125,
-0.013214111328125,
0.0416259765625,
-0.007659912109375,
-0.037322998046875,
-0.0270233154296875,
0.04998779296875,
0.0272979736328125,
0.053863525390625,
-0.005340576171875,
0.01250457763671875,
0.005542755126953125,
0.04046630859375,
0.0224761962890625,
0.026885986328125,
-0.0231475830078125,
-0.005329132080078125,
0.01174163818359375,
0.026123046875,
-0.017608642578125,
-0.022705078125,
0.031402587890625,
-0.034820556640625,
-0.025634765625,
-0.04327392578125,
-0.0254058837890625,
-0.02099609375,
0.10235595703125,
0.05029296875,
0.023162841796875,
-0.0322265625,
-0.03582763671875,
-0.0258026123046875,
0.036651611328125,
-0.025299072265625,
-0.002132415771484375,
-0.05841064453125,
-0.017822265625,
0.0150299072265625,
-0.0163116455078125,
0.00681304931640625,
-0.0296783447265625,
-0.0264434814453125,
0.002384185791015625,
-0.0217132568359375,
-0.017669677734375,
-0.003978729248046875,
-0.05615234375,
0.0206146240234375,
-0.01212310791015625,
0.0015277862548828125,
-0.0013895034790039062,
0.05364990234375,
0.0038604736328125,
0.035186767578125,
0.019775390625,
-0.019683837890625,
-0.0112457275390625,
0.0222320556640625,
0.0174407958984375,
0.0186004638671875,
-0.027496337890625,
-0.042083740234375,
-0.0132904052734375,
0.01190948486328125,
-0.0204010009765625,
-0.004791259765625,
0.0158843994140625,
0.0312042236328125,
-0.00006520748138427734,
0.06634521484375,
-0.01239013671875,
-0.048858642578125,
-0.0246124267578125,
0.0174560546875,
-0.011138916015625,
-0.0032787322998046875,
0.021636962890625,
-0.028076171875,
0.019256591796875,
0.03912353515625,
0.0889892578125,
-0.00803375244140625,
0.04693603515625,
0.00620269775390625,
0.054107666015625,
0.014923095703125
] |
e1f06ef8eb6bb19be15e5e7cce5fbbe07ce5a75d
|
Wordpress Stackexchange
Q: Disable WYSIWYG editor only when creating a page I read several articles about configuring the WordPress editor. For example, this snippet shows how to permanently set the editor to HTML or WYSIWYG for all contents.
I'm wondering if it's possible to disable the WYSIWYG only when the user is creating a page, leaving it enabled for any other WordPress content type.
A: Try this:
add_filter( 'wp_default_editor', 'rw_default_editor' );
function rw_default_editor( $type ) {
global $post_type;
if('page' == $post_type)
return 'html';
return $type;
}
|
Q: Disable WYSIWYG editor only when creating a page I read several articles about configuring the WordPress editor. For example, this snippet shows how to permanently set the editor to HTML or WYSIWYG for all contents.
I'm wondering if it's possible to disable the WYSIWYG only when the user is creating a page, leaving it enabled for any other WordPress content type.
A: Try this:
add_filter( 'wp_default_editor', 'rw_default_editor' );
function rw_default_editor( $type ) {
global $post_type;
if('page' == $post_type)
return 'html';
return $type;
}
A: The best way to do this is by adding 'user_can_richedit' filter, like so:
add_filter( 'user_can_richedit', 'patrick_user_can_richedit');
function patrick_user_can_richedit($c) {
global $post_type;
if ('page' == $post_type)
return false;
return $c;
}
Hope it's useful ;)
A: Do it like this in your functions.php file:
function remove_post_type_support_for_pages()
{
// UNCOMMENT if you want to remove some stuff
// Replace 'page' with 'post' or a custom post/content type
# remove_post_type_support( 'page', 'title' );
remove_post_type_support( 'page', 'editor' );
# remove_post_type_support( 'page', 'thumbnail' );
# remove_post_type_support( 'page', 'page-attributes' );
# remove_post_type_support( 'page', 'excerpt' );
}
add_action( 'admin_init', 'remove_post_type_support_for_pages' );
A: Add the following to the post.php file inside the wp-admin directory. This code should go just before the function redirect_post() section.
// disable editor (WSYWIG) for the admin page section
if($post_type == 'page')
{
add_filter('user_can_richedit' , create_function('' , 'return false;') , 50);
}
|
wordpress
|
{
"language": "en",
"length": 223,
"provenance": "stackexchange_00019.jsonl.gz:407857",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12370"
}
|
[
0.004100799560546875,
-0.024383544921875,
-0.0307159423828125,
0.007472991943359375,
-0.00719451904296875,
-0.046905517578125,
0.0518798828125,
0.007175445556640625,
-0.01522064208984375,
0.01387786865234375,
0.01406097412109375,
-0.040313720703125,
0.0077056884765625,
-0.050262451171875,
-0.0009484291076660156,
-0.03656005859375,
0.01107025146484375,
0.006175994873046875,
0.0106658935546875,
-0.0287322998046875,
0.023956298828125,
-0.036712646484375,
0.00812530517578125,
0.0341796875,
0.01053619384765625,
0.005954742431640625,
0.06256103515625,
0.0158538818359375,
-0.004772186279296875,
-0.0094451904296875,
0.0191192626953125,
-0.00848388671875,
0.0129547119140625,
0.03692626953125,
-0.040313720703125,
-0.0002541542053222656,
-0.033477783203125,
0.0221099853515625,
0.00833892822265625,
0.0030231475830078125,
0.006549835205078125,
-0.0021514892578125,
-0.0151824951171875,
-0.01010894775390625,
-0.01500701904296875,
-0.051910400390625,
0.032318115234375,
-0.036468505859375,
0.01374053955078125,
-0.0207366943359375,
-0.02825927734375,
0.05230712890625,
0.0084686279296875,
-0.048614501953125,
-0.015380859375,
-0.0189056396484375,
0.006374359130859375,
-0.00704193115234375,
0.018341064453125,
0.007534027099609375,
-0.003108978271484375,
0.0189971923828125,
0.002063751220703125,
-0.004802703857421875,
0.0115203857421875,
0.00414276123046875,
-0.03369140625,
0.033660888671875,
-0.050994873046875,
0.01320648193359375,
0.0190582275390625,
-0.0765380859375,
0.0143890380859375,
-0.04278564453125,
0.026123046875,
0.0289306640625,
-0.0250701904296875,
0.0037708282470703125,
0.0245819091796875,
-0.0080413818359375,
0.053741455078125,
0.033111572265625,
0.006443023681640625,
-0.0435791015625,
0.03387451171875,
-0.01009368896484375,
-0.0088043212890625,
-0.0202789306640625,
-0.0235748291015625,
-0.003871917724609375,
-0.017974853515625,
0.03875732421875,
-0.0217742919921875,
-0.01824951171875,
-0.0105133056640625,
-0.0215301513671875,
0.010589599609375,
0.004520416259765625,
-0.00193023681640625,
0.0172119140625,
0.0313720703125,
-0.06829833984375,
0.08642578125,
-0.0523681640625,
0.01486968994140625,
0.03759765625,
-0.0220489501953125,
-0.03582763671875,
0.041839599609375,
0.0201873779296875,
0.01053619384765625,
0.0133514404296875,
0.007419586181640625,
0.0004513263702392578,
0.006435394287109375,
-0.0088958740234375,
-0.02960205078125,
0.035125732421875,
0.0005774497985839844,
0.015869140625,
-0.006259918212890625,
0.02294921875,
-0.00007545948028564453,
-0.06524658203125,
0.0157012939453125,
-0.0038604736328125,
-0.00455474853515625,
-0.03155517578125,
0.049407958984375,
-0.032562255859375,
-0.04937744140625,
0.0182037353515625,
0.10137939453125,
0.0653076171875,
0.057647705078125,
-0.0009393692016601562,
0.004055023193359375,
-0.03875732421875,
-0.00817108154296875,
0.05047607421875,
-0.05889892578125,
-0.055999755859375,
0.019195556640625,
-0.0247955322265625,
-0.040924072265625,
0.04766845703125,
0.014678955078125,
0.005741119384765625,
0.00006663799285888672,
-0.08160400390625,
-0.02020263671875,
-0.021453857421875,
0.01488494873046875,
0.0177001953125,
0.0194854736328125,
-0.04925537109375,
0.0379638671875,
-0.03662109375,
0.0170135498046875,
-0.03887939453125,
0.0067901611328125,
0.0128936767578125,
0.021636962890625,
-0.031829833984375,
-0.038177490234375,
-0.019561767578125,
-0.0251312255859375,
-0.0030422210693359375,
0.017730712890625,
-0.005878448486328125,
-0.00276947021484375,
-0.0364990234375,
0.0007672309875488281,
-0.00351715087890625,
-0.0063018798828125,
0.045745849609375,
0.001018524169921875,
-0.024169921875,
0.006336212158203125,
0.046112060546875,
-0.0010328292846679688,
-0.027862548828125,
0.0132904052734375,
-0.00196075439453125,
-0.08587646484375,
0.01201629638671875,
-0.00328826904296875,
0.039825439453125,
0.055419921875,
0.005523681640625,
0.0579833984375,
-0.01137542724609375,
-0.0023040771484375,
-0.0218658447265625,
0.026824951171875,
-0.049407958984375,
-0.038238525390625,
-0.048797607421875,
-0.0029697418212890625,
0.029083251953125,
0.0799560546875,
-0.02178955078125,
0.020477294921875,
-0.063232421875,
-0.1033935546875,
-0.01519012451171875,
-0.0242156982421875,
0.037200927734375,
-0.0002460479736328125,
-0.0200347900390625,
0.0161590576171875,
-0.0204925537109375,
-0.007518768310546875,
-0.015533447265625,
-0.051025390625,
0.0036487579345703125,
0.01116180419921875,
0.08782958984375,
0.0272216796875,
0.048797607421875,
0.0237579345703125,
-0.0296783447265625,
0.046844482421875,
-0.0149383544921875,
0.053253173828125,
-0.022308349609375,
-0.0092926025390625,
-0.0130462646484375,
0.061065673828125,
-0.007602691650390625,
0.01393890380859375,
0.0298919677734375,
0.005771636962890625,
0.006214141845703125,
-0.03131103515625,
-0.00849151611328125,
-0.03533935546875,
-0.07025146484375,
0.00864410400390625,
0.0697021484375,
0.03802490234375,
0.054473876953125,
0.01213836669921875,
0.01971435546875,
0.057037353515625,
-0.0293121337890625,
0.0184478759765625,
-0.01213836669921875,
0.037750244140625,
0.06866455078125,
-0.030975341796875,
-0.0012617111206054688,
0.0142669677734375,
-0.033477783203125,
0.006778717041015625,
0.036956787109375,
-0.00939178466796875,
0.012176513671875,
0.041290283203125,
-0.0259246826171875,
0.00457763671875,
0.0054779052734375,
-0.0038242340087890625,
-0.0196533203125,
0.023956298828125,
0.017852783203125,
0.02313232421875,
0.017578125,
-0.04144287109375,
0.02569580078125,
0.0260009765625,
-0.0023365020751953125,
-0.004528045654296875,
0.0299530029296875,
0.07635498046875,
-0.05120849609375,
-0.04913330078125,
-0.0187530517578125,
0.029205322265625,
0.0257110595703125,
-0.028045654296875,
-0.01235198974609375,
0.0003299713134765625,
-0.01201629638671875,
0.0144500732421875,
-0.066650390625,
0.0294036865234375,
-0.025726318359375,
0.015228271484375,
-0.004550933837890625,
0.0121612548828125,
0.0018815994262695312,
-0.012542724609375,
0.0214691162109375,
0.023101806640625,
-0.029693603515625,
0.0068206787109375,
-0.0103302001953125,
0.0265350341796875,
-0.0193023681640625,
0.0258026123046875,
0.04583740234375,
-0.0197296142578125,
0.01107025146484375,
0.00960540771484375,
-0.0291900634765625,
0.018829345703125,
-0.006900787353515625,
-0.0254058837890625,
0.042999267578125,
-0.125732421875,
-0.01421356201171875,
0.0012416839599609375,
0.00861358642578125,
-0.0173797607421875,
-0.028533935546875,
-0.0018815994262695312,
-0.001071929931640625,
-0.01151275634765625,
0.0031909942626953125,
-0.01294708251953125,
-0.059234619140625,
-0.01161956787109375,
0.00102996826171875,
-0.0264892578125,
0.0061187744140625,
0.02496337890625,
0.00884246826171875,
-0.0167694091796875,
-0.0010557174682617188,
-0.033599853515625,
-0.047760009765625,
-0.04388427734375,
-0.05145263671875,
-0.0221710205078125,
-0.0036106109619140625,
0.012481689453125,
0.068359375,
0.0093994140625,
-0.059112548828125,
0.00807952880859375,
-0.05029296875,
-0.0256805419921875,
0.030181884765625,
-0.00351715087890625,
-0.004947662353515625,
0.031097412109375,
0.00872802734375,
-0.00321197509765625,
0.01203155517578125,
0.0018186569213867188,
-0.0305633544921875,
0.00734710693359375,
0.01436614990234375,
0.01068878173828125,
0.0178985595703125,
-0.00461578369140625,
-0.00994110107421875,
0.00887298583984375,
-0.04437255859375,
-0.00234222412109375,
-0.0023822784423828125,
-0.032135009765625,
0.0233154296875,
-0.007659912109375,
-0.010894775390625,
0.0028400421142578125,
0.01541900634765625,
-0.00388336181640625,
0.02618408203125,
0.0535888671875,
-0.0198516845703125,
0.013427734375,
-0.0240325927734375,
-0.03717041015625,
-0.03973388671875,
0.046539306640625,
-0.02960205078125,
0.01654052734375,
0.00501251220703125,
-0.028045654296875,
-0.01180267333984375,
-0.0303192138671875,
-0.0270538330078125,
-0.03216552734375,
0.0206756591796875,
-0.044769287109375,
-0.01229095458984375,
-0.0011816024780273438,
0.0045013427734375,
0.0306549072265625,
0.054840087890625,
-0.04559326171875,
0.0037708282470703125,
-0.01690673828125,
-0.0007467269897460938,
-0.03289794921875,
-0.054229736328125,
-0.052215576171875,
0.00213623046875,
-0.041961669921875,
0.048309326171875,
-0.005458831787109375,
0.006542205810546875,
-0.03466796875,
0.00501251220703125,
-0.01702880859375,
-0.0350341796875,
0.02288818359375,
-0.042266845703125,
-0.01522064208984375,
0.049560546875,
-0.0364990234375,
0.01523590087890625,
-0.007404327392578125,
-0.042205810546875,
-0.0821533203125,
-0.00215911865234375,
-0.04913330078125,
0.06591796875,
0.01149749755859375,
0.0272064208984375,
-0.01849365234375,
0.043975830078125,
0.0260009765625,
-0.005084991455078125,
0.02374267578125,
0.00978851318359375,
-0.0306396484375,
-0.00006586313247680664,
0.0294647216796875,
-0.04144287109375,
0.01507568359375,
0.00836181640625,
-0.0215911865234375,
-0.0002734661102294922,
-0.049591064453125,
-0.0255889892578125,
-0.00982666015625,
-0.0304107666015625,
-0.01026153564453125,
-0.036712646484375,
-0.059661865234375,
0.049774169921875,
-0.0293121337890625,
-0.0061187744140625,
-0.059906005859375,
-0.06292724609375,
0.056793212890625,
-0.027587890625,
-0.01287078857421875,
-0.004192352294921875,
0.07025146484375,
0.0220947265625,
-0.01311492919921875,
0.0104522705078125,
0.01500701904296875,
0.029571533203125,
0.031494140625,
0.024139404296875,
0.007472991943359375,
-0.02520751953125,
0.03314208984375,
0.0161285400390625,
0.01352691650390625,
-0.056854248046875,
0.0498046875,
-0.02239990234375,
-0.0299224853515625,
0.0372314453125,
-0.0203094482421875,
0.034332275390625,
0.031585693359375,
0.0161590576171875,
0.006565093994140625,
0.051727294921875,
-0.01100921630859375,
-0.003505706787109375,
-0.0548095703125,
-0.00888824462890625,
0.01555633544921875,
-0.0157012939453125,
0.03680419921875,
0.0148773193359375,
0.0311126708984375,
0.00386810302734375,
-0.0233154296875,
0.01219940185546875,
-0.0053863525390625,
0.0254669189453125,
0.01084136962890625,
0.0100250244140625,
0.013519287109375,
0.03875732421875,
-0.0020351409912109375,
-0.004131317138671875,
-0.0035762786865234375,
0.003528594970703125,
-0.01262664794921875,
-0.039794921875,
-0.020599365234375,
0.005924224853515625,
0.017791748046875,
0.03179931640625,
-0.008636474609375,
0.025665283203125,
0.00037407875061035156,
-0.006298065185546875,
0.007537841796875,
0.0004668235778808594,
-0.01190948486328125,
-0.034393310546875,
0.0036563873291015625,
-0.002674102783203125,
-0.01611328125,
0.035797119140625,
0.00826263427734375,
-0.005245208740234375,
0.02215576171875,
-0.0026149749755859375,
0.01497650146484375,
0.01666259765625,
-0.0013256072998046875,
0.011810302734375,
0.039794921875,
-0.01116180419921875,
-0.0245208740234375,
0.0208892822265625,
-0.0596923828125,
-0.041656494140625,
0.024200439453125,
0.06732177734375,
-0.0263671875,
-0.02532958984375,
0.021820068359375,
-0.017059326171875,
0.00478363037109375,
0.01013946533203125,
-0.03375244140625,
-0.06085205078125,
0.00855255126953125,
0.0048065185546875,
-0.0105743408203125,
-0.033935546875,
-0.0150909423828125,
0.0108795166015625,
-0.033905029296875,
-0.0023365020751953125,
0.003414154052734375,
-0.05224609375,
-0.00812530517578125,
0.0031299591064453125,
-0.025848388671875,
-0.0107269287109375,
0.00849151611328125,
-0.07232666015625,
-0.0227813720703125,
0.0014553070068359375,
0.00722503662109375,
0.0271453857421875,
-0.0278472900390625,
0.034942626953125,
-0.037628173828125,
-0.0014524459838867188,
-0.0228424072265625,
0.0179290771484375,
0.03485107421875,
0.01568603515625,
-0.020904541015625,
-0.01314544677734375,
-0.06695556640625,
-0.021942138671875,
-0.044647216796875,
-0.04638671875,
-0.044586181640625,
-0.005466461181640625,
0.006542205810546875,
0.0117645263671875,
0.00801849365234375,
-0.00521087646484375,
-0.0306549072265625,
0.03271484375,
0.024688720703125,
0.0657958984375,
-0.01468658447265625,
0.06884765625,
-0.034942626953125,
0.042449951171875,
-0.0133056640625,
0.014312744140625,
-0.006130218505859375,
-0.00572967529296875,
0.0209503173828125,
-0.0236358642578125,
-0.043914794921875,
-0.01493072509765625,
-0.046783447265625,
0.017486572265625,
0.06353759765625,
-0.01708984375,
0.012451171875,
-0.030853271484375,
-0.0023441314697265625,
-0.0252685546875,
0.002506256103515625,
-0.041961669921875,
0.0009765625,
-0.01009368896484375,
-0.0275421142578125,
-0.004009246826171875,
-0.0143585205078125,
-0.0239105224609375,
0.051666259765625,
-0.003162384033203125,
0.032379150390625,
0.0030231475830078125,
-0.0224609375,
0.0322265625,
0.0274810791015625,
-0.0096893310546875,
0.0369873046875,
0.002429962158203125,
0.01380157470703125,
0.015655517578125,
0.0230712890625,
-0.04901123046875,
-0.0273590087890625,
0.0221405029296875,
0.0108795166015625,
0.013885498046875,
0.0297698974609375,
0.0038318634033203125,
0.024566650390625,
0.12347412109375,
0.0980224609375,
-0.1392822265625,
-0.0002117156982421875,
0.0240478515625,
-0.0199737548828125,
0.0077056884765625,
-0.03717041015625,
0.004650115966796875,
-0.04296875,
0.07989501953125,
-0.030426025390625,
-0.0213623046875,
0.021331787109375,
-0.05224609375,
-0.001285552978515625,
-0.021484375,
0.065673828125,
0.0144195556640625,
0.000926971435546875,
-0.00943756103515625,
0.0188140869140625,
-0.010528564453125,
-0.0281524658203125,
0.01068115234375,
-0.01113128662109375,
-0.0027332305908203125,
-0.062744140625,
0.00576019287109375,
-0.0107879638671875,
0.0031261444091796875,
0.03094482421875,
-0.0239105224609375,
0.0027866363525390625,
0.05413818359375,
-0.048431396484375,
0.048431396484375,
0.0169677734375,
-0.038238525390625,
-0.0400390625,
-0.032135009765625,
-0.001239776611328125,
0.0197601318359375,
-0.04254150390625,
0.03271484375,
0.0009274482727050781,
-0.03704833984375,
0.00708770751953125,
0.033172607421875,
0.0640869140625,
-0.0026531219482421875,
-0.0478515625,
0.0229949951171875,
-0.0009245872497558594,
-0.0018129348754882812,
-0.0511474609375,
-0.03253173828125,
-0.0275115966796875,
0.013763427734375,
-0.06903076171875,
-0.03240966796875,
0.018951416015625,
-0.0848388671875,
-0.057373046875,
0.09661865234375,
-0.007659912109375,
0.02386474609375,
0.0097198486328125,
0.04083251953125,
-0.042877197265625,
0.0099945068359375,
-0.01171875,
0.01090240478515625,
-0.0072479248046875,
0.039337158203125,
0.00003612041473388672,
0.004444122314453125,
0.02691650390625,
0.03826904296875,
0.0355224609375,
-0.0004303455352783203,
0.01464080810546875,
-0.001041412353515625,
0.0269622802734375,
0.0239105224609375,
-0.0264892578125,
0.007747650146484375,
0.004299163818359375,
0.016387939453125,
0.0208282470703125,
-0.0305023193359375,
0.0340576171875,
-0.046783447265625,
-0.003997802734375,
0.01776123046875,
0.002872467041015625,
-0.021240234375,
-0.006404876708984375,
0.0036373138427734375,
-0.0640869140625,
0.0159149169921875,
0.020263671875,
0.01546478271484375,
-0.0172882080078125,
0.03802490234375,
0.054168701171875,
-0.08160400390625,
-0.006107330322265625,
-0.047882080078125,
0.054656982421875,
0.0384521484375,
-0.06036376953125,
0.01348114013671875,
0.005645751953125,
-0.06781005859375,
0.0170440673828125,
-0.0167388916015625,
0.036346435546875,
-0.0128173828125,
-0.007282257080078125,
-0.0192413330078125,
0.0120086669921875,
-0.04632568359375,
-0.0244140625,
-0.0027027130126953125,
-0.0164642333984375,
0.0005950927734375,
-0.01039886474609375,
0.019866943359375,
0.0302276611328125,
0.012298583984375,
-0.00423431396484375,
0.04248046875,
-0.0194244384765625,
0.02435302734375,
-0.00818634033203125,
0.0159149169921875,
-0.0034160614013671875,
-0.0026912689208984375,
-0.0196990966796875,
-0.0008287429809570312,
0.01367950439453125,
0.0299835205078125,
-0.017852783203125,
-0.027618408203125,
0.02532958984375,
0.031585693359375,
0.0211181640625,
0.0288848876953125,
0.002666473388671875,
-0.0035190582275390625,
-0.060272216796875,
0.039825439453125,
-0.004673004150390625,
0.07366943359375,
-0.06829833984375,
0.004001617431640625,
-0.001094818115234375,
0.038482666015625,
0.0279541015625,
0.0212249755859375,
0.057891845703125,
0.03387451171875,
-0.01119232177734375,
-0.0006718635559082031,
0.02093505859375,
-0.0115203857421875,
-0.0106353759765625,
-0.01190185546875,
0.0006914138793945312,
0.02691650390625,
0.0022640228271484375,
-0.01165008544921875,
0.0287322998046875,
0.0361328125,
0.01265716552734375,
-0.0227203369140625,
0.020111083984375,
-0.0280914306640625,
0.06365966796875,
0.02001953125,
0.0255126953125,
0.039642333984375,
-0.0731201171875,
-0.004558563232421875,
-0.03485107421875,
-0.058319091796875,
0.03240966796875,
0.039703369140625,
-0.060791015625,
0.046783447265625,
0.031097412109375,
0.00934600830078125,
0.021484375,
-0.0183563232421875,
-0.007579803466796875,
-0.0086212158203125,
0.023284912109375,
-0.00580596923828125,
-0.0517578125,
-0.0231170654296875,
-0.0293121337890625,
0.039276123046875,
0.00022411346435546875,
0.08123779296875,
-0.0253448486328125,
0.0240325927734375,
0.0186309814453125,
0.0268096923828125,
0.0016231536865234375,
-0.01035308837890625,
0.0296478271484375,
0.01457977294921875,
0.023956298828125,
-0.02435302734375,
-0.033966064453125,
0.052337646484375,
0.001300811767578125,
0.004940032958984375,
0.031646728515625,
-0.0399169921875,
0.00727081298828125,
0.01953125,
-0.00896453857421875,
-0.030059814453125,
-0.0204620361328125,
-0.047882080078125,
-0.00923919677734375,
0.0157928466796875,
-0.0176849365234375,
-0.0207366943359375,
0.01169586181640625,
0.0136871337890625,
-0.029296875,
0.0146026611328125,
-0.01297760009765625,
-0.01398468017578125,
0.01505279541015625,
0.034088134765625,
-0.033782958984375,
0.00893402099609375,
-0.0030364990234375,
-0.030487060546875,
0.0285186767578125,
-0.0036220550537109375,
0.006397247314453125,
-0.050079345703125,
0.02197265625,
0.020599365234375,
0.061492919921875,
0.0014524459838867188,
0.0153045654296875,
0.0033168792724609375,
0.002410888671875,
-0.01290130615234375,
-0.04241943359375,
-0.0153961181640625,
-0.0142059326171875,
0.00720977783203125,
0.0389404296875,
-0.00861358642578125,
-0.04119873046875,
-0.062744140625,
-0.0007948875427246094,
0.0244140625,
-0.00878143310546875,
-0.044586181640625,
0.0225372314453125,
-0.0199127197265625,
0.0491943359375,
-0.016571044921875,
0.0140533447265625,
-0.00592803955078125,
0.006313323974609375,
-0.045257568359375,
-0.028900146484375,
-0.0300140380859375,
0.0257720947265625,
-0.036712646484375,
0.0214691162109375,
0.0777587890625,
-0.0189971923828125,
-0.0284881591796875,
0.007587432861328125,
-0.01239013671875,
0.060455322265625,
-0.062347412109375,
-0.005279541015625,
-0.0099029541015625,
0.00565338134765625,
-0.0061798095703125,
-0.06219482421875,
-0.00506591796875,
-0.03961181640625,
-0.00765228271484375,
0.01026153564453125,
-0.01248931884765625,
0.0286407470703125,
-0.044708251953125,
-0.09173583984375,
0.006168365478515625,
-0.00582122802734375,
-0.051513671875,
0.0338134765625,
-0.0149993896484375,
-0.019317626953125,
0.0126495361328125,
0.01209259033203125,
-0.0307159423828125,
0.00635528564453125,
-0.0013132095336914062,
0.005825042724609375,
0.0321044921875,
0.0261993408203125,
-0.0153656005859375,
-0.0223388671875,
-0.0118560791015625,
-0.024383544921875,
-0.006320953369140625,
-0.01076507568359375,
0.0203094482421875,
0.005950927734375,
0.03863525390625,
-0.0236053466796875,
-0.01468658447265625,
-0.0015878677368164062,
-0.007198333740234375,
-0.0157623291015625,
-0.0013246536254882812,
-0.03369140625,
-0.01514434814453125,
0.0946044921875,
0.061737060546875,
0.0298919677734375,
-0.0193328857421875,
0.01026153564453125,
-0.045257568359375,
-0.03582763671875,
0.0158538818359375,
0.01081085205078125,
-0.027984619140625,
0.0215606689453125,
0.016204833984375,
-0.01345062255859375,
0.030181884765625,
-0.015289306640625,
-0.021759033203125,
-0.00315093994140625,
-0.01374053955078125,
-0.003810882568359375,
-0.05889892578125,
0.01617431640625,
0.00067901611328125,
-0.018707275390625,
0.0269317626953125,
-0.01129913330078125,
0.00391387939453125,
0.007965087890625,
0.03912353515625,
-0.033050537109375,
0.0008072853088378906,
-0.0244903564453125,
0.037628173828125,
-0.022125244140625,
0.0142059326171875,
-0.0372314453125,
0.0309906005859375,
0.004138946533203125,
0.0120391845703125,
-0.01788330078125,
0.0211639404296875,
0.0091705322265625,
0.0167083740234375,
-0.0005755424499511719,
-0.01419830322265625,
-0.0178680419921875,
-0.007610321044921875,
-0.0184326171875,
0.018829345703125,
-0.024688720703125,
0.0125885009765625,
0.00154876708984375,
-0.005859375,
0.01361846923828125,
0.045257568359375,
0.021240234375,
-0.029144287109375,
0.0191497802734375,
-0.060211181640625,
0.04327392578125,
-0.00897216796875
] |
d15e1c5f39360ed07ded8dc51d4bc343250f431a
|
Wordpress Stackexchange
Q: Programmatically get images by URL and save in uploads folder I am involved in a large migration from another CMS to WordPress. We have a copy of the database and have worked out how to extract the content and programmatically create WordPress posts from it using an instantiation of the wpdb class.
However, there are a couple of thousand images which we would like to pull across automatically, generate the various sizes, and then attach to the posts, to save about a week's work!
Is there a way I can get an image from a remote site by URL and save it in my wp-uploads folder? I guess this uses wp_http but I'm unfamiliar with that.
Once I've got the image and saved it I'm ok as I can then use wp_generate_attachment_metadata to create the various sizes and wp_insert_attachment to attach it to a post.
Thanks
Simon
A: John's answer is correct re: using media_sideload_image, just note that you may need to require these scripts before if you aren't doing this within the context of WP Admin:
require_once(ABSPATH . 'wp-admin/includes/media.php');
require_once(ABSPATH . 'wp-admin/includes/file.php');
require_once(ABSPATH . 'wp-admin/includes/image.php');
See https://codex.wordpress.org/Function_Reference/media_sideload_image#Notes
|
Q: Programmatically get images by URL and save in uploads folder I am involved in a large migration from another CMS to WordPress. We have a copy of the database and have worked out how to extract the content and programmatically create WordPress posts from it using an instantiation of the wpdb class.
However, there are a couple of thousand images which we would like to pull across automatically, generate the various sizes, and then attach to the posts, to save about a week's work!
Is there a way I can get an image from a remote site by URL and save it in my wp-uploads folder? I guess this uses wp_http but I'm unfamiliar with that.
Once I've got the image and saved it I'm ok as I can then use wp_generate_attachment_metadata to create the various sizes and wp_insert_attachment to attach it to a post.
Thanks
Simon
A: John's answer is correct re: using media_sideload_image, just note that you may need to require these scripts before if you aren't doing this within the context of WP Admin:
require_once(ABSPATH . 'wp-admin/includes/media.php');
require_once(ABSPATH . 'wp-admin/includes/file.php');
require_once(ABSPATH . 'wp-admin/includes/image.php');
See https://codex.wordpress.org/Function_Reference/media_sideload_image#Notes
A: There's actually a great function that will do all three of those things for you:
media_sideload_image( $url, $post_id, $description );
The first argument is the remote url of the image you want to download. The second argument is the post id of the post to which you want to attach the image. The third argument is optional, but will be a description if included.
I'd suggest finding a way to throttle the downloads so that you don't keep timing out, such as limiting the number of images it pulls in per load and setting the importer to refresh itself between downloads, or using AJAX to do them one at a time asynchronously.
|
wordpress
|
{
"language": "en",
"length": 302,
"provenance": "stackexchange_00019.jsonl.gz:407860",
"question_score": "16",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12379"
}
|
[
0.08502197265625,
-0.018707275390625,
0.04974365234375,
-0.041717529296875,
0.014434814453125,
-0.0261993408203125,
0.0745849609375,
-0.03179931640625,
0.00043272972106933594,
0.01384735107421875,
-0.031097412109375,
-0.00795745849609375,
-0.0263671875,
-0.009033203125,
-0.00551605224609375,
-0.0311737060546875,
0.057342529296875,
-0.034912109375,
0.045745849609375,
0.025146484375,
-0.0208282470703125,
0.07025146484375,
0.037811279296875,
0.00032639503479003906,
-0.00794219970703125,
0.01467132568359375,
0.04278564453125,
-0.00963592529296875,
0.00157928466796875,
-0.0137786865234375,
0.01337432861328125,
0.0114593505859375,
0.031494140625,
-0.0243377685546875,
0.022186279296875,
0.00616455078125,
0.0018215179443359375,
-0.0081939697265625,
-0.0161895751953125,
0.016021728515625,
0.0175933837890625,
-0.0118560791015625,
0.05975341796875,
0.01904296875,
0.01458740234375,
0.0079498291015625,
-0.007793426513671875,
-0.056549072265625,
0.0011434555053710938,
0.045257568359375,
0.0309906005859375,
-0.017608642578125,
0.0265350341796875,
0.03192138671875,
-0.0099334716796875,
-0.0261077880859375,
-0.00872039794921875,
0.022979736328125,
0.048583984375,
-0.056182861328125,
-0.07891845703125,
-0.049041748046875,
0.05224609375,
0.006404876708984375,
0.01605224609375,
0.002410888671875,
0.0302581787109375,
0.03466796875,
-0.06231689453125,
-0.031829833984375,
0.0138397216796875,
-0.035491943359375,
-0.0183868408203125,
-0.0298004150390625,
-0.005474090576171875,
0.0278472900390625,
0.0027408599853515625,
-0.004547119140625,
-0.00005644559860229492,
0.01279449462890625,
0.01690673828125,
0.007781982421875,
-0.042327880859375,
-0.00666046142578125,
0.0280609130859375,
0.0126190185546875,
-0.0018358230590820312,
-0.023193359375,
-0.037750244140625,
0.01314544677734375,
-0.02874755859375,
-0.00008153915405273438,
-0.029022216796875,
0.0204010009765625,
-0.00753021240234375,
-0.009185791015625,
0.004428863525390625,
0.012451171875,
0.005889892578125,
0.04290771484375,
-0.0158843994140625,
-0.047454833984375,
0.053070068359375,
-0.03558349609375,
0.019256591796875,
-0.0015230178833007812,
-0.02490234375,
-0.061676025390625,
0.0303192138671875,
0.034210205078125,
-0.0119171142578125,
0.035186767578125,
-0.01137542724609375,
-0.0298004150390625,
0.0030670166015625,
0.05035400390625,
-0.019256591796875,
0.0188751220703125,
0.00785064697265625,
0.0193634033203125,
-0.03436279296875,
-0.0218353271484375,
-0.0020313262939453125,
-0.0003039836883544922,
0.03057861328125,
0.016021728515625,
-0.0172119140625,
0.0020656585693359375,
-0.0234222412109375,
0.021484375,
-0.036224365234375,
0.01995849609375,
0.057220458984375,
0.0034084320068359375,
-0.00946807861328125,
-0.01406097412109375,
0.001373291015625,
-0.018707275390625,
-0.0030231475830078125,
0.0158233642578125,
0.0289459228515625,
-0.02142333984375,
-0.0084381103515625,
0.001110076904296875,
-0.01444244384765625,
0.03228759765625,
0.0034503936767578125,
0.0021190643310546875,
-0.00649261474609375,
-0.061492919921875,
0.0138702392578125,
-0.033111572265625,
0.00505828857421875,
0.017578125,
0.0360107421875,
-0.00827789306640625,
0.07794189453125,
-0.05914306640625,
0.01091766357421875,
-0.046295166015625,
0.029388427734375,
-0.00447845458984375,
0.00479888916015625,
0.005161285400390625,
-0.00917816162109375,
-0.00818634033203125,
-0.044342041015625,
-0.01031494140625,
0.0303955078125,
-0.0172119140625,
0.018157958984375,
-0.0242919921875,
0.026123046875,
0.028717041015625,
0.01126861572265625,
0.04736328125,
0.01169586181640625,
0.0162353515625,
0.0172271728515625,
0.038177490234375,
-0.0186767578125,
-0.0253143310546875,
0.0606689453125,
-0.023406982421875,
-0.035064697265625,
0.00014102458953857422,
0.0006070137023925781,
0.03173828125,
0.0302276611328125,
0.021270751953125,
-0.01134490966796875,
0.0013828277587890625,
-0.0126190185546875,
0.035186767578125,
-0.01739501953125,
-0.03741455078125,
-0.025238037109375,
-0.0084686279296875,
-0.030975341796875,
0.004489898681640625,
0.01125335693359375,
-0.025543212890625,
0.02862548828125,
0.0213165283203125,
-0.01300048828125,
0.0014371871948242188,
-0.01010894775390625,
-0.0078277587890625,
0.00592041015625,
0.00952911376953125,
0.0058746337890625,
0.02288818359375,
-0.004398345947265625,
-0.0804443359375,
-0.028533935546875,
0.013824462890625,
-0.0162353515625,
0.034698486328125,
-0.0002532005310058594,
0.0645751953125,
-0.024810791015625,
-0.013397216796875,
-0.033935546875,
-0.010498046875,
0.0186767578125,
0.0160369873046875,
-0.0191497802734375,
-0.002044677734375,
0.0225677490234375,
0.01107025146484375,
0.002017974853515625,
0.01702880859375,
-0.028472900390625,
-0.005306243896484375,
-0.0093994140625,
-0.0166168212890625,
-0.007648468017578125,
-0.0703125,
0.023406982421875,
0.052490234375,
0.03955078125,
0.026519775390625,
0.007350921630859375,
0.006664276123046875,
0.059539794921875,
-0.00588226318359375,
0.0283050537109375,
-0.018890380859375,
-0.017730712890625,
-0.0172119140625,
0.019866943359375,
-0.013214111328125,
0.01105499267578125,
-0.119140625,
0.01136016845703125,
0.0305938720703125,
-0.032623291015625,
-0.023284912109375,
-0.042236328125,
0.0303192138671875,
0.01450347900390625,
-0.0088348388671875,
-0.003559112548828125,
-0.012664794921875,
-0.01541900634765625,
0.031585693359375,
0.0233001708984375,
0.013824462890625,
-0.01611328125,
0.017333984375,
0.006069183349609375,
-0.03253173828125,
-0.0026035308837890625,
0.01456451416015625,
0.021881103515625,
-0.0015935897827148438,
-0.04339599609375,
0.0013980865478515625,
0.030853271484375,
0.00547027587890625,
-0.0036144256591796875,
0.00023996829986572266,
-0.006664276123046875,
-0.006130218505859375,
-0.01065826416015625,
-0.063720703125,
0.033447265625,
0.036376953125,
0.0174713134765625,
0.0062103271484375,
0.03338623046875,
0.00379180908203125,
0.004673004150390625,
0.00031447410583496094,
0.0142059326171875,
-0.019073486328125,
0.044830322265625,
-0.020172119140625,
0.01885986328125,
-0.0017118453979492188,
0.07330322265625,
0.05712890625,
-0.01434326171875,
0.0212249755859375,
-0.0079193115234375,
0.01110076904296875,
0.0013942718505859375,
0.02142333984375,
0.0020809173583984375,
-0.03045654296875,
-0.0338134765625,
-0.03466796875,
0.01215362548828125,
0.01128387451171875,
-0.0201873779296875,
-0.054046630859375,
-0.003307342529296875,
-0.0192108154296875,
-0.09478759765625,
-0.069580078125,
-0.0270233154296875,
-0.07470703125,
-0.0234527587890625,
0.0241851806640625,
-0.039794921875,
0.01270294189453125,
0.0462646484375,
0.003299713134765625,
-0.0275421142578125,
0.00928497314453125,
-0.0298309326171875,
-0.04241943359375,
-0.057220458984375,
-0.0168914794921875,
-0.005001068115234375,
0.01016998291015625,
-0.0015459060668945312,
0.0179901123046875,
0.0019254684448242188,
-0.02099609375,
0.01270294189453125,
0.045867919921875,
-0.01548004150390625,
-0.0341796875,
-0.02325439453125,
-0.0129241943359375,
0.0133819580078125,
-0.0223541259765625,
0.059722900390625,
0.0276947021484375,
-0.024169921875,
0.0173492431640625,
-0.0391845703125,
-0.0283355712890625,
-0.01351165771484375,
-0.0108489990234375,
0.035125732421875,
-0.0297698974609375,
-0.0156402587890625,
-0.058807373046875,
-0.00925445556640625,
-0.0214996337890625,
-0.040008544921875,
0.050567626953125,
0.003559112548828125,
0.0004661083221435547,
0.015106201171875,
0.0197906494140625,
0.024444580078125,
0.0239410400390625,
0.0086822509765625,
-0.01097869873046875,
0.0092315673828125,
-0.01904296875,
0.005710601806640625,
-0.01467132568359375,
0.037261962890625,
-0.0003943443298339844,
0.0009021759033203125,
0.01523590087890625,
0.03155517578125,
-0.00965118408203125,
-0.00878143310546875,
-0.04681396484375,
-0.042938232421875,
0.053070068359375,
0.0004849433898925781,
0.02117919921875,
-0.017547607421875,
-0.022705078125,
-0.0017919540405273438,
0.07293701171875,
0.004024505615234375,
-0.030181884765625,
-0.011016845703125,
0.0139312744140625,
-0.0455322265625,
-0.05352783203125,
-0.00726318359375,
-0.000029265880584716797,
-0.06475830078125,
-0.024993896484375,
-0.005275726318359375,
-0.05517578125,
0.04815673828125,
-0.071044921875,
-0.014617919921875,
-0.05523681640625,
0.0247344970703125,
-0.04327392578125,
0.029937744140625,
0.01461029052734375,
0.01061248779296875,
-0.015472412109375,
0.000244140625,
-0.053131103515625,
-0.125244140625,
0.0018663406372070312,
-0.039459228515625,
0.06707763671875,
0.00009047985076904297,
0.0242156982421875,
-0.032440185546875,
0.0418701171875,
0.0024356842041015625,
-0.0059661865234375,
0.007419586181640625,
0.02093505859375,
0.007076263427734375,
-0.009735107421875,
0.0070648193359375,
-0.0328369140625,
-0.037261962890625,
-0.06671142578125,
-0.031036376953125,
-0.028289794921875,
-0.006561279296875,
0.01404571533203125,
-0.005535125732421875,
0.0014286041259765625,
-0.016387939453125,
0.005809783935546875,
0.010894775390625,
0.039520263671875,
-0.01013946533203125,
-0.00826263427734375,
-0.019256591796875,
-0.017242431640625,
0.0311126708984375,
-0.0087738037109375,
-0.004932403564453125,
0.016510009765625,
0.07305908203125,
0.0045013427734375,
-0.01076507568359375,
-0.0872802734375,
-0.007045745849609375,
0.0296478271484375,
-0.024169921875,
0.058197021484375,
0.031158447265625,
-0.006519317626953125,
0.0594482421875,
0.0168304443359375,
0.0263671875,
0.0096435546875,
0.0243682861328125,
0.005977630615234375,
-0.0063629150390625,
0.01535797119140625,
0.02655029296875,
-0.05242919921875,
0.0269317626953125,
-0.0298614501953125,
-0.0003571510314941406,
-0.02459716796875,
0.03692626953125,
-0.0157470703125,
0.0187530517578125,
-0.048065185546875,
-0.055511474609375,
0.005352020263671875,
-0.0268402099609375,
0.03302001953125,
0.0169525146484375,
-0.0017185211181640625,
0.033111572265625,
0.0202178955078125,
-0.007205963134765625,
0.0197296142578125,
-0.0088653564453125,
0.02532958984375,
0.03472900390625,
-0.0033931732177734375,
-0.00798797607421875,
0.0194854736328125,
-0.0008873939514160156,
-0.01202392578125,
0.005542755126953125,
-0.0043487548828125,
-0.037872314453125,
-0.0013742446899414062,
0.01078033447265625,
-0.0216217041015625,
-0.0279998779296875,
0.05352783203125,
0.0289764404296875,
-0.0200042724609375,
-0.0123748779296875,
-0.04541015625,
-0.023223876953125,
-0.0648193359375,
0.0352783203125,
-0.00653839111328125,
0.00444793701171875,
0.029022216796875,
0.0380859375,
-0.0477294921875,
0.05242919921875,
0.000659942626953125,
0.051727294921875,
0.04486083984375,
0.020599365234375,
-0.0162811279296875,
0.01898193359375,
0.005340576171875,
0.006282806396484375,
0.0205078125,
-0.030853271484375,
0.0262451171875,
-0.0006117820739746094,
0.058013916015625,
-0.030731201171875,
-0.055419921875,
0.035858154296875,
-0.07293701171875,
-0.042938232421875,
0.02392578125,
-0.005825042724609375,
-0.023223876953125,
-0.0487060546875,
-0.0218048095703125,
0.04705810546875,
0.0184173583984375,
-0.01509857177734375,
-0.005672454833984375,
-0.02276611328125,
0.0080413818359375,
0.00539398193359375,
-0.034515380859375,
0.02008056640625,
0.031341552734375,
0.0011844635009765625,
-0.033935546875,
-0.0286407470703125,
0.061248779296875,
0.027923583984375,
-0.026153564453125,
-0.036773681640625,
0.05841064453125,
-0.028839111328125,
-0.026519775390625,
-0.003864288330078125,
0.005802154541015625,
-0.03204345703125,
0.01280975341796875,
0.033782958984375,
-0.0006351470947265625,
0.02093505859375,
-0.01554107666015625,
-0.038970947265625,
-0.026824951171875,
0.041900634765625,
0.006557464599609375,
-0.006343841552734375,
-0.0206146240234375,
-0.006046295166015625,
0.0159149169921875,
0.0172271728515625,
0.0236968994140625,
0.0032100677490234375,
0.0299835205078125,
-0.0146484375,
0.03314208984375,
0.0074005126953125,
0.04034423828125,
-0.0181732177734375,
0.0310516357421875,
0.0004911422729492188,
-0.011749267578125,
-0.03985595703125,
0.0038585662841796875,
-0.03436279296875,
-0.0662841796875,
0.013031005859375,
0.0254058837890625,
0.01299285888671875,
0.047882080078125,
0.01273345947265625,
0.032745361328125,
0.0248870849609375,
-0.013275146484375,
-0.015960693359375,
-0.0175628662109375,
0.029937744140625,
-0.025909423828125,
0.021820068359375,
0.00241851806640625,
-0.048980712890625,
-0.00347137451171875,
-0.01084136962890625,
-0.0208892822265625,
0.0294342041015625,
-0.01812744140625,
0.0019016265869140625,
0.059661865234375,
-0.004085540771484375,
0.0321044921875,
0.1068115234375,
0.0093841552734375,
0.0789794921875,
0.0523681640625,
0.0211334228515625,
0.06195068359375,
0.04266357421875,
0.00688934326171875,
-0.0377197265625,
0.018341064453125,
0.00264739990234375,
-0.002246856689453125,
0.00859832763671875,
-0.0172576904296875,
0.04644775390625,
0.00031256675720214844,
0.06787109375,
0.016571044921875,
0.012420654296875,
0.0197601318359375,
-0.060333251953125,
0.00807952880859375,
0.00928497314453125,
-0.0396728515625,
-0.058746337890625,
0.0259552001953125,
-0.0159149169921875,
-0.01058197021484375,
-0.0133209228515625,
0.012420654296875,
0.00853729248046875,
0.02154541015625,
0.033966064453125,
-0.0006909370422363281,
-0.046844482421875,
-0.0556640625,
0.046142578125,
-0.035308837890625,
-0.0105743408203125,
0.038543701171875,
-0.0357666015625,
0.01184844970703125,
-0.02655029296875,
0.0202178955078125,
0.0012454986572265625,
-0.0018529891967773438,
-0.0011587142944335938,
0.007232666015625,
0.043914794921875,
0.05487060546875,
0.019866943359375,
-0.0005178451538085938,
0.025543212890625,
0.0223846435546875,
-0.002796173095703125,
-0.00395965576171875,
0.0083160400390625,
0.0155792236328125,
-0.059539794921875,
-0.001987457275390625,
-0.044342041015625,
0.031646728515625,
0.00704193115234375,
-0.00220489501953125,
0.0740966796875,
-0.0308990478515625,
-0.0086669921875,
0.042327880859375,
0.0261993408203125,
-0.0167999267578125,
-0.0269927978515625,
0.061920166015625,
-0.09521484375,
-0.04595947265625,
0.002521514892578125,
-0.02984619140625,
-0.04547119140625,
-0.048980712890625,
-0.06536865234375,
0.1064453125,
-0.0260162353515625,
0.046966552734375,
0.0284881591796875,
0.03662109375,
-0.0230712890625,
0.0042877197265625,
-0.040252685546875,
0.031982421875,
-0.006748199462890625,
-0.0108795166015625,
-0.093994140625,
-0.004459381103515625,
-0.06658935546875,
0.0280303955078125,
0.0604248046875,
0.01922607421875,
-0.047332763671875,
-0.043426513671875,
0.032470703125,
0.046875,
0.0183563232421875,
0.03741455078125,
0.00951385498046875,
0.01073455810546875,
0.038055419921875,
-0.038238525390625,
0.01155853271484375,
0.008209228515625,
0.0150146484375,
0.0438232421875,
0.0193634033203125,
0.021942138671875,
0.0255889892578125,
-0.0093994140625,
-0.042510986328125,
0.00702667236328125,
0.051666259765625,
-0.06146240234375,
0.022125244140625,
0.0123291015625,
-0.006389617919921875,
0.00867462158203125,
0.0233001708984375,
-0.004650115966796875,
0.03460693359375,
-0.004764556884765625,
0.0164337158203125,
0.0008249282836914062,
0.0152740478515625,
0.0526123046875,
-0.007659912109375,
-0.0157470703125,
0.0301361083984375,
-0.006450653076171875,
0.0660400390625,
0.0054779052734375,
0.0310821533203125,
-0.058563232421875,
0.01434326171875,
0.0241851806640625,
0.05462646484375,
-0.046295166015625,
-0.023162841796875,
0.00921630859375,
-0.01190948486328125,
0.01345062255859375,
-0.01477813720703125,
0.025634765625,
-0.0271148681640625,
-0.01361846923828125,
-0.0274658203125,
0.0279388427734375,
0.045745849609375,
0.0004470348358154297,
0.00974273681640625,
0.00003063678741455078,
-0.03436279296875,
0.0280914306640625,
-0.0260009765625,
-0.0006036758422851562,
0.00911712646484375,
0.0283966064453125,
0.00966644287109375,
0.015899658203125,
-0.013519287109375,
-0.01513671875,
-0.028472900390625,
0.036102294921875,
0.005107879638671875,
0.04144287109375,
-0.038116455078125,
-0.041046142578125,
0.03228759765625,
0.0286865234375,
-0.001003265380859375,
0.0111236572265625,
0.039276123046875,
0.01412200927734375,
-0.07470703125,
-0.0209808349609375,
0.04986572265625,
-0.0283203125,
0.0285186767578125,
-0.044158935546875,
0.01242828369140625,
0.0212554931640625,
-0.00919342041015625,
0.006763458251953125,
-0.06439208984375,
0.0792236328125,
-0.0237579345703125,
0.054656982421875,
-0.01934814453125,
-0.005779266357421875,
0.0261993408203125,
-0.024932861328125,
0.04681396484375,
-0.00970458984375,
-0.0902099609375,
0.0212249755859375,
-0.0352783203125,
-0.03192138671875,
-0.0025615692138671875,
0.01068115234375,
-0.06634521484375,
0.08563232421875,
0.00588226318359375,
0.01036834716796875,
0.0289459228515625,
-0.0210418701171875,
-0.008087158203125,
-0.023468017578125,
0.036285400390625,
-0.017242431640625,
-0.05364990234375,
-0.038330078125,
-0.035186767578125,
0.049774169921875,
0.029052734375,
0.07928466796875,
-0.00836181640625,
0.032928466796875,
0.00113677978515625,
-0.0042724609375,
-0.032745361328125,
0.0211639404296875,
-0.0390625,
-0.0158538818359375,
-0.007160186767578125,
-0.0115814208984375,
0.027099609375,
0.00701904296875,
0.02032470703125,
-0.0224761962890625,
-0.0498046875,
-0.018035888671875,
0.028594970703125,
0.06744384765625,
0.03173828125,
-0.0310211181640625,
-0.0088348388671875,
-0.0294342041015625,
0.00689697265625,
0.01557159423828125,
-0.00008934736251831055,
-0.01343536376953125,
0.03839111328125,
0.0095367431640625,
-0.0146331787109375,
0.0299072265625,
-0.041351318359375,
0.03570556640625,
0.0298614501953125,
-0.0110626220703125,
-0.0286407470703125,
-0.0223388671875,
-0.0210113525390625,
-0.005512237548828125,
-0.010986328125,
0.06231689453125,
-0.01441192626953125,
0.00542449951171875,
0.04376220703125,
0.0017566680908203125,
0.0382080078125,
-0.0278167724609375,
0.00356292724609375,
0.010406494140625,
0.021392822265625,
0.00006771087646484375,
-0.042266845703125,
-0.01435089111328125,
-0.062469482421875,
-0.005245208740234375,
0.0256805419921875,
-0.031707763671875,
0.002170562744140625,
-0.01702880859375,
0.00274658203125,
0.028106689453125,
0.0125885009765625,
-0.0538330078125,
0.0271453857421875,
-0.00601959228515625,
0.021453857421875,
-0.004360198974609375,
0.027374267578125,
-0.00431060791015625,
0.035858154296875,
-0.0262908935546875,
-0.07037353515625,
-0.017242431640625,
0.05816650390625,
-0.037322998046875,
0.040374755859375,
0.062286376953125,
-0.048797607421875,
0.0011854171752929688,
0.0242767333984375,
0.028106689453125,
0.072509765625,
-0.0347900390625,
-0.0269927978515625,
-0.00922393798828125,
0.0273895263671875,
-0.0267791748046875,
-0.03936767578125,
0.01548004150390625,
-0.03277587890625,
0.022308349609375,
-0.040283203125,
0.0299072265625,
0.0257568359375,
-0.035125732421875,
-0.07281494140625,
-0.0037078857421875,
-0.0157928466796875,
-0.03857421875,
-0.02191162109375,
0.0081634521484375,
-0.0132904052734375,
-0.0047760009765625,
-0.01050567626953125,
-0.0176239013671875,
0.0038356781005859375,
0.04656982421875,
0.007965087890625,
-0.01268768310546875,
0.0235748291015625,
-0.0031414031982421875,
-0.037261962890625,
0.01739501953125,
0.033294677734375,
-0.01218414306640625,
0.0276641845703125,
-0.030303955078125,
0.03948974609375,
0.04400634765625,
-0.007396697998046875,
-0.010589599609375,
0.002899169921875,
-0.041717529296875,
-0.045318603515625,
-0.0350341796875,
0.01253509521484375,
0.032989501953125,
0.07574462890625,
0.06591796875,
0.0221710205078125,
-0.07574462890625,
0.00275421142578125,
-0.0031948089599609375,
-0.02691650390625,
0.0030689239501953125,
0.018157958984375,
-0.053741455078125,
-0.002010345458984375,
0.0072021484375,
-0.0185394287109375,
-0.0023708343505859375,
-0.000005304813385009766,
-0.03179931640625,
-0.00534820556640625,
-0.01192474365234375,
-0.0177764892578125,
-0.0248870849609375,
0.0114288330078125,
0.053253173828125,
-0.0289306640625,
0.031707763671875,
-0.002773284912109375,
0.008697509765625,
0.027923583984375,
-0.009674072265625,
-0.01403045654296875,
0.016510009765625,
-0.026458740234375,
0.0144195556640625,
-0.009033203125,
-0.0008754730224609375,
-0.0235595703125,
0.01320648193359375,
-0.020111083984375,
-0.0107269287109375,
0.0124053955078125,
-0.008209228515625,
-0.00806427001953125,
-0.00012767314910888672,
0.004657745361328125,
0.0286407470703125,
-0.01409912109375,
0.02392578125,
-0.01263427734375,
0.00778961181640625,
-0.0254058837890625,
-0.004611968994140625,
0.01343536376953125,
-0.048797607421875,
-0.00566864013671875,
-0.0029354095458984375,
-0.03570556640625,
-0.0204620361328125,
-0.0130157470703125,
0.0070953369140625,
-0.017669677734375,
-0.01012420654296875
] |
e8033dae788d8f4d79cbec9d741b035f4d7aa227
|
Wordpress Stackexchange
Q: Is there a user-facing interface to edit an attachment's permalink? If you use the [gallery] tag at all you know that permalinks for image attachments end up like blog.com/2011/03/18/post-permalink/attachment-permalink.
The URL extension from the post permalink appears to be based on the attachment's title on first save. To my knowledge, however, this permalink does not update when the image title is edited in the media tools. I cannot find a way to do edit attachment permalinks at all, actually.
Is there a user-facing interface I'm missing that will let users edit an attachment's permalink?
A: There is a plugin Rename Media that changes the filename when you edit the title.
|
Q: Is there a user-facing interface to edit an attachment's permalink? If you use the [gallery] tag at all you know that permalinks for image attachments end up like blog.com/2011/03/18/post-permalink/attachment-permalink.
The URL extension from the post permalink appears to be based on the attachment's title on first save. To my knowledge, however, this permalink does not update when the image title is edited in the media tools. I cannot find a way to do edit attachment permalinks at all, actually.
Is there a user-facing interface I'm missing that will let users edit an attachment's permalink?
A: There is a plugin Rename Media that changes the filename when you edit the title.
A: The solution of TheDeadMedic works fine, but I would recommend adding sanitize_title() in saving filter to make sure that the value is always a valid slug:
function __save_attachment_name( $attachment, $POST_data )
{
if ( !empty( $POST_data['post_name'] ) )
$attachment['post_name'] = sanitize_title( $POST_data['post_name'] );
return $attachment;
}
add_filter( 'attachment_fields_to_save', '__save_attachment_name', 10, 2);
A: This'll add a slug field to the edit attachment page, which'll allow you to independently change it when and how you choose to.
Drop it into a plugin or your theme's functions.php;
function wpse_12405_edit_attachment_name( $fields, $post ) {
$fields['post_name'] = array(
'label' => __( 'Slug' ),
'value' => $post->post_name,
);
return $fields;
}
add_filter( 'attachment_fields_to_edit', 'wpse_12405_edit_attachment_name', 10, 2 );
function wpse_12405_save_attachment_name( $attachment, $POST_data ) {
if ( ! empty( $POST_data['post_name'] ) )
$attachment['post_name'] = $POST_data['post_name'];
return $attachment;
}
add_filter( 'attachment_fields_to_save', 'wpse_12405_save_attachment_name', 10, 2);
A: WordPress stores the original filename in the database as a unique identifier for the attachment. Unfortunately, as far as I know, there isn't any way of changing it within the UI. It's not super convenient, but you'd most likely have to re-upload the file.
|
wordpress
|
{
"language": "en",
"length": 292,
"provenance": "stackexchange_00019.jsonl.gz:407868",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12405"
}
|
[
0.042144775390625,
-0.00977325439453125,
0.01458740234375,
0.022003173828125,
-0.0255584716796875,
-0.0310211181640625,
0.057891845703125,
-0.0555419921875,
0.0172576904296875,
0.02593994140625,
0.027740478515625,
-0.01468658447265625,
-0.0030307769775390625,
-0.053009033203125,
-0.0276336669921875,
0.00382232666015625,
0.01421356201171875,
0.004970550537109375,
0.03192138671875,
-0.00286102294921875,
0.0014524459838867188,
0.01029205322265625,
0.041961669921875,
-0.0081024169921875,
-0.0030231475830078125,
0.05828857421875,
0.0435791015625,
-0.031524658203125,
0.005092620849609375,
-0.0145263671875,
0.00592803955078125,
-0.0218963623046875,
0.0198822021484375,
-0.0133819580078125,
0.01568603515625,
0.0274658203125,
0.023284912109375,
-0.009185791015625,
-0.009521484375,
0.024444580078125,
0.0218048095703125,
0.0011281967163085938,
-0.0020313262939453125,
0.0335693359375,
-0.012908935546875,
-0.01070404052734375,
0.005214691162109375,
-0.0584716796875,
0.022918701171875,
-0.018768310546875,
-0.0025844573974609375,
0.0167999267578125,
0.008453369140625,
0.016998291015625,
-0.02154541015625,
-0.00603485107421875,
-0.031494140625,
0.007289886474609375,
0.0249481201171875,
-0.0264892578125,
-0.0183258056640625,
-0.01381683349609375,
0.0248260498046875,
0.01245880126953125,
-0.02398681640625,
-0.035675048828125,
-0.00986480712890625,
0.015655517578125,
-0.027130126953125,
-0.00927734375,
0.057708740234375,
0.003925323486328125,
-0.0121612548828125,
-0.057220458984375,
-0.0135498046875,
0.043304443359375,
-0.0032062530517578125,
-0.034576416015625,
-0.0074920654296875,
0.002933502197265625,
0.043426513671875,
-0.023956298828125,
0.0228424072265625,
-0.019989013671875,
0.031280517578125,
0.01155853271484375,
0.01392364501953125,
-0.019744873046875,
-0.0230560302734375,
0.005031585693359375,
-0.0211181640625,
-0.0181732177734375,
-0.0056915283203125,
0.012847900390625,
-0.01483917236328125,
-0.0028705596923828125,
-0.0028476715087890625,
-0.0171661376953125,
0.0296783447265625,
0.00836181640625,
0.026031494140625,
-0.04925537109375,
0.01502227783203125,
-0.00904083251953125,
-0.0204315185546875,
-0.024566650390625,
0.06927490234375,
0.045196533203125,
0.01800537109375,
-0.0027408599853515625,
-0.04986572265625,
0.09039306640625,
0.02349853515625,
0.01727294921875,
-0.00873565673828125,
-0.0101318359375,
-0.0278472900390625,
0.054962158203125,
-0.0153656005859375,
0.058807373046875,
-0.0159912109375,
0.0021953582763671875,
0.011444091796875,
0.00806427001953125,
0.0158538818359375,
0.01148223876953125,
-0.0009393692016601562,
-0.017913818359375,
0.037017822265625,
0.0194549560546875,
-0.021759033203125,
0.004436492919921875,
0.04144287109375,
0.038177490234375,
0.0182647705078125,
-0.0091705322265625,
-0.0205078125,
-0.027496337890625,
-0.0018100738525390625,
-0.00354766845703125,
0.0143585205078125,
-0.030731201171875,
0.004055023193359375,
0.0035648345947265625,
0.019500732421875,
0.02911376953125,
0.015869140625,
0.027374267578125,
0.011871337890625,
-0.056549072265625,
0.024322509765625,
-0.03778076171875,
0.0421142578125,
0.001705169677734375,
-0.01312255859375,
-0.055145263671875,
0.047210693359375,
-0.054046630859375,
0.01552581787109375,
-0.07232666015625,
0.0289154052734375,
-0.0086212158203125,
0.0263214111328125,
0.034912109375,
-0.016021728515625,
0.04595947265625,
-0.052825927734375,
-0.013885498046875,
0.0141448974609375,
0.050140380859375,
-0.0008778572082519531,
-0.0010271072387695312,
-0.049957275390625,
-0.0211334228515625,
-0.006488800048828125,
-0.02099609375,
-0.0009541511535644531,
0.0064544677734375,
-0.01800537109375,
0.09130859375,
0.048614501953125,
-0.0247039794921875,
0.006900787353515625,
0.0063629150390625,
-0.026092529296875,
0.0186920166015625,
0.00664520263671875,
0.011077880859375,
0.007236480712890625,
0.01207733154296875,
0.009979248046875,
0.0435791015625,
-0.046234130859375,
0.060699462890625,
-0.0237274169921875,
-0.015655517578125,
-0.020660400390625,
0.0144805908203125,
-0.037261962890625,
-0.0255889892578125,
-0.032928466796875,
0.021392822265625,
-0.0194854736328125,
0.038055419921875,
-0.0285491943359375,
0.0177459716796875,
-0.0219268798828125,
0.02838134765625,
-0.0176544189453125,
0.051116943359375,
0.018218994140625,
0.01776123046875,
-0.0110626220703125,
-0.05133056640625,
0.0213775634765625,
0.02386474609375,
0.0002498626708984375,
-0.006298065185546875,
-0.021331787109375,
0.0085906982421875,
-0.01209259033203125,
-0.032745361328125,
-0.0297393798828125,
0.040008544921875,
0.01152801513671875,
0.00632476806640625,
-0.010009765625,
-0.004390716552734375,
-0.0250244140625,
0.03192138671875,
-0.056915283203125,
0.0189666748046875,
0.0184326171875,
0.0101470947265625,
-0.0227203369140625,
-0.01476287841796875,
-0.0338134765625,
-0.06915283203125,
0.0067596435546875,
0.060760498046875,
0.02056884765625,
0.005870819091796875,
-0.005344390869140625,
0.0035495758056640625,
0.0631103515625,
0.060821533203125,
0.058868408203125,
-0.0223541259765625,
-0.0011339187622070312,
0.022796630859375,
0.0015716552734375,
0.01227569580078125,
0.02789306640625,
-0.048492431640625,
0.00623321533203125,
0.031646728515625,
-0.0076446533203125,
-0.006214141845703125,
-0.0182342529296875,
0.02655029296875,
-0.00981903076171875,
0.015869140625,
0.002002716064453125,
-0.01053619384765625,
0.03466796875,
0.0193023681640625,
0.04931640625,
0.03436279296875,
-0.02142333984375,
0.007549285888671875,
0.0010528564453125,
0.001163482666015625,
-0.0005307197570800781,
0.056182861328125,
0.038330078125,
-0.018707275390625,
-0.0177459716796875,
-0.01515960693359375,
-0.01549530029296875,
0.0084991455078125,
-0.023468017578125,
-0.0221710205078125,
-0.011077880859375,
-0.015228271484375,
0.007389068603515625,
-0.07366943359375,
0.016387939453125,
0.005626678466796875,
-0.02606201171875,
-0.01158905029296875,
0.033905029296875,
-0.01445770263671875,
-0.0269317626953125,
-0.004962921142578125,
-0.003566741943359375,
-0.0318603515625,
-0.0169677734375,
-0.031982421875,
0.047576904296875,
-0.04779052734375,
0.041961669921875,
0.07037353515625,
-0.052825927734375,
0.057769775390625,
0.01425933837890625,
-0.03466796875,
-0.00891876220703125,
0.0345458984375,
0.013946533203125,
-0.02069091796875,
-0.026641845703125,
0.00983428955078125,
0.0003731250762939453,
0.0283050537109375,
-0.049957275390625,
-0.055419921875,
-0.0355224609375,
-0.01947021484375,
-0.08538818359375,
-0.053253173828125,
0.0005497932434082031,
-0.08612060546875,
0.003658294677734375,
0.0139312744140625,
-0.03472900390625,
-0.016632080078125,
0.06390380859375,
0.002597808837890625,
0.00884246826171875,
-0.04400634765625,
-0.023529052734375,
-0.027618408203125,
-0.04669189453125,
0.002780914306640625,
0.0095977783203125,
-0.003940582275390625,
-0.0048675537109375,
-0.000021159648895263672,
-0.0291595458984375,
-0.023284912109375,
-0.0031948089599609375,
-0.00818634033203125,
0.0171661376953125,
-0.0303955078125,
0.0090789794921875,
-0.01064300537109375,
0.002254486083984375,
0.0053558349609375,
0.07598876953125,
0.05224609375,
-0.06341552734375,
0.0196380615234375,
-0.0308074951171875,
-0.0163116455078125,
0.0201416015625,
0.0186767578125,
0.027435302734375,
0.00647735595703125,
0.01849365234375,
-0.04510498046875,
-0.00060272216796875,
-0.0176239013671875,
-0.0297393798828125,
0.0157012939453125,
0.004505157470703125,
0.0061187744140625,
-0.007724761962890625,
0.0152435302734375,
-0.0210723876953125,
0.00977325439453125,
0.025146484375,
-0.045013427734375,
0.03515625,
-0.02252197265625,
-0.0224609375,
-0.027069091796875,
0.035675048828125,
-0.01529693603515625,
-0.0023899078369140625,
-0.0036773681640625,
0.00540924072265625,
-0.00809478759765625,
0.021087646484375,
-0.021575927734375,
-0.049468994140625,
0.0279693603515625,
-0.1055908203125,
-0.00331878662109375,
-0.08953857421875,
-0.005619049072265625,
-0.0279388427734375,
0.07354736328125,
-0.00818634033203125,
-0.032440185546875,
0.00629425048828125,
0.02197265625,
-0.02984619140625,
0.00579833984375,
-0.01073455810546875,
-0.00751495361328125,
-0.05950927734375,
-0.01096343994140625,
0.00315093994140625,
-0.0499267578125,
-0.01087188720703125,
0.041046142578125,
-0.037445068359375,
-0.0200653076171875,
0.03656005859375,
0.011322021484375,
-0.0229034423828125,
0.03839111328125,
-0.0296630859375,
0.003520965576171875,
-0.03594970703125,
-0.0007395744323730469,
-0.090087890625,
-0.0255889892578125,
0.040740966796875,
0.055572509765625,
-0.0298614501953125,
-0.0146026611328125,
-0.02911376953125,
0.056182861328125,
-0.005290985107421875,
0.01739501953125,
-0.0175628662109375,
-0.0139312744140625,
-0.031646728515625,
0.0052337646484375,
-0.006359100341796875,
-0.01300811767578125,
0.0193328857421875,
-0.0301055908203125,
-0.06378173828125,
-0.036376953125,
-0.023468017578125,
0.01418304443359375,
0.0196685791015625,
-0.041717529296875,
-0.07391357421875,
-0.00860595703125,
-0.006626129150390625,
0.03631591796875,
-0.029510498046875,
0.01654052734375,
-0.0418701171875,
-0.0843505859375,
-0.0080413818359375,
-0.05511474609375,
0.0157012939453125,
0.031890869140625,
0.0682373046875,
-0.002643585205078125,
0.0305633544921875,
-0.05120849609375,
0.0249481201171875,
0.05523681640625,
0.016571044921875,
0.01605224609375,
0.0260772705078125,
-0.0191192626953125,
-0.00576019287109375,
0.027801513671875,
0.00688934326171875,
-0.04730224609375,
0.0282745361328125,
0.0014820098876953125,
-0.0251312255859375,
0.040191650390625,
-0.0059661865234375,
0.043701171875,
-0.00958251953125,
-0.0298919677734375,
0.021026611328125,
-0.05084228515625,
0.013214111328125,
-0.0011157989501953125,
0.0439453125,
-0.0177459716796875,
-0.04437255859375,
0.026947021484375,
-0.0108642578125,
0.01214599609375,
-0.0035381317138671875,
-0.0102691650390625,
0.001010894775390625,
-0.011077880859375,
-0.00634002685546875,
-0.0304718017578125,
-0.01314544677734375,
-0.00750732421875,
0.02752685546875,
-0.0465087890625,
0.0011281967163085938,
-0.032928466796875,
-0.00936126708984375,
0.0216522216796875,
0.018096923828125,
0.01145172119140625,
-0.0277252197265625,
-0.013031005859375,
0.007717132568359375,
0.0016803741455078125,
0.0267333984375,
0.0227508544921875,
0.00800323486328125,
0.0101318359375,
-0.0151824951171875,
-0.0077667236328125,
0.01296234130859375,
-0.0302276611328125,
0.02978515625,
0.001789093017578125,
-0.00930023193359375,
0.047088623046875,
-0.01349639892578125,
-0.01032257080078125,
0.007045745849609375,
0.004550933837890625,
-0.007049560546875,
0.0206146240234375,
-0.0183868408203125,
0.023162841796875,
0.0261383056640625,
-0.01102447509765625,
-0.029388427734375,
0.035064697265625,
-0.02947998046875,
0.01186370849609375,
0.042724609375,
0.07159423828125,
0.006710052490234375,
-0.028045654296875,
-0.01385498046875,
-0.062347412109375,
-0.0196685791015625,
0.033416748046875,
-0.0190887451171875,
-0.06341552734375,
-0.011749267578125,
0.0146026611328125,
0.00791168212890625,
-0.042572021484375,
-0.01280975341796875,
-0.018035888671875,
-0.0288848876953125,
-0.004253387451171875,
0.0276947021484375,
-0.039886474609375,
0.00829315185546875,
-0.00213623046875,
0.01200103759765625,
0.001373291015625,
-0.017486572265625,
0.0038127899169921875,
-0.00626373291015625,
-0.0267486572265625,
-0.0007228851318359375,
0.09625244140625,
0.020355224609375,
0.043212890625,
-0.034912109375,
-0.034637451171875,
-0.034332275390625,
-0.0172882080078125,
0.051727294921875,
0.00408935546875,
-0.042572021484375,
-0.00133514404296875,
-0.00756072998046875,
0.007354736328125,
-0.0026454925537109375,
-0.0248260498046875,
-0.03167724609375,
-0.025238037109375,
0.0243682861328125,
0.03948974609375,
-0.009002685546875,
-0.013946533203125,
0.0182647705078125,
0.0222015380859375,
0.00846099853515625,
0.07647705078125,
0.009246826171875,
0.0061187744140625,
0.0240936279296875,
0.001857757568359375,
0.0139312744140625,
-0.0165557861328125,
-0.046722412109375,
-0.0201416015625,
-0.0239410400390625,
-0.055023193359375,
0.0030670166015625,
0.045257568359375,
-0.017791748046875,
0.0146942138671875,
0.0123443603515625,
0.0150299072265625,
-0.004993438720703125,
-0.0231781005859375,
0.0069427490234375,
-0.030181884765625,
0.0279998779296875,
-0.0565185546875,
-0.028900146484375,
-0.010406494140625,
-0.00887298583984375,
0.0347900390625,
-0.002445220947265625,
0.004730224609375,
-0.00164031982421875,
-0.0179901123046875,
-0.0002224445343017578,
0.02496337890625,
-0.016693115234375,
0.023284912109375,
0.03814697265625,
0.00495147705078125,
0.0238189697265625,
0.02899169921875,
0.0028324127197265625,
0.0169677734375,
-0.0167388916015625,
0.0197296142578125,
0.02288818359375,
0.0650634765625,
-0.0004944801330566406,
0.00844573974609375,
0.064453125,
-0.0218963623046875,
0.01242828369140625,
0.0211334228515625,
0.053985595703125,
-0.028717041015625,
0.0041351318359375,
-0.01213836669921875,
0.0166778564453125,
0.058013916015625,
0.0122528076171875,
0.0133056640625,
0.01070404052734375,
0.0281219482421875,
-0.05487060546875,
-0.0027790069580078125,
-0.004199981689453125,
-0.04156494140625,
-0.00745391845703125,
0.0038623809814453125,
0.024383544921875,
0.016021728515625,
-0.0279693603515625,
-0.045166015625,
0.034759521484375,
-0.034820556640625,
-0.016143798828125,
-0.0223541259765625,
0.004970550537109375,
-0.02618408203125,
-0.0101165771484375,
0.037322998046875,
-0.0183258056640625,
0.0478515625,
-0.01354217529296875,
0.004734039306640625,
0.0367431640625,
0.011260986328125,
-0.005374908447265625,
-0.01824951171875,
-0.0009822845458984375,
-0.024871826171875,
0.039306640625,
-0.02349853515625,
-0.01093292236328125,
0.0006875991821289062,
-0.0170745849609375,
0.002777099609375,
-0.005519866943359375,
-0.018157958984375,
-0.0124053955078125,
-0.036895751953125,
0.08917236328125,
-0.0667724609375,
0.0038738250732421875,
0.0294036865234375,
-0.00579071044921875,
-0.0196685791015625,
0.0234375,
-0.0364990234375,
-0.009063720703125,
-0.03509521484375,
-0.0153656005859375,
-0.08489990234375,
0.01280975341796875,
-0.0048828125,
-0.08319091796875,
0.08038330078125,
0.01361846923828125,
0.07220458984375,
0.01015472412109375,
0.018829345703125,
-0.0007147789001464844,
0.0025463104248046875,
-0.017852783203125,
0.0289459228515625,
-0.0189361572265625,
0.0161590576171875,
-0.0277557373046875,
0.0006074905395507812,
-0.0015316009521484375,
0.045166015625,
0.06036376953125,
0.022186279296875,
-0.05950927734375,
-0.036224365234375,
0.0298919677734375,
0.0164337158203125,
-0.0040740966796875,
0.054962158203125,
0.007038116455078125,
0.008544921875,
0.0239410400390625,
0.0287628173828125,
0.047454833984375,
-0.0379638671875,
-0.04510498046875,
0.0181732177734375,
0.0216217041015625,
0.06378173828125,
0.03570556640625,
0.0167694091796875,
-0.007045745849609375,
-0.0033321380615234375,
0.06103515625,
-0.08453369140625,
-0.028594970703125,
0.014617919921875,
0.00580596923828125,
-0.04327392578125,
-0.0418701171875,
-0.017181396484375,
0.018829345703125,
0.022613525390625,
-0.00983428955078125,
0.0170135498046875,
0.006072998046875,
-0.003131866455078125,
-0.002246856689453125,
-0.00276947021484375,
0.032623291015625,
0.00121307373046875,
0.018768310546875,
-0.0081787109375,
0.01335906982421875,
-0.0645751953125,
-0.037445068359375,
0.07281494140625,
0.06195068359375,
-0.0213775634765625,
-0.01070404052734375,
0.01971435546875,
0.01641845703125,
-0.0296783447265625,
-0.0195770263671875,
-0.02618408203125,
-0.058319091796875,
-0.004817962646484375,
-0.0227813720703125,
0.0214080810546875,
0.0254974365234375,
0.0289306640625,
0.0004820823669433594,
0.01096343994140625,
-0.0428466796875,
0.0284576416015625,
-0.027069091796875,
0.0160675048828125,
-0.007091522216796875,
0.0027904510498046875,
0.0016307830810546875,
0.027191162109375,
0.01003265380859375,
0.00836181640625,
-0.0447998046875,
0.046173095703125,
-0.0301666259765625,
0.06927490234375,
-0.05242919921875,
-0.037933349609375,
0.0098876953125,
0.046295166015625,
0.0143890380859375,
0.02471923828125,
0.0235137939453125,
-0.0078277587890625,
-0.0181427001953125,
0.0017604827880859375,
-0.0229034423828125,
-0.035064697265625,
0.06976318359375,
-0.04461669921875,
0.1082763671875,
0.041778564453125,
0.0162353515625,
-0.0150299072265625,
-0.001720428466796875,
0.09600830078125,
-0.047149658203125,
0.0312042236328125,
-0.01276397705078125,
-0.020111083984375,
0.0557861328125,
-0.021514892578125,
0.051116943359375,
-0.0200958251953125,
-0.03515625,
-0.0167083740234375,
-0.002197265625,
-0.062347412109375,
0.034454345703125,
0.052978515625,
-0.02142333984375,
-0.01540374755859375,
-0.05487060546875,
-0.0015411376953125,
0.0290985107421875,
-0.043670654296875,
-0.005306243896484375,
0.01299285888671875,
-0.01995849609375,
-0.0190277099609375,
-0.0482177734375,
-0.0251312255859375,
-0.0272674560546875,
0.043121337890625,
-0.006839752197265625,
0.1104736328125,
-0.035980224609375,
0.012847900390625,
-0.00513458251953125,
0.027069091796875,
-0.0300750732421875,
0.006443023681640625,
-0.00506591796875,
-0.0036602020263671875,
0.0088958740234375,
0.004024505615234375,
-0.01277923583984375,
0.022369384765625,
0.037200927734375,
-0.011993408203125,
0.01013946533203125,
-0.02032470703125,
0.01690673828125,
-0.0110931396484375,
0.046783447265625,
-0.0149078369140625,
-0.032073974609375,
-0.01548004150390625,
-0.01134490966796875,
0.01064300537109375,
0.0302276611328125,
0.0212249755859375,
0.033935546875,
0.034149169921875,
0.01302337646484375,
-0.006000518798828125,
0.023040771484375,
0.0182342529296875,
0.036865234375,
-0.0226898193359375,
-0.0015954971313476562,
0.002368927001953125,
-0.0090179443359375,
0.00839996337890625,
0.01678466796875,
0.00373077392578125,
0.0291748046875,
-0.016998291015625,
0.00335693359375,
-0.038482666015625,
0.00493621826171875,
-0.00872802734375,
-0.009307861328125,
-0.0445556640625,
0.009613037109375,
0.00492095947265625,
-0.039093017578125,
-0.02789306640625,
-0.06201171875,
0.0099029541015625,
0.032501220703125,
-0.0299530029296875,
0.0067596435546875,
-0.0243377685546875,
-0.0035552978515625,
-0.0021877288818359375,
-0.00031375885009765625,
-0.050994873046875,
0.069091796875,
-0.0022602081298828125,
-0.025604248046875,
-0.036224365234375,
-0.0714111328125,
0.01904296875,
0.05255126953125,
-0.0188140869140625,
-0.05865478515625,
-0.0556640625,
0.005870819091796875,
-0.07891845703125,
0.04034423828125,
0.051483154296875,
-0.04156494140625,
-0.0275115966796875,
0.00521087646484375,
0.0258636474609375,
0.056854248046875,
-0.0017185211181640625,
-0.0240478515625,
-0.0150146484375,
0.0263214111328125,
0.0121612548828125,
-0.034515380859375,
-0.0137176513671875,
0.004741668701171875,
0.01013946533203125,
-0.01300811767578125,
-0.01105499267578125,
-0.004756927490234375,
-0.053741455078125,
-0.08349609375,
0.0223541259765625,
-0.00939178466796875,
-0.04229736328125,
-0.056365966796875,
0.023223876953125,
-0.015625,
0.04779052734375,
-0.009552001953125,
-0.004108428955078125,
-0.004150390625,
0.037322998046875,
0.007061004638671875,
0.01593017578125,
-0.00485992431640625,
0.01561737060546875,
-0.0037326812744140625,
0.04150390625,
0.0384521484375,
-0.0099334716796875,
0.052093505859375,
-0.0302581787109375,
0.05682373046875,
0.045379638671875,
-0.05072021484375,
-0.004489898681640625,
-0.0233917236328125,
-0.007266998291015625,
-0.0292205810546875,
-0.04412841796875,
-0.0609130859375,
-0.03997802734375,
0.11322021484375,
0.06549072265625,
0.034271240234375,
-0.023101806640625,
0.0301361083984375,
-0.01275634765625,
-0.053314208984375,
-0.0012454986572265625,
0.0159149169921875,
-0.01073455810546875,
0.0104827880859375,
-0.0234375,
-0.019927978515625,
-0.0307464599609375,
0.022369384765625,
-0.036590576171875,
0.00608062744140625,
0.01091766357421875,
-0.0087127685546875,
-0.0211639404296875,
0.0011472702026367188,
0.0869140625,
-0.049407958984375,
0.01288604736328125,
0.0012140274047851562,
0.00848388671875,
0.047149658203125,
-0.02142333984375,
0.016754150390625,
-0.0033855438232421875,
0.004970550537109375,
0.018341064453125,
0.040924072265625,
0.01192474365234375,
0.0020885467529296875,
-0.0280609130859375,
-0.022308349609375,
0.0122222900390625,
0.0135955810546875,
0.007564544677734375,
-0.01285552978515625,
0.00896453857421875,
-0.0007004737854003906,
0.075439453125,
-0.0277557373046875,
-0.032989501953125,
-0.0159759521484375,
0.00428009033203125,
-0.031829833984375,
0.0254058837890625,
0.0213470458984375,
-0.049285888671875,
0.0064544677734375,
0.006992340087890625,
-0.034912109375,
-0.0295562744140625,
-0.0030193328857421875,
-0.037384033203125,
-0.0225830078125,
0.00865936279296875
] |
59ed26a3bf2486cc52ac68d29c31e089355a8e6c
|
Wordpress Stackexchange
Q: How to replace regular jquery calls with CDN calls from Google? I will like to implement a few of the boilerplate template features in one of my instance WordPress.
I am trying to figure out how to exchange the regular jquery calls below
<script type='text/javascript' src='http:/.../wp-includes/js/jquery/jquery.js?ver=1.4.4'></script>
<script type='text/javascript' src='http://.../wp-includes/js/jquery/ui.core.js?ver=1.8.9'></script>
to this:
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
<script>window.jQuery || document.write("<script src='js/libs/jquery-1.5.1.min.js'>\x3C/script>")</script>
A: For Wordpress 4.5.0 + : wp_add_inline_script() #
function jquery_enqueue_with_fallback() {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery' , '//ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js', false, '3.1.1', true );
wp_add_inline_script( 'jquery', 'window.jQuery||document.write(\'<script src="'.esc_url(get_template_directory_uri()).'/libs/js/jquery.js"><\/script>\')' );
wp_enqueue_script( 'jquery' );
}
add_action( 'wp_enqueue_scripts' , 'jquery_enqueue_with_fallback' );
Note : Change the version and your own local jQuery source.
|
Q: How to replace regular jquery calls with CDN calls from Google? I will like to implement a few of the boilerplate template features in one of my instance WordPress.
I am trying to figure out how to exchange the regular jquery calls below
<script type='text/javascript' src='http:/.../wp-includes/js/jquery/jquery.js?ver=1.4.4'></script>
<script type='text/javascript' src='http://.../wp-includes/js/jquery/ui.core.js?ver=1.8.9'></script>
to this:
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
<script>window.jQuery || document.write("<script src='js/libs/jquery-1.5.1.min.js'>\x3C/script>")</script>
A: For Wordpress 4.5.0 + : wp_add_inline_script() #
function jquery_enqueue_with_fallback() {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery' , '//ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js', false, '3.1.1', true );
wp_add_inline_script( 'jquery', 'window.jQuery||document.write(\'<script src="'.esc_url(get_template_directory_uri()).'/libs/js/jquery.js"><\/script>\')' );
wp_enqueue_script( 'jquery' );
}
add_action( 'wp_enqueue_scripts' , 'jquery_enqueue_with_fallback' );
Note : Change the version and your own local jQuery source.
A: Two things to keep in mind about this answer:
*
*Never do this in a plugin or theme for release.
*WordPress plugins rely on the correct version of jQuery being provided, that's why I'm not using jQuery 3 and not hardcoding version numbers. Instead I'm letting WordPress set the version number for the version loaded form the CDN.
```
add_action( 'init', function(){
//Only act if in admin
if ( ! is_admin()) {
//set protocol dynamically
if( is_ssl() ){
$protocol = 'https';
}else {
$protocol = 'http';
}
/** @var WP_Scripts $wp_scripts */
global $wp_scripts;
/** @var _WP_Dependency $core */
$core = $wp_scripts->registered[ 'jquery-core' ];
$core_version = $core->ver;
$core->src = "$protocol://ajax.googleapis.com/ajax/libs/jquery/$core_version/jquery.min.js";
///Use jQuery migrate if WP_DEBUG
if ( WP_DEBUG ) {
/** @var _WP_Dependency $migrate */
$migrate = $wp_scripts->registered[ 'jquery-migrate' ];
$migrate_version = $migrate->ver;
$migrate->src = "$protocol://cdn.jsdelivr.net/jquery.migrate/$migrate_version/jquery-migrate.min.js";
}else{
/** @var _WP_Dependency $jquery */
$jquery = $wp_scripts->registered[ 'jquery' ];
$jquery->deps = [ 'jquery-core' ];
}
}
}, 11 );
```
Notice that I'm still using WordPress' dependency management system. Also, sets HTTPS vs HTTP using is_ssl() to avoid mixed content errors, and lets WordPress dictate version number.
A: You should be loading jQuery with wp_enqueue_script('jquery') - that way, you won't end up with multiple instances if plugins try to load it too.
To use Google CDN, place this in your functions.php;
wp_deregister_script( 'jquery' );
wp_register_script(
'jquery',
'https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js',
null, // Dependencies - none
null // Version - use null to prevent WP adding version argument "?ver" in URL
);
Update: Personally, and I know this sounds like a cop-out, but I wouldn't bother checking the CDN. Google is just so damn reliable, and it's more than likely it's already in the user's browser cache anyway (so many sites use Google's CDN).
However, in my duty to answer, you have one of two options;
*
*Check server side with a remote get, and if it fails, serve the local copy (expensive and not recommended)
*Run a script client-side that checks for jQuery, and prints the fallback if necessary
The trouble with 2) is that you need to inject this script right after jQuery, and before any other plugins that depend on it fire their scripts. The only way I know you can do this is to 'listen' for jQuery, then output the JavaScript on the next call.
The magic? Drop this in your functions.php;
/**
* Print fallback script right after jQuery is printed from queue.
*
* @param string $src
* @return string
*/
function wpse_12448_fallback_jquery( $src, $handle = null ) {
static $run_next = false;
if ( $run_next ) {
// Defaults to WP bundled jQuery, but you should use your own that
// matches the version loaded via CDN.
$local = includes_url( 'js/jquery/jquery.js' );
echo <<<JS
<script>window.jQuery || document.write( '<script src="$local"></script>' );</script>
JS;
$run_next = false;
}
if ( $handle === 'jquery' )
$run_next = true;
return $src;
}
add_action( 'wp_head', 'wpse_12448_fallback_jquery', 2 );
if ( ! is_admin() )
add_filter( 'script_loader_src', 'wpse_12448_fallback_jquery', 10, 2 );
For those in the know, this is also hooked to wp_head right after wp_print_scripts would have fired, in case there were no more scripts to print after jquery (the function does it's work on the next call, rather than the instance it is called with jQuery).
|
wordpress
|
{
"language": "en",
"length": 663,
"provenance": "stackexchange_00019.jsonl.gz:407881",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12448"
}
|
[
0.0171356201171875,
0.00273895263671875,
-0.06878662109375,
-0.045257568359375,
0.0384521484375,
-0.046356201171875,
0.05645751953125,
0.043701171875,
-0.004802703857421875,
-0.0217437744140625,
-0.033477783203125,
0.0105438232421875,
-0.03643798828125,
-0.01000213623046875,
0.0236663818359375,
-0.0540771484375,
0.06561279296875,
-0.06341552734375,
0.0030269622802734375,
-0.00717926025390625,
0.0112152099609375,
0.0228729248046875,
0.01702880859375,
0.08819580078125,
0.00943756103515625,
-0.0005550384521484375,
0.09356689453125,
-0.03369140625,
0.0070953369140625,
-0.0276336669921875,
0.024566650390625,
-0.004985809326171875,
0.032257080078125,
0.007232666015625,
-0.0210113525390625,
-0.0306396484375,
-0.0278472900390625,
0.0281829833984375,
0.0292205810546875,
-0.0250396728515625,
0.022064208984375,
-0.033660888671875,
0.0018205642700195312,
-0.0225677490234375,
-0.0102691650390625,
-0.032012939453125,
0.045257568359375,
-0.02197265625,
0.010162353515625,
0.005603790283203125,
0.01207733154296875,
-0.0207977294921875,
0.01373291015625,
0.013702392578125,
-0.007045745849609375,
0.0157012939453125,
-0.00798797607421875,
-0.0291748046875,
0.015899658203125,
0.08013916015625,
0.02191162109375,
-0.021209716796875,
-0.00972747802734375,
-0.07763671875,
-0.0121307373046875,
-0.01065826416015625,
0.0008187294006347656,
0.0106964111328125,
-0.0200042724609375,
-0.0022487640380859375,
0.02337646484375,
-0.0014743804931640625,
-0.0024394989013671875,
-0.003509521484375,
-0.0006651878356933594,
0.028045654296875,
0.024383544921875,
0.0306854248046875,
0.0027446746826171875,
0.01068878173828125,
0.03875732421875,
0.03411865234375,
-0.02435302734375,
-0.0194091796875,
0.03594970703125,
0.00643157958984375,
-0.0009598731994628906,
-0.033599853515625,
-0.03936767578125,
-0.02545166015625,
-0.03271484375,
-0.09637451171875,
0.0007996559143066406,
-0.0007109642028808594,
-0.004970550537109375,
-0.00960540771484375,
0.050811767578125,
0.03948974609375,
0.0109100341796875,
0.0013856887817382812,
0.0295257568359375,
-0.056671142578125,
0.0196685791015625,
-0.022369384765625,
-0.010986328125,
0.0176849365234375,
0.002384185791015625,
0.020294189453125,
0.0277099609375,
0.031494140625,
0.0071868896484375,
-0.00443267822265625,
0.050750732421875,
0.0090484619140625,
-0.032745361328125,
-0.0240325927734375,
0.0019006729125976562,
0.020263671875,
-0.00909423828125,
0.014892578125,
0.00957489013671875,
0.031402587890625,
-0.031158447265625,
-0.004581451416015625,
0.00894927978515625,
0.006622314453125,
0.0146026611328125,
-0.0379638671875,
-0.005924224853515625,
0.007610321044921875,
-0.036590576171875,
0.0109100341796875,
0.059722900390625,
0.03009033203125,
-0.00402069091796875,
-0.032806396484375,
0.039154052734375,
-0.0000559687614440918,
0.020355224609375,
-0.0175628662109375,
-0.0033283233642578125,
-0.03717041015625,
0.005428314208984375,
0.014312744140625,
0.01495361328125,
-0.0227813720703125,
0.0235137939453125,
0.051788330078125,
-0.00673675537109375,
-0.0145721435546875,
0.060760498046875,
0.0113372802734375,
0.052581787109375,
0.007114410400390625,
-0.022064208984375,
-0.04791259765625,
0.0523681640625,
-0.0416259765625,
-0.01502227783203125,
-0.06781005859375,
-0.0653076171875,
0.0034999847412109375,
0.03643798828125,
-0.0292205810546875,
-0.02020263671875,
-0.02471923828125,
0.025787353515625,
0.001953125,
0.0177459716796875,
0.08416748046875,
-0.021209716796875,
-0.017730712890625,
0.0131988525390625,
0.00025200843811035156,
-0.032440185546875,
0.00133514404296875,
-0.01000213623046875,
0.0293121337890625,
0.0233001708984375,
0.007965087890625,
0.0080718994140625,
-0.03265380859375,
0.08221435546875,
-0.047607421875,
-0.0423583984375,
0.01200103759765625,
0.031158447265625,
0.0628662109375,
-0.0009007453918457031,
-0.00432586669921875,
0.07269287109375,
-0.0005254745483398438,
0.014678955078125,
0.0004100799560546875,
0.0218353271484375,
-0.0163421630859375,
-0.0233001708984375,
0.01399993896484375,
-0.0080413818359375,
-0.0234375,
0.0086669921875,
0.01194000244140625,
0.01403045654296875,
-0.00975799560546875,
-0.05743408203125,
0.01268768310546875,
-0.02410888671875,
0.058441162109375,
-0.01163482666015625,
0.00909423828125,
0.038482666015625,
0.0217742919921875,
-0.04132080078125,
-0.0018472671508789062,
-0.03887939453125,
-0.004642486572265625,
-0.033935546875,
0.06475830078125,
0.0042572021484375,
0.02178955078125,
0.030364990234375,
-0.0452880859375,
0.043670654296875,
-0.00537109375,
0.024261474609375,
-0.040191650390625,
-0.005046844482421875,
-0.043304443359375,
0.01146697998046875,
0.0012378692626953125,
-0.046234130859375,
0.041107177734375,
0.03253173828125,
0.07073974609375,
0.0070953369140625,
-0.012451171875,
0.039306640625,
-0.03778076171875,
0.0238800048828125,
0.0160980224609375,
0.044281005859375,
0.010345458984375,
0.0096435546875,
-0.0211639404296875,
0.0286407470703125,
-0.0157470703125,
0.04302978515625,
-0.042999267578125,
-0.0362548828125,
0.0008945465087890625,
0.015869140625,
0.020660400390625,
0.00988006591796875,
-0.050201416015625,
-0.017791748046875,
0.0526123046875,
0.015655517578125,
0.0224151611328125,
-0.0171356201171875,
-0.008270263671875,
0.0033206939697265625,
0.01425933837890625,
-0.031463623046875,
0.0139617919921875,
0.05108642578125,
-0.0186004638671875,
0.0192718505859375,
0.012939453125,
-0.0243377685546875,
-0.01067352294921875,
0.0255279541015625,
-0.005916595458984375,
-0.01447296142578125,
0.038482666015625,
0.05108642578125,
-0.01535797119140625,
-0.043487548828125,
0.00096893310546875,
-0.006687164306640625,
0.0253143310546875,
0.0140228271484375,
0.046600341796875,
0.0262298583984375,
-0.0157470703125,
0.0153656005859375,
-0.0275115966796875,
0.01505279541015625,
-0.006946563720703125,
-0.00482177734375,
0.004375457763671875,
0.05047607421875,
-0.00722503662109375,
0.00928497314453125,
-0.00031638145446777344,
0.0202484130859375,
-0.0232086181640625,
0.063232421875,
-0.0174560546875,
0.0250396728515625,
-0.0269622802734375,
0.038787841796875,
0.038543701171875,
-0.0251922607421875,
0.003353118896484375,
-0.009246826171875,
0.027099609375,
0.0090179443359375,
-0.00910186767578125,
-0.0143280029296875,
-0.0145416259765625,
-0.0560302734375,
-0.0201416015625,
0.0251922607421875,
0.031768798828125,
-0.005443572998046875,
-0.022796630859375,
-0.0157623291015625,
0.0214996337890625,
-0.10333251953125,
-0.08905029296875,
-0.01552581787109375,
-0.0498046875,
0.0438232421875,
0.022613525390625,
-0.0004730224609375,
-0.0271453857421875,
0.07562255859375,
0.0183258056640625,
-0.01220703125,
-0.0192413330078125,
-0.05908203125,
-0.06787109375,
-0.06597900390625,
-0.0143890380859375,
-0.00632476806640625,
-0.001087188720703125,
0.0262603759765625,
-0.0200347900390625,
0.034027099609375,
0.004398345947265625,
0.06488037109375,
0.054229736328125,
-0.021209716796875,
0.001232147216796875,
0.0350341796875,
-0.058441162109375,
-0.009429931640625,
-0.00638580322265625,
0.007129669189453125,
0.00411224365234375,
0.01255035400390625,
-0.0035457611083984375,
-0.00023090839385986328,
-0.0240478515625,
0.00838470458984375,
0.0755615234375,
-0.0016326904296875,
-0.0166778564453125,
0.04559326171875,
-0.045074462890625,
-0.01316070556640625,
0.034332275390625,
-0.00974273681640625,
0.021026611328125,
-0.03875732421875,
-0.0253753662109375,
0.032318115234375,
0.0489501953125,
0.03253173828125,
-0.0011491775512695312,
0.036590576171875,
-0.01535797119140625,
0.05072021484375,
-0.005481719970703125,
0.017364501953125,
-0.060516357421875,
0.047576904296875,
-0.034454345703125,
-0.012786865234375,
0.002468109130859375,
-0.005275726318359375,
0.01849365234375,
-0.08123779296875,
-0.0149383544921875,
-0.00954437255859375,
0.00616455078125,
-0.061737060546875,
-0.0166015625,
0.007732391357421875,
0.006435394287109375,
0.01456451416015625,
0.03192138671875,
-0.0005812644958496094,
0.000873565673828125,
-0.001316070556640625,
0.00376129150390625,
-0.02508544921875,
-0.033660888671875,
-0.04962158203125,
-0.0008544921875,
-0.01494598388671875,
-0.016937255859375,
-0.00830078125,
-0.02313232421875,
-0.00968170166015625,
0.0038585662841796875,
0.005046844482421875,
-0.02398681640625,
0.043548583984375,
-0.03509521484375,
-0.01282501220703125,
0.00270843505859375,
-0.00794219970703125,
-0.04083251953125,
-0.026458740234375,
-0.0229339599609375,
-0.0916748046875,
-0.019012451171875,
-0.053466796875,
0.0938720703125,
0.05438232421875,
-0.056427001953125,
-0.003116607666015625,
0.059295654296875,
-0.0007739067077636719,
0.008331298828125,
0.040679931640625,
0.03271484375,
-0.034149169921875,
-0.014404296875,
0.0288848876953125,
-0.049163818359375,
-0.020904541015625,
-0.00572967529296875,
-0.054962158203125,
0.01251983642578125,
0.0232696533203125,
0.0216522216796875,
0.055755615234375,
-0.0269927978515625,
-0.058624267578125,
-0.02960205078125,
-0.00833892822265625,
-0.008575439453125,
0.0225677490234375,
-0.0199737548828125,
-0.0235443115234375,
-0.05657958984375,
0.0258636474609375,
0.01036834716796875,
0.00792694091796875,
-0.01194000244140625,
-0.00867462158203125,
0.01032257080078125,
-0.020721435546875,
0.07586669921875,
0.0171966552734375,
0.00966644287109375,
-0.01560211181640625,
0.042816162109375,
-0.010101318359375,
0.003078460693359375,
0.0667724609375,
-0.03558349609375,
0.032257080078125,
-0.009246826171875,
0.0081329345703125,
0.037933349609375,
-0.00039267539978027344,
0.01515960693359375,
0.058868408203125,
-0.051910400390625,
0.0242919921875,
-0.00034880638122558594,
-0.023162841796875,
0.0014219284057617188,
0.0229034423828125,
-0.01568603515625,
0.00994110107421875,
-0.02606201171875,
-0.03765869140625,
0.0099334716796875,
-0.04913330078125,
0.048614501953125,
0.018402099609375,
-0.006011962890625,
0.043609619140625,
0.0435791015625,
-0.0222625732421875,
0.017364501953125,
0.042022705078125,
0.01324462890625,
-0.0039005279541015625,
0.05609130859375,
-0.0267791748046875,
-0.04180908203125,
-0.00337982177734375,
0.046600341796875,
0.0287322998046875,
-0.0182647705078125,
-0.0276336669921875,
0.0223236083984375,
0.037628173828125,
-0.0310211181640625,
0.01221466064453125,
0.018402099609375,
0.01314544677734375,
0.01091766357421875,
-0.00872802734375,
-0.0292816162109375,
0.0204010009765625,
-0.01654052734375,
0.034149169921875,
0.0103302001953125,
0.005443572998046875,
-0.047149658203125,
0.053985595703125,
0.007465362548828125,
-0.0036525726318359375,
0.0107574462890625,
0.0467529296875,
-0.014434814453125,
0.042266845703125,
0.01312255859375,
-0.029144287109375,
-0.01163482666015625,
0.044586181640625,
-0.0226287841796875,
-0.0155792236328125,
-0.005767822265625,
0.020660400390625,
0.003635406494140625,
0.006183624267578125,
0.00926971435546875,
0.00848388671875,
0.00019121170043945312,
-0.033416748046875,
0.0085906982421875,
-0.00128936767578125,
-0.0034351348876953125,
-0.046051025390625,
-0.03765869140625,
0.035736083984375,
0.03082275390625,
0.022430419921875,
-0.00798797607421875,
0.0545654296875,
0.0249176025390625,
0.0012569427490234375,
-0.0227813720703125,
-0.004669189453125,
0.0205230712890625,
0.05029296875,
-0.0182342529296875,
-0.0303802490234375,
-0.05731201171875,
0.00249481201171875,
-0.0139617919921875,
0.0080718994140625,
0.026458740234375,
-0.007366180419921875,
0.0310211181640625,
-0.032257080078125,
-0.0025177001953125,
-0.01511383056640625,
0.006954193115234375,
0.0253448486328125,
0.01180267333984375,
-0.010406494140625,
-0.005931854248046875,
-0.05120849609375,
-0.0184173583984375,
-0.0205230712890625,
-0.034210205078125,
-0.03118896484375,
0.00777435302734375,
-0.01013946533203125,
0.0309906005859375,
-0.0300140380859375,
-0.0036983489990234375,
0.01093292236328125,
0.014251708984375,
-0.008880615234375,
0.061126708984375,
0.0075836181640625,
0.047607421875,
0.00542449951171875,
0.01019287109375,
0.0181732177734375,
0.043182373046875,
-0.00481414794921875,
-0.029388427734375,
-0.0015611648559570312,
-0.08056640625,
0.001312255859375,
-0.0333251953125,
-0.002483367919921875,
0.0638427734375,
0.0418701171875,
0.022125244140625,
0.03375244140625,
-0.01461029052734375,
-0.00901031494140625,
-0.0125274658203125,
0.0198974609375,
0.01410675048828125,
0.042266845703125,
0.04486083984375,
-0.00931549072265625,
0.003269195556640625,
0.00995635986328125,
-0.007709503173828125,
0.030487060546875,
-0.002216339111328125,
0.006565093994140625,
-0.01067352294921875,
-0.0615234375,
0.03997802734375,
0.044708251953125,
0.038055419921875,
0.047393798828125,
-0.03424072265625,
0.0181884765625,
0.0333251953125,
0.0099334716796875,
-0.029449462890625,
0.0019502639770507812,
0.04620361328125,
-0.01226043701171875,
-0.025146484375,
0.00738525390625,
-0.0248565673828125,
0.0198516845703125,
0.034912109375,
0.054107666015625,
-0.0419921875,
0.004863739013671875,
-0.01013946533203125,
-0.06817626953125,
0.0138092041015625,
-0.0123443603515625,
-0.0036869049072265625,
-0.01153564453125,
0.01085662841796875,
0.0330810546875,
-0.0230865478515625,
0.0035858154296875,
0.02972412109375,
-0.0181121826171875,
-0.00048828125,
-0.043548583984375,
0.00830078125,
0.015777587890625,
0.025390625,
-0.007511138916015625,
0.048126220703125,
-0.018218994140625,
-0.002658843994140625,
0.0034236907958984375,
-0.04095458984375,
-0.031463623046875,
0.0180511474609375,
-0.0027065277099609375,
-0.019561767578125,
0.028350830078125,
-0.0007386207580566406,
0.0218048095703125,
0.034454345703125,
-0.00920867919921875,
-0.006809234619140625,
-0.0213165283203125,
0.035491943359375,
0.01380157470703125,
-0.02679443359375,
-0.0047760009765625,
0.01358795166015625,
-0.035858154296875,
0.01194000244140625,
-0.0159454345703125,
0.0008869171142578125,
0.00922393798828125,
0.048828125,
0.05322265625,
0.0010862350463867188,
-0.02996826171875,
0.0225677490234375,
0.0224456787109375,
-0.00981903076171875,
-0.0266265869140625,
0.03607177734375,
-0.10443115234375,
-0.09136962890625,
-0.0015001296997070312,
-0.085693359375,
-0.035888671875,
-0.048980712890625,
-0.052734375,
0.1573486328125,
-0.00785064697265625,
0.0308685302734375,
0.01467132568359375,
0.066650390625,
-0.03460693359375,
0.041900634765625,
0.011383056640625,
0.013946533203125,
-0.036712646484375,
-0.006137847900390625,
0.01288604736328125,
0.00862884521484375,
0.00811004638671875,
0.0008854866027832031,
-0.0186309814453125,
0.00189208984375,
-0.027679443359375,
-0.03240966796875,
-0.00897979736328125,
0.0298919677734375,
0.00960540771484375,
0.003993988037109375,
-0.011505126953125,
0.0069427490234375,
0.013092041015625,
-0.017364501953125,
0.033416748046875,
-0.0227508544921875,
-0.03546142578125,
0.0195465087890625,
0.01374053955078125,
0.034423828125,
0.00013911724090576172,
0.01525115966796875,
-0.032745361328125,
0.01514434814453125,
0.0167388916015625,
0.0276336669921875,
0.0032138824462890625,
0.046600341796875,
-0.009979248046875,
0.035888671875,
-0.05157470703125,
-0.00344085693359375,
0.0100250244140625,
-0.0265045166015625,
-0.022552490234375,
-0.0034694671630859375,
0.005153656005859375,
0.032623291015625,
-0.03973388671875,
-0.034637451171875,
0.015045166015625,
-0.0082550048828125,
0.03466796875,
0.0179443359375,
0.0050201416015625,
-0.06158447265625,
-0.01499176025390625,
0.0308685302734375,
0.0489501953125,
-0.0406494140625,
-0.0229339599609375,
-0.00017309188842773438,
0.006107330322265625,
0.02825927734375,
-0.022064208984375,
0.0396728515625,
-0.0528564453125,
-0.041015625,
-0.006259918212890625,
-0.042510986328125,
-0.0027942657470703125,
0.00673675537109375,
-0.0007534027099609375,
0.0022678375244140625,
0.048248291015625,
-0.02191162109375,
-0.049072265625,
-0.0012044906616210938,
0.0321044921875,
0.06561279296875,
0.019622802734375,
0.04766845703125,
-0.0078582763671875,
-0.0268096923828125,
-0.0113525390625,
0.02728271484375,
-0.01275634765625,
0.0081939697265625,
0.008270263671875,
0.01202392578125,
-0.013641357421875,
0.014984130859375,
-0.0025959014892578125,
0.0011653900146484375,
0.0338134765625,
0.0301361083984375,
-0.0460205078125,
-0.002887725830078125,
0.0457763671875,
-0.01483154296875,
-0.0042724609375,
-0.0157012939453125,
0.00006663799285888672,
0.0100555419921875,
0.00240325927734375,
0.01276397705078125,
0.051300048828125,
0.0100860595703125,
-0.0261383056640625,
0.0623779296875,
-0.005298614501953125,
-0.013946533203125,
0.03289794921875,
0.0160980224609375,
0.0975341796875,
0.0121002197265625,
-0.023773193359375,
-0.0114593505859375,
0.0284271240234375,
-0.0307159423828125,
0.01015472412109375,
0.0411376953125,
-0.0265045166015625,
0.0245361328125,
0.061004638671875,
-0.0293426513671875,
0.01568603515625,
0.01561737060546875,
0.0186004638671875,
0.0011816024780273438,
0.016845703125,
0.01483154296875,
-0.0192718505859375,
0.0080413818359375,
0.0022373199462890625,
0.00775146484375,
0.017822265625,
0.0265350341796875,
-0.01157379150390625,
0.0254364013671875,
0.0546875,
-0.00962066650390625,
0.034149169921875,
0.033355712890625,
0.00019109249114990234,
-0.036285400390625,
0.00400543212890625,
-0.018768310546875,
-0.042877197265625,
0.05230712890625,
-0.006427764892578125,
0.00147247314453125,
0.03631591796875,
-0.019989013671875,
0.0198516845703125,
0.01617431640625,
-0.00406646728515625,
-0.04986572265625,
-0.06732177734375,
-0.040435791015625,
0.02447509765625,
-0.0012464523315429688,
0.00823211669921875,
-0.0013914108276367188,
0.0211334228515625,
0.03424072265625,
0.003459930419921875,
0.0061187744140625,
0.0088348388671875,
0.041259765625,
0.03326416015625,
-0.0160675048828125,
0.03131103515625,
0.0572509765625,
-0.016082763671875,
0.03997802734375,
0.00910186767578125,
0.0205078125,
-0.005031585693359375,
-0.0391845703125,
-0.04443359375,
0.01529693603515625,
-0.011566162109375,
-0.016357421875,
-0.0117034912109375,
0.0162200927734375,
-0.04547119140625,
-0.013916015625,
0.0136566162109375,
-0.01214599609375,
-0.0297393798828125,
-0.00823211669921875,
0.00785064697265625,
-0.019378662109375,
-0.00910186767578125,
-0.026580810546875,
-0.016265869140625,
0.0445556640625,
0.01308441162109375,
-0.073974609375,
0.034881591796875,
-0.032806396484375,
0.03887939453125,
-0.01522064208984375,
0.044158935546875,
-0.03497314453125,
-0.02410888671875,
-0.053436279296875,
-0.0255126953125,
-0.0498046875,
0.04205322265625,
-0.03753662109375,
0.03515625,
0.04681396484375,
-0.016204833984375,
0.044921875,
0.02069091796875,
0.017578125,
0.08935546875,
-0.05682373046875,
-0.01161956787109375,
0.0028228759765625,
0.038970947265625,
-0.027496337890625,
-0.06158447265625,
-0.0086669921875,
-0.020538330078125,
0.01389312744140625,
-0.003753662109375,
0.02532958984375,
0.033294677734375,
-0.01934814453125,
-0.09124755859375,
0.0390625,
-0.0173797607421875,
-0.032196044921875,
-0.005458831787109375,
-0.02130126953125,
0.01953125,
-0.05120849609375,
-0.02655029296875,
-0.02276611328125,
-0.05194091796875,
0.029754638671875,
0.0038356781005859375,
0.00785064697265625,
0.02178955078125,
-0.039642333984375,
-0.0364990234375,
-0.00678253173828125,
0.0145111083984375,
-0.000036776065826416016,
-0.035675048828125,
0.01552581787109375,
0.0198974609375,
0.0274658203125,
0.01006317138671875,
0.002292633056640625,
0.0225677490234375,
-0.04119873046875,
0.007221221923828125,
-0.01202392578125,
-0.0227508544921875,
0.012115478515625,
0.054840087890625,
-0.0016851425170898438,
0.0003554821014404297,
-0.034759521484375,
0.01036834716796875,
-0.01372528076171875,
-0.005279541015625,
0.00737762451171875,
-0.0007786750793457031,
-0.01010894775390625,
0.013916015625,
-0.003833770751953125,
0.0023784637451171875,
-0.0540771484375,
0.00598907470703125,
-0.031890869140625,
-0.033355712890625,
0.0014324188232421875,
0.004817962646484375,
-0.0098724365234375,
0.0174560546875,
0.07843017578125,
-0.035736083984375,
0.02435302734375,
0.00875091552734375,
0.01216888427734375,
0.056640625,
-0.00786590576171875,
0.01056671142578125,
0.03985595703125,
-0.039215087890625,
-0.005680084228515625,
-0.0085906982421875,
0.0060882568359375,
-0.037933349609375,
0.005397796630859375,
0.0006022453308105469,
0.04449462890625,
0.0051116943359375,
0.057098388671875,
-0.0252685546875,
0.01477813720703125,
0.00809478759765625,
0.0034885406494140625,
-0.035186767578125,
0.0002810955047607422,
-0.015869140625,
-0.01464080810546875,
0.023040771484375,
0.01024627685546875,
0.07513427734375,
0.000020802021026611328,
-0.006954193115234375,
0.031402587890625,
-0.062408447265625,
-0.0361328125,
0.0157623291015625,
-0.05731201171875,
-0.01261138916015625,
-0.0057373046875
] |
2b8b49931d464758797f50811f6dd00bc4d0ccea
|
Wordpress Stackexchange
Q: how to create child WordPress plugin I like to create child plugin..
Explanation :-
I have one parent plugin named X. This will work independently (like other existing plugins).
Now I decided to add some extra features to that plugin X (think of it as an upgrade). So I want to create extra features by way of another plugin Y, which will depend on (and inherit from) X.
This plugin Y will not work with out plugin X.
How can I do this?
A: Make some hooks in your parent plugin to which the child plugin can attach their own function. Also wrap the child plugin in if(function_exists('parent-plugin-function')) or class_exists if its a class.
|
Q: how to create child WordPress plugin I like to create child plugin..
Explanation :-
I have one parent plugin named X. This will work independently (like other existing plugins).
Now I decided to add some extra features to that plugin X (think of it as an upgrade). So I want to create extra features by way of another plugin Y, which will depend on (and inherit from) X.
This plugin Y will not work with out plugin X.
How can I do this?
A: Make some hooks in your parent plugin to which the child plugin can attach their own function. Also wrap the child plugin in if(function_exists('parent-plugin-function')) or class_exists if its a class.
A: the Best way to do this is have your X plugin made with its own hooks for actions and filters so new plugins (in your case Y) could interact with plugin X's functions and data.
Defining your own hooks is fairly easy and simple.
Action Hook
from the codex:
Actions are the hooks that the
WordPress core launches at specific
points during execution, or when
specific events occur. Your plugin can
specify that one or more of its PHP
functions are executed at these
points, using the Action API.
example of a new action hook:
Function whatever(){
//regular stuff you do normally
do_action('Name-Of-Your-Action-hook', $args1,$args2)
//regular stuff you do normally
}
Now we can interact with that function and use its arguments ($args1,$args2) using 'Name-Of-Your_hook' hook
add_action('Name-Of-Your-Action-hook','hook_function_callback');
Filter Hook
from the codex:
Filters are the hooks that WordPress
launches to modify text of various
types before adding it to the database
or sending it to the browser screen.
Your plugin can specify that one or
more of its PHP functions is executed
to modify specific types of text at
these times, using the Filter API.
example of a new filter hook:
Function whatever(){
//regular stuff you do normally
$output = apply_filters('Name-Of-Your-Filter-hook', $output,$args1,$args2)
//regular stuff you do normally
}
Now we can interact with that function , filter $output use and its arguments ($args1,$args2) using 'Name-Of-Your-Filter-hook' hook
add_filter('Name-Of-Your_hook','hook_function_callback');
A good example to that would be contact form 7
*
*Contact Form 7 - Campaign Monitor
Addon
*Contact Form 7 Dynamic Text Extension
*Contact Form 7 Calendar
*Contact Form 7 Textarea Wordcount
*Contact Form 7 Customfield in mail
*Contact Form 7 to Database Extension
and many more which all (most) are plugins that extend the functionality of Contact Form 7 based on its hooks.
A: I just went through myself and I had so many changes that I couldn't just override the actions.
I created this tool that allows you to create a child plugin like a child theme. You can make updates to the plugin and still update it without losing your changes.
I'm posting this here because it relates and hopefully becomes useful to the next person who runs into this issue.
https://github.com/ThomasDepole/wordpress-child-plugin-tool
|
wordpress
|
{
"language": "en",
"length": 478,
"provenance": "stackexchange_00019.jsonl.gz:407887",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12470"
}
|
[
0.01953125,
0.0035724639892578125,
-0.0013370513916015625,
-0.015106201171875,
-0.00547027587890625,
-0.0004546642303466797,
-0.0007381439208984375,
-0.02813720703125,
-0.05499267578125,
-0.0059051513671875,
-0.022735595703125,
0.030029296875,
-0.08551025390625,
-0.0274200439453125,
-0.008575439453125,
-0.07208251953125,
0.01293182373046875,
-0.0014524459838867188,
-0.00637054443359375,
-0.024444580078125,
0.016815185546875,
-0.009246826171875,
-0.004245758056640625,
0.1033935546875,
0.043426513671875,
-0.030364990234375,
0.0352783203125,
-0.0362548828125,
0.030548095703125,
-0.0172576904296875,
0.018646240234375,
-0.00534820556640625,
0.006420135498046875,
0.016510009765625,
0.002960205078125,
-0.053619384765625,
0.005725860595703125,
-0.00286102294921875,
-0.006237030029296875,
0.05010986328125,
0.031951904296875,
-0.0159454345703125,
0.0149383544921875,
0.050323486328125,
-0.00334930419921875,
-0.07275390625,
0.05255126953125,
-0.034149169921875,
0.0167236328125,
-0.0374755859375,
0.031768798828125,
0.0184478759765625,
0.0592041015625,
-0.029144287109375,
-0.0196990966796875,
-0.0038623809814453125,
-0.0164337158203125,
0.028961181640625,
0.040252685546875,
-0.01471710205078125,
-0.030731201171875,
-0.002040863037109375,
0.01221466064453125,
0.0020236968994140625,
0.0556640625,
-0.01386260986328125,
-0.0352783203125,
0.0389404296875,
-0.048919677734375,
0.07232666015625,
0.04229736328125,
-0.062103271484375,
0.0211181640625,
-0.000010907649993896484,
-0.00608062744140625,
-0.04791259765625,
0.0304412841796875,
-0.01227569580078125,
0.0014944076538085938,
0.004055023193359375,
0.0283203125,
0.0034885406494140625,
-0.00418853759765625,
-0.0282135009765625,
0.034149169921875,
-0.005664825439453125,
0.00446319580078125,
-0.011016845703125,
-0.03619384765625,
-0.0045928955078125,
-0.0245819091796875,
-0.041961669921875,
-0.033599853515625,
0.0400390625,
0.01329803466796875,
0.008941650390625,
0.02618408203125,
0.00018918514251708984,
-0.01110076904296875,
0.0309295654296875,
0.016265869140625,
-0.06024169921875,
0.0772705078125,
-0.0294189453125,
0.009613037109375,
0.023712158203125,
0.00936126708984375,
-0.037872314453125,
0.019256591796875,
0.01389312744140625,
-0.0135345458984375,
0.0528564453125,
0.00870513916015625,
-0.03790283203125,
0.0148162841796875,
0.0217742919921875,
-0.0022754669189453125,
0.042266845703125,
0.0155792236328125,
0.0244903564453125,
-0.006908416748046875,
-0.0213775634765625,
0.005611419677734375,
0.022003173828125,
0.007183074951171875,
-0.0115814208984375,
-0.0159912109375,
0.00019812583923339844,
0.01482391357421875,
-0.023345947265625,
-0.0316162109375,
0.0296783447265625,
0.1177978515625,
0.0411376953125,
0.01020050048828125,
0.003772735595703125,
0.0360107421875,
-0.00238037109375,
0.00777435302734375,
-0.0390625,
0.024078369140625,
-0.0023593902587890625,
0.0107879638671875,
-0.007358551025390625,
0.0006203651428222656,
-0.01299285888671875,
0.004131317138671875,
0.03497314453125,
0.0113067626953125,
-0.0004916191101074219,
0.02801513671875,
-0.01407623291015625,
0.017608642578125,
-0.01898193359375,
0.0313720703125,
-0.04119873046875,
-0.0101470947265625,
-0.0180511474609375,
0.038330078125,
0.005229949951171875,
0.01511383056640625,
0.0169677734375,
0.054473876953125,
-0.035552978515625,
-0.043701171875,
-0.020263671875,
-0.08489990234375,
-0.013275146484375,
0.0149383544921875,
-0.048309326171875,
0.042755126953125,
-0.036865234375,
-0.03729248046875,
0.0077972412109375,
0.018768310546875,
0.03082275390625,
-0.026824951171875,
0.0004467964172363281,
0.036346435546875,
0.0020389556884765625,
-0.0141143798828125,
-0.0185089111328125,
0.035919189453125,
-0.010528564453125,
-0.0467529296875,
0.03271484375,
-0.0107574462890625,
0.0228729248046875,
0.011993408203125,
0.0015697479248046875,
-0.02325439453125,
0.0233001708984375,
-0.055511474609375,
0.0142974853515625,
-0.01922607421875,
-0.017608642578125,
0.015716552734375,
0.004268646240234375,
-0.0162353515625,
0.00814056396484375,
-0.031646728515625,
-0.0085601806640625,
0.0025386810302734375,
-0.00689697265625,
-0.04022216796875,
-0.0200653076171875,
-0.0193634033203125,
0.0413818359375,
0.028289794921875,
0.01462554931640625,
-0.00521087646484375,
-0.00984954833984375,
0.026336669921875,
-0.0860595703125,
-0.04058837890625,
0.016021728515625,
-0.0017633438110351562,
0.029632568359375,
0.0276031494140625,
0.02142333984375,
0.03924560546875,
0.0033855438232421875,
0.01788330078125,
-0.0107879638671875,
0.031585693359375,
-0.007495880126953125,
-0.01200103759765625,
-0.01885986328125,
-0.0234832763671875,
0.01629638671875,
-0.06976318359375,
0.035552978515625,
0.0386962890625,
0.03289794921875,
-0.0259857177734375,
-0.017364501953125,
-0.03314208984375,
-0.04541015625,
-0.003963470458984375,
0.04498291015625,
0.02886962890625,
0.040618896484375,
-0.0144500732421875,
0.01113128662109375,
0.0260009765625,
-0.048919677734375,
-0.0074615478515625,
-0.00196075439453125,
-0.0158843994140625,
0.0303802490234375,
0.00844573974609375,
0.006927490234375,
0.01387786865234375,
-0.034698486328125,
0.007251739501953125,
0.036285400390625,
-0.010986328125,
-0.03839111328125,
-0.0167694091796875,
-0.011962890625,
0.0255584716796875,
-0.042144775390625,
-0.051788330078125,
-0.0013284683227539062,
0.0179595947265625,
0.01352691650390625,
0.0321044921875,
0.034759521484375,
0.0053558349609375,
-0.00130462646484375,
-0.000843048095703125,
-0.018463134765625,
0.0096893310546875,
0.0156707763671875,
-0.019775390625,
0.031005859375,
-0.027587890625,
-0.004802703857421875,
0.021453857421875,
0.0089874267578125,
-0.0005354881286621094,
0.012664794921875,
0.00896453857421875,
-0.01432037353515625,
-0.0092315673828125,
-0.022308349609375,
0.03143310546875,
0.0247955322265625,
-0.00429534912109375,
-0.01222991943359375,
0.0218048095703125,
0.0079498291015625,
-0.0212249755859375,
0.020233154296875,
0.02166748046875,
-0.0265350341796875,
-0.0169677734375,
-0.0162506103515625,
0.031524658203125,
-0.0362548828125,
0.01513671875,
0.0533447265625,
0.0018453598022460938,
-0.01390838623046875,
-0.0022373199462890625,
-0.01525115966796875,
0.00202178955078125,
-0.0030879974365234375,
-0.007488250732421875,
0.002288818359375,
-0.042144775390625,
0.00922393798828125,
0.03118896484375,
0.07025146484375,
0.0020465850830078125,
-0.038299560546875,
0.00543212890625,
0.0540771484375,
0.005229949951171875,
-0.0033111572265625,
-0.02685546875,
-0.0614013671875,
0.01456451416015625,
-0.02105712890625,
-0.024139404296875,
-0.01035308837890625,
-0.0006422996520996094,
0.027252197265625,
-0.0135498046875,
-0.03497314453125,
-0.046478271484375,
-0.059722900390625,
-0.0626220703125,
0.0123748779296875,
-0.00004971027374267578,
0.018310546875,
-0.004573822021484375,
0.0284576416015625,
-0.015838623046875,
-0.057281494140625,
-0.031402587890625,
0.0177764892578125,
0.0099334716796875,
-0.0036869049072265625,
-0.00034165382385253906,
-0.0273284912109375,
-0.006072998046875,
0.006744384765625,
0.0251312255859375,
0.01001739501953125,
-0.0199432373046875,
-0.005908966064453125,
-0.03643798828125,
0.004840850830078125,
0.0104217529296875,
0.0034084320068359375,
0.0214691162109375,
0.037109375,
0.0352783203125,
-0.01384735107421875,
-0.0301666259765625,
0.011749267578125,
-0.0474853515625,
0.005352020263671875,
0.0128173828125,
-0.0096435546875,
-0.0012054443359375,
-0.0138397216796875,
0.0023555755615234375,
-0.01629638671875,
0.033203125,
-0.03570556640625,
0.06195068359375,
-0.0122222900390625,
0.0088348388671875,
-0.03619384765625,
0.0224151611328125,
-0.020355224609375,
-0.0032176971435546875,
-0.0140838623046875,
0.01149749755859375,
-0.0151214599609375,
0.007732391357421875,
-0.045654296875,
-0.0251617431640625,
0.0399169921875,
-0.002719879150390625,
0.007656097412109375,
-0.028961181640625,
-0.0170135498046875,
-0.0074920654296875,
0.0648193359375,
-0.08038330078125,
-0.0005869865417480469,
0.0113525390625,
0.005565643310546875,
-0.0199127197265625,
-0.0212554931640625,
-0.09259033203125,
-0.0259552001953125,
-0.03704833984375,
0.017303466796875,
0.01267242431640625,
-0.01036834716796875,
-0.0259857177734375,
0.035369873046875,
-0.037841796875,
-0.0117340087890625,
0.019927978515625,
-0.01306915283203125,
0.001422882080078125,
-0.012603759765625,
-0.007694244384765625,
-0.0189666748046875,
-0.0013723373413085938,
-0.01806640625,
-0.034698486328125,
-0.005764007568359375,
-0.0465087890625,
0.055023193359375,
0.0308685302734375,
-0.007465362548828125,
-0.013458251953125,
0.045745849609375,
0.0205230712890625,
0.0435791015625,
-0.01346588134765625,
-0.0114288330078125,
-0.007293701171875,
0.0166168212890625,
0.02337646484375,
0.0002827644348144531,
-0.016754150390625,
-0.039642333984375,
-0.028228759765625,
0.0232086181640625,
-0.02093505859375,
0.00897216796875,
-0.01155853271484375,
-0.0095062255859375,
0.01055145263671875,
-0.01904296875,
-0.06396484375,
-0.0223388671875,
-0.0197601318359375,
-0.0222320556640625,
-0.00394439697265625,
-0.033477783203125,
0.035400390625,
-0.021209716796875,
-0.0025882720947265625,
0.022430419921875,
0.08721923828125,
0.00823211669921875,
-0.01012420654296875,
-0.07098388671875,
-0.0018482208251953125,
0.016693115234375,
0.0217742919921875,
0.01580810546875,
-0.01128387451171875,
-0.0006985664367675781,
-0.01485443115234375,
0.00592803955078125,
0.01363372802734375,
0.0196990966796875,
0.034027099609375,
-0.00016963481903076172,
-0.03533935546875,
0.0230865478515625,
0.026641845703125,
-0.03802490234375,
-0.01039886474609375,
-0.020904541015625,
-0.020843505859375,
-0.02545166015625,
0.030059814453125,
0.01174163818359375,
0.035491943359375,
-0.02972412109375,
-0.0345458984375,
0.0171051025390625,
-0.03173828125,
-0.043365478515625,
0.01776123046875,
-0.01374053955078125,
-0.02960205078125,
-0.03985595703125,
-0.00704193115234375,
-0.0008473396301269531,
0.0269775390625,
-0.0223388671875,
0.0207366943359375,
-0.006832122802734375,
-0.04052734375,
-0.01104736328125,
-0.00940704345703125,
0.0797119140625,
0.0161285400390625,
-0.0233917236328125,
-0.00666046142578125,
-0.028076171875,
-0.00229644775390625,
-0.017059326171875,
-0.006435394287109375,
0.0134124755859375,
0.0230560302734375,
-0.0099029541015625,
-0.0023632049560546875,
-0.0277862548828125,
0.03179931640625,
-0.0267791748046875,
-0.005977630615234375,
-0.030975341796875,
-0.01450347900390625,
0.002811431884765625,
0.0197296142578125,
-0.031707763671875,
0.01389312744140625,
-0.004848480224609375,
0.04571533203125,
0.0091552734375,
0.03460693359375,
0.022186279296875,
-0.042724609375,
0.033599853515625,
-0.0293426513671875,
-0.01212310791015625,
-0.021087646484375,
-0.0223388671875,
0.028778076171875,
0.028228759765625,
0.006450653076171875,
0.005748748779296875,
0.01180267333984375,
0.000031828880310058594,
-0.0161285400390625,
-0.025299072265625,
0.01275634765625,
0.0161590576171875,
0.007221221923828125,
0.002597808837890625,
0.0186309814453125,
0.046875,
-0.01136016845703125,
0.00487518310546875,
-0.03961181640625,
0.00965118408203125,
0.03143310546875,
-0.033905029296875,
0.0177001953125,
0.0162811279296875,
-0.0174102783203125,
0.01067352294921875,
-0.0005397796630859375,
-0.042022705078125,
-0.04949951171875,
-0.01065826416015625,
-0.009490966796875,
0.0501708984375,
-0.0309906005859375,
0.0161285400390625,
-0.034698486328125,
0.01288604736328125,
-0.02264404296875,
-0.0004684925079345703,
0.0638427734375,
0.029876708984375,
-0.048370361328125,
-0.0179443359375,
-0.042572021484375,
-0.035980224609375,
-0.048492431640625,
-0.0247955322265625,
-0.06683349609375,
0.0299530029296875,
-0.021514892578125,
0.0160369873046875,
-0.004268646240234375,
0.0201568603515625,
0.002002716064453125,
0.0011615753173828125,
-0.0167694091796875,
-0.018798828125,
0.01015472412109375,
0.042724609375,
-0.0017709732055664062,
0.052764892578125,
0.032501220703125,
0.0281219482421875,
-0.01187896728515625,
-0.047760009765625,
-0.00007581710815429688,
0.0035114288330078125,
-0.00250244140625,
-0.036285400390625,
0.0307464599609375,
-0.01329803466796875,
0.04730224609375,
0.00009179115295410156,
0.01132965087890625,
-0.004840850830078125,
0.00444793701171875,
-0.01605224609375,
0.02197265625,
-0.002292633056640625,
0.005016326904296875,
0.0254364013671875,
-0.056060791015625,
-0.0220184326171875,
0.0006556510925292969,
0.02447509765625,
0.037384033203125,
-0.032440185546875,
0.02655029296875,
0.014404296875,
-0.02313232421875,
0.064697265625,
0.0111236572265625,
-0.0298309326171875,
0.0168609619140625,
0.003902435302734375,
0.01195526123046875,
-0.0188140869140625,
0.0139312744140625,
-0.004543304443359375,
-0.0043182373046875,
0.0982666015625,
0.02685546875,
-0.0310211181640625,
0.08001708984375,
-0.053741455078125,
0.0030918121337890625,
0.0135498046875,
0.02001953125,
-0.057769775390625,
0.0249786376953125,
-0.0065155029296875,
0.0196685791015625,
0.0491943359375,
-0.0014009475708007812,
0.018585205078125,
0.00043487548828125,
-0.00583648681640625,
0.0202178955078125,
-0.018463134765625,
0.00823974609375,
-0.009918212890625,
-0.024658203125,
-0.007659912109375,
-0.0303802490234375,
0.01678466796875,
-0.011810302734375,
0.037261962890625,
-0.0008463859558105469,
0.02423095703125,
0.0013914108276367188,
0.0285186767578125,
0.0049285888671875,
-0.0017757415771484375,
-0.014801025390625,
0.04949951171875,
-0.0340576171875,
0.01291656494140625,
0.00824737548828125,
0.0093536376953125,
0.013397216796875,
0.054473876953125,
-0.0234375,
0.0185546875,
0.0227813720703125,
0.003040313720703125,
-0.0257110595703125,
-0.0269775390625,
0.0184783935546875,
-0.01438140869140625,
-0.051116943359375,
0.01398468017578125,
-0.0543212890625,
-0.0222320556640625,
-0.01192474365234375,
-0.002452850341796875,
0.04510498046875,
0.01369476318359375,
-0.032135009765625,
0.04278564453125,
0.0133056640625,
-0.032196044921875,
-0.0268707275390625,
-0.0238037109375,
-0.05816650390625,
-0.0074920654296875,
-0.024017333984375,
-0.0007843971252441406,
0.04229736328125,
-0.0130615234375,
-0.07220458984375,
0.1409912109375,
-0.02069091796875,
0.04302978515625,
0.0268402099609375,
0.047271728515625,
-0.0496826171875,
-0.00010246038436889648,
-0.028533935546875,
0.045928955078125,
0.0255584716796875,
0.0262451171875,
-0.05133056640625,
-0.02056884765625,
-0.00287628173828125,
0.0489501953125,
0.060821533203125,
0.003055572509765625,
-0.024566650390625,
-0.0178070068359375,
0.03607177734375,
0.00765228271484375,
-0.010528564453125,
0.060699462890625,
0.024505615234375,
-0.0171356201171875,
0.0460205078125,
0.0218658447265625,
0.045501708984375,
-0.005657196044921875,
0.023895263671875,
0.050689697265625,
0.0199127197265625,
-0.0150146484375,
-0.0078582763671875,
0.0350341796875,
-0.0166778564453125,
-0.0004172325134277344,
-0.01288604736328125,
0.03900146484375,
0.036529541015625,
0.0068511962890625,
-0.002471923828125,
0.01085662841796875,
0.042449951171875,
-0.0173797607421875,
0.0380859375,
-0.0302734375,
0.006298065185546875,
-0.02520751953125,
0.0131683349609375,
-0.075927734375,
-0.01654052734375,
0.00177001953125,
0.059112548828125,
-0.0794677734375,
-0.00695037841796875,
-0.010772705078125,
0.015655517578125,
-0.03668212890625,
0.01016998291015625,
0.0290374755859375,
0.00746917724609375,
-0.01514434814453125,
-0.047607421875,
0.0007257461547851562,
0.007236480712890625,
-0.0009064674377441406,
0.01068115234375,
0.0224151611328125,
0.0162200927734375,
0.05999755859375,
-0.031829833984375,
-0.01007080078125,
0.0230865478515625,
0.032470703125,
0.006549835205078125,
0.0169219970703125,
-0.0401611328125,
-0.0149993896484375,
-0.004642486572265625,
-0.0364990234375,
-0.0022258758544921875,
0.019622802734375,
0.01690673828125,
0.0093231201171875,
-0.018646240234375,
-0.003391265869140625,
0.01430511474609375,
0.00681304931640625,
0.03485107421875,
-0.0219573974609375,
0.01373291015625,
-0.0020465850830078125,
0.0298309326171875,
0.00897216796875,
-0.01172637939453125,
0.0296630859375,
0.037689208984375,
0.0216064453125,
-0.06231689453125,
-0.015533447265625,
-0.0020236968994140625,
-0.042388916015625,
0.0115814208984375,
-0.01509857177734375,
-0.00026035308837890625,
-0.004955291748046875,
-0.0230865478515625,
-0.00836944580078125,
-0.0031414031982421875,
0.03271484375,
-0.0203704833984375,
0.06060791015625,
-0.01678466796875,
-0.01491546630859375,
0.039276123046875,
-0.039306640625,
0.07916259765625,
-0.0131988525390625,
-0.09576416015625,
-0.030120849609375,
-0.009613037109375,
-0.0254058837890625,
0.04840087890625,
0.044342041015625,
-0.031585693359375,
0.0350341796875,
0.0283660888671875,
-0.01134490966796875,
0.044158935546875,
-0.0142669677734375,
-0.00010704994201660156,
-0.00846099853515625,
0.01654052734375,
-0.0037670135498046875,
-0.04052734375,
-0.003009796142578125,
-0.038055419921875,
0.0255584716796875,
0.06378173828125,
0.025848388671875,
0.00014841556549072266,
0.047454833984375,
-0.0005202293395996094,
-0.02252197265625,
0.005542755126953125,
-0.013214111328125,
0.027099609375,
-0.034393310546875,
-0.0238189697265625,
-0.0006561279296875,
-0.041656494140625,
0.01552581787109375,
0.0208892822265625,
-0.0019159317016601562,
-0.0254364013671875,
0.005168914794921875,
0.0277557373046875,
0.0377197265625,
0.04473876953125,
-0.0189971923828125,
-0.027191162109375,
-0.04791259765625,
-0.033599853515625,
0.03607177734375,
0.024749755859375,
0.0002682209014892578,
0.0164794921875,
0.03411865234375,
-0.026611328125,
0.0045013427734375,
-0.006572723388671875,
-0.037628173828125,
0.0217742919921875,
0.0289764404296875,
-0.09375,
-0.021881103515625,
-0.0168304443359375,
-0.00400543212890625,
-0.0187225341796875,
0.0955810546875,
-0.009857177734375,
-0.0404052734375,
0.035614013671875,
0.039459228515625,
0.03863525390625,
-0.0635986328125,
0.015106201171875,
0.0511474609375,
0.0049591064453125,
0.03411865234375,
-0.042327880859375,
-0.044921875,
-0.09161376953125,
0.048431396484375,
0.029083251953125,
-0.020416259765625,
-0.02239990234375,
-0.036163330078125,
0.05340576171875,
0.045684814453125,
0.020172119140625,
-0.07196044921875,
0.049468994140625,
-0.03289794921875,
0.06121826171875,
0.0167694091796875,
-0.0110321044921875,
-0.005428314208984375,
0.0011377334594726562,
-0.034942626953125,
-0.040679931640625,
-0.04827880859375,
0.0372314453125,
-0.04339599609375,
0.06689453125,
0.04449462890625,
-0.061431884765625,
0.014556884765625,
0.09710693359375,
0.08319091796875,
0.1368408203125,
0.050445556640625,
-0.03936767578125,
-0.005619049072265625,
-0.01934814453125,
0.004001617431640625,
0.018218994140625,
0.045623779296875,
-0.08563232421875,
-0.07550048828125,
-0.0177154541015625,
0.01073455810546875,
0.03350830078125,
-0.03515625,
-0.06298828125,
0.0869140625,
-0.0283355712890625,
-0.03314208984375,
-0.033050537109375,
0.018768310546875,
-0.0032901763916015625,
0.0004413127899169922,
-0.00632476806640625,
0.0200958251953125,
-0.0069732666015625,
0.02685546875,
-0.01007843017578125,
0.0208892822265625,
-0.008575439453125,
-0.0240020751953125,
-0.01165771484375,
0.021270751953125,
0.03631591796875,
-0.020538330078125,
-0.0233917236328125,
0.0160064697265625,
0.01493072509765625,
0.03704833984375,
-0.0006341934204101562,
0.018707275390625,
0.0296783447265625,
-0.0276947021484375,
0.00040459632873535156,
-0.0396728515625,
0.0157318115234375,
0.01297760009765625,
0.0175018310546875,
0.016937255859375,
-0.0021839141845703125,
-0.04046630859375,
-0.0106201171875,
-0.0595703125,
-0.03765869140625,
-0.012908935546875,
0.01064300537109375,
-0.05816650390625,
0.00034880638122558594,
0.017791748046875,
-0.0020961761474609375,
-0.0254669189453125,
0.0462646484375,
-0.0244140625,
-0.0308685302734375,
0.035888671875,
-0.00257110595703125,
-0.05133056640625,
-0.0141448974609375,
0.063232421875,
-0.0307464599609375,
0.021942138671875,
0.007160186767578125,
0.0084381103515625,
0.03759765625,
0.048431396484375,
0.026641845703125,
0.027191162109375,
-0.040496826171875,
0.0265960693359375,
0.0010442733764648438,
0.015594482421875,
-0.037200927734375,
-0.03167724609375,
-0.035888671875,
0.0191192626953125,
0.0129852294921875,
0.0146484375,
-0.031524658203125,
0.083740234375,
0.045013427734375,
0.0550537109375,
0.0181732177734375,
-0.023193359375,
-0.04473876953125,
0.0621337890625,
-0.0235137939453125,
-0.0153350830078125,
-0.042022705078125,
-0.0019817352294921875,
0.0203094482421875,
-0.003147125244140625,
0.04168701171875,
-0.017059326171875,
0.0362548828125,
-0.01503753662109375,
-0.01544952392578125,
0.0347900390625
] |
a11cefa69ee38c2620ed4d8ac02b7d8551b56e7e
|
Wordpress Stackexchange
Q: How to update page status from publish to draft and draft to publish I am trying to figure out how to write the code that will allow me to do the following with pages of a WordPress blog.
I need to have something where I specify which page ID's I want to list (about 15 total) and then give the user the ability to select which ones will be published or which ones will be a draft. This will remove them from the menu and will also remove page from the site as well.
I found this statement
To change a post status, you get the post, change its status field,
then call wp_update_post with the new post object
The closest existing plugin is http://wordpress.org/extend/plugins/wp-hide-pages/ except that this plugin uses wp-list-pages. And, it only hides them and does not actually move them from Publish to Draft.
A: A faster solution is:
$post = array( 'ID' => $post_id, 'post_status' => $status );
wp_update_post($post);
This way you don't have to get the post.
|
Q: How to update page status from publish to draft and draft to publish I am trying to figure out how to write the code that will allow me to do the following with pages of a WordPress blog.
I need to have something where I specify which page ID's I want to list (about 15 total) and then give the user the ability to select which ones will be published or which ones will be a draft. This will remove them from the menu and will also remove page from the site as well.
I found this statement
To change a post status, you get the post, change its status field,
then call wp_update_post with the new post object
The closest existing plugin is http://wordpress.org/extend/plugins/wp-hide-pages/ except that this plugin uses wp-list-pages. And, it only hides them and does not actually move them from Publish to Draft.
A: A faster solution is:
$post = array( 'ID' => $post_id, 'post_status' => $status );
wp_update_post($post);
This way you don't have to get the post.
A: Here is a function that changes post status
/*
$post_id - The ID of the post you'd like to change.
$status - The post status publish|pending|draft|private|static|object|attachment|inherit|future|trash.
*/
function change_post_status($post_id,$status){
$current_post = get_post( $post_id, 'ARRAY_A' );
$current_post['post_status'] = $status;
wp_update_post($current_post);
}
simple call the function and pass the post id and the new status you want it to have for example:
change_post_status(12,'private');
|
wordpress
|
{
"language": "en",
"length": 234,
"provenance": "stackexchange_00019.jsonl.gz:407897",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12512"
}
|
[
0.039215087890625,
0.0120849609375,
-0.006519317626953125,
0.01751708984375,
0.01445770263671875,
-0.0404052734375,
0.0452880859375,
-0.045074462890625,
0.0276947021484375,
-0.0239105224609375,
-0.01207733154296875,
-0.013580322265625,
-0.06463623046875,
-0.034271240234375,
-0.0014095306396484375,
-0.0438232421875,
0.0281524658203125,
-0.01141357421875,
0.024169921875,
-0.009552001953125,
-0.0021228790283203125,
-0.003047943115234375,
0.04278564453125,
0.0262451171875,
0.0172576904296875,
-0.0211944580078125,
0.03216552734375,
-0.01047515869140625,
-0.00643157958984375,
-0.03582763671875,
0.00635528564453125,
0.02374267578125,
0.0225830078125,
0.0033702850341796875,
-0.018341064453125,
0.00275421142578125,
-0.005340576171875,
-0.003658294677734375,
-0.0041656494140625,
0.021881103515625,
0.0231170654296875,
-0.004547119140625,
0.01082611083984375,
-0.0084075927734375,
-0.016754150390625,
-0.0174713134765625,
0.01532745361328125,
-0.0263671875,
0.0030078887939453125,
0.00920867919921875,
0.021484375,
0.005870819091796875,
0.0212554931640625,
0.0252532958984375,
-0.0177459716796875,
-0.00814056396484375,
0.0223541259765625,
0.06439208984375,
0.043670654296875,
-0.0205230712890625,
-0.066162109375,
0.0253143310546875,
0.0034313201904296875,
-0.03753662109375,
-0.0290069580078125,
0.01557159423828125,
-0.00691986083984375,
0.0087738037109375,
-0.0611572265625,
-0.044036865234375,
0.0300445556640625,
-0.048675537109375,
-0.01190948486328125,
-0.01352691650390625,
-0.031494140625,
0.0156707763671875,
0.023956298828125,
-0.0004096031188964844,
-0.00925445556640625,
0.00464630126953125,
0.0263824462890625,
0.0189056396484375,
-0.03759765625,
-0.01335906982421875,
0.0020999908447265625,
0.00691986083984375,
-0.007434844970703125,
-0.0181427001953125,
-0.047607421875,
0.01232147216796875,
-0.03350830078125,
-0.016510009765625,
-0.0129241943359375,
-0.00020265579223632812,
-0.0067596435546875,
0.00606536865234375,
0.01407623291015625,
0.06964111328125,
-0.0021610260009765625,
0.0195159912109375,
-0.01702880859375,
-0.0343017578125,
0.006198883056640625,
-0.0478515625,
-0.0133056640625,
0.0457763671875,
0.030670166015625,
0.04705810546875,
0.0207977294921875,
0.0005764961242675781,
0.0063323974609375,
-0.0216827392578125,
-0.0156097412109375,
-0.005771636962890625,
-0.0185699462890625,
-0.0217437744140625,
-0.056488037109375,
0.01520538330078125,
-0.004100799560546875,
-0.01399993896484375,
0.001033782958984375,
0.028167724609375,
-0.031585693359375,
-0.0017604827880859375,
-0.00855255126953125,
-0.00930023193359375,
-0.005802154541015625,
-0.0216217041015625,
0.00904083251953125,
0.00926971435546875,
-0.07000732421875,
0.0203857421875,
0.12890625,
0.01416778564453125,
0.0236663818359375,
-0.0220794677734375,
0.00879669189453125,
0.0023670196533203125,
-0.01416015625,
0.04620361328125,
-0.05694580078125,
-0.028839111328125,
0.029083251953125,
-0.047454833984375,
-0.01296234130859375,
0.007778167724609375,
0.026763916015625,
0.0236968994140625,
-0.005268096923828125,
-0.0156402587890625,
-0.025115966796875,
0.01476287841796875,
0.037689208984375,
-0.0085601806640625,
0.01219940185546875,
-0.044281005859375,
0.04473876953125,
-0.049041748046875,
0.015625,
-0.03326416015625,
0.058380126953125,
0.017425537109375,
0.024139404296875,
-0.00568389892578125,
-0.0185546875,
-0.03173828125,
-0.08880615234375,
-0.007080078125,
0.0246734619140625,
0.00789642333984375,
0.0188751220703125,
-0.0250244140625,
0.032684326171875,
-0.01090240478515625,
-0.026641845703125,
0.014495849609375,
0.01097869873046875,
-0.003814697265625,
0.01226043701171875,
0.01397705078125,
-0.0416259765625,
-0.037933349609375,
0.038421630859375,
-0.032745361328125,
-0.07568359375,
0.0667724609375,
0.0034198760986328125,
0.037139892578125,
-0.004947662353515625,
-0.0034046173095703125,
0.066162109375,
0.04803466796875,
-0.029296875,
0.01351165771484375,
-0.006282806396484375,
-0.0181732177734375,
0.0166015625,
0.01497650146484375,
-0.00579833984375,
-0.021759033203125,
-0.01505279541015625,
0.0291748046875,
-0.016021728515625,
0.033477783203125,
0.0015468597412109375,
0.005985260009765625,
-0.00016045570373535156,
0.0283050537109375,
0.0016117095947265625,
-0.001399993896484375,
0.012603759765625,
-0.0204925537109375,
-0.00994873046875,
-0.022857666015625,
-0.0386962890625,
-0.01390838623046875,
-0.0214691162109375,
-0.02447509765625,
-0.007671356201171875,
0.0007920265197753906,
-0.0193023681640625,
0.01253509521484375,
-0.03717041015625,
-0.004215240478515625,
0.0731201171875,
-0.057342529296875,
0.020660400390625,
-0.06231689453125,
0.058197021484375,
-0.0210723876953125,
-0.023101806640625,
0.036865234375,
0.040679931640625,
0.059051513671875,
0.01245880126953125,
-0.0027599334716796875,
0.031707763671875,
-0.10260009765625,
0.0283050537109375,
0.03955078125,
0.038970947265625,
0.0009260177612304688,
-0.00029158592224121094,
-0.0034999847412109375,
0.05810546875,
-0.035125732421875,
0.006656646728515625,
0.00754547119140625,
0.045379638671875,
0.06182861328125,
0.0253143310546875,
-0.010833740234375,
0.00617218017578125,
-0.048431396484375,
0.04327392578125,
0.0209197998046875,
0.0129852294921875,
0.035003662109375,
0.0055694580078125,
-0.0474853515625,
0.00876617431640625,
-0.05413818359375,
-0.037567138671875,
-0.0252838134765625,
0.059478759765625,
-0.006771087646484375,
0.046295166015625,
0.029327392578125,
-0.0308074951171875,
-0.0030727386474609375,
0.0078277587890625,
0.0051422119140625,
0.0132904052734375,
0.0226593017578125,
-0.04302978515625,
0.00044345855712890625,
0.00013458728790283203,
-0.010284423828125,
-0.01094818115234375,
-0.00508880615234375,
-0.021392822265625,
-0.01302337646484375,
0.0113983154296875,
-0.01413726806640625,
0.023834228515625,
-0.0001518726348876953,
0.0212554931640625,
-0.0230560302734375,
-0.01212310791015625,
-0.017791748046875,
0.0018072128295898438,
0.042449951171875,
-0.01995849609375,
0.047119140625,
0.01546478271484375,
-0.0162200927734375,
0.050933837890625,
-0.07489013671875,
0.0587158203125,
-0.032135009765625,
0.051483154296875,
0.076171875,
0.0216064453125,
-0.006500244140625,
0.01197052001953125,
0.019683837890625,
0.00824737548828125,
0.0196075439453125,
0.0159454345703125,
0.0051116943359375,
-0.0250244140625,
0.03253173828125,
0.0188446044921875,
0.0022792816162109375,
0.0030498504638671875,
-0.0364990234375,
-0.01047515869140625,
0.01337432861328125,
-0.07501220703125,
-0.0214385986328125,
-0.0071868896484375,
-0.06298828125,
-0.00992584228515625,
-0.00907135009765625,
-0.024658203125,
0.00585174560546875,
0.0169830322265625,
0.004505157470703125,
-0.037841796875,
0.00611114501953125,
-0.031829833984375,
-0.0253448486328125,
-0.037841796875,
0.033294677734375,
-0.01108551025390625,
0.01300811767578125,
-0.0021343231201171875,
0.1260986328125,
0.020599365234375,
-0.0758056640625,
-0.02740478515625,
0.05841064453125,
-0.029571533203125,
0.0158233642578125,
0.0248565673828125,
-0.026885986328125,
-0.0217742919921875,
0.0181884765625,
0.0262298583984375,
0.0116119384765625,
-0.0213470458984375,
0.0005016326904296875,
-0.041473388671875,
0.028839111328125,
0.0006213188171386719,
-0.003589630126953125,
0.0399169921875,
0.00528717041015625,
-0.0193023681640625,
-0.03631591796875,
-0.004779815673828125,
0.000026106834411621094,
-0.037994384765625,
-0.039642333984375,
-0.0019292831420898438,
0.007770538330078125,
-0.00750732421875,
-0.005855560302734375,
-0.004184722900390625,
0.01386260986328125,
0.06719970703125,
0.007709503173828125,
-0.0299835205078125,
-0.031524658203125,
-0.054443359375,
-0.045745849609375,
0.037750244140625,
-0.00400543212890625,
-0.004100799560546875,
0.0014715194702148438,
0.01137542724609375,
-0.01520538330078125,
0.0120849609375,
-0.045562744140625,
-0.0672607421875,
0.01195526123046875,
-0.07672119140625,
-0.029388427734375,
-0.046234130859375,
0.0086822509765625,
0.0028018951416015625,
0.08172607421875,
-0.0280914306640625,
-0.0258331298828125,
-0.038177490234375,
0.017120361328125,
-0.051849365234375,
-0.06671142578125,
0.001499176025390625,
0.0189971923828125,
-0.037139892578125,
0.0171966552734375,
-0.0008130073547363281,
-0.00946044921875,
-0.036041259765625,
0.0204925537109375,
-0.0224456787109375,
-0.01654052734375,
0.035736083984375,
0.01540374755859375,
0.005523681640625,
-0.003253936767578125,
-0.0164947509765625,
-0.0027103424072265625,
-0.0157928466796875,
-0.0025634765625,
-0.054840087890625,
-0.012603759765625,
0.03753662109375,
0.019927978515625,
-0.002696990966796875,
-0.040374755859375,
0.0004153251647949219,
0.0239105224609375,
0.009368896484375,
0.056732177734375,
-0.0511474609375,
-0.022125244140625,
-0.027984619140625,
-0.00769805908203125,
-0.0172882080078125,
-0.0091094970703125,
-0.013641357421875,
-0.0098114013671875,
-0.005130767822265625,
-0.0146484375,
-0.0411376953125,
-0.044708251953125,
0.00881195068359375,
-0.0254669189453125,
-0.0501708984375,
-0.0277099609375,
0.003387451171875,
0.0215606689453125,
-0.02667236328125,
0.0189666748046875,
-0.03265380859375,
-0.036163330078125,
0.081298828125,
-0.022674560546875,
-0.025482177734375,
-0.00750732421875,
0.0711669921875,
0.0099334716796875,
-0.024505615234375,
-0.007610321044921875,
-0.03466796875,
0.0306549072265625,
0.035736083984375,
0.0399169921875,
0.04388427734375,
-0.024017333984375,
0.022705078125,
0.0285797119140625,
-0.06304931640625,
0.05596923828125,
0.006488800048828125,
0.016571044921875,
-0.037017822265625,
-0.01244354248046875,
-0.015960693359375,
0.03094482421875,
0.0193023681640625,
-0.034698486328125,
0.0088348388671875,
-0.01904296875,
0.0338134765625,
-0.0106048583984375,
0.0276641845703125,
-0.034454345703125,
-0.03240966796875,
0.009124755859375,
0.0230255126953125,
-0.01236724853515625,
0.0268096923828125,
-0.005558013916015625,
0.00225830078125,
-0.013763427734375,
0.0008606910705566406,
-0.00742340087890625,
0.0010662078857421875,
-0.016693115234375,
0.02288818359375,
-0.0010442733764648438,
-0.0160980224609375,
-0.00792694091796875,
-0.006000518798828125,
0.049530029296875,
-0.02471923828125,
-0.06866455078125,
-0.01531982421875,
0.00247955322265625,
0.0028533935546875,
0.038818359375,
0.01213836669921875,
0.0357666015625,
0.031005859375,
-0.003185272216796875,
-0.0205841064453125,
0.01293182373046875,
0.0032405853271484375,
-0.03631591796875,
-0.043701171875,
0.0284271240234375,
-0.0281829833984375,
0.0196990966796875,
0.053985595703125,
0.017852783203125,
0.033966064453125,
-0.040557861328125,
0.057708740234375,
0.041046142578125,
-0.0167388916015625,
-0.007213592529296875,
0.057403564453125,
-0.004322052001953125,
-0.03204345703125,
-0.0019359588623046875,
-0.006221771240234375,
-0.006313323974609375,
0.0189971923828125,
0.00667572021484375,
0.000012278556823730469,
0.01190948486328125,
0.0160369873046875,
0.006473541259765625,
-0.0305633544921875,
0.0518798828125,
0.0227508544921875,
-0.035858154296875,
-0.022369384765625,
0.0250091552734375,
0.0245208740234375,
0.0015993118286132812,
0.010772705078125,
-0.04901123046875,
-0.0216064453125,
-0.0250091552734375,
-0.031280517578125,
-0.032012939453125,
-0.0176544189453125,
-0.0020809173583984375,
-0.0163726806640625,
-0.0220794677734375,
0.0011510848999023438,
-0.042999267578125,
-0.0033092498779296875,
-0.01849365234375,
0.0159759521484375,
0.03448486328125,
-0.0284576416015625,
0.03521728515625,
-0.043243408203125,
0.011932373046875,
-0.00891876220703125,
-0.00799560546875,
0.0557861328125,
0.0145416259765625,
-0.005214691162109375,
-0.0282135009765625,
-0.0308837890625,
-0.017730712890625,
-0.02691650390625,
-0.0279693603515625,
-0.0257415771484375,
-0.01013946533203125,
0.033050537109375,
0.03240966796875,
-0.0278167724609375,
-0.0775146484375,
-0.04156494140625,
-0.01384735107421875,
0.042022705078125,
0.03302001953125,
0.047332763671875,
0.04376220703125,
-0.04638671875,
0.08544921875,
0.041015625,
0.0156707763671875,
-0.048187255859375,
-0.052642822265625,
-0.016021728515625,
-0.0163116455078125,
0.0142364501953125,
0.0151519775390625,
-0.023681640625,
-0.01122283935546875,
0.0257415771484375,
0.01078033447265625,
0.023345947265625,
-0.01471710205078125,
0.01352691650390625,
-0.027618408203125,
-0.00995635986328125,
-0.049285888671875,
-0.041839599609375,
0.022216796875,
-0.039825439453125,
-0.0224456787109375,
0.0240936279296875,
0.04925537109375,
-0.019622802734375,
-0.0266571044921875,
-0.01270294189453125,
-0.0062255859375,
-0.0274658203125,
0.01462554931640625,
0.0284423828125,
-0.01396942138671875,
0.0193023681640625,
-0.0203704833984375,
0.0066375732421875,
0.040435791015625,
-0.03912353515625,
-0.005199432373046875,
0.04949951171875,
0.09368896484375,
0.0087432861328125,
-0.00540924072265625,
0.08349609375,
-0.038818359375,
0.028839111328125,
0.054290771484375,
0.051849365234375,
-0.098388671875,
0.034027099609375,
0.01108551025390625,
-0.007720947265625,
0.0494384765625,
-0.01061248779296875,
-0.0125274658203125,
-0.0264739990234375,
0.0080413818359375,
-0.0208282470703125,
-0.030517578125,
-0.0148468017578125,
0.004528045654296875,
-0.018798828125,
-0.021331787109375,
0.01549530029296875,
0.029144287109375,
-0.038604736328125,
0.039215087890625,
0.019866943359375,
0.0276336669921875,
-0.025360107421875,
0.00054168701171875,
0.023529052734375,
-0.0207977294921875,
-0.0338134765625,
0.0443115234375,
-0.003818511962890625,
0.004589080810546875,
0.048431396484375,
0.01520538330078125,
0.015655517578125,
0.055938720703125,
-0.00641632080078125,
0.005901336669921875,
0.0306549072265625,
-0.039337158203125,
-0.062408447265625,
-0.00223541259765625,
0.0206756591796875,
-0.00930023193359375,
-0.035125732421875,
0.02410888671875,
-0.0643310546875,
-0.01427459716796875,
-0.02093505859375,
-0.0494384765625,
0.112548828125,
-0.060272216796875,
-0.00927734375,
-0.00824737548828125,
0.032470703125,
0.003376007080078125,
-0.00791168212890625,
0.0223236083984375,
-0.032745361328125,
-0.0175933837890625,
-0.0061492919921875,
-0.042205810546875,
0.0001875162124633789,
-0.0308074951171875,
-0.1053466796875,
0.127197265625,
0.0081939697265625,
0.054595947265625,
-0.01024627685546875,
0.043548583984375,
-0.03619384765625,
0.00638580322265625,
-0.0518798828125,
0.0621337890625,
-0.0048828125,
0.0606689453125,
-0.0181884765625,
0.0243377685546875,
0.0295867919921875,
-0.0140228271484375,
0.07916259765625,
0.0305328369140625,
-0.031494140625,
-0.02886962890625,
0.051239013671875,
0.056854248046875,
0.0224761962890625,
0.0224456787109375,
-0.024627685546875,
0.019134521484375,
0.0015916824340820312,
-0.06781005859375,
0.0252532958984375,
-0.060546875,
-0.01568603515625,
-0.01080322265625,
0.035552978515625,
0.028045654296875,
-0.01308441162109375,
0.048614501953125,
-0.042633056640625,
0.00789642333984375,
0.034149169921875,
0.039886474609375,
0.019012451171875,
0.0083465576171875,
0.0390625,
-0.0245513916015625,
0.0103759765625,
-0.009185791015625,
0.0340576171875,
0.0246734619140625,
0.0400390625,
0.0169525146484375,
0.018341064453125,
0.038055419921875,
0.0128936767578125,
0.0238037109375,
0.027191162109375,
-0.0161590576171875,
0.048675537109375,
0.032012939453125,
0.0136871337890625,
-0.0165252685546875,
0.04754638671875,
0.040374755859375,
0.042510986328125,
-0.05035400390625,
0.0119781494140625,
0.0265960693359375,
0.0187530517578125,
-0.00030922889709472656,
-0.0163116455078125,
0.0298004150390625,
-0.023101806640625,
-0.0092315673828125,
-0.0079498291015625,
-0.01396942138671875,
0.0010824203491210938,
0.00804901123046875,
-0.01029205322265625,
-0.01195526123046875,
0.01154327392578125,
-0.005535125732421875,
-0.04193115234375,
-0.02520751953125,
0.0175018310546875,
0.033721923828125,
0.0291595458984375,
0.032684326171875,
0.0158538818359375,
-0.011962890625,
0.01009368896484375,
0.006519317626953125,
-0.0029850006103515625,
-0.016357421875,
-0.03387451171875,
-0.049896240234375,
0.035797119140625,
0.0316162109375,
-0.006603240966796875,
0.0067291259765625,
0.0298004150390625,
0.0458984375,
-0.020355224609375,
-0.017913818359375,
0.042572021484375,
-0.01462554931640625,
-0.017242431640625,
-0.030609130859375,
-0.0012798309326171875,
-0.0024166107177734375,
0.0018014907836914062,
-0.017730712890625,
0.042022705078125,
-0.003925323486328125,
-0.01003265380859375,
0.0285186767578125,
-0.004184722900390625,
-0.03399658203125,
0.053802490234375,
0.0205078125,
0.0684814453125,
0.0218963623046875,
-0.07049560546875,
-0.01171875,
-0.048736572265625,
-0.0171966552734375,
0.0204620361328125,
0.0195770263671875,
-0.035186767578125,
0.04156494140625,
0.0078887939453125,
0.0290069580078125,
0.0202484130859375,
-0.033905029296875,
0.01336669921875,
0.05023193359375,
0.017913818359375,
0.03350830078125,
-0.032623291015625,
-0.04156494140625,
-0.029327392578125,
0.060150146484375,
0.00719451904296875,
0.052490234375,
-0.0233154296875,
0.0288543701171875,
-0.01513671875,
0.02471923828125,
-0.042572021484375,
-0.021484375,
0.011932373046875,
-0.021759033203125,
0.01030731201171875,
0.013763427734375,
0.004787445068359375,
0.01407623291015625,
0.0212249755859375,
-0.038299560546875,
-0.0019207000732421875,
-0.0282135009765625,
0.00568389892578125,
0.00032591819763183594,
-0.016510009765625,
-0.0245361328125,
-0.0004839897155761719,
0.0308380126953125,
0.014617919921875,
0.002471923828125,
-0.02679443359375,
-0.0117340087890625,
0.0256195068359375,
0.0005207061767578125,
-0.03466796875,
0.02520751953125,
-0.040557861328125,
0.0242767333984375,
0.0310821533203125,
0.02557373046875,
0.014678955078125,
0.01324462890625,
-0.01399993896484375,
-0.010711669921875,
0.0181732177734375,
0.004428863525390625,
-0.01227569580078125,
-0.0010671615600585938,
-0.01837158203125,
-0.0328369140625,
-0.0030536651611328125,
-0.02398681640625,
0.00482940673828125,
-0.01001739501953125,
0.00560760498046875,
-0.0081329345703125,
-0.0052490234375,
-0.0081634521484375,
-0.01314544677734375,
-0.0119476318359375,
-0.0026416778564453125,
-0.004459381103515625,
-0.043304443359375,
-0.01336669921875,
-0.0281219482421875,
0.001338958740234375,
-0.00441741943359375,
-0.026611328125,
0.002666473388671875,
0.0083160400390625,
0.0049591064453125,
-0.03253173828125,
0.019500732421875,
-0.00884246826171875,
0.01432037353515625,
-0.03466796875,
0.0011568069458007812,
-0.028961181640625,
0.01218414306640625,
-0.0102386474609375,
-0.01049041748046875,
0.02935791015625,
-0.01788330078125,
-0.033660888671875,
-0.035797119140625,
-0.004863739013671875,
-0.00091552734375,
0.017822265625,
-0.0278167724609375,
-0.004791259765625,
-0.00394439697265625,
0.0307769775390625,
-0.0369873046875,
-0.004039764404296875,
-0.04248046875,
-0.01125335693359375,
0.0047607421875,
-0.009002685546875,
0.01277923583984375,
-0.031982421875,
-0.040008544921875,
0.0298004150390625,
0.0059967041015625,
-0.0399169921875,
-0.0005998611450195312,
-0.00821685791015625,
-0.0116424560546875,
-0.00582122802734375,
0.00897979736328125,
-0.0430908203125,
-0.00786590576171875,
0.00970458984375,
-0.011077880859375,
0.09161376953125,
-0.029632568359375,
-0.0030364990234375,
-0.0286102294921875,
-0.004100799560546875,
-0.0217437744140625,
0.0085906982421875,
-0.0275115966796875,
0.00771331787109375,
0.01280975341796875,
0.0255889892578125,
-0.0221099853515625,
0.0004837512969970703,
0.031494140625,
0.0124053955078125,
0.00742340087890625,
-0.021759033203125,
-0.0712890625,
-0.0389404296875,
0.0994873046875,
0.052703857421875,
0.05328369140625,
-0.00746917724609375,
0.0543212890625,
-0.04119873046875,
-0.045013427734375,
-0.0167236328125,
0.0164642333984375,
-0.06378173828125,
-0.03216552734375,
0.0347900390625,
0.0002636909484863281,
-0.01611328125,
-0.037445068359375,
-0.0271453857421875,
-0.032867431640625,
-0.035430908203125,
0.013763427734375,
-0.0293731689453125,
-0.0175018310546875,
0.00225067138671875,
-0.00748443603515625,
0.00701904296875,
0.007007598876953125,
0.0078277587890625,
0.0055999755859375,
0.061279296875,
-0.033233642578125,
0.0012607574462890625,
-0.034149169921875,
0.01800537109375,
-0.0156402587890625,
0.0008749961853027344,
-0.027923583984375,
0.0166168212890625,
-0.0162353515625,
0.001125335693359375,
0.0007257461547851562,
-0.01387786865234375,
-0.03167724609375,
0.0218963623046875,
-0.0034275054931640625,
0.07635498046875,
-0.017303466796875,
0.051788330078125,
0.005588531494140625,
0.0168304443359375,
0.009674072265625,
-0.0170135498046875,
0.07916259765625,
-0.0799560546875,
0.00829315185546875,
-0.00589752197265625,
0.025482177734375,
-0.036468505859375,
0.030029296875,
-0.07135009765625,
0.0004968643188476562,
0.01538848876953125
] |
9828741a318bc6520d8f714a9773c57808f7bdb3
|
Wordpress Stackexchange
Q: Which hook should be used to add an action containing a redirect? I want to build a plugin that grabs certain url params from the query string to build a new query string for the same page. I'm following the excellent the Professional WordPress Plugin Development book, but I'm not sure which hook to use for this action. Here is my action function:
add_action( 'init', 'tccl_redirect' );
function tccl_redirect() {
header ( "Location: http://www.mysite.com/$mypage?$newparam=$newvalue" );
?>
Which hooks are suitable for header redirects?
A: I'd say template_redirect. But take a look at the Action Reference.
Example
Don't forget to exit() on redirect.
/**
* This example redirects everything to the index.php page
* You can do the same for the dashboard with admin_url( '/' );
* Or simply base the redirect on conditionals like
* is_*() functions, current_user_can( 'capability' ), globals, get_current_screen()...
*
* @return void
*/
function wpse12535_redirect_sample() {
exit( wp_redirect( home_url( '/' ) ) );
}
add_action( 'template_redirect', 'wpse12535_redirect_sample' );
|
Q: Which hook should be used to add an action containing a redirect? I want to build a plugin that grabs certain url params from the query string to build a new query string for the same page. I'm following the excellent the Professional WordPress Plugin Development book, but I'm not sure which hook to use for this action. Here is my action function:
add_action( 'init', 'tccl_redirect' );
function tccl_redirect() {
header ( "Location: http://www.mysite.com/$mypage?$newparam=$newvalue" );
?>
Which hooks are suitable for header redirects?
A: I'd say template_redirect. But take a look at the Action Reference.
Example
Don't forget to exit() on redirect.
/**
* This example redirects everything to the index.php page
* You can do the same for the dashboard with admin_url( '/' );
* Or simply base the redirect on conditionals like
* is_*() functions, current_user_can( 'capability' ), globals, get_current_screen()...
*
* @return void
*/
function wpse12535_redirect_sample() {
exit( wp_redirect( home_url( '/' ) ) );
}
add_action( 'template_redirect', 'wpse12535_redirect_sample' );
A: Like kaiser answered template_redirect hook is indeed appropriate for redirects.
Also you should use wp_redirect() function, rather than setting header.
A: But i would say this example from kaiser cannot working, because after an redirect this hook template_redirect works again and again, you will have an endless forwarding !
Better is to check, if you're already on the homepage, like this:
function wpse12535_redirect_sample() {
$current_url = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$site_url = get_bloginfo('siteurl') . "/";
if($current_url != $site_url)
exit( wp_redirect( home_url( '/' ) ));
}
add_action( 'template_redirect', 'wpse12535_redirect_sample');
Works for me fine. Any suggestions? Regards!
|
wordpress
|
{
"language": "en",
"length": 256,
"provenance": "stackexchange_00019.jsonl.gz:407907",
"question_score": "20",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12535"
}
|
[
0.046783447265625,
0.02655029296875,
-0.0077667236328125,
-0.014862060546875,
0.02044677734375,
-0.028533935546875,
0.01617431640625,
-0.04241943359375,
-0.0039520263671875,
0.02099609375,
0.0103607177734375,
-0.002529144287109375,
-0.0305023193359375,
-0.039215087890625,
-0.005771636962890625,
-0.0261077880859375,
0.053466796875,
-0.05914306640625,
0.0167236328125,
0.000034928321838378906,
0.00691986083984375,
0.044921875,
0.0216827392578125,
0.029937744140625,
-0.005702972412109375,
-0.039642333984375,
0.05322265625,
-0.03082275390625,
-0.004070281982421875,
-0.0120086669921875,
0.0009512901306152344,
0.0028743743896484375,
0.0304718017578125,
0.0284423828125,
-0.021453857421875,
-0.003658294677734375,
0.023406982421875,
0.001827239990234375,
-0.0025844573974609375,
0.03558349609375,
0.05487060546875,
-0.029388427734375,
-0.02972412109375,
0.0299072265625,
-0.0173797607421875,
-0.04254150390625,
0.059783935546875,
-0.0130462646484375,
-0.006954193115234375,
0.003162384033203125,
0.0208587646484375,
0.01284027099609375,
0.0176849365234375,
-0.0116424560546875,
0.0035839080810546875,
0.042510986328125,
-0.03369140625,
0.017364501953125,
0.02252197265625,
0.0235595703125,
-0.006359100341796875,
-0.0152130126953125,
0.01409912109375,
-0.0274658203125,
0.00817108154296875,
-0.00872039794921875,
-0.004764556884765625,
0.0252685546875,
-0.035491943359375,
0.008056640625,
0.0130615234375,
-0.029541015625,
-0.046295166015625,
-0.0031795501708984375,
-0.06268310546875,
-0.00817108154296875,
0.0218353271484375,
-0.03533935546875,
0.01497650146484375,
0.0146636962890625,
-0.00665283203125,
-0.02093505859375,
0.0131072998046875,
-0.044525146484375,
0.029876708984375,
0.0091400146484375,
-0.0231781005859375,
-0.016357421875,
-0.059906005859375,
-0.024658203125,
-0.046844482421875,
-0.01262664794921875,
-0.007965087890625,
-0.0260772705078125,
-0.0280303955078125,
-0.00907135009765625,
-0.011505126953125,
-0.0037994384765625,
-0.00951385498046875,
0.00511932373046875,
-0.0034351348876953125,
-0.030914306640625,
0.02001953125,
-0.01433563232421875,
-0.003917694091796875,
0.0706787109375,
0.046234130859375,
0.01158905029296875,
-0.006771087646484375,
-0.01476287841796875,
-0.003917694091796875,
-0.010528564453125,
-0.03778076171875,
-0.023284912109375,
-0.0172576904296875,
0.01377105712890625,
-0.06719970703125,
0.0031719207763671875,
-0.00406646728515625,
0.0112457275390625,
-0.0198516845703125,
-0.0169677734375,
0.06634521484375,
-0.01035308837890625,
-0.0156707763671875,
-0.0173187255859375,
-0.01113128662109375,
-0.06072998046875,
-0.003795623779296875,
-0.017242431640625,
-0.01222991943359375,
0.035369873046875,
0.03173828125,
-0.0081939697265625,
-0.0198211669921875,
0.0021724700927734375,
0.05670166015625,
-0.0182952880859375,
-0.0133209228515625,
0.0005445480346679688,
0.00021946430206298828,
-0.01544189453125,
-0.027130126953125,
-0.00855255126953125,
0.06195068359375,
0.0015239715576171875,
0.01351165771484375,
0.0189361572265625,
0.024871826171875,
-0.00417327880859375,
0.030242919921875,
-0.02752685546875,
0.04168701171875,
-0.022491455078125,
-0.005096435546875,
-0.0228118896484375,
-0.0254669189453125,
-0.0061492919921875,
-0.003841400146484375,
-0.006587982177734375,
0.00238037109375,
-0.00817108154296875,
-0.00498199462890625,
-0.0770263671875,
-0.08734130859375,
-0.0283966064453125,
-0.0162353515625,
-0.0165863037109375,
0.0165252685546875,
0.021575927734375,
0.03753662109375,
0.006206512451171875,
0.0029125213623046875,
0.020782470703125,
0.007266998291015625,
0.001617431640625,
-0.0271453857421875,
0.0186767578125,
0.04034423828125,
0.025634765625,
0.004451751708984375,
-0.01251983642578125,
0.0703125,
-0.003894805908203125,
-0.07342529296875,
0.11529541015625,
0.005855560302734375,
0.08404541015625,
-0.0355224609375,
-0.0076141357421875,
0.05072021484375,
0.0743408203125,
-0.0200958251953125,
0.015625,
-0.0093231201171875,
-0.040283203125,
0.023895263671875,
-0.01166534423828125,
0.0008192062377929688,
0.020294189453125,
0.052581787109375,
0.07208251953125,
-0.0236053466796875,
0.0154571533203125,
-0.0323486328125,
0.053192138671875,
-0.0089569091796875,
0.031341552734375,
0.034088134765625,
0.03924560546875,
-0.01812744140625,
-0.0026645660400390625,
-0.0005426406860351562,
-0.0312042236328125,
-0.0210113525390625,
0.042877197265625,
-0.03863525390625,
0.03369140625,
0.00684356689453125,
0.0308074951171875,
0.0347900390625,
-0.027740478515625,
0.0215301513671875,
-0.01290130615234375,
0.0404052734375,
-0.0293121337890625,
-0.021148681640625,
-0.038787841796875,
-0.030059814453125,
-0.00820159912109375,
-0.09149169921875,
0.08148193359375,
-0.00921630859375,
0.031585693359375,
-0.0283966064453125,
-0.003894805908203125,
-0.02362060546875,
-0.022430419921875,
0.0100555419921875,
0.0241851806640625,
0.02734375,
0.062255859375,
-0.034698486328125,
-0.033203125,
0.007678985595703125,
-0.040679931640625,
0.01253509521484375,
-0.0250701904296875,
0.003986358642578125,
0.02838134765625,
-0.011505126953125,
0.00858306884765625,
0.00926971435546875,
-0.0201873779296875,
0.0076751708984375,
0.021820068359375,
-0.0350341796875,
-0.0213165283203125,
-0.0303497314453125,
-0.015838623046875,
0.02734375,
-0.042022705078125,
-0.04510498046875,
-0.003467559814453125,
0.022918701171875,
-0.0200347900390625,
0.00525665283203125,
0.004123687744140625,
-0.00868988037109375,
-0.0231781005859375,
0.030029296875,
-0.0064239501953125,
-0.0023040771484375,
0.0293731689453125,
0.0255584716796875,
-0.04376220703125,
-0.037017822265625,
-0.003326416015625,
0.02001953125,
0.01299285888671875,
-0.01003265380859375,
0.053558349609375,
-0.007171630859375,
-0.017730712890625,
-0.0472412109375,
-0.051605224609375,
0.0158538818359375,
0.01081085205078125,
0.07110595703125,
0.00881195068359375,
0.051300048828125,
-0.01934814453125,
-0.03228759765625,
0.059906005859375,
0.00487518310546875,
-0.06829833984375,
0.00013327598571777344,
-0.005161285400390625,
0.016998291015625,
-0.002246856689453125,
0.056884765625,
0.0592041015625,
-0.029266357421875,
0.034698486328125,
-0.0078277587890625,
0.00843048095703125,
0.0018100738525390625,
-0.0122222900390625,
-0.0225372314453125,
-0.024871826171875,
-0.035980224609375,
-0.0186309814453125,
0.0250396728515625,
0.058868408203125,
0.00356292724609375,
-0.036651611328125,
0.0009360313415527344,
0.029022216796875,
-0.05474853515625,
-0.0714111328125,
-0.0168304443359375,
-0.06732177734375,
0.038360595703125,
0.005977630615234375,
-0.0263824462890625,
-0.033599853515625,
0.042999267578125,
0.0235443115234375,
-0.006755828857421875,
0.0005750656127929688,
-0.033660888671875,
-0.041839599609375,
-0.0684814453125,
-0.0252838134765625,
-0.0024433135986328125,
0.024078369140625,
-0.00039768218994140625,
0.0197906494140625,
-0.004352569580078125,
-0.021026611328125,
0.01096343994140625,
-0.0021114349365234375,
0.00018143653869628906,
-0.0157623291015625,
-0.033721923828125,
0.019287109375,
0.01436614990234375,
-0.0012836456298828125,
0.0511474609375,
0.0212249755859375,
-0.0197296142578125,
-0.0031528472900390625,
-0.029327392578125,
-0.03302001953125,
-0.0183563232421875,
0.01413726806640625,
0.032806396484375,
-0.044586181640625,
-0.00005334615707397461,
-0.06573486328125,
0.0181427001953125,
-0.0271453857421875,
-0.0416259765625,
0.0052642822265625,
0.026763916015625,
0.0009608268737792969,
0.01751708984375,
-0.034637451171875,
0.0301971435546875,
0.04486083984375,
0.04254150390625,
0.00017249584197998047,
0.031463623046875,
-0.02813720703125,
0.0019989013671875,
-0.06597900390625,
0.0283050537109375,
0.003108978271484375,
0.00994873046875,
0.021514892578125,
0.024658203125,
0.00910186767578125,
0.017974853515625,
-0.0241241455078125,
-0.043701171875,
0.038360595703125,
-0.0171966552734375,
0.00860595703125,
-0.0211639404296875,
-0.0198822021484375,
0.00601959228515625,
0.076171875,
-0.04071044921875,
-0.0103607177734375,
-0.01195526123046875,
0.0008478164672851562,
-0.0007505416870117188,
-0.00905609130859375,
-0.027313232421875,
-0.002899169921875,
-0.09539794921875,
0.0200653076171875,
-0.0214691162109375,
-0.0189208984375,
-0.021087646484375,
-0.0147552490234375,
-0.048736572265625,
-0.0697021484375,
0.0198516845703125,
0.007419586181640625,
-0.00882720947265625,
0.025665283203125,
-0.0109710693359375,
0.00528717041015625,
-0.00153350830078125,
-0.01215362548828125,
-0.024261474609375,
-0.0119476318359375,
-0.0017023086547851562,
0.0301666259765625,
0.04486083984375,
-0.0687255859375,
0.0005192756652832031,
0.025115966796875,
-0.00604248046875,
0.023773193359375,
0.015899658203125,
0.0226593017578125,
0.00946044921875,
-0.0246124267578125,
0.011962890625,
-0.0255279541015625,
0.0128173828125,
0.01442718505859375,
-0.026275634765625,
0.03155517578125,
-0.033599853515625,
0.00496673583984375,
0.006961822509765625,
-0.035400390625,
-0.04541015625,
-0.030364990234375,
0.021697998046875,
0.0022678375244140625,
0.0010156631469726562,
0.017852783203125,
-0.02880859375,
-0.040679931640625,
0.045166015625,
0.0005359649658203125,
0.0028095245361328125,
-0.015411376953125,
0.04058837890625,
0.0260772705078125,
-0.0341796875,
0.07757568359375,
-0.0197296142578125,
0.0117340087890625,
0.018524169921875,
0.028045654296875,
-0.02392578125,
-0.0272064208984375,
0.0921630859375,
-0.020477294921875,
0.0307159423828125,
-0.0238189697265625,
0.016265869140625,
0.002964019775390625,
-0.0244293212890625,
0.02398681640625,
0.00464630126953125,
-0.004558563232421875,
0.0207977294921875,
-0.0023326873779296875,
-0.03887939453125,
0.0024814605712890625,
0.036407470703125,
-0.0241546630859375,
0.046539306640625,
-0.01015472412109375,
-0.0081787109375,
-0.014007568359375,
0.031463623046875,
0.0237579345703125,
0.038360595703125,
-0.00817108154296875,
0.0014276504516601562,
-0.0038089752197265625,
-0.0021114349365234375,
0.0312042236328125,
-0.004978179931640625,
-0.0207366943359375,
0.028228759765625,
0.006114959716796875,
-0.031097412109375,
0.0286102294921875,
-0.006771087646484375,
0.04315185546875,
-0.0179443359375,
-0.050750732421875,
-0.01525115966796875,
-0.0400390625,
0.0126190185546875,
0.00786590576171875,
-0.00775909423828125,
0.05340576171875,
0.0511474609375,
-0.030059814453125,
-0.044586181640625,
-0.022674560546875,
0.0061492919921875,
-0.07891845703125,
0.0131988525390625,
0.0021800994873046875,
0.005268096923828125,
0.04974365234375,
0.0478515625,
0.041534423828125,
0.049560546875,
-0.03955078125,
0.001773834228515625,
0.02020263671875,
0.0008625984191894531,
0.0220794677734375,
0.007572174072265625,
0.003398895263671875,
-0.019744873046875,
0.026611328125,
-0.031829833984375,
0.0221710205078125,
0.03173828125,
0.0501708984375,
-0.0038471221923828125,
-0.04144287109375,
0.00653839111328125,
-0.044891357421875,
-0.0148162841796875,
0.046295166015625,
0.01503753662109375,
-0.034759521484375,
-0.0240631103515625,
0.02398681640625,
0.04595947265625,
0.003009796142578125,
-0.006542205810546875,
0.0126495361328125,
-0.00823974609375,
0.058685302734375,
0.0183868408203125,
0.014801025390625,
0.011322021484375,
-0.01849365234375,
-0.0015954971313476562,
-0.016632080078125,
0.013519287109375,
-0.0084381103515625,
0.01611328125,
-0.03729248046875,
-0.04534912109375,
0.05938720703125,
-0.0227203369140625,
0.027801513671875,
-0.0176849365234375,
-0.01493072509765625,
0.00852203369140625,
-0.00986480712890625,
0.08160400390625,
0.048065185546875,
-0.06964111328125,
-0.01232147216796875,
-0.03131103515625,
0.0009975433349609375,
-0.00826263427734375,
-0.027252197265625,
-0.0230865478515625,
-0.003570556640625,
0.016326904296875,
0.015777587890625,
0.03485107421875,
0.0117950439453125,
0.00029659271240234375,
-0.00897979736328125,
-0.0182952880859375,
0.0017261505126953125,
-0.00794219970703125,
0.06781005859375,
-0.01355743408203125,
0.042877197265625,
-0.00618743896484375,
0.0233154296875,
0.002079010009765625,
-0.0162811279296875,
0.01122283935546875,
0.0133209228515625,
-0.010894775390625,
-0.02142333984375,
0.01739501953125,
-0.01776123046875,
0.05963134765625,
-0.013763427734375,
-0.0171356201171875,
0.00969696044921875,
0.00319671630859375,
-0.0173797607421875,
0.013824462890625,
0.0296630859375,
-0.031951904296875,
0.050750732421875,
0.00506591796875,
-0.006053924560546875,
-0.0020885467529296875,
0.0078887939453125,
-0.004302978515625,
0.0012350082397460938,
-0.0025882720947265625,
-0.0272979736328125,
-0.0606689453125,
0.06256103515625,
0.10321044921875,
0.03594970703125,
0.0787353515625,
0.0185394287109375,
0.0270843505859375,
0.0516357421875,
0.0168609619140625,
-0.015106201171875,
0.01291656494140625,
0.07025146484375,
0.00786590576171875,
-0.0465087890625,
0.032745361328125,
-0.035552978515625,
0.00754547119140625,
0.037872314453125,
0.02886962890625,
-0.09075927734375,
0.0170440673828125,
0.00555419921875,
0.0264434814453125,
0.04931640625,
0.0016965866088867188,
0.0009489059448242188,
0.0240478515625,
-0.0062255859375,
0.0260162353515625,
-0.0258026123046875,
0.0105438232421875,
0.04351806640625,
-0.0304718017578125,
-0.0045623779296875,
-0.0268096923828125,
-0.00916290283203125,
-0.06268310546875,
0.0140838623046875,
0.0267333984375,
-0.040283203125,
-0.0160980224609375,
-0.0010766983032226562,
0.028289794921875,
-0.0182342529296875,
-0.0210113525390625,
0.046478271484375,
-0.02947998046875,
-0.0009975433349609375,
0.00960540771484375,
-0.01216888427734375,
0.047607421875,
0.03826904296875,
-0.0003399848937988281,
-0.007335662841796875,
0.0207977294921875,
-0.01479339599609375,
-0.0084228515625,
-0.0220947265625,
0.01953125,
0.013641357421875,
-0.06378173828125,
0.033294677734375,
-0.018646240234375,
-0.01500701904296875,
-0.0015163421630859375,
0.0263519287109375,
0.057373046875,
-0.0217437744140625,
-0.0283203125,
0.01134490966796875,
-0.0248260498046875,
0.0107421875,
-0.0263519287109375,
0.034576416015625,
-0.058929443359375,
-0.03045654296875,
-0.0088653564453125,
-0.033966064453125,
-0.00020182132720947266,
-0.034637451171875,
-0.052581787109375,
0.1201171875,
-0.007091522216796875,
0.0309295654296875,
-0.0012769699096679688,
0.049591064453125,
-0.013580322265625,
0.0271759033203125,
-0.02392578125,
0.08544921875,
0.025634765625,
0.0050048828125,
-0.00519561767578125,
0.01690673828125,
0.01134490966796875,
-0.0200653076171875,
0.03887939453125,
0.0147857666015625,
-0.05224609375,
0.035980224609375,
0.044891357421875,
-0.0259552001953125,
-0.0309295654296875,
0.06866455078125,
-0.00414276123046875,
-0.02764892578125,
-0.00746917724609375,
-0.030609130859375,
0.0296173095703125,
-0.0501708984375,
-0.004322052001953125,
0.0020351409912109375,
-0.0033664703369140625,
-0.019744873046875,
-0.0173187255859375,
0.007354736328125,
-0.04376220703125,
-0.0036525726318359375,
0.022369384765625,
0.0211639404296875,
0.0036983489990234375,
0.00997161865234375,
-0.00531005859375,
0.005336761474609375,
0.0195159912109375,
-0.0179901123046875,
0.035980224609375,
-0.002986907958984375,
0.016265869140625,
0.046295166015625,
0.02490234375,
0.034698486328125,
-0.000946044921875,
0.01171875,
0.007495880126953125,
-0.006992340087890625,
0.08892822265625,
0.04486083984375,
0.02081298828125,
-0.01617431640625,
0.017425537109375,
0.031280517578125,
0.09478759765625,
-0.0577392578125,
-0.01544952392578125,
-0.001522064208984375,
0.00479888916015625,
0.02972412109375,
0.00911712646484375,
0.056640625,
-0.024322509765625,
-0.0044708251953125,
-0.033355712890625,
0.002223968505859375,
0.037750244140625,
0.0059661865234375,
0.0013971328735351562,
-0.0231475830078125,
-0.01497650146484375,
0.019287109375,
-0.0244598388671875,
-0.01056671142578125,
0.00020706653594970703,
0.05938720703125,
0.0238037109375,
0.0285186767578125,
-0.01218414306640625,
-0.030120849609375,
-0.017578125,
0.03643798828125,
0.0060272216796875,
0.0200653076171875,
-0.0633544921875,
-0.068603515625,
0.03558349609375,
0.060455322265625,
0.0298309326171875,
0.03179931640625,
-0.005054473876953125,
-0.0032939910888671875,
0.0274810791015625,
0.01503753662109375,
0.018035888671875,
-0.01461029052734375,
0.0704345703125,
-0.046539306640625,
0.0193634033203125,
-0.039581298828125,
-0.0450439453125,
-0.01424407958984375,
-0.0293731689453125,
0.030303955078125,
-0.028411865234375,
0.040740966796875,
-0.0203399658203125,
-0.0268402099609375,
0.02691650390625,
-0.0390625,
0.0787353515625,
-0.00894927978515625,
-0.034210205078125,
-0.0229034423828125,
0.014404296875,
-0.02392578125,
0.036773681640625,
0.049468994140625,
-0.0308685302734375,
0.03863525390625,
-0.00994110107421875,
0.0099639892578125,
0.01197052001953125,
-0.024688720703125,
0.006011962890625,
-0.018585205078125,
0.01294708251953125,
-0.005855560302734375,
-0.023406982421875,
0.0189056396484375,
0.0013437271118164062,
0.0002589225769042969,
0.0205535888671875,
0.08245849609375,
-0.0265960693359375,
0.0174102783203125,
0.0222930908203125,
0.005580902099609375,
0.007534027099609375,
0.00601959228515625,
0.033111572265625,
0.0034942626953125,
0.007724761962890625,
-0.0265960693359375,
-0.049072265625,
0.00635528564453125,
0.0280609130859375,
-0.01079559326171875,
0.033355712890625,
-0.0207366943359375,
0.01263427734375,
-0.02691650390625,
0.0531005859375,
-0.025421142578125,
-0.056610107421875,
-0.0579833984375,
-0.005115509033203125,
0.0203094482421875,
0.053009033203125,
0.007633209228515625,
0.0618896484375,
-0.035064697265625,
0.0020732879638671875,
0.0128021240234375,
-0.053436279296875,
0.00252532958984375,
0.0161285400390625,
-0.038116455078125,
-0.0080718994140625,
0.041778564453125,
-0.0014047622680664062,
0.01800537109375,
0.020050048828125,
0.0277099609375,
0.0165557861328125,
-0.005504608154296875,
-0.023345947265625,
-0.044952392578125,
-0.0031490325927734375,
-0.0177764892578125,
-0.01378631591796875,
-0.0250701904296875,
0.0024166107177734375,
-0.031005859375,
-0.059814453125,
-0.03033447265625,
-0.03167724609375,
-0.0054779052734375,
0.0057373046875,
-0.0130615234375,
-0.055755615234375,
-0.0169525146484375,
-0.0116424560546875,
-0.0038166046142578125,
-0.01342010498046875,
-0.02679443359375,
-0.01207733154296875,
-0.0122528076171875,
0.042694091796875,
-0.062042236328125,
0.028167724609375,
-0.011383056640625,
0.0197906494140625,
-0.04132080078125,
0.006866455078125,
-0.0394287109375,
-0.00617218017578125,
-0.0421142578125,
0.0096282958984375,
0.0689697265625,
-0.0257415771484375,
-0.053131103515625,
-0.0236968994140625,
-0.0087890625,
0.033233642578125,
-0.02520751953125,
-0.0322265625,
0.042724609375,
-0.0099639892578125,
-0.00495147705078125,
-0.0040283203125,
-0.0129852294921875,
0.0130462646484375,
-0.000553131103515625,
0.006748199462890625,
-0.026580810546875,
-0.0247802734375,
-0.0479736328125,
-0.04095458984375,
0.09014892578125,
0.00614166259765625,
-0.01062774658203125,
-0.0262451171875,
0.056915283203125,
0.02520751953125,
-0.033447265625,
-0.00628662109375,
0.00600433349609375,
-0.01438140869140625,
-0.043487548828125,
0.0208892822265625,
0.00616455078125,
0.027191162109375,
-0.00707244873046875,
-0.0161285400390625,
0.0206146240234375,
0.021453857421875,
0.00850677490234375,
-0.0013074874877929688,
-0.0312042236328125,
0.04302978515625,
0.04168701171875,
-0.01495361328125,
-0.019500732421875,
0.023223876953125,
-0.01220703125,
-0.01424407958984375,
-0.0428466796875,
0.0170745849609375,
0.0143280029296875,
0.02655029296875,
-0.011260986328125,
-0.00933837890625,
-0.029693603515625,
-0.017425537109375,
-0.00872039794921875,
0.0023822784423828125,
0.0116729736328125,
0.00760650634765625,
-0.0411376953125,
-0.003337860107421875,
0.0161285400390625,
0.007061004638671875,
-0.01934814453125,
0.0418701171875,
-0.010711669921875,
-0.0186920166015625,
0.046905517578125,
-0.01100921630859375,
-0.0169219970703125,
-0.0139617919921875,
0.09967041015625,
-0.060638427734375,
-0.0016489028930664062,
-0.001216888427734375,
0.0168914794921875,
0.0267333984375,
-0.052734375,
0.038787841796875,
0.062042236328125,
-0.04595947265625,
0.002960205078125,
0.0294952392578125,
0.044158935546875,
-0.04290771484375,
-0.02252197265625,
-0.004848480224609375,
0.038482666015625,
-0.004901885986328125,
0.051422119140625,
-0.0282745361328125,
0.043182373046875,
-0.014984130859375,
0.060546875,
-0.035552978515625,
0.0177001953125,
-0.02764892578125,
0.028778076171875,
0.00481414794921875,
0.006855010986328125,
0.06646728515625,
-0.02398681640625,
0.006206512451171875,
0.061126708984375,
0.0195465087890625,
-0.006046295166015625,
0.035888671875,
0.01500701904296875,
0.037384033203125,
0.0013246536254882812
] |
fe978867115b6f38057664589295ece8841bf385
|
Wordpress Stackexchange
Q: What is the best way to output plugin result in certain url Knowing that wordpress doesn't follow MVC pattern.
What is the best way in worpress to output plugin's result in a certain url.
lets say I would like to show "hello world" in main area under "www.example.com/show-hello-world" url.
thanks. hope question is clear!
more details:
Let's say url "example.com/show-hello-world"
*
*how could I specify template name, let's say "page" ?
A: There are two steps:
function my_plugin_rewrite_rule() {
global $wp;
$wp->add_query_var( 'show_hello_world' );
add_rewrite_rule( 'show-hello-world/?$', 'index.php?show_hello_world=1', 'top' );
}
add_action( 'init', 'my_plugin_rewrite_rule' );
That takes care of rewriting. Remember to flush the rewrite rules.
Now, your plugin can check for get_query_var( 'show_hello_world' ); and load a certain file:
function my_plugin_template( $path ) {
if ( get_query_var( 'show_hello_world' ) )
return locate_template( 'my-plugin.php' );
else
return $path;
}
add_filter( 'template_include', 'my_plugin_template' );
|
Q: What is the best way to output plugin result in certain url Knowing that wordpress doesn't follow MVC pattern.
What is the best way in worpress to output plugin's result in a certain url.
lets say I would like to show "hello world" in main area under "www.example.com/show-hello-world" url.
thanks. hope question is clear!
more details:
Let's say url "example.com/show-hello-world"
*
*how could I specify template name, let's say "page" ?
A: There are two steps:
function my_plugin_rewrite_rule() {
global $wp;
$wp->add_query_var( 'show_hello_world' );
add_rewrite_rule( 'show-hello-world/?$', 'index.php?show_hello_world=1', 'top' );
}
add_action( 'init', 'my_plugin_rewrite_rule' );
That takes care of rewriting. Remember to flush the rewrite rules.
Now, your plugin can check for get_query_var( 'show_hello_world' ); and load a certain file:
function my_plugin_template( $path ) {
if ( get_query_var( 'show_hello_world' ) )
return locate_template( 'my-plugin.php' );
else
return $path;
}
add_filter( 'template_include', 'my_plugin_template' );
A: In your header.php, page.php, or index.php, add:
<?php
if (is_page('show-hello-world')) {
echo "Hello, world!";
}
?>
|
wordpress
|
{
"language": "en",
"length": 160,
"provenance": "stackexchange_00019.jsonl.gz:407917",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12570"
}
|
[
0.035736083984375,
-0.01186370849609375,
-0.0072784423828125,
-0.049713134765625,
0.0011739730834960938,
-0.009765625,
-0.0151519775390625,
-0.007640838623046875,
-0.0221405029296875,
0.0095672607421875,
-0.0222320556640625,
0.02154541015625,
-0.019744873046875,
-0.0303802490234375,
0.029449462890625,
-0.0283660888671875,
0.034576416015625,
-0.041534423828125,
-0.007770538330078125,
-0.004596710205078125,
0.0087127685546875,
0.011505126953125,
-0.007709503173828125,
0.057830810546875,
0.02252197265625,
-0.07928466796875,
0.115478515625,
-0.0179595947265625,
-0.0032749176025390625,
-0.034454345703125,
0.01520538330078125,
0.01044464111328125,
0.048309326171875,
-0.0201416015625,
-0.002315521240234375,
0.02447509765625,
0.0219268798828125,
-0.01898193359375,
-0.01276397705078125,
0.032867431640625,
0.0321044921875,
-0.00629425048828125,
0.0184478759765625,
0.014739990234375,
-0.0012340545654296875,
-0.034881591796875,
0.056793212890625,
-0.0321044921875,
-0.007659912109375,
0.05078125,
0.0259552001953125,
0.00823974609375,
-0.0006475448608398438,
0.028076171875,
0.02716064453125,
0.045501708984375,
-0.047149658203125,
-0.0170440673828125,
-0.0028705596923828125,
0.0192108154296875,
0.033966064453125,
0.0090484619140625,
0.007049560546875,
0.03173828125,
-0.0018157958984375,
-0.006938934326171875,
0.031524658203125,
0.0143280029296875,
-0.0078887939453125,
-0.0021514892578125,
0.0272064208984375,
0.0053558349609375,
0.0084228515625,
0.0143585205078125,
-0.05804443359375,
0.007572174072265625,
0.02056884765625,
0.0103302001953125,
0.0306549072265625,
-0.029632568359375,
0.004940032958984375,
0.0018587112426757812,
-0.0029125213623046875,
-0.047882080078125,
0.050384521484375,
0.0091400146484375,
0.003032684326171875,
-0.020111083984375,
-0.040130615234375,
-0.040557861328125,
-0.032684326171875,
-0.0037403106689453125,
-0.03778076171875,
-0.012939453125,
-0.03240966796875,
-0.01349639892578125,
-0.0084686279296875,
-0.00656890869140625,
0.0019435882568359375,
0.05377197265625,
-0.01306915283203125,
-0.0242462158203125,
0.0521240234375,
-0.028167724609375,
0.006893157958984375,
0.0621337890625,
-0.0048675537109375,
0.034332275390625,
0.046661376953125,
0.023895263671875,
0.029815673828125,
0.0187225341796875,
-0.030059814453125,
-0.007099151611328125,
-0.006824493408203125,
0.0208740234375,
-0.03948974609375,
-0.01219940185546875,
-0.0179595947265625,
0.003925323486328125,
-0.0053558349609375,
0.01477813720703125,
0.006328582763671875,
-0.0462646484375,
-0.011077880859375,
-0.023956298828125,
-0.01079559326171875,
-0.029632568359375,
-0.035308837890625,
0.013519287109375,
0.0179443359375,
0.01251983642578125,
-0.032989501953125,
0.01450347900390625,
-0.0293731689453125,
0.005664825439453125,
0.0338134765625,
-0.025726318359375,
-0.0008196830749511719,
-0.013427734375,
-0.024383544921875,
0.00897979736328125,
0.01154327392578125,
-0.0226287841796875,
-0.0106964111328125,
0.02471923828125,
0.0156707763671875,
0.00807952880859375,
-0.0149078369140625,
-0.01113128662109375,
-0.017913818359375,
-0.023162841796875,
0.035125732421875,
-0.01776123046875,
0.021820068359375,
-0.0287017822265625,
0.0092315673828125,
-0.01486968994140625,
0.0006036758422851562,
-0.00870513916015625,
-0.0170135498046875,
-0.0006351470947265625,
0.050048828125,
-0.032867431640625,
-0.0038471221923828125,
-0.0202789306640625,
-0.03997802734375,
-0.0017118453979492188,
0.0151214599609375,
0.0219573974609375,
0.034698486328125,
0.0011987686157226562,
0.0112152099609375,
0.003345489501953125,
-0.007049560546875,
-0.010711669921875,
-0.0114288330078125,
0.03009033203125,
0.019195556640625,
0.0567626953125,
0.0333251953125,
-0.008209228515625,
0.08966064453125,
-0.00919342041015625,
-0.08184814453125,
0.06280517578125,
-0.0227203369140625,
0.005924224853515625,
0.02142333984375,
-0.034820556640625,
0.04852294921875,
0.040130615234375,
-0.06201171875,
0.0274200439453125,
-0.0233001708984375,
-0.021728515625,
0.031890869140625,
0.019073486328125,
-0.0026454925537109375,
-0.00860595703125,
-0.00768280029296875,
0.035125732421875,
0.0165863037109375,
0.016571044921875,
-0.0296630859375,
0.0430908203125,
-0.031036376953125,
0.04638671875,
0.015350341796875,
0.05035400390625,
0.003971099853515625,
0.038970947265625,
-0.0160675048828125,
-0.056488037109375,
-0.0092315673828125,
0.02490234375,
-0.00620269775390625,
0.05108642578125,
0.004985809326171875,
0.0186004638671875,
0.032958984375,
-0.023773193359375,
0.0159454345703125,
0.0150299072265625,
-0.0029773712158203125,
0.0006322860717773438,
-0.030975341796875,
-0.002349853515625,
-0.05010986328125,
0.0054473876953125,
-0.04217529296875,
0.06280517578125,
-0.0169677734375,
0.04168701171875,
-0.01549530029296875,
-0.0244598388671875,
-0.01763916015625,
-0.041229248046875,
0.038360595703125,
0.044708251953125,
0.00370025634765625,
0.050537109375,
-0.042999267578125,
-0.0098114013671875,
0.00948333740234375,
-0.06787109375,
-0.0248870849609375,
0.023712158203125,
0.030242919921875,
0.033721923828125,
-0.0143280029296875,
-0.031829833984375,
0.016326904296875,
-0.0662841796875,
0.0009784698486328125,
0.0140533447265625,
-0.012908935546875,
0.0089263916015625,
-0.020355224609375,
-0.005523681640625,
0.004390716552734375,
0.021636962890625,
0.0098724365234375,
0.006267547607421875,
-0.004520416259765625,
0.00937652587890625,
0.01012420654296875,
-0.0015010833740234375,
-0.00843048095703125,
0.007648468017578125,
0.01329803466796875,
-0.0239715576171875,
-0.0120697021484375,
0.038970947265625,
0.0154266357421875,
-0.0179443359375,
-0.0419921875,
0.002696990966796875,
0.0006074905395507812,
0.003513336181640625,
0.00551605224609375,
0.0433349609375,
-0.035003662109375,
-0.0223236083984375,
-0.042144775390625,
-0.05078125,
-0.00655364990234375,
0.0260162353515625,
0.0677490234375,
0.043701171875,
0.051422119140625,
0.0281982421875,
-0.01287841796875,
0.083984375,
-0.055145263671875,
-0.0167694091796875,
0.03094482421875,
-0.05255126953125,
0.03558349609375,
-0.042999267578125,
0.050048828125,
0.058349609375,
-0.01129150390625,
-0.00983428955078125,
-0.0019817352294921875,
0.01534271240234375,
0.01369476318359375,
-0.0262451171875,
-0.035736083984375,
-0.0228118896484375,
-0.0738525390625,
-0.01203155517578125,
0.036407470703125,
0.055206298828125,
-0.0032806396484375,
-0.045684814453125,
-0.005733489990234375,
0.03338623046875,
-0.052886962890625,
-0.04632568359375,
-0.0196685791015625,
-0.0279388427734375,
-0.003093719482421875,
0.038177490234375,
-0.01081085205078125,
-0.01904296875,
0.03253173828125,
0.004825592041015625,
0.0160980224609375,
-0.03875732421875,
-0.10791015625,
-0.0654296875,
-0.0899658203125,
-0.0100250244140625,
-0.0258331298828125,
-0.0197601318359375,
0.0087127685546875,
0.060455322265625,
0.03790283203125,
-0.043487548828125,
0.043212890625,
0.0369873046875,
-0.0205841064453125,
0.01497650146484375,
0.007843017578125,
-0.044647216796875,
-0.0206756591796875,
0.0003693103790283203,
0.02947998046875,
0.01404571533203125,
-0.0172882080078125,
0.006847381591796875,
-0.0218505859375,
-0.03656005859375,
0.00421142578125,
-0.028289794921875,
0.01491546630859375,
-0.015960693359375,
0.007007598876953125,
-0.05340576171875,
-0.01558685302734375,
-0.0104522705078125,
-0.0233612060546875,
0.042266845703125,
0.00699615478515625,
-0.0147857666015625,
0.00909423828125,
0.00559234619140625,
-0.00023949146270751953,
0.022857666015625,
0.01004791259765625,
-0.0266876220703125,
0.0269927978515625,
-0.00787353515625,
-0.016326904296875,
-0.03387451171875,
0.0753173828125,
0.0087738037109375,
-0.033660888671875,
0.033843994140625,
0.0126800537109375,
0.0120849609375,
-0.019378662109375,
-0.02490234375,
0.026123046875,
0.0240325927734375,
0.0173187255859375,
0.033935546875,
-0.0159912109375,
-0.0179901123046875,
-0.026885986328125,
0.043243408203125,
-0.018280029296875,
-0.01284027099609375,
0.0221405029296875,
0.0151519775390625,
-0.01708984375,
-0.027801513671875,
-0.033843994140625,
-0.00988006591796875,
-0.1275634765625,
0.0143280029296875,
0.002899169921875,
-0.047210693359375,
-0.01739501953125,
-0.0263824462890625,
-0.09088134765625,
-0.04840087890625,
0.039093017578125,
-0.006076812744140625,
0.01050567626953125,
0.01273345947265625,
-0.018524169921875,
0.00646209716796875,
-0.03662109375,
-0.01476287841796875,
-0.0367431640625,
-0.026947021484375,
0.03375244140625,
0.0288543701171875,
0.005847930908203125,
-0.0479736328125,
-0.02398681640625,
0.0265350341796875,
-0.034423828125,
0.0168914794921875,
-0.007312774658203125,
0.016448974609375,
0.0163116455078125,
0.0200042724609375,
-0.001140594482421875,
-0.00020396709442138672,
0.014495849609375,
-0.007396697998046875,
-0.0743408203125,
-0.0310211181640625,
-0.01678466796875,
0.00849151611328125,
0.0458984375,
-0.046875,
-0.04058837890625,
-0.0221710205078125,
-0.0235137939453125,
0.00481414794921875,
0.00235748291015625,
-0.037933349609375,
-0.036590576171875,
-0.056793212890625,
0.005710601806640625,
0.00011992454528808594,
-0.0284576416015625,
0.0117950439453125,
0.055084228515625,
0.031280517578125,
-0.0032672882080078125,
-0.0129852294921875,
0.03228759765625,
0.016021728515625,
0.05743408203125,
0.019287109375,
0.00785064697265625,
-0.017059326171875,
0.0198211669921875,
0.016448974609375,
0.0174560546875,
-0.00476837158203125,
0.021270751953125,
-0.0030345916748046875,
-0.049652099609375,
0.045928955078125,
0.01123809814453125,
-0.0243072509765625,
0.07452392578125,
0.0017223358154296875,
-0.061859130859375,
-0.041534423828125,
0.039825439453125,
-0.00885772705078125,
0.03033447265625,
-0.0305633544921875,
-0.04248046875,
0.02886962890625,
0.016326904296875,
0.00963592529296875,
0.006805419921875,
-0.0113372802734375,
0.0221405029296875,
-0.0097198486328125,
-0.00933074951171875,
0.0819091796875,
0.0367431640625,
0.0302886962890625,
0.0340576171875,
0.054840087890625,
-0.01529693603515625,
0.02349853515625,
0.00815582275390625,
0.005352020263671875,
-0.0279388427734375,
-0.0107269287109375,
-0.053863525390625,
-0.03033447265625,
-0.047271728515625,
0.01531219482421875,
-0.004840850830078125,
0.04168701171875,
0.031036376953125,
-0.035247802734375,
-0.01396942138671875,
-0.00722503662109375,
-0.003704071044921875,
-0.0633544921875,
-0.011749267578125,
-0.051361083984375,
0.0220794677734375,
-0.034027099609375,
0.06591796875,
-0.039825439453125,
0.0232696533203125,
0.0073089599609375,
0.0026569366455078125,
-0.0030155181884765625,
0.0119476318359375,
0.040740966796875,
-0.0149688720703125,
-0.0085601806640625,
-0.0182952880859375,
0.00360870361328125,
-0.0201416015625,
0.00490570068359375,
0.035247802734375,
0.003101348876953125,
-0.0286102294921875,
-0.0277099609375,
0.0257568359375,
0.0188446044921875,
-0.00579071044921875,
0.0171051025390625,
-0.00795745849609375,
-0.0032749176025390625,
-0.047637939453125,
-0.02191162109375,
0.0526123046875,
-0.00444793701171875,
-0.0035800933837890625,
-0.0419921875,
0.001163482666015625,
0.0232696533203125,
-0.0101165771484375,
-0.02471923828125,
0.03106689453125,
0.01084136962890625,
0.0022735595703125,
-0.0167388916015625,
-0.01488494873046875,
-0.066650390625,
-0.0175018310546875,
-0.0166015625,
-0.0214080810546875,
0.048431396484375,
-0.06298828125,
0.051116943359375,
-0.036376953125,
0.0052337646484375,
-0.0178375244140625,
0.0290374755859375,
0.041229248046875,
0.04681396484375,
-0.0892333984375,
0.0166015625,
-0.019073486328125,
0.0074005126953125,
-0.0078277587890625,
-0.0187835693359375,
-0.03814697265625,
-0.01470184326171875,
-0.013519287109375,
0.0236358642578125,
-0.0233154296875,
0.004718780517578125,
-0.0210418701171875,
0.00588226318359375,
0.00213623046875,
0.0574951171875,
-0.003543853759765625,
0.07415771484375,
-0.032928466796875,
0.08349609375,
0.02001953125,
0.02801513671875,
-0.03143310546875,
-0.024749755859375,
-0.0027179718017578125,
-0.0031719207763671875,
-0.01399993896484375,
0.0029697418212890625,
0.0006093978881835938,
-0.00531005859375,
0.037872314453125,
-0.007640838623046875,
0.0079498291015625,
0.0293121337890625,
0.00543212890625,
-0.011566162109375,
-0.017242431640625,
0.036285400390625,
0.005908966064453125,
0.016387939453125,
0.00824737548828125,
-0.004283905029296875,
0.01165008544921875,
0.00002562999725341797,
0.00395965576171875,
0.0043182373046875,
-0.0012302398681640625,
-0.0293121337890625,
-0.0357666015625,
0.06585693359375,
0.07745361328125,
0.00888824462890625,
0.044769287109375,
0.02008056640625,
0.0103759765625,
0.00730133056640625,
0.001148223876953125,
0.0174102783203125,
0.01201629638671875,
0.083740234375,
0.0136566162109375,
-0.0279541015625,
0.0643310546875,
-0.046630859375,
0.01776123046875,
0.0235443115234375,
0.011383056640625,
-0.05291748046875,
0.010040283203125,
0.000583648681640625,
-0.01010894775390625,
-0.002834320068359375,
0.035614013671875,
-0.0151824951171875,
-0.005710601806640625,
-0.0024566650390625,
-0.026885986328125,
0.00693511962890625,
0.01242828369140625,
0.00969696044921875,
-0.0307769775390625,
-0.0006227493286132812,
0.032470703125,
0.005779266357421875,
-0.03741455078125,
0.00439453125,
0.007587432861328125,
-0.011505126953125,
0.0004916191101074219,
0.039886474609375,
0.007663726806640625,
0.004314422607421875,
-0.0125732421875,
0.03656005859375,
-0.0165863037109375,
-0.023223876953125,
0.032562255859375,
0.031646728515625,
-0.007755279541015625,
0.059600830078125,
-0.0244140625,
0.04071044921875,
0.049713134765625,
-0.0023403167724609375,
0.036895751953125,
-0.01110076904296875,
-0.026275634765625,
0.01079559326171875,
-0.03839111328125,
-0.0245208740234375,
-0.01678466796875,
0.0200042724609375,
-0.0274505615234375,
-0.013275146484375,
0.101806640625,
-0.004619598388671875,
-0.03717041015625,
-0.005786895751953125,
0.00032782554626464844,
0.0124969482421875,
-0.0296173095703125,
0.0168609619140625,
-0.07135009765625,
-0.02313232421875,
-0.006786346435546875,
-0.0129547119140625,
0.018890380859375,
-0.006061553955078125,
-0.061065673828125,
0.08502197265625,
0.011962890625,
0.051727294921875,
0.0123748779296875,
0.020660400390625,
-0.0172271728515625,
0.00019180774688720703,
-0.00197601318359375,
0.03289794921875,
-0.003955841064453125,
0.0113067626953125,
-0.025970458984375,
0.0009407997131347656,
-0.005054473876953125,
0.043792724609375,
0.0819091796875,
0.019683837890625,
-0.0345458984375,
-0.0274200439453125,
0.0208892822265625,
-0.0139923095703125,
-0.038604736328125,
0.049774169921875,
0.029693603515625,
0.015045166015625,
0.0379638671875,
-0.0304718017578125,
0.037109375,
-0.043975830078125,
0.0236663818359375,
0.047515869140625,
0.003910064697265625,
0.000036776065826416016,
-0.03460693359375,
0.047882080078125,
-0.033416748046875,
-0.02117919921875,
0.0411376953125,
-0.02764892578125,
-0.005092620849609375,
0.0227203369140625,
0.04779052734375,
-0.058685302734375,
-0.0374755859375,
-0.0234527587890625,
0.037322998046875,
0.0202484130859375,
0.01142120361328125,
0.033172607421875,
0.01971435546875,
0.03472900390625,
-0.015380859375,
0.006053924560546875,
0.01474761962890625,
-0.01548004150390625,
0.034820556640625,
0.044281005859375,
0.04962158203125,
0.0191497802734375,
0.00272369384765625,
0.03466796875,
0.043975830078125,
-0.0260162353515625,
-0.062744140625,
-0.004650115966796875,
-0.0064697265625,
0.007160186767578125,
0.01488494873046875,
-0.009033203125,
0.019622802734375,
0.061492919921875,
-0.07977294921875,
-0.006175994873046875,
0.05108642578125,
-0.006671905517578125,
-0.02880859375,
-0.0528564453125,
0.0240936279296875,
0.00887298583984375,
-0.0362548828125,
0.02093505859375,
0.00641632080078125,
0.050567626953125,
0.002960205078125,
0.02423095703125,
-0.043609619140625,
-0.029693603515625,
-0.028717041015625,
0.049835205078125,
-0.021575927734375,
0.039398193359375,
-0.043243408203125,
-0.0261383056640625,
-0.00812530517578125,
0.033782958984375,
0.019287109375,
0.0168304443359375,
0.0066986083984375,
-0.0066986083984375,
0.01548004150390625,
0.0038967132568359375,
0.034912109375,
-0.00968170166015625,
0.062469482421875,
-0.04595947265625,
-0.0172119140625,
-0.057769775390625,
-0.04876708984375,
-0.031494140625,
-0.0369873046875,
0.00820159912109375,
-0.0582275390625,
0.0136260986328125,
-0.01006317138671875,
-0.03387451171875,
0.052886962890625,
-0.0171356201171875,
0.052337646484375,
-0.01611328125,
-0.01328277587890625,
0.0143280029296875,
-0.020477294921875,
-0.0802001953125,
0.0217742919921875,
0.060821533203125,
-0.01456451416015625,
0.0193023681640625,
0.01548004150390625,
0.048919677734375,
-0.0034637451171875,
-0.033294677734375,
0.00402069091796875,
-0.02227783203125,
0.0379638671875,
0.01483917236328125,
-0.0218353271484375,
-0.00856781005859375,
-0.04949951171875,
0.035736083984375,
0.04425048828125,
0.1044921875,
-0.044708251953125,
0.037200927734375,
-0.0093994140625,
-0.02630615234375,
0.00417327880859375,
0.0006861686706542969,
0.006427764892578125,
-0.0025920867919921875,
-0.0256805419921875,
0.0008215904235839844,
-0.059539794921875,
-0.01751708984375,
0.0367431640625,
-0.0294189453125,
0.01983642578125,
-0.004070281982421875,
0.02972412109375,
-0.0289306640625,
0.040771484375,
-0.029083251953125,
-0.043731689453125,
-0.051544189453125,
0.00930023193359375,
0.033294677734375,
0.022979736328125,
-0.0447998046875,
0.037261962890625,
0.016937255859375,
-0.010406494140625,
0.01468658447265625,
-0.023162841796875,
0.042694091796875,
0.0343017578125,
-0.0203094482421875,
-0.004638671875,
0.03704833984375,
-0.020355224609375,
0.017913818359375,
0.00308990478515625,
0.04632568359375,
0.006587982177734375,
-0.0197296142578125,
-0.00881195068359375,
-0.0985107421875,
-0.0261077880859375,
-0.041748046875,
-0.0208740234375,
-0.033935546875,
0.048248291015625,
-0.029022216796875,
-0.064697265625,
-0.0163421630859375,
-0.044647216796875,
-0.008026123046875,
0.0094451904296875,
-0.01525115966796875,
-0.044342041015625,
0.0011796951293945312,
0.00955963134765625,
0.0119171142578125,
-0.01348876953125,
-0.0219879150390625,
-0.003875732421875,
-0.019439697265625,
0.041259765625,
-0.0195770263671875,
-0.01236724853515625,
0.01094818115234375,
0.014007568359375,
-0.03314208984375,
0.0107879638671875,
-0.043670654296875,
-0.016571044921875,
-0.00946044921875,
0.01163482666015625,
0.046539306640625,
0.0003726482391357422,
-0.0225982666015625,
-0.00714874267578125,
-0.0082244873046875,
0.04736328125,
-0.0740966796875,
-0.0110626220703125,
0.0146026611328125,
-0.004817962646484375,
-0.02838134765625,
-0.00710296630859375,
0.02313232421875,
-0.0218353271484375,
-0.0386962890625,
0.0187530517578125,
-0.024505615234375,
-0.0097503662109375,
-0.0567626953125,
-0.080078125,
0.05328369140625,
-0.0032749176025390625,
-0.040771484375,
-0.031890869140625,
0.0092315673828125,
0.00316619873046875,
0.00899505615234375,
-0.005970001220703125,
-0.0253753662109375,
-0.042388916015625,
-0.007251739501953125,
0.0206756591796875,
0.0020313262939453125,
0.033477783203125,
0.040435791015625,
-0.016937255859375,
0.022186279296875,
-0.011627197265625,
-0.046600341796875,
-0.037139892578125,
0.00986480712890625,
0.00803375244140625,
0.01580810546875,
-0.006717681884765625,
0.0282135009765625,
0.045623779296875,
-0.0164794921875,
0.008209228515625,
-0.0139617919921875,
0.0008544921875,
0.00025844573974609375,
0.046875,
-0.0012598037719726562,
0.0022335052490234375,
-0.019683837890625,
-0.004688262939453125,
-0.0101318359375,
-0.05126953125,
-0.0161590576171875,
0.03826904296875,
-0.0767822265625,
-0.0117950439453125,
0.0171051025390625,
-0.0113983154296875,
-0.0141143798828125,
0.00420379638671875,
-0.033050537109375,
0.00612640380859375,
0.01512908935546875,
0.00740814208984375,
-0.025970458984375,
-0.0311737060546875,
0.0679931640625,
-0.037811279296875,
-0.00212860107421875,
-0.00673675537109375,
0.033477783203125,
0.009765625,
-0.03277587890625,
0.0163116455078125,
0.046295166015625,
-0.0291290283203125,
-0.00518798828125,
0.032623291015625,
-0.0191497802734375,
-0.019012451171875,
0.002109527587890625,
-0.0207977294921875,
0.01300048828125,
-0.014678955078125,
0.0255889892578125,
-0.01418304443359375,
0.04644775390625,
0.0182342529296875,
0.052490234375,
-0.004863739013671875,
0.0343017578125,
-0.00991058349609375,
0.036041259765625,
0.0020599365234375,
-0.01812744140625,
0.032867431640625,
-0.01849365234375,
0.00054931640625,
0.004314422607421875,
0.01157379150390625,
-0.050872802734375,
0.030853271484375,
-0.046905517578125,
0.006893157958984375,
0.01806640625
] |
635db0a4c62337e419a1181705fe11bfa31832bf
|
Wordpress Stackexchange
Q: Add popup window to TinyMCE buttons I'm looking for a good tutorial on how to create a popup window with a TinyMce button that would allow the user to select from multiple options, enter text into inputs, etc. I know how to create a button that displays a single prompt window, but that's about it and I've been searching for hours.
Anyone know some links?
Thanks!
A: Here is a nice and a fairly new (a year old) tutorial that i've read a few days ago:
http://solislab.com/blog/how-to-make-shortcodes-user-friendly/
He has a great example and you can also download the source files and get a better understanding.
|
Q: Add popup window to TinyMCE buttons I'm looking for a good tutorial on how to create a popup window with a TinyMce button that would allow the user to select from multiple options, enter text into inputs, etc. I know how to create a button that displays a single prompt window, but that's about it and I've been searching for hours.
Anyone know some links?
Thanks!
A: Here is a nice and a fairly new (a year old) tutorial that i've read a few days ago:
http://solislab.com/blog/how-to-make-shortcodes-user-friendly/
He has a great example and you can also download the source files and get a better understanding.
|
wordpress
|
{
"language": "en",
"length": 106,
"provenance": "stackexchange_00019.jsonl.gz:407924",
"question_score": "11",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12580"
}
|
[
0.0291900634765625,
-0.0048675537109375,
0.01239013671875,
-0.021270751953125,
-0.0040130615234375,
-0.0014772415161132812,
0.042205810546875,
-0.00939178466796875,
0.0105438232421875,
0.040679931640625,
-0.0440673828125,
0.01001739501953125,
-0.0083465576171875,
0.00061798095703125,
-0.036468505859375,
-0.03240966796875,
0.02288818359375,
-0.0179443359375,
0.00543212890625,
-0.01044464111328125,
-0.006855010986328125,
0.00391387939453125,
-0.004100799560546875,
0.0107269287109375,
0.00371551513671875,
-0.01088714599609375,
0.061004638671875,
-0.0210723876953125,
-0.004032135009765625,
-0.0160675048828125,
0.00855255126953125,
-0.0002168416976928711,
0.01541900634765625,
0.0450439453125,
-0.032470703125,
0.07086181640625,
-0.036224365234375,
0.038909912109375,
0.0283050537109375,
-0.00928497314453125,
0.016326904296875,
-0.03125,
-0.02313232421875,
0.0035114288330078125,
-0.019439697265625,
-0.005405426025390625,
0.01160430908203125,
-0.034423828125,
-0.0025005340576171875,
-0.0231781005859375,
0.00907135009765625,
0.00412750244140625,
0.031463623046875,
-0.03277587890625,
-0.0252532958984375,
-0.0355224609375,
-0.0018262863159179688,
-0.021484375,
0.0121307373046875,
0.042510986328125,
0.00733184814453125,
0.0004622936248779297,
-0.005588531494140625,
-0.0192718505859375,
0.004642486572265625,
-0.00655364990234375,
-0.10980224609375,
0.01497650146484375,
0.027252197265625,
0.0241241455078125,
-0.0030574798583984375,
-0.03997802734375,
0.0220794677734375,
-0.0264739990234375,
0.0066986083984375,
0.0352783203125,
-0.0222930908203125,
0.01509857177734375,
0.030548095703125,
-0.0016012191772460938,
-0.00946807861328125,
0.01142120361328125,
0.0032901763916015625,
-0.039459228515625,
-0.0015544891357421875,
-0.0305938720703125,
-0.00858306884765625,
-0.0054931640625,
-0.0138092041015625,
-0.00986480712890625,
-0.0183868408203125,
-0.032440185546875,
-0.0167694091796875,
0.049896240234375,
-0.005130767822265625,
0.00267791748046875,
-0.007305145263671875,
-0.036376953125,
0.031463623046875,
0.015869140625,
0.0201416015625,
-0.043609619140625,
0.047760009765625,
-0.00716400146484375,
-0.01409912109375,
0.032806396484375,
0.033294677734375,
0.050689697265625,
0.033721923828125,
0.00986480712890625,
-0.0097808837890625,
0.033599853515625,
-0.0201873779296875,
-0.001552581787109375,
-0.016571044921875,
0.01320648193359375,
-0.056427001953125,
0.04803466796875,
-0.005542755126953125,
0.059814453125,
-0.006649017333984375,
0.0012998580932617188,
0.01134490966796875,
0.016326904296875,
-0.0236358642578125,
-0.032623291015625,
-0.003940582275390625,
-0.0015268325805664062,
-0.00373077392578125,
0.0270538330078125,
-0.0262451171875,
0.00424957275390625,
0.031463623046875,
0.052978515625,
0.024627685546875,
-0.01806640625,
0.024566650390625,
-0.030853271484375,
0.024505615234375,
-0.016143798828125,
0.030792236328125,
-0.0309906005859375,
-0.01861572265625,
0.031951904296875,
-0.0030460357666015625,
0.02447509765625,
0.042388916015625,
0.002033233642578125,
-0.0142669677734375,
-0.059356689453125,
0.006580352783203125,
0.0215301513671875,
0.019134521484375,
-0.000007271766662597656,
0.0023441314697265625,
-0.0290374755859375,
0.0253448486328125,
-0.038238525390625,
0.0195159912109375,
-0.026031494140625,
0.01439666748046875,
0.0347900390625,
0.06719970703125,
-0.006649017333984375,
0.006649017333984375,
-0.05963134765625,
-0.061248779296875,
0.0013589859008789062,
0.027313232421875,
0.037567138671875,
-0.017974853515625,
-0.005733489990234375,
0.0120849609375,
0.01641845703125,
-0.0121917724609375,
0.0240325927734375,
0.01508331298828125,
0.042510986328125,
0.0296478271484375,
0.0011396408081054688,
-0.003871917724609375,
-0.0362548828125,
0.12237548828125,
-0.025665283203125,
-0.0341796875,
0.050537109375,
-0.0162200927734375,
0.07415771484375,
-0.019439697265625,
0.0223236083984375,
-0.0313720703125,
0.0511474609375,
0.031585693359375,
-0.0168914794921875,
0.007049560546875,
-0.0283966064453125,
-0.06488037109375,
-0.01515960693359375,
-0.0233612060546875,
-0.01206207275390625,
-0.007091522216796875,
-0.01593017578125,
0.0249481201171875,
0.0357666015625,
0.02276611328125,
-0.00043845176696777344,
0.0026683807373046875,
-0.00893402099609375,
0.0305023193359375,
-0.035980224609375,
-0.00829315185546875,
-0.01690673828125,
0.0239715576171875,
-0.058074951171875,
-0.03729248046875,
0.08319091796875,
-0.0303497314453125,
0.02838134765625,
-0.0087127685546875,
0.0209808349609375,
0.01418304443359375,
-0.0270538330078125,
0.036224365234375,
0.03497314453125,
-0.0008368492126464844,
-0.04388427734375,
-0.00193023681640625,
-0.04266357421875,
-0.028106689453125,
-0.030548095703125,
0.004329681396484375,
0.06414794921875,
0.00907135009765625,
0.01885986328125,
-0.047943115234375,
-0.0126190185546875,
-0.056427001953125,
-0.027191162109375,
0.0016050338745117188,
0.054443359375,
0.0119476318359375,
0.01384735107421875,
0.00147247314453125,
0.057708740234375,
0.04083251953125,
0.043731689453125,
0.0265655517578125,
0.004634857177734375,
0.009307861328125,
0.0498046875,
0.01482391357421875,
-0.0137786865234375,
0.004734039306640625,
-0.05316162109375,
0.0283050537109375,
0.01047515869140625,
-0.032989501953125,
0.0526123046875,
-0.0251007080078125,
-0.0192413330078125,
-0.01084136962890625,
-0.0231170654296875,
0.02691650390625,
-0.041168212890625,
0.0338134765625,
0.0278778076171875,
0.03192138671875,
0.0302581787109375,
-0.0196533203125,
0.01155853271484375,
-0.00823211669921875,
-0.02642822265625,
-0.01277923583984375,
-0.0295257568359375,
0.035888671875,
-0.0360107421875,
-0.031005859375,
0.01230621337890625,
0.01247406005859375,
-0.021697998046875,
-0.0305023193359375,
-0.00811767578125,
-0.03955078125,
-0.0203857421875,
0.00551605224609375,
-0.04193115234375,
-0.00481414794921875,
-0.03265380859375,
0.080322265625,
-0.004619598388671875,
0.03924560546875,
-0.0279693603515625,
-0.031982421875,
0.057586669921875,
0.035552978515625,
-0.06512451171875,
0.06768798828125,
-0.00978851318359375,
0.038238525390625,
-0.00771331787109375,
0.024749755859375,
0.046478271484375,
-0.0200347900390625,
0.003482818603515625,
0.02301025390625,
-0.01299285888671875,
-0.04443359375,
0.045867919921875,
0.037506103515625,
0.0087890625,
-0.0421142578125,
0.04595947265625,
0.020751953125,
0.06500244140625,
-0.0335693359375,
-0.04296875,
-0.00798797607421875,
0.050018310546875,
0.024566650390625,
0.0260772705078125,
0.02587890625,
-0.06011962890625,
0.025634765625,
-0.0272369384765625,
-0.040313720703125,
-0.036285400390625,
0.0274658203125,
0.00933074951171875,
-0.0531005859375,
0.013427734375,
-0.0017118453979492188,
0.0006589889526367188,
-0.001865386962890625,
0.0215606689453125,
-0.005306243896484375,
0.004703521728515625,
0.0186920166015625,
0.0225830078125,
0.0019378662109375,
0.0028781890869140625,
0.04022216796875,
-0.006305694580078125,
0.0007524490356445312,
-0.00028204917907714844,
0.045928955078125,
-0.049163818359375,
-0.042510986328125,
0.001026153564453125,
0.0038585662841796875,
0.0137939453125,
-0.01178741455078125,
0.00678253173828125,
-0.020111083984375,
-0.00769805908203125,
-0.012542724609375,
0.0294189453125,
0.0143280029296875,
0.0017766952514648438,
0.0249176025390625,
-0.03741455078125,
0.0244140625,
0.0306549072265625,
0.003139495849609375,
-0.033233642578125,
-0.0150299072265625,
-0.043914794921875,
-0.00506591796875,
-0.00806427001953125,
0.033050537109375,
0.024658203125,
0.036529541015625,
0.032470703125,
-0.035919189453125,
-0.01042938232421875,
-0.003803253173828125,
-0.036163330078125,
0.03021240234375,
-0.021636962890625,
-0.017913818359375,
-0.018096923828125,
-0.0031223297119140625,
0.00205230712890625,
0.0142059326171875,
-0.0006880760192871094,
-0.0175323486328125,
0.034210205078125,
-0.0261993408203125,
0.04150390625,
-0.057525634765625,
-0.020263671875,
-0.03155517578125,
0.08233642578125,
-0.038543701171875,
-0.0101776123046875,
-0.007312774658203125,
-0.005596160888671875,
0.0144500732421875,
0.007564544677734375,
-0.04150390625,
-0.01377105712890625,
-0.07086181640625,
0.0167694091796875,
-0.0028629302978515625,
-0.0022258758544921875,
-0.056396484375,
0.00682830810546875,
-0.04766845703125,
-0.0261383056640625,
0.046356201171875,
-0.006870269775390625,
0.003871917724609375,
0.01013946533203125,
0.0140533447265625,
-0.038116455078125,
-0.017608642578125,
-0.0194549560546875,
-0.08941650390625,
-0.0096588134765625,
-0.0099334716796875,
0.057373046875,
0.01111602783203125,
-0.05712890625,
-0.015625,
0.037445068359375,
-0.038360595703125,
0.0184173583984375,
-0.00240325927734375,
0.047821044921875,
0.007904052734375,
-0.01544189453125,
-0.01441192626953125,
-0.0203399658203125,
0.036590576171875,
0.00704193115234375,
-0.008544921875,
0.005046844482421875,
-0.06268310546875,
-0.02154541015625,
-0.0299072265625,
-0.04302978515625,
-0.024505615234375,
-0.0287933349609375,
-0.017822265625,
0.002925872802734375,
-0.0017070770263671875,
-0.0113372802734375,
-0.023345947265625,
-0.03192138671875,
-0.0019550323486328125,
0.005619049072265625,
-0.004009246826171875,
0.01262664794921875,
0.033599853515625,
0.024200439453125,
-0.018463134765625,
0.0008945465087890625,
-0.00244903564453125,
0.027374267578125,
0.0275421142578125,
-0.044525146484375,
-0.034515380859375,
-0.0290374755859375,
-0.013397216796875,
-0.0133056640625,
-0.000014185905456542969,
-0.05029296875,
0.1015625,
-0.01178741455078125,
-0.0083465576171875,
0.018218994140625,
-0.0239715576171875,
-0.0020885467529296875,
-0.040740966796875,
-0.01177215576171875,
-0.0030078887939453125,
-0.00728607177734375,
0.01467132568359375,
0.01100921630859375,
0.018310546875,
-0.02001953125,
0.00592041015625,
-0.0249481201171875,
0.0777587890625,
0.034759521484375,
0.008392333984375,
0.00313568115234375,
-0.03143310546875,
0.018951416015625,
-0.03375244140625,
0.0361328125,
0.046600341796875,
0.040771484375,
0.05328369140625,
-0.001495361328125,
0.00363922119140625,
-0.035491943359375,
-0.0030517578125,
0.040191650390625,
0.035858154296875,
-0.0201568603515625,
-0.041778564453125,
0.00732421875,
0.01531982421875,
-0.0341796875,
0.01056671142578125,
-0.021484375,
0.01056671142578125,
0.00926971435546875,
0.0421142578125,
0.06689453125,
-0.00815582275390625,
0.00774383544921875,
-0.07257080078125,
0.00113677978515625,
-0.036041259765625,
-0.004669189453125,
0.030181884765625,
-0.0267181396484375,
0.0154571533203125,
0.0070953369140625,
0.01560211181640625,
0.043121337890625,
-0.0037136077880859375,
0.0301361083984375,
0.0304107666015625,
-0.020751953125,
0.002696990966796875,
-0.0007581710815429688,
0.0106353759765625,
0.009613037109375,
0.005222320556640625,
0.00022101402282714844,
-0.004390716552734375,
-0.0007195472717285156,
0.01186370849609375,
-0.0246124267578125,
-0.0360107421875,
-0.021881103515625,
-0.02471923828125,
-0.0075836181640625,
-0.0114593505859375,
0.0060577392578125,
0.00276947021484375,
0.0307464599609375,
0.01666259765625,
-0.0293121337890625,
-0.01293182373046875,
-0.002758026123046875,
-0.018402099609375,
-0.031219482421875,
-0.00792694091796875,
-0.0027332305908203125,
0.038482666015625,
0.0100555419921875,
-0.0160675048828125,
-0.038787841796875,
-0.035430908203125,
-0.0182037353515625,
0.0266571044921875,
0.065185546875,
-0.01531982421875,
-0.0308837890625,
-0.00036215782165527344,
0.00969696044921875,
-0.0526123046875,
0.0186004638671875,
0.0157012939453125,
-0.009521484375,
-0.0533447265625,
-0.02740478515625,
-0.05804443359375,
-0.01447296142578125,
-0.06719970703125,
-0.05120849609375,
-0.049102783203125,
0.01543426513671875,
0.01448822021484375,
0.03948974609375,
0.00101470947265625,
-0.0008792877197265625,
0.00844573974609375,
0.008544921875,
-0.00971221923828125,
0.029998779296875,
0.04071044921875,
0.0010166168212890625,
-0.0202789306640625,
0.06500244140625,
0.016265869140625,
-0.024017333984375,
-0.037628173828125,
-0.03948974609375,
0.050506591796875,
-0.0126953125,
-0.059783935546875,
-0.02545166015625,
-0.034423828125,
-0.0204315185546875,
0.0117950439453125,
-0.039306640625,
0.0020923614501953125,
-0.00873565673828125,
0.00588226318359375,
-0.0166168212890625,
0.031280517578125,
-0.01497650146484375,
-0.04241943359375,
0.0340576171875,
-0.044189453125,
-0.01236724853515625,
0.0022830963134765625,
0.0263671875,
0.0033931732177734375,
-0.0295562744140625,
0.00986480712890625,
0.03094482421875,
-0.0146026611328125,
0.0457763671875,
0.071044921875,
-0.029266357421875,
0.0135955810546875,
0.048126220703125,
-0.02801513671875,
-0.00897216796875,
-0.01094818115234375,
-0.01136016845703125,
0.0137176513671875,
0.0382080078125,
-0.01788330078125,
-0.0216522216796875,
0.023040771484375,
-0.023162841796875,
0.0259246826171875,
0.0579833984375,
0.06732177734375,
-0.10601806640625,
0.00897216796875,
0.003978729248046875,
-0.014801025390625,
0.01534271240234375,
-0.01285552978515625,
0.02081298828125,
-0.0216064453125,
0.08819580078125,
0.017242431640625,
0.0133056640625,
0.06134033203125,
-0.0161590576171875,
-0.0003311634063720703,
-0.0040130615234375,
0.052093505859375,
0.004547119140625,
-0.0594482421875,
0.01039886474609375,
0.035980224609375,
0.0093841552734375,
0.0172271728515625,
0.037628173828125,
-0.025177001953125,
-0.02020263671875,
-0.0009016990661621094,
0.01012420654296875,
-0.012359619140625,
-0.04388427734375,
0.0660400390625,
-0.0212554931640625,
0.0213470458984375,
0.03399658203125,
-0.038543701171875,
0.0665283203125,
-0.00946044921875,
0.020538330078125,
0.07855224609375,
0.009124755859375,
-0.02264404296875,
-0.04248046875,
-0.0146026611328125,
-0.0289306640625,
-0.033172607421875,
0.038970947265625,
0.00421905517578125,
0.05340576171875,
0.0360107421875,
0.02496337890625,
-0.06585693359375,
0.063232421875,
-0.012664794921875,
-0.048858642578125,
-0.02435302734375,
-0.035980224609375,
-0.051544189453125,
-0.00014793872833251953,
-0.046844482421875,
-0.03582763671875,
0.04620361328125,
-0.026641845703125,
-0.0810546875,
0.09576416015625,
0.0095367431640625,
0.04681396484375,
-0.0276336669921875,
0.044097900390625,
-0.0207366943359375,
0.0180816650390625,
-0.0010786056518554688,
0.01357269287109375,
0.01490020751953125,
-0.01360321044921875,
-0.00995635986328125,
-0.0011548995971679688,
-0.0161590576171875,
0.040008544921875,
-0.0210113525390625,
-0.017730712890625,
0.0196075439453125,
0.03607177734375,
0.07147216796875,
0.017333984375,
-0.0024356842041015625,
0.004108428955078125,
0.0253753662109375,
-0.0241851806640625,
0.01812744140625,
0.0362548828125,
0.037200927734375,
-0.0019435882568359375,
-0.00783538818359375,
0.050872802734375,
-0.0157318115234375,
-0.0382080078125,
0.0161285400390625,
-0.0174102783203125,
0.0113372802734375,
-0.0018472671508789062,
-0.0255889892578125,
-0.00864410400390625,
-0.0096588134765625,
0.041839599609375,
-0.01496124267578125,
0.0099334716796875,
0.041259765625,
-0.04376220703125,
0.028411865234375,
-0.031982421875,
0.0157928466796875,
-0.0240631103515625,
0.0165252685546875,
0.0165557861328125,
-0.0157623291015625,
-0.002414703369140625,
0.0457763671875,
-0.033233642578125,
0.0216522216796875,
-0.00858306884765625,
0.01385498046875,
-0.07318115234375,
-0.044677734375,
0.043121337890625,
0.051971435546875,
-0.01082611083984375,
-0.051849365234375,
0.007045745849609375,
0.01141357421875,
-0.0174102783203125,
0.002643585205078125,
-0.01495361328125,
0.0094757080078125,
0.08209228515625,
-0.007015228271484375,
-0.01470184326171875,
-0.0079803466796875,
0.0310821533203125,
-0.005161285400390625,
0.0014295578002929688,
0.01445770263671875,
-0.01216888427734375,
-0.0019321441650390625,
-0.028045654296875,
-0.012908935546875,
0.017669677734375,
0.016448974609375,
0.0137939453125,
-0.01416778564453125,
-0.00910186767578125,
-0.0181427001953125,
0.018157958984375,
0.051513671875,
0.0111236572265625,
0.01544189453125,
0.02069091796875,
0.023193359375,
0.0008955001831054688,
0.04351806640625,
0.01580810546875,
0.00908660888671875,
0.00786590576171875,
0.00823211669921875,
0.010162353515625,
0.045440673828125,
-0.01947021484375,
-0.00038123130798339844,
-0.0304718017578125,
-0.0084381103515625,
0.007022857666015625,
-0.0223388671875,
0.002986907958984375,
-0.015960693359375,
0.0295562744140625,
-0.060577392578125,
0.03466796875,
-0.0238037109375,
-0.039093017578125,
0.042724609375,
-0.04498291015625,
0.050018310546875,
-0.04156494140625,
-0.062347412109375,
-0.006298065185546875,
0.0022449493408203125,
-0.04071044921875,
0.0210418701171875,
0.037689208984375,
-0.01415252685546875,
0.0046844482421875,
0.0020236968994140625,
0.0203094482421875,
0.0244598388671875,
-0.034149169921875,
0.0030002593994140625,
-0.00514984130859375,
0.0230712890625,
0.0029582977294921875,
-0.08953857421875,
-0.029754638671875,
-0.027618408203125,
0.0131683349609375,
0.020172119140625,
0.032135009765625,
0.024322509765625,
0.022735595703125,
-0.0182952880859375,
-0.0162506103515625,
0.00168609619140625,
-0.0421142578125,
0.0633544921875,
0.016082763671875,
-0.01264190673828125,
-0.004329681396484375,
-0.00939178466796875,
0.03955078125,
-0.0135498046875,
-0.0205841064453125,
0.003997802734375,
-0.00799560546875,
0.0037097930908203125,
0.0247344970703125,
0.05279541015625,
-0.01153564453125,
-0.0283203125,
-0.033843994140625,
-0.008758544921875,
0.0166015625,
0.0330810546875,
-0.016021728515625,
0.0285797119140625,
0.0179595947265625,
0.0159454345703125,
0.0098876953125,
0.0079498291015625,
0.0014057159423828125,
0.0192413330078125,
0.0016880035400390625,
0.0033664703369140625,
0.017486572265625,
-0.0129547119140625,
0.0059356689453125,
0.01448822021484375,
-0.0187530517578125,
0.04248046875,
-0.038177490234375,
0.1046142578125,
0.0071258544921875,
0.046539306640625,
-0.043853759765625,
-0.0277099609375,
0.06610107421875,
0.0256195068359375,
-0.004787445068359375,
0.05035400390625,
-0.00884246826171875,
0.01702880859375,
-0.00556182861328125,
0.01641845703125,
0.0191802978515625,
0.03564453125,
-0.056121826171875,
-0.018798828125,
0.0362548828125,
0.01108551025390625,
-0.05340576171875,
0.0160980224609375,
-0.006061553955078125,
0.02178955078125,
-0.00550079345703125,
0.018798828125,
-0.016326904296875,
-0.019744873046875,
-0.04400634765625,
-0.026092529296875,
-0.03759765625,
0.0538330078125,
-0.0310821533203125,
0.027069091796875,
0.023406982421875,
-0.032623291015625,
0.005840301513671875,
0.050262451171875,
0.05120849609375,
0.09368896484375,
0.007282257080078125,
-0.035186767578125,
0.039306640625,
-0.040618896484375,
0.01453399658203125,
-0.02734375,
-0.0088043212890625,
-0.06280517578125,
-0.0077667236328125,
-0.03466796875,
-0.01091766357421875,
-0.0261383056640625,
-0.0743408203125,
-0.09490966796875,
0.06695556640625,
-0.01435089111328125,
-0.039337158203125,
-0.008270263671875,
0.0249786376953125,
0.006145477294921875,
-0.047210693359375,
-0.0234222412109375,
0.00042629241943359375,
0.015960693359375,
0.0074005126953125,
0.0017070770263671875,
0.047882080078125,
0.0079803466796875,
-0.004764556884765625,
-0.034210205078125,
-0.004703521728515625,
-0.0250701904296875,
0.00547027587890625,
0.07171630859375,
-0.038299560546875,
0.0374755859375,
0.04443359375,
-0.06329345703125,
-0.0889892578125,
-0.0665283203125,
-0.044219970703125,
0.016387939453125,
-0.051483154296875,
-0.04620361328125,
-0.0239410400390625,
0.04290771484375,
0.0278778076171875,
0.0218505859375,
-0.023468017578125,
0.0259246826171875,
0.0171966552734375,
-0.0379638671875,
0.006496429443359375,
-0.0003993511199951172,
0.0008912086486816406,
0.008941650390625,
-0.021087646484375,
0.0049591064453125,
-0.021148681640625,
0.0277252197265625,
-0.0140838623046875,
-0.0182647705078125,
0.031219482421875,
-0.00345611572265625,
-0.034637451171875,
-0.00782012939453125,
0.07867431640625,
-0.0304412841796875,
-0.0031375885009765625,
0.020721435546875,
0.00930023193359375,
0.0282745361328125,
0.0183258056640625,
-0.002780914306640625,
0.03558349609375,
-0.04241943359375,
0.030792236328125,
-0.003948211669921875,
0.01654052734375,
-0.0531005859375,
0.00717926025390625,
0.01152801513671875,
0.01206207275390625,
0.0235748291015625,
0.006999969482421875,
-0.04010009765625,
0.037994384765625,
-0.0006871223449707031,
-0.01413726806640625,
-0.0310211181640625,
0.0059661865234375,
-0.043853759765625,
0.0284881591796875,
0.01348114013671875,
0.00728607177734375,
0.041290283203125,
0.0091400146484375,
0.00867462158203125,
0.01348114013671875,
-0.0084381103515625,
-0.01502227783203125,
0.0201416015625,
0.07305908203125,
-0.0008397102355957031,
0.0145416259765625
] |
3cb980e52077dd3a4f4824ca8394eb2cb30fd3f6
|
Wordpress Stackexchange
Q: get all tags from category i'm displaying all posts by category in my template and i was wondering:
is it possible to get a list of all tags used by that category?
i only found out how to make a tag-dropdown but it's from all articles,
i couldn't find out yet how to filter it by category - any ideas?
here's the link
http://wphacks.com/how-to-display-wordpress-tags-dropdown-menu/
thx in advance
A: Late answer
There's get_terms() here for that. No need for any custom queries.
|
Q: get all tags from category i'm displaying all posts by category in my template and i was wondering:
is it possible to get a list of all tags used by that category?
i only found out how to make a tag-dropdown but it's from all articles,
i couldn't find out yet how to filter it by category - any ideas?
here's the link
http://wphacks.com/how-to-display-wordpress-tags-dropdown-menu/
thx in advance
A: Late answer
There's get_terms() here for that. No need for any custom queries.
A: Maybe this is late but thinks it will help someone.
This is the code that gives you tags list for specific category
$terms = get_terms( array(
'taxonomy' => 'post_tag',
'hide_empty' => false,
) );
A: 10 year later but still better than never...
Categories and tags are not tied to each other. They are both related to post / product. Therefore, you need to query for the all posts/product and grab their IDs, so you can then query for tags where product/post ID is with in this set of IDs.
See the query below for WordPress Posts:
SET @CategoryByID = 1; -- set correct category ID
-- SET @CategoryByName = 'Politics'; -- set correct category name
SELECT DISTINCT t.* FROM wp_posts AS p
LEFT JOIN wp_term_relationships tr ON p.ID = tr.object_id
LEFT JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
LEFT JOIN wp_terms t ON t.term_id = tt.term_id
WHERE p.post_type="post" -- <<< for wordpress post type
AND p.post_status = 'publish'
AND tt.taxonomy = "post_tag" -- <<< for wordpress post tags
AND p.ID IN
(SELECT p.ID FROM wp_posts AS p
LEFT JOIN wp_term_relationships tr ON p.ID = tr.object_id
LEFT JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
LEFT JOIN wp_terms t ON t.term_id = tt.term_id
WHERE p.post_type="post" <<< for wordpress post type
AND p.post_status = 'publish'
AND tt.taxonomy = "category" -- <<< for wordpress post category
AND tt.term_taxonomy_id = @CategoryByID -- <<< search category by id (use one)
-- AND t.name = @CategoryByName -- <<< search category by name (use one)
ORDER BY p.ID)
ORDER BY p.ID
See the example query below for WooCommerce Products:
SET @CategoryByID = 18; -- set correct category ID
-- SET @CategoryByName = 'T-SHIRT'; -- set correct category name
SELECT DISTINCT t.* FROM wp_posts AS p
LEFT JOIN wp_term_relationships tr ON p.ID = tr.object_id
LEFT JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
LEFT JOIN wp_terms t ON t.term_id = tt.term_id
WHERE p.post_type="product" -- <<< for woocommerce post type
AND p.post_status = 'publish'
AND tt.taxonomy = "product_tag" -- <<< for woocommerce tags
AND p.ID IN
(SELECT p.ID FROM wp_posts AS p
LEFT JOIN wp_term_relationships tr ON p.ID = tr.object_id
LEFT JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
LEFT JOIN wp_terms t ON t.term_id = tt.term_id
WHERE p.post_type="product"
AND p.post_status = 'publish'
AND tt.taxonomy = "product_cat" -- <<< for woocommerce products
AND tt.term_taxonomy_id = @CategoryByID -- <<< search category by id (use one)
-- AND t.name = @CategoryByName -- <<< search category by name (use one)
ORDER BY p.ID)
ORDER BY p.ID
|
wordpress
|
{
"language": "en",
"length": 495,
"provenance": "stackexchange_00019.jsonl.gz:407936",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12621"
}
|
[
0.01751708984375,
0.0170135498046875,
-0.0232086181640625,
0.00884246826171875,
0.0421142578125,
-0.031768798828125,
0.06365966796875,
-0.0163421630859375,
0.0229339599609375,
0.022918701171875,
-0.05560302734375,
-0.025054931640625,
-0.0033359527587890625,
-0.019195556640625,
-0.03790283203125,
-0.05419921875,
0.045318603515625,
-0.003490447998046875,
0.042144775390625,
0.0018854141235351562,
0.0196380615234375,
0.02728271484375,
0.0255584716796875,
0.048126220703125,
0.0301971435546875,
-0.03546142578125,
0.004047393798828125,
-0.023284912109375,
0.00954437255859375,
-0.01824951171875,
0.02093505859375,
0.004039764404296875,
0.0046844482421875,
-0.004062652587890625,
0.013641357421875,
-0.0005898475646972656,
-0.003719329833984375,
0.0135345458984375,
0.023895263671875,
-0.00751495361328125,
0.039520263671875,
-0.03472900390625,
0.033477783203125,
0.06231689453125,
0.0002231597900390625,
-0.0218353271484375,
0.031097412109375,
-0.05804443359375,
0.006496429443359375,
-0.056396484375,
0.0289459228515625,
0.0018949508666992188,
0.060455322265625,
-0.05755615234375,
-0.0251617431640625,
0.00966644287109375,
0.01154327392578125,
0.01690673828125,
0.0391845703125,
-0.043365478515625,
-0.0562744140625,
-0.02301025390625,
0.03375244140625,
-0.01030731201171875,
-0.0054168701171875,
0.006130218505859375,
0.021240234375,
0.006378173828125,
-0.03363037109375,
-0.009735107421875,
0.032684326171875,
-0.034149169921875,
0.0087738037109375,
0.0072784423828125,
-0.0289764404296875,
-0.049896240234375,
0.0206451416015625,
-0.0187530517578125,
0.0255279541015625,
-0.01255035400390625,
0.027557373046875,
-0.044158935546875,
-0.0228271484375,
0.006114959716796875,
0.0001653432846069336,
0.00756072998046875,
0.00421142578125,
-0.0021228790283203125,
-0.026123046875,
-0.044586181640625,
-0.017913818359375,
0.013336181640625,
-0.08575439453125,
0.0174407958984375,
-0.0014286041259765625,
-0.036865234375,
0.0053253173828125,
0.043792724609375,
-0.02740478515625,
0.011627197265625,
-0.0189666748046875,
-0.0269317626953125,
0.008544921875,
-0.0423583984375,
0.013092041015625,
0.018798828125,
-0.0170135498046875,
0.03265380859375,
0.06109619140625,
0.0494384765625,
0.0075836181640625,
0.00975799560546875,
-0.0278167724609375,
0.0120697021484375,
-0.034423828125,
0.00731658935546875,
-0.042816162109375,
-0.00894927978515625,
-0.0127105712890625,
-0.0022411346435546875,
0.03472900390625,
0.047515869140625,
0.0118560791015625,
0.00421142578125,
-0.0254974365234375,
0.0005273818969726562,
-0.01397705078125,
-0.07080078125,
-0.019287109375,
-0.005279541015625,
-0.0116119384765625,
0.054443359375,
0.0020294189453125,
-0.0172271728515625,
-0.037506103515625,
-0.0021152496337890625,
-0.0008721351623535156,
-0.0213623046875,
0.028350830078125,
0.00002008676528930664,
-0.0009288787841796875,
-0.003681182861328125,
0.047943115234375,
-0.007480621337890625,
0.03765869140625,
-0.004302978515625,
0.03375244140625,
0.026153564453125,
0.0110626220703125,
0.004245758056640625,
0.0222625732421875,
0.03680419921875,
0.04803466796875,
-0.0095367431640625,
0.004779815673828125,
-0.0256500244140625,
0.029571533203125,
-0.030181884765625,
-0.033721923828125,
-0.045989990234375,
0.0239410400390625,
0.0052337646484375,
0.0254058837890625,
0.0023632049560546875,
0.004978179931640625,
-0.00493621826171875,
-0.0350341796875,
-0.000507354736328125,
0.0267333984375,
-0.0170745849609375,
0.0250091552734375,
-0.01152801513671875,
0.04644775390625,
0.0228729248046875,
0.0044708251953125,
0.02880859375,
-0.0254974365234375,
-0.000995635986328125,
0.018890380859375,
0.0361328125,
-0.00661468505859375,
-0.031463623046875,
0.01526641845703125,
-0.002002716064453125,
-0.04498291015625,
0.0015125274658203125,
0.0207061767578125,
0.07611083984375,
0.02154541015625,
0.03240966796875,
0.026824951171875,
-0.0260009765625,
-0.045196533203125,
0.0396728515625,
0.021392822265625,
-0.0004949569702148438,
-0.05419921875,
0.00788116455078125,
0.0012617111206054688,
-0.0640869140625,
0.03521728515625,
0.002239227294921875,
0.0009007453918457031,
0.0220947265625,
-0.01495361328125,
0.01178741455078125,
-0.0094451904296875,
0.012420654296875,
0.011383056640625,
0.02001953125,
0.01161956787109375,
-0.0047454833984375,
-0.0298919677734375,
-0.0016965866088867188,
-0.012115478515625,
0.03033447265625,
-0.03619384765625,
-0.0261993408203125,
-0.01384735107421875,
-0.0205841064453125,
0.004169464111328125,
-0.0040740966796875,
-0.0005640983581542969,
0.039794921875,
0.00843048095703125,
0.0186614990234375,
-0.033843994140625,
0.0004324913024902344,
-0.0273895263671875,
0.04730224609375,
-0.07171630859375,
0.0042724609375,
0.040008544921875,
0.07440185546875,
-0.01531219482421875,
-0.003658294677734375,
0.019134521484375,
0.0027370452880859375,
0.0065460205078125,
0.01453399658203125,
0.026702880859375,
0.01947021484375,
-0.012725830078125,
-0.011444091796875,
0.060211181640625,
-0.05810546875,
-0.01611328125,
0.011993408203125,
0.0279998779296875,
0.0083465576171875,
0.01546478271484375,
-0.0115203857421875,
0.04266357421875,
0.019317626953125,
0.055084228515625,
0.015716552734375,
0.0019426345825195312,
0.01062774658203125,
-0.036712646484375,
0.00007140636444091797,
0.019500732421875,
0.00791168212890625,
-0.048980712890625,
0.01513671875,
0.057373046875,
0.007480621337890625,
0.032806396484375,
0.025482177734375,
-0.034698486328125,
0.0167236328125,
0.0120086669921875,
-0.0092315673828125,
0.00823974609375,
0.055999755859375,
-0.00543975830078125,
0.0008411407470703125,
-0.007518768310546875,
-0.00923919677734375,
-0.0196380615234375,
0.021484375,
0.01025390625,
0.059326171875,
0.009613037109375,
-0.015472412109375,
-0.0088653564453125,
-0.0709228515625,
-0.006084442138671875,
0.01506805419921875,
-0.03973388671875,
0.0273895263671875,
0.0307464599609375,
0.033599853515625,
-0.0037784576416015625,
-0.0015878677368164062,
0.00029921531677246094,
0.0238037109375,
-0.0215606689453125,
-0.038482666015625,
0.03533935546875,
-0.028961181640625,
0.0298309326171875,
0.075439453125,
0.0085906982421875,
0.0165557861328125,
0.023162841796875,
-0.008514404296875,
0.044769287109375,
0.005100250244140625,
-0.01103973388671875,
0.03643798828125,
-0.0882568359375,
-0.01001739501953125,
0.0227813720703125,
0.0347900390625,
-0.03076171875,
-0.04766845703125,
-0.03271484375,
0.004795074462890625,
-0.08197021484375,
-0.040496826171875,
0.0306243896484375,
-0.025146484375,
-0.015594482421875,
-0.0260772705078125,
-0.0167694091796875,
-0.005069732666015625,
-0.03375244140625,
-0.007843017578125,
0.0155792236328125,
-0.0191497802734375,
-0.060333251953125,
-0.02734375,
-0.06427001953125,
-0.00485992431640625,
-0.015716552734375,
-0.007007598876953125,
0.00942230224609375,
0.097900390625,
0.01483154296875,
-0.0718994140625,
0.00688934326171875,
-0.00551605224609375,
-0.0303497314453125,
0.031982421875,
0.019256591796875,
-0.0299072265625,
0.0124664306640625,
0.005031585693359375,
-0.030975341796875,
0.031402587890625,
-0.016326904296875,
-0.0065460205078125,
-0.016571044921875,
-0.0018224716186523438,
0.00970458984375,
0.002899169921875,
0.01165771484375,
0.0384521484375,
0.031951904296875,
-0.005527496337890625,
0.01155853271484375,
-0.00943756103515625,
-0.00925445556640625,
0.0184326171875,
-0.00533294677734375,
-0.01039886474609375,
-0.004444122314453125,
0.0213775634765625,
0.017059326171875,
0.0128021240234375,
-0.0033817291259765625,
-0.0293731689453125,
0.0394287109375,
0.005268096923828125,
0.031890869140625,
-0.01007843017578125,
-0.003948211669921875,
-0.041473388671875,
0.04656982421875,
-0.00748443603515625,
-0.017486572265625,
-0.00803375244140625,
0.01235198974609375,
-0.01116943359375,
-0.06243896484375,
0.047882080078125,
-0.0150299072265625,
-0.01434326171875,
-0.031280517578125,
-0.034576416015625,
0.004352569580078125,
0.09283447265625,
0.00005424022674560547,
-0.0265655517578125,
-0.018096923828125,
0.005161285400390625,
-0.00228118896484375,
-0.0184783935546875,
-0.01153564453125,
-0.0213470458984375,
-0.08984375,
0.015777587890625,
-0.0249786376953125,
-0.0187225341796875,
-0.0283050537109375,
0.003124237060546875,
-0.04296875,
-0.040435791015625,
0.046295166015625,
-0.047760009765625,
0.02392578125,
-0.01922607421875,
0.017059326171875,
-0.05322265625,
-0.0296630859375,
-0.00618743896484375,
-0.019744873046875,
0.00289154052734375,
-0.04449462890625,
0.0060882568359375,
0.0341796875,
-0.023468017578125,
0.010986328125,
0.0343017578125,
0.0286865234375,
0.018798828125,
0.0233154296875,
0.0110931396484375,
-0.0062255859375,
-0.035308837890625,
0.00339508056640625,
-0.055389404296875,
-0.023223876953125,
-0.036529541015625,
-0.005771636962890625,
0.0248565673828125,
-0.0208740234375,
0.037445068359375,
-0.0216522216796875,
0.00545501708984375,
-0.041717529296875,
-0.0184173583984375,
-0.0172576904296875,
-0.01212310791015625,
-0.0269012451171875,
-0.011749267578125,
-0.00041675567626953125,
-0.036865234375,
0.05126953125,
0.033355712890625,
-0.0161895751953125,
-0.0014925003051757812,
0.059356689453125,
0.0078887939453125,
-0.046539306640625,
-0.062469482421875,
-0.0006318092346191406,
0.0440673828125,
-0.00791168212890625,
0.06414794921875,
0.040374755859375,
-0.039703369140625,
0.09429931640625,
0.025390625,
-0.0016260147094726562,
-0.027191162109375,
0.07513427734375,
-0.016082763671875,
-0.0166778564453125,
0.0127716064453125,
-0.026397705078125,
0.02288818359375,
0.037841796875,
-0.0092926025390625,
-0.020751953125,
0.01113128662109375,
0.042724609375,
-0.02496337890625,
0.007598876953125,
-0.0255584716796875,
-0.0029315948486328125,
0.00534820556640625,
0.022216796875,
0.03424072265625,
0.04693603515625,
-0.0166473388671875,
0.016754150390625,
0.0166168212890625,
0.004894256591796875,
-0.05035400390625,
-0.018585205078125,
-0.0181121826171875,
0.0268707275390625,
-0.040283203125,
-0.0140533447265625,
-0.0269927978515625,
-0.0009479522705078125,
0.01245880126953125,
-0.0284881591796875,
-0.076171875,
0.029327392578125,
-0.01177215576171875,
0.00799560546875,
0.05133056640625,
-0.00844573974609375,
0.0129852294921875,
0.0116424560546875,
0.00433349609375,
0.0124664306640625,
-0.0340576171875,
-0.0097198486328125,
-0.0266571044921875,
0.01120758056640625,
0.0009822845458984375,
-0.01030731201171875,
0.0272979736328125,
0.034881591796875,
-0.05657958984375,
0.046051025390625,
0.006893157958984375,
0.004852294921875,
-0.0031986236572265625,
0.006122589111328125,
0.02203369140625,
0.00196075439453125,
0.01297760009765625,
-0.04620361328125,
0.020111083984375,
-0.04083251953125,
-0.008880615234375,
0.016204833984375,
0.038665771484375,
-0.0016469955444335938,
-0.030120849609375,
0.0238189697265625,
-0.0018177032470703125,
-0.006381988525390625,
0.0278167724609375,
-0.023529052734375,
-0.0262298583984375,
-0.044677734375,
-0.033477783203125,
0.0237579345703125,
-0.005504608154296875,
-0.01418304443359375,
0.0272674560546875,
-0.007068634033203125,
0.0273284912109375,
-0.00955963134765625,
0.0007610321044921875,
0.01042938232421875,
0.0165557861328125,
-0.061859130859375,
-0.0267791748046875,
-0.005191802978515625,
-0.0318603515625,
-0.00716400146484375,
-0.00946807861328125,
-0.0282135009765625,
0.0394287109375,
-0.01221466064453125,
0.046600341796875,
-0.0146636962890625,
-0.036102294921875,
0.01285552978515625,
-0.0196075439453125,
0.08062744140625,
0.05389404296875,
-0.06927490234375,
0.003589630126953125,
-0.043701171875,
-0.004711151123046875,
-0.021697998046875,
-0.0626220703125,
-0.037384033203125,
-0.02764892578125,
0.044464111328125,
0.0134735107421875,
0.031585693359375,
-0.0068206787109375,
-0.011962890625,
0.009124755859375,
0.0278167724609375,
0.0141448974609375,
0.0079193115234375,
0.019927978515625,
-0.00565338134765625,
0.01580810546875,
-0.003017425537109375,
-0.0036182403564453125,
-0.018035888671875,
-0.01502227783203125,
0.0005469322204589844,
-0.06610107421875,
-0.037322998046875,
0.01093292236328125,
-0.07025146484375,
0.0135498046875,
0.036529541015625,
0.004909515380859375,
0.0300750732421875,
-0.0249786376953125,
0.0009026527404785156,
-0.00592041015625,
0.0248565673828125,
-0.0167388916015625,
-0.0010061264038085938,
0.07305908203125,
0.01165008544921875,
0.01314544677734375,
-0.00820159912109375,
-0.0268707275390625,
0.0286407470703125,
0.006622314453125,
0.033599853515625,
-0.0242919921875,
-0.00589752197265625,
0.017303466796875,
0.018707275390625,
-0.000774383544921875,
0.0003581047058105469,
0.01253509521484375,
-0.004428863525390625,
-0.040985107421875,
0.01190185546875,
-0.0230865478515625,
-0.041168212890625,
0.01276397705078125,
0.0023040771484375,
0.00809478759765625,
0.0382080078125,
-0.01082611083984375,
-0.05828857421875,
0.0244293212890625,
0.0182647705078125,
-0.0292816162109375,
0.0036182403564453125,
0.04974365234375,
0.02337646484375,
-0.06695556640625,
0.0341796875,
-0.046356201171875,
-0.0533447265625,
-0.0157012939453125,
-0.02587890625,
-0.0289459228515625,
-0.016845703125,
0.01221466064453125,
0.006092071533203125,
-0.0001729726791381836,
0.058349609375,
0.01117706298828125,
-0.0107574462890625,
-0.03179931640625,
0.0083465576171875,
0.00917816162109375,
-0.039337158203125,
0.012603759765625,
-0.0132293701171875,
0.0010328292846679688,
-0.031494140625,
0.036468505859375,
0.01788330078125,
0.02288818359375,
-0.00646209716796875,
-0.0193328857421875,
-0.01451873779296875,
0.034149169921875,
-0.02825927734375,
0.0236663818359375,
0.006549835205078125,
-0.057708740234375,
-0.044403076171875,
-0.00812530517578125,
-0.007450103759765625,
0.03204345703125,
0.028717041015625,
0.0186614990234375,
0.000667572021484375,
-0.01419830322265625,
-0.01178741455078125,
-0.01113128662109375,
0.061309814453125,
-0.025604248046875,
-0.0165557861328125,
0.0260009765625,
0.04620361328125,
0.002593994140625,
0.00753021240234375,
-0.016754150390625,
0.0071563720703125,
0.05157470703125,
-0.014556884765625,
0.021484375,
0.008209228515625,
-0.0035915374755859375,
-0.05120849609375,
0.0751953125,
-0.00258636474609375,
0.028411865234375,
0.044158935546875,
0.0178680419921875,
-0.0404052734375,
-0.00431060791015625,
-0.06378173828125,
0.07342529296875,
0.05224609375,
0.045684814453125,
-0.040802001953125,
-0.007358551025390625,
0.0177001953125,
0.03448486328125,
0.01219940185546875,
-0.01134490966796875,
-0.00487518310546875,
-0.0146026611328125,
0.02947998046875,
0.044586181640625,
0.006824493408203125,
0.0042877197265625,
0.005970001220703125,
-0.0006260871887207031,
0.03851318359375,
-0.03240966796875,
0.04193115234375,
-0.044952392578125,
0.0195770263671875,
0.01232147216796875,
0.017059326171875,
0.038330078125,
-0.00458526611328125,
-0.0282440185546875,
-0.0147247314453125,
0.0031414031982421875,
0.005016326904296875,
-0.0152587890625,
0.0160369873046875,
0.0277099609375,
0.05950927734375,
-0.093017578125,
-0.015838623046875,
-0.0283355712890625,
0.0574951171875,
-0.0007686614990234375,
0.037322998046875,
-0.0030727386474609375,
0.0053863525390625,
0.060089111328125,
-0.00997161865234375,
0.00968170166015625,
0.01554107666015625,
-0.01239013671875,
0.046966552734375,
0.017120361328125,
0.0188751220703125,
-0.06561279296875,
-0.031280517578125,
0.05462646484375,
0.05914306640625,
-0.0303955078125,
-0.06427001953125,
0.004016876220703125,
0.016693115234375,
0.00983428955078125,
0.032958984375,
0.01517486572265625,
0.032867431640625,
0.07891845703125,
-0.0452880859375,
-0.011016845703125,
0.02032470703125,
0.053070068359375,
0.018463134765625,
-0.008636474609375,
-0.03240966796875,
-0.03985595703125,
-0.06402587890625,
0.027099609375,
0.018524169921875,
0.059783935546875,
0.026092529296875,
0.0531005859375,
-0.0038585662841796875,
-0.035400390625,
-0.004360198974609375,
0.01568603515625,
0.0302581787109375,
-0.00911712646484375,
-0.0107574462890625,
-0.0147552490234375,
0.0182037353515625,
0.01922607421875,
0.0298614501953125,
-0.0206451416015625,
0.029205322265625,
0.0438232421875,
-0.0150146484375,
-0.01116943359375,
0.03656005859375,
-0.003444671630859375,
0.0175933837890625,
-0.0494384765625,
0.005405426025390625,
0.031341552734375,
-0.00533294677734375,
0.0283966064453125,
-0.024078369140625,
0.0762939453125,
-0.0228271484375,
0.038330078125,
-0.006191253662109375,
-0.0046844482421875,
0.036895751953125,
-0.02215576171875,
0.01357269287109375,
-0.0133209228515625,
-0.11737060546875,
-0.00289154052734375,
-0.0938720703125,
-0.02459716796875,
0.056182861328125,
0.035369873046875,
-0.033477783203125,
0.032012939453125,
-0.0062255859375,
-0.0272064208984375,
0.040252685546875,
0.0020618438720703125,
0.004482269287109375,
0.0168304443359375,
0.0015039443969726562,
-0.01806640625,
-0.037811279296875,
-0.0167694091796875,
0.0006246566772460938,
0.0194091796875,
0.018768310546875,
-0.005340576171875,
0.0386962890625,
0.02252197265625,
-0.018402099609375,
0.0313720703125,
-0.045074462890625,
-0.03228759765625,
0.045562744140625,
0.0024547576904296875,
-0.0039043426513671875,
-0.00858306884765625,
-0.017791748046875,
0.01320648193359375,
0.0311126708984375,
-0.05426025390625,
0.0227203369140625,
-0.01027679443359375,
-0.0016078948974609375,
-0.043731689453125,
0.041656494140625,
-0.00930023193359375,
-0.012847900390625,
-0.034820556640625,
-0.0212554931640625,
0.0310211181640625,
0.053802490234375,
0.0262298583984375,
0.0299530029296875,
-0.0174407958984375,
0.0040283203125,
-0.0269317626953125,
0.01171875,
-0.054718017578125,
0.02783203125,
-0.01131439208984375,
0.0011930465698242188,
0.0511474609375,
-0.0081939697265625,
0.023284912109375,
0.01226806640625,
0.013580322265625,
0.04290771484375,
-0.051727294921875,
-0.0209503173828125,
0.0218658447265625,
0.060211181640625,
-0.0022373199462890625,
0.042266845703125,
-0.039306640625,
0.00788116455078125,
0.0020885467529296875,
-0.0306396484375,
-0.04156494140625,
-0.026458740234375,
-0.01438140869140625,
0.0157470703125,
-0.0151214599609375,
-0.057830810546875,
-0.08221435546875,
-0.0176849365234375,
0.020233154296875,
-0.0224151611328125,
0.0088653564453125,
-0.01078033447265625,
-0.0374755859375,
0.021759033203125,
-0.027252197265625,
-0.018402099609375,
0.0234222412109375,
0.0308074951171875,
-0.045684814453125,
-0.0020771026611328125,
-0.01146697998046875,
-0.01517486572265625,
-0.00611114501953125,
0.0279541015625,
0.025390625,
-0.051055908203125,
-0.0010347366333007812,
0.067138671875,
0.054473876953125,
0.111328125,
0.02362060546875,
0.0074462890625,
-0.014190673828125,
0.0240478515625,
-0.0611572265625,
-0.039703369140625,
0.05224609375,
-0.0182647705078125,
-0.046112060546875,
-0.00244903564453125,
-0.0015459060668945312,
0.0161590576171875,
-0.043304443359375,
-0.13818359375,
0.0870361328125,
-0.046875,
-0.0445556640625,
-0.03717041015625,
0.0263214111328125,
0.00917816162109375,
-0.035186767578125,
-0.0185546875,
-0.00787353515625,
-0.01544952392578125,
0.017425537109375,
0.0355224609375,
0.018646240234375,
0.046051025390625,
-0.001987457275390625,
-0.042388916015625,
0.004375457763671875,
-0.01479339599609375,
0.0311126708984375,
-0.007904052734375,
-0.0199127197265625,
0.022003173828125,
0.036712646484375,
-0.038604736328125,
-0.06597900390625,
-0.0085296630859375,
0.0243072509765625,
0.0352783203125,
-0.0135345458984375,
-0.036651611328125,
-0.05535888671875,
0.0016908645629882812,
-0.0271759033203125,
0.0160369873046875,
0.02154541015625,
-0.030487060546875,
-0.03314208984375,
-0.024749755859375,
0.0110931396484375,
0.0112457275390625,
-0.0236968994140625,
0.044281005859375,
0.0097503662109375,
-0.024505615234375,
0.0201873779296875,
-0.02374267578125,
-0.05523681640625,
0.00469970703125,
-0.04302978515625,
0.00791168212890625,
-0.0677490234375,
0.045684814453125,
-0.02459716796875,
-0.0171661376953125,
-0.031097412109375,
-0.0225677490234375,
-0.0078125,
-0.03826904296875,
-0.044189453125,
0.0002608299255371094,
-0.0166473388671875,
0.0229339599609375,
0.0199737548828125,
0.0282135009765625,
0.00333404541015625,
0.029998779296875,
0.00832366943359375,
-0.03680419921875,
0.035736083984375,
0.0321044921875,
0.042999267578125,
-0.035614013671875,
0.0250701904296875,
0.0310516357421875,
0.032806396484375,
0.0005602836608886719,
0.03399658203125,
-0.00860595703125,
0.06280517578125,
0.0009202957153320312,
-0.040008544921875,
0.0171356201171875,
-0.04193115234375,
-0.0055694580078125,
0.01219940185546875,
0.005451202392578125,
-0.022552490234375,
0.0260467529296875,
0.012603759765625,
-0.0036640167236328125,
0.023284912109375
] |
fecdcc3c5564c241969bc9ee32dca5b323ce5962
|
Wordpress Stackexchange
Q: Enable page templates. How? Basic question, but I want to enable page templates. I have one theme which has page templates enabled. I switched to another but there is no option to change the template, even when creating a new page. How do I switch this option on?
I've had a root around on the Codex and forum but can't find it.
A: Chances are that the theme you've switched to has no page templates defined - they exist on a per theme basis.
Here's the Codex reference: https://wordpress.org/support/article/pages/
|
Q: Enable page templates. How? Basic question, but I want to enable page templates. I have one theme which has page templates enabled. I switched to another but there is no option to change the template, even when creating a new page. How do I switch this option on?
I've had a root around on the Codex and forum but can't find it.
A: Chances are that the theme you've switched to has no page templates defined - they exist on a per theme basis.
Here's the Codex reference: https://wordpress.org/support/article/pages/
A: Define your template name in the custom template file.
<?php
/*
Template Name: demo
*/
?>
After this the select template option will be available on the edit screen. You can choose the desired name you want.
A: There is another reason why you may not see the Page Template dropdown fiels in your page editor. If you are creating a global page template (one that can be used for any page, you need to ensure that you do not name of your template file with the page- prefix, else WP interpret this as a special template for use on page slugs matching the rest of the name.
From the page template codex:
Important! Do not use page- as a prefix, as WordPress will interpret
the file as a specialized template, meant to apply to only one page on
your site.
and finally make sure you insert the following comment at the top of the page:
/* Template Name: Name-of-your-template */
A: Allow page template support to you theme by adding this function in your functions.php file:
function is_page_template( $template = '' ) {
$page_template = get_page_template_slug( get_queried_object_id() );
if ( empty( $template ) )
return (bool) $page_template;
if ( $template == $page_template )
return true;
if ( is_array( $template ) ) {
if ( ( in_array( 'default', $template, true ) && ! $page_template )
|| in_array( $page_template, $template, true )
) {
return true;
}
}
return ( 'default' === $template && ! $page_template );
}
|
wordpress
|
{
"language": "en",
"length": 338,
"provenance": "stackexchange_00019.jsonl.gz:407939",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12631"
}
|
[
0.0026912689208984375,
-0.04022216796875,
0.0087432861328125,
0.0167236328125,
-0.03570556640625,
-0.0265960693359375,
0.040374755859375,
-0.0103302001953125,
-0.0024700164794921875,
0.01166534423828125,
-0.016387939453125,
0.00007051229476928711,
0.00223541259765625,
-0.0204315185546875,
0.01154327392578125,
-0.029327392578125,
0.04705810546875,
-0.035064697265625,
-0.00829315185546875,
-0.0302886962890625,
0.01702880859375,
0.0018644332885742188,
-0.00975799560546875,
0.11175537109375,
0.03704833984375,
-0.007099151611328125,
-0.01129150390625,
0.00009566545486450195,
0.0149993896484375,
0.00400543212890625,
0.02471923828125,
-0.01003265380859375,
0.006343841552734375,
0.020416259765625,
-0.020355224609375,
-0.06744384765625,
-0.0182037353515625,
0.01145172119140625,
-0.006870269775390625,
0.013580322265625,
0.0188140869140625,
-0.0049896240234375,
0.0316162109375,
0.005023956298828125,
0.00872802734375,
-0.02587890625,
0.019500732421875,
-0.06689453125,
0.0169219970703125,
-0.00817108154296875,
-0.01372528076171875,
-0.0164794921875,
0.0053253173828125,
0.0005645751953125,
-0.0253448486328125,
-0.049560546875,
0.0115966796875,
-0.0016374588012695312,
0.0213775634765625,
-0.0183868408203125,
-0.017486572265625,
0.0226593017578125,
0.00939178466796875,
0.01861572265625,
0.0091705322265625,
-0.018585205078125,
-0.0426025390625,
0.0335693359375,
-0.042205810546875,
0.013519287109375,
0.0404052734375,
-0.05010986328125,
0.01229095458984375,
-0.0211944580078125,
0.0283966064453125,
-0.0021877288818359375,
-0.01378631591796875,
-0.003265380859375,
0.016998291015625,
0.00991058349609375,
0.016937255859375,
0.003322601318359375,
-0.00701904296875,
-0.052490234375,
0.037139892578125,
-0.008880615234375,
-0.0068511962890625,
-0.01468658447265625,
-0.0252532958984375,
0.007389068603515625,
-0.02337646484375,
0.0015039443969726562,
0.003692626953125,
0.01313018798828125,
-0.0221099853515625,
0.006511688232421875,
-0.0009860992431640625,
0.04888916015625,
-0.00434112548828125,
0.0101318359375,
-0.007904052734375,
-0.03753662109375,
0.040679931640625,
-0.039154052734375,
-0.014007568359375,
0.01690673828125,
0.00724029541015625,
0.00225067138671875,
0.0165557861328125,
0.03271484375,
-0.01358795166015625,
0.01291656494140625,
0.01045989990234375,
-0.00814056396484375,
-0.037750244140625,
-0.00394439697265625,
-0.0207366943359375,
-0.0012254714965820312,
0.002017974853515625,
-0.01367950439453125,
0.035980224609375,
0.051910400390625,
0.006500244140625,
-0.0079803466796875,
-0.027069091796875,
-0.002880096435546875,
-0.01739501953125,
-0.068603515625,
0.00782012939453125,
-0.005954742431640625,
-0.0230560302734375,
-0.005168914794921875,
0.05419921875,
0.06890869140625,
0.034454345703125,
-0.0163421630859375,
0.031982421875,
-0.01461029052734375,
0.0020160675048828125,
0.01001739501953125,
-0.0073699951171875,
-0.03363037109375,
-0.00334930419921875,
-0.0023593902587890625,
0.0160369873046875,
-0.0011186599731445312,
0.0185699462890625,
0.04876708984375,
0.00662994384765625,
-0.0286712646484375,
0.0256805419921875,
0.0161895751953125,
-0.01535797119140625,
0.0182647705078125,
0.050628662109375,
-0.03936767578125,
-0.0243682861328125,
-0.008270263671875,
0.055999755859375,
0.004913330078125,
-0.009429931640625,
0.01371002197265625,
0.039459228515625,
-0.01303863525390625,
-0.0190582275390625,
-0.01800537109375,
-0.0154876708984375,
-0.0009908676147460938,
0.00846099853515625,
0.02764892578125,
-0.00681304931640625,
-0.0111846923828125,
-0.019989013671875,
-0.0011892318725585938,
-0.0022792816162109375,
0.0051116943359375,
-0.00713348388671875,
-0.019134521484375,
0.0206146240234375,
0.01491546630859375,
-0.003971099853515625,
-0.018463134765625,
-0.0012454986572265625,
0.0220489501953125,
-0.046142578125,
0.0262908935546875,
0.01018524169921875,
0.0305938720703125,
0.0004849433898925781,
0.010589599609375,
0.025665283203125,
0.035736083984375,
-0.0193939208984375,
0.051605224609375,
0.037322998046875,
-0.04248046875,
-0.03564453125,
-0.01117706298828125,
0.0081024169921875,
-0.06512451171875,
0.0179290771484375,
-0.0135955810546875,
-0.01001739501953125,
0.0007772445678710938,
-0.0245208740234375,
-0.039764404296875,
-0.004550933837890625,
0.0084991455078125,
0.03033447265625,
0.01061248779296875,
-0.00516510009765625,
-0.0302276611328125,
0.00740814208984375,
-0.0457763671875,
-0.06439208984375,
-0.0106353759765625,
0.0005474090576171875,
0.01383209228515625,
0.0212554931640625,
-0.001537322998046875,
0.0303192138671875,
0.0084991455078125,
0.0230560302734375,
0.03704833984375,
0.00504302978515625,
-0.022705078125,
-0.0364990234375,
-0.0284271240234375,
-0.0438232421875,
0.0027256011962890625,
-0.041229248046875,
0.057952880859375,
-0.039642333984375,
-0.02227783203125,
-0.024871826171875,
0.0151519775390625,
0.0252532958984375,
0.013946533203125,
0.00832366943359375,
0.0194549560546875,
0.0325927734375,
0.0310516357421875,
0.006103515625,
0.005886077880859375,
0.04443359375,
-0.00128936767578125,
0.0222015380859375,
-0.005619049072265625,
0.036529541015625,
0.0307769775390625,
0.037445068359375,
-0.013458251953125,
0.018218994140625,
-0.0083465576171875,
0.0241851806640625,
0.0038204193115234375,
-0.024566650390625,
0.02276611328125,
0.005474090576171875,
0.016693115234375,
-0.0223541259765625,
0.02423095703125,
0.041778564453125,
-0.0231475830078125,
0.01763916015625,
0.010711669921875,
0.0202789306640625,
0.01122283935546875,
-0.0115966796875,
0.01259613037109375,
0.005382537841796875,
-0.053253173828125,
0.016021728515625,
0.026214599609375,
0.0178375244140625,
0.043121337890625,
-0.026458740234375,
-0.0251312255859375,
0.03814697265625,
0.0283355712890625,
-0.01275634765625,
-0.00794219970703125,
-0.06463623046875,
-0.00640869140625,
0.0034961700439453125,
-0.07373046875,
-0.010986328125,
0.060699462890625,
-0.0258026123046875,
-0.011199951171875,
0.011749267578125,
0.03497314453125,
-0.026763916015625,
0.01332855224609375,
-0.01548004150390625,
-0.0016956329345703125,
0.0528564453125,
-0.070556640625,
0.054107666015625,
-0.044189453125,
0.04266357421875,
0.06396484375,
-0.019378662109375,
0.0181121826171875,
0.023590087890625,
-0.0013971328735351562,
0.081298828125,
-0.0018625259399414062,
0.008514404296875,
-0.004978179931640625,
-0.002838134765625,
0.00710296630859375,
0.011138916015625,
0.02423095703125,
-0.034210205078125,
-0.02435302734375,
-0.0262451171875,
-0.0020427703857421875,
-0.041290283203125,
-0.01088714599609375,
-0.020355224609375,
-0.0638427734375,
-0.01177978515625,
-0.00787353515625,
-0.0367431640625,
-0.006366729736328125,
0.01422119140625,
0.00830841064453125,
-0.0007696151733398438,
-0.0478515625,
-0.0380859375,
-0.0540771484375,
-0.0562744140625,
-0.0474853515625,
0.004180908203125,
-0.00669097900390625,
-0.006137847900390625,
0.0596923828125,
-0.01412200927734375,
-0.0679931640625,
-0.01259613037109375,
-0.02642822265625,
-0.0040283203125,
0.0147552490234375,
0.016754150390625,
-0.01322174072265625,
0.04205322265625,
0.007080078125,
-0.0035953521728515625,
0.035888671875,
-0.01271820068359375,
-0.028839111328125,
-0.037750244140625,
-0.0240478515625,
-0.046417236328125,
0.00817108154296875,
0.059295654296875,
-0.05194091796875,
-0.043365478515625,
-0.06488037109375,
-0.076416015625,
-0.002384185791015625,
-0.08343505859375,
0.0290374755859375,
0.06317138671875,
0.01055145263671875,
-0.0239410400390625,
0.019775390625,
0.00020897388458251953,
-0.01451873779296875,
0.006053924560546875,
-0.026275634765625,
0.0478515625,
-0.006198883056640625,
0.0018739700317382812,
-0.0094146728515625,
-0.0048828125,
-0.03814697265625,
0.024261474609375,
-0.01401519775390625,
-0.006328582763671875,
-0.034210205078125,
0.030517578125,
-0.035736083984375,
-0.07965087890625,
0.055908203125,
-0.0438232421875,
-0.0174407958984375,
-0.0103302001953125,
-0.01371002197265625,
0.045440673828125,
0.113525390625,
-0.0411376953125,
-0.030426025390625,
-0.00775146484375,
0.01470184326171875,
-0.00583648681640625,
-0.022125244140625,
0.005523681640625,
-0.031524658203125,
-0.029998779296875,
0.015838623046875,
-0.02032470703125,
-0.0151214599609375,
-0.01345062255859375,
-0.0284423828125,
-0.0013713836669921875,
-0.0264739990234375,
0.0269775390625,
0.0150604248046875,
-0.03057861328125,
0.057464599609375,
-0.064453125,
0.030548095703125,
-0.04400634765625,
0.0106353759765625,
-0.0595703125,
-0.01226043701171875,
-0.0132293701171875,
0.0310821533203125,
0.041168212890625,
-0.058990478515625,
0.007640838623046875,
0.035400390625,
0.0294952392578125,
-0.004119873046875,
0.0261383056640625,
0.006256103515625,
0.023773193359375,
-0.0303802490234375,
0.005733489990234375,
-0.04559326171875,
0.00357818603515625,
0.01180267333984375,
-0.0272216796875,
0.06011962890625,
-0.0102081298828125,
0.02850341796875,
0.02880859375,
-0.0439453125,
-0.041107177734375,
-0.0157623291015625,
-0.0321044921875,
-0.0034084320068359375,
0.0009937286376953125,
-0.0255279541015625,
-0.0177001953125,
-0.051055908203125,
0.03900146484375,
0.01221466064453125,
-0.01325225830078125,
-0.00373077392578125,
0.0552978515625,
0.0216217041015625,
-0.0360107421875,
-0.00511932373046875,
0.0282135009765625,
0.03704833984375,
0.060089111328125,
0.0140533447265625,
-0.0017995834350585938,
-0.01239776611328125,
0.0155792236328125,
0.033416748046875,
-0.03900146484375,
-0.0297088623046875,
0.060302734375,
-0.006862640380859375,
-0.0288848876953125,
0.0115203857421875,
-0.035675048828125,
0.060211181640625,
0.031707763671875,
-0.01241302490234375,
-0.005733489990234375,
-0.011383056640625,
0.038665771484375,
0.00020682811737060547,
-0.0152435302734375,
-0.0533447265625,
-0.0072784423828125,
-0.004894256591796875,
0.018646240234375,
0.041229248046875,
0.033203125,
-0.0017747879028320312,
0.019561767578125,
0.01953125,
-0.0023670196533203125,
0.01532745361328125,
0.035888671875,
-0.0156402587890625,
0.027496337890625,
0.01265716552734375,
-0.01715087890625,
-0.018310546875,
-0.00461578369140625,
0.027557373046875,
-0.0088958740234375,
-0.057952880859375,
-0.0131072998046875,
-0.009033203125,
0.0201873779296875,
0.036773681640625,
-0.0082855224609375,
0.0341796875,
0.00899505615234375,
-0.01465606689453125,
-0.006778717041015625,
-0.0247802734375,
-0.0162811279296875,
-0.05181884765625,
0.0014295578002929688,
0.0102081298828125,
-0.0114593505859375,
0.03997802734375,
0.011993408203125,
0.0163726806640625,
0.003021240234375,
-0.0218048095703125,
0.00853729248046875,
0.007656097412109375,
0.006683349609375,
0.01177215576171875,
0.0257568359375,
-0.02044677734375,
-0.017303466796875,
0.001964569091796875,
-0.03948974609375,
-0.044708251953125,
0.0199737548828125,
0.06060791015625,
-0.007381439208984375,
-0.0019483566284179688,
0.01418304443359375,
-0.01094818115234375,
-0.0020008087158203125,
0.015228271484375,
-0.01273345947265625,
-0.0404052734375,
-0.0221099853515625,
0.01287078857421875,
0.0200347900390625,
-0.01174163818359375,
-0.0192718505859375,
0.02880859375,
-0.036956787109375,
0.0221099853515625,
0.04156494140625,
-0.0242156982421875,
-0.00965118408203125,
-0.0097503662109375,
-0.0230712890625,
-0.0271453857421875,
0.00251007080078125,
-0.08428955078125,
-0.0271453857421875,
-0.00885009765625,
0.013824462890625,
0.0195770263671875,
-0.011749267578125,
0.0175933837890625,
0.00499725341796875,
-0.021331787109375,
0.02947998046875,
0.0167694091796875,
0.0203094482421875,
-0.0274810791015625,
-0.06756591796875,
-0.0100250244140625,
-0.07415771484375,
-0.0227508544921875,
-0.07525634765625,
-0.04327392578125,
-0.061004638671875,
0.027008056640625,
-0.004840850830078125,
0.021820068359375,
-0.0196380615234375,
-0.01506805419921875,
-0.006473541259765625,
0.02532958984375,
0.00786590576171875,
0.05950927734375,
-0.01490020751953125,
0.0718994140625,
-0.022186279296875,
0.055572509765625,
-0.00003927946090698242,
0.017333984375,
-0.022857666015625,
-0.01983642578125,
0.01357269287109375,
-0.031494140625,
-0.0164337158203125,
0.0040130615234375,
-0.07147216796875,
0.0192718505859375,
0.092041015625,
0.0111083984375,
0.00965118408203125,
-0.050872802734375,
0.012542724609375,
-0.0303192138671875,
0.04937744140625,
-0.08953857421875,
-0.047637939453125,
0.0177764892578125,
0.006893157958984375,
0.022308349609375,
0.002269744873046875,
-0.0287017822265625,
0.0210723876953125,
0.01212310791015625,
0.025299072265625,
-0.01480865478515625,
-0.040985107421875,
0.047821044921875,
0.024871826171875,
-0.00807952880859375,
0.01751708984375,
0.00010991096496582031,
0.004062652587890625,
-0.01171875,
0.01776123046875,
-0.0306549072265625,
-0.0158233642578125,
0.012664794921875,
0.0010776519775390625,
-0.0078582763671875,
0.0085601806640625,
-0.011077880859375,
0.015838623046875,
0.09710693359375,
0.075439453125,
-0.13623046875,
0.0057830810546875,
0.0069732666015625,
0.01490020751953125,
0.039764404296875,
-0.01354217529296875,
-0.0197906494140625,
-0.0631103515625,
0.04364013671875,
-0.0024204254150390625,
-0.01515960693359375,
0.00252532958984375,
-0.0078582763671875,
-0.03546142578125,
-0.0252532958984375,
0.0631103515625,
0.025482177734375,
-0.0210723876953125,
0.0552978515625,
-0.01230621337890625,
0.04058837890625,
-0.0024871826171875,
0.003082275390625,
-0.01468658447265625,
-0.0160675048828125,
-0.0013904571533203125,
0.044036865234375,
-0.046478271484375,
0.01334381103515625,
0.01904296875,
0.02227783203125,
-0.02020263671875,
0.03973388671875,
-0.0225372314453125,
0.032562255859375,
0.01146697998046875,
-0.031005859375,
-0.01438140869140625,
-0.01146697998046875,
0.001964569091796875,
0.005870819091796875,
-0.0106658935546875,
0.01009368896484375,
-0.0198974609375,
-0.01305389404296875,
-0.040985107421875,
-0.0029163360595703125,
0.090576171875,
0.0224609375,
-0.0428466796875,
0.0322265625,
0.06243896484375,
-0.0396728515625,
0.0087127685546875,
-0.0247039794921875,
0.0011758804321289062,
0.034515380859375,
-0.01617431640625,
0.0004253387451171875,
0.00955963134765625,
0.0032367706298828125,
-0.05352783203125,
0.117431640625,
0.0096282958984375,
0.0090789794921875,
0.037506103515625,
0.04705810546875,
-0.075439453125,
0.0017108917236328125,
0.0017642974853515625,
0.036346435546875,
-0.0011816024780273438,
0.06182861328125,
-0.01543426513671875,
-0.015625,
0.0312347412109375,
0.0694580078125,
0.044708251953125,
-0.0097503662109375,
0.0178375244140625,
-0.007114410400390625,
0.05462646484375,
0.03131103515625,
-0.00374603271484375,
0.0084075927734375,
-0.045806884765625,
0.0202789306640625,
-0.0135650634765625,
-0.08099365234375,
-0.01666259765625,
-0.0186920166015625,
-0.040283203125,
-0.0254058837890625,
-0.0019464492797851562,
-0.00913238525390625,
0.04046630859375,
-0.040985107421875,
-0.0159912109375,
0.007297515869140625,
-0.006793975830078125,
-0.014617919921875,
-0.001903533935546875,
-0.0019521713256835938,
-0.003452301025390625,
-0.023193359375,
-0.006816864013671875,
-0.01788330078125,
0.03045654296875,
0.024322509765625,
0.0217437744140625,
-0.007701873779296875,
0.0145721435546875,
-0.0128021240234375,
-0.021026611328125,
0.01050567626953125,
0.045318603515625,
-0.04534912109375,
0.047882080078125,
-0.007587432861328125,
0.01067352294921875,
-0.0677490234375,
0.0037670135498046875,
-0.006069183349609375,
0.03582763671875,
-0.03314208984375,
-0.023681640625,
0.0222320556640625,
0.0150299072265625,
-0.024871826171875,
-0.020751953125,
-0.00992584228515625,
0.019561767578125,
0.056121826171875,
0.00846099853515625,
-0.03704833984375,
-0.0033855438232421875,
-0.01317596435546875,
-0.006771087646484375,
0.004840850830078125,
0.057342529296875,
-0.008026123046875,
-0.0233612060546875,
0.01953125,
0.036346435546875,
0.0149993896484375,
-0.01026153564453125,
0.034515380859375,
0.016357421875,
-0.0038661956787109375,
-0.015960693359375,
0.0162200927734375,
0.00011289119720458984,
0.0276031494140625,
-0.0309295654296875,
-0.0083770751953125,
-0.009918212890625,
0.032318115234375,
-0.0193939208984375,
0.005153656005859375,
0.0260772705078125,
0.0258941650390625,
-0.01482391357421875,
-0.0325927734375,
0.0185394287109375,
-0.0272674560546875,
0.0253753662109375,
-0.02581787109375,
0.0011663436889648438,
0.00567626953125,
-0.0225067138671875,
-0.00466156005859375,
0.0015659332275390625,
0.044219970703125,
0.01251220703125,
0.016448974609375,
0.00647735595703125,
-0.0100250244140625,
0.03515625,
0.043060302734375,
0.0513916015625,
0.060333251953125,
-0.10302734375,
-0.00002658367156982422,
-0.077392578125,
-0.079345703125,
0.0615234375,
0.056549072265625,
-0.0287017822265625,
0.004001617431640625,
0.004650115966796875,
0.03143310546875,
-0.003025054931640625,
-0.0406494140625,
0.0237579345703125,
-0.0096893310546875,
0.0267791748046875,
0.01849365234375,
-0.06671142578125,
-0.03350830078125,
-0.04046630859375,
0.028472900390625,
-0.0043487548828125,
0.13720703125,
-0.0457763671875,
0.005157470703125,
0.0244140625,
0.0256195068359375,
-0.01071929931640625,
0.0002682209014892578,
0.059814453125,
-0.0007634162902832031,
-0.00888824462890625,
-0.03509521484375,
-0.050933837890625,
0.0762939453125,
-0.0020084381103515625,
0.0121917724609375,
0.037078857421875,
-0.00959014892578125,
-0.00514984130859375,
0.0113983154296875,
-0.016815185546875,
-0.029083251953125,
-0.02593994140625,
-0.023590087890625,
0.00868988037109375,
-0.00970458984375,
-0.000732421875,
-0.00817108154296875,
0.0340576171875,
0.005207061767578125,
-0.01226806640625,
-0.0028934478759765625,
-0.00013935565948486328,
-0.0262908935546875,
0.0251922607421875,
0.01363372802734375,
-0.061492919921875,
0.022125244140625,
-0.0033779144287109375,
-0.011138916015625,
0.005985260009765625,
0.04925537109375,
0.0173187255859375,
-0.05023193359375,
-0.0055389404296875,
-0.0399169921875,
-0.0165252685546875,
-0.050262451171875,
-0.033233642578125,
0.032196044921875,
-0.002330780029296875,
-0.005458831787109375,
-0.01174163818359375,
-0.012451171875,
-0.0149993896484375,
-0.00030875205993652344,
0.036041259765625,
-0.0021991729736328125,
0.0079345703125,
-0.0504150390625,
-0.0159759521484375,
0.028594970703125,
0.02386474609375,
-0.05889892578125,
0.013641357421875,
-0.01068878173828125,
0.0034236907958984375,
0.0013885498046875,
-0.0268096923828125,
0.0308685302734375,
0.039794921875,
-0.0150909423828125,
0.03240966796875,
-0.0081939697265625,
-0.0311126708984375,
0.018310546875,
0.025604248046875,
0.060821533203125,
-0.02801513671875,
-0.00949859619140625,
0.0311126708984375,
0.01348876953125,
0.08984375,
-0.0167388916015625,
-0.01125335693359375,
0.01477813720703125,
0.0017633438110351562,
-0.004695892333984375,
-0.0560302734375,
0.00824737548828125,
-0.055206298828125,
0.0009169578552246094,
-0.036468505859375,
0.01485443115234375,
0.01605224609375,
-0.05322265625,
-0.08612060546875,
-0.00789642333984375,
-0.00986480712890625,
-0.0447998046875,
-0.0330810546875,
-0.001331329345703125,
-0.00653839111328125,
-0.015838623046875,
-0.0187530517578125,
-0.01641845703125,
0.004360198974609375,
0.038421630859375,
0.042694091796875,
0.033905029296875,
0.0275726318359375,
0.01837158203125,
-0.0355224609375,
0.027435302734375,
-0.0001939535140991211,
0.031829833984375,
-0.00272369384765625,
-0.014007568359375,
0.00821685791015625,
0.0169677734375,
-0.049774169921875,
-0.072509765625,
-0.0218963623046875,
0.0282135009765625,
-0.01314544677734375,
0.005016326904296875,
0.007076263427734375,
-0.0018138885498046875,
0.029296875,
0.052459716796875,
0.003406524658203125,
-0.018951416015625,
-0.01134490966796875,
-0.044708251953125,
-0.042083740234375,
0.00856781005859375,
0.0300750732421875,
-0.06988525390625,
0.020477294921875,
0.038238525390625,
-0.00940704345703125,
-0.01019287109375,
-0.0216827392578125,
-0.0305938720703125,
-0.0178680419921875,
-0.040130615234375,
0.0014886856079101562,
-0.033721923828125,
0.00670623779296875,
0.0325927734375,
-0.02734375,
0.005130767822265625,
-0.042144775390625,
0.0308685302734375,
-0.005767822265625,
-0.05999755859375,
-0.01030731201171875,
0.05926513671875,
-0.0491943359375,
0.02294921875,
0.002887725830078125,
0.04052734375,
-0.051483154296875,
0.0297698974609375,
0.0248565673828125,
0.047088623046875,
-0.002094268798828125,
0.06365966796875,
-0.0260162353515625,
0.0712890625,
-0.01551055908203125,
0.04266357421875,
-0.00775146484375,
0.04071044921875,
-0.0030765533447265625,
0.046356201171875,
-0.03558349609375,
0.000217437744140625,
-0.016876220703125,
-0.033416748046875,
0.00299072265625,
0.009185791015625,
0.01250457763671875,
-0.03314208984375,
0.036773681640625,
-0.03125,
0.007656097412109375,
0.022247314453125
] |
afeb6dae28a6941347a52bf49ef24988159275f7
|
Wordpress Stackexchange
Q: Custom Permalink: /year/month/post-goes-here/? I'm experimenting with adjusting permalinks (for purely educational experimentation).
What would I need to place in the "Custom Permalink" option to get my post URLs in the form...
/year/month/post-title-goes-here/
A: /%year%/%monthnum%/%postname%/
|
Q: Custom Permalink: /year/month/post-goes-here/? I'm experimenting with adjusting permalinks (for purely educational experimentation).
What would I need to place in the "Custom Permalink" option to get my post URLs in the form...
/year/month/post-title-goes-here/
A: /%year%/%monthnum%/%postname%/
|
wordpress
|
{
"language": "en",
"length": 35,
"provenance": "stackexchange_00019.jsonl.gz:407944",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12644"
}
|
[
0.064208984375,
-0.032745361328125,
0.01390838623046875,
-0.0187530517578125,
-0.0245513916015625,
-0.03741455078125,
0.038970947265625,
-0.0181427001953125,
0.01016998291015625,
0.00716400146484375,
0.01219940185546875,
-0.0250701904296875,
-0.0232391357421875,
-0.056884765625,
-0.01068878173828125,
-0.0201416015625,
0.02545166015625,
-0.0157928466796875,
0.01032257080078125,
-0.018096923828125,
0.01543426513671875,
0.00800323486328125,
0.020599365234375,
0.027252197265625,
0.0435791015625,
0.0032196044921875,
0.019989013671875,
-0.034149169921875,
0.034210205078125,
-0.0188751220703125,
0.0322265625,
-0.0157470703125,
0.0028400421142578125,
-0.0065155029296875,
0.07293701171875,
0.05279541015625,
0.027679443359375,
0.01251220703125,
0.05487060546875,
-0.01035308837890625,
0.0209503173828125,
-0.0269012451171875,
0.01430511474609375,
0.01381683349609375,
0.018798828125,
-0.0271453857421875,
0.019805908203125,
-0.07562255859375,
0.0077362060546875,
-0.0229949951171875,
0.006900787353515625,
0.0237274169921875,
0.007106781005859375,
-0.01055908203125,
-0.032623291015625,
-0.02716064453125,
0.043701171875,
-0.049072265625,
0.048431396484375,
-0.0311126708984375,
-0.047271728515625,
-0.019317626953125,
0.04058837890625,
0.0073089599609375,
-0.0113372802734375,
-0.024505615234375,
-0.001941680908203125,
0.0192108154296875,
-0.0184783935546875,
-0.021209716796875,
0.04071044921875,
-0.01306915283203125,
0.0102081298828125,
-0.03472900390625,
-0.0013380050659179688,
0.01070404052734375,
-0.0254058837890625,
-0.038238525390625,
0.0287017822265625,
0.0009069442749023438,
-0.0276947021484375,
-0.0165863037109375,
-0.00661468505859375,
-0.0478515625,
0.0237579345703125,
-0.032806396484375,
-0.02069091796875,
0.00943756103515625,
-0.0266571044921875,
-0.040283203125,
-0.0247802734375,
-0.041839599609375,
-0.040771484375,
0.008575439453125,
-0.011474609375,
-0.0135345458984375,
0.0186767578125,
0.0244293212890625,
0.0008797645568847656,
-0.004329681396484375,
-0.002193450927734375,
-0.00582122802734375,
-0.040435791015625,
-0.00984954833984375,
0.0020275115966796875,
0.012481689453125,
0.0245819091796875,
0.061187744140625,
0.059356689453125,
-0.007450103759765625,
-0.01177215576171875,
0.0511474609375,
-0.0205230712890625,
-0.011962890625,
-0.0166168212890625,
0.0036468505859375,
-0.03277587890625,
-0.005950927734375,
-0.00962066650390625,
0.0081024169921875,
0.01006317138671875,
0.047149658203125,
0.006389617919921875,
-0.0260467529296875,
-0.01373291015625,
-0.01305389404296875,
-0.006496429443359375,
-0.048614501953125,
-0.0291748046875,
0.07000732421875,
-0.02130126953125,
0.0130615234375,
0.009735107421875,
-0.0008363723754882812,
-0.025970458984375,
-0.040283203125,
0.04046630859375,
-0.06097412109375,
-0.032196044921875,
0.027252197265625,
-0.01555633544921875,
-0.024261474609375,
0.00678253173828125,
-0.0146484375,
0.006500244140625,
0.025360107421875,
0.012359619140625,
0.02239990234375,
-0.0007004737854003906,
-0.05780029296875,
-0.00316619873046875,
0.016387939453125,
-0.00418853759765625,
0.01508331298828125,
0.0011692047119140625,
-0.01493072509765625,
-0.01507568359375,
-0.0129852294921875,
0.045196533203125,
0.00597381591796875,
0.037109375,
0.00782012939453125,
-0.012420654296875,
0.0004646778106689453,
-0.0230712890625,
-0.003437042236328125,
-0.02227783203125,
0.00565338134765625,
0.0082855224609375,
0.0173492431640625,
-0.0243072509765625,
0.01317596435546875,
-0.01593017578125,
-0.0178375244140625,
-0.004199981689453125,
-0.01302337646484375,
-0.01207733154296875,
-0.00159454345703125,
-0.015106201171875,
0.0772705078125,
0.04736328125,
-0.02545166015625,
-0.030303955078125,
0.03704833984375,
-0.038665771484375,
-0.01010894775390625,
0.037017822265625,
0.01122283935546875,
-0.002155303955078125,
0.0249786376953125,
0.07281494140625,
0.049652099609375,
-0.0872802734375,
0.0321044921875,
-0.015716552734375,
0.0171661376953125,
-0.00688934326171875,
0.01824951171875,
-0.013427734375,
-0.0043182373046875,
-0.040496826171875,
0.037078857421875,
-0.014068603515625,
0.0653076171875,
0.026763916015625,
0.03277587890625,
0.00003886222839355469,
0.0169219970703125,
0.03570556640625,
0.0030193328857421875,
0.00933074951171875,
0.029144287109375,
-0.0025196075439453125,
-0.08917236328125,
-0.060211181640625,
0.041107177734375,
0.02166748046875,
-0.05059814453125,
-0.020660400390625,
-0.02825927734375,
0.013671875,
-0.002887725830078125,
-0.02423095703125,
0.08831787109375,
0.04193115234375,
-0.0192413330078125,
-0.027008056640625,
-0.0257720947265625,
-0.0252838134765625,
0.039398193359375,
-0.10693359375,
0.0258331298828125,
-0.003208160400390625,
0.01148223876953125,
-0.030426025390625,
-0.021881103515625,
0.0019817352294921875,
-0.0197296142578125,
0.0269012451171875,
0.052093505859375,
0.01157379150390625,
0.046051025390625,
0.00730133056640625,
0.038604736328125,
0.0213470458984375,
-0.0028533935546875,
0.019989013671875,
-0.00634765625,
0.01158905029296875,
0.074951171875,
0.0238494873046875,
0.01288604736328125,
-0.0207977294921875,
-0.0097503662109375,
-0.003795623779296875,
0.026641845703125,
-0.033721923828125,
-0.030548095703125,
0.0102386474609375,
-0.0107421875,
0.0164794921875,
-0.0019378662109375,
-0.01265716552734375,
-0.0117950439453125,
0.020904541015625,
0.0023136138916015625,
0.0193328857421875,
0.034271240234375,
-0.01145172119140625,
0.01068878173828125,
-0.0013437271118164062,
-0.03814697265625,
0.00553131103515625,
-0.0013904571533203125,
0.05560302734375,
-0.0265655517578125,
-0.0142364501953125,
-0.0204010009765625,
0.0194854736328125,
-0.003017425537109375,
-0.006671905517578125,
0.0182647705078125,
-0.024810791015625,
-0.0008153915405273438,
0.010345458984375,
-0.05072021484375,
-0.009613037109375,
0.0257720947265625,
0.0189971923828125,
0.00734710693359375,
0.0360107421875,
-0.024169921875,
-0.031951904296875,
0.01342010498046875,
0.04022216796875,
-0.055908203125,
0.006626129150390625,
-0.044525146484375,
0.0438232421875,
-0.033966064453125,
-0.019256591796875,
0.05865478515625,
0.029327392578125,
-0.0015268325805664062,
0.00754547119140625,
-0.0347900390625,
0.01175689697265625,
0.0228424072265625,
-0.00969696044921875,
-0.01190948486328125,
-0.060272216796875,
-0.0249786376953125,
0.0289764404296875,
0.053924560546875,
0.0016021728515625,
-0.0226898193359375,
0.01348114013671875,
0.0302276611328125,
-0.051300048828125,
-0.06768798828125,
0.01479339599609375,
-0.029510498046875,
-0.004581451416015625,
0.0088958740234375,
-0.0053863525390625,
-0.016998291015625,
0.005596160888671875,
-0.0042877197265625,
-0.01436614990234375,
-0.0078277587890625,
-0.056884765625,
-0.060150146484375,
-0.0972900390625,
-0.0343017578125,
0.004848480224609375,
0.038421630859375,
-0.01800537109375,
0.045166015625,
-0.034759521484375,
-0.09124755859375,
-0.073486328125,
0.004505157470703125,
-0.01125335693359375,
-0.0223541259765625,
-0.00620269775390625,
0.01751708984375,
0.010345458984375,
0.002716064453125,
0.0748291015625,
0.050506591796875,
-0.06866455078125,
0.007389068603515625,
-0.02001953125,
-0.0156707763671875,
0.0185394287109375,
-0.0038280487060546875,
0.015350341796875,
0.009033203125,
0.013641357421875,
-0.033599853515625,
0.007328033447265625,
-0.029693603515625,
-0.049346923828125,
-0.0021762847900390625,
0.0107574462890625,
0.003276824951171875,
-0.0054473876953125,
0.0020961761474609375,
-0.02020263671875,
-0.00664520263671875,
0.00399017333984375,
-0.054931640625,
0.046966552734375,
0.0014171600341796875,
0.014434814453125,
-0.00403594970703125,
-0.0037822723388671875,
-0.04986572265625,
0.053253173828125,
0.004177093505859375,
-0.00494384765625,
-0.0025119781494140625,
-0.006992340087890625,
-0.037353515625,
-0.06866455078125,
0.0697021484375,
-0.0367431640625,
-0.0033092498779296875,
-0.05450439453125,
-0.03411865234375,
-0.0031986236572265625,
0.08319091796875,
-0.009552001953125,
-0.0289154052734375,
0.0026760101318359375,
-0.0198974609375,
0.00948333740234375,
0.020355224609375,
-0.01084136962890625,
-0.0172882080078125,
-0.035736083984375,
-0.0021076202392578125,
-0.00838470458984375,
0.0017261505126953125,
-0.0205535888671875,
0.016357421875,
-0.02716064453125,
-0.031524658203125,
0.0260467529296875,
0.005279541015625,
0.00015604496002197266,
-0.01324462890625,
-0.0080108642578125,
-0.020416259765625,
-0.016387939453125,
-0.004909515380859375,
-0.0828857421875,
-0.0262298583984375,
-0.01125335693359375,
0.0616455078125,
0.0225830078125,
-0.044464111328125,
-0.0029659271240234375,
0.06512451171875,
0.018310546875,
-0.0008287429809570312,
0.005611419677734375,
-0.0161895751953125,
0.005619049072265625,
0.034332275390625,
0.005290985107421875,
-0.006206512451171875,
-0.00001138448715209961,
-0.01184844970703125,
-0.03753662109375,
0.03515625,
-0.01021575927734375,
0.041839599609375,
0.0079193115234375,
-0.0185089111328125,
-0.06671142578125,
0.0097503662109375,
0.0013589859008789062,
0.0149688720703125,
-0.035858154296875,
0.00914764404296875,
0.0129547119140625,
-0.07086181640625,
0.0293121337890625,
0.01556396484375,
0.005767822265625,
0.0014085769653320312,
0.02020263671875,
-0.00041675567626953125,
-0.0267181396484375,
-0.0401611328125,
0.02874755859375,
0.0261077880859375,
-0.01702880859375,
0.0528564453125,
0.01837158203125,
-0.012115478515625,
0.041290283203125,
-0.03228759765625,
-0.01119232177734375,
-0.04595947265625,
0.054931640625,
-0.007144927978515625,
-0.00024628639221191406,
0.0191192626953125,
-0.05322265625,
0.05670166015625,
0.0374755859375,
-0.02783203125,
0.005645751953125,
-0.041534423828125,
0.035797119140625,
-0.030029296875,
0.0277557373046875,
-0.040618896484375,
-0.029083251953125,
0.0207061767578125,
-0.0223388671875,
0.0179901123046875,
-0.0004963874816894531,
-0.0005807876586914062,
0.004199981689453125,
-0.0173797607421875,
0.019622802734375,
-0.010040283203125,
-0.017852783203125,
-0.0036563873291015625,
0.026153564453125,
0.00798797607421875,
0.01374053955078125,
0.0029163360595703125,
0.005802154541015625,
0.03204345703125,
0.018524169921875,
0.006229400634765625,
-0.02740478515625,
-0.0306243896484375,
0.021697998046875,
-0.007450103759765625,
-0.045135498046875,
0.0275421142578125,
0.0672607421875,
0.001983642578125,
0.04071044921875,
-0.01381683349609375,
0.025146484375,
-0.0182037353515625,
0.007198333740234375,
0.01168060302734375,
-0.01512908935546875,
0.006488800048828125,
0.049407958984375,
0.0113067626953125,
0.0180816650390625,
-0.0188140869140625,
0.01552581787109375,
0.032928466796875,
0.01219940185546875,
0.0287017822265625,
-0.0244598388671875,
0.0008573532104492188,
-0.0181121826171875,
0.007648468017578125,
-0.04205322265625,
-0.0150909423828125,
0.005008697509765625,
0.037750244140625,
0.0246124267578125,
0.0024166107177734375,
0.0173187255859375,
0.0014963150024414062,
-0.02264404296875,
0.00667572021484375,
-0.0021305084228515625,
-0.038848876953125,
-0.010528564453125,
0.000797271728515625,
0.01094818115234375,
0.0008783340454101562,
-0.01206207275390625,
0.0206451416015625,
-0.04913330078125,
0.0089111328125,
-0.0051422119140625,
-0.0030498504638671875,
-0.019561767578125,
-0.01318359375,
0.0243072509765625,
-0.00920867919921875,
0.0126953125,
0.01433563232421875,
-0.01044464111328125,
-0.0287933349609375,
-0.00836181640625,
0.04473876953125,
-0.028228759765625,
0.0291595458984375,
-0.005115509033203125,
-0.0217437744140625,
0.0296173095703125,
0.0159454345703125,
0.05389404296875,
0.031280517578125,
-0.05072021484375,
-0.009613037109375,
-0.03265380859375,
-0.009674072265625,
-0.0289764404296875,
-0.00440216064453125,
-0.033782958984375,
-0.0004458427429199219,
0.03363037109375,
0.027679443359375,
0.0003895759582519531,
-0.03240966796875,
-0.000032782554626464844,
0.00957489013671875,
0.019683837890625,
0.0305328369140625,
0.01020050048828125,
0.056304931640625,
-0.004856109619140625,
0.070556640625,
0.0199432373046875,
0.0111083984375,
-0.0269012451171875,
-0.033233642578125,
0.00443267822265625,
-0.028167724609375,
-0.039031982421875,
-0.00269317626953125,
-0.0018405914306640625,
0.03863525390625,
0.042449951171875,
0.00047016143798828125,
0.0087738037109375,
-0.014007568359375,
0.0105133056640625,
-0.0209197998046875,
0.0307159423828125,
-0.06427001953125,
0.0024814605712890625,
-0.0267181396484375,
0.0318603515625,
0.0595703125,
-0.0167083740234375,
-0.043121337890625,
-0.00826263427734375,
0.02178955078125,
0.00580596923828125,
0.004119873046875,
-0.043731689453125,
0.01544189453125,
0.06842041015625,
0.038787841796875,
0.058868408203125,
0.01128387451171875,
0.039825439453125,
0.03704833984375,
-0.03955078125,
0.026763916015625,
0.01255035400390625,
0.0545654296875,
-0.01129913330078125,
-0.0030975341796875,
0.058807373046875,
-0.023040771484375,
0.00507354736328125,
0.056793212890625,
0.073486328125,
-0.05633544921875,
-0.004528045654296875,
0.00852203369140625,
0.0091552734375,
0.0823974609375,
-0.0081024169921875,
0.01275634765625,
0.0021724700927734375,
-0.00974273681640625,
-0.006252288818359375,
-0.01474761962890625,
-0.017822265625,
-0.0174713134765625,
0.0008883476257324219,
-0.01279449462890625,
0.05029296875,
0.0014696121215820312,
-0.0411376953125,
-0.0295562744140625,
0.022613525390625,
-0.038299560546875,
-0.0186004638671875,
-0.0121002197265625,
-0.007808685302734375,
0.0034809112548828125,
-0.00403594970703125,
0.04779052734375,
-0.0728759765625,
0.04156494140625,
0.0118255615234375,
-0.02362060546875,
0.0243377685546875,
0.01471710205078125,
-0.0220489501953125,
0.0033664703369140625,
-0.01861572265625,
-0.01387786865234375,
0.0426025390625,
-0.0051422119140625,
0.0019016265869140625,
0.007678985595703125,
-0.005725860595703125,
0.00679779052734375,
-0.01018524169921875,
-0.016937255859375,
0.00673675537109375,
-0.015838623046875,
0.0703125,
-0.032196044921875,
-0.0233001708984375,
0.0113067626953125,
-0.008636474609375,
-0.003269195556640625,
-0.0277252197265625,
-0.02691650390625,
-0.01490020751953125,
0.035491943359375,
-0.057281494140625,
-0.005916595458984375,
0.0156402587890625,
-0.0723876953125,
-0.061859130859375,
0.1090087890625,
-0.0269012451171875,
0.045196533203125,
0.014190673828125,
0.0390625,
-0.00028324127197265625,
0.0307464599609375,
-0.033966064453125,
0.037933349609375,
0.0227813720703125,
0.01093292236328125,
-0.06787109375,
-0.025909423828125,
-0.0173797607421875,
0.05816650390625,
0.07025146484375,
0.007282257080078125,
-0.029388427734375,
-0.006923675537109375,
0.08709716796875,
0.07379150390625,
0.0186309814453125,
0.00980377197265625,
-0.0008816719055175781,
0.0537109375,
0.0197906494140625,
0.000698089599609375,
0.033966064453125,
0.01029205322265625,
-0.0570068359375,
0.047760009765625,
0.01983642578125,
0.0278167724609375,
0.017120361328125,
-0.055999755859375,
-0.01366424560546875,
0.004604339599609375,
0.0289764404296875,
-0.0274200439453125,
0.01367950439453125,
0.004791259765625,
0.0279541015625,
-0.07830810546875,
-0.057342529296875,
-0.00397491455078125,
0.0323486328125,
0.01203155517578125,
0.031585693359375,
0.0095977783203125,
0.0109710693359375,
0.01702880859375,
-0.01076507568359375,
0.016357421875,
0.0183563232421875,
-0.01031494140625,
0.05908203125,
0.033294677734375,
0.017120361328125,
-0.044921875,
-0.0450439453125,
0.06341552734375,
0.09332275390625,
-0.03570556640625,
-0.0190277099609375,
0.01349639892578125,
0.00481414794921875,
-0.00818634033203125,
-0.038116455078125,
-0.020111083984375,
-0.01548004150390625,
0.0121002197265625,
-0.0270233154296875,
0.0072021484375,
0.035003662109375,
0.028076171875,
-0.0009150505065917969,
-0.0265655517578125,
-0.04962158203125,
0.0171051025390625,
-0.064208984375,
0.047637939453125,
-0.00006920099258422852,
0.0433349609375,
0.054443359375,
0.0019741058349609375,
0.00037026405334472656,
-0.0174407958984375,
0.004199981689453125,
0.01666259765625,
0.024017333984375,
-0.016510009765625,
-0.016021728515625,
-0.0274658203125,
0.019775390625,
0.0404052734375,
0.0279388427734375,
0.0185089111328125,
0.001918792724609375,
-0.051361083984375,
-0.022186279296875,
0.01012420654296875,
-0.01776123046875,
-0.0298309326171875,
0.035400390625,
-0.035491943359375,
0.0670166015625,
0.0215911865234375,
0.00803375244140625,
-0.00555419921875,
-0.00531005859375,
0.080322265625,
-0.016632080078125,
0.042816162109375,
0.006389617919921875,
-0.0187835693359375,
0.051422119140625,
0.0010042190551757812,
0.08001708984375,
0.0114898681640625,
-0.00655364990234375,
-0.0186004638671875,
0.0105133056640625,
-0.10247802734375,
0.01433563232421875,
0.058074951171875,
0.033477783203125,
-0.0589599609375,
-0.0163116455078125,
-0.0099945068359375,
0.01666259765625,
-0.02056884765625,
0.01366424560546875,
0.0400390625,
0.0102386474609375,
0.01290130615234375,
-0.07867431640625,
-0.032501220703125,
-0.04290771484375,
0.0157012939453125,
0.032440185546875,
0.0322265625,
0.00911712646484375,
0.03118896484375,
0.00066375732421875,
0.0136871337890625,
-0.006954193115234375,
-0.00537109375,
0.034820556640625,
0.000720977783203125,
0.022735595703125,
-0.0144500732421875,
-0.041778564453125,
0.035400390625,
0.0087432861328125,
0.00803375244140625,
0.01364898681640625,
-0.019439697265625,
0.00995635986328125,
0.01277923583984375,
0.00986480712890625,
-0.0296478271484375,
-0.036865234375,
-0.017730712890625,
-0.0275421142578125,
0.0105133056640625,
0.0228729248046875,
0.0318603515625,
0.050048828125,
-0.01280975341796875,
-0.005466461181640625,
0.021514892578125,
-0.049896240234375,
0.04913330078125,
0.038360595703125,
-0.0118560791015625,
-0.0035076141357421875,
0.00008445978164672852,
-0.011566162109375,
0.03643798828125,
0.0081329345703125,
-0.01331329345703125,
0.04119873046875,
0.0298309326171875,
-0.047760009765625,
-0.034912109375,
0.01419830322265625,
-0.012420654296875,
-0.0018253326416015625,
-0.059112548828125,
-0.003574371337890625,
0.0142669677734375,
-0.0301513671875,
-0.01062774658203125,
-0.04498291015625,
-0.0090789794921875,
0.036224365234375,
-0.037506103515625,
-0.01009368896484375,
-0.033966064453125,
-0.0227813720703125,
0.01080322265625,
-0.0109100341796875,
-0.0291595458984375,
-0.002826690673828125,
0.0012712478637695312,
0.04852294921875,
-0.04925537109375,
-0.019805908203125,
0.006580352783203125,
0.0207366943359375,
-0.018310546875,
-0.0018062591552734375,
-0.02447509765625,
-0.00528717041015625,
0.00542449951171875,
0.024749755859375,
0.032562255859375,
-0.032989501953125,
-0.041412353515625,
0.048248291015625,
0.041473388671875,
0.08917236328125,
0.02044677734375,
-0.0028285980224609375,
0.0245819091796875,
0.023223876953125,
-0.049163818359375,
-0.11566162109375,
0.01049041748046875,
-0.051422119140625,
0.007053375244140625,
0.003673553466796875,
-0.0280609130859375,
-0.003589630126953125,
-0.032928466796875,
-0.10589599609375,
0.03887939453125,
-0.01050567626953125,
-0.040557861328125,
-0.042205810546875,
0.003238677978515625,
0.01959228515625,
0.00482940673828125,
0.0014905929565429688,
-0.0428466796875,
-0.05126953125,
-0.006740570068359375,
0.01690673828125,
0.0155181884765625,
-0.001010894775390625,
0.052581787109375,
-0.02783203125,
0.053253173828125,
0.0254974365234375,
-0.0186767578125,
0.06304931640625,
-0.027374267578125,
0.03814697265625,
0.03741455078125,
-0.05670166015625,
-0.044403076171875,
-0.053863525390625,
-0.0175018310546875,
-0.0143585205078125,
-0.0599365234375,
-0.0018186569213867188,
-0.00621795654296875,
0.0552978515625,
0.019012451171875,
0.0027370452880859375,
-0.0281524658203125,
0.035797119140625,
0.01433563232421875,
-0.023773193359375,
0.0009889602661132812,
0.00885009765625,
-0.0280303955078125,
-0.01378631591796875,
-0.01174163818359375,
-0.01708984375,
-0.0130767822265625,
0.0277099609375,
-0.02154541015625,
0.0026836395263671875,
0.0210723876953125,
-0.027008056640625,
-0.03753662109375,
0.0391845703125,
0.023651123046875,
-0.0273284912109375,
0.005641937255859375,
-0.019287109375,
0.004978179931640625,
0.0047454833984375,
-0.023956298828125,
0.0211029052734375,
0.00930023193359375,
-0.01494598388671875,
-0.00412750244140625,
0.0280914306640625,
0.044036865234375,
-0.01062774658203125,
-0.0321044921875,
0.01235198974609375,
0.0254058837890625,
0.005390167236328125,
0.0253143310546875,
-0.0175323486328125,
0.036651611328125,
-0.01274871826171875,
0.041046142578125,
-0.005443572998046875,
0.037933349609375,
0.0018377304077148438,
0.042877197265625,
-0.06182861328125,
-0.00518798828125,
-0.032684326171875,
-0.023834228515625,
0.00809478759765625,
-0.0006318092346191406,
-0.0071563720703125,
-0.0028247833251953125,
-0.015869140625,
-0.01461029052734375,
-0.0288543701171875,
-0.01203155517578125
] |
474a6d58e5f80d0b1c1e3371fd16281ab809fb39
|
Wordpress Stackexchange
Q: Experiences with compiling WordPress using Hip Hop? What are you experiences compiling Wordpress using Hip Hop? (
https://github.com/facebook/hiphop-php/wiki/running-hiphop
)
Specific:
*
*is this maintainable with upgrades?
*is the performance increase bigger than using alternatives?
update: also interesting: http://www.phpclasses.org/blog/post/168-Can-NET-make-PHP-run-faster-than-the-official-PHP-implementation.html
A: Original approach of static compilation in HipHop PHP-to-C++ has been since replaced by HipHop VM just-in-time compilation.
Facebook prominently featured WordPress as example application and it no longer requires extensive (barely any by now) core edits.
Old answer
There is quite extensive presentation Rasmus Lerdorf - PHP Performance that uses WP as test subject and covers HipHop among many other things.
The summary I can formulate from that presenation is that HipHop:
*
*requires WP core edits
*has limited PHP and libraries compatibility
*provides (on vanilla WP install at least) very mild performance gain for the effort it takes to implement. In that presentation compiling with HipHop bumped WP from 28.8 transactions per second to 33.6.
I think more common performance improving alternatives (like reverse proxy) can easily outperform that without such downsides.
|
Q: Experiences with compiling WordPress using Hip Hop? What are you experiences compiling Wordpress using Hip Hop? (
https://github.com/facebook/hiphop-php/wiki/running-hiphop
)
Specific:
*
*is this maintainable with upgrades?
*is the performance increase bigger than using alternatives?
update: also interesting: http://www.phpclasses.org/blog/post/168-Can-NET-make-PHP-run-faster-than-the-official-PHP-implementation.html
A: Original approach of static compilation in HipHop PHP-to-C++ has been since replaced by HipHop VM just-in-time compilation.
Facebook prominently featured WordPress as example application and it no longer requires extensive (barely any by now) core edits.
Old answer
There is quite extensive presentation Rasmus Lerdorf - PHP Performance that uses WP as test subject and covers HipHop among many other things.
The summary I can formulate from that presenation is that HipHop:
*
*requires WP core edits
*has limited PHP and libraries compatibility
*provides (on vanilla WP install at least) very mild performance gain for the effort it takes to implement. In that presentation compiling with HipHop bumped WP from 28.8 transactions per second to 33.6.
I think more common performance improving alternatives (like reverse proxy) can easily outperform that without such downsides.
A: There is ongoing work on making this possible, reference http://core.trac.wordpress.org/ticket/14642 as you can see it keep getting punted to future releases, bit core devs are actively involved in making it happen.
As of WordPress 3.3 one still can't compile directly in HPHP without core edits.
Also worth following: http://huichen.org/en/2010/06/wordpress-three-hardened-by-hphp/ & http://huichen.org/en/2010/06/wordpress-3-benchmark-part-2/ if you're interested in it.
|
wordpress
|
{
"language": "en",
"length": 230,
"provenance": "stackexchange_00019.jsonl.gz:407950",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12682"
}
|
[
-0.002750396728515625,
-0.0015249252319335938,
-0.03668212890625,
-0.045196533203125,
0.00786590576171875,
-0.010894775390625,
-0.0048980712890625,
0.0214385986328125,
-0.003143310546875,
-0.03570556640625,
-0.0531005859375,
0.01543426513671875,
-0.049468994140625,
-0.01309967041015625,
0.034393310546875,
-0.06597900390625,
0.0355224609375,
-0.0295562744140625,
0.01010894775390625,
0.00001722574234008789,
0.01061248779296875,
0.02337646484375,
0.019317626953125,
0.038055419921875,
0.0343017578125,
-0.07135009765625,
0.06463623046875,
-0.03253173828125,
0.0452880859375,
-0.0093841552734375,
0.025634765625,
-0.0164642333984375,
0.0139923095703125,
0.04681396484375,
-0.045166015625,
0.0023345947265625,
0.0096435546875,
0.0034999847412109375,
0.01346588134765625,
0.0206756591796875,
-0.0051422119140625,
-0.0112457275390625,
0.0060272216796875,
-0.051544189453125,
0.000034332275390625,
-0.039825439453125,
0.01739501953125,
-0.0271453857421875,
0.0057220458984375,
-0.0340576171875,
-0.0048065185546875,
0.072021484375,
0.0209503173828125,
-0.0289154052734375,
0.005237579345703125,
0.034942626953125,
-0.02703857421875,
0.038543701171875,
0.00970458984375,
0.0020999908447265625,
0.0123748779296875,
0.02520751953125,
0.0077972412109375,
0.0305023193359375,
-0.001560211181640625,
0.0097503662109375,
0.00732421875,
0.0157623291015625,
-0.0310516357421875,
-0.0171356201171875,
0.01309967041015625,
-0.016387939453125,
-0.0126953125,
-0.0169219970703125,
0.032958984375,
-0.01001739501953125,
0.017303466796875,
0.016876220703125,
-0.008941650390625,
0.0565185546875,
-0.0059661865234375,
0.0003962516784667969,
-0.042144775390625,
-0.03265380859375,
0.0268096923828125,
0.0074005126953125,
-0.0181732177734375,
-0.0213470458984375,
-0.0004210472106933594,
-0.02264404296875,
-0.004634857177734375,
0.01708984375,
-0.01715087890625,
-0.0255279541015625,
-0.043212890625,
-0.0292510986328125,
-0.00659942626953125,
-0.04010009765625,
0.045745849609375,
0.024993896484375,
0.043853759765625,
-0.055023193359375,
0.03167724609375,
0.0039005279541015625,
-0.032684326171875,
-0.0127716064453125,
0.006771087646484375,
0.051025390625,
0.038665771484375,
0.054779052734375,
-0.005764007568359375,
0.0241851806640625,
0.0037364959716796875,
-0.0258331298828125,
-0.054351806640625,
0.050811767578125,
0.0246124267578125,
-0.06463623046875,
-0.017822265625,
-0.02813720703125,
0.0382080078125,
0.03399658203125,
0.033203125,
0.01105499267578125,
-0.0209503173828125,
-0.00716400146484375,
-0.03302001953125,
-0.045013427734375,
-0.0504150390625,
0.01206207275390625,
0.0182342529296875,
0.052276611328125,
-0.00945281982421875,
0.002109527587890625,
-0.04718017578125,
0.000247955322265625,
0.0304718017578125,
-0.03076171875,
-0.024322509765625,
0.04803466796875,
-0.0194549560546875,
-0.052978515625,
-0.006671905517578125,
-0.0110626220703125,
0.0276947021484375,
0.0056610107421875,
0.035003662109375,
0.01715087890625,
-0.0025691986083984375,
0.01190948486328125,
-0.0238494873046875,
0.036590576171875,
-0.0195159912109375,
-0.021484375,
0.09832763671875,
-0.041351318359375,
0.025482177734375,
-0.02130126953125,
0.05865478515625,
0.02764892578125,
0.016510009765625,
-0.0299072265625,
-0.043975830078125,
0.0160064697265625,
-0.0316162109375,
0.040771484375,
0.0254669189453125,
0.0010528564453125,
0.0206451416015625,
-0.040069580078125,
0.038787841796875,
0.00989532470703125,
0.06427001953125,
0.0025424957275390625,
0.01300048828125,
-0.0010986328125,
-0.0291595458984375,
0.0406494140625,
0.039703369140625,
-0.046875,
-0.0238494873046875,
-0.045623779296875,
0.076171875,
-0.0152587890625,
-0.024322509765625,
0.031951904296875,
0.01214599609375,
0.034332275390625,
0.005825042724609375,
0.00597381591796875,
0.027587890625,
0.03680419921875,
0.0090789794921875,
0.044769287109375,
-0.0185394287109375,
-0.03253173828125,
-0.045867919921875,
0.0084381103515625,
-0.046875,
-0.0168914794921875,
-0.032806396484375,
0.011474609375,
-0.01358795166015625,
0.0092315673828125,
-0.05682373046875,
0.0067596435546875,
-0.0255889892578125,
0.03955078125,
0.0211334228515625,
0.025360107421875,
-0.0036468505859375,
-0.0099639892578125,
-0.0164031982421875,
0.01287078857421875,
-0.0288238525390625,
-0.006740570068359375,
-0.01123046875,
0.06597900390625,
0.030548095703125,
0.0144500732421875,
0.0567626953125,
-0.037384033203125,
0.071044921875,
0.00689697265625,
0.0052337646484375,
0.0024261474609375,
-0.031646728515625,
-0.0116119384765625,
-0.0127105712890625,
0.01312255859375,
-0.0084991455078125,
0.03656005859375,
0.006267547607421875,
0.044403076171875,
0.010986328125,
-0.01641845703125,
0.0184173583984375,
-0.084228515625,
0.0362548828125,
0.0452880859375,
0.03350830078125,
0.0183868408203125,
0.015411376953125,
-0.00547027587890625,
0.01381683349609375,
-0.0294342041015625,
0.032501220703125,
-0.034912109375,
-0.00937652587890625,
-0.04083251953125,
0.01427459716796875,
-0.042816162109375,
0.052642822265625,
-0.01214599609375,
-0.0117950439453125,
0.02569580078125,
0.0245208740234375,
0.01305389404296875,
-0.0005593299865722656,
-0.01096343994140625,
0.0038890838623046875,
0.035675048828125,
-0.011199951171875,
0.019622802734375,
0.0143280029296875,
-0.0253448486328125,
0.0243682861328125,
0.01439666748046875,
-0.00266265869140625,
-0.007904052734375,
0.00923919677734375,
-0.00838470458984375,
0.01483917236328125,
0.004642486572265625,
-0.06256103515625,
0.02001953125,
-0.02783203125,
0.0249786376953125,
0.0157623291015625,
-0.021087646484375,
-0.0074005126953125,
-0.033416748046875,
0.019500732421875,
-0.00011390447616577148,
0.0171661376953125,
-0.041534423828125,
0.047210693359375,
0.0305938720703125,
-0.01216888427734375,
0.0208282470703125,
0.0235443115234375,
0.061614990234375,
0.010955810546875,
0.01375579833984375,
0.016998291015625,
0.0160064697265625,
0.05975341796875,
-0.0171966552734375,
0.0220184326171875,
0.0211334228515625,
0.0655517578125,
0.055999755859375,
-0.01163482666015625,
0.03509521484375,
-0.0146636962890625,
0.0181884765625,
0.02032470703125,
-0.007717132568359375,
-0.0298919677734375,
-0.0132598876953125,
-0.036285400390625,
-0.0157623291015625,
0.029876708984375,
0.0543212890625,
0.0117340087890625,
-0.036376953125,
0.00009071826934814453,
0.04150390625,
-0.0859375,
-0.09893798828125,
0.01306915283203125,
-0.0020580291748046875,
0.011993408203125,
0.0100555419921875,
-0.0010852813720703125,
-0.027587890625,
0.02923583984375,
-0.00041103363037109375,
0.03399658203125,
-0.027618408203125,
-0.024658203125,
-0.0614013671875,
-0.09027099609375,
-0.08636474609375,
0.00278472900390625,
0.012451171875,
0.01140594482421875,
0.0210418701171875,
-0.0094146728515625,
-0.045074462890625,
0.0023212432861328125,
-0.0302734375,
-0.0163116455078125,
-0.0034770965576171875,
0.0203857421875,
-0.01172637939453125,
0.0197601318359375,
-0.0029296875,
-0.048187255859375,
0.018646240234375,
-0.01374053955078125,
-0.022125244140625,
-0.034698486328125,
-0.005645751953125,
-0.01082611083984375,
0.036895751953125,
0.040069580078125,
0.0170745849609375,
0.01378631591796875,
-0.02783203125,
-0.0256500244140625,
0.01441192626953125,
-0.0173492431640625,
0.01334381103515625,
-0.00571441650390625,
-0.00942230224609375,
-0.004116058349609375,
0.026336669921875,
-0.0180206298828125,
-0.0023746490478515625,
-0.037261962890625,
-0.006069183349609375,
0.029571533203125,
-0.022430419921875,
-0.00901031494140625,
0.01555633544921875,
0.007732391357421875,
-0.01953125,
0.01169586181640625,
-0.00319671630859375,
0.0223846435546875,
-0.0102996826171875,
0.0156402587890625,
-0.062164306640625,
0.04364013671875,
0.03228759765625,
0.0787353515625,
0.054290771484375,
0.0301361083984375,
-0.03729248046875,
0.0018444061279296875,
0.029388427734375,
0.0291290283203125,
-0.033966064453125,
-0.0164947509765625,
0.01262664794921875,
-0.047027587890625,
0.0011720657348632812,
0.00916290283203125,
0.0011243820190429688,
0.005889892578125,
-0.006206512451171875,
-0.00940704345703125,
-0.01641845703125,
-0.007091522216796875,
-0.03497314453125,
-0.002742767333984375,
-0.01502227783203125,
0.0028247833251953125,
-0.013427734375,
-0.0042877197265625,
0.0183868408203125,
-0.012847900390625,
0.00629425048828125,
0.00998687744140625,
-0.048675537109375,
-0.0097808837890625,
0.00299835205078125,
-0.046905517578125,
-0.01395416259765625,
0.00701904296875,
0.0271148681640625,
-0.0113677978515625,
0.00991058349609375,
-0.04962158203125,
0.027587890625,
-0.0171356201171875,
0.049072265625,
0.004024505615234375,
-0.0311126708984375,
-0.0249786376953125,
-0.021209716796875,
0.00528717041015625,
-0.00262451171875,
0.00998687744140625,
0.0299224853515625,
-0.0158843994140625,
-0.0021343231201171875,
-0.0038394927978515625,
-0.0243682861328125,
-0.049163818359375,
-0.03411865234375,
-0.0592041015625,
0.01122283935546875,
-0.04205322265625,
-0.0039215087890625,
-0.05047607421875,
-0.06231689453125,
0.047760009765625,
0.0226898193359375,
-0.0305328369140625,
-0.016265869140625,
0.07916259765625,
0.035888671875,
-0.0208587646484375,
0.0117340087890625,
0.005077362060546875,
-0.01259613037109375,
-0.0034160614013671875,
0.044403076171875,
-0.02099609375,
0.0155181884765625,
0.041229248046875,
-0.044281005859375,
-0.01216888427734375,
0.09539794921875,
-0.09136962890625,
0.061065673828125,
-0.025909423828125,
-0.0137786865234375,
0.06573486328125,
-0.04034423828125,
0.044189453125,
-0.0091705322265625,
0.005558013916015625,
-0.0183563232421875,
0.01161956787109375,
-0.000644683837890625,
-0.020294189453125,
-0.03265380859375,
-0.04998779296875,
0.0151214599609375,
-0.0631103515625,
0.0048065185546875,
-0.0039005279541015625,
0.00550079345703125,
-0.02020263671875,
-0.00879669189453125,
0.0008568763732910156,
0.048004150390625,
0.044891357421875,
0.033111572265625,
0.053985595703125,
0.0207672119140625,
0.01105499267578125,
-0.0308837890625,
0.00682830810546875,
0.021270751953125,
0.007015228271484375,
-0.042449951171875,
-0.0271148681640625,
0.0212860107421875,
0.015106201171875,
0.00445556640625,
-0.020111083984375,
0.0235595703125,
-0.01238250732421875,
-0.0031375885009765625,
-0.00839996337890625,
-0.06890869140625,
-0.020538330078125,
-0.031402587890625,
-0.0249481201171875,
0.0187225341796875,
-0.037322998046875,
0.01523590087890625,
-0.00246429443359375,
-0.000507354736328125,
0.0054473876953125,
-0.004077911376953125,
0.044647216796875,
0.05853271484375,
-0.0022602081298828125,
0.0025463104248046875,
-0.0111236572265625,
0.036468505859375,
-0.0635986328125,
0.005084991455078125,
-0.0254669189453125,
-0.03179931640625,
0.008209228515625,
0.017578125,
-0.019683837890625,
-0.0062713623046875,
0.034820556640625,
0.01461029052734375,
-0.005584716796875,
0.013458251953125,
-0.01238250732421875,
0.002788543701171875,
-0.029937744140625,
-0.018951416015625,
0.043212890625,
0.015869140625,
-0.0034122467041015625,
0.0298614501953125,
0.01194000244140625,
0.0518798828125,
0.0021953582763671875,
-0.006011962890625,
0.0170135498046875,
0.0159912109375,
-0.01248931884765625,
-0.035369873046875,
-0.004642486572265625,
0.02850341796875,
0.031463623046875,
-0.0130615234375,
-0.02630615234375,
0.0147705078125,
-0.0111236572265625,
-0.019195556640625,
-0.0088348388671875,
0.004070281982421875,
-0.02081298828125,
0.0002837181091308594,
0.041778564453125,
0.008270263671875,
0.0153656005859375,
-0.00691986083984375,
-0.051300048828125,
-0.0333251953125,
-0.0285186767578125,
-0.020416259765625,
-0.0361328125,
0.0020732879638671875,
0.01212310791015625,
0.011962890625,
0.004421234130859375,
-0.033203125,
-0.0159454345703125,
0.0022735595703125,
0.0126800537109375,
-0.026123046875,
-0.01189422607421875,
0.016845703125,
-0.0106048583984375,
0.021270751953125,
-0.0019426345825195312,
0.003856658935546875,
0.01224517822265625,
-0.0251007080078125,
0.001987457275390625,
0.004619598388671875,
-0.004421234130859375,
-0.029022216796875,
0.00910186767578125,
-0.02386474609375,
0.0338134765625,
-0.00994873046875,
0.01071929931640625,
-0.01528167724609375,
0.005279541015625,
-0.0185394287109375,
0.0162811279296875,
-0.00836944580078125,
0.0029163360595703125,
-0.006633758544921875,
0.03594970703125,
0.03790283203125,
-0.032470703125,
-0.051666259765625,
-0.0164337158203125,
0.0478515625,
-0.006275177001953125,
-0.03631591796875,
-0.022216796875,
0.019805908203125,
0.051971435546875,
-0.0048828125,
0.022186279296875,
0.0035190582275390625,
0.005016326904296875,
0.017974853515625,
0.01666259765625,
-0.006549835205078125,
-0.025054931640625,
0.008392333984375,
-0.0034694671630859375,
-0.016632080078125,
-0.0113983154296875,
-0.01313018798828125,
0.00180816650390625,
0.04046630859375,
0.056549072265625,
-0.06280517578125,
0.0026569366455078125,
0.014739990234375,
-0.032623291015625,
-0.036773681640625,
0.0008063316345214844,
0.007366180419921875,
-0.03424072265625,
0.038055419921875,
0.0178375244140625,
-0.01043701171875,
0.004123687744140625,
-0.0161895751953125,
-0.006641387939453125,
-0.0089263916015625,
0.0374755859375,
0.024322509765625,
-0.053985595703125,
0.04632568359375,
0.01300811767578125,
0.036163330078125,
-0.01776123046875,
0.0098114013671875,
-0.0242919921875,
-0.019561767578125,
-0.0182342529296875,
0.01464080810546875,
-0.0157623291015625,
0.020538330078125,
0.021636962890625,
0.03155517578125,
0.024078369140625,
0.03497314453125,
-0.0003764629364013672,
0.020965576171875,
-0.0032672882080078125,
0.03814697265625,
-0.0031299591064453125,
-0.0208587646484375,
0.01523590087890625,
0.016876220703125,
-0.004177093505859375,
0.0189666748046875,
-0.004665374755859375,
-0.033843994140625,
-0.002048492431640625,
0.08367919921875,
0.1055908203125,
-0.0220489501953125,
-0.0506591796875,
0.041595458984375,
-0.00797271728515625,
-0.0181732177734375,
-0.037261962890625,
0.00963592529296875,
-0.050933837890625,
-0.014190673828125,
-0.0190582275390625,
-0.0153045654296875,
0.017425537109375,
-0.03460693359375,
0.0012178421020507812,
0.052581787109375,
0.020538330078125,
-0.032684326171875,
0.033203125,
0.02423095703125,
-0.049041748046875,
0.013427734375,
-0.038482666015625,
0.01270294189453125,
-0.02911376953125,
0.03411865234375,
-0.05242919921875,
-0.0055694580078125,
0.00246429443359375,
0.023223876953125,
-0.028228759765625,
0.0004010200500488281,
-0.0309600830078125,
0.0004811286926269531,
0.016510009765625,
-0.0188140869140625,
-0.0125274658203125,
0.0517578125,
0.01409149169921875,
0.001613616943359375,
0.0003383159637451172,
-0.0213623046875,
0.02490234375,
-0.066650390625,
0.006969451904296875,
0.0220184326171875,
-0.003208160400390625,
-0.019287109375,
0.01148223876953125,
0.046966552734375,
-0.0234832763671875,
-0.00545501708984375,
0.009490966796875,
-0.01715087890625,
0.00717926025390625,
-0.0006384849548339844,
-0.0007739067077636719,
0.010101318359375,
-0.04217529296875,
0.00972747802734375,
0.0221099853515625,
0.0037555694580078125,
0.006145477294921875,
0.01062774658203125,
0.0193328857421875,
-0.0035419464111328125,
-0.0081024169921875,
-0.00955963134765625,
0.0242767333984375,
-0.0206756591796875,
0.0853271484375,
-0.004619598388671875,
0.03338623046875,
-0.060394287109375,
-0.007259368896484375,
-0.01511383056640625,
0.07550048828125,
-0.059326171875,
-0.051239013671875,
-0.0067901611328125,
-0.01309967041015625,
0.02996826171875,
0.00855255126953125,
0.0297088623046875,
-0.0099639892578125,
-0.0035247802734375,
-0.01190948486328125,
-0.01000213623046875,
-0.0017347335815429688,
-0.001750946044921875,
0.01334381103515625,
0.00421142578125,
0.015960693359375,
-0.0010442733764648438,
-0.0172271728515625,
0.022979736328125,
0.00909423828125,
0.0021820068359375,
-0.020843505859375,
0.056060791015625,
0.0245819091796875,
0.0052642822265625,
-0.00057220458984375,
0.0377197265625,
-0.0543212890625,
0.016571044921875,
-0.06475830078125,
-0.09881591796875,
-0.0018491744995117188,
0.0648193359375,
-0.0022754669189453125,
0.0322265625,
0.043121337890625,
0.03082275390625,
-0.0218963623046875,
-0.001361846923828125,
0.07855224609375,
-0.014007568359375,
-0.071533203125,
-0.02099609375,
-0.08587646484375,
-0.0242462158203125,
-0.016387939453125,
0.043121337890625,
0.0008306503295898438,
-0.03863525390625,
0.048583984375,
-0.00792694091796875,
0.041351318359375,
0.00885009765625,
0.034332275390625,
0.03228759765625,
-0.00016987323760986328,
0.0693359375,
-0.034088134765625,
-0.02203369140625,
0.0428466796875,
0.010009765625,
-0.0313720703125,
0.00797271728515625,
-0.0206756591796875,
0.04827880859375,
-0.06878662109375,
0.0294952392578125,
0.02349853515625,
-0.05548095703125,
-0.019439697265625,
0.046173095703125,
0.0350341796875,
-0.00438690185546875,
-0.0391845703125,
-0.0328369140625,
-0.04156494140625,
0.050079345703125,
0.00305938720703125,
0.156494140625,
-0.08001708984375,
0.018463134765625,
0.007663726806640625,
-0.05609130859375,
0.05889892578125,
0.034423828125,
-0.0506591796875,
0.043609619140625,
0.007167816162109375,
-0.03369140625,
-0.0234375,
-0.01039886474609375,
0.060150146484375,
-0.0548095703125,
-0.032257080078125,
0.038726806640625,
0.0189056396484375,
-0.037628173828125,
-0.0176544189453125,
-0.0278472900390625,
-0.056304931640625,
0.00916290283203125,
0.02532958984375,
-0.013519287109375,
0.0187835693359375,
-0.0189361572265625,
0.034271240234375,
0.035186767578125,
-0.008148193359375,
0.036834716796875,
-0.043121337890625,
0.07720947265625,
0.035919189453125,
-0.002651214599609375,
-0.03656005859375,
0.0300140380859375,
-0.00927734375,
-0.00908660888671875,
0.0185394287109375,
0.0343017578125,
0.017730712890625,
-0.036224365234375,
-0.003185272216796875,
0.037353515625,
0.034423828125,
-0.038787841796875,
0.027191162109375,
0.0147247314453125,
-0.0006136894226074219,
0.03955078125,
-0.0030193328857421875,
-0.0230255126953125,
-0.01480865478515625,
-0.01404571533203125,
0.017120361328125,
-0.023651123046875,
-0.0286102294921875,
-0.07177734375,
-0.049163818359375,
0.030853271484375,
-0.006999969482421875,
0.01776123046875,
-0.0116119384765625,
-0.01120758056640625,
-0.050537109375,
0.017822265625,
-0.00386810302734375,
-0.0178375244140625,
0.01184844970703125,
-0.0283050537109375,
-0.07208251953125,
-0.047698974609375,
0.055267333984375,
-0.058380126953125,
0.00907135009765625,
0.0418701171875,
-0.036163330078125,
-0.05224609375,
-0.038543701171875,
0.0198211669921875,
-0.0017747879028320312,
0.031494140625,
-0.01812744140625,
0.04010009765625,
-0.012359619140625,
-0.0230712890625,
-0.04132080078125,
0.0173187255859375,
-0.06463623046875,
-0.0111083984375,
0.018310546875,
-0.042449951171875,
-0.0179290771484375,
-0.06304931640625,
-0.07464599609375,
0.04052734375,
0.0037746429443359375,
-0.045440673828125,
-0.068603515625,
0.0026302337646484375,
-0.0021209716796875,
0.005764007568359375,
-0.0197906494140625,
-0.02667236328125,
-0.025299072265625,
0.052581787109375,
0.0228729248046875,
0.041412353515625,
0.0211029052734375,
0.026641845703125,
0.0003237724304199219,
0.027099609375,
-0.003803253173828125,
0.01435089111328125,
-0.02685546875,
0.0248870849609375,
0.016143798828125,
0.019287109375,
-0.01381683349609375,
0.055572509765625,
0.023040771484375,
0.0186004638671875,
0.005512237548828125,
0.00011521577835083008,
-0.0104827880859375,
0.0018835067749023438,
0.039337158203125,
0.023681640625,
0.007175445556640625,
-0.02825927734375,
0.059326171875,
-0.01345062255859375,
-0.078125,
-0.006744384765625,
0.0184173583984375,
-0.0299530029296875,
-0.00445556640625,
-0.0132904052734375,
0.0238494873046875,
0.044525146484375,
-0.06451416015625,
-0.002117156982421875,
-0.0204315185546875,
-0.0278472900390625,
-0.0128021240234375,
-0.007663726806640625,
-0.01250457763671875,
-0.015960693359375,
0.0003731250762939453,
-0.0179290771484375,
0.005123138427734375,
0.00911712646484375,
-0.0276336669921875,
0.067626953125,
-0.0005888938903808594,
0.025177001953125,
-0.0039825439453125,
-0.013427734375,
0.036590576171875,
-0.022186279296875,
0.0369873046875,
0.0007476806640625,
0.01207733154296875,
0.020416259765625,
-0.00800323486328125,
0.0286712646484375,
0.006206512451171875,
0.01335906982421875,
-0.0157623291015625,
0.0784912109375,
-0.021392822265625,
0.01169586181640625,
-0.000942230224609375,
0.0032939910888671875,
-0.04296875,
0.01922607421875,
-0.00444793701171875,
-0.0304412841796875,
0.0293731689453125,
0.00833892822265625,
0.034942626953125,
-0.00279998779296875,
0.00963592529296875,
-0.052490234375,
-0.007808685302734375,
0.00435638427734375
] |
e5ccfb4326bd62c42ce2267459b5f7aa5e0b726f
|
Wordpress Stackexchange
Q: What params are available with the_content filter? I am looking for what params are passed to my filter function. Where can I find such info in the codex?
http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content didn't provide much info
I wanted to know if the post is a child of another
A: I don't think there are any additional parameters passed, per se, to the_content, but global variables like $post are accessible.
So something like this would work:
add_filter( 'the_content', 'check_for_post_parent' );
function check_for_post_parent($content) {
global $post;
if ($parent_id == $post->post_parent) {
//do what you want to $content here,
//now that you know $parent_id
//...
}
return $content;
}
|
Q: What params are available with the_content filter? I am looking for what params are passed to my filter function. Where can I find such info in the codex?
http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content didn't provide much info
I wanted to know if the post is a child of another
A: I don't think there are any additional parameters passed, per se, to the_content, but global variables like $post are accessible.
So something like this would work:
add_filter( 'the_content', 'check_for_post_parent' );
function check_for_post_parent($content) {
global $post;
if ($parent_id == $post->post_parent) {
//do what you want to $content here,
//now that you know $parent_id
//...
}
return $content;
}
A: In wp-includes/post-template.php you’ll find the place, where the filters are applied:
/**
* Display the post content.
*
* @since 0.71
*
* @param string $more_link_text Optional. Content for when there is more text.
* @param string $stripteaser Optional. Teaser content before the more text.
*/
function the_content($more_link_text = null, $stripteaser = 0) {
$content = get_the_content($more_link_text, $stripteaser);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;
}
The only parameter is the content text.
But you can always use the global variable $post to get more information about the currently used post. Try the following snippet in your theme’s functions.php:
/*
* Priority 100 to let other filters do their work first.
*/
add_filter( 'the_content', 'debug_post_info', 100 );
/**
* Print information about the current post.
*
* @param string $content
* @return string
*/
function debug_post_info( $content )
{
return $content . '<hr><pre>' . var_export( $GLOBALS['post'], TRUE ) . '</pre>';
}
On a child page you get some nice data:
stdClass::__set_state(array(
'ID' => 2168,
'post_author' => '2',
'post_date' => '2007-09-04 09:52:18',
'post_date_gmt' => '2007-09-03 23:52:18',
'post_content' => 'This page has a parent.',
'post_title' => 'Child page 2',
'post_excerpt' => '',
'post_status' => 'publish',
'comment_status' => 'open',
'ping_status' => 'open',
'post_password' => '',
'post_name' => 'child-page-2',
'to_ping' => '',
'pinged' => '',
'post_modified' => '2007-09-04 09:52:18',
'post_modified_gmt' => '2007-09-03 23:52:18',
'post_content_filtered' => '',
'post_parent' => 2167,
'guid' => 'http://wpthemetestdata.wordpress.com/parent-page/child-page-1/child-page-2/',
'menu_order' => 0,
'post_type' => 'page',
'post_mime_type' => '',
'comment_count' => '0',
'ancestors' =>
array (
0 => 2167,
1 => 2166,
),
'filter' => 'raw',
))
'post_parent' => 2167 is the ID of the parent post. On pages without a parent the parameter is set to 0.
|
wordpress
|
{
"language": "en",
"length": 385,
"provenance": "stackexchange_00019.jsonl.gz:407951",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12684"
}
|
[
0.0450439453125,
-0.0155181884765625,
0.041412353515625,
-0.050079345703125,
-0.0125579833984375,
0.007232666015625,
0.0153656005859375,
-0.021484375,
0.0321044921875,
0.00951385498046875,
-0.0220489501953125,
-0.04010009765625,
-0.0001614093780517578,
-0.0345458984375,
-0.024810791015625,
-0.029510498046875,
0.0174407958984375,
0.0019550323486328125,
0.0263214111328125,
-0.0216522216796875,
0.0023517608642578125,
-0.01110076904296875,
0.03631591796875,
0.0233612060546875,
0.039154052734375,
0.0215606689453125,
0.037322998046875,
-0.032470703125,
0.057769775390625,
0.0088043212890625,
0.030731201171875,
-0.058074951171875,
-0.003631591796875,
0.0302886962890625,
-0.00226593017578125,
-0.028778076171875,
0.0193328857421875,
-0.0011653900146484375,
0.02313232421875,
0.01800537109375,
0.04046630859375,
-0.02691650390625,
-0.013671875,
0.038055419921875,
-0.0004837512969970703,
-0.040771484375,
0.033721923828125,
-0.042755126953125,
0.047149658203125,
-0.01303863525390625,
0.039093017578125,
-0.009796142578125,
0.034271240234375,
-0.032196044921875,
-0.01108551025390625,
0.01508331298828125,
0.005901336669921875,
0.0098419189453125,
0.0496826171875,
-0.042236328125,
-0.06707763671875,
-0.0150909423828125,
0.040252685546875,
0.0032291412353515625,
0.0196533203125,
0.0266265869140625,
0.023193359375,
0.01171875,
-0.057037353515625,
0.0172271728515625,
0.040191650390625,
-0.050933837890625,
-0.0008921623229980469,
-0.005615234375,
-0.01226043701171875,
-0.04266357421875,
0.018280029296875,
-0.0283660888671875,
0.01224517822265625,
0.01378631591796875,
-0.0291748046875,
-0.0050048828125,
-0.057525634765625,
0.01030731201171875,
-0.0029239654541015625,
0.03302001953125,
-0.029937744140625,
-0.00225830078125,
-0.0325927734375,
-0.006984710693359375,
-0.0261077880859375,
-0.033905029296875,
-0.005237579345703125,
0.01430511474609375,
-0.01485443115234375,
0.000024259090423583984,
0.056396484375,
0.07745361328125,
-0.048828125,
-0.0208892822265625,
-0.0037364959716796875,
-0.043487548828125,
0.034820556640625,
-0.034576416015625,
0.01221466064453125,
0.0263214111328125,
0.01486968994140625,
0.037384033203125,
0.05224609375,
0.031646728515625,
-0.0008301734924316406,
0.04766845703125,
0.007244110107421875,
-0.0018491744995117188,
-0.04620361328125,
0.01349639892578125,
-0.0007147789001464844,
-0.03131103515625,
-0.007083892822265625,
0.00545501708984375,
-0.006622314453125,
-0.01898193359375,
-0.01397705078125,
0.0289306640625,
0.0213165283203125,
0.0014171600341796875,
-0.034027099609375,
0.0232086181640625,
0.00943756103515625,
0.0035247802734375,
-0.02276611328125,
0.00971221923828125,
0.046966552734375,
0.0243682861328125,
0.0058746337890625,
-0.01103973388671875,
0.03564453125,
0.0058441162109375,
-0.0105438232421875,
-0.0091705322265625,
0.016510009765625,
-0.0127105712890625,
-0.0005030632019042969,
-0.01253509521484375,
0.0203857421875,
0.0179443359375,
0.0238189697265625,
0.0095367431640625,
-0.022369384765625,
-0.04486083984375,
0.024200439453125,
0.0166473388671875,
0.048309326171875,
-0.006160736083984375,
-0.040557861328125,
-0.0163421630859375,
-0.00023090839385986328,
-0.0233612060546875,
-0.04193115234375,
-0.04266357421875,
0.028778076171875,
0.004425048828125,
0.0200958251953125,
-0.0036067962646484375,
-0.02008056640625,
-0.0214691162109375,
-0.0604248046875,
-0.00301361083984375,
0.004913330078125,
-0.00803375244140625,
-0.00449371337890625,
-0.0243072509765625,
-0.051300048828125,
-0.0115203857421875,
-0.0081024169921875,
0.01352691650390625,
-0.0208740234375,
0.0252532958984375,
0.0260772705078125,
0.031768798828125,
0.01300048828125,
-0.0282135009765625,
0.041412353515625,
0.0128173828125,
-0.0145263671875,
0.0163421630859375,
0.01534271240234375,
0.006992340087890625,
-0.01413726806640625,
0.0015382766723632812,
0.031280517578125,
0.038238525390625,
-0.055450439453125,
0.0268096923828125,
-0.01381683349609375,
-0.0274658203125,
0.00778961181640625,
-0.01366424560546875,
0.0030269622802734375,
0.020538330078125,
0.05224609375,
-0.0151214599609375,
0.02862548828125,
-0.0272216796875,
-0.0190277099609375,
-0.0230560302734375,
0.005870819091796875,
0.0060272216796875,
-0.0276641845703125,
0.01103973388671875,
0.0270843505859375,
0.01108551025390625,
-0.0369873046875,
-0.01194000244140625,
-0.0283050537109375,
0.00415802001953125,
-0.006633758544921875,
-0.007110595703125,
-0.00406646728515625,
0.0267791748046875,
-0.03485107421875,
0.002117156982421875,
-0.05377197265625,
-0.0173797607421875,
0.0855712890625,
0.0106201171875,
0.005035400390625,
0.004047393798828125,
0.0823974609375,
0.043060302734375,
-0.05364990234375,
-0.01605224609375,
0.05462646484375,
0.0010814666748046875,
-0.01349639892578125,
0.005523681640625,
0.0234222412109375,
-0.09283447265625,
-0.004550933837890625,
0.051513671875,
0.040557861328125,
0.0784912109375,
0.002796173095703125,
-0.0157470703125,
0.1212158203125,
-0.044525146484375,
-0.0283660888671875,
-0.0053558349609375,
0.0323486328125,
0.06500244140625,
-0.032318115234375,
-0.0225677490234375,
0.0171356201171875,
-0.05877685546875,
0.01058197021484375,
0.025665283203125,
-0.00029969215393066406,
-0.009857177734375,
-0.0131683349609375,
0.0119171142578125,
0.00859832763671875,
0.0082244873046875,
-0.018798828125,
0.021087646484375,
-0.00012177228927612305,
0.004619598388671875,
0.0189666748046875,
0.0190277099609375,
0.003543853759765625,
-0.01241302490234375,
0.00968170166015625,
-0.005615234375,
0.00434112548828125,
0.03155517578125,
0.0086212158203125,
-0.0196380615234375,
-0.001995086669921875,
-0.0099334716796875,
-0.0018787384033203125,
-0.006580352783203125,
0.00496673583984375,
0.037750244140625,
-0.0084686279296875,
-0.0012102127075195312,
-0.0301666259765625,
-0.0013341903686523438,
0.0263671875,
0.052947998046875,
0.036407470703125,
-0.021575927734375,
0.0189361572265625,
0.002532958984375,
-0.0065155029296875,
0.02947998046875,
-0.00905609130859375,
-0.0360107421875,
-0.001049041748046875,
-0.032928466796875,
0.044830322265625,
-0.042449951171875,
-0.00774383544921875,
0.032196044921875,
-0.021148681640625,
-0.0200347900390625,
0.0067901611328125,
0.04638671875,
0.01381683349609375,
0.021026611328125,
0.0166778564453125,
0.01029205322265625,
-0.026153564453125,
-0.005100250244140625,
-0.0007338523864746094,
0.004787445068359375,
-0.014739990234375,
-0.040618896484375,
-0.03363037109375,
-0.0128021240234375,
-0.06951904296875,
-0.0181427001953125,
-0.014739990234375,
-0.0643310546875,
-0.037139892578125,
0.00803375244140625,
-0.040191650390625,
0.01763916015625,
0.01074981689453125,
-0.004058837890625,
-0.0335693359375,
-0.031402587890625,
-0.09906005859375,
-0.05096435546875,
-0.0728759765625,
0.08905029296875,
-0.0244598388671875,
0.039581298828125,
0.0033550262451171875,
0.08013916015625,
0.01190948486328125,
-0.07843017578125,
-0.018707275390625,
0.00824737548828125,
-0.028717041015625,
-0.002063751220703125,
-0.01145172119140625,
-0.00798797607421875,
-0.004581451416015625,
-0.00508880615234375,
0.01537322998046875,
0.019775390625,
-0.0250091552734375,
0.01044464111328125,
-0.0181884765625,
0.038421630859375,
0.0237579345703125,
-0.004730224609375,
0.0182037353515625,
0.0100555419921875,
0.023681640625,
-0.03826904296875,
-0.0214080810546875,
-0.030731201171875,
-0.060272216796875,
0.04168701171875,
0.049407958984375,
0.0142059326171875,
-0.01335906982421875,
0.006458282470703125,
-0.005741119384765625,
-0.007656097412109375,
0.0028209686279296875,
-0.034698486328125,
0.03326416015625,
0.0094757080078125,
0.025238037109375,
0.005954742431640625,
-0.000012695789337158203,
-0.0303497314453125,
0.0250091552734375,
0.0022068023681640625,
0.007350921630859375,
0.00957489013671875,
0.01285552978515625,
0.0018415451049804688,
-0.0302276611328125,
0.060333251953125,
0.042449951171875,
0.047271728515625,
-0.03900146484375,
-0.051239013671875,
-0.041595458984375,
0.08447265625,
-0.01042938232421875,
-0.01934814453125,
-0.022247314453125,
-0.0009794235229492188,
-0.020721435546875,
-0.039520263671875,
0.0017452239990234375,
-0.01519012451171875,
-0.03375244140625,
0.00760650634765625,
-0.027740478515625,
0.0004000663757324219,
-0.01285552978515625,
-0.028533935546875,
-0.01071929931640625,
-0.021209716796875,
0.04144287109375,
-0.01016998291015625,
-0.020843505859375,
0.01070404052734375,
-0.03302001953125,
-0.0186309814453125,
-0.044403076171875,
0.02764892578125,
-0.0616455078125,
-0.025115966796875,
-0.0172271728515625,
0.053131103515625,
0.038299560546875,
-0.049896240234375,
0.006938934326171875,
0.04180908203125,
0.010589599609375,
0.051300048828125,
0.0173492431640625,
-0.005489349365234375,
0.038604736328125,
0.0004062652587890625,
0.029083251953125,
-0.016632080078125,
-0.0275421142578125,
-0.01373291015625,
-0.007343292236328125,
0.01279449462890625,
-0.030120849609375,
-0.031585693359375,
-0.008880615234375,
-0.0157012939453125,
-0.052459716796875,
-0.039031982421875,
-0.07647705078125,
-0.038116455078125,
-0.0491943359375,
-0.007781982421875,
-0.0297088623046875,
-0.06878662109375,
0.05560302734375,
0.015838623046875,
-0.026336669921875,
-0.010833740234375,
0.07183837890625,
0.0252838134765625,
-0.040740966796875,
-0.01403045654296875,
-0.03936767578125,
-0.007419586181640625,
-0.04638671875,
0.0611572265625,
0.00289154052734375,
0.006679534912109375,
0.06494140625,
-0.034149169921875,
0.0081329345703125,
0.00457000732421875,
0.066650390625,
0.0211639404296875,
0.006244659423828125,
0.0189971923828125,
0.0255584716796875,
-0.0249481201171875,
0.006866455078125,
-0.04315185546875,
-0.0233154296875,
-0.037628173828125,
0.056060791015625,
-0.04779052734375,
0.09368896484375,
-0.046417236328125,
-0.03363037109375,
0.0182037353515625,
-0.01116943359375,
0.0276031494140625,
0.0272674560546875,
-0.0169677734375,
0.0164947509765625,
-0.0181121826171875,
0.012847900390625,
0.01303863525390625,
0.052337646484375,
-0.00482940673828125,
0.07489013671875,
-0.0293121337890625,
0.00867462158203125,
-0.026611328125,
-0.007282257080078125,
0.01433563232421875,
-0.02398681640625,
-0.053680419921875,
0.0306396484375,
-0.0227813720703125,
-0.007282257080078125,
0.03289794921875,
0.00048732757568359375,
-0.0174102783203125,
0.034820556640625,
-0.01316070556640625,
0.0021305084228515625,
0.0297698974609375,
0.038787841796875,
-0.0117950439453125,
0.0021228790283203125,
-0.035247802734375,
0.0017805099487304688,
0.04248046875,
0.01422119140625,
-0.039306640625,
0.04278564453125,
-0.009521484375,
-0.00823211669921875,
-0.00179290771484375,
0.03643798828125,
0.034942626953125,
-0.050506591796875,
0.016387939453125,
0.008392333984375,
0.031005859375,
-0.0203399658203125,
-0.055694580078125,
0.0225372314453125,
0.02044677734375,
-0.0406494140625,
0.02734375,
0.014678955078125,
0.036712646484375,
-0.040985107421875,
-0.0169219970703125,
0.016510009765625,
0.005207061767578125,
-0.00592803955078125,
-0.01226806640625,
-0.005084991455078125,
0.07049560546875,
-0.0224761962890625,
-0.03741455078125,
-0.04150390625,
-0.006633758544921875,
0.007167816162109375,
-0.039154052734375,
0.0260467529296875,
0.0108489990234375,
0.0308990478515625,
-0.019500732421875,
-0.010467529296875,
-0.057952880859375,
0.0037288665771484375,
-0.034271240234375,
0.0094757080078125,
0.0706787109375,
-0.020477294921875,
0.0428466796875,
-0.008514404296875,
-0.027099609375,
0.0008540153503417969,
0.003902435302734375,
0.06439208984375,
0.038909912109375,
-0.0130615234375,
-0.0006704330444335938,
-0.06201171875,
-0.0301971435546875,
-0.052215576171875,
-0.0179901123046875,
-0.041656494140625,
0.0163116455078125,
-0.04107666015625,
-0.006053924560546875,
0.0031528472900390625,
0.04449462890625,
-0.004123687744140625,
0.0179290771484375,
-0.021453857421875,
-0.0228729248046875,
-0.00014901161193847656,
0.083251953125,
-0.0345458984375,
0.05242919921875,
0.013336181640625,
0.01126861572265625,
-0.04296875,
-0.0052947998046875,
0.01025390625,
-0.027099609375,
-0.0175323486328125,
0.0187835693359375,
-0.00487518310546875,
-0.0179901123046875,
-0.005588531494140625,
-0.01282501220703125,
0.03564453125,
-0.0245208740234375,
-0.0071258544921875,
-0.00228118896484375,
0.0122833251953125,
-0.029632568359375,
-0.01293182373046875,
0.041412353515625,
-0.0285797119140625,
-0.0103607177734375,
-0.01544952392578125,
-0.0084075927734375,
0.0271759033203125,
-0.01250457763671875,
0.01776123046875,
0.0213623046875,
-0.05029296875,
0.064208984375,
0.08880615234375,
0.01334381103515625,
0.067626953125,
0.01153564453125,
0.023284912109375,
0.038116455078125,
-0.00853729248046875,
-0.0011415481567382812,
-0.00830078125,
0.0038547515869140625,
-0.0079803466796875,
0.006317138671875,
-0.00572967529296875,
-0.0205230712890625,
-0.0038852691650390625,
-0.0310821533203125,
0.01641845703125,
-0.0014657974243164062,
0.022430419921875,
0.011627197265625,
-0.002262115478515625,
0.0202178955078125,
0.01407623291015625,
-0.00269317626953125,
0.031707763671875,
-0.01044464111328125,
-0.011138916015625,
-0.020751953125,
0.026824951171875,
0.01003265380859375,
-0.0169830322265625,
-0.024017333984375,
-0.027801513671875,
-0.0099639892578125,
0.03253173828125,
-0.00930023193359375,
-0.0283203125,
-0.006389617919921875,
-0.01222991943359375,
0.03955078125,
-0.029998779296875,
-0.0171356201171875,
-0.042816162109375,
-0.012054443359375,
-0.00258636474609375,
-0.023773193359375,
-0.01184844970703125,
-0.0218048095703125,
0.01515960693359375,
0.05364990234375,
-0.0262451171875,
0.0005383491516113281,
0.04608154296875,
-0.051422119140625,
-0.05438232421875,
-0.02294921875,
0.02276611328125,
0.02899169921875,
-0.06842041015625,
0.040618896484375,
-0.053314208984375,
-0.0064239501953125,
0.00919342041015625,
-0.04620361328125,
0.024688720703125,
-0.0174560546875,
-0.01306915283203125,
0.0267791748046875,
-0.0138092041015625,
-0.0154876708984375,
-0.01218414306640625,
0.0050201416015625,
-0.0423583984375,
-0.0249786376953125,
-0.00618743896484375,
-0.026031494140625,
0.00006437301635742188,
-0.01261138916015625,
-0.08544921875,
0.125,
0.00682830810546875,
0.03570556640625,
-0.0021076202392578125,
0.039947509765625,
-0.04779052734375,
-0.007732391357421875,
-0.0545654296875,
0.04388427734375,
0.0474853515625,
0.06756591796875,
-0.06591796875,
-0.02740478515625,
0.01470184326171875,
0.06134033203125,
0.06951904296875,
0.00876617431640625,
-0.037353515625,
-0.040557861328125,
0.0179595947265625,
0.036041259765625,
0.0014238357543945312,
0.046356201171875,
0.0251617431640625,
0.03643798828125,
0.04150390625,
-0.048095703125,
0.0227203369140625,
-0.043182373046875,
0.040374755859375,
0.050445556640625,
-0.0004119873046875,
-0.01132965087890625,
0.00896453857421875,
0.0039520263671875,
0.00041294097900390625,
-0.01557159423828125,
0.009552001953125,
-0.06231689453125,
0.006473541259765625,
0.03521728515625,
0.01525115966796875,
-0.05999755859375,
-0.0213775634765625,
-0.0301055908203125,
0.0408935546875,
-0.0121002197265625,
0.0245208740234375,
0.0311126708984375,
0.03131103515625,
0.00818634033203125,
-0.0072479248046875,
0.0254974365234375,
0.034576416015625,
-0.05194091796875,
0.0218505859375,
0.017242431640625,
-0.00749969482421875,
-0.048248291015625,
0.021636962890625,
0.042572021484375,
0.0291290283203125,
-0.03338623046875,
-0.059722900390625,
0.010955810546875,
-0.005077362060546875,
0.01467132568359375,
-0.00201416015625,
-0.0043487548828125,
-0.005374908447265625,
0.02691650390625,
-0.059173583984375,
-0.0219268798828125,
0.039703369140625,
0.00986480712890625,
0.0032825469970703125,
0.0038661956787109375,
-0.01099395751953125,
-0.0256805419921875,
-0.01136016845703125,
-0.039093017578125,
0.034332275390625,
0.069580078125,
0.035400390625,
0.054351806640625,
-0.031402587890625,
-0.034027099609375,
0.01152801513671875,
-0.0078125,
0.0056304931640625,
-0.00868988037109375,
0.01053619384765625,
-0.0022144317626953125,
-0.007579803466796875,
0.01474761962890625,
0.02996826171875,
0.01110076904296875,
0.0321044921875,
0.0227813720703125,
-0.036773681640625,
-0.00798797607421875,
0.022247314453125,
-0.02056884765625,
0.037567138671875,
-0.037872314453125,
0.004062652587890625,
-0.00536346435546875,
-0.01168060302734375,
-0.0276031494140625,
-0.0105133056640625,
0.0374755859375,
0.01922607421875,
0.0263824462890625,
0.01080322265625,
-0.0100250244140625,
0.01690673828125,
0.0161285400390625,
0.0232391357421875,
0.0286102294921875,
-0.0882568359375,
-0.01354217529296875,
-0.00335693359375,
-0.0672607421875,
0.03314208984375,
0.046905517578125,
-0.0172882080078125,
0.005035400390625,
0.0199127197265625,
-0.0411376953125,
-0.001316070556640625,
0.003993988037109375,
0.0276336669921875,
0.016143798828125,
-0.0126190185546875,
0.001911163330078125,
0.01371002197265625,
0.01038360595703125,
0.01416015625,
0.0091400146484375,
0.0134429931640625,
0.069580078125,
-0.020538330078125,
0.01068115234375,
-0.001880645751953125,
0.0227203369140625,
-0.032318115234375,
-0.004833221435546875,
0.0192413330078125,
-0.019866943359375,
0.00838470458984375,
0.0037021636962890625,
-0.024505615234375,
0.020050048828125,
0.05218505859375,
-0.003475189208984375,
0.0299072265625,
-0.0184173583984375,
0.0147857666015625,
-0.055267333984375,
0.045562744140625,
-0.00811767578125,
0.00848388671875,
-0.0443115234375,
-0.0357666015625,
0.06756591796875,
0.033538818359375,
-0.0008697509765625,
0.020843505859375,
0.0450439453125,
-0.01111602783203125,
0.038818359375,
-0.01055908203125,
0.059906005859375,
0.035736083984375,
-0.0300750732421875,
-0.0096893310546875,
0.0257720947265625,
-0.0088958740234375,
0.0242462158203125,
0.0154876708984375,
0.01715087890625,
0.01410675048828125,
-0.02252197265625,
-0.034881591796875,
0.0302886962890625,
0.032684326171875,
-0.0233612060546875,
0.0200042724609375,
0.03216552734375,
-0.0203399658203125,
-0.021636962890625,
-0.0240936279296875,
-0.011688232421875,
-0.054718017578125,
-0.0213623046875,
-0.008392333984375,
-0.02459716796875,
-0.04510498046875,
-0.00926971435546875,
0.00951385498046875,
0.061309814453125,
0.00860595703125,
-0.04278564453125,
0.002758026123046875,
-0.031982421875,
0.045867919921875,
0.00910186767578125,
0.038818359375,
-0.0145721435546875,
-0.0225677490234375,
-0.05157470703125,
0.016998291015625,
-0.045074462890625,
-0.001766204833984375,
-0.0028476715087890625,
0.046875,
0.051300048828125,
-0.04510498046875,
-0.033477783203125,
0.0694580078125,
0.0306243896484375,
0.10797119140625,
-0.002666473388671875,
-0.034149169921875,
0.01091766357421875,
-0.0011453628540039062,
-0.007625579833984375,
0.00312042236328125,
0.032684326171875,
-0.03045654296875,
-0.054779052734375,
-0.024383544921875,
-0.00411224365234375,
0.0026683807373046875,
-0.04864501953125,
-0.08734130859375,
0.036376953125,
-0.019622802734375,
-0.041229248046875,
-0.02215576171875,
0.0044708251953125,
0.0122833251953125,
-0.03082275390625,
0.015777587890625,
-0.030364990234375,
-0.045013427734375,
0.01123046875,
0.001056671142578125,
0.019989013671875,
0.01126861572265625,
-0.0205841064453125,
-0.034637451171875,
0.01349639892578125,
0.0187225341796875,
-0.0037136077880859375,
0.00496673583984375,
0.002349853515625,
0.015533447265625,
0.058197021484375,
-0.018402099609375,
-0.0196075439453125,
-0.01238250732421875,
-0.041595458984375,
-0.0113372802734375,
-0.0220947265625,
0.01154327392578125,
0.0196075439453125,
0.046417236328125,
0.022308349609375,
0.004913330078125,
-0.045501708984375,
0.0088043212890625,
-0.01335906982421875,
-0.0618896484375,
0.01361083984375,
0.0287322998046875,
-0.039764404296875,
-0.0010852813720703125,
0.004367828369140625,
0.0213165283203125,
-0.0259246826171875,
-0.01263427734375,
-0.0021076202392578125,
-0.038360595703125,
0.0237274169921875,
0.02496337890625,
-0.009429931640625,
-0.02716064453125,
0.012298583984375,
-0.01482391357421875,
-0.00960540771484375,
0.006160736083984375,
0.01824951171875,
-0.0172882080078125,
0.05078125,
0.019805908203125,
0.042083740234375,
-0.03564453125,
-0.00455474853515625,
0.0234832763671875,
0.023162841796875,
-0.0084991455078125,
-0.0027980804443359375,
-0.0292816162109375,
-0.0018491744995117188,
0.0129241943359375,
-0.02301025390625,
-0.0282745361328125,
0.06500244140625,
0.001758575439453125,
0.08709716796875,
-0.000057816505432128906,
0.043426513671875,
0.005573272705078125,
0.037017822265625,
-0.02197265625,
-0.0124969482421875,
-0.01079559326171875,
-0.0290374755859375,
0.0015697479248046875,
-0.023162841796875,
0.011474609375,
-0.034332275390625,
0.025421142578125,
-0.041656494140625,
-0.0215911865234375,
0.02044677734375
] |
f03082340d3e30ec5c90e07b1d0d47d9b3f6c014
|
Wordpress Stackexchange
Q: How to make search engine index PDF files? I'm looking for a plugin or a idea so that my WP 3.1 search engine can index PDF files. Has anyone be through that need too ?
Thanks !
A: The standard WordPress search is pretty basic and only search the database, there are some plugins that extend the search functionality to search even more parts of the database like:
*
*Search Everything
*Search Unleashed
but they do not have the ability to search files.
There is one plugin that i know of that claims to support indexing PDF and DOC files
*
*Sphider for WordPress
which is a bit outdated and i have tried before so you might want to check it out.
But the best solution I have used for this kind of "Job" is Google custom search
that searchs PDFs and DOCs and is fairly easy to set up.
|
Q: How to make search engine index PDF files? I'm looking for a plugin or a idea so that my WP 3.1 search engine can index PDF files. Has anyone be through that need too ?
Thanks !
A: The standard WordPress search is pretty basic and only search the database, there are some plugins that extend the search functionality to search even more parts of the database like:
*
*Search Everything
*Search Unleashed
but they do not have the ability to search files.
There is one plugin that i know of that claims to support indexing PDF and DOC files
*
*Sphider for WordPress
which is a bit outdated and i have tried before so you might want to check it out.
But the best solution I have used for this kind of "Job" is Google custom search
that searchs PDFs and DOCs and is fairly easy to set up.
A: You can use SearchBlox which provides a plugin to connect the search server with Wordpress
A: This plugin searches inside PDF contents:
https://searchwp.com/
From the home page:
Index PDF content automatically
Index the PDFs within your Media library, allowing visitors to find content from those documents in your site search.
A: I have found one solution. Maybe it will work for you also :
Masala Plugin : https://github.com/nanodust/masala , which actually add new post meta field while uploading any doc/pdf/ppt/txt file. It will put the file content into newly created meta field
This plugin uses :
1) Java
2) Apache Tika – really awesome
3) Search Everything plugin which is responsible for search in meta table.
Here, you need to configure :
1) Java path
2) Download latest apache tika jar and you can put into your project root folder and configure path in masala.php
4) Give the allowed file extensions.
ITS DONE !!
|
wordpress
|
{
"language": "en",
"length": 306,
"provenance": "stackexchange_00019.jsonl.gz:407955",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12700"
}
|
[
0.034088134765625,
-0.007080078125,
0.0238800048828125,
0.02215576171875,
-0.011322021484375,
-0.0191192626953125,
0.06341552734375,
-0.03985595703125,
0.043548583984375,
0.0396728515625,
-0.0280303955078125,
0.002895355224609375,
0.009857177734375,
-0.0034656524658203125,
-0.0472412109375,
-0.007526397705078125,
0.0180206298828125,
-0.0126953125,
0.037506103515625,
0.01171112060546875,
0.03155517578125,
0.0164642333984375,
0.0290374755859375,
-0.06103515625,
0.02386474609375,
-0.0223846435546875,
0.08319091796875,
-0.0172271728515625,
0.036590576171875,
-0.0035305023193359375,
0.0248260498046875,
-0.048828125,
0.02392578125,
0.0099945068359375,
-0.0120697021484375,
-0.00807952880859375,
0.0006265640258789062,
0.0074310302734375,
-0.0009565353393554688,
0.0162200927734375,
0.03619384765625,
-0.011138916015625,
-0.044189453125,
0.0128631591796875,
-0.0194854736328125,
-0.053131103515625,
0.038299560546875,
-0.03387451171875,
0.0360107421875,
0.0302734375,
-0.0244598388671875,
0.047760009765625,
-0.0214996337890625,
-0.053741455078125,
0.0090179443359375,
-0.018218994140625,
0.0306854248046875,
0.044525146484375,
0.011627197265625,
-0.08441162109375,
-0.033294677734375,
0.04681396484375,
0.02484130859375,
0.07684326171875,
-0.0166015625,
-0.001819610595703125,
-0.06512451171875,
0.0224151611328125,
0.009613037109375,
-0.01549530029296875,
0.0004496574401855469,
-0.034820556640625,
0.01461029052734375,
-0.014801025390625,
-0.0112762451171875,
-0.01242828369140625,
0.0220794677734375,
-0.01110076904296875,
0.00035572052001953125,
0.0156402587890625,
0.017669677734375,
-0.015045166015625,
-0.0318603515625,
-0.028106689453125,
0.0179443359375,
-0.01087188720703125,
0.003498077392578125,
-0.00838470458984375,
-0.0183563232421875,
-0.01195526123046875,
-0.0182952880859375,
0.024749755859375,
-0.0067138671875,
-0.01514434814453125,
-0.045745849609375,
-0.01032257080078125,
-0.017730712890625,
-0.01494598388671875,
0.01242828369140625,
0.040435791015625,
0.03253173828125,
-0.042633056640625,
0.049163818359375,
-0.0212249755859375,
-0.01055145263671875,
0.0538330078125,
0.0280303955078125,
0.0185546875,
0.005615234375,
-0.0001920461654663086,
0.00856781005859375,
0.01256561279296875,
0.009979248046875,
-0.047332763671875,
0.00775909423828125,
0.0182647705078125,
-0.00560760498046875,
0.0247955322265625,
0.0235595703125,
0.003917694091796875,
0.0110015869140625,
0.01470184326171875,
0.024169921875,
-0.006458282470703125,
-0.021759033203125,
-0.02813720703125,
-0.0238800048828125,
-0.011138916015625,
0.04974365234375,
-0.0204010009765625,
-0.036651611328125,
0.0305328369140625,
0.0443115234375,
0.004894256591796875,
-0.003902435302734375,
0.00021314620971679688,
0.0296783447265625,
-0.01064300537109375,
-0.0007843971252441406,
-0.0107269287109375,
0.006107330322265625,
-0.0029163360595703125,
0.01165771484375,
-0.009796142578125,
0.01338958740234375,
-0.0016622543334960938,
0.035064697265625,
0.0389404296875,
-0.02734375,
-0.0073394775390625,
-0.0017833709716796875,
0.052490234375,
0.0517578125,
-0.0117340087890625,
-0.0298614501953125,
-0.065673828125,
0.0264434814453125,
-0.049285888671875,
0.01436614990234375,
-0.0758056640625,
0.010986328125,
0.013580322265625,
0.01541900634765625,
-0.02191162109375,
0.005462646484375,
-0.03350830078125,
-0.041748046875,
0.01239776611328125,
0.021087646484375,
-0.0231170654296875,
0.0166778564453125,
-0.047607421875,
-0.01690673828125,
0.0175323486328125,
0.00386810302734375,
0.04638671875,
0.0305023193359375,
0.0218505859375,
0.034637451171875,
0.04083251953125,
0.013336181640625,
-0.01062774658203125,
0.1473388671875,
-0.05328369140625,
-0.0173492431640625,
0.00946044921875,
0.017974853515625,
0.034912109375,
-0.0207977294921875,
0.0171661376953125,
0.007778167724609375,
0.032684326171875,
-0.04034423828125,
0.0018453598022460938,
-0.016754150390625,
0.02130126953125,
0.002719879150390625,
0.0298004150390625,
0.00013327598571777344,
-0.0295257568359375,
-0.0433349609375,
0.0179595947265625,
0.01393890380859375,
0.0210418701171875,
0.040069580078125,
0.01110076904296875,
0.004199981689453125,
0.0201568603515625,
0.0017156600952148438,
0.025421142578125,
0.017852783203125,
0.0006833076477050781,
-0.0291290283203125,
0.02264404296875,
-0.007022857666015625,
-0.015411376953125,
-0.0019092559814453125,
-0.005138397216796875,
0.014739990234375,
-0.0112152099609375,
0.03485107421875,
0.0085601806640625,
0.028076171875,
0.025115966796875,
0.01357269287109375,
0.006336212158203125,
-0.0160980224609375,
-0.002498626708984375,
0.025360107421875,
0.0172576904296875,
-0.00725555419921875,
0.005367279052734375,
0.072021484375,
0.084716796875,
-0.015533447265625,
-0.02386474609375,
0.0112762451171875,
-0.04339599609375,
0.0188751220703125,
0.03448486328125,
0.0384521484375,
0.016204833984375,
-0.00807952880859375,
-0.0191802978515625,
0.045318603515625,
-0.0540771484375,
0.00916290283203125,
-0.0152740478515625,
0.01552581787109375,
0.049041748046875,
-0.016143798828125,
0.004001617431640625,
0.016204833984375,
0.01515960693359375,
-0.0176239013671875,
0.052154541015625,
0.017974853515625,
0.0181884765625,
-0.04315185546875,
0.0255279541015625,
0.0028095245361328125,
0.0074005126953125,
-0.0258331298828125,
-0.0010156631469726562,
-0.01263427734375,
0.01293182373046875,
0.052703857421875,
0.060699462890625,
0.00005263090133666992,
-0.03277587890625,
0.0009312629699707031,
0.06170654296875,
0.0184173583984375,
0.046875,
0.004390716552734375,
0.046051025390625,
-0.0209503173828125,
-0.0227508544921875,
0.0419921875,
0.04248046875,
0.007556915283203125,
0.0084075927734375,
-0.0255584716796875,
-0.00363922119140625,
0.0022373199462890625,
0.0035991668701171875,
0.0022068023681640625,
0.0265350341796875,
-0.006717681884765625,
-0.010894775390625,
0.02362060546875,
0.01506805419921875,
-0.0199432373046875,
0.044036865234375,
0.00754547119140625,
-0.0182647705078125,
-0.0188751220703125,
-0.04754638671875,
0.059783935546875,
-0.059051513671875,
0.05120849609375,
0.064453125,
-0.03643798828125,
0.030120849609375,
0.026947021484375,
-0.0078887939453125,
0.0297088623046875,
0.0013265609741210938,
0.0034542083740234375,
0.023956298828125,
-0.055908203125,
0.0004341602325439453,
0.01389312744140625,
-0.037567138671875,
0.0299072265625,
-0.006435394287109375,
-0.01488494873046875,
0.000736236572265625,
-0.1202392578125,
-0.10455322265625,
0.03155517578125,
-0.10784912109375,
-0.0022220611572265625,
-0.01139068603515625,
-0.0679931640625,
-0.0201568603515625,
0.039093017578125,
-0.01064300537109375,
0.01453399658203125,
-0.0185699462890625,
-0.06915283203125,
-0.020294189453125,
-0.07196044921875,
0.017364501953125,
-0.00677490234375,
-0.001018524169921875,
0.018798828125,
0.017913818359375,
0.0157012939453125,
-0.0240325927734375,
0.01180267333984375,
0.048828125,
-0.01039886474609375,
-0.01702880859375,
0.0513916015625,
-0.0433349609375,
-0.0117340087890625,
0.01337432861328125,
0.01502227783203125,
0.0253753662109375,
-0.0188751220703125,
-0.0169830322265625,
-0.0084228515625,
-0.01232147216796875,
-0.0170135498046875,
-0.02362060546875,
-0.004428863525390625,
-0.054718017578125,
-0.060638427734375,
-0.08111572265625,
0.02618408203125,
0.025909423828125,
0.006999969482421875,
-0.040313720703125,
-0.036285400390625,
-0.03741455078125,
-0.00958251953125,
0.0007710456848144531,
0.01934814453125,
0.0203704833984375,
-0.043914794921875,
-0.0128326416015625,
0.0188751220703125,
0.01543426513671875,
0.0261383056640625,
0.0152130126953125,
0.045928955078125,
-0.01861572265625,
-0.004241943359375,
0.007495880126953125,
0.0009589195251464844,
0.00913238525390625,
-0.018585205078125,
-0.0216217041015625,
-0.028167724609375,
0.0355224609375,
-0.00807952880859375,
0.0380859375,
-0.048736572265625,
-0.043304443359375,
-0.02105712890625,
0.0841064453125,
-0.010101318359375,
-0.0096588134765625,
-0.002063751220703125,
0.01458740234375,
-0.02117919921875,
-0.03424072265625,
-0.018707275390625,
-0.013427734375,
-0.04217529296875,
0.01067352294921875,
-0.006443023681640625,
-0.026336669921875,
0.0132598876953125,
-0.050201416015625,
-0.004695892333984375,
-0.042327880859375,
0.00823211669921875,
0.040771484375,
-0.007366180419921875,
0.01515960693359375,
-0.006580352783203125,
-0.0096435546875,
-0.0027217864990234375,
-0.0120697021484375,
-0.06719970703125,
-0.0036220550537109375,
-0.03857421875,
0.0693359375,
0.028717041015625,
-0.02276611328125,
0.0009374618530273438,
0.057708740234375,
0.03070068359375,
0.0235443115234375,
0.0167083740234375,
-0.044586181640625,
0.027587890625,
0.031951904296875,
0.0277099609375,
-0.00484466552734375,
0.0066070556640625,
-0.024261474609375,
-0.035491943359375,
0.0013637542724609375,
-0.041107177734375,
0.0034618377685546875,
-0.0374755859375,
-0.02020263671875,
0.00521087646484375,
-0.0265960693359375,
-0.042205810546875,
0.0491943359375,
-0.0217132568359375,
0.0106353759765625,
-0.056976318359375,
-0.0300140380859375,
0.05133056640625,
0.0213775634765625,
-0.005954742431640625,
-0.00469970703125,
0.04449462890625,
0.016571044921875,
-0.03271484375,
-0.0484619140625,
0.0003113746643066406,
0.014678955078125,
0.0374755859375,
0.015869140625,
-0.029388427734375,
-0.0341796875,
0.06146240234375,
-0.00881195068359375,
-0.01139068603515625,
-0.0216522216796875,
0.06756591796875,
-0.0157623291015625,
-0.04010009765625,
0.043121337890625,
-0.030242919921875,
-0.003978729248046875,
0.010711669921875,
-0.01110076904296875,
-0.0078277587890625,
0.00969696044921875,
0.0231170654296875,
-0.0171966552734375,
0.026275634765625,
-0.00666046142578125,
-0.0260009765625,
-0.0090789794921875,
0.03411865234375,
0.05615234375,
0.032196044921875,
-0.0123291015625,
0.05120849609375,
0.059295654296875,
-0.0035266876220703125,
0.06890869140625,
0.0684814453125,
-0.001697540283203125,
0.03546142578125,
0.03521728515625,
-0.02789306640625,
0.002620697021484375,
-0.0199432373046875,
0.0849609375,
-0.00047016143798828125,
-0.039337158203125,
0.031890869140625,
-0.035552978515625,
-0.045135498046875,
0.026275634765625,
-0.03436279296875,
0.007598876953125,
0.039398193359375,
-0.0099945068359375,
-0.0006928443908691406,
-0.00957489013671875,
0.0079803466796875,
-0.029693603515625,
-0.0167388916015625,
-0.01149749755859375,
-0.00971221923828125,
0.005451202392578125,
0.03936767578125,
-0.0587158203125,
0.033172607421875,
0.00786590576171875,
0.004352569580078125,
0.0036067962646484375,
0.01372528076171875,
0.01300811767578125,
0.0268096923828125,
-0.00127410888671875,
-0.013671875,
0.036865234375,
-0.03155517578125,
-0.01216888427734375,
-0.0164947509765625,
0.0211639404296875,
-0.0211029052734375,
-0.0209197998046875,
0.055816650390625,
-0.0186004638671875,
-0.0292510986328125,
-0.05078125,
-0.006092071533203125,
0.048553466796875,
-0.00983428955078125,
-0.0194854736328125,
-0.001064300537109375,
0.061859130859375,
0.004070281982421875,
-0.016448974609375,
-0.0279541015625,
-0.00783538818359375,
0.017730712890625,
-0.0228118896484375,
-0.01422119140625,
-0.025604248046875,
-0.033538818359375,
0.0274810791015625,
0.023712158203125,
-0.06805419921875,
-0.07318115234375,
0.0013284683227539062,
-0.006153106689453125,
0.06109619140625,
0.0007948875427246094,
0.01311492919921875,
-0.035430908203125,
0.0186004638671875,
0.0007758140563964844,
0.018310546875,
-0.017791748046875,
-0.048736572265625,
-0.04071044921875,
-0.020782470703125,
-0.049163818359375,
-0.02056884765625,
-0.04168701171875,
-0.00644683837890625,
-0.036956787109375,
0.0196380615234375,
-0.00439453125,
0.01702880859375,
0.006458282470703125,
0.006038665771484375,
0.0019550323486328125,
0.0068359375,
-0.0030269622802734375,
-0.020751953125,
0.003139495849609375,
0.0033016204833984375,
0.0040740966796875,
-0.0045928955078125,
-0.00791168212890625,
0.0010166168212890625,
0.0090179443359375,
-0.0116119384765625,
-0.00846099853515625,
-0.053680419921875,
-0.0283050537109375,
0.0226898193359375,
-0.062225341796875,
0.06512451171875,
0.0631103515625,
0.011474609375,
-0.0224456787109375,
-0.00731658935546875,
-0.004894256591796875,
-0.01537322998046875,
0.035797119140625,
0.0086669921875,
-0.007534027099609375,
-0.0238800048828125,
-0.0092620849609375,
0.0187225341796875,
-0.0257720947265625,
-0.0106048583984375,
0.0240631103515625,
-0.01021575927734375,
0.002521514892578125,
0.0171966552734375,
-0.0159759521484375,
0.01513671875,
0.007030487060546875,
0.0139007568359375,
0.01313018798828125,
-0.005725860595703125,
0.004276275634765625,
-0.0418701171875,
-0.038543701171875,
-0.0025119781494140625,
0.032440185546875,
0.056182861328125,
-0.01910400390625,
-0.01849365234375,
0.038909912109375,
-0.0391845703125,
0.020263671875,
0.03277587890625,
0.035888671875,
-0.06109619140625,
0.0005021095275878906,
-0.003185272216796875,
-0.015655517578125,
0.044189453125,
0.01165008544921875,
-0.0272674560546875,
-0.08270263671875,
0.04876708984375,
0.002979278564453125,
0.00749969482421875,
0.0164031982421875,
-0.0019989013671875,
-0.02557373046875,
0.006633758544921875,
0.0191192626953125,
0.0193328857421875,
-0.07806396484375,
0.009674072265625,
0.035125732421875,
-0.018829345703125,
-0.006984710693359375,
0.0087127685546875,
0.006839752197265625,
-0.028961181640625,
-0.03057861328125,
0.023651123046875,
-0.0163726806640625,
-0.01068115234375,
0.002178192138671875,
0.0174407958984375,
0.07037353515625,
0.0509033203125,
0.019195556640625,
-0.032257080078125,
0.028411865234375,
0.00433349609375,
0.0020275115966796875,
-0.02099609375,
-0.01403045654296875,
0.006984710693359375,
-0.0150299072265625,
0.0135955810546875,
-0.01468658447265625,
0.0058135986328125,
-0.01422882080078125,
-0.03594970703125,
0.054168701171875,
-0.037567138671875,
0.00843048095703125,
0.01201629638671875,
-0.006137847900390625,
0.0018329620361328125,
0.0010290145874023438,
-0.00031304359436035156,
-0.033416748046875,
-0.0015954971313476562,
0.010498046875,
0.0026950836181640625,
0.00685882568359375,
0.0241851806640625,
-0.046295166015625,
0.04644775390625,
-0.048675537109375,
0.0211944580078125,
0.00926971435546875,
0.02392578125,
0.01444244384765625,
0.004039764404296875,
-0.02880859375,
0.03179931640625,
-0.037139892578125,
0.04217529296875,
-0.041900634765625,
-0.002704620361328125,
0.00836181640625,
0.0172271728515625,
0.0270843505859375,
-0.0034008026123046875,
-0.058807373046875,
-0.011749267578125,
0.058013916015625,
0.036773681640625,
0.0262451171875,
0.044769287109375,
0.00826263427734375,
0.00920867919921875,
0.035919189453125,
-0.01093292236328125,
0.040496826171875,
-0.019622802734375,
-0.008575439453125,
0.019744873046875,
0.004016876220703125,
0.00077056884765625,
-0.006114959716796875,
0.0137481689453125,
-0.00212860107421875,
-0.01499176025390625,
-0.00197601318359375,
-0.0164642333984375,
-0.00872039794921875,
0.042724609375,
0.0379638671875,
-0.0139312744140625,
-0.0205078125,
-0.0207977294921875,
0.046112060546875,
0.0156402587890625,
0.01448822021484375,
-0.007358551025390625,
0.006809234619140625,
0.0312042236328125,
-0.03546142578125,
0.00785064697265625,
0.032562255859375,
-0.033538818359375,
0.0253753662109375,
-0.007045745849609375,
0.00940704345703125,
-0.03662109375,
0.01372528076171875,
0.0123443603515625,
0.0259857177734375,
-0.0338134765625,
-0.07257080078125,
0.0028896331787109375,
0.00594329833984375,
0.02532958984375,
0.0199737548828125,
0.01351165771484375,
0.03424072265625,
0.08563232421875,
0.0303802490234375,
-0.03460693359375,
-0.01065826416015625,
0.022125244140625,
0.008514404296875,
0.003997802734375,
0.0001519918441772461,
-0.040130615234375,
0.00475311279296875,
0.0294036865234375,
0.00820159912109375,
-0.038360595703125,
-0.04986572265625,
0.044219970703125,
0.015716552734375,
0.0382080078125,
-0.03167724609375,
0.038787841796875,
-0.0284576416015625,
0.05023193359375,
-0.046112060546875,
-0.0345458984375,
0.0004336833953857422,
0.05511474609375,
0.03497314453125,
0.06817626953125,
0.037811279296875,
0.029937744140625,
0.0227203369140625,
0.01151275634765625,
0.03900146484375,
-0.010223388671875,
-0.01396942138671875,
-0.0182342529296875,
0.051849365234375,
0.052978515625,
0.019134521484375,
-0.01129913330078125,
0.0271453857421875,
0.066162109375,
0.0253448486328125,
-0.0052642822265625,
0.017608642578125,
-0.061737060546875,
0.031005859375,
-0.0298614501953125,
0.07720947265625,
0.0199737548828125,
-0.08941650390625,
-0.0159912109375,
0.0014591217041015625,
-0.056427001953125,
0.0118408203125,
0.036834716796875,
-0.031097412109375,
0.0025272369384765625,
0.010986328125,
-0.02301025390625,
0.00531005859375,
-0.024017333984375,
0.037139892578125,
-0.0023632049560546875,
-0.0121612548828125,
0.0014905929565429688,
-0.0084228515625,
0.0014286041259765625,
0.0257568359375,
0.0214691162109375,
0.004985809326171875,
0.09381103515625,
-0.035552978515625,
-0.0103912353515625,
0.01165771484375,
0.0165557861328125,
-0.019012451171875,
-0.002887725830078125,
0.01009368896484375,
-0.01727294921875,
0.00539398193359375,
-0.0013608932495117188,
0.00600433349609375,
-0.00904083251953125,
0.031707763671875,
-0.049896240234375,
-0.039306640625,
-0.016937255859375,
0.027923583984375,
0.0153045654296875,
0.0203094482421875,
-0.04498291015625,
-0.032470703125,
-0.03192138671875,
-0.0286865234375,
0.0195465087890625,
-0.00567626953125,
0.0030841827392578125,
0.00981903076171875,
0.02850341796875,
-0.02337646484375,
0.03228759765625,
-0.01544189453125,
0.06707763671875,
0.047821044921875,
0.0024852752685546875,
-0.02288818359375,
-0.0262603759765625,
-0.02520751953125,
-0.00885772705078125,
-0.00885772705078125,
0.005413055419921875,
-0.0233917236328125,
-0.0386962890625,
-0.0108642578125,
-0.0013189315795898438,
0.0206298828125,
-0.01537322998046875,
0.01464080810546875,
-0.01092529296875,
-0.0102996826171875,
0.00720977783203125,
0.00574493408203125,
-0.01433563232421875,
-0.0165252685546875,
-0.0247802734375,
-0.0009813308715820312,
-0.00966644287109375,
-0.07098388671875,
-0.057861328125,
0.0254058837890625,
0.0301513671875,
0.0295867919921875,
-0.09625244140625,
0.0709228515625,
0.00010478496551513672,
-0.00815582275390625,
0.033843994140625,
0.02142333984375,
-0.015655517578125,
0.020660400390625,
-0.0304412841796875,
-0.01910400390625,
-0.04254150390625,
0.03179931640625,
-0.02593994140625,
0.0225372314453125,
0.03485107421875,
-0.0225677490234375,
0.006587982177734375,
0.01409912109375,
0.03009033203125,
0.0460205078125,
-0.01480865478515625,
-0.002162933349609375,
0.03485107421875,
-0.006137847900390625,
-0.01885986328125,
-0.052001953125,
0.00940704345703125,
-0.038818359375,
-0.00925445556640625,
-0.00249481201171875,
0.01381683349609375,
0.01708984375,
-0.0401611328125,
-0.11102294921875,
0.046417236328125,
-0.036102294921875,
-0.047149658203125,
-0.061737060546875,
-0.01413726806640625,
0.010040283203125,
-0.00580596923828125,
-0.02301025390625,
-0.002288818359375,
-0.05242919921875,
0.0296478271484375,
0.02001953125,
0.039398193359375,
-0.0254058837890625,
0.047882080078125,
-0.005859375,
0.0650634765625,
0.04791259765625,
-0.00464630126953125,
-0.0100250244140625,
0.009063720703125,
0.0236358642578125,
0.061920166015625,
-0.0057220458984375,
0.0128326416015625,
0.01123046875,
-0.0546875,
-0.006946563720703125,
-0.013580322265625,
-0.0205078125,
0.0186767578125,
0.0284271240234375,
0.061065673828125,
0.00446319580078125,
-0.03466796875,
0.02862548828125,
-0.020416259765625,
0.0024261474609375,
-0.00045752525329589844,
-0.00794219970703125,
-0.0227813720703125,
0.0136260986328125,
0.01324462890625,
-0.0067138671875,
-0.00098419189453125,
-0.0006685256958007812,
-0.037353515625,
-0.0049285888671875,
0.0026187896728515625,
-0.00860595703125,
-0.04461669921875,
0.0196990966796875,
0.050201416015625,
-0.039642333984375,
0.0095672607421875,
-0.0111846923828125,
0.003753662109375,
0.0231781005859375,
-0.0430908203125,
0.0214691162109375,
0.05029296875,
-0.0011987686157226562,
-0.00492095947265625,
0.06536865234375,
-0.09149169921875,
0.037445068359375,
0.0172119140625,
0.0201263427734375,
0.0228118896484375,
0.000028967857360839844,
0.025909423828125,
-0.0400390625,
0.037689208984375,
-0.014556884765625,
0.0280914306640625,
-0.01340484619140625,
-0.0526123046875,
-0.036224365234375,
0.0278778076171875,
0.003025054931640625,
-0.002666473388671875,
0.032562255859375,
-0.0203704833984375,
0.02471923828125,
0.01473236083984375,
0.00881195068359375,
0.03515625,
-0.02520751953125,
-0.10980224609375,
-0.0299072265625,
-0.01861572265625
] |
0853e5c08de1926b8af7079663c4caab17a0f654
|
Wordpress Stackexchange
Q: WPML: getting page title in different language i'm running my web in english and german using the WPML plugin.
my question:
when in english mode - is it possible getting the page_title() but in german?
thanks
A: Let's say the original language of your site is english, then when visiting a german post you would return the title of the corresponding english post like that :
// Get the post ID of original post
$original_ID = icl_object_id( $post->ID, 'post', false, 'en' );
// Get original post title
$original_title = get_the_title( $original_ID );
Hope that helps, in any case check out the documentation for icl_object_id();
|
Q: WPML: getting page title in different language i'm running my web in english and german using the WPML plugin.
my question:
when in english mode - is it possible getting the page_title() but in german?
thanks
A: Let's say the original language of your site is english, then when visiting a german post you would return the title of the corresponding english post like that :
// Get the post ID of original post
$original_ID = icl_object_id( $post->ID, 'post', false, 'en' );
// Get original post title
$original_title = get_the_title( $original_ID );
Hope that helps, in any case check out the documentation for icl_object_id();
A: Thanks for that mike23, was a lifesaver for me today. However that exact code didn't work for me, I did have to do some modifications in order to get it to work in my situation which may be due to a newer version of the WPML plugin.
I had to change:
$original_ID = icl_object_id( $post->ID, 'post', false, 'en' );
to:
$original_ID = icl_object_id( $post->ID, 'any', false, 'en' );
Notice that the only change is 'post' -> 'any'. It's a small change but made a world of difference as any other type that I entered would not work for me. Hope this helps someone that runs into the same issue.
PS: I found that the 'any' type could be used by going to the file where that function is created: /wp-content/plugins/sitepress-multilingual-cms/inc/template-functions.php. When in the file search for icl_object_id().
|
wordpress
|
{
"language": "en",
"length": 243,
"provenance": "stackexchange_00019.jsonl.gz:407960",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12713"
}
|
[
-0.04217529296875,
-0.022613525390625,
-0.01126861572265625,
0.051300048828125,
-0.0445556640625,
-0.01134490966796875,
0.01319122314453125,
-0.0245208740234375,
0.0124969482421875,
0.0261383056640625,
0.03973388671875,
-0.0050811767578125,
0.0018482208251953125,
-0.038330078125,
-0.0003075599670410156,
0.007785797119140625,
0.02960205078125,
0.01389312744140625,
0.0537109375,
0.00508880615234375,
-0.004718780517578125,
0.0196533203125,
0.0159912109375,
-0.07623291015625,
0.04229736328125,
-0.081787109375,
0.03521728515625,
0.00809478759765625,
0.0204315185546875,
-0.00455474853515625,
0.041748046875,
-0.006542205810546875,
0.03704833984375,
-0.036712646484375,
0.0298004150390625,
0.00801849365234375,
0.0296478271484375,
-0.04583740234375,
-0.01513671875,
0.03515625,
0.0377197265625,
-0.0172576904296875,
-0.019012451171875,
0.0418701171875,
-0.01546478271484375,
-0.050872802734375,
0.0364990234375,
-0.0235443115234375,
-0.0121307373046875,
0.040130615234375,
0.021820068359375,
0.0149383544921875,
0.015167236328125,
0.03924560546875,
0.008941650390625,
-0.006561279296875,
0.00652313232421875,
0.00531005859375,
0.025726318359375,
-0.017852783203125,
-0.038055419921875,
-0.0026645660400390625,
0.0193634033203125,
-0.018310546875,
-0.005268096923828125,
0.0304718017578125,
0.0638427734375,
0.0139007568359375,
-0.0008463859558105469,
-0.034515380859375,
-0.017333984375,
0.004291534423828125,
0.003582000732421875,
-0.01324462890625,
-0.0128173828125,
0.033905029296875,
-0.0208892822265625,
-0.0213470458984375,
0.01513671875,
-0.007373809814453125,
0.0110321044921875,
-0.01175689697265625,
-0.028167724609375,
0.00289154052734375,
0.01328277587890625,
0.03125,
-0.006015777587890625,
-0.017303466796875,
-0.045196533203125,
-0.0447998046875,
-0.0350341796875,
-0.00476837158203125,
-0.0816650390625,
0.018157958984375,
0.0123748779296875,
-0.04779052734375,
-0.0088653564453125,
0.056640625,
-0.055145263671875,
0.0146484375,
-0.036590576171875,
-0.011962890625,
0.0287017822265625,
-0.038299560546875,
0.00795745849609375,
-0.031829833984375,
-0.00571441650390625,
0.004238128662109375,
0.04278564453125,
0.0238189697265625,
-0.0313720703125,
0.0396728515625,
0.00395965576171875,
-0.009033203125,
-0.01181793212890625,
0.030181884765625,
-0.0160675048828125,
0.005657196044921875,
-0.0013675689697265625,
0.019500732421875,
-0.00738525390625,
0.020599365234375,
0.017364501953125,
-0.0156707763671875,
0.00881195068359375,
0.0118865966796875,
-0.011260986328125,
-0.020294189453125,
0.002010345458984375,
0.0169830322265625,
-0.0233001708984375,
0.004673004150390625,
0.0433349609375,
0.01331329345703125,
-0.005214691162109375,
-0.0274505615234375,
-0.03314208984375,
-0.005176544189453125,
-0.009429931640625,
-0.005664825439453125,
-0.002696990966796875,
0.00696563720703125,
0.061676025390625,
-0.0232391357421875,
-0.00972747802734375,
-0.0141143798828125,
-0.006458282470703125,
0.039337158203125,
0.0271759033203125,
-0.018585205078125,
0.0184326171875,
-0.00958251953125,
0.004062652587890625,
0.01303863525390625,
-0.002567291259765625,
-0.0305938720703125,
-0.01012420654296875,
-0.02032470703125,
0.05078125,
-0.014312744140625,
-0.0272979736328125,
-0.0241546630859375,
-0.018402099609375,
-0.01079559326171875,
-0.051849365234375,
0.0372314453125,
0.030670166015625,
-0.0029735565185546875,
0.01380157470703125,
0.0025615692138671875,
0.035919189453125,
-0.0016775131225585938,
-0.040771484375,
0.00502777099609375,
0.01995849609375,
-0.0076141357421875,
-0.0498046875,
-0.034332275390625,
0.045867919921875,
0.01470947265625,
0.01300811767578125,
-0.00533294677734375,
0.01422882080078125,
0.0325927734375,
-0.036285400390625,
-0.0297698974609375,
0.00556182861328125,
0.0433349609375,
0.058837890625,
0.0263519287109375,
0.00942230224609375,
-0.05517578125,
-0.0469970703125,
0.037384033203125,
-0.0204925537109375,
-0.0042724609375,
0.0032672882080078125,
0.038970947265625,
-0.0263519287109375,
-0.007965087890625,
0.022308349609375,
-0.01904296875,
0.0112457275390625,
0.03643798828125,
-0.016754150390625,
-0.01837158203125,
-0.007205963134765625,
-0.0060272216796875,
0.03594970703125,
0.0274505615234375,
-0.0100250244140625,
0.01233673095703125,
-0.01361846923828125,
-0.036346435546875,
-0.04571533203125,
0.0010623931884765625,
-0.0301513671875,
0.00777435302734375,
0.0055084228515625,
0.01073455810546875,
0.006641387939453125,
-0.004787445068359375,
0.00897216796875,
0.0177154541015625,
0.033355712890625,
-0.006107330322265625,
-0.003692626953125,
-0.0160675048828125,
0.08331298828125,
-0.00435638427734375,
0.04010009765625,
0.00501251220703125,
0.00988006591796875,
0.0199432373046875,
-0.015655517578125,
-0.019775390625,
-0.01384735107421875,
-0.05712890625,
0.0236663818359375,
0.05615234375,
0.035736083984375,
0.016693115234375,
0.022064208984375,
0.023773193359375,
0.0150909423828125,
-0.046356201171875,
0.011322021484375,
0.00409698486328125,
0.0193328857421875,
0.031951904296875,
0.0074005126953125,
-0.00244903564453125,
0.0147705078125,
-0.0535888671875,
0.0161285400390625,
0.04150390625,
-0.031890869140625,
-0.0180206298828125,
-0.0079193115234375,
-0.01128387451171875,
0.0091400146484375,
-0.06231689453125,
-0.04339599609375,
-0.0138397216796875,
0.0138092041015625,
0.004817962646484375,
0.035430908203125,
0.031829833984375,
0.00012177228927612305,
-0.006046295166015625,
-0.0040435791015625,
-0.020233154296875,
0.01544952392578125,
0.03265380859375,
-0.024505615234375,
0.01085662841796875,
0.0037994384765625,
-0.0310821533203125,
0.02203369140625,
0.00855255126953125,
0.006778717041015625,
0.05413818359375,
-0.0178070068359375,
-0.02764892578125,
-0.01715087890625,
-0.063720703125,
-0.0273895263671875,
0.00748443603515625,
0.00870513916015625,
-0.00295257568359375,
0.037811279296875,
-0.01904296875,
-0.043609619140625,
0.04705810546875,
0.002445220947265625,
-0.041717529296875,
0.045013427734375,
-0.03582763671875,
0.039093017578125,
-0.046112060546875,
0.048309326171875,
0.0499267578125,
-0.03704833984375,
0.0109405517578125,
0.005214691162109375,
-0.0340576171875,
0.0149383544921875,
-0.0140380859375,
-0.02593994140625,
0.019561767578125,
-0.0968017578125,
0.0177154541015625,
0.01151275634765625,
0.03656005859375,
-0.0084228515625,
-0.0469970703125,
-0.007198333740234375,
0.0086517333984375,
-0.0938720703125,
-0.10809326171875,
-0.0029773712158203125,
-0.03936767578125,
0.035430908203125,
0.0170745849609375,
0.0028743743896484375,
-0.0272369384765625,
0.0311279296875,
0.01061248779296875,
0.030792236328125,
-0.0262603759765625,
-0.0616455078125,
-0.04278564453125,
-0.07403564453125,
-0.029296875,
-0.00778961181640625,
0.01407623291015625,
0.007610321044921875,
-0.039947509765625,
-0.0111846923828125,
-0.0186920166015625,
0.0029163360595703125,
0.09722900390625,
0.0023059844970703125,
-0.034149169921875,
-0.031890869140625,
0.005859375,
-0.004009246826171875,
0.01007080078125,
-0.057342529296875,
-0.0139617919921875,
0.036376953125,
-0.02313232421875,
-0.00904083251953125,
0.0230255126953125,
0.0182037353515625,
-0.0965576171875,
-0.0017709732055664062,
0.0980224609375,
-0.0234832763671875,
0.00798797607421875,
-0.06414794921875,
0.0173492431640625,
-0.04693603515625,
0.006824493408203125,
0.025421142578125,
-0.008056640625,
0.0024623870849609375,
0.022430419921875,
-0.00951385498046875,
0.005687713623046875,
0.0006375312805175781,
-0.009735107421875,
0.01422882080078125,
0.0033168792724609375,
0.0083160400390625,
0.00640869140625,
0.06365966796875,
-0.00023746490478515625,
0.00328826904296875,
0.0303192138671875,
0.007587432861328125,
0.0024871826171875,
-0.0192413330078125,
-0.015350341796875,
-0.03118896484375,
0.032989501953125,
-0.0255584716796875,
0.0185394287109375,
0.01617431640625,
-0.0276641845703125,
0.041015625,
0.08172607421875,
-0.074462890625,
-0.0258331298828125,
-0.0159759521484375,
0.035064697265625,
-0.003986358642578125,
-0.0740966796875,
0.0036640167236328125,
-0.0264434814453125,
-0.046051025390625,
0.01457977294921875,
0.0175628662109375,
-0.0093994140625,
-0.0360107421875,
0.08282470703125,
-0.036346435546875,
-0.002323150634765625,
0.0260162353515625,
0.00537872314453125,
-0.0105743408203125,
0.043548583984375,
-0.0335693359375,
0.0230255126953125,
-0.0457763671875,
0.0035228729248046875,
-0.082275390625,
-0.0193939208984375,
-0.0037899017333984375,
0.074462890625,
-0.0413818359375,
0.021575927734375,
-0.04718017578125,
0.04833984375,
0.0196075439453125,
0.0841064453125,
-0.0253143310546875,
-0.028045654296875,
0.04840087890625,
0.0206451416015625,
0.01021575927734375,
0.00821685791015625,
0.0210723876953125,
0.0257415771484375,
-0.051788330078125,
0.03802490234375,
-0.0216064453125,
0.0237884521484375,
0.021453857421875,
-0.06207275390625,
-0.026214599609375,
-0.0245819091796875,
0.0212860107421875,
0.0301055908203125,
0.01010894775390625,
0.002689361572265625,
-0.0291595458984375,
-0.0273284912109375,
0.05718994140625,
0.0220489501953125,
0.0014667510986328125,
-0.008514404296875,
0.0175018310546875,
-0.0137481689453125,
-0.053558349609375,
-0.032073974609375,
-0.004810333251953125,
0.04119873046875,
-0.030517578125,
0.057891845703125,
0.032501220703125,
-0.04205322265625,
0.0946044921875,
0.0207672119140625,
-0.024322509765625,
0.025360107421875,
0.0400390625,
0.0119781494140625,
-0.02203369140625,
0.0201263427734375,
-0.005710601806640625,
-0.0312042236328125,
0.0335693359375,
-0.0208892822265625,
-0.005397796630859375,
-0.00624847412109375,
0.019500732421875,
-0.042510986328125,
0.052032470703125,
-0.001316070556640625,
-0.039276123046875,
0.0164947509765625,
-0.0167236328125,
-0.02728271484375,
0.00798797607421875,
-0.007289886474609375,
-0.0282440185546875,
-0.041778564453125,
-0.000919342041015625,
0.0390625,
0.032318115234375,
0.00910186767578125,
0.0176239013671875,
0.01473236083984375,
-0.036224365234375,
-0.00008469820022583008,
-0.023529052734375,
0.0531005859375,
-0.014556884765625,
-0.057464599609375,
0.03594970703125,
-0.050567626953125,
0.0071563720703125,
0.0404052734375,
0.020050048828125,
-0.006870269775390625,
0.0184478759765625,
0.003993988037109375,
0.01445770263671875,
0.048492431640625,
0.01412200927734375,
-0.002410888671875,
0.0216522216796875,
0.01047515869140625,
0.00719451904296875,
0.03131103515625,
0.0814208984375,
-0.0247344970703125,
0.0697021484375,
-0.0223388671875,
0.0010814666748046875,
0.004894256591796875,
0.057098388671875,
0.020965576171875,
-0.04144287109375,
-0.0012531280517578125,
0.027740478515625,
0.0017757415771484375,
0.0021686553955078125,
0.0467529296875,
0.0274505615234375,
0.031768798828125,
-0.00751495361328125,
-0.03387451171875,
0.0008544921875,
-0.0677490234375,
-0.0021343231201171875,
0.0501708984375,
0.0043487548828125,
-0.058441162109375,
-0.0285186767578125,
0.002681732177734375,
0.028411865234375,
-0.01702880859375,
-0.0185546875,
0.0137786865234375,
-0.050048828125,
0.0001481771469116211,
0.0028934478759765625,
-0.0296478271484375,
0.01114654541015625,
0.01080322265625,
0.004039764404296875,
-0.0182952880859375,
-0.016448974609375,
-0.00644683837890625,
0.009002685546875,
-0.0276641845703125,
-0.0084381103515625,
0.03448486328125,
-0.004730224609375,
0.02886962890625,
-0.0183868408203125,
-0.0262603759765625,
0.020477294921875,
0.00969696044921875,
0.042083740234375,
0.004024505615234375,
-0.0223541259765625,
0.00499725341796875,
-0.055755615234375,
-0.02093505859375,
-0.0135345458984375,
-0.019775390625,
-0.022674560546875,
-0.020416259765625,
0.0123138427734375,
0.018951416015625,
0.01473236083984375,
0.01256561279296875,
-0.03387451171875,
0.0286712646484375,
0.02001953125,
0.05889892578125,
-0.0220794677734375,
0.08831787109375,
0.0202484130859375,
0.041717529296875,
0.031097412109375,
0.047210693359375,
-0.0304107666015625,
-0.0125274658203125,
0.002979278564453125,
-0.02777099609375,
-0.01538848876953125,
-0.01393890380859375,
-0.0198974609375,
0.0018749237060546875,
0.024505615234375,
0.005077362060546875,
0.0090179443359375,
-0.003726959228515625,
0.021453857421875,
-0.0140228271484375,
-0.00431060791015625,
-0.0271453857421875,
-0.038909912109375,
0.03680419921875,
-0.038970947265625,
0.02154541015625,
-0.01189422607421875,
0.051544189453125,
0.0006952285766601562,
-0.06280517578125,
0.0077362060546875,
0.02947998046875,
0.0295257568359375,
0.0068817138671875,
0.0498046875,
-0.009490966796875,
0.056243896484375,
0.049285888671875,
0.0269317626953125,
0.016754150390625,
-0.00803375244140625,
-0.0063018798828125,
-0.01122283935546875,
0.01468658447265625,
-0.007762908935546875,
-0.00341033935546875,
0.0013675689697265625,
-0.00994110107421875,
0.0261688232421875,
0.0213470458984375,
0.06109619140625,
-0.06005859375,
0.006664276123046875,
0.0310211181640625,
-0.03265380859375,
-0.024932861328125,
0.00412750244140625,
-0.0302734375,
-0.09698486328125,
0.05914306640625,
-0.026275634765625,
0.00004750490188598633,
0.01016998291015625,
-0.02520751953125,
-0.005252838134765625,
0.01174163818359375,
0.050262451171875,
0.02496337890625,
-0.0171966552734375,
-0.024871826171875,
0.00930023193359375,
0.0165557861328125,
-0.05975341796875,
0.00794219970703125,
0.0218658447265625,
-0.00665283203125,
-0.05841064453125,
0.06414794921875,
0.0037689208984375,
0.021636962890625,
0.006427764892578125,
0.02923583984375,
-0.01361083984375,
0.06500244140625,
-0.025604248046875,
-0.0034332275390625,
0.035308837890625,
-0.037750244140625,
0.01471710205078125,
0.0158538818359375,
0.037200927734375,
-0.031646728515625,
-0.0193939208984375,
-0.0007309913635253906,
-0.054412841796875,
-0.0229644775390625,
0.006256103515625,
-0.0011119842529296875,
0.048431396484375,
-0.00919342041015625,
-0.0160369873046875,
0.0090789794921875,
-0.0045013427734375,
0.026123046875,
0.0135345458984375,
0.03302001953125,
-0.00801849365234375,
0.02215576171875,
0.0244140625,
0.0191497802734375,
0.00411224365234375,
0.04644775390625,
-0.10333251953125,
0.04791259765625,
0.032135009765625,
0.0726318359375,
-0.024505615234375,
-0.0030002593994140625,
0.007045745849609375,
-0.0439453125,
-0.03509521484375,
0.0276336669921875,
0.0043792724609375,
0.001674652099609375,
-0.034515380859375,
0.007404327392578125,
-0.024322509765625,
0.0027332305908203125,
0.03936767578125,
0.0143585205078125,
-0.0186767578125,
-0.019073486328125,
0.01806640625,
0.0474853515625,
0.0017566680908203125,
0.00978851318359375,
0.020294189453125,
0.058746337890625,
0.05548095703125,
-0.050537109375,
0.025238037109375,
-0.016845703125,
0.016937255859375,
0.0377197265625,
0.02386474609375,
0.0083160400390625,
0.021881103515625,
-0.0299835205078125,
-0.026031494140625,
0.004276275634765625,
0.0113372802734375,
-0.02630615234375,
0.017669677734375,
0.021392822265625,
0.041351318359375,
-0.049530029296875,
-0.009429931640625,
-0.035736083984375,
0.04791259765625,
0.0159759521484375,
-0.00948333740234375,
-0.002685546875,
0.0068359375,
0.032440185546875,
-0.0023212432861328125,
-0.009979248046875,
0.0209197998046875,
0.0289459228515625,
0.052459716796875,
0.00531768798828125,
0.007114410400390625,
-0.043212890625,
0.040771484375,
0.0274658203125,
0.049774169921875,
-0.061279296875,
-0.01377105712890625,
0.0228729248046875,
-0.004085540771484375,
-0.0209503173828125,
-0.0216217041015625,
-0.0247039794921875,
0.018585205078125,
0.037933349609375,
0.032745361328125,
0.0012035369873046875,
0.040374755859375,
0.037628173828125,
0.022613525390625,
-0.00820159912109375,
-0.07757568359375,
-0.0022830963134765625,
-0.0589599609375,
0.030059814453125,
0.023406982421875,
0.06884765625,
0.0249176025390625,
0.059295654296875,
-0.0216217041015625,
-0.0305633544921875,
0.01181793212890625,
0.003692626953125,
-0.010284423828125,
-0.004627227783203125,
-0.029052734375,
-0.0428466796875,
0.0101470947265625,
0.04547119140625,
0.041839599609375,
-0.0296783447265625,
0.0176544189453125,
0.0205841064453125,
-0.0016307830810546875,
0.002063751220703125,
0.006038665771484375,
0.0020351409912109375,
-0.0012121200561523438,
-0.03973388671875,
0.022216796875,
0.00911712646484375,
-0.01212310791015625,
0.0132598876953125,
0.0208740234375,
-0.0022983551025390625,
-0.01153564453125,
0.023895263671875,
0.00582122802734375,
-0.0298614501953125,
0.007389068603515625,
-0.007904052734375,
0.0457763671875,
-0.0023784637451171875,
-0.1107177734375,
-0.0154876708984375,
-0.0225677490234375,
-0.0399169921875,
0.03192138671875,
0.04736328125,
-0.0166168212890625,
-0.0013113021850585938,
0.0283660888671875,
0.01468658447265625,
-0.0036716461181640625,
-0.009063720703125,
0.0147857666015625,
-0.01442718505859375,
0.0251312255859375,
0.012847900390625,
-0.0301666259765625,
-0.027557373046875,
-0.0264129638671875,
0.04534912109375,
0.033538818359375,
0.0250244140625,
0.002777099609375,
0.05718994140625,
-0.046661376953125,
0.0203704833984375,
-0.043670654296875,
-0.040557861328125,
0.055084228515625,
0.032257080078125,
-0.004795074462890625,
-0.0174407958984375,
-0.059112548828125,
-0.0002989768981933594,
0.0230560302734375,
0.0106353759765625,
0.0048370361328125,
-0.021148681640625,
0.031402587890625,
0.013275146484375,
0.01422882080078125,
-0.022216796875,
0.0175628662109375,
0.0009274482727050781,
-0.026519775390625,
0.046539306640625,
0.0172882080078125,
0.003780364990234375,
0.041351318359375,
-0.038787841796875,
0.00263214111328125,
0.0406494140625,
-0.041473388671875,
0.0218353271484375,
0.02410888671875,
-0.0731201171875,
-0.0009160041809082031,
0.006267547607421875,
-0.003734588623046875,
-0.02587890625,
0.03369140625,
0.01105499267578125,
0.006877899169921875,
0.016326904296875,
-0.02838134765625,
-0.063232421875,
-0.02044677734375,
-0.01959228515625,
-0.01479339599609375,
-0.01275634765625,
0.00934600830078125,
-0.05853271484375,
-0.036834716796875,
-0.01477813720703125,
-0.04193115234375,
-0.000469207763671875,
0.01910400390625,
-0.0037994384765625,
-0.0200958251953125,
-0.009796142578125,
-0.041717529296875,
-0.005645751953125,
-0.0262298583984375,
0.00780487060546875,
-0.0177764892578125,
-0.014373779296875,
-0.05010986328125,
-0.04010009765625,
-0.04150390625,
0.0309600830078125,
0.04693603515625,
-0.0386962890625,
-0.01139068603515625,
-0.0217742919921875,
-0.04486083984375,
-0.043304443359375,
0.004852294921875,
0.01412200927734375,
-0.01274871826171875,
-0.0236053466796875,
0.004772186279296875,
-0.001190185546875,
0.041961669921875,
0.00971221923828125,
-0.018218994140625,
0.035675048828125,
-0.0277252197265625,
-0.023590087890625,
-0.04925537109375,
0.03472900390625,
-0.08819580078125,
-0.042205810546875,
0.017333984375,
-0.005184173583984375,
0.01275634765625,
-0.0256805419921875,
-0.042205810546875,
0.03436279296875,
0.0140838623046875,
-0.02783203125,
-0.04901123046875,
0.0213623046875,
0.0190887451171875,
-0.031707763671875,
-0.01611328125,
-0.04345703125,
-0.017364501953125,
0.004283905029296875,
0.006130218505859375,
0.0119171142578125,
0.0136871337890625,
-0.0207977294921875,
-0.03436279296875,
0.006740570068359375,
0.0310211181640625,
-0.0042572021484375,
0.0190277099609375,
-0.0142974853515625,
-0.00823211669921875,
-0.022430419921875,
-0.0706787109375,
-0.051544189453125,
-0.03173828125,
0.04827880859375,
-0.0216064453125,
-0.06256103515625,
0.0216827392578125,
-0.00360870361328125,
0.043731689453125,
0.01421356201171875,
0.0006704330444335938,
-0.0474853515625,
0.004901885986328125,
-0.023956298828125,
-0.055267333984375,
0.01316070556640625,
0.0252838134765625,
-0.039306640625,
0.0239410400390625,
0.0225677490234375,
-0.01025390625,
-0.00586700439453125,
0.0173187255859375,
-0.040130615234375,
-0.017364501953125,
-0.030609130859375,
-0.01335906982421875,
-0.037200927734375,
-0.044097900390625,
0.09991455078125,
-0.059295654296875,
-0.049224853515625,
0.036773681640625,
0.039642333984375,
0.021697998046875,
-0.0003800392150878906,
-0.025421142578125,
0.00400543212890625,
0.01180267333984375,
0.0006241798400878906,
0.00978851318359375,
0.006481170654296875,
0.0139923095703125,
0.0025348663330078125,
0.0128021240234375,
0.03729248046875,
-0.01238250732421875,
0.0291595458984375,
-0.00833892822265625,
0.01995849609375,
0.00577545166015625,
-0.02545166015625,
0.032470703125,
0.0367431640625,
0.0208282470703125,
0.03216552734375,
-0.0303192138671875,
-0.0328369140625,
-0.036529541015625,
-0.05035400390625,
0.008697509765625,
0.0284271240234375,
0.021240234375,
-0.038909912109375,
0.0304107666015625,
-0.0377197265625,
0.0183868408203125,
0.0010023117065429688
] |
abbaaf57a96152c3b38c67269a1f314e69c21600
|
Wordpress Stackexchange
Q: Searching multiple custom post types and pages I'm using bainternet's method for searching custom post_types and it works great. However, I've recently been requested to return more than one "specific" post type and perhaps individual pages for a support section on our site.
I thought adding additional hidden fields would do it, but that didn't work. And I have no clue how this will work with pages.
Any help would be appreciated!
In the template:
<form action="http://apollo.website.net/" id="searchform" method="get" role="search">
<div><label for="s" class="screen-reader-text">Search for:</label>
<input type="text" id="s" name="s" value="">
<input type="submit" value="Search" id="searchsubmit">
<input type="hidden" name="post_type" value="software" />
</div>
</form>
In functions.php:
/* Custom Search Queries */
function SearchFilter($query) {
$post_type = $_GET['post_type'];
if (!$post_type) {
$post_type = 'any';
}
if ($query->is_search) {
$query->set('post_type', $post_type);
};
return $query;
}
A: You could do it like this to switch between a singular set type and any..
<input type="hidden" name="post_type" value="software" />
<label for="post_type">Search all</label>
<input type="checkbox" name="post_type" value="any" />
Unchecked searches your specific type, checked sets the post type to any..
|
Q: Searching multiple custom post types and pages I'm using bainternet's method for searching custom post_types and it works great. However, I've recently been requested to return more than one "specific" post type and perhaps individual pages for a support section on our site.
I thought adding additional hidden fields would do it, but that didn't work. And I have no clue how this will work with pages.
Any help would be appreciated!
In the template:
<form action="http://apollo.website.net/" id="searchform" method="get" role="search">
<div><label for="s" class="screen-reader-text">Search for:</label>
<input type="text" id="s" name="s" value="">
<input type="submit" value="Search" id="searchsubmit">
<input type="hidden" name="post_type" value="software" />
</div>
</form>
In functions.php:
/* Custom Search Queries */
function SearchFilter($query) {
$post_type = $_GET['post_type'];
if (!$post_type) {
$post_type = 'any';
}
if ($query->is_search) {
$query->set('post_type', $post_type);
};
return $query;
}
A: You could do it like this to switch between a singular set type and any..
<input type="hidden" name="post_type" value="software" />
<label for="post_type">Search all</label>
<input type="checkbox" name="post_type" value="any" />
Unchecked searches your specific type, checked sets the post type to any..
A: change
<input type="hidden" name="post_type" value="software" />
to
<input type="hidden" name="post_type[]" value="software" />
<input type="hidden" name="post_type[]" value="books" />
i have to run but this should work , just add as many hidden fields as you need for each post type
A: To me works that solution (same as Bainternet's, but without "[]" after "post_type"):
<input type="hidden" name="post_type" value="photo">
<input type="hidden" name="post_type" value="video">
And to get a specific template for search results based on the post type(s) (on functions.php):
function search_template_chooser($template) {
global $wp_query;
$post_type = get_query_var('post_type');
if( $wp_query->is_search && $post_type == 'photo' || $wp_query->is_search && $post_type == 'video' ) {
return locate_template('search-media.php');
}
return $template;
}
add_filter('template_include', 'search_template_chooser');
|
wordpress
|
{
"language": "en",
"length": 279,
"provenance": "stackexchange_00019.jsonl.gz:407963",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12723"
}
|
[
0.041839599609375,
-0.0198516845703125,
0.0175323486328125,
-0.0024166107177734375,
-0.00173187255859375,
-0.01313018798828125,
0.06768798828125,
-0.0196075439453125,
0.001865386962890625,
0.0024013519287109375,
-0.0080108642578125,
-0.0250701904296875,
-0.042083740234375,
-0.039398193359375,
-0.0062255859375,
-0.0550537109375,
-0.005710601806640625,
0.0113983154296875,
0.015838623046875,
-0.026763916015625,
0.011749267578125,
-0.04248046875,
0.020660400390625,
-0.0189208984375,
0.0244293212890625,
-0.01136016845703125,
0.05242919921875,
-0.0128326416015625,
0.0200042724609375,
0.002712249755859375,
0.0194091796875,
-0.02398681640625,
0.01160430908203125,
0.018524169921875,
0.0099639892578125,
0.042510986328125,
0.045257568359375,
0.01465606689453125,
0.041778564453125,
0.01415252685546875,
-0.0024013519287109375,
0.002269744873046875,
0.0032978057861328125,
0.01233673095703125,
-0.0081634521484375,
-0.06756591796875,
0.0284881591796875,
-0.039215087890625,
0.023284912109375,
-0.02716064453125,
0.01085662841796875,
-0.005336761474609375,
0.02294921875,
-0.02703857421875,
-0.026519775390625,
-0.00927734375,
0.047210693359375,
-0.0328369140625,
0.029876708984375,
-0.0345458984375,
-0.044952392578125,
-0.0141143798828125,
0.035980224609375,
-0.0161895751953125,
-0.023162841796875,
0.0180206298828125,
0.01238250732421875,
0.006252288818359375,
-0.04241943359375,
-0.04351806640625,
0.0136871337890625,
-0.0255584716796875,
0.04498291015625,
0.01079559326171875,
0.01088714599609375,
-0.0423583984375,
0.0027256011962890625,
0.025543212890625,
0.034820556640625,
-0.004856109619140625,
-0.0012264251708984375,
0.003459930419921875,
-0.048492431640625,
-0.03692626953125,
0.005413055419921875,
-0.004344940185546875,
-0.01448822021484375,
-0.0008521080017089844,
-0.01059722900390625,
-0.0035457611083984375,
-0.00798797607421875,
-0.03875732421875,
-0.02618408203125,
0.034942626953125,
0.032684326171875,
-0.046966552734375,
0.0016584396362304688,
0.0236968994140625,
-0.0020503997802734375,
0.006092071533203125,
0.004932403564453125,
-0.035614013671875,
0.0335693359375,
-0.0401611328125,
0.03204345703125,
-0.00408935546875,
-0.0169677734375,
0.0289306640625,
0.07684326171875,
0.0250396728515625,
0.006168365478515625,
0.053985595703125,
-0.01239013671875,
0.0458984375,
-0.05706787109375,
-0.00855255126953125,
-0.0430908203125,
-0.00884246826171875,
-0.03179931640625,
0.01751708984375,
0.00783538818359375,
0.02532958984375,
0.0335693359375,
-0.061614990234375,
-0.01279449462890625,
-0.022491455078125,
-0.01605224609375,
-0.037078857421875,
0.03515625,
0.007450103759765625,
-0.046173095703125,
-0.005527496337890625,
0.0323486328125,
0.020477294921875,
0.01309967041015625,
-0.01056671142578125,
0.00772857666015625,
-0.0166015625,
-0.015625,
0.0079193115234375,
0.040374755859375,
-0.04241943359375,
-0.0202484130859375,
0.0296478271484375,
0.0005469322204589844,
-0.007137298583984375,
0.02972412109375,
0.031951904296875,
-0.01513671875,
-0.0002689361572265625,
-0.01549530029296875,
0.0147857666015625,
0.033538818359375,
0.0133209228515625,
-0.0589599609375,
-0.007434844970703125,
0.017822265625,
-0.0152587890625,
-0.0267791748046875,
-0.04718017578125,
0.01067352294921875,
-0.005420684814453125,
0.033203125,
-0.021148681640625,
-0.032867431640625,
0.004474639892578125,
-0.049285888671875,
-0.0178680419921875,
0.0188751220703125,
-0.03350830078125,
0.00982666015625,
-0.000614166259765625,
0.02056884765625,
-0.01421356201171875,
0.0021572113037109375,
0.002590179443359375,
0.014617919921875,
0.01058197021484375,
0.028717041015625,
-0.0233612060546875,
-0.031341552734375,
-0.02899169921875,
0.063232421875,
-0.022491455078125,
-0.06817626953125,
0.074462890625,
0.004451751708984375,
0.042449951171875,
-0.01403045654296875,
-0.0090789794921875,
0.06549072265625,
0.068359375,
-0.0528564453125,
0.016326904296875,
-0.0012378692626953125,
-0.0005555152893066406,
-0.045196533203125,
-0.011383056640625,
-0.0225372314453125,
0.0214996337890625,
0.020965576171875,
0.0031032562255859375,
0.0119781494140625,
0.03656005859375,
-0.017974853515625,
0.0238494873046875,
-0.0184173583984375,
0.0082855224609375,
-0.0450439453125,
-0.005767822265625,
0.043182373046875,
0.00797271728515625,
-0.03765869140625,
0.0160369873046875,
0.0016574859619140625,
0.04266357421875,
0.01392364501953125,
0.0235748291015625,
-0.022125244140625,
0.0002808570861816406,
-0.0301055908203125,
-0.048492431640625,
-0.03228759765625,
0.038177490234375,
0.047698974609375,
0.0244293212890625,
-0.003910064697265625,
0.007404327392578125,
0.05694580078125,
0.040435791015625,
-0.0211181640625,
-0.00789642333984375,
0.0533447265625,
0.0030612945556640625,
-0.0322265625,
-0.00021135807037353516,
0.0196533203125,
-0.059967041015625,
0.00704193115234375,
0.05767822265625,
0.02569580078125,
0.024505615234375,
-0.01471710205078125,
-0.007678985595703125,
0.05450439453125,
-0.017913818359375,
0.005420684814453125,
-0.0140533447265625,
0.0173187255859375,
0.042388916015625,
-0.0272674560546875,
0.0193634033203125,
0.0210113525390625,
-0.0026340484619140625,
0.0177001953125,
0.041351318359375,
0.01593017578125,
0.01459503173828125,
-0.027923583984375,
-0.010833740234375,
0.0006194114685058594,
-0.040985107421875,
-0.0438232421875,
0.00075531005859375,
0.054840087890625,
0.006069183349609375,
0.04669189453125,
0.027587890625,
-0.04937744140625,
0.0175018310546875,
0.0176239013671875,
0.007625579833984375,
0.0130157470703125,
0.00014579296112060547,
0.0112457275390625,
0.001079559326171875,
-0.00958251953125,
-0.004444122314453125,
0.024932861328125,
-0.006740570068359375,
0.01276397705078125,
0.00160980224609375,
-0.049224853515625,
-0.00647735595703125,
0.0219879150390625,
-0.03668212890625,
-0.01788330078125,
0.0323486328125,
-0.0087432861328125,
0.0248260498046875,
0.0232391357421875,
0.035614013671875,
-0.006237030029296875,
0.0404052734375,
-0.05169677734375,
0.005649566650390625,
0.00804901123046875,
-0.061431884765625,
0.047119140625,
-0.03900146484375,
0.0469970703125,
0.07427978515625,
-0.01284027099609375,
0.02398681640625,
-0.0026111602783203125,
0.004695892333984375,
-0.0030269622802734375,
-0.00021374225616455078,
-0.00592041015625,
-0.037567138671875,
-0.021270751953125,
0.03167724609375,
0.02301025390625,
0.020599365234375,
0.014251708984375,
-0.036041259765625,
-0.0124053955078125,
0.037017822265625,
-0.0692138671875,
-0.041259765625,
0.04547119140625,
-0.0491943359375,
-0.0201873779296875,
-0.0142822265625,
-0.0270843505859375,
-0.0035343170166015625,
0.00347900390625,
-0.004528045654296875,
0.03582763671875,
0.02838134765625,
-0.038299560546875,
0.04388427734375,
-0.03582763671875,
0.03021240234375,
-0.01806640625,
0.0023193359375,
0.0248260498046875,
0.051544189453125,
0.04473876953125,
-0.026885986328125,
0.058197021484375,
0.0626220703125,
-0.0272979736328125,
0.01509857177734375,
0.009033203125,
-0.038330078125,
0.02069091796875,
0.0012798309326171875,
-0.0170745849609375,
0.001155853271484375,
0.0194244384765625,
-0.032379150390625,
0.00249481201171875,
0.02093505859375,
0.02703857421875,
-0.032501220703125,
-0.0280914306640625,
0.0386962890625,
0.0101776123046875,
-0.0205230712890625,
-0.019073486328125,
-0.0316162109375,
-0.048004150390625,
0.00981903076171875,
0.0379638671875,
0.0007615089416503906,
-0.0305633544921875,
0.01285552978515625,
0.030029296875,
0.003215789794921875,
0.035797119140625,
-0.0213165283203125,
0.011260986328125,
0.0102386474609375,
0.0379638671875,
-0.045501708984375,
0.017425537109375,
-0.023651123046875,
0.037445068359375,
0.019012451171875,
0.005367279052734375,
0.04644775390625,
-0.0292510986328125,
0.034332275390625,
-0.052520751953125,
0.04046630859375,
-0.0255126953125,
0.01334381103515625,
-0.044189453125,
-0.0242919921875,
-0.0160675048828125,
0.0823974609375,
-0.07110595703125,
0.00647735595703125,
-0.0157470703125,
-0.0034770965576171875,
-0.02044677734375,
-0.0667724609375,
-0.0718994140625,
-0.005779266357421875,
-0.0914306640625,
-0.0011949539184570312,
-0.016448974609375,
-0.04241943359375,
0.003765106201171875,
-0.0249786376953125,
-0.0289459228515625,
-0.043792724609375,
0.0265960693359375,
-0.03436279296875,
0.02978515625,
-0.0037403106689453125,
0.01438140869140625,
-0.0276336669921875,
-0.00911712646484375,
-0.042724609375,
-0.06640625,
-0.005886077880859375,
0.00957489013671875,
0.0221099853515625,
-0.01313018798828125,
-0.00920867919921875,
0.01062774658203125,
0.050994873046875,
0.0277557373046875,
0.019134521484375,
-0.01224517822265625,
-0.03619384765625,
0.01369476318359375,
0.0267486572265625,
-0.0162506103515625,
0.006855010986328125,
-0.0237274169921875,
0.0179901123046875,
-0.006927490234375,
0.041717529296875,
-0.020111083984375,
-0.023956298828125,
0.0124969482421875,
-0.0305633544921875,
-0.01003265380859375,
-0.0173187255859375,
-0.039886474609375,
0.041168212890625,
-0.029052734375,
-0.003574371337890625,
-0.03521728515625,
-0.052886962890625,
0.0618896484375,
0.0154571533203125,
-0.0081634521484375,
-0.011505126953125,
0.076416015625,
0.0077972412109375,
-0.02288818359375,
-0.0264739990234375,
-0.02239990234375,
-0.0004239082336425781,
0.038055419921875,
0.017303466796875,
-0.01580810546875,
-0.0106201171875,
0.0185699462890625,
-0.0238494873046875,
-0.044403076171875,
-0.003955841064453125,
0.07135009765625,
-0.01337432861328125,
-0.03826904296875,
0.01495361328125,
-0.060211181640625,
0.028900146484375,
0.02166748046875,
-0.006221771240234375,
-0.0247650146484375,
-0.00428009033203125,
0.052764892578125,
-0.0267486572265625,
0.0182952880859375,
-0.04290771484375,
-0.039215087890625,
0.00720977783203125,
0.0282135009765625,
0.0222015380859375,
0.0170745849609375,
-0.006916046142578125,
0.040771484375,
-0.0011854171752929688,
0.002410888671875,
0.0120391845703125,
0.021209716796875,
-0.00826263427734375,
0.03009033203125,
-0.005298614501953125,
-0.004886627197265625,
-0.01291656494140625,
0.0008091926574707031,
-0.002040863037109375,
-0.03350830078125,
-0.0565185546875,
-0.01055145263671875,
-0.017974853515625,
-0.019775390625,
0.030914306640625,
0.0096282958984375,
0.023712158203125,
0.04205322265625,
0.027313232421875,
0.00980377197265625,
0.0162506103515625,
0.039764404296875,
-0.00591278076171875,
-0.0088348388671875,
0.02130126953125,
-0.00135040283203125,
0.0200958251953125,
0.053009033203125,
-0.0140838623046875,
0.039337158203125,
-0.007110595703125,
0.025726318359375,
0.0196075439453125,
-0.006656646728515625,
-0.0034008026123046875,
0.0430908203125,
0.0017251968383789062,
-0.0204010009765625,
0.0258331298828125,
-0.005825042724609375,
-0.03277587890625,
0.0362548828125,
0.0134124755859375,
0.0025081634521484375,
0.0357666015625,
-0.006542205810546875,
0.020263671875,
-0.040557861328125,
-0.0016012191772460938,
-0.006404876708984375,
-0.02618408203125,
-0.04248046875,
-0.01087188720703125,
0.014007568359375,
0.0176239013671875,
-0.0233917236328125,
0.0196380615234375,
-0.027252197265625,
-0.00200653076171875,
0.01062774658203125,
-0.0789794921875,
0.0254364013671875,
0.046966552734375,
-0.00592803955078125,
-0.005279541015625,
0.0021419525146484375,
-0.0180511474609375,
-0.016510009765625,
0.00847625732421875,
-0.0208892822265625,
0.016265869140625,
-0.010467529296875,
0.04302978515625,
-0.025177001953125,
-0.0140838623046875,
0.0300750732421875,
0.0086822509765625,
0.054473876953125,
0.015625,
-0.007061004638671875,
-0.01090240478515625,
-0.02984619140625,
-0.037384033203125,
-0.0162200927734375,
-0.0063323974609375,
-0.029449462890625,
0.0038013458251953125,
0.0006155967712402344,
0.036773681640625,
-0.0244903564453125,
-0.02752685546875,
0.0127410888671875,
-0.00154876708984375,
-0.01702880859375,
0.050811767578125,
-0.0225372314453125,
0.049957275390625,
-0.013763427734375,
0.03485107421875,
-0.0013780593872070312,
0.036712646484375,
0.00713348388671875,
-0.0028629302978515625,
-0.01568603515625,
-0.09002685546875,
0.0035800933837890625,
-0.03057861328125,
0.01263427734375,
0.0872802734375,
0.050933837890625,
0.0204315185546875,
-0.022430419921875,
0.0199432373046875,
0.00502777099609375,
-0.0264434814453125,
-0.009246826171875,
0.0286102294921875,
-0.0086669921875,
-0.0222625732421875,
0.039703369140625,
0.01314544677734375,
-0.010833740234375,
-0.007808685302734375,
-0.0318603515625,
0.03228759765625,
-0.00896453857421875,
-0.038543701171875,
-0.02764892578125,
0.0230560302734375,
0.059844970703125,
-0.0028133392333984375,
0.033966064453125,
-0.01336669921875,
0.0005736351013183594,
0.0599365234375,
-0.059295654296875,
0.007671356201171875,
0.0304718017578125,
0.01459503173828125,
-0.038421630859375,
0.00836181640625,
0.0216064453125,
-0.0063629150390625,
-0.01143646240234375,
0.04241943359375,
0.032196044921875,
-0.09136962890625,
-0.0019254684448242188,
0.006641387939453125,
0.002887725830078125,
-0.00771331787109375,
0.007266998291015625,
-0.0022373199462890625,
-0.018951416015625,
-0.049041748046875,
0.0124664306640625,
-0.049346923828125,
-0.0374755859375,
0.0023441314697265625,
-0.0221405029296875,
-0.013671875,
0.018280029296875,
-0.0130157470703125,
-0.0010967254638671875,
-0.031524658203125,
0.007717132568359375,
-0.02008056640625,
-0.0216522216796875,
0.03143310546875,
0.00560760498046875,
-0.02789306640625,
-0.08587646484375,
-0.00864410400390625,
0.0020999908447265625,
-0.049652099609375,
0.01052093505859375,
0.0107879638671875,
0.0601806640625,
0.050262451171875,
0.00974273681640625,
-0.011474609375,
0.0238494873046875,
-0.01222991943359375,
-0.046722412109375,
-0.0219879150390625,
0.0164794921875,
0.036956787109375,
-0.028472900390625,
0.0343017578125,
-0.037994384765625,
-0.0218353271484375,
-0.01445770263671875,
-0.006626129150390625,
0.07269287109375,
-0.0313720703125,
-0.0091552734375,
0.044708251953125,
0.0170745849609375,
-0.0223846435546875,
0.0364990234375,
-0.04107666015625,
-0.047332763671875,
-0.05645751953125,
-0.00665283203125,
-0.08660888671875,
-0.01222991943359375,
0.01434326171875,
-0.045623779296875,
0.052154541015625,
-0.006557464599609375,
0.00335693359375,
0.01541900634765625,
0.0193939208984375,
-0.0241851806640625,
0.000659942626953125,
-0.0173797607421875,
0.02813720703125,
-0.0269927978515625,
0.0302581787109375,
-0.0330810546875,
-0.01415252685546875,
0.0023479461669921875,
0.0204925537109375,
0.018463134765625,
0.01026153564453125,
-0.040130615234375,
0.017822265625,
0.07769775390625,
0.00934600830078125,
0.0019969940185546875,
0.042999267578125,
0.03192138671875,
0.009857177734375,
0.0694580078125,
-0.0283355712890625,
0.02203369140625,
0.0131378173828125,
0.044921875,
0.04949951171875,
0.018798828125,
0.0301513671875,
-0.03546142578125,
-0.03436279296875,
-0.05224609375,
-0.01434326171875,
0.03558349609375,
-0.005573272705078125,
0.037384033203125,
-0.0033016204833984375,
0.052642822265625,
-0.08990478515625,
0.0007944107055664062,
-0.0246124267578125,
0.05615234375,
-0.00002664327621459961,
0.0108795166015625,
0.035919189453125,
-0.00567626953125,
0.0811767578125,
-0.02093505859375,
-0.00949859619140625,
-0.0149383544921875,
0.030120849609375,
0.0257110595703125,
0.0119476318359375,
0.010009765625,
-0.0218658447265625,
0.061126708984375,
0.03411865234375,
0.0276031494140625,
-0.05126953125,
-0.059600830078125,
0.015167236328125,
0.0232391357421875,
0.0004930496215820312,
0.0266571044921875,
0.0100860595703125,
0.027252197265625,
0.0858154296875,
-0.037933349609375,
0.0206756591796875,
0.0205841064453125,
-0.00234222412109375,
-0.0242156982421875,
-0.035614013671875,
-0.0172119140625,
0.039825439453125,
-0.0740966796875,
0.03631591796875,
0.03466796875,
0.059417724609375,
0.003543853759765625,
0.08251953125,
0.01300811767578125,
-0.0249481201171875,
-0.034576416015625,
0.0037555694580078125,
0.003253936767578125,
0.040374755859375,
-0.039947509765625,
-0.01224517822265625,
0.03302001953125,
0.035919189453125,
0.0645751953125,
0.018463134765625,
0.03485107421875,
0.0350341796875,
0.037933349609375,
0.021392822265625,
0.051727294921875,
0.0091400146484375,
-0.01006317138671875,
-0.0205535888671875,
-0.01404571533203125,
0.0167694091796875,
-0.015960693359375,
0.0012464523315429688,
0.005092620849609375,
0.0111236572265625,
0.052490234375,
0.054779052734375,
0.0166473388671875,
-0.017822265625,
-0.01357269287109375,
0.009368896484375,
0.1041259765625,
0.08050537109375,
-0.057525634765625,
-0.017822265625,
-0.004573822021484375,
-0.07440185546875,
0.05029296875,
0.058563232421875,
-0.0175933837890625,
-0.0165557861328125,
0.055023193359375,
-0.0289764404296875,
0.0023288726806640625,
0.025390625,
0.01861572265625,
0.022674560546875,
0.015838623046875,
0.0213775634765625,
-0.04541015625,
-0.019622802734375,
0.0204315185546875,
-0.0011224746704101562,
-0.0281982421875,
0.022247314453125,
0.0153656005859375,
-0.0167694091796875,
-0.010223388671875,
0.07342529296875,
-0.05120849609375,
-0.020782470703125,
0.04302978515625,
-0.0032958984375,
0.014862060546875,
-0.00734710693359375,
0.0130157470703125,
-0.0104522705078125,
0.04046630859375,
-0.04290771484375,
-0.0043792724609375,
-0.007720947265625,
0.01410675048828125,
-0.0269012451171875,
0.0057525634765625,
-0.04052734375,
0.01503753662109375,
-0.01568603515625,
-0.042938232421875,
0.03192138671875,
-0.01140594482421875,
-0.003383636474609375,
0.0401611328125,
0.006183624267578125,
-0.00389862060546875,
0.018035888671875,
-0.0304412841796875,
0.0390625,
0.050506591796875,
-0.0243682861328125,
-0.0135955810546875,
-0.01386260986328125,
-0.0237579345703125,
-0.0241241455078125,
0.041534423828125,
-0.0271759033203125,
-0.0074920654296875,
0.026519775390625,
-0.0171661376953125,
0.01275634765625,
-0.0018053054809570312,
-0.036407470703125,
-0.0152435302734375,
0.048370361328125,
-0.038787841796875,
-0.041748046875,
0.03607177734375,
-0.0301971435546875,
0.0074615478515625,
0.0018939971923828125,
-0.0220947265625,
0.042205810546875,
-0.04669189453125,
0.005687713623046875,
-0.006160736083984375,
0.049407958984375,
-0.002532958984375,
-0.04302978515625,
-0.0008697509765625,
-0.04217529296875,
0.031005859375,
0.0019140243530273438,
-0.006927490234375,
0.027313232421875,
0.0596923828125,
-0.008453369140625,
0.04364013671875,
-0.002948760986328125,
-0.04425048828125,
0.019866943359375,
0.01265716552734375,
0.0198974609375,
-0.0152587890625,
-0.04473876953125,
0.02728271484375,
0.006580352783203125,
0.052215576171875,
0.017333984375,
-0.01309967041015625,
0.03118896484375,
-0.006763458251953125,
-0.038970947265625,
-0.07867431640625,
0.01016998291015625,
-0.0858154296875,
-0.01244354248046875,
0.035858154296875,
-0.0011205673217773438,
0.0258941650390625,
-0.004779815673828125,
-0.048065185546875,
0.050079345703125,
0.006771087646484375,
-0.0283966064453125,
-0.068603515625,
0.01197052001953125,
0.0174102783203125,
0.0050201416015625,
-0.01030731201171875,
-0.030181884765625,
-0.05712890625,
0.00543975830078125,
-0.011688232421875,
0.05078125,
0.01377105712890625,
-0.00029921531677246094,
-0.0249481201171875,
-0.01727294921875,
-0.040618896484375,
-0.016357421875,
0.039215087890625,
-0.026397705078125,
0.0090789794921875,
0.007450103759765625,
-0.062164306640625,
-0.0682373046875,
-0.01506805419921875,
-0.0025959014892578125,
-0.01251220703125,
0.0104217529296875,
-0.060272216796875,
-0.0173187255859375,
0.05633544921875,
0.07977294921875,
0.0248870849609375,
-0.0224456787109375,
-0.003253936767578125,
-0.03277587890625,
-0.0460205078125,
-0.0218658447265625,
0.0232086181640625,
-0.0450439453125,
0.006404876708984375,
-0.009613037109375,
-0.00800323486328125,
0.0057220458984375,
-0.004611968994140625,
-0.004650115966796875,
-0.004169464111328125,
0.0399169921875,
-0.005340576171875,
-0.040924072265625,
0.034088134765625,
0.007007598876953125,
-0.02099609375,
-0.03411865234375,
-0.0146636962890625,
-0.0033054351806640625,
-0.0274505615234375,
-0.055694580078125,
-0.0184783935546875,
0.03192138671875,
-0.0177001953125,
-0.0166473388671875,
0.01043701171875,
-0.02874755859375,
0.0019817352294921875,
0.030853271484375,
-0.032135009765625,
0.01149749755859375,
0.00843048095703125,
-0.0008382797241210938,
-0.042572021484375,
0.054351806640625,
0.04022216796875,
0.05242919921875,
0.01549530029296875,
0.028900146484375,
-0.01416778564453125,
0.05010986328125,
0.035552978515625,
-0.037811279296875,
0.061004638671875,
-0.02557373046875,
0.005428314208984375,
0.004199981689453125,
-0.035186767578125,
-0.028472900390625,
0.02288818359375,
0.047637939453125,
-0.01403045654296875,
0.016845703125
] |
105c7dcf950af642b82052cbbe132a2793ce58d6
|
Wordpress Stackexchange
Q: Remove wptexturize from a shortcode? Is there a way to remove wptexturize only for a certain shortcode?
A: There is a clue in wp-includes/formatting.php in the function wptexturize:
$default_no_texturize_shortcodes = array('code');
...
$no_texturize_shortcodes = '(' . implode('|',
apply_filters('no_texturize_shortcodes', $default_no_texturize_shortcodes) ) . ')';
Try using this filter to add a shortcode to the array:
function my_no_tex( $shortcodes ) {
$shortcodes[] = 'someshortcode';
return $shortcodes;
}
add_filter( 'no_texturize_shortcodes', 'my_no_tex' );
|
Q: Remove wptexturize from a shortcode? Is there a way to remove wptexturize only for a certain shortcode?
A: There is a clue in wp-includes/formatting.php in the function wptexturize:
$default_no_texturize_shortcodes = array('code');
...
$no_texturize_shortcodes = '(' . implode('|',
apply_filters('no_texturize_shortcodes', $default_no_texturize_shortcodes) ) . ')';
Try using this filter to add a shortcode to the array:
function my_no_tex( $shortcodes ) {
$shortcodes[] = 'someshortcode';
return $shortcodes;
}
add_filter( 'no_texturize_shortcodes', 'my_no_tex' );
A: Shortcodes run after the wptexturize function, so they shouldn't get processed by it anyway.
wptexturize runs on the_content with priority 10. The do_shortcode function runs with priority 11.
|
wordpress
|
{
"language": "en",
"length": 98,
"provenance": "stackexchange_00019.jsonl.gz:407974",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12754"
}
|
[
0.033935546875,
0.0193328857421875,
-0.003017425537109375,
0.006252288818359375,
0.016754150390625,
-0.044097900390625,
0.063232421875,
-0.046051025390625,
-0.04541015625,
0.0240936279296875,
0.0106658935546875,
0.004367828369140625,
-0.037506103515625,
-0.03106689453125,
0.00295257568359375,
-0.054412841796875,
0.006622314453125,
0.035675048828125,
0.0164642333984375,
-0.0020294189453125,
-0.03118896484375,
-0.00859832763671875,
0.007965087890625,
0.00624847412109375,
-0.02825927734375,
-0.01558685302734375,
0.1148681640625,
0.0047149658203125,
-0.040191650390625,
-0.01515960693359375,
-0.000499725341796875,
0.0217437744140625,
0.039520263671875,
0.04595947265625,
-0.0809326171875,
0.052642822265625,
-0.05084228515625,
0.032012939453125,
-0.0183258056640625,
0.01544952392578125,
-0.0038433074951171875,
0.0029506683349609375,
-0.00749969482421875,
0.002170562744140625,
-0.035308837890625,
0.0225830078125,
-0.03582763671875,
-0.033050537109375,
0.0015172958374023438,
0.014007568359375,
0.041107177734375,
0.004848480224609375,
0.060302734375,
-0.048583984375,
-0.0159759521484375,
-0.0017337799072265625,
-0.044891357421875,
0.04083251953125,
0.0249786376953125,
0.00550079345703125,
-0.00855255126953125,
0.00553131103515625,
0.01541900634765625,
-0.004619598388671875,
-0.015594482421875,
-0.00930023193359375,
-0.08154296875,
0.011688232421875,
-0.0020389556884765625,
0.01158905029296875,
0.0232086181640625,
-0.04345703125,
-0.0008087158203125,
-0.0014505386352539062,
-0.0301361083984375,
0.0187835693359375,
0.0036945343017578125,
0.0163726806640625,
0.03240966796875,
0.002063751220703125,
0.03302001953125,
-0.053497314453125,
0.03369140625,
0.026031494140625,
-0.0131683349609375,
0.027984619140625,
0.01255035400390625,
-0.01551055908203125,
-0.0267486572265625,
-0.001857757568359375,
-0.01001739501953125,
-0.006679534912109375,
-0.046051025390625,
0.040435791015625,
0.01300811767578125,
-0.0112457275390625,
0.007190704345703125,
0.00994873046875,
0.016265869140625,
0.019134521484375,
0.005218505859375,
-0.055145263671875,
0.03125,
-0.04833984375,
0.004241943359375,
0.0282135009765625,
-0.01513671875,
-0.004367828369140625,
0.04595947265625,
0.0189208984375,
-0.0038394927978515625,
0.01641845703125,
-0.0215606689453125,
-0.02349853515625,
-0.018341064453125,
0.0168304443359375,
-0.049224853515625,
0.01806640625,
0.0108642578125,
0.01380157470703125,
0.01207733154296875,
0.021453857421875,
0.0266265869140625,
-0.0645751953125,
-0.0017490386962890625,
-0.043121337890625,
-0.03985595703125,
-0.0266265869140625,
0.0379638671875,
-0.0284271240234375,
-0.05621337890625,
0.03179931640625,
0.0926513671875,
0.040496826171875,
0.0206146240234375,
-0.0108184814453125,
0.022613525390625,
-0.00461578369140625,
0.0211029052734375,
0.0252685546875,
-0.007350921630859375,
-0.0171966552734375,
0.024383544921875,
0.0088653564453125,
0.041595458984375,
0.05938720703125,
0.0238800048828125,
-0.0025234222412109375,
0.00452423095703125,
-0.06011962890625,
0.0345458984375,
-0.01036834716796875,
0.048187255859375,
0.0264892578125,
-0.00984954833984375,
-0.022857666015625,
0.084228515625,
-0.04266357421875,
-0.051483154296875,
-0.076171875,
-0.018157958984375,
-0.051727294921875,
-0.0263519287109375,
-0.0207061767578125,
-0.022430419921875,
0.038482666015625,
-0.004703521728515625,
0.01161956787109375,
0.01641845703125,
0.044525146484375,
-0.005924224853515625,
-0.0291748046875,
-0.039215087890625,
0.0188751220703125,
0.0049285888671875,
0.006206512451171875,
-0.0201263427734375,
0.019927978515625,
0.0182037353515625,
0.01313018798828125,
0.01204681396484375,
-0.04522705078125,
0.0416259765625,
0.0054931640625,
-0.054168701171875,
0.0275726318359375,
0.01104736328125,
0.082275390625,
0.005359649658203125,
0.0253448486328125,
0.03167724609375,
-0.012847900390625,
-0.004810333251953125,
-0.016876220703125,
-0.0033054351806640625,
-0.0479736328125,
0.0034313201904296875,
-0.0118560791015625,
-0.00859832763671875,
0.0246734619140625,
0.00814056396484375,
0.0255126953125,
0.002857208251953125,
0.001613616943359375,
-0.0440673828125,
0.02801513671875,
-0.0290069580078125,
0.03509521484375,
-0.064453125,
-0.032318115234375,
0.053375244140625,
-0.053863525390625,
-0.040740966796875,
0.06378173828125,
-0.005420684814453125,
0.015838623046875,
-0.00408935546875,
0.032440185546875,
0.0224609375,
0.004611968994140625,
0.052398681640625,
-0.0261077880859375,
0.043487548828125,
0.014617919921875,
0.019073486328125,
-0.0256500244140625,
-0.0220184326171875,
-0.0322265625,
0.00791168212890625,
-0.031463623046875,
-0.028411865234375,
0.06024169921875,
0.01195526123046875,
0.04443359375,
-0.01070404052734375,
-0.0186309814453125,
-0.0010547637939453125,
-0.023681640625,
0.01215362548828125,
0.033782958984375,
0.041351318359375,
0.040618896484375,
0.0006580352783203125,
-0.04376220703125,
0.104248046875,
0.026641845703125,
0.02886962890625,
-0.055145263671875,
0.0287322998046875,
0.02886962890625,
-0.029388427734375,
-0.01189422607421875,
0.01226043701171875,
-0.02850341796875,
0.033782958984375,
-0.002063751220703125,
-0.0469970703125,
-0.013824462890625,
0.0246429443359375,
-0.0106048583984375,
0.01357269287109375,
0.006702423095703125,
0.0281524658203125,
-0.03350830078125,
0.1009521484375,
-0.0250244140625,
0.0460205078125,
0.022430419921875,
-0.047637939453125,
0.006847381591796875,
0.01507568359375,
-0.0256805419921875,
-0.0016984939575195312,
0.031768798828125,
0.04766845703125,
0.019378662109375,
-0.0166473388671875,
-0.0312347412109375,
0.00484466552734375,
0.0560302734375,
0.0037078857421875,
0.05108642578125,
-0.0029201507568359375,
-0.021759033203125,
0.00988006591796875,
-0.0228729248046875,
-0.021728515625,
-0.0025882720947265625,
-0.017181396484375,
-0.045989990234375,
-0.0241851806640625,
0.04278564453125,
-0.006046295166015625,
0.00024080276489257812,
0.0645751953125,
-0.01114654541015625,
-0.00632476806640625,
-0.06463623046875,
0.062408447265625,
-0.0469970703125,
-0.01074981689453125,
0.07965087890625,
0.002109527587890625,
0.01342010498046875,
0.0057830810546875,
-0.001224517822265625,
0.0028705596923828125,
-0.025665283203125,
-0.0142822265625,
0.005977630615234375,
-0.056640625,
0.0106201171875,
0.016387939453125,
0.07330322265625,
-0.0186309814453125,
-0.039520263671875,
0.01334381103515625,
0.04266357421875,
-0.0211334228515625,
-0.053314208984375,
0.03509521484375,
0.01560211181640625,
-0.018951416015625,
0.0099639892578125,
-0.013275146484375,
-0.01316070556640625,
0.0130615234375,
-0.0142669677734375,
0.00745391845703125,
-0.04913330078125,
-0.023956298828125,
-0.049407958984375,
-0.031494140625,
-0.003246307373046875,
-0.003276824951171875,
-0.023223876953125,
0.000782012939453125,
0.0611572265625,
0.00970458984375,
-0.017730712890625,
0.004764556884765625,
0.01128387451171875,
-0.0091094970703125,
0.003910064697265625,
0.000835418701171875,
-0.02691650390625,
-0.00482177734375,
-0.006221771240234375,
0.00701904296875,
0.01459503173828125,
0.0211334228515625,
0.00545501708984375,
0.01424407958984375,
-0.01045989990234375,
0.01617431640625,
0.037689208984375,
-0.003032684326171875,
-0.0199127197265625,
0.023345947265625,
-0.05560302734375,
-0.01177215576171875,
0.009765625,
-0.046630859375,
0.008331298828125,
0.01111602783203125,
-0.0286102294921875,
0.0038394927978515625,
0.00420379638671875,
0.04132080078125,
-0.0092620849609375,
0.07537841796875,
-0.00914764404296875,
0.0262908935546875,
0.0059356689453125,
0.0192108154296875,
-0.0697021484375,
0.0074615478515625,
-0.051116943359375,
0.002899169921875,
-0.006015777587890625,
-0.0177459716796875,
-0.0081787109375,
-0.032745361328125,
-0.018890380859375,
-0.006927490234375,
0.050994873046875,
-0.0253753662109375,
0.03729248046875,
-0.047882080078125,
-0.0226593017578125,
-0.0170440673828125,
0.09405517578125,
-0.037017822265625,
-0.031646728515625,
-0.0155029296875,
-0.0014934539794921875,
0.00859832763671875,
-0.00897216796875,
0.01303863525390625,
-0.034820556640625,
-0.10198974609375,
0.0181121826171875,
-0.00628662109375,
-0.0243377685546875,
-0.0193634033203125,
-0.00762176513671875,
-0.04278564453125,
-0.048187255859375,
0.0246734619140625,
-0.00384521484375,
0.004642486572265625,
-0.021148681640625,
0.0029048919677734375,
-0.050140380859375,
0.0024051666259765625,
-0.0270538330078125,
-0.03076171875,
-0.0029010772705078125,
0.0098724365234375,
-0.01137542724609375,
0.01702880859375,
-0.056976318359375,
-0.01216888427734375,
0.007080078125,
-0.03131103515625,
-0.0175933837890625,
-0.006404876708984375,
0.032623291015625,
-0.0255279541015625,
0.0718994140625,
-0.0025634765625,
0.01084136962890625,
0.02435302734375,
0.05157470703125,
0.00872039794921875,
0.08184814453125,
-0.0372314453125,
-0.01483917236328125,
0.00411224365234375,
-0.049835205078125,
0.0060272216796875,
-0.023101806640625,
-0.0263214111328125,
0.037078857421875,
-0.046112060546875,
0.0303497314453125,
-0.041656494140625,
-0.0236358642578125,
0.020904541015625,
0.0257415771484375,
-0.04638671875,
0.00838470458984375,
0.03314208984375,
0.0225830078125,
-0.033843994140625,
-0.051177978515625,
-0.0241241455078125,
0.0310211181640625,
-0.002361297607421875,
0.0184478759765625,
0.006359100341796875,
-0.04144287109375,
0.08734130859375,
0.004062652587890625,
-0.0036983489990234375,
-0.020904541015625,
0.062469482421875,
0.0021686553955078125,
-0.0178375244140625,
0.035003662109375,
-0.033538818359375,
0.00959014892578125,
-0.0152587890625,
0.012939453125,
-0.012176513671875,
0.0208892822265625,
0.008544921875,
0.0230560302734375,
-0.02764892578125,
0.00196075439453125,
-0.035308837890625,
0.0040130615234375,
0.050872802734375,
-0.00435638427734375,
0.004413604736328125,
0.0090789794921875,
-0.01490020751953125,
-0.0159454345703125,
0.0263671875,
-0.00506591796875,
-0.00702667236328125,
-0.041259765625,
0.035064697265625,
-0.0277099609375,
-0.0209808349609375,
0.036163330078125,
-0.0022735595703125,
0.0538330078125,
-0.0119171142578125,
-0.029388427734375,
-0.0267181396484375,
-0.033203125,
-0.04193115234375,
-0.00019478797912597656,
0.03369140625,
0.045867919921875,
-0.0081634521484375,
-0.00048470497131347656,
0.005626678466796875,
-0.031341552734375,
0.010955810546875,
-0.043609619140625,
0.010650634765625,
-0.022918701171875,
0.000926971435546875,
0.0035457611083984375,
-0.01239013671875,
-0.045684814453125,
0.0081634521484375,
0.0210418701171875,
-0.0275421142578125,
-0.02874755859375,
0.034393310546875,
0.02044677734375,
-0.00638580322265625,
0.01190185546875,
0.025970458984375,
0.035614013671875,
-0.03692626953125,
-0.0218048095703125,
0.049102783203125,
0.026947021484375,
-0.03253173828125,
-0.0233154296875,
0.02020263671875,
-0.00965118408203125,
-0.01690673828125,
-0.02392578125,
0.039459228515625,
0.02972412109375,
0.0069580078125,
0.0103912353515625,
0.003314971923828125,
0.05682373046875,
0.00972747802734375,
-0.038909912109375,
-0.024932861328125,
-0.046875,
0.055908203125,
-0.057098388671875,
-0.025787353515625,
-0.0192718505859375,
0.0225067138671875,
-0.01287078857421875,
-0.03924560546875,
-0.030517578125,
-0.0248870849609375,
0.0102386474609375,
0.005855560302734375,
0.033111572265625,
-0.035247802734375,
0.0318603515625,
-0.020477294921875,
0.006175994873046875,
-0.01250457763671875,
0.00914764404296875,
0.040679931640625,
0.0259246826171875,
-0.007232666015625,
-0.024932861328125,
-0.07379150390625,
-0.0146942138671875,
-0.028228759765625,
-0.025787353515625,
-0.02606201171875,
0.00296783447265625,
-0.0003612041473388672,
0.0223541259765625,
0.00431060791015625,
0.0185394287109375,
-0.00893402099609375,
0.0222015380859375,
-0.01308441162109375,
0.060821533203125,
-0.0282135009765625,
0.01157379150390625,
0.04296875,
0.0030803680419921875,
0.0022449493408203125,
0.023834228515625,
0.05084228515625,
-0.037750244140625,
0.037628173828125,
-0.0158843994140625,
-0.0367431640625,
-0.0298614501953125,
0.002803802490234375,
-0.00988006591796875,
0.0109405517578125,
-0.023223876953125,
0.0247802734375,
-0.015960693359375,
0.002124786376953125,
-0.018585205078125,
0.032196044921875,
-0.036285400390625,
0.022735595703125,
-0.01380157470703125,
-0.0219573974609375,
0.00434112548828125,
-0.035491943359375,
0.00452423095703125,
-0.0071258544921875,
-0.0227203369140625,
-0.01018524169921875,
0.01751708984375,
0.005115509033203125,
0.0296630859375,
0.039398193359375,
-0.0242919921875,
0.0305633544921875,
0.022247314453125,
-0.00556182861328125,
-0.00240325927734375,
-0.0100555419921875,
0.0082550048828125,
0.0133819580078125,
0.05126953125,
-0.0058441162109375,
-0.0137176513671875,
0.029266357421875,
-0.032470703125,
-0.0029773712158203125,
0.071044921875,
0.07830810546875,
-0.07928466796875,
0.006404876708984375,
0.0428466796875,
0.018585205078125,
0.01165771484375,
-0.0103607177734375,
-0.01320648193359375,
-0.053985595703125,
0.0227813720703125,
0.0163116455078125,
-0.01045989990234375,
0.00760650634765625,
0.0142059326171875,
-0.01953125,
-0.0067291259765625,
0.03387451171875,
0.01181793212890625,
-0.01129913330078125,
0.028076171875,
-0.0112457275390625,
-0.0039520263671875,
-0.0264434814453125,
0.005970001220703125,
0.0217742919921875,
-0.060821533203125,
-0.08673095703125,
-0.01265716552734375,
0.02685546875,
-0.04193115234375,
0.00010204315185546875,
-0.014404296875,
0.011505126953125,
0.041748046875,
-0.045135498046875,
0.03619384765625,
0.0026092529296875,
0.00311279296875,
0.0189666748046875,
-0.0338134765625,
-0.0112762451171875,
0.05316162109375,
-0.043121337890625,
0.0269012451171875,
0.009613037109375,
0.0073394775390625,
0.006381988525390625,
0.01499176025390625,
0.07208251953125,
-0.06610107421875,
0.00756072998046875,
0.006473541259765625,
0.007541656494140625,
0.0204925537109375,
-0.03375244140625,
0.00386810302734375,
-0.04278564453125,
-0.007236480712890625,
-0.032470703125,
-0.02215576171875,
0.0291290283203125,
-0.04473876953125,
-0.09661865234375,
0.07366943359375,
0.0400390625,
0.058685302734375,
0.0076141357421875,
0.0147247314453125,
-0.030364990234375,
-0.0136871337890625,
0.0003204345703125,
0.06427001953125,
0.029052734375,
0.0213775634765625,
0.0306396484375,
-0.005474090576171875,
0.039886474609375,
0.03131103515625,
0.037811279296875,
-0.007320404052734375,
0.038421630859375,
0.01397705078125,
0.061065673828125,
0.0271759033203125,
-0.03662109375,
-0.00852203369140625,
-0.01099395751953125,
-0.01464080810546875,
-0.0035037994384765625,
-0.0182952880859375,
0.021484375,
-0.0109710693359375,
-0.0288238525390625,
0.0025577545166015625,
0.0146636962890625,
0.0261077880859375,
-0.00150299072265625,
0.0129547119140625,
-0.00624847412109375,
-0.00797271728515625,
0.007251739501953125,
0.0174407958984375,
-0.00646209716796875,
0.0168609619140625,
-0.01071929931640625,
-0.03857421875,
-0.042999267578125,
-0.01776123046875,
0.035430908203125,
0.0082855224609375,
0.080810546875,
0.06707763671875,
0.046295166015625,
0.07061767578125,
-0.03082275390625,
0.045654296875,
-0.0009670257568359375,
-0.056396484375,
-0.0033721923828125,
0.011322021484375,
0.0165557861328125,
-0.003864288330078125,
0.0330810546875,
0.035736083984375,
0.0125274658203125,
-0.0338134765625,
-0.003704071044921875,
0.025604248046875,
0.0026569366455078125,
-0.033050537109375,
-0.03448486328125,
-0.03558349609375,
-0.0804443359375,
-0.038818359375,
-0.0277252197265625,
-0.01200103759765625,
0.0118408203125,
0.04833984375,
-0.0230255126953125,
0.0006937980651855469,
-0.03167724609375,
-0.022613525390625,
-0.0295562744140625,
-0.0008387565612792969,
0.012939453125,
0.044219970703125,
0.0017843246459960938,
0.03179931640625,
-0.029083251953125,
-0.0194091796875,
0.009613037109375,
0.008026123046875,
-0.00261688232421875,
-0.004085540771484375,
-0.0225830078125,
-0.0233306884765625,
-0.006473541259765625,
0.023162841796875,
0.033935546875,
0.00687408447265625,
0.022247314453125,
-0.0014495849609375,
-0.004199981689453125,
0.00876617431640625,
0.02685546875,
-0.01849365234375,
-0.01497650146484375,
-0.032379150390625,
-0.0238189697265625,
0.0135955810546875,
-0.01151275634765625,
-0.001708984375,
-0.00122833251953125,
0.029266357421875,
-0.03216552734375,
0.0152587890625,
-0.0022411346435546875,
-0.031280517578125,
0.0219268798828125,
-0.007110595703125,
0.0172576904296875,
0.004169464111328125,
-0.018585205078125,
-0.01837158203125,
-0.007289886474609375,
0.02423095703125,
0.01064300537109375,
0.0263519287109375,
-0.002483367919921875,
0.034881591796875,
0.036041259765625,
-0.038848876953125,
-0.0245208740234375,
0.0511474609375,
-0.01447296142578125,
-0.04119873046875,
0.0199127197265625,
-0.0205535888671875,
-0.059783935546875,
-0.048309326171875,
-0.004177093505859375,
0.0684814453125,
-0.0012292861938476562,
0.0149688720703125,
0.0012950897216796875,
0.01605224609375,
-0.0229949951171875,
-0.0239715576171875,
-0.01837158203125,
-0.018035888671875,
0.010528564453125,
-0.00901031494140625,
-0.021026611328125,
-0.005550384521484375,
-0.0030727386474609375,
0.036285400390625,
0.0170745849609375,
0.00397491455078125,
0.02685546875,
-0.02301025390625,
0.0167083740234375,
-0.005107879638671875,
0.03582763671875,
-0.0263824462890625,
-0.017486572265625,
-0.04229736328125,
-0.0162811279296875,
0.0160064697265625,
0.00258636474609375,
0.0096588134765625,
-0.002223968505859375,
0.04132080078125,
-0.037933349609375,
0.044708251953125,
0.007076263427734375,
0.06353759765625,
0.034210205078125,
0.01067352294921875,
0.02496337890625,
0.01141357421875,
-0.0132293701171875,
0.0096588134765625,
0.011474609375,
-0.03118896484375,
0.025360107421875,
-0.07342529296875,
-0.0330810546875,
-0.0005407333374023438,
0.0192718505859375,
-0.0033168792724609375,
0.006198883056640625,
-0.01360321044921875,
-0.0176239013671875,
-0.03802490234375,
0.03656005859375,
-0.00684356689453125,
-0.046600341796875,
0.0009293556213378906,
0.010284423828125,
-0.03131103515625,
0.004825592041015625,
-0.027130126953125,
-0.0008063316345214844,
0.00554656982421875,
0.01378631591796875,
-0.08197021484375,
0.048126220703125,
-0.00905609130859375,
0.01184844970703125,
-0.01080322265625,
0.039154052734375,
-0.036956787109375,
-0.044403076171875,
-0.052734375,
-0.07208251953125,
-0.0615234375,
0.08514404296875,
-0.031890869140625,
-0.0022602081298828125,
0.0137176513671875,
0.009521484375,
-0.05841064453125,
0.0172576904296875,
-0.004573822021484375,
0.056427001953125,
-0.00995635986328125,
-0.0233306884765625,
0.050140380859375,
-0.016326904296875,
-0.00325775146484375,
-0.07080078125,
-0.0214691162109375,
-0.05340576171875,
0.0443115234375,
0.01293182373046875,
-0.00431060791015625,
-0.00016689300537109375,
-0.0310211181640625,
-0.0772705078125,
0.04315185546875,
-0.0058441162109375,
-0.04107666015625,
-0.05224609375,
0.0036907196044921875,
0.01052093505859375,
-0.0083160400390625,
-0.0211334228515625,
-0.01183319091796875,
-0.047088623046875,
0.00323486328125,
0.004283905029296875,
0.07958984375,
-0.044158935546875,
0.0085906982421875,
0.007755279541015625,
0.05865478515625,
0.036407470703125,
0.0213623046875,
0.005031585693359375,
-0.020904541015625,
0.042266845703125,
0.061767578125,
-0.0223541259765625,
-0.0222930908203125,
0.004322052001953125,
-0.04193115234375,
-0.000774383544921875,
-0.030670166015625,
-0.03387451171875,
-0.006664276123046875,
0.06463623046875,
0.043060302734375,
0.02520751953125,
-0.036224365234375,
0.00908660888671875,
0.03460693359375,
0.024078369140625,
-0.008453369140625,
0.0038585662841796875,
-0.034515380859375,
-0.03961181640625,
-0.01165008544921875,
-0.0266876220703125,
-0.0038852691650390625,
-0.034271240234375,
-0.048309326171875,
-0.003326416015625,
-0.051177978515625,
0.00714111328125,
-0.057098388671875,
-0.00293731689453125,
-0.0193023681640625,
0.004077911376953125,
0.019744873046875,
-0.037200927734375,
0.03472900390625,
-0.0097198486328125,
-0.01409912109375,
-0.01395416259765625,
0.010223388671875,
0.0145416259765625,
0.0101318359375,
0.01436614990234375,
0.0013036727905273438,
-0.00124359130859375,
0.0185546875,
-0.0180816650390625,
-0.006458282470703125,
0.02276611328125,
-0.00010037422180175781,
-0.01336669921875,
0.00406646728515625,
0.0184783935546875,
-0.0648193359375,
-0.02899169921875,
0.04510498046875,
-0.014251708984375,
0.0297393798828125,
0.0020809173583984375,
-0.003147125244140625,
0.083740234375,
-0.0291900634765625,
0.0181427001953125,
0.012542724609375,
0.0169830322265625,
-0.029266357421875,
0.0198822021484375,
-0.0171661376953125,
0.024658203125,
0.01824951171875
] |
91cf01d133731acdffa703f4f62f842bdbaa52e9
|
Wordpress Stackexchange
Q: Add class to Reply button in Comments area Under each comment there is a link called 'Reply'. I want to add a class to this link. It's default class is comment-reply-link. How can I do so? I am creating my own theme and I don't want to manually edit files inside the wp-includes directory.
A: Quite old post, but while searching I came here, maybe someone else will find it useful.
The only solution I found is to completely rebuilt the button that comment_reply_link returns.
I first made two vars reconstructing href and onclick attributes for the reply button:
$reply_href = wp_make_link_relative(
get_permalink( $comment->comment_post_ID )
)
. '?replytocom=' . $comment->comment_ID . '#respond';
$reply_onclick = 'return addComment.moveForm("comment-'
. $comment->comment_ID
. '", "'
. $comment->comment_ID
. '", "respond", "'
. $comment->comment_post_ID
. '")';
And then output the whole reply block, adding your custom classes:
<div class="reply">
<a class="comment-reply-link custom-class" href="<?php
echo $reply_href;
?>" onclick="<?php
echo $reply_onclick;
?>"><?php
_e('Reply', 'yourthemename');
?></a>
</div>
|
Q: Add class to Reply button in Comments area Under each comment there is a link called 'Reply'. I want to add a class to this link. It's default class is comment-reply-link. How can I do so? I am creating my own theme and I don't want to manually edit files inside the wp-includes directory.
A: Quite old post, but while searching I came here, maybe someone else will find it useful.
The only solution I found is to completely rebuilt the button that comment_reply_link returns.
I first made two vars reconstructing href and onclick attributes for the reply button:
$reply_href = wp_make_link_relative(
get_permalink( $comment->comment_post_ID )
)
. '?replytocom=' . $comment->comment_ID . '#respond';
$reply_onclick = 'return addComment.moveForm("comment-'
. $comment->comment_ID
. '", "'
. $comment->comment_ID
. '", "respond", "'
. $comment->comment_post_ID
. '")';
And then output the whole reply block, adding your custom classes:
<div class="reply">
<a class="comment-reply-link custom-class" href="<?php
echo $reply_href;
?>" onclick="<?php
echo $reply_onclick;
?>"><?php
_e('Reply', 'yourthemename');
?></a>
</div>
A: In your comments.php template file use wp_list_comments and set the parameter callback to your defined function that will generate the template. Inside the function you can style the comment reply link.
wp_list_comments codex
Further reading on comment display
A: I know this is quite an old post and maybe this could help someone.
You can replace the class of an element using add_filter();
Here's an example:
// filter to replace class on reply link
// class name function name
add_filter('comment_reply_link', 'replace_reply_link_class');
function replace_reply_link_class($class){
$class = str_replace("class='comment-reply-link", "class='reply", $class);
return $class;
}
With this you should be able to replace the class in your themes.
I hope this can be of any help for someone :)
A: This might not be an elegant solution but it gets the job done. Do it with jQuery. Basically find the element and add the class you need. WordPress totally didn't make this easy to customize:
jQuery('a#comment-reply-link').addClass('mycustomcssclass');
A: Also something to double check (as I overlooked this for about half an hour)...
Make sure under: Settings > Discussion
This checkbox is checked:
Enable threaded (nested) comments levels deep
Otherwise the reply button will not show up at all
|
wordpress
|
{
"language": "en",
"length": 354,
"provenance": "stackexchange_00019.jsonl.gz:407981",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12767"
}
|
[
0.04095458984375,
-0.034759521484375,
0.00583648681640625,
-0.0404052734375,
-0.0005750656127929688,
-0.035552978515625,
0.053070068359375,
0.012908935546875,
-0.0163421630859375,
0.0005249977111816406,
-0.006229400634765625,
0.0084381103515625,
-0.040985107421875,
-0.032684326171875,
0.00959014892578125,
-0.050537109375,
0.036285400390625,
0.051422119140625,
0.0645751953125,
0.0007724761962890625,
0.0139617919921875,
0.016632080078125,
0.00337982177734375,
0.047882080078125,
0.0236663818359375,
-0.033416748046875,
0.1214599609375,
-0.041656494140625,
0.052337646484375,
-0.0031375885009765625,
0.03369140625,
-0.055084228515625,
0.0670166015625,
-0.0002849102020263672,
-0.055084228515625,
-0.0058135986328125,
0.0191192626953125,
-0.0288238525390625,
-0.037353515625,
0.03875732421875,
0.0328369140625,
-0.02459716796875,
-0.0088958740234375,
-0.0054168701171875,
-0.0241851806640625,
0.019287109375,
0.005565643310546875,
-0.00534820556640625,
0.03857421875,
-0.0207366943359375,
0.004917144775390625,
0.01474761962890625,
-0.010284423828125,
0.005123138427734375,
-0.01226043701171875,
0.04193115234375,
-0.046600341796875,
0.0203704833984375,
-0.00688934326171875,
0.0104827880859375,
0.027557373046875,
0.0145263671875,
-0.0005750656127929688,
0.0174102783203125,
-0.031341552734375,
-0.0059051513671875,
0.039093017578125,
0.01322174072265625,
0.021148681640625,
-0.034088134765625,
-0.007472991943359375,
0.035064697265625,
-0.033660888671875,
-0.0543212890625,
0.00702667236328125,
0.00946044921875,
-0.029510498046875,
-0.0643310546875,
0.004093170166015625,
0.0185546875,
0.0347900390625,
0.00623321533203125,
-0.006435394287109375,
-0.00952911376953125,
0.01031494140625,
0.0026569366455078125,
-0.01203155517578125,
-0.027984619140625,
-0.0234222412109375,
-0.04510498046875,
-0.0110015869140625,
-0.059661865234375,
-0.00157928466796875,
-0.0168914794921875,
-0.0217437744140625,
-0.03802490234375,
-0.03411865234375,
0.026092529296875,
-0.005802154541015625,
0.0208282470703125,
-0.0157318115234375,
-0.01123809814453125,
0.0269622802734375,
-0.049346923828125,
-0.0074005126953125,
0.038177490234375,
0.0222625732421875,
-0.003879547119140625,
0.0089111328125,
-0.004489898681640625,
-0.0120697021484375,
-0.0235443115234375,
-0.01220703125,
-0.0121917724609375,
-0.0312042236328125,
-0.005596160888671875,
-0.059295654296875,
0.006591796875,
-0.001209259033203125,
-0.0094451904296875,
0.000316619873046875,
0.01528167724609375,
0.027069091796875,
-0.00011461973190307617,
0.0033092498779296875,
0.006954193115234375,
0.01474761962890625,
-0.051239013671875,
0.005290985107421875,
-0.0186767578125,
-0.041778564453125,
0.0272064208984375,
0.075927734375,
0.0227203369140625,
0.0270233154296875,
-0.018035888671875,
0.0242156982421875,
-0.028564453125,
-0.0158843994140625,
0.020294189453125,
0.036224365234375,
-0.057525634765625,
-0.05975341796875,
0.00254058837890625,
-0.02911376953125,
0.0151214599609375,
0.0249481201171875,
-0.0004467964172363281,
-0.00983428955078125,
-0.08184814453125,
0.0283050537109375,
-0.05352783203125,
0.0419921875,
0.015869140625,
-0.0350341796875,
-0.007289886474609375,
0.011016845703125,
-0.0301055908203125,
-0.017425537109375,
-0.034759521484375,
0.0391845703125,
0.0138092041015625,
0.0025234222412109375,
-0.0111846923828125,
-0.023773193359375,
-0.038909912109375,
-0.034027099609375,
-0.00522613525390625,
0.027496337890625,
0.0325927734375,
-0.0194244384765625,
-0.0311431884765625,
0.0153350830078125,
0.019775390625,
-0.01088714599609375,
0.0211639404296875,
0.00897979736328125,
-0.003108978271484375,
0.01739501953125,
0.020599365234375,
-0.007175445556640625,
-0.0391845703125,
0.03631591796875,
-0.00687408447265625,
0.01209259033203125,
0.0240325927734375,
0.030029296875,
0.036590576171875,
-0.043243408203125,
0.03887939453125,
-0.01288604736328125,
0.0562744140625,
-0.0246734619140625,
-0.0026874542236328125,
-0.007503509521484375,
-0.01666259765625,
-0.004749298095703125,
0.0017023086547851562,
-0.0115966796875,
0.0254669189453125,
-0.024444580078125,
-0.0204620361328125,
0.01318359375,
0.022613525390625,
-0.042022705078125,
0.037200927734375,
-0.0296630859375,
0.041473388671875,
-0.009490966796875,
0.0087432861328125,
0.0140838623046875,
-0.01345062255859375,
-0.001064300537109375,
-0.0614013671875,
-0.0262603759765625,
-0.0026264190673828125,
0.012176513671875,
0.0167694091796875,
-0.0233917236328125,
0.031707763671875,
-0.04296875,
-0.0258026123046875,
-0.03656005859375,
0.02081298828125,
0.03204345703125,
-0.0145721435546875,
-0.0124969482421875,
-0.0294952392578125,
0.01666259765625,
0.003742218017578125,
-0.028045654296875,
0.0169219970703125,
0.050079345703125,
0.044189453125,
-0.0113983154296875,
0.0153045654296875,
0.01338958740234375,
-0.052276611328125,
-0.01013946533203125,
0.0323486328125,
0.032470703125,
-0.061309814453125,
-0.010406494140625,
-0.0020885467529296875,
-0.00897979736328125,
0.045928955078125,
0.058624267578125,
-0.047882080078125,
-0.021026611328125,
0.0157928466796875,
0.0340576171875,
0.0227508544921875,
0.03204345703125,
0.051177978515625,
0.0027637481689453125,
0.04052734375,
-0.005535125732421875,
-0.0165863037109375,
-0.030242919921875,
0.035858154296875,
-0.0084686279296875,
-0.00133514404296875,
-0.01543426513671875,
-0.01403045654296875,
-0.0204925537109375,
-0.0269317626953125,
0.004024505615234375,
-0.0124969482421875,
0.00909423828125,
-0.030914306640625,
0.01128387451171875,
-0.03643798828125,
-0.00606536865234375,
0.056396484375,
0.015472412109375,
0.022125244140625,
0.007190704345703125,
-0.039398193359375,
-0.0163421630859375,
0.035003662109375,
-0.00835418701171875,
0.0308837890625,
0.0005173683166503906,
-0.022308349609375,
0.01114654541015625,
-0.046722412109375,
-0.01027679443359375,
-0.028167724609375,
-0.03253173828125,
-0.022674560546875,
-0.006923675537109375,
0.06524658203125,
-0.017669677734375,
0.0242919921875,
0.0213165283203125,
-0.01187896728515625,
0.0074310302734375,
-0.0015840530395507812,
0.00885009765625,
-0.0179595947265625,
0.032470703125,
0.051666259765625,
0.0023822784423828125,
-0.01155853271484375,
0.0026454925537109375,
-0.01528167724609375,
-0.0193328857421875,
0.00738525390625,
-0.01229095458984375,
-0.03326416015625,
-0.017669677734375,
0.04730224609375,
0.006847381591796875,
0.043365478515625,
-0.045074462890625,
-0.0633544921875,
-0.03680419921875,
0.009307861328125,
-0.07257080078125,
-0.04217529296875,
0.06170654296875,
-0.0694580078125,
0.03472900390625,
-0.00943756103515625,
-0.043975830078125,
-0.04229736328125,
0.031494140625,
-0.00812530517578125,
0.005908966064453125,
-0.04510498046875,
-0.0061187744140625,
-0.03271484375,
-0.032745361328125,
-0.0009479522705078125,
0.01554107666015625,
-0.006366729736328125,
0.0028820037841796875,
0.0179901123046875,
0.009552001953125,
0.01184844970703125,
0.033782958984375,
-0.012664794921875,
0.01364898681640625,
-0.01436614990234375,
0.007724761962890625,
-0.004016876220703125,
-0.004547119140625,
0.0005736351013183594,
0.032958984375,
0.021392822265625,
-0.0292510986328125,
-0.0022182464599609375,
-0.01190948486328125,
0.0171661376953125,
0.00725555419921875,
0.044952392578125,
0.032196044921875,
0.04034423828125,
0.041351318359375,
-0.0227813720703125,
-0.034912109375,
0.013519287109375,
-0.0211639404296875,
-0.0313720703125,
0.0015316009521484375,
-0.023284912109375,
-0.02880859375,
0.02154541015625,
0.00560760498046875,
0.0180816650390625,
0.0390625,
-0.007160186767578125,
0.030487060546875,
-0.00785064697265625,
0.003326416015625,
-0.03045654296875,
-0.029693603515625,
-0.026092529296875,
0.0189666748046875,
-0.0175018310546875,
0.014373779296875,
-0.0264129638671875,
0.021484375,
-0.07635498046875,
-0.039581298828125,
0.04779052734375,
-0.059478759765625,
-0.0019245147705078125,
-0.042236328125,
-0.01861572265625,
-0.00763702392578125,
0.08209228515625,
-0.0726318359375,
-0.016357421875,
-0.0116729736328125,
0.00720977783203125,
-0.00760650634765625,
-0.0218048095703125,
-0.033355712890625,
-0.0074615478515625,
-0.07757568359375,
0.0188751220703125,
-0.01010894775390625,
-0.027679443359375,
-0.03173828125,
0.05731201171875,
-0.04962158203125,
-0.023193359375,
0.022430419921875,
-0.056854248046875,
0.00960540771484375,
0.044036865234375,
-0.022979736328125,
0.04986572265625,
-0.01232147216796875,
-0.062042236328125,
-0.054962158203125,
-0.0072174072265625,
-0.0309295654296875,
0.05584716796875,
0.025421142578125,
-0.006092071533203125,
-0.004791259765625,
0.039154052734375,
0.0198974609375,
0.031585693359375,
0.0089569091796875,
0.00061798095703125,
0.0027942657470703125,
0.0275421142578125,
0.036285400390625,
-0.00803375244140625,
0.0110321044921875,
0.0286407470703125,
-0.006877899169921875,
0.0740966796875,
-0.051513671875,
-0.006145477294921875,
-0.00345611572265625,
-0.032989501953125,
-0.003452301025390625,
-0.020904541015625,
0.00876617431640625,
0.0230255126953125,
-0.0111541748046875,
0.007160186767578125,
-0.022430419921875,
-0.013153076171875,
-0.049560546875,
-0.05865478515625,
-0.033538818359375,
0.0284881591796875,
-0.0141143798828125,
0.0419921875,
0.00408172607421875,
0.039581298828125,
0.03277587890625,
0.025482177734375,
0.004581451416015625,
0.0257568359375,
0.01386260986328125,
-0.012176513671875,
0.015350341796875,
0.00959014892578125,
0.054962158203125,
-0.0251922607421875,
0.06768798828125,
-0.01788330078125,
-0.005947113037109375,
0.041229248046875,
-0.006755828857421875,
-0.0249481201171875,
-0.0066680908203125,
0.005096435546875,
-0.0096588134765625,
0.023040771484375,
0.02435302734375,
0.004650115966796875,
0.01068115234375,
-0.004390716552734375,
-0.03692626953125,
0.0035152435302734375,
-0.05621337890625,
0.057647705078125,
0.035980224609375,
-0.003406524658203125,
0.053131103515625,
0.0323486328125,
-0.0019741058349609375,
0.04254150390625,
-0.006549835205078125,
0.012908935546875,
0.0191192626953125,
0.026885986328125,
0.0027179718017578125,
0.018310546875,
-0.004405975341796875,
0.08221435546875,
0.06292724609375,
0.021270751953125,
-0.01214599609375,
0.006275177001953125,
-0.0106201171875,
-0.04541015625,
0.0026760101318359375,
0.034393310546875,
0.00495147705078125,
-0.006542205810546875,
0.0021038055419921875,
-0.04736328125,
0.00991058349609375,
-0.041778564453125,
0.055694580078125,
0.037933349609375,
-0.0184173583984375,
0.0133209228515625,
-0.0106353759765625,
0.03375244140625,
-0.0167083740234375,
-0.01451873779296875,
-0.0146484375,
0.047027587890625,
0.007488250732421875,
0.039398193359375,
0.0015230178833007812,
-0.030548095703125,
0.00795745849609375,
-0.005584716796875,
0.025054931640625,
0.0165252685546875,
0.056060791015625,
0.009765625,
0.0296783447265625,
0.01541900634765625,
-0.04803466796875,
-0.0362548828125,
-0.0235137939453125,
0.033172607421875,
0.03564453125,
-0.0246124267578125,
-0.0129852294921875,
0.00870513916015625,
0.01285552978515625,
0.017059326171875,
-0.0205078125,
0.03314208984375,
-0.002044677734375,
0.01421356201171875,
-0.0034999847412109375,
-0.047576904296875,
0.020233154296875,
0.04388427734375,
-0.008758544921875,
0.019805908203125,
0.00765228271484375,
-0.0270233154296875,
-0.03778076171875,
-0.0110321044921875,
-0.02667236328125,
0.043304443359375,
0.003719329833984375,
0.017852783203125,
-0.050262451171875,
0.004749298095703125,
-0.06689453125,
-0.00919342041015625,
0.0306549072265625,
0.00276947021484375,
-0.014923095703125,
-0.032806396484375,
-0.03399658203125,
-0.02313232421875,
-0.0474853515625,
-0.051666259765625,
-0.0081329345703125,
0.034088134765625,
0.01165771484375,
0.0186004638671875,
-0.01092529296875,
-0.0279998779296875,
-0.043060302734375,
0.037078857421875,
0.0300140380859375,
0.02642822265625,
-0.01361846923828125,
0.072265625,
0.0199432373046875,
0.00806427001953125,
0.034332275390625,
0.05279541015625,
0.0262451171875,
-0.0305023193359375,
0.00037789344787597656,
0.01209259033203125,
0.00026702880859375,
-0.0097503662109375,
0.0206451416015625,
-0.00798797607421875,
0.038970947265625,
-0.0131378173828125,
0.015106201171875,
0.00909423828125,
0.00525665283203125,
-0.0362548828125,
-0.00594329833984375,
0.008270263671875,
0.023345947265625,
0.01334381103515625,
0.00687408447265625,
0.062347412109375,
-0.0289459228515625,
0.037689208984375,
-0.0494384765625,
-0.017669677734375,
-0.00264739990234375,
-0.0023345947265625,
-0.056427001953125,
0.054962158203125,
0.06756591796875,
0.01267242431640625,
0.05401611328125,
-0.00850677490234375,
0.0299072265625,
0.037200927734375,
0.042633056640625,
-0.00433349609375,
0.0008645057678222656,
0.11737060546875,
0.03125,
-0.040374755859375,
0.06170654296875,
-0.05340576171875,
0.033660888671875,
0.0175323486328125,
0.0538330078125,
-0.064208984375,
0.0160064697265625,
-0.007110595703125,
-0.0265350341796875,
0.0799560546875,
-0.0015544891357421875,
0.007579803466796875,
-0.022308349609375,
0.0142669677734375,
-0.0106048583984375,
-0.016387939453125,
-0.004032135009765625,
-0.0215606689453125,
-0.0025386810302734375,
0.0333251953125,
-0.004627227783203125,
-0.01123809814453125,
-0.0455322265625,
-0.033782958984375,
0.02099609375,
-0.017181396484375,
-0.0208740234375,
-0.00371551513671875,
0.025970458984375,
-0.01038360595703125,
-0.039703369140625,
0.06329345703125,
-0.062286376953125,
0.035186767578125,
0.05999755859375,
-0.01209259033203125,
-0.01739501953125,
0.01490020751953125,
-0.02435302734375,
0.0343017578125,
-0.02557373046875,
-0.0034313201904296875,
-0.01255035400390625,
-0.0168304443359375,
0.0225372314453125,
0.0191192626953125,
-0.0081024169921875,
0.030242919921875,
-0.006832122802734375,
-0.050140380859375,
0.0209808349609375,
0.05450439453125,
0.04486083984375,
-0.06695556640625,
-0.01751708984375,
0.0394287109375,
-0.024200439453125,
0.004528045654296875,
-0.0292510986328125,
0.009124755859375,
-0.02935791015625,
0.0261077880859375,
-0.0221710205078125,
0.01430511474609375,
0.007488250732421875,
-0.054046630859375,
-0.057373046875,
0.055023193359375,
-0.0012836456298828125,
-0.0011816024780273438,
0.013458251953125,
0.011138916015625,
-0.02801513671875,
0.0029010772705078125,
-0.008270263671875,
0.0280303955078125,
-0.01288604736328125,
0.0241546630859375,
-0.024658203125,
-0.0209197998046875,
0.013153076171875,
0.055419921875,
-0.0037288665771484375,
0.0110321044921875,
-0.048095703125,
0.032806396484375,
0.06939697265625,
0.0213623046875,
0.022308349609375,
0.05133056640625,
-0.018218994140625,
-0.01483917236328125,
0.02581787109375,
-0.027923583984375,
-0.0002422332763671875,
0.01263427734375,
-0.0159454345703125,
0.0037136077880859375,
0.0146026611328125,
0.000751495361328125,
0.0158538818359375,
0.08221435546875,
-0.07647705078125,
0.03070068359375,
0.057403564453125,
-0.030853271484375,
-0.0172119140625,
0.060028076171875,
0.030029296875,
-0.026611328125,
-0.042266845703125,
-0.039703369140625,
0.037567138671875,
0.00472259521484375,
-0.0014743804931640625,
-0.0020389556884765625,
0.00897216796875,
0.02520751953125,
-0.029815673828125,
-0.026885986328125,
0.00568389892578125,
-0.0011615753173828125,
0.043548583984375,
0.00484466552734375,
0.0213470458984375,
-0.05682373046875,
-0.006900787353515625,
0.0277252197265625,
0.058563232421875,
-0.03271484375,
0.02960205078125,
0.01399993896484375,
0.0206756591796875,
0.01175689697265625,
-0.050384521484375,
0.0426025390625,
-0.01227569580078125,
-0.027130126953125,
-0.041168212890625,
-0.00296783447265625,
0.030517578125,
0.0103607177734375,
0.015716552734375,
0.03466796875,
-0.027435302734375,
-0.026947021484375,
-0.0537109375,
0.0321044921875,
-0.0011920928955078125,
0.01666259765625,
0.003337860107421875,
0.036407470703125,
0.0255889892578125,
0.01261138916015625,
0.037109375,
-0.03143310546875,
0.019012451171875,
-0.051849365234375,
0.052581787109375,
0.005706787109375,
-0.001956939697265625,
0.00844573974609375,
0.0179443359375,
0.05926513671875,
0.00659942626953125,
-0.02294921875,
0.0285186767578125,
0.025970458984375,
-0.023040771484375,
-0.0537109375,
0.034820556640625,
-0.03271484375,
0.0129547119140625,
-0.0063018798828125,
-0.020965576171875,
-0.0100860595703125,
-0.032806396484375,
0.0443115234375,
-0.01763916015625,
0.0175018310546875,
0.0096282958984375,
-0.00432586669921875,
0.0517578125,
0.0228424072265625,
0.0413818359375,
0.035491943359375,
-0.07025146484375,
-0.031982421875,
0.0157470703125,
-0.0289154052734375,
0.0188140869140625,
0.04498291015625,
-0.0248565673828125,
0.0214996337890625,
-0.017059326171875,
0.01413726806640625,
0.0016679763793945312,
-0.031707763671875,
0.00576019287109375,
0.031280517578125,
0.0102386474609375,
0.03082275390625,
-0.045196533203125,
-0.040313720703125,
-0.02716064453125,
0.04559326171875,
0.032379150390625,
0.031036376953125,
-0.01000213623046875,
0.035186767578125,
-0.04534912109375,
0.0167999267578125,
-0.0311737060546875,
-0.06903076171875,
0.0982666015625,
0.003253936767578125,
-0.03656005859375,
-0.0144195556640625,
-0.0665283203125,
0.0307769775390625,
0.014617919921875,
-0.004547119140625,
0.02447509765625,
0.00876617431640625,
0.01146697998046875,
-0.0030994415283203125,
-0.01065826416015625,
-0.029937744140625,
-0.0106048583984375,
-0.007381439208984375,
-0.0054931640625,
0.004024505615234375,
0.00852203369140625,
0.0028095245361328125,
0.055389404296875,
-0.00222015380859375,
0.041748046875,
0.033355712890625,
-0.01454925537109375,
0.055206298828125,
0.0208282470703125,
-0.07879638671875,
-0.0123748779296875,
0.028350830078125,
-0.0140380859375,
0.017608642578125,
0.01220703125,
0.03082275390625,
0.01039886474609375,
-0.00505828857421875,
0.0166778564453125,
0.0264739990234375,
0.0714111328125,
-0.017730712890625,
0.0288543701171875,
0.004215240478515625,
-0.0010633468627929688,
0.037567138671875,
0.0007319450378417969,
-0.031585693359375,
-0.07696533203125,
0.01300811767578125,
0.025054931640625,
-0.045928955078125,
0.03631591796875,
-0.031341552734375,
-0.01129150390625,
0.00435638427734375,
0.003086090087890625,
-0.072509765625,
0.01099395751953125,
0.0287322998046875,
0.05145263671875,
-0.05035400390625,
0.007770538330078125,
0.0016260147094726562,
0.00878143310546875,
-0.0287933349609375,
-0.032623291015625,
-0.03314208984375,
0.039154052734375,
-0.039581298828125,
0.038909912109375,
0.05316162109375,
-0.0408935546875,
0.0268402099609375,
0.0200958251953125,
0.03857421875,
0.072265625,
-0.01343536376953125,
-0.02471923828125,
0.003566741943359375,
-0.00176239013671875,
-0.003360748291015625,
-0.05828857421875,
0.0158233642578125,
-0.10113525390625,
-0.009246826171875,
0.02288818359375,
0.0126495361328125,
0.034454345703125,
-0.021026611328125,
-0.0673828125,
0.07952880859375,
-0.0040283203125,
-0.0343017578125,
-0.022857666015625,
0.004390716552734375,
-0.00812530517578125,
0.0099945068359375,
-0.00669097900390625,
0.005889892578125,
-0.0111083984375,
0.018218994140625,
-0.015899658203125,
0.0123748779296875,
0.010955810546875,
-0.01018524169921875,
-0.0282745361328125,
0.0011968612670898438,
0.007080078125,
-0.005298614501953125,
-0.032379150390625,
-0.0206451416015625,
0.0347900390625,
0.036773681640625,
-0.0312347412109375,
-0.00786590576171875,
0.0268096923828125,
0.054443359375,
-0.00154876708984375,
-0.00807952880859375,
0.00815582275390625,
-0.013580322265625,
-0.01334381103515625,
-0.00016558170318603516,
-0.007434844970703125,
0.00894927978515625,
0.0196990966796875,
0.0009570121765136719,
-0.031982421875,
-0.005626678466796875,
0.01342010498046875,
-0.040252685546875,
-0.04632568359375,
0.0198211669921875,
0.01861572265625,
0.01038360595703125,
-0.00948333740234375,
-0.007083892822265625,
-0.0194244384765625,
0.00017702579498291016,
0.00489044189453125,
-0.032470703125,
0.015838623046875,
0.056427001953125,
-0.028106689453125,
0.05255126953125,
-0.0148162841796875,
0.006214141845703125,
0.07183837890625,
0.01366424560546875,
-0.0167083740234375,
-0.0258331298828125,
-0.016357421875,
0.00928497314453125,
-0.006732940673828125,
0.0193023681640625,
-0.0038127899169921875,
-0.0167083740234375,
-0.029754638671875,
0.0202789306640625,
-0.00033092498779296875,
0.01393890380859375,
-0.01479339599609375,
0.01629638671875,
0.00661468505859375,
0.041778564453125,
-0.0247650146484375,
0.0208282470703125,
-0.004512786865234375,
0.046844482421875,
0.006122589111328125,
-0.0134429931640625,
0.0513916015625,
-0.054168701171875,
0.00466156005859375,
-0.01015472412109375,
0.0310516357421875,
-0.072998046875,
0.0740966796875,
0.0750732421875,
0.01204681396484375,
0.050537109375
] |
5adf497fb5f8ecdbcd3637a6094fca8595c4d822
|
Wordpress Stackexchange
Q: Why is ?doing_wp_cron being appended to my URLs I'm finding this string appended to the end of my URLs sometimes:
/?doing_wp_cron
Does anyone know what it for? How can I remove it?
A: I have seen many posts about this problem but few of them succeed to found a real solution. What solves this problem for me has been to manage redirection in the .htaccess file.
Here is an exemple on how to redirect the url by adding these lines in the .htaccess file :
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (^|&)doing_wp_cron= [NC]
RewriteRule (.*) /$1? [R=301,L]
</IfModule>
Hope this will help !
Note : this tips comes from this forum
|
Q: Why is ?doing_wp_cron being appended to my URLs I'm finding this string appended to the end of my URLs sometimes:
/?doing_wp_cron
Does anyone know what it for? How can I remove it?
A: I have seen many posts about this problem but few of them succeed to found a real solution. What solves this problem for me has been to manage redirection in the .htaccess file.
Here is an exemple on how to redirect the url by adding these lines in the .htaccess file :
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (^|&)doing_wp_cron= [NC]
RewriteRule (.*) /$1? [R=301,L]
</IfModule>
Hope this will help !
Note : this tips comes from this forum
A: It's a sign that you have ALTERNATE_WP_CRON defined in your wp-config.php
In order to do some background processing (like publishing scheduled posts), WordPress redirects you to the URL with ?doing_wp_cron appended.
A: @scribu I believe that BackupBuddy uses WordPress task scheduling to schedule tasks as a part of the backup procedures - if the site has loopbacks disabled then the only solution (apart from some bespoke external solution) and the specific alternate solution that, as I am sure you know, is integrated into WordPress, is the alternate cron fix. So this is only "required" if the host has loopbacks disabled. Bear in mind that if that is the case then no scheduled tasks, be they standard WordPress scheduled tasks or those associated with other plugins, will work. What seems to be the case is that a user will not know that their host has hobbled their WordPress installation until they try BackupBuddy because that makes the problem obvious rather than it having been invisible until that point.
Using crontab type approach is only a sticking-plaster because, unless you make it "ping" the WordPress cron processing very frequently that will only work with some types of scheduled tasks.
Of course if a user doesn't want to or cannot use the alternate wp cron fix, doesn't want to move to a host that does allow loopbacks and isn't knowledgable enough to be able to set up a suitable crontab based capability then BackupBuddy does offer a manual backup mode that will work but it lacks the flexibility ana some of the capabilities of that available when scheduling is available.
A: What causes this issue is alternate cron. To workaround this, if you have access, you can enable an actual cron process (if your hosting will let you) and disable ALTERNATE_WP_CRON in your wp-config.php.
|
wordpress
|
{
"language": "en",
"length": 416,
"provenance": "stackexchange_00019.jsonl.gz:407985",
"question_score": "17",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12777"
}
|
[
0.05169677734375,
0.02227783203125,
-0.023895263671875,
-0.0301055908203125,
0.0419921875,
-0.05181884765625,
0.035675048828125,
-0.037841796875,
-0.052886962890625,
0.022735595703125,
0.0183868408203125,
0.009857177734375,
-0.0011701583862304688,
-0.0357666015625,
0.04034423828125,
-0.00914764404296875,
0.00833892822265625,
0.0027523040771484375,
0.002246856689453125,
-0.01441192626953125,
-0.0189361572265625,
0.00434112548828125,
0.00800323486328125,
0.0516357421875,
-0.01103973388671875,
-0.018646240234375,
0.1046142578125,
0.00475311279296875,
-0.000743865966796875,
-0.014129638671875,
0.0070343017578125,
-0.027130126953125,
0.0197601318359375,
0.0045166015625,
-0.0103607177734375,
-0.007068634033203125,
-0.00591278076171875,
-0.001567840576171875,
0.0036163330078125,
0.0169830322265625,
0.006198883056640625,
-0.0135650634765625,
0.0767822265625,
-0.0034656524658203125,
0.0038394927978515625,
-0.00000858306884765625,
0.00484466552734375,
-0.03790283203125,
-0.035736083984375,
0.0092010498046875,
0.00501251220703125,
0.0036983489990234375,
0.0287322998046875,
0.0310516357421875,
-0.00977325439453125,
-0.040283203125,
0.0237884521484375,
0.028717041015625,
0.003665924072265625,
-0.03875732421875,
-0.041717529296875,
0.0499267578125,
0.0189971923828125,
0.03118896484375,
0.0072021484375,
-0.050384521484375,
-0.012725830078125,
0.0296478271484375,
-0.069091796875,
-0.0281219482421875,
0.08026123046875,
-0.0177154541015625,
0.006519317626953125,
-0.0110015869140625,
-0.027801513671875,
-0.035430908203125,
0.01509857177734375,
-0.0316162109375,
0.0204010009765625,
-0.012237548828125,
0.00551605224609375,
0.007495880126953125,
0.003887176513671875,
-0.00289154052734375,
0.0211639404296875,
0.01308441162109375,
-0.0210113525390625,
-0.00977325439453125,
-0.0076904296875,
-0.0307464599609375,
-0.0306854248046875,
0.0306396484375,
-0.0229034423828125,
-0.033782958984375,
-0.038787841796875,
-0.020599365234375,
0.04583740234375,
0.005901336669921875,
0.00391387939453125,
-0.0245208740234375,
0.004329681396484375,
-0.040802001953125,
0.005962371826171875,
0.005962371826171875,
-0.00870513916015625,
0.065185546875,
0.0260772705078125,
0.06329345703125,
0.0217132568359375,
0.0022258758544921875,
0.005279541015625,
-0.01511383056640625,
0.00928497314453125,
-0.013092041015625,
-0.016815185546875,
-0.0027370452880859375,
-0.0155181884765625,
-0.007122039794921875,
-0.003246307373046875,
-0.007190704345703125,
-0.0177001953125,
0.01336669921875,
-0.02630615234375,
-0.0382080078125,
-0.001720428466796875,
-0.036895751953125,
-0.01464080810546875,
0.0029087066650390625,
-0.0333251953125,
0.07647705078125,
-0.03631591796875,
-0.01464080810546875,
0.025787353515625,
0.01343536376953125,
-0.016265869140625,
-0.052886962890625,
0.01195526123046875,
-0.0267486572265625,
-0.007061004638671875,
0.042999267578125,
-0.002773284912109375,
-0.055755615234375,
-0.0082550048828125,
0.003917694091796875,
0.023590087890625,
0.0184783935546875,
0.0038166046142578125,
0.024322509765625,
-0.01024627685546875,
-0.01214599609375,
0.0031261444091796875,
0.0022258758544921875,
0.041656494140625,
0.00021374225616455078,
-0.01502227783203125,
-0.00634002685546875,
0.03436279296875,
-0.021026611328125,
-0.02459716796875,
-0.025970458984375,
-0.04931640625,
-0.022125244140625,
-0.0035381317138671875,
-0.07073974609375,
-0.08087158203125,
0.0318603515625,
-0.029632568359375,
-0.006359100341796875,
0.021636962890625,
-0.0106201171875,
0.019195556640625,
-0.00189971923828125,
-0.005550384521484375,
0.0049591064453125,
0.0064849853515625,
0.01409912109375,
0.027587890625,
0.01299285888671875,
0.0141448974609375,
0.03692626953125,
-0.0255889892578125,
-0.03863525390625,
0.04840087890625,
-0.04327392578125,
-0.0638427734375,
0.0352783203125,
0.0147552490234375,
0.0679931640625,
0.005710601806640625,
0.0160980224609375,
0.058074951171875,
0.0298004150390625,
0.00875091552734375,
0.035614013671875,
0.01385498046875,
-0.00514984130859375,
-0.043121337890625,
0.0167388916015625,
-0.0269317626953125,
-0.0645751953125,
0.015350341796875,
0.023345947265625,
-0.028411865234375,
0.0216064453125,
-0.093505859375,
0.037109375,
-0.032958984375,
0.044189453125,
-0.031402587890625,
-0.0250244140625,
0.011505126953125,
-0.016571044921875,
0.0041046142578125,
-0.039947509765625,
-0.03717041015625,
0.0302581787109375,
-0.001873016357421875,
0.045623779296875,
-0.0268402099609375,
0.05328369140625,
-0.040069580078125,
-0.02227783203125,
-0.03741455078125,
-0.01453399658203125,
0.0166778564453125,
-0.01090240478515625,
-0.04595947265625,
-0.0196380615234375,
-0.039215087890625,
-0.003391265869140625,
-0.0596923828125,
0.07464599609375,
0.0135650634765625,
0.03375244140625,
-0.015228271484375,
-0.0127716064453125,
-0.0214691162109375,
-0.031829833984375,
0.003513336181640625,
0.0521240234375,
0.0142822265625,
0.037322998046875,
-0.0189971923828125,
0.001735687255859375,
0.0213165283203125,
-0.037353515625,
0.015472412109375,
0.0008387565612792969,
-0.0006728172302246094,
0.027008056640625,
0.021636962890625,
-0.022796630859375,
0.0085601806640625,
-0.04376220703125,
-0.042938232421875,
0.0302886962890625,
-0.00897979736328125,
-0.01128387451171875,
0.0175323486328125,
-0.006824493408203125,
0.01503753662109375,
-0.02117919921875,
-0.04168701171875,
0.00009149312973022461,
-0.0224456787109375,
-0.02734375,
-0.02862548828125,
-0.019866943359375,
0.0167694091796875,
-0.0147247314453125,
0.03485107421875,
-0.052734375,
-0.0148773193359375,
0.0160064697265625,
0.04296875,
-0.04168701171875,
-0.0164794921875,
0.0169830322265625,
-0.0234222412109375,
-0.0023784637451171875,
-0.010406494140625,
0.00554656982421875,
-0.033477783203125,
-0.016632080078125,
-0.0026226043701171875,
-0.004726409912109375,
0.006000518798828125,
0.00042247772216796875,
-0.0031795501708984375,
0.0009756088256835938,
0.0408935546875,
0.00959014892578125,
-0.00577545166015625,
0.00197601318359375,
-0.0107421875,
-0.0269775390625,
0.0283966064453125,
-0.0091094970703125,
0.03125,
-0.032257080078125,
0.0024662017822265625,
0.041412353515625,
-0.035858154296875,
0.015228271484375,
-0.00565338134765625,
0.031951904296875,
0.0091552734375,
-0.00536346435546875,
-0.0204620361328125,
0.03912353515625,
-0.119873046875,
-0.039154052734375,
0.044464111328125,
0.0615234375,
0.008697509765625,
-0.034576416015625,
0.018890380859375,
0.030853271484375,
-0.052459716796875,
-0.101806640625,
-0.0208587646484375,
-0.0012121200561523438,
-0.0135955810546875,
0.01568603515625,
-0.0011568069458007812,
-0.0010890960693359375,
0.030059814453125,
0.0010461807250976562,
0.0038356781005859375,
-0.02099609375,
-0.0850830078125,
-0.060089111328125,
-0.08416748046875,
0.0204010009765625,
-0.02001953125,
0.0240936279296875,
0.0020904541015625,
0.067138671875,
0.0271759033203125,
-0.01540374755859375,
0.033447265625,
0.01132965087890625,
-0.0179290771484375,
-0.00921630859375,
-0.01486968994140625,
-0.0229949951171875,
-0.00395965576171875,
-0.006153106689453125,
0.047332763671875,
0.016326904296875,
0.0006699562072753906,
-0.0011835098266601562,
-0.0100860595703125,
-0.01605224609375,
0.0217132568359375,
-0.0009140968322753906,
0.005527496337890625,
-0.0220184326171875,
0.0273895263671875,
-0.037811279296875,
0.005828857421875,
-0.01235198974609375,
-0.0221405029296875,
0.0196990966796875,
0.034271240234375,
-0.0225982666015625,
-0.008087158203125,
-0.017608642578125,
0.0177001953125,
-0.00782012939453125,
0.057861328125,
-0.041534423828125,
0.0289764404296875,
0.00897216796875,
0.0318603515625,
-0.0709228515625,
0.044921875,
-0.025665283203125,
0.0261993408203125,
0.018218994140625,
-0.03558349609375,
-0.0305328369140625,
-0.035003662109375,
-0.06634521484375,
-0.024749755859375,
0.027984619140625,
-0.0283203125,
0.00377655029296875,
-0.01953125,
-0.007144927978515625,
0.0030193328857421875,
0.061431884765625,
0.01016998291015625,
-0.0254669189453125,
-0.0262908935546875,
0.01407623291015625,
0.0008144378662109375,
-0.052978515625,
0.007354736328125,
-0.03192138671875,
-0.0760498046875,
0.04071044921875,
0.00024080276489257812,
-0.013031005859375,
-0.0491943359375,
0.0282745361328125,
-0.0556640625,
-0.0299530029296875,
0.0247802734375,
-0.0003612041473388672,
0.0228271484375,
0.01068878173828125,
0.0072174072265625,
-0.0130767822265625,
-0.025970458984375,
-0.02142333984375,
-0.046112060546875,
-0.01934814453125,
-0.00848388671875,
0.0479736328125,
0.034454345703125,
-0.042083740234375,
-0.0013408660888671875,
0.042999267578125,
0.040191650390625,
0.00920867919921875,
0.0305328369140625,
-0.046356201171875,
0.04034423828125,
0.072265625,
0.051910400390625,
0.0169219970703125,
0.01207733154296875,
0.01235198974609375,
-0.06536865234375,
-0.0052947998046875,
-0.0147857666015625,
-0.006824493408203125,
0.055999755859375,
-0.05059814453125,
-0.0149993896484375,
-0.011627197265625,
0.01025390625,
0.057373046875,
0.01229095458984375,
0.0001901388168334961,
-0.038055419921875,
-0.038726806640625,
0.0168914794921875,
-0.01230621337890625,
-0.0018720626831054688,
0.0093536376953125,
0.047454833984375,
0.0234375,
-0.01053619384765625,
0.0286865234375,
0.0291748046875,
0.033538818359375,
-0.02423095703125,
0.037811279296875,
0.0156707763671875,
0.00200653076171875,
0.041107177734375,
-0.00856781005859375,
0.00800323486328125,
-0.013092041015625,
0.0220489501953125,
0.01446533203125,
-0.013885498046875,
0.022705078125,
-0.01314544677734375,
0.020782470703125,
0.0275421142578125,
-0.0034008026123046875,
-0.0028629302978515625,
0.0233917236328125,
0.004329681396484375,
-0.01091766357421875,
-0.0070037841796875,
-0.0049285888671875,
-0.025115966796875,
0.00452423095703125,
-0.0209808349609375,
0.035125732421875,
0.0379638671875,
-0.02264404296875,
0.02508544921875,
0.0224151611328125,
0.0145416259765625,
-0.04925537109375,
0.015899658203125,
-0.05224609375,
0.037017822265625,
-0.0280303955078125,
-0.005367279052734375,
-0.048736572265625,
-0.0186004638671875,
0.06634521484375,
0.043975830078125,
-0.0175323486328125,
-0.005794525146484375,
0.00556182861328125,
-0.00994110107421875,
-0.0151824951171875,
0.00110626220703125,
0.015960693359375,
-0.017974853515625,
-0.004486083984375,
-0.00800323486328125,
-0.0216522216796875,
-0.01428985595703125,
-0.042205810546875,
0.0168914794921875,
-0.00982666015625,
-0.0014276504516601562,
0.0244598388671875,
0.053680419921875,
0.0167388916015625,
0.045562744140625,
-0.01406097412109375,
0.026123046875,
0.03216552734375,
0.045013427734375,
0.0006289482116699219,
-0.01104736328125,
0.006011962890625,
0.0299224853515625,
0.03076171875,
-0.054473876953125,
0.018310546875,
0.0445556640625,
0.0511474609375,
-0.0113372802734375,
-0.05743408203125,
0.01146697998046875,
-0.042510986328125,
-0.035797119140625,
0.02020263671875,
0.041259765625,
0.006015777587890625,
-0.03125,
-0.0301666259765625,
0.02880859375,
0.0482177734375,
0.0026645660400390625,
0.0217437744140625,
-0.0152740478515625,
0.0131072998046875,
0.02044677734375,
0.0213775634765625,
-0.043365478515625,
-0.049041748046875,
-0.0123443603515625,
-0.0155487060546875,
0.0233612060546875,
-0.03778076171875,
-0.00954437255859375,
-0.0299835205078125,
-0.0179443359375,
0.034332275390625,
-0.042144775390625,
0.04888916015625,
-0.00977325439453125,
-0.0251922607421875,
0.01049041748046875,
0.015411376953125,
0.047576904296875,
0.0419921875,
-0.0841064453125,
0.0258636474609375,
-0.045684814453125,
0.028656005859375,
-0.037933349609375,
-0.06524658203125,
-0.0299072265625,
-0.006702423095703125,
0.034423828125,
0.0379638671875,
-0.0254669189453125,
-0.0294036865234375,
-0.0279541015625,
0.00742340087890625,
0.0275726318359375,
0.049072265625,
-0.016937255859375,
0.041351318359375,
-0.01142120361328125,
0.018402099609375,
-0.021820068359375,
0.0252685546875,
0.031280517578125,
-0.02032470703125,
0.02728271484375,
-0.018280029296875,
-0.01062774658203125,
-0.02789306640625,
0.026885986328125,
-0.01390838623046875,
0.0030651092529296875,
-0.0215606689453125,
0.0188751220703125,
-0.004878997802734375,
0.007568359375,
-0.01111602783203125,
0.01174163818359375,
-0.039703369140625,
0.0122528076171875,
-0.0082550048828125,
-0.006076812744140625,
0.049957275390625,
-0.0193328857421875,
0.041229248046875,
-0.035675048828125,
-0.034271240234375,
-0.01015472412109375,
0.0151214599609375,
-0.039154052734375,
0.07586669921875,
0.13671875,
0.03741455078125,
0.089111328125,
0.03277587890625,
0.0242156982421875,
0.0205230712890625,
0.03179931640625,
-0.01377105712890625,
-0.0202178955078125,
0.0274200439453125,
0.0009489059448242188,
0.0005083084106445312,
0.00164794921875,
-0.01348876953125,
0.0163726806640625,
0.06451416015625,
0.041046142578125,
-0.08203125,
0.021514892578125,
-0.01230621337890625,
0.0120086669921875,
0.05877685546875,
0.007366180419921875,
-0.006969451904296875,
-0.07745361328125,
0.0428466796875,
0.0155487060546875,
0.016937255859375,
0.0161285400390625,
-0.01358795166015625,
-0.0034999847412109375,
-0.004207611083984375,
0.018280029296875,
0.0231170654296875,
-0.0394287109375,
0.01207733154296875,
0.040618896484375,
-0.003597259521484375,
-0.049468994140625,
-0.0252227783203125,
0.0650634765625,
-0.0162506103515625,
-0.03509521484375,
0.074462890625,
-0.01467132568359375,
0.050628662109375,
-0.0152740478515625,
-0.04046630859375,
0.0196075439453125,
0.032562255859375,
-0.02587890625,
-0.00484466552734375,
0.0262603759765625,
-0.0438232421875,
0.032684326171875,
-0.01361083984375,
0.00641632080078125,
0.0025386810302734375,
-0.037567138671875,
-0.00951385498046875,
-0.0226593017578125,
0.00652313232421875,
-0.00347137451171875,
-0.048370361328125,
0.0233154296875,
-0.025726318359375,
-0.0029697418212890625,
0.0123443603515625,
-0.0175933837890625,
0.0126800537109375,
-0.0215301513671875,
0.031829833984375,
-0.042694091796875,
-0.0269775390625,
-0.01529693603515625,
-0.04156494140625,
0.00835418701171875,
-0.046722412109375,
-0.03131103515625,
0.075927734375,
0.014190673828125,
-0.0176239013671875,
0.0134735107421875,
0.050750732421875,
-0.0096282958984375,
0.041107177734375,
-0.02227783203125,
0.032684326171875,
0.03253173828125,
0.03887939453125,
-0.0214080810546875,
-0.01314544677734375,
0.024566650390625,
0.04766845703125,
0.061187744140625,
0.02703857421875,
-0.0367431640625,
-0.0121307373046875,
0.0091552734375,
0.01213836669921875,
-0.01171112060546875,
0.056549072265625,
0.0036487579345703125,
0.042633056640625,
0.041046142578125,
-0.041290283203125,
0.0021419525146484375,
0.0268707275390625,
-0.01617431640625,
0.03643798828125,
0.01428985595703125,
-0.0052337646484375,
0.0025634765625,
-0.0015954971313476562,
-0.0308837890625,
0.010986328125,
0.0134429931640625,
0.002277374267578125,
0.0035610198974609375,
0.0709228515625,
0.04901123046875,
-0.049041748046875,
-0.0243377685546875,
-0.04296875,
0.05999755859375,
-0.0019130706787109375,
0.044921875,
0.0465087890625,
0.0294647216796875,
0.066650390625,
-0.050933837890625,
0.01194000244140625,
0.002872467041015625,
-0.0340576171875,
0.0037631988525390625,
0.0245819091796875,
0.0281982421875,
-0.040283203125,
-0.025390625,
0.0587158203125,
0.032958984375,
-0.018585205078125,
-0.015838623046875,
0.00391387939453125,
-0.01406097412109375,
0.02471923828125,
-0.032989501953125,
0.046539306640625,
-0.0390625,
-0.0919189453125,
0.00650787353515625,
0.00997161865234375,
0.0269317626953125,
-0.00972747802734375,
0.01482391357421875,
0.041168212890625,
-0.0165557861328125,
0.01270294189453125,
-0.018035888671875,
-0.0011663436889648438,
-0.01361083984375,
0.033935546875,
0.0439453125,
0.01373291015625,
-0.01493072509765625,
-0.0168304443359375,
0.048919677734375,
-0.0019168853759765625,
0.006214141845703125,
-0.062744140625,
0.04217529296875,
-0.0239410400390625,
0.014801025390625,
0.003803253173828125,
0.05401611328125,
0.004180908203125,
0.04693603515625,
0.002414703369140625,
-0.0016803741455078125,
0.00673675537109375,
0.022186279296875,
-0.0126190185546875,
-0.03265380859375,
-0.04376220703125,
0.042724609375,
0.05621337890625,
0.03582763671875,
-0.01396942138671875,
0.0330810546875,
0.040618896484375,
-0.011871337890625,
0.01412200927734375,
-0.01000213623046875,
-0.025115966796875,
0.047210693359375,
-0.020660400390625,
0.0307464599609375,
-0.0008287429809570312,
-0.011566162109375,
0.02294921875,
-0.040435791015625,
-0.0865478515625,
0.0196533203125,
0.03271484375,
-0.0311126708984375,
0.0322265625,
-0.0007543563842773438,
0.01096343994140625,
-0.0069122314453125,
0.005046844482421875,
-0.00917816162109375,
-0.0271759033203125,
0.03216552734375,
-0.0175933837890625,
-0.044219970703125,
-0.051483154296875,
-0.0009074211120605469,
0.046478271484375,
-0.00794219970703125,
0.01342010498046875,
0.00846099853515625,
0.0021266937255859375,
-0.0091400146484375,
-0.026153564453125,
0.03277587890625,
0.036163330078125,
-0.053863525390625,
0.0458984375,
0.0107421875,
-0.041473388671875,
-0.10595703125,
0.0180206298828125,
0.015472412109375,
0.0253448486328125,
0.049560546875,
-0.03558349609375,
0.0239105224609375,
0.0021800994873046875,
0.0271759033203125,
-0.0309295654296875,
-0.0015859603881835938,
0.006893157958984375,
-0.0113372802734375,
0.0232391357421875,
-0.006683349609375,
-0.007343292236328125,
0.03643798828125,
0.0158233642578125,
0.01081085205078125,
0.029327392578125,
-0.0167694091796875,
0.019378662109375,
0.029510498046875,
-0.0308990478515625,
0.0234527587890625,
0.0014486312866210938,
-0.01220703125,
0.0311126708984375,
-0.017059326171875,
0.03851318359375,
0.0001456737518310547,
0.006374359130859375,
-0.043487548828125,
-0.01473236083984375,
0.0045928955078125,
0.0138092041015625,
0.01226043701171875,
-0.060821533203125,
-0.017242431640625,
0.01009368896484375,
-0.00023686885833740234,
0.0003743171691894531,
-0.024871826171875,
-0.021575927734375,
0.0240325927734375,
-0.03460693359375,
0.01611328125,
-0.056488037109375,
-0.000017702579498291016,
0.043548583984375,
0.01505279541015625,
-0.08056640625,
0.044708251953125,
-0.01097869873046875,
0.039764404296875,
-0.0154266357421875,
0.03570556640625,
-0.00344085693359375,
0.031982421875,
-0.01129150390625,
-0.016845703125,
-0.0268707275390625,
0.035888671875,
-0.00018966197967529297,
-0.0106658935546875,
-0.004547119140625,
0.00826263427734375,
-0.0002815723419189453,
-0.05548095703125,
-0.0330810546875,
-0.0014057159423828125,
-0.0181732177734375,
-0.0204925537109375,
0.027130126953125,
0.014312744140625,
-0.01024627685546875,
-0.0081939697265625,
-0.0089874267578125,
0.014495849609375,
0.01141357421875,
0.0022125244140625,
-0.0121612548828125,
-0.0006070137023925781,
-0.030548095703125,
-0.06732177734375,
0.06744384765625,
0.0014801025390625,
-0.0264434814453125,
-0.0311279296875,
-0.019287109375,
-0.026702880859375,
0.01552581787109375,
-0.0128021240234375,
0.00794219970703125,
-0.00244903564453125,
0.0628662109375,
0.0155792236328125,
0.035369873046875,
-0.006496429443359375,
0.003986358642578125,
0.00368499755859375,
0.042694091796875,
0.043914794921875,
0.0076904296875,
0.025421142578125,
-0.01406097412109375,
0.047576904296875,
0.050872802734375,
0.00044727325439453125,
0.03656005859375,
-0.0003399848937988281,
-0.058807373046875,
-0.020782470703125,
-0.036529541015625,
-0.011383056640625,
0.004909515380859375,
0.07977294921875,
0.062255859375,
0.021392822265625,
-0.063232421875,
-0.031341552734375,
-0.00829315185546875,
0.031829833984375,
-0.016326904296875,
-0.001895904541015625,
-0.0589599609375,
-0.02569580078125,
0.0023250579833984375,
-0.01507568359375,
-0.0169525146484375,
0.0211639404296875,
-0.0305938720703125,
-0.00637054443359375,
-0.0172882080078125,
-0.0294647216796875,
-0.0178680419921875,
0.0009684562683105469,
0.022186279296875,
-0.0175628662109375,
0.03485107421875,
-0.0149383544921875,
0.0313720703125,
0.0276641845703125,
0.0031604766845703125,
0.01342010498046875,
0.0269622802734375,
-0.042144775390625,
0.0085601806640625,
-0.005466461181640625,
0.05389404296875,
-0.057861328125,
-0.01343536376953125,
0.01271820068359375,
0.0272979736328125,
-0.0105133056640625,
0.032379150390625,
0.023345947265625,
0.044586181640625,
-0.023773193359375,
0.00937652587890625,
-0.03289794921875,
0.0112762451171875,
-0.0283050537109375,
0.0433349609375,
-0.034881591796875,
0.04376220703125,
0.01136016845703125,
-0.01183319091796875,
0.002437591552734375,
0.01165008544921875,
-0.01143646240234375,
-0.0209503173828125,
-0.016632080078125,
-0.0287933349609375,
-0.006763458251953125,
-0.004657745361328125
] |
2120069bb3d0e64f535340be4193ba04ea09b7ae
|
Wordpress Stackexchange
Q: get_post random and order by not working I have this code that returns list of post title as links, but when I add the 'orderby' and 'order' parameters - it returns results but 'orderby, order, rand' do not work, can anyone tell me what I'm doing wrong? Thanks!
<ul>
<?php $post; $cat_posts = get_posts(array('numberposts' => 10, 'orderby' => 'rand', 'order' => ASC, 'category' => $disciplineCatID));
foreach($cat_posts as $post) : ?>
<?php $postTitle = get_the_title(); if($title != $postTitle) :?>
<li><a href="<?php the_permalink(); ?>">›› <?php the_title(); ?></a></li>
<?php endif ;?>
<?php endforeach; ?>
</ul>
A: If you're hosted on WP Engine, you need to manually enable random ordering in your settings or else 'orderby' => 'rand' won't work.
https://wpexplorer-themes.com/total/docs/random-order-wpengine/
|
Q: get_post random and order by not working I have this code that returns list of post title as links, but when I add the 'orderby' and 'order' parameters - it returns results but 'orderby, order, rand' do not work, can anyone tell me what I'm doing wrong? Thanks!
<ul>
<?php $post; $cat_posts = get_posts(array('numberposts' => 10, 'orderby' => 'rand', 'order' => ASC, 'category' => $disciplineCatID));
foreach($cat_posts as $post) : ?>
<?php $postTitle = get_the_title(); if($title != $postTitle) :?>
<li><a href="<?php the_permalink(); ?>">›› <?php the_title(); ?></a></li>
<?php endif ;?>
<?php endforeach; ?>
</ul>
A: If you're hosted on WP Engine, you need to manually enable random ordering in your settings or else 'orderby' => 'rand' won't work.
https://wpexplorer-themes.com/total/docs/random-order-wpengine/
A: Yes, this is the correct syntax:
$args = array(
'orderby' => 'rand',
'order' => 'ASC'
);
query_posts( $args );
However plugins can keep this from working properly. Try disabling ALL plugins and see if that helps. Two known plugins which keep orderby=rand from working are Post Type Order and WP_Sticky
Also, if you have Post Types order installed make sure you visit the Admin page and check the settings. You can use this plugin and keep it from automatically re-ordering posts:
http://img829.imageshack.us/img829/2616/pictureot.png
And then you can use the code for Post Types Order to specifically order those posts in places where you need them to be ordered via the custom/menu-order. Here is the example code for that plugin:
The following PHP code will still return the post in the set-up Order:
$args = array(
'post_type' => 'feature'
);
$my_query = new WP_Query($args);
while ($my_query->have_posts())
{
$my_query->the_post();
(..your code..)
}
Or:
$posts = get_posts($args);
foreach ($posts as $post)
{
(..your code..)
}
If the Auto Sort is uncheck you will need to use the "orderby" and "order" parameters:
$args = array(
'post_type' => 'feature',
'orderby' => 'menu_order',
'order' => 'ASC'
);
A: Why don't you try to use query_posts instead?
Something like:
$args = array(
'orderby' => 'rand',
'order' => 'ASC'
);
query_posts( $args );
A: try this code
<?php
remove_all_filters('posts_orderby');
query_posts('orderby=rand');
?>
got the answer from here
http://www.reinaris.nl/wp/wordpress-random-post-order-not-working-orderbyrand/
A: You probably forgot to setup_postdata inside your foreach loop to get template tags to work.
A: I ran into the same problem, and luckily found this thread. I tried a different fix, probably dirtier than the others, but maybe useful in some cases.
Basically, I shuffled the posts before outputting them:
<?php
$selectedPosts = get_posts($args);
shuffle($selectedPosts);
foreach ($selectedPosts as $selectedPost) :
setup_postdata( $selectedPost );
?>
<!-- post elements here -->
<?php
endforeach;
wp_reset_postdata();
?>
A: If you have wp-engine in your WordPress site check the ALLOW ORDER BY RAND() option. See an article here: https://wpengine.co.uk/support/about-order-by-rand/
|
wordpress
|
{
"language": "en",
"length": 443,
"provenance": "stackexchange_00019.jsonl.gz:407989",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12797"
}
|
[
0.03759765625,
0.006313323974609375,
0.00024819374084472656,
0.04486083984375,
0.016815185546875,
-0.050140380859375,
0.08856201171875,
-0.0474853515625,
0.01122283935546875,
0.008636474609375,
-0.039276123046875,
-0.005733489990234375,
-0.0230560302734375,
-0.033782958984375,
-0.00897216796875,
-0.0406494140625,
0.0293731689453125,
-0.00717926025390625,
0.0246429443359375,
-0.00447845458984375,
-0.003887176513671875,
0.0283050537109375,
0.018310546875,
0.02777099609375,
0.037078857421875,
-0.01259613037109375,
0.078369140625,
-0.029571533203125,
0.03125,
-0.0279083251953125,
0.03509521484375,
-0.0259552001953125,
0.04730224609375,
-0.027008056640625,
-0.006832122802734375,
-0.01007080078125,
0.0270538330078125,
-0.036529541015625,
-0.040771484375,
0.043975830078125,
0.01169586181640625,
0.0068359375,
0.021728515625,
0.00759124755859375,
-0.0153656005859375,
-0.037841796875,
0.02880859375,
-0.004665374755859375,
0.006008148193359375,
0.018829345703125,
0.00524139404296875,
-0.01165771484375,
0.013336181640625,
-0.0015964508056640625,
-0.0002949237823486328,
-0.014068603515625,
0.00545501708984375,
0.0202789306640625,
0.0243377685546875,
-0.016937255859375,
-0.04229736328125,
0.0071258544921875,
0.013427734375,
-0.02130126953125,
-0.0178985595703125,
0.006053924560546875,
0.06719970703125,
-0.00403594970703125,
0.00258636474609375,
-0.01245880126953125,
0.031951904296875,
0.0046234130859375,
0.00913238525390625,
-0.0176239013671875,
0.01157379150390625,
-0.044158935546875,
-0.04449462890625,
-0.0733642578125,
0.034332275390625,
0.0257720947265625,
-0.0166473388671875,
-0.0160064697265625,
-0.033966064453125,
-0.0025482177734375,
-0.0009322166442871094,
0.007343292236328125,
-0.021087646484375,
-0.0007715225219726562,
-0.039154052734375,
-0.038360595703125,
-0.02001953125,
-0.0570068359375,
-0.0394287109375,
0.0038509368896484375,
-0.0005369186401367188,
-0.033599853515625,
0.03875732421875,
0.0767822265625,
-0.03759765625,
-0.026153564453125,
-0.0020809173583984375,
-0.02398681640625,
-0.022308349609375,
-0.0259552001953125,
-0.0071258544921875,
-0.0345458984375,
0.0035190582275390625,
0.0023345947265625,
0.007312774658203125,
0.04473876953125,
-0.036773681640625,
0.009979248046875,
0.0188751220703125,
-0.02606201171875,
0.00809478759765625,
-0.004962921142578125,
-0.03759765625,
0.054931640625,
0.01776123046875,
0.0195770263671875,
0.01035308837890625,
0.019317626953125,
0.034332275390625,
-0.0244903564453125,
0.0257110595703125,
0.0404052734375,
-0.022735595703125,
-0.06866455078125,
-0.0177001953125,
0.04266357421875,
-0.02496337890625,
0.02001953125,
0.05963134765625,
0.00495147705078125,
-0.01678466796875,
-0.024658203125,
-0.0247650146484375,
-0.01280975341796875,
-0.0290374755859375,
-0.00408935546875,
-0.01421356201171875,
-0.0016117095947265625,
0.041473388671875,
-0.0252227783203125,
0.0285186767578125,
0.01505279541015625,
-0.0008087158203125,
0.0025501251220703125,
0.0545654296875,
-0.0062255859375,
-0.023345947265625,
-0.01131439208984375,
0.0289306640625,
0.0195159912109375,
-0.021270751953125,
-0.0084686279296875,
-0.01317596435546875,
-0.0059967041015625,
0.0014066696166992188,
-0.0207366943359375,
0.04278564453125,
-0.00734710693359375,
0.005840301513671875,
-0.019317626953125,
-0.0303802490234375,
0.0155487060546875,
-0.07135009765625,
-0.0164337158203125,
0.024505615234375,
0.0309295654296875,
0.0255584716796875,
-0.02642822265625,
-0.003612518310546875,
0.021392822265625,
-0.005767822265625,
0.03399658203125,
0.007724761962890625,
-0.03558349609375,
0.0261077880859375,
0.0256500244140625,
-0.02691650390625,
-0.0169830322265625,
0.031707763671875,
-0.03399658203125,
-0.053619384765625,
-0.0204620361328125,
0.01309967041015625,
0.045074462890625,
0.044403076171875,
0.022796630859375,
0.0273590087890625,
-0.009063720703125,
-0.055389404296875,
0.049896240234375,
0.0128936767578125,
-0.0080413818359375,
-0.047515869140625,
-0.0014963150024414062,
-0.0064544677734375,
-0.046844482421875,
-0.00785064697265625,
-0.019622802734375,
0.00806427001953125,
0.0198822021484375,
-0.00310516357421875,
-0.00933837890625,
-0.00708770751953125,
0.0083160400390625,
-0.0167083740234375,
0.03802490234375,
0.03948974609375,
0.01363372802734375,
-0.0550537109375,
0.0117034912109375,
-0.0160369873046875,
-0.03387451171875,
0.017730712890625,
-0.000052869319915771484,
-0.0177459716796875,
-0.02081298828125,
-0.040130615234375,
-0.0310821533203125,
-0.04254150390625,
0.06280517578125,
0.08367919921875,
-0.013580322265625,
0.0006327629089355469,
-0.024169921875,
0.06964111328125,
0.01274871826171875,
-0.0377197265625,
0.0161590576171875,
0.0110015869140625,
0.07305908203125,
-0.0269775390625,
-0.035003662109375,
-0.010406494140625,
-0.0233154296875,
0.038726806640625,
0.029510498046875,
0.037139892578125,
0.0178985595703125,
0.0225830078125,
0.01253509521484375,
0.041595458984375,
-0.0129241943359375,
0.019866943359375,
-0.02105712890625,
-0.0003864765167236328,
0.04229736328125,
0.031829833984375,
0.0560302734375,
0.017059326171875,
0.048004150390625,
0.0200653076171875,
0.03912353515625,
0.01328277587890625,
0.0467529296875,
0.01800537109375,
-0.0277099609375,
-0.00618743896484375,
0.01506805419921875,
0.00295257568359375,
-0.0028209686279296875,
-0.0004410743713378906,
-0.0219268798828125,
0.005641937255859375,
-0.005077362060546875,
-0.017425537109375,
-0.01702880859375,
0.0190277099609375,
-0.0113525390625,
0.00998687744140625,
0.007236480712890625,
0.0016183853149414062,
-0.00400543212890625,
-0.0272064208984375,
0.005336761474609375,
-0.00424957275390625,
-0.01424407958984375,
-0.01261138916015625,
0.04296875,
0.02435302734375,
-0.01461029052734375,
-0.03790283203125,
-0.0789794921875,
0.0162811279296875,
0.0009250640869140625,
0.009521484375,
0.03533935546875,
0.0270843505859375,
0.057708740234375,
0.00907135009765625,
0.03521728515625,
-0.0103759765625,
0.029327392578125,
-0.020843505859375,
-0.05364990234375,
0.039337158203125,
-0.06109619140625,
0.01438140869140625,
0.064697265625,
-0.023590087890625,
0.0163421630859375,
-0.00807952880859375,
0.0457763671875,
0.0318603515625,
-0.01544952392578125,
-0.0302276611328125,
0.0010986328125,
-0.060150146484375,
-0.042999267578125,
0.0235137939453125,
0.0291595458984375,
0.0202178955078125,
-0.0219268798828125,
0.0168304443359375,
0.00907135009765625,
-0.09478759765625,
-0.1522216796875,
0.06549072265625,
-0.032379150390625,
0.004360198974609375,
-0.010406494140625,
-0.017791748046875,
-0.0445556640625,
-0.0009021759033203125,
-0.0167388916015625,
0.0102691650390625,
-0.0105133056640625,
-0.03857421875,
-0.022705078125,
-0.045745849609375,
-0.0205230712890625,
0.005260467529296875,
0.0012874603271484375,
0.008636474609375,
0.04296875,
0.015380859375,
-0.0643310546875,
0.01371002197265625,
0.020904541015625,
-0.0236053466796875,
0.0168609619140625,
-0.007106781005859375,
-0.0119476318359375,
-0.000043332576751708984,
-0.0164947509765625,
0.06341552734375,
0.037322998046875,
-0.029510498046875,
0.021331787109375,
-0.00899505615234375,
0.03631591796875,
0.01508331298828125,
0.01407623291015625,
0.00966644287109375,
0.0204925537109375,
-0.00759124755859375,
-0.031829833984375,
0.01678466796875,
-0.06439208984375,
-0.04638671875,
0.01000213623046875,
0.029815673828125,
0.027801513671875,
-0.0247039794921875,
-0.0011548995971679688,
-0.01049041748046875,
0.01531219482421875,
0.02618408203125,
-0.0162506103515625,
0.01079559326171875,
-0.003772735595703125,
-0.0111846923828125,
-0.015533447265625,
0.01390838623046875,
-0.0117645263671875,
-0.032440185546875,
-0.0174713134765625,
-0.011627197265625,
-0.052520751953125,
0.03857421875,
-0.0609130859375,
-0.03851318359375,
0.0308074951171875,
-0.0229949951171875,
-0.022674560546875,
0.0147247314453125,
-0.007106781005859375,
0.038604736328125,
0.056182861328125,
-0.004337310791015625,
-0.034912109375,
-0.0267791748046875,
0.0257110595703125,
-0.04278564453125,
-0.080810546875,
0.0360107421875,
-0.0033473968505859375,
-0.02606201171875,
-0.00713348388671875,
-0.01197052001953125,
-0.007801055908203125,
-0.024078369140625,
-0.0030307769775390625,
-0.02044677734375,
-0.007389068603515625,
0.0205841064453125,
0.028656005859375,
0.00966644287109375,
-0.019500732421875,
-0.01538848876953125,
-0.00580596923828125,
-0.0068359375,
0.002285003662109375,
-0.04644775390625,
-0.021759033203125,
0.032470703125,
0.01873779296875,
-0.0013799667358398438,
-0.03265380859375,
-0.01187896728515625,
0.036895751953125,
-0.0276947021484375,
-0.01453399658203125,
0.0298004150390625,
0.0528564453125,
-0.0120086669921875,
-0.0189361572265625,
-0.005306243896484375,
-0.0562744140625,
-0.0155487060546875,
0.01093292236328125,
-0.03216552734375,
0.044158935546875,
-0.0078887939453125,
0.01824951171875,
0.019378662109375,
-0.03265380859375,
-0.049957275390625,
-0.032623291015625,
-0.02301025390625,
0.01435089111328125,
-0.01399993896484375,
-0.00691986083984375,
-0.058746337890625,
-0.07305908203125,
0.003902435302734375,
-0.032257080078125,
-0.005725860595703125,
-0.0085601806640625,
0.05804443359375,
0.027069091796875,
0.0037174224853515625,
0.046234130859375,
-0.01425933837890625,
0.021209716796875,
0.033905029296875,
0.0176849365234375,
0.01165771484375,
-0.024749755859375,
0.034698486328125,
0.0204010009765625,
0.017486572265625,
-0.03424072265625,
0.0218353271484375,
-0.0183868408203125,
-0.02117919921875,
0.0228424072265625,
-0.0168609619140625,
0.034393310546875,
0.02471923828125,
-0.005680084228515625,
-0.0087432861328125,
-0.0013675689697265625,
0.031005859375,
0.00811004638671875,
-0.01265716552734375,
-0.019195556640625,
-0.0140380859375,
0.00513458251953125,
-0.01080322265625,
0.014495849609375,
0.0181732177734375,
0.011962890625,
-0.01263427734375,
0.006290435791015625,
0.00788116455078125,
0.021636962890625,
0.0219573974609375,
-0.01444244384765625,
0.017730712890625,
0.00791168212890625,
-0.0217437744140625,
0.017578125,
-0.0220489501953125,
0.11138916015625,
0.015289306640625,
-0.0269775390625,
-0.022125244140625,
-0.01009368896484375,
0.051361083984375,
-0.01531219482421875,
0.005619049072265625,
0.015350341796875,
0.0182037353515625,
0.00681304931640625,
0.0254669189453125,
-0.0017452239990234375,
0.0224609375,
-0.007354736328125,
0.099609375,
0.0196990966796875,
0.0004534721374511719,
0.00447845458984375,
0.07000732421875,
-0.00632476806640625,
0.04046630859375,
-0.01377105712890625,
0.037841796875,
0.011383056640625,
0.01776123046875,
0.004058837890625,
0.01499176025390625,
-0.003681182861328125,
0.0117645263671875,
0.0176544189453125,
-0.0234832763671875,
0.0086669921875,
0.023712158203125,
0.0134735107421875,
-0.01540374755859375,
-0.0231170654296875,
0.029266357421875,
0.007366180419921875,
-0.039215087890625,
0.0281829833984375,
0.03826904296875,
-0.00556182861328125,
-0.03460693359375,
-0.042572021484375,
-0.00490570068359375,
0.0401611328125,
0.00855255126953125,
-0.00353240966796875,
0.0009489059448242188,
0.00789642333984375,
-0.0016632080078125,
-0.0004723072052001953,
-0.01128387451171875,
-0.0004968643188476562,
-0.014190673828125,
-0.043487548828125,
0.00592041015625,
0.0665283203125,
0.0187225341796875,
-0.0267333984375,
-0.037445068359375,
0.043182373046875,
-0.0260009765625,
0.06964111328125,
-0.03704833984375,
-0.00241851806640625,
-0.0386962890625,
0.03265380859375,
0.01113128662109375,
0.00789642333984375,
0.00024080276489257812,
-0.017669677734375,
-0.033447265625,
-0.0255889892578125,
0.008087158203125,
-0.0182647705078125,
-0.01483917236328125,
-0.024505615234375,
-0.0179901123046875,
0.006320953369140625,
0.008392333984375,
-0.0146636962890625,
-0.0272216796875,
0.003612518310546875,
0.00814056396484375,
-0.00904083251953125,
-0.0143890380859375,
0.059478759765625,
-0.005413055419921875,
0.06689453125,
0.0248870849609375,
-0.0021266937255859375,
-0.036895751953125,
-0.006313323974609375,
0.023590087890625,
-0.0229034423828125,
-0.041168212890625,
-0.0238037109375,
-0.03033447265625,
-0.00047779083251953125,
0.056396484375,
-0.004779815673828125,
0.02557373046875,
-0.00975799560546875,
0.01690673828125,
-0.007663726806640625,
-0.05267333984375,
-0.018798828125,
-0.0284423828125,
0.0262451171875,
-0.029296875,
0.01068878173828125,
0.0094757080078125,
0.002429962158203125,
0.006317138671875,
-0.0128631591796875,
-0.00031828880310058594,
0.022064208984375,
-0.045257568359375,
0.04193115234375,
0.1082763671875,
0.0889892578125,
0.08258056640625,
0.0025234222412109375,
0.05682373046875,
0.0027008056640625,
-0.01177978515625,
0.053955078125,
-0.006412506103515625,
0.051666259765625,
-0.01097869873046875,
-0.0213165283203125,
0.020751953125,
-0.046112060546875,
0.0172882080078125,
0.009490966796875,
0.0457763671875,
-0.029327392578125,
0.004474639892578125,
0.0130767822265625,
-0.025970458984375,
0.00255584716796875,
0.0130157470703125,
-0.0186767578125,
-0.0218048095703125,
0.0126495361328125,
-0.034698486328125,
-0.028839111328125,
0.00852203369140625,
-0.0037250518798828125,
0.004352569580078125,
-0.0058746337890625,
0.02252197265625,
0.00791168212890625,
-0.07635498046875,
0.009429931640625,
0.03753662109375,
-0.00244140625,
-0.04840087890625,
0.008056640625,
0.0055999755859375,
-0.01898193359375,
-0.07757568359375,
0.001407623291015625,
0.0034008026123046875,
-0.0018177032470703125,
0.01467132568359375,
-0.0152587890625,
-0.0016164779663085938,
0.0209808349609375,
-0.01476287841796875,
-0.0207061767578125,
-0.005268096923828125,
-0.002872467041015625,
0.021209716796875,
-0.03790283203125,
0.011932373046875,
-0.00954437255859375,
-0.0150146484375,
0.01387786865234375,
0.0093536376953125,
-0.05682373046875,
-0.0178985595703125,
-0.032989501953125,
0.052459716796875,
0.017364501953125,
-0.02337646484375,
0.035919189453125,
0.042022705078125,
-0.0318603515625,
0.005474090576171875,
0.052337646484375,
-0.041900634765625,
-0.003131866455078125,
0.03314208984375,
0.0018243789672851562,
-0.00836944580078125,
0.0170440673828125,
-0.03173828125,
0.1009521484375,
-0.0498046875,
0.012786865234375,
0.0012311935424804688,
0.041412353515625,
0.0175933837890625,
0.060455322265625,
-0.0599365234375,
0.08740234375,
-0.05133056640625,
0.057464599609375,
-0.06829833984375,
0.013824462890625,
0.0078125,
0.005512237548828125,
0.024993896484375,
0.0015659332275390625,
-0.0367431640625,
-0.0166473388671875,
0.048553466796875,
0.051422119140625,
0.0114593505859375,
0.03753662109375,
0.002407073974609375,
0.026947021484375,
0.0014333724975585938,
-0.003002166748046875,
0.03314208984375,
-0.017608642578125,
-0.048065185546875,
0.046478271484375,
0.0180816650390625,
-0.0194091796875,
0.00984954833984375,
0.0004184246063232422,
-0.09893798828125,
0.029815673828125,
0.055938720703125,
0.046600341796875,
0.019073486328125,
0.0577392578125,
0.07757568359375,
-0.0499267578125,
-0.036773681640625,
-0.0226898193359375,
0.06396484375,
0.027099609375,
0.04296875,
0.0213470458984375,
0.016357421875,
0.0032787322998046875,
-0.0264129638671875,
0.013519287109375,
-0.0238494873046875,
-0.0271148681640625,
0.0345458984375,
-0.00009047985076904297,
0.003021240234375,
-0.046966552734375,
0.0269775390625,
0.0528564453125,
0.052703857421875,
-0.049652099609375,
0.01236724853515625,
0.016143798828125,
-0.006591796875,
-0.01181793212890625,
-0.050750732421875,
-0.016265869140625,
-0.00461578369140625,
-0.0117034912109375,
-0.032989501953125,
-0.0297698974609375,
-0.0020084381103515625,
0.04278564453125,
0.00027680397033691406,
0.007320404052734375,
-0.0176239013671875,
-0.051483154296875,
-0.0160675048828125,
0.03204345703125,
0.032135009765625,
0.051177978515625,
-0.0390625,
0.0914306640625,
-0.0784912109375,
-0.0167236328125,
-0.01508331298828125,
0.032958984375,
-0.012237548828125,
0.02008056640625,
-0.022430419921875,
-0.025115966796875,
-0.025421142578125,
0.0213623046875,
0.043121337890625,
-0.0082855224609375,
0.045440673828125,
0.0294189453125,
-0.002368927001953125,
-0.005168914794921875,
0.01300811767578125,
-0.0014410018920898438,
-0.04052734375,
-0.01145172119140625,
-0.034912109375,
0.00888824462890625,
-0.0218048095703125,
0.0328369140625,
0.0146484375,
-0.00402069091796875,
-0.017333984375,
0.051971435546875,
0.00838470458984375,
0.002597808837890625,
-0.016754150390625,
0.009063720703125,
0.0164031982421875,
0.0063629150390625,
-0.0860595703125,
-0.029693603515625,
-0.0241241455078125,
-0.015655517578125,
0.024749755859375,
0.043609619140625,
0.01113128662109375,
0.01129150390625,
-0.0153350830078125,
-0.044158935546875,
0.040618896484375,
0.01313018798828125,
-0.01001739501953125,
0.0235137939453125,
0.007129669189453125,
-0.01331329345703125,
-0.0699462890625,
-0.040313720703125,
-0.008056640625,
0.024200439453125,
-0.015960693359375,
0.01290130615234375,
0.0200653076171875,
0.008941650390625,
-0.0254669189453125,
0.0209808349609375,
-0.0152435302734375,
-0.042510986328125,
0.08111572265625,
-0.0012722015380859375,
-0.0263671875,
-0.0174102783203125,
-0.0300750732421875,
-0.0002162456512451172,
0.0225677490234375,
-0.006626129150390625,
0.00823974609375,
-0.0499267578125,
0.0226593017578125,
0.00452423095703125,
0.06524658203125,
-0.00395965576171875,
-0.0025043487548828125,
-0.0218048095703125,
-0.0167083740234375,
0.04925537109375,
0.06536865234375,
-0.0058441162109375,
0.021636962890625,
-0.0182647705078125,
-0.04205322265625,
0.0291748046875,
-0.050537109375,
0.03668212890625,
0.0246734619140625,
-0.009765625,
0.00177764892578125,
0.01541900634765625,
-0.0209503173828125,
0.003398895263671875,
0.022857666015625,
-0.01568603515625,
0.00612640380859375,
-0.050628662109375,
0.00023496150970458984,
0.046112060546875,
0.0543212890625,
-0.0005092620849609375,
0.01026153564453125,
0.0255889892578125,
-0.03399658203125,
-0.005176544189453125,
0.0216827392578125,
-0.0229339599609375,
0.00835418701171875,
-0.00955963134765625,
0.00370025634765625,
0.0234222412109375,
0.013092041015625,
0.005218505859375,
0.012939453125,
0.00920867919921875,
-0.0170440673828125,
0.0039825439453125,
0.010833740234375,
-0.035980224609375,
-0.00711822509765625,
-0.00821685791015625,
-0.0086212158203125,
0.019622802734375,
0.05853271484375,
-0.01015472412109375,
-0.0018768310546875,
-0.019775390625,
-0.0016298294067382812,
-0.027862548828125,
-0.01012420654296875,
0.0163116455078125,
0.0082855224609375,
-0.02069091796875,
-0.03106689453125,
-0.032135009765625,
0.01068878173828125,
-0.0181121826171875,
-0.01277923583984375,
0.03985595703125,
0.03192138671875,
-0.052215576171875,
-0.0975341796875,
0.005428314208984375,
-0.047027587890625,
0.03826904296875,
-0.04833984375,
0.04937744140625,
0.0460205078125,
-0.024261474609375,
-0.035369873046875,
0.069580078125,
-0.02716064453125,
-0.013214111328125,
-0.048553466796875,
-0.0057525634765625,
-0.0092010498046875,
0.0193939208984375,
0.00412750244140625,
-0.032470703125,
-0.0408935546875,
0.0255584716796875,
-0.00701141357421875,
0.078369140625,
-0.0180206298828125,
0.01007843017578125,
-0.03607177734375,
0.0210418701171875,
-0.0033054351806640625,
0.00904083251953125,
-0.015625,
-0.004161834716796875,
0.0208740234375,
0.03594970703125,
-0.0246429443359375,
0.005535125732421875,
0.004924774169921875,
0.0254058837890625,
-0.00024437904357910156,
-0.03997802734375,
-0.0250091552734375,
-0.0101165771484375,
0.031524658203125,
0.054443359375,
0.00510406494140625,
-0.0516357421875,
-0.00600433349609375,
-0.01068115234375,
-0.01151275634765625,
-0.048980712890625,
0.0253448486328125,
-0.098876953125,
-0.067138671875,
0.007396697998046875,
-0.0003502368927001953,
-0.01512908935546875,
-0.0030841827392578125,
-0.034393310546875,
-0.029510498046875,
-0.046875,
-0.01329803466796875,
-0.041595458984375,
0.037933349609375,
0.042266845703125,
-0.062042236328125,
-0.043304443359375,
-0.01210784912109375,
-0.00926971435546875,
-0.01467132568359375,
-0.050994873046875,
-0.0298614501953125,
0.04052734375,
-0.011871337890625,
-0.01213836669921875,
0.0163726806640625,
0.0251617431640625,
0.007808685302734375,
0.031707763671875,
-0.028594970703125,
0.007236480712890625,
0.02459716796875,
-0.01007843017578125,
0.0001569986343383789,
0.035797119140625,
0.0139923095703125,
0.018798828125,
-0.0280609130859375,
0.054046630859375,
0.0110321044921875,
0.0233001708984375,
-0.030426025390625,
0.01198577880859375,
0.0189971923828125,
-0.01751708984375,
0.01270294189453125,
0.013702392578125,
0.02752685546875,
0.039642333984375,
-0.0294342041015625,
-0.06658935546875,
-0.0172119140625,
-0.0265960693359375
] |
e9dbd6b2a902f56674948a3f3db79162485984ae
|
Wordpress Stackexchange
Q: How to add an option page to custom post type? As the title says, I have not found any function to add an option page to a particular custom post type.
I would like to keep the option page related to a custom post type grouped together in its own panel, instead of adding it to the "Setting" panel, for example.
Any suggestion?
Thank you
A: use add_submenu_page() and as the pass
add_submenu_page('edit.php?post_type=YOUR_POST_TYPE_NAME',....);
|
Q: How to add an option page to custom post type? As the title says, I have not found any function to add an option page to a particular custom post type.
I would like to keep the option page related to a custom post type grouped together in its own panel, instead of adding it to the "Setting" panel, for example.
Any suggestion?
Thank you
A: use add_submenu_page() and as the pass
add_submenu_page('edit.php?post_type=YOUR_POST_TYPE_NAME',....);
|
wordpress
|
{
"language": "en",
"length": 74,
"provenance": "stackexchange_00019.jsonl.gz:408002",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12823"
}
|
[
0.06689453125,
-0.0020389556884765625,
-0.0020389556884765625,
-0.0227508544921875,
0.03436279296875,
-0.04510498046875,
0.09222412109375,
-0.01345062255859375,
-0.03570556640625,
-0.037689208984375,
-0.018402099609375,
0.0025634765625,
-0.051025390625,
-0.042144775390625,
0.0305023193359375,
-0.06982421875,
0.01690673828125,
-0.00611114501953125,
0.0238189697265625,
-0.0193634033203125,
0.0094146728515625,
-0.01265716552734375,
0.015716552734375,
0.0170135498046875,
0.02276611328125,
-0.0015773773193359375,
0.00600433349609375,
0.0012950897216796875,
0.0196533203125,
0.018524169921875,
0.022064208984375,
-0.0258331298828125,
-0.0019292831420898438,
0.01184844970703125,
0.0243682861328125,
0.036712646484375,
0.025634765625,
0.00604248046875,
0.03167724609375,
0.023895263671875,
0.00409698486328125,
0.017059326171875,
0.0201416015625,
0.031890869140625,
-0.007049560546875,
-0.0521240234375,
0.015533447265625,
-0.041748046875,
-0.0002663135528564453,
-0.03497314453125,
0.01446533203125,
-0.029937744140625,
0.04156494140625,
-0.038543701171875,
-0.02520751953125,
-0.026947021484375,
-0.00377655029296875,
0.020904541015625,
0.032318115234375,
-0.0224151611328125,
-0.0322265625,
-0.004848480224609375,
0.0272369384765625,
0.0083465576171875,
0.034576416015625,
-0.005229949951171875,
0.0231475830078125,
0.01457977294921875,
-0.05487060546875,
0.040679931640625,
0.0577392578125,
-0.04705810546875,
0.047088623046875,
-0.007457733154296875,
0.0279388427734375,
-0.05413818359375,
0.01226043701171875,
0.0028743743896484375,
0.023193359375,
-0.00354766845703125,
-0.0204925537109375,
-0.007289886474609375,
0.00907135009765625,
-0.051025390625,
-0.0092010498046875,
-0.048248291015625,
-0.0284423828125,
0.022918701171875,
-0.012420654296875,
-0.0160369873046875,
-0.0247650146484375,
-0.026153564453125,
0.01276397705078125,
0.01558685302734375,
-0.02239990234375,
-0.00875091552734375,
0.0094146728515625,
0.0102996826171875,
0.026519775390625,
0.040679931640625,
0.033477783203125,
-0.072021484375,
0.103759765625,
-0.06390380859375,
0.006801605224609375,
0.025390625,
-0.005035400390625,
0.0044097900390625,
0.031341552734375,
0.019012451171875,
-0.0099334716796875,
0.01520538330078125,
0.0211944580078125,
-0.01617431640625,
-0.02227783203125,
-0.0175018310546875,
-0.021026611328125,
0.01473236083984375,
0.01149749755859375,
-0.00396728515625,
0.0195770263671875,
0.03460693359375,
-0.0110626220703125,
-0.035552978515625,
-0.00116729736328125,
-0.019744873046875,
-0.031341552734375,
-0.02886962890625,
0.0228729248046875,
-0.0113525390625,
-0.06500244140625,
0.0300140380859375,
0.09820556640625,
0.013153076171875,
0.01922607421875,
-0.0168914794921875,
-0.002147674560546875,
-0.0447998046875,
-0.00799560546875,
0.028228759765625,
0.0338134765625,
-0.05816650390625,
-0.0249786376953125,
0.029632568359375,
0.0236663818359375,
0.023101806640625,
0.0135955810546875,
0.0107269287109375,
-0.0106658935546875,
-0.047607421875,
0.026336669921875,
-0.025360107421875,
0.022491455078125,
-0.005268096923828125,
-0.0192718505859375,
-0.03179931640625,
-0.01381683349609375,
-0.026824951171875,
0.02691650390625,
-0.01224517822265625,
-0.0146026611328125,
-0.0037364959716796875,
0.0128631591796875,
-0.023101806640625,
-0.035247802734375,
0.01203155517578125,
-0.014495849609375,
0.002468109130859375,
0.014251708984375,
0.01320648193359375,
0.011993408203125,
-0.021240234375,
-0.012603759765625,
0.005199432373046875,
-0.007049560546875,
0.0100250244140625,
0.004596710205078125,
0.01450347900390625,
0.0045928955078125,
0.036895751953125,
0.002765655517578125,
-0.03363037109375,
0.0194244384765625,
-0.005401611328125,
-0.052215576171875,
0.0592041015625,
0.01012420654296875,
0.08660888671875,
0.0055694580078125,
0.02178955078125,
0.00998687744140625,
0.0288848876953125,
-0.052886962890625,
-0.0312347412109375,
-0.003505706787109375,
0.018585205078125,
-0.01322174072265625,
-0.00021159648895263672,
-0.01409149169921875,
0.02874755859375,
-0.0765380859375,
0.00432586669921875,
-0.016998291015625,
0.048980712890625,
0.0008950233459472656,
-0.0004916191101074219,
-0.00557708740234375,
0.0230560302734375,
0.048309326171875,
-0.036834716796875,
-0.0030269622802734375,
-0.034271240234375,
0.0286407470703125,
-0.048797607421875,
-0.083251953125,
0.0266265869140625,
-0.00003921985626220703,
0.02191162109375,
-0.01166534423828125,
0.01251983642578125,
-0.0280303955078125,
-0.0177764892578125,
-0.03240966796875,
0.0198822021484375,
0.050872802734375,
-0.002040863037109375,
-0.0268707275390625,
-0.0223236083984375,
-0.0001266002655029297,
0.01241302490234375,
-0.0684814453125,
0.052734375,
0.0251617431640625,
-0.0181884765625,
-0.049163818359375,
-0.005859375,
-0.03399658203125,
-0.046844482421875,
-0.01464080810546875,
0.0667724609375,
0.0171661376953125,
0.04388427734375,
0.00920867919921875,
0.04669189453125,
0.055633544921875,
0.005809783935546875,
0.0227508544921875,
0.01036834716796875,
0.005031585693359375,
0.0302734375,
0.053619384765625,
-0.0042266845703125,
0.004207611083984375,
-0.005279541015625,
0.0455322265625,
0.0004673004150390625,
-0.0167694091796875,
0.01788330078125,
0.0190277099609375,
-0.042236328125,
-0.007320404052734375,
-0.050079345703125,
-0.0177459716796875,
-0.028106689453125,
0.07373046875,
-0.01143646240234375,
0.05999755859375,
0.030487060546875,
-0.0204925537109375,
-0.0160675048828125,
0.0139007568359375,
0.0075225830078125,
0.000009000301361083984,
0.004688262939453125,
0.00824737548828125,
-0.022979736328125,
-0.0256195068359375,
0.004917144775390625,
-0.000043511390686035156,
-0.0093536376953125,
-0.01212310791015625,
0.020721435546875,
-0.00701904296875,
-0.01412200927734375,
0.00902557373046875,
-0.0736083984375,
0.00612640380859375,
0.00391387939453125,
-0.027191162109375,
-0.0203704833984375,
0.01528167724609375,
-0.00897216796875,
-0.035430908203125,
-0.0018205642700195312,
0.0196075439453125,
-0.039459228515625,
0.0657958984375,
-0.057525634765625,
0.059661865234375,
-0.051910400390625,
0.040771484375,
0.061553955078125,
-0.04583740234375,
0.025604248046875,
-0.0012273788452148438,
0.0094757080078125,
-0.019195556640625,
0.031982421875,
0.0031185150146484375,
-0.020538330078125,
-0.01971435546875,
0.029632568359375,
0.00936126708984375,
0.0012102127075195312,
0.0145416259765625,
-0.0157623291015625,
0.01971435546875,
0.016021728515625,
-0.0174102783203125,
-0.00397491455078125,
0.03411865234375,
-0.04754638671875,
-0.0202484130859375,
-0.0186614990234375,
-0.0345458984375,
-0.00896453857421875,
-0.004058837890625,
-0.004840850830078125,
-0.03656005859375,
-0.0220489501953125,
-0.041748046875,
-0.06646728515625,
-0.054412841796875,
-0.0174560546875,
-0.00705718994140625,
0.01116943359375,
0.0106658935546875,
0.061553955078125,
0.00821685791015625,
-0.06304931640625,
0.0162811279296875,
-0.006359100341796875,
-0.02801513671875,
0.03070068359375,
0.052032470703125,
-0.042877197265625,
0.0211029052734375,
-0.0015277862548828125,
0.029754638671875,
0.04034423828125,
-0.037261962890625,
-0.0144805908203125,
-0.04949951171875,
0.020111083984375,
-0.0118560791015625,
0.0205841064453125,
0.0699462890625,
0.007068634033203125,
0.01010894775390625,
-0.033172607421875,
0.013153076171875,
-0.018585205078125,
-0.0080108642578125,
-0.039947509765625,
-0.015716552734375,
-0.0209503173828125,
-0.05645751953125,
0.045257568359375,
-0.01348114013671875,
0.008331298828125,
0.0284271240234375,
-0.0095672607421875,
0.007396697998046875,
-0.0141448974609375,
-0.021697998046875,
-0.01800537109375,
-0.0008053779602050781,
-0.025604248046875,
0.057281494140625,
0.0177764892578125,
0.0004012584686279297,
-0.0032558441162109375,
0.01085662841796875,
-0.0153656005859375,
-0.11328125,
0.06561279296875,
-0.050506591796875,
0.0004551410675048828,
-0.055877685546875,
-0.031219482421875,
0.01526641845703125,
0.1375732421875,
-0.02569580078125,
-0.010101318359375,
-0.03521728515625,
-0.0015659332275390625,
0.0066375732421875,
-0.057159423828125,
0.002689361572265625,
-0.01381683349609375,
-0.05126953125,
-0.0016584396362304688,
0.0024242401123046875,
-0.021575927734375,
-0.021820068359375,
0.033599853515625,
-0.053436279296875,
-0.02178955078125,
0.028839111328125,
-0.050323486328125,
-0.005092620849609375,
0.037322998046875,
-0.0171051025390625,
-0.00852203369140625,
-0.02044677734375,
-0.0280303955078125,
-0.077392578125,
-0.00847625732421875,
0.0084381103515625,
0.0259552001953125,
-0.012298583984375,
-0.0224761962890625,
-0.0206298828125,
0.02191162109375,
0.0472412109375,
-0.0157012939453125,
0.0095672607421875,
-0.02325439453125,
0.01468658447265625,
-0.01450347900390625,
0.0021343231201171875,
-0.033599853515625,
-0.0003647804260253906,
0.00617218017578125,
-0.006114959716796875,
0.031463623046875,
-0.030426025390625,
0.00260162353515625,
0.007328033447265625,
-0.025848388671875,
-0.0240631103515625,
-0.0247650146484375,
0.0003457069396972656,
0.03338623046875,
-0.00785064697265625,
0.002445220947265625,
-0.049163818359375,
-0.04925537109375,
0.0194091796875,
0.006061553955078125,
-0.01374053955078125,
0.0183868408203125,
0.03839111328125,
0.00868988037109375,
-0.01397705078125,
-0.06646728515625,
0.007579803466796875,
0.029083251953125,
-0.0020046234130859375,
0.0377197265625,
0.020599365234375,
0.017547607421875,
0.01186370849609375,
-0.0157623291015625,
0.0003178119659423828,
-0.04205322265625,
0.028045654296875,
-0.0007734298706054688,
-0.01311492919921875,
0.016876220703125,
-0.043975830078125,
0.07269287109375,
-0.00783538818359375,
-0.03973388671875,
-0.01071929931640625,
-0.01554107666015625,
0.048553466796875,
-0.037567138671875,
0.06866455078125,
-0.021026611328125,
-0.006259918212890625,
0.001758575439453125,
-0.0249481201171875,
0.040435791015625,
0.03289794921875,
-0.0041046142578125,
0.01436614990234375,
-0.0171356201171875,
0.0068206787109375,
0.04522705078125,
0.06121826171875,
0.0264739990234375,
0.049835205078125,
0.0250701904296875,
0.015716552734375,
-0.024688720703125,
-0.0015172958374023438,
0.027923583984375,
0.01418304443359375,
-0.0257110595703125,
-0.030364990234375,
0.0005393028259277344,
0.018951416015625,
-0.005039215087890625,
0.007129669189453125,
0.00849151611328125,
0.018280029296875,
0.0028591156005859375,
0.022979736328125,
0.01690673828125,
0.011871337890625,
-0.01340484619140625,
0.0035991668701171875,
0.027130126953125,
-0.0196075439453125,
0.0032138824462890625,
0.054229736328125,
-0.0009183883666992188,
0.0245819091796875,
-0.01070404052734375,
0.012847900390625,
0.036895751953125,
0.00872039794921875,
0.0233001708984375,
0.01280975341796875,
-0.013641357421875,
-0.005619049072265625,
0.00563812255859375,
-0.021484375,
-0.01514434814453125,
0.0023403167724609375,
0.0250091552734375,
0.00408172607421875,
0.007221221923828125,
0.0101165771484375,
-0.01395416259765625,
-0.01061248779296875,
0.00655364990234375,
0.0192413330078125,
-0.0472412109375,
0.01497650146484375,
0.0185394287109375,
-0.003368377685546875,
-0.0185699462890625,
-0.0211944580078125,
0.01062774658203125,
-0.028594970703125,
0.031829833984375,
-0.0179290771484375,
-0.01287841796875,
0.00916290283203125,
0.0102996826171875,
-0.055145263671875,
-0.01372528076171875,
0.0024890899658203125,
-0.06585693359375,
-0.050872802734375,
0.00481414794921875,
-0.0019512176513671875,
0.01084136962890625,
-0.03045654296875,
0.0227203369140625,
0.006809234619140625,
-0.0299072265625,
0.020843505859375,
0.01407623291015625,
0.0467529296875,
0.017608642578125,
-0.03240966796875,
0.0104827880859375,
-0.03509521484375,
-0.0189056396484375,
-0.034881591796875,
-0.049774169921875,
-0.0455322265625,
-0.018310546875,
0.00498199462890625,
0.019195556640625,
-0.03277587890625,
-0.047943115234375,
-0.056396484375,
0.00713348388671875,
0.053497314453125,
0.008331298828125,
0.02667236328125,
0.08294677734375,
-0.039459228515625,
0.06329345703125,
0.0240936279296875,
0.051116943359375,
-0.0235443115234375,
-0.0265045166015625,
0.0036468505859375,
-0.03656005859375,
-0.01032257080078125,
-0.02276611328125,
-0.0005698204040527344,
0.045196533203125,
0.06500244140625,
0.0028133392333984375,
0.0007610321044921875,
-0.023101806640625,
-0.002475738525390625,
-0.031585693359375,
0.0199737548828125,
-0.0184783935546875,
-0.007503509521484375,
0.02093505859375,
-0.0333251953125,
0.00844573974609375,
0.007740020751953125,
0.041229248046875,
-0.008636474609375,
-0.036468505859375,
-0.0023403167724609375,
0.014984130859375,
-0.0679931640625,
0.084228515625,
0.08538818359375,
-0.006710052490234375,
0.03521728515625,
0.0211029052734375,
0.00323486328125,
0.0160064697265625,
0.025390625,
-0.047210693359375,
-0.01528167724609375,
0.041656494140625,
0.0168609619140625,
-0.0279541015625,
0.0303497314453125,
-0.02001953125,
0.0228424072265625,
0.0787353515625,
0.059661865234375,
-0.12109375,
0.0184478759765625,
0.010467529296875,
0.01446533203125,
0.058135986328125,
-0.007114410400390625,
0.0201873779296875,
-0.0000642538070678711,
0.04925537109375,
-0.01605224609375,
-0.007568359375,
0.0120849609375,
-0.0333251953125,
-0.0110321044921875,
-0.0254669189453125,
0.0477294921875,
0.014801025390625,
0.0301055908203125,
-0.00530242919921875,
-0.01265716552734375,
0.0058441162109375,
-0.01361846923828125,
0.0164337158203125,
-0.005771636962890625,
0.00572967529296875,
-0.052032470703125,
0.02899169921875,
-0.045989990234375,
0.005886077880859375,
0.024871826171875,
0.00969696044921875,
0.0088043212890625,
0.04547119140625,
-0.0139617919921875,
0.00798797607421875,
0.01617431640625,
-0.02471923828125,
0.02362060546875,
-0.0262603759765625,
0.01488494873046875,
-0.01641845703125,
-0.039306640625,
0.0037555694580078125,
-0.03173828125,
-0.0289764404296875,
-0.0104217529296875,
0.00629425048828125,
0.11041259765625,
-0.045013427734375,
-0.02685546875,
0.0238189697265625,
0.0016050338745117188,
-0.00908660888671875,
0.0211181640625,
-0.0213623046875,
0.0063323974609375,
-0.006072998046875,
-0.00931549072265625,
-0.0599365234375,
-0.0052642822265625,
-0.0089569091796875,
-0.052459716796875,
0.091064453125,
-0.03643798828125,
0.0005197525024414062,
-0.006450653076171875,
0.055755615234375,
-0.01296234130859375,
0.034820556640625,
-0.03265380859375,
0.0596923828125,
0.0078125,
0.0390625,
-0.061126708984375,
-0.00511932373046875,
-0.01593017578125,
0.0377197265625,
0.0290985107421875,
0.00972747802734375,
-0.0055084228515625,
0.01346588134765625,
0.058319091796875,
0.037994384765625,
0.01326751708984375,
0.016845703125,
0.00576019287109375,
0.00921630859375,
0.06561279296875,
-0.005279541015625,
0.041107177734375,
0.00789642333984375,
0.006378173828125,
0.0191192626953125,
0.0052032470703125,
-0.010955810546875,
-0.0191650390625,
-0.01275634765625,
-0.014373779296875,
-0.01274871826171875,
-0.0006747245788574219,
0.0046234130859375,
0.007709503173828125,
0.03515625,
0.01532745361328125,
0.007076263427734375,
0.00896453857421875,
-0.0238800048828125,
0.035980224609375,
-0.003887176513671875,
0.0277862548828125,
-0.00799560546875,
0.0126495361328125,
0.0197296142578125,
-0.01071929931640625,
0.006069183349609375,
0.040435791015625,
-0.0171966552734375,
0.035125732421875,
0.0311279296875,
0.03094482421875,
-0.0338134765625,
-0.0071868896484375,
0.03875732421875,
0.0465087890625,
-0.036956787109375,
-0.052520751953125,
0.01093292236328125,
0.003849029541015625,
-0.0171661376953125,
0.0009274482727050781,
-0.01605224609375,
0.00476837158203125,
0.053741455078125,
-0.054931640625,
0.013275146484375,
0.0100860595703125,
0.037811279296875,
-0.0203094482421875,
-0.0072479248046875,
-0.03826904296875,
-0.003662109375,
-0.01152801513671875,
-0.0225677490234375,
-0.0012769699096679688,
0.043426513671875,
0.0308685302734375,
0.039093017578125,
-0.01009368896484375,
-0.0117034912109375,
0.0016422271728515625,
0.0288543701171875,
-0.004364013671875,
0.00901031494140625,
-0.0254974365234375,
-0.0687255859375,
0.01342010498046875,
0.033538818359375,
0.0085601806640625,
0.017913818359375,
0.040496826171875,
0.036285400390625,
-0.0155487060546875,
-0.00775146484375,
0.0406494140625,
-0.0184783935546875,
0.004062652587890625,
-0.03497314453125,
0.0291900634765625,
0.0214385986328125,
-0.005123138427734375,
-0.0023059844970703125,
-0.01488494873046875,
0.06695556640625,
0.0018033981323242188,
0.0303802490234375,
0.006805419921875,
-0.0112762451171875,
0.05133056640625,
0.0224151611328125,
0.06182861328125,
0.042449951171875,
-0.0645751953125,
-0.01280975341796875,
-0.035858154296875,
-0.056427001953125,
0.029632568359375,
0.057861328125,
-0.01033782958984375,
-0.01200103759765625,
0.0071868896484375,
0.0016841888427734375,
-0.0012140274047851562,
-0.0013437271118164062,
0.0015077590942382812,
0.00759124755859375,
0.0288848876953125,
0.0095977783203125,
-0.08612060546875,
-0.054962158203125,
-0.0239715576171875,
0.029205322265625,
0.01180267333984375,
0.0537109375,
0.006046295166015625,
0.019012451171875,
-0.00986480712890625,
0.0152587890625,
-0.00923919677734375,
-0.0137176513671875,
0.043975830078125,
0.0280609130859375,
0.021087646484375,
-0.0258636474609375,
0.0072021484375,
0.01488494873046875,
0.026092529296875,
-0.0548095703125,
-0.0185699462890625,
-0.0016412734985351562,
0.013519287109375,
-0.0081939697265625,
0.007633209228515625,
-0.0175933837890625,
0.0177154541015625,
-0.0015478134155273438,
-0.035369873046875,
0.04052734375,
0.007602691650390625,
0.010162353515625,
0.021820068359375,
-0.0086822509765625,
0.023406982421875,
0.0116119384765625,
0.01216888427734375,
0.0017061233520507812,
0.017059326171875,
-0.060791015625,
-0.048675537109375,
0.039398193359375,
0.0018634796142578125,
0.0121002197265625,
0.02337646484375,
0.044952392578125,
0.049774169921875,
-0.0176544189453125,
-0.006435394287109375,
-0.01561737060546875,
0.014495849609375,
-0.0261077880859375,
-0.01016998291015625,
-0.01250457763671875,
-0.0046844482421875,
-0.00791168212890625,
0.056610107421875,
-0.03399658203125,
-0.0214691162109375,
0.0160369873046875,
0.01995849609375,
0.01018524169921875,
-0.006298065185546875,
-0.07318115234375,
-0.0098114013671875,
0.038818359375,
0.01451873779296875,
-0.06365966796875,
0.0124053955078125,
0.0009541511535644531,
0.04425048828125,
0.0025081634521484375,
-0.04986572265625,
0.030242919921875,
0.040771484375,
-0.033843994140625,
0.0181732177734375,
-0.021881103515625,
-0.0472412109375,
0.0034637451171875,
0.0298309326171875,
0.05548095703125,
-0.045684814453125,
0.004398345947265625,
0.0487060546875,
0.046173095703125,
0.088134765625,
0.007289886474609375,
-0.0198211669921875,
0.018707275390625,
-0.010528564453125,
-0.0018529891967773438,
-0.02862548828125,
0.004245758056640625,
-0.041107177734375,
-0.0150909423828125,
-0.0202178955078125,
0.026885986328125,
0.0400390625,
-0.0238189697265625,
-0.061126708984375,
0.07049560546875,
-0.01560211181640625,
-0.0233917236328125,
-0.060699462890625,
0.0202789306640625,
-0.01104736328125,
0.036041259765625,
-0.010345458984375,
-0.006877899169921875,
0.004730224609375,
0.047454833984375,
-0.01526641845703125,
0.06195068359375,
0.014739990234375,
-0.013641357421875,
-0.006099700927734375,
-0.00788116455078125,
-0.0081939697265625,
0.0028896331787109375,
0.0273895263671875,
-0.0537109375,
0.046356201171875,
0.0295562744140625,
-0.061187744140625,
-0.0616455078125,
-0.01493072509765625,
0.028961181640625,
0.0010662078857421875,
-0.0645751953125,
-0.035064697265625,
-0.04876708984375,
0.034515380859375,
0.032501220703125,
0.01256561279296875,
0.0022983551025390625,
-0.00482177734375,
-0.052886962890625,
-0.0401611328125,
-0.0027561187744140625,
0.01163482666015625,
-0.032318115234375,
0.0237579345703125,
-0.00007700920104980469,
-0.02227783203125,
-0.0165863037109375,
0.032928466796875,
-0.01134490966796875,
0.00867462158203125,
0.060638427734375,
-0.01306915283203125,
-0.03411865234375,
0.0458984375,
0.019378662109375,
-0.0301361083984375,
0.0001817941665649414,
-0.0018253326416015625,
-0.0160064697265625,
0.00545501708984375,
-0.00489044189453125,
-0.02276611328125,
0.01273345947265625,
-0.02337646484375,
0.015472412109375,
-0.0135650634765625,
0.0712890625,
-0.035186767578125,
0.00992584228515625,
-0.0198211669921875,
0.027557373046875,
0.00782012939453125,
0.024993896484375,
-0.038848876953125,
0.08013916015625,
0.0255279541015625,
0.03619384765625,
0.00159454345703125,
0.0218048095703125,
-0.01030731201171875,
0.043548583984375,
0.005527496337890625,
-0.0282440185546875,
0.0289764404296875,
-0.0260009765625,
0.002582550048828125,
-0.02276611328125,
-0.041290283203125,
-0.0391845703125,
0.020355224609375,
0.0150909423828125,
-0.033233642578125,
0.03289794921875
] |
323f62e18860c92d6da505c07b5a784c5b199cdd
|
Wordpress Stackexchange
Q: TinyMCE Button to Insert Multiple Lines of Text? Is there a way to get my custom TinyMCE button to insert multiple lines of text? Ultimately I am making a "Premade Themes" button where a user will select a theme and it will insert about 6-8 different shortcodes with one click and they can edit the shortcodes accordingly..
A problem I'm having is that all of these shortcodes get put in one line. Here's the code I use that actually pastes the shortcodes:
tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : 'the shortcodes go here'});
Any help is appreciated!
A: This should be as easy as adding <br /> between shortcodes or every time you want to add a new line and also if you are inserting content you should use mceInsertContent instead of mceInsertClipboardContent unless you are actually getting the content from the clipbard, so:
tinyMCEPopup.editor.execCommand('mceInsertContent', false, '<p>[shotcode1]<br/>[shotcode2]<br/>[shotcode3]</p>'));
|
Q: TinyMCE Button to Insert Multiple Lines of Text? Is there a way to get my custom TinyMCE button to insert multiple lines of text? Ultimately I am making a "Premade Themes" button where a user will select a theme and it will insert about 6-8 different shortcodes with one click and they can edit the shortcodes accordingly..
A problem I'm having is that all of these shortcodes get put in one line. Here's the code I use that actually pastes the shortcodes:
tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : 'the shortcodes go here'});
Any help is appreciated!
A: This should be as easy as adding <br /> between shortcodes or every time you want to add a new line and also if you are inserting content you should use mceInsertContent instead of mceInsertClipboardContent unless you are actually getting the content from the clipbard, so:
tinyMCEPopup.editor.execCommand('mceInsertContent', false, '<p>[shotcode1]<br/>[shotcode2]<br/>[shotcode3]</p>'));
|
wordpress
|
{
"language": "en",
"length": 145,
"provenance": "stackexchange_00019.jsonl.gz:408010",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12859"
}
|
[
0.0007638931274414062,
-0.0186309814453125,
0.01361846923828125,
-0.0082855224609375,
-0.0227813720703125,
0.0076141357421875,
0.0295867919921875,
0.0050506591796875,
-0.0188446044921875,
0.0316162109375,
0.0186004638671875,
-0.00118255615234375,
-0.032989501953125,
-0.0307769775390625,
-0.0052947998046875,
-0.03424072265625,
0.0177459716796875,
-0.005573272705078125,
0.00806427001953125,
-0.015899658203125,
-0.01091766357421875,
-0.0018301010131835938,
-0.00846099853515625,
0.038726806640625,
-0.01073455810546875,
0.023406982421875,
0.0860595703125,
-0.011566162109375,
-0.0234832763671875,
-0.0341796875,
0.004398345947265625,
0.012969970703125,
0.040740966796875,
0.0479736328125,
-0.07843017578125,
0.046051025390625,
-0.04376220703125,
0.0269927978515625,
-0.0031414031982421875,
0.01187896728515625,
-0.0015583038330078125,
-0.007411956787109375,
0.0159454345703125,
0.037628173828125,
-0.0183868408203125,
-0.0297393798828125,
-0.0013399124145507812,
-0.0638427734375,
-0.00853729248046875,
0.0106658935546875,
-0.0002682209014892578,
0.0027561187744140625,
0.0193023681640625,
-0.0066375732421875,
-0.00322723388671875,
0.0224151611328125,
-0.0310211181640625,
-0.037841796875,
0.00777435302734375,
0.039215087890625,
0.0303192138671875,
-0.0068511962890625,
0.0015687942504882812,
-0.01611328125,
-0.007328033447265625,
-0.0263671875,
-0.043792724609375,
0.01001739501953125,
0.00275421142578125,
-0.0017957687377929688,
0.0142822265625,
-0.0234527587890625,
0.0267181396484375,
-0.04931640625,
-0.0004963874816894531,
0.04010009765625,
-0.050567626953125,
-0.011444091796875,
0.038909912109375,
-0.040069580078125,
-0.0009255409240722656,
-0.035736083984375,
-0.0271148681640625,
-0.029205322265625,
-0.004459381103515625,
-0.0184478759765625,
-0.004177093505859375,
0.0216522216796875,
-0.032501220703125,
-0.0248870849609375,
-0.02972412109375,
-0.044921875,
-0.028076171875,
0.039154052734375,
-0.0024356842041015625,
0.0055389404296875,
-0.0281219482421875,
-0.014434814453125,
-0.0031452178955078125,
0.04815673828125,
0.01441192626953125,
-0.0362548828125,
0.08612060546875,
-0.042816162109375,
0.024627685546875,
-0.025909423828125,
-0.0116119384765625,
-0.0142059326171875,
0.04644775390625,
0.0255889892578125,
-0.037200927734375,
0.044830322265625,
0.007358551025390625,
-0.008819580078125,
-0.0257568359375,
-0.014862060546875,
-0.0299072265625,
0.0193023681640625,
-0.0028514862060546875,
0.00443267822265625,
-0.0205230712890625,
-0.0022792816162109375,
-0.03363037109375,
0.023345947265625,
-0.031341552734375,
-0.0408935546875,
0.007457733154296875,
0.0230865478515625,
0.0237274169921875,
-0.023681640625,
-0.0251617431640625,
0.01551055908203125,
0.04925537109375,
0.057373046875,
0.0257415771484375,
0.005863189697265625,
0.02105712890625,
-0.0029582977294921875,
-0.010772705078125,
0.00989532470703125,
-0.002475738525390625,
-0.049072265625,
-0.042022705078125,
-0.019287109375,
-0.023956298828125,
0.033843994140625,
0.01560211181640625,
0.01641845703125,
-0.00284576416015625,
-0.08642578125,
0.024261474609375,
-0.003810882568359375,
0.043060302734375,
-0.006618499755859375,
-0.0230712890625,
-0.07073974609375,
0.0175018310546875,
-0.045379638671875,
0.036895751953125,
-0.0458984375,
-0.0195465087890625,
-0.002964019775390625,
0.0439453125,
-0.07879638671875,
-0.06024169921875,
-0.00882720947265625,
-0.06915283203125,
0.00006455183029174805,
0.0270233154296875,
0.0298309326171875,
-0.04034423828125,
0.0197601318359375,
0.04132080078125,
0.0094757080078125,
-0.0108184814453125,
0.00806427001953125,
0.0198822021484375,
-0.0036773681640625,
0.032318115234375,
-0.0074920654296875,
-0.00624847412109375,
-0.0236663818359375,
0.07183837890625,
-0.005401611328125,
-0.0538330078125,
0.06256103515625,
0.0041046142578125,
0.134033203125,
0.01507568359375,
0.03778076171875,
-0.0283355712890625,
-0.0160369873046875,
0.043975830078125,
-0.037322998046875,
0.005279541015625,
-0.035369873046875,
-0.052093505859375,
-0.0188140869140625,
-0.0144500732421875,
0.0199127197265625,
0.0056304931640625,
-0.0263214111328125,
0.04351806640625,
0.01580810546875,
0.01312255859375,
0.0142059326171875,
-0.0026569366455078125,
0.0099945068359375,
0.02886962890625,
-0.0200958251953125,
-0.01849365234375,
-0.02032470703125,
0.0299835205078125,
-0.05303955078125,
-0.044952392578125,
0.032806396484375,
0.00701904296875,
0.032135009765625,
0.01580810546875,
0.005290985107421875,
0.05914306640625,
0.0006909370422363281,
0.065673828125,
0.034820556640625,
0.0208587646484375,
-0.059600830078125,
-0.010894775390625,
-0.04510498046875,
-0.01904296875,
-0.0291900634765625,
-0.029205322265625,
0.06817626953125,
0.045654296875,
0.0252685546875,
-0.038848876953125,
-0.005573272705078125,
-0.01036834716796875,
-0.0270233154296875,
-0.0052642822265625,
0.04473876953125,
0.0234527587890625,
0.058013916015625,
0.011993408203125,
0.01560211181640625,
0.00765228271484375,
-0.03900146484375,
0.020660400390625,
-0.0200042724609375,
-0.0002123117446899414,
0.042877197265625,
0.02203369140625,
0.00705718994140625,
0.0083160400390625,
-0.06121826171875,
0.020660400390625,
0.037017822265625,
-0.01125335693359375,
0.03436279296875,
-0.007717132568359375,
-0.005977630615234375,
0.0021533966064453125,
-0.00272369384765625,
0.012603759765625,
-0.0340576171875,
0.0218658447265625,
0.0238800048828125,
0.0210418701171875,
0.035247802734375,
-0.0291290283203125,
0.005985260009765625,
-0.0007891654968261719,
0.007541656494140625,
-0.01015472412109375,
-0.008575439453125,
-0.006824493408203125,
-0.00927734375,
-0.0172576904296875,
0.0260009765625,
-0.00199127197265625,
-0.022125244140625,
-0.0260009765625,
-0.005771636962890625,
-0.004886627197265625,
-0.016876220703125,
0.0212860107421875,
-0.007366180419921875,
0.0120697021484375,
-0.033966064453125,
0.022186279296875,
0.00624847412109375,
0.01490020751953125,
0.046417236328125,
-0.0087127685546875,
0.043304443359375,
-0.0157012939453125,
0.0007205009460449219,
0.04547119140625,
-0.019317626953125,
0.056121826171875,
-0.01140594482421875,
0.041473388671875,
0.059906005859375,
-0.04412841796875,
0.030792236328125,
0.00852203369140625,
0.0216827392578125,
-0.02301025390625,
0.043365478515625,
0.0260162353515625,
-0.0222930908203125,
-0.021820068359375,
0.036224365234375,
0.035369873046875,
0.063720703125,
0.0016460418701171875,
-0.0278778076171875,
-0.003284454345703125,
0.04486083984375,
-0.01267242431640625,
-0.0185089111328125,
0.0255126953125,
-0.06292724609375,
0.01922607421875,
-0.0013284683227539062,
-0.048553466796875,
-0.0206451416015625,
0.048797607421875,
-0.000006735324859619141,
-0.0347900390625,
-0.0264129638671875,
0.0301971435546875,
0.00937652587890625,
0.0035266876220703125,
0.047332763671875,
0.013153076171875,
-0.006282806396484375,
0.00383758544921875,
0.0721435546875,
0.0020751953125,
-0.033447265625,
0.01885986328125,
-0.0163421630859375,
-0.029449462890625,
0.01537322998046875,
0.0372314453125,
-0.06207275390625,
-0.0018339157104492188,
0.000059545040130615234,
-0.0238037109375,
0.0184478759765625,
0.005680084228515625,
-0.0104217529296875,
-0.008880615234375,
-0.002712249755859375,
0.0249481201171875,
0.0134124755859375,
-0.004108428955078125,
0.0277099609375,
0.04986572265625,
-0.02386474609375,
0.0022945404052734375,
0.02850341796875,
-0.0013017654418945312,
0.0168304443359375,
-0.028411865234375,
-0.0120849609375,
0.0013713836669921875,
0.03997802734375,
-0.00829315185546875,
-0.0035877227783203125,
0.01593017578125,
-0.042022705078125,
0.0179901123046875,
0.0021991729736328125,
0.0034027099609375,
-0.0223541259765625,
-0.0064544677734375,
-0.0247802734375,
0.04193115234375,
-0.0229644775390625,
0.0278472900390625,
-0.01531219482421875,
0.027069091796875,
-0.02374267578125,
-0.00962066650390625,
0.016815185546875,
-0.021942138671875,
0.047637939453125,
-0.03607177734375,
-0.0283966064453125,
-0.033477783203125,
0.06396484375,
-0.055694580078125,
-0.0100555419921875,
0.004329681396484375,
0.01274871826171875,
0.00238037109375,
-0.024993896484375,
-0.047088623046875,
-0.02593994140625,
-0.0171661376953125,
0.0172576904296875,
-0.026123046875,
0.0095672607421875,
-0.0267486572265625,
0.0035305023193359375,
0.01776123046875,
-0.0255126953125,
0.05023193359375,
-0.0203704833984375,
0.03497314453125,
-0.004032135009765625,
0.0190582275390625,
-0.0266876220703125,
-0.0266571044921875,
-0.03192138671875,
-0.0626220703125,
-0.00716400146484375,
-0.0227508544921875,
0.04150390625,
0.021820068359375,
-0.04852294921875,
-0.0197296142578125,
0.036773681640625,
-0.0173187255859375,
0.0609130859375,
-0.001987457275390625,
0.04217529296875,
0.008148193359375,
-0.0301361083984375,
0.0069732666015625,
-0.03509521484375,
-0.015380859375,
0.022674560546875,
0.032684326171875,
0.055755615234375,
-0.0300750732421875,
-0.05792236328125,
0.01026153564453125,
-0.03302001953125,
-0.0501708984375,
-0.04217529296875,
0.0022411346435546875,
0.006816864013671875,
0.0189971923828125,
-0.0157470703125,
-0.0386962890625,
-0.03607177734375,
-0.004856109619140625,
-0.02716064453125,
0.0126495361328125,
0.02032470703125,
0.07257080078125,
0.0255279541015625,
0.00965118408203125,
-0.0308837890625,
0.02545166015625,
0.038848876953125,
0.0215606689453125,
-0.021148681640625,
-0.006328582763671875,
-0.02734375,
-0.03564453125,
0.0116729736328125,
0.0193939208984375,
-0.0242462158203125,
0.045562744140625,
-0.0089569091796875,
0.014007568359375,
0.01410675048828125,
0.001708984375,
0.00872802734375,
-0.014862060546875,
-0.028167724609375,
0.004756927490234375,
-0.00928497314453125,
0.043975830078125,
0.0109100341796875,
0.005840301513671875,
-0.0272064208984375,
-0.036834716796875,
0.0033473968505859375,
0.0001926422119140625,
0.01073455810546875,
0.014923095703125,
-0.0030994415283203125,
-0.00794219970703125,
-0.0007815361022949219,
-0.0267181396484375,
0.050323486328125,
0.017364501953125,
0.052398681640625,
0.029296875,
0.01251983642578125,
-0.02178955078125,
-0.00414276123046875,
-0.00830841064453125,
-0.006046295166015625,
0.0153961181640625,
-0.02752685546875,
-0.0265655517578125,
0.005733489990234375,
0.056304931640625,
-0.01200103759765625,
0.033294677734375,
-0.007503509521484375,
0.029693603515625,
0.021148681640625,
0.031463623046875,
0.07135009765625,
0.0090484619140625,
0.016357421875,
-0.0799560546875,
-0.0176849365234375,
-0.031951904296875,
0.0160980224609375,
-0.0214385986328125,
-0.03765869140625,
0.0017709732055664062,
0.00905609130859375,
0.056304931640625,
0.05010986328125,
0.01335906982421875,
0.01496124267578125,
0.0295257568359375,
-0.025909423828125,
0.00032067298889160156,
-0.054290771484375,
0.0165252685546875,
0.037628173828125,
0.032257080078125,
0.015472412109375,
0.009002685546875,
-0.020965576171875,
-0.007091522216796875,
-0.07598876953125,
-0.019622802734375,
-0.021728515625,
-0.0262603759765625,
-0.0159912109375,
-0.0225372314453125,
-0.0052642822265625,
0.0018091201782226562,
0.01485443115234375,
0.01953125,
-0.0132598876953125,
-0.029083251953125,
-0.03253173828125,
-0.01433563232421875,
-0.0036830902099609375,
-0.061981201171875,
-0.041351318359375,
-0.00914764404296875,
0.01262664794921875,
-0.0189971923828125,
-0.05731201171875,
-0.049591064453125,
0.006290435791015625,
-0.0128936767578125,
0.0183868408203125,
-0.01343536376953125,
-0.0171966552734375,
-0.03216552734375,
0.03741455078125,
-0.05487060546875,
0.0047149658203125,
0.02532958984375,
0.002429962158203125,
0.0032329559326171875,
-0.0137939453125,
-0.034210205078125,
-0.0226593017578125,
0.0146026611328125,
-0.01873779296875,
-0.0232391357421875,
-0.01580810546875,
0.032806396484375,
0.03839111328125,
0.0035266876220703125,
-0.044677734375,
0.0073089599609375,
0.0037441253662109375,
0.00341796875,
0.0250091552734375,
0.005962371826171875,
-0.00865936279296875,
0.0194244384765625,
0.02374267578125,
0.01727294921875,
0.004352569580078125,
0.033447265625,
-0.050537109375,
0.0460205078125,
0.0135345458984375,
-0.0164337158203125,
-0.0191192626953125,
-0.00039196014404296875,
-0.07098388671875,
-0.022247314453125,
-0.01666259765625,
0.01543426513671875,
0.0055084228515625,
-0.00104522705078125,
-0.0185089111328125,
0.00927734375,
0.01267242431640625,
-0.0006885528564453125,
0.01471710205078125,
-0.0267181396484375,
0.0101165771484375,
0.00624847412109375,
0.013275146484375,
0.008819580078125,
-0.02069091796875,
0.01554107666015625,
-0.0205230712890625,
0.013153076171875,
0.006618499755859375,
0.04168701171875,
-0.029541015625,
0.034210205078125,
0.030364990234375,
0.009307861328125,
0.044219970703125,
-0.00567626953125,
-0.00337982177734375,
0.0256805419921875,
0.0115966796875,
-0.0271759033203125,
-0.017578125,
-0.02374267578125,
-0.0128631591796875,
0.0280609130859375,
0.03192138671875,
0.07550048828125,
-0.05877685546875,
0.0169677734375,
0.0252685546875,
-0.01180267333984375,
0.036956787109375,
0.00434112548828125,
0.0188751220703125,
-0.01026153564453125,
0.074462890625,
0.006328582763671875,
0.01593017578125,
0.0517578125,
-0.009521484375,
-0.028961181640625,
-0.0193634033203125,
-0.0223236083984375,
0.00838470458984375,
0.01010894775390625,
0.0223388671875,
0.032928466796875,
0.0164031982421875,
0.00450897216796875,
0.002773284912109375,
0.0027027130126953125,
-0.0265045166015625,
-0.039764404296875,
0.007755279541015625,
-0.01983642578125,
-0.02978515625,
-0.0075836181640625,
-0.0070343017578125,
0.004425048828125,
0.058502197265625,
-0.0548095703125,
0.062469482421875,
0.033782958984375,
-0.031982421875,
0.0270538330078125,
0.002246856689453125,
-0.0072784423828125,
0.004180908203125,
-0.0273895263671875,
0.007678985595703125,
-0.032623291015625,
0.036712646484375,
0.0056610107421875,
0.00536346435546875,
0.040985107421875,
-0.00872039794921875,
-0.016143798828125,
0.046875,
-0.0333251953125,
-0.01168060302734375,
-0.04364013671875,
-0.00035572052001953125,
-0.04315185546875,
0.007251739501953125,
-0.0472412109375,
-0.020050048828125,
0.01019287109375,
-0.07916259765625,
-0.09710693359375,
0.151123046875,
0.01166534423828125,
0.04901123046875,
-0.0198516845703125,
0.050872802734375,
-0.019439697265625,
0.037078857421875,
0.004024505615234375,
0.0196380615234375,
-0.01384735107421875,
-0.0201568603515625,
-0.007572174072265625,
-0.0074462890625,
0.006206512451171875,
0.049072265625,
0.0033206939697265625,
-0.007049560546875,
-0.007843017578125,
0.034515380859375,
0.08453369140625,
0.05316162109375,
0.032012939453125,
-0.0033473968505859375,
-0.0090484619140625,
-0.04132080078125,
0.0135955810546875,
0.0026569366455078125,
0.0185089111328125,
0.0019159317016601562,
-0.0189208984375,
0.0147857666015625,
-0.001495361328125,
-0.01506805419921875,
0.022674560546875,
-0.046783447265625,
0.031402587890625,
0.0031375885009765625,
-0.040618896484375,
-0.026336669921875,
-0.04205322265625,
0.056610107421875,
-0.0203094482421875,
0.002918243408203125,
-0.01751708984375,
-0.038055419921875,
0.0298614501953125,
-0.0190277099609375,
0.05517578125,
0.005573272705078125,
0.0034656524658203125,
0.0604248046875,
-0.0254974365234375,
0.0178985595703125,
0.0019550323486328125,
-0.0300750732421875,
-0.015350341796875,
-0.0210113525390625,
-0.0000870823860168457,
-0.0650634765625,
-0.022491455078125,
0.061614990234375,
0.007556915283203125,
-0.01274871826171875,
-0.0096435546875,
0.01146697998046875,
0.0082550048828125,
-0.01806640625,
-0.039154052734375,
-0.02410888671875,
-0.022247314453125,
0.020050048828125,
0.03997802734375,
-0.03778076171875,
-0.0206146240234375,
0.0298004150390625,
0.01351165771484375,
0.0291900634765625,
0.0084228515625,
-0.05914306640625,
-0.061187744140625,
0.0095672607421875,
-0.00988006591796875,
0.06317138671875,
0.04193115234375,
0.043487548828125,
-0.0274810791015625,
-0.046173095703125,
0.00644683837890625,
0.0213623046875,
0.0131683349609375,
-0.025299072265625,
0.02166748046875,
-0.050201416015625,
0.02667236328125,
0.01177978515625,
0.023712158203125,
0.07843017578125,
0.052703857421875,
0.028167724609375,
0.0219268798828125,
0.014373779296875,
0.03546142578125,
-0.0154266357421875,
-0.054779052734375,
-0.03985595703125,
-0.04937744140625,
0.0134124755859375,
-0.0089111328125,
0.03057861328125,
-0.015289306640625,
0.01318359375,
0.0120849609375,
0.0115203857421875,
-0.0010137557983398438,
-0.015411376953125,
-0.0019092559814453125,
-0.032440185546875,
0.0164337158203125,
0.0133514404296875,
-0.03125,
0.001438140869140625,
-0.0072174072265625,
-0.05859375,
0.01727294921875,
0.04644775390625,
-0.01117706298828125,
-0.0010395050048828125,
-0.0009407997131347656,
-0.0027027130126953125,
0.00884246826171875,
-0.0167388916015625,
0.0095977783203125,
0.0024127960205078125,
0.01041412353515625,
-0.005420684814453125,
-0.05859375,
-0.0217742919921875,
0.01041412353515625,
0.00687408447265625,
0.00496673583984375,
-0.0023555755615234375,
0.035308837890625,
0.016754150390625,
0.00788116455078125,
-0.0127716064453125,
0.0115509033203125,
-0.00446319580078125,
0.002223968505859375,
0.01312255859375,
0.0180816650390625,
-0.0110931396484375,
0.0076141357421875,
0.052581787109375,
0.035552978515625,
-0.01020050048828125,
0.0193939208984375,
0.02020263671875,
0.0053558349609375,
-0.0157623291015625,
0.05389404296875,
-0.01044464111328125,
-0.0275726318359375,
-0.036834716796875,
-0.01262664794921875,
0.033782958984375,
0.0455322265625,
0.006832122802734375,
0.0176849365234375,
0.052154541015625,
-0.0013408660888671875,
0.04681396484375,
-0.022125244140625,
0.058135986328125,
0.02825927734375,
0.01546478271484375,
-0.025054931640625,
0.012725830078125,
-0.02032470703125,
-0.003570556640625,
0.01248931884765625,
-0.003246307373046875,
0.029266357421875,
-0.05511474609375,
0.05126953125,
0.0494384765625,
0.082275390625,
0.0043487548828125,
0.031219482421875,
0.02777099609375,
0.015655517578125,
0.023895263671875,
0.03924560546875,
-0.0165252685546875,
-0.00807952880859375,
0.0089111328125,
0.0177001953125,
0.0021648406982421875,
0.03521728515625,
-0.0906982421875,
-0.0273895263671875,
0.0116119384765625,
0.018707275390625,
-0.060943603515625,
0.0282135009765625,
0.0254058837890625,
-0.027252197265625,
-0.0116119384765625,
0.01035308837890625,
-0.00913238525390625,
-0.015777587890625,
-0.02325439453125,
-0.0634765625,
-0.055938720703125,
0.08837890625,
-0.037261962890625,
0.00872802734375,
0.0242767333984375,
0.0005421638488769531,
0.006053924560546875,
-0.002147674560546875,
0.016845703125,
0.046417236328125,
0.0013332366943359375,
0.0003998279571533203,
0.08331298828125,
-0.020599365234375,
-0.031219482421875,
-0.087158203125,
-0.0244140625,
-0.022491455078125,
0.031280517578125,
-0.028594970703125,
0.00450897216796875,
0.004459381103515625,
-0.056549072265625,
-0.07891845703125,
0.0241241455078125,
-0.004085540771484375,
-0.042205810546875,
-0.0021686553955078125,
-0.0099334716796875,
-0.01451873779296875,
-0.04486083984375,
-0.02197265625,
0.0158538818359375,
0.019012451171875,
0.034942626953125,
0.00553131103515625,
0.0341796875,
0.00447845458984375,
0.009552001953125,
-0.028228759765625,
-0.0008473396301269531,
-0.0182342529296875,
0.00722503662109375,
0.052825927734375,
-0.0277557373046875,
0.043853759765625,
0.053314208984375,
-0.03564453125,
-0.053802490234375,
-0.027740478515625,
-0.06524658203125,
-0.0172271728515625,
-0.037445068359375,
-0.036651611328125,
0.00428009033203125,
0.09173583984375,
0.05072021484375,
0.03594970703125,
-0.055328369140625,
0.037933349609375,
0.0266571044921875,
0.0029544830322265625,
0.00926971435546875,
-0.008148193359375,
-0.0234222412109375,
-0.0222320556640625,
-0.001903533935546875,
-0.0308380126953125,
-0.006011962890625,
0.008819580078125,
-0.0521240234375,
0.02606201171875,
0.023345947265625,
0.0028972625732421875,
-0.057098388671875,
-0.00988006591796875,
0.0845947265625,
-0.039764404296875,
-0.0004801750183105469,
-0.0021076202392578125,
0.01910400390625,
0.035430908203125,
0.010101318359375,
-0.01160430908203125,
0.01080322265625,
-0.0770263671875,
0.0251312255859375,
-0.0211944580078125,
0.05950927734375,
-0.073486328125,
0.017547607421875,
0.027679443359375,
0.01290130615234375,
-0.0204315185546875,
0.0035037994384765625,
0.00766754150390625,
0.008697509765625,
-0.054443359375,
0.053497314453125,
-0.054351806640625,
0.04461669921875,
-0.050811767578125,
0.029815673828125,
-0.006069183349609375,
0.0518798828125,
0.02593994140625,
0.01099395751953125,
0.0231170654296875,
0.0296783447265625,
0.002506256103515625,
0.00820159912109375,
-0.02093505859375,
0.076171875,
0.004924774169921875,
-0.00846099853515625
] |
c1b2cd0fcd088d632cca63a9d66daa5427d5c40e
|
Wordpress Stackexchange
Q: Check if wp-login is current page How can I check if the current page is wp-login.php or wp-signup.php ?
Are there more elegant solutions than using $_SERVER['REQUEST_URI'] ?
A: Use the global $pagenow, which is a common global set by WordPress at runtime:
if ( $GLOBALS['pagenow'] === 'wp-login.php' ) {
// We're on the login page!
}
You can also check the type of login page, for example registration:
if ( $GLOBALS['pagenow'] === 'wp-login.php' && ! empty( $_REQUEST['action'] ) && $_REQUEST['action'] === 'register' ) {
// We're registering
}
Following code is considered legacy and should not be used (wp-register.php was deprecated & subsequently removed quite a while back):
if ( in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) ) )
run_my_funky_plugin();
|
Q: Check if wp-login is current page How can I check if the current page is wp-login.php or wp-signup.php ?
Are there more elegant solutions than using $_SERVER['REQUEST_URI'] ?
A: Use the global $pagenow, which is a common global set by WordPress at runtime:
if ( $GLOBALS['pagenow'] === 'wp-login.php' ) {
// We're on the login page!
}
You can also check the type of login page, for example registration:
if ( $GLOBALS['pagenow'] === 'wp-login.php' && ! empty( $_REQUEST['action'] ) && $_REQUEST['action'] === 'register' ) {
// We're registering
}
Following code is considered legacy and should not be used (wp-register.php was deprecated & subsequently removed quite a while back):
if ( in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) ) )
run_my_funky_plugin();
A: More modern way to do that, it should work even when the wp-login URL is changed by plugins and when WP is in a subfolder, etc:
if(stripos($_SERVER["SCRIPT_NAME"], strrchr(wp_login_url(), '/')) !== false){
/* ... */
}
A: There is a new function introduced in WordPress 6.1.0 which is is_login() which does just that.
https://developer.wordpress.org/reference/functions/is_login/
A: My preferred way:
if( is_wplogin() ){
...
}
code:
function is_wplogin(){
$ABSPATH_MY = str_replace(array('\\','/'), DIRECTORY_SEPARATOR, ABSPATH);
return ((in_array($ABSPATH_MY.'wp-login.php', get_included_files()) || in_array($ABSPATH_MY.'wp-register.php', get_included_files()) ) || (isset($_GLOBALS['pagenow']) && $GLOBALS['pagenow'] === 'wp-login.php') || $_SERVER['PHP_SELF']== '/wp-login.php');
}
Why it's safest?
*
*Sometimes, if you try to check login page using REQUEST_URI(or SCRIPT_PATH), you will get INCORRECT VALUES, because many plugins change LOGIN & ADMIN urls.
2) $pagenow will give you incorrect value too in that case!
Notes:
*
*In some cases, it might not work if you output login-form (i.e. with shortcode or etc) manually on other template files/pages.
Core Update:
Since WordPress Version 6.1 (Nov 2022) is an additional function inside the core - is_login that check the wp_login_url.
A: $GLOBALS['pagenow'] doesn't work, use $_SERVER['PHP_SELF'].
if ( in_array( $_SERVER['PHP_SELF'], array( '/wp-login.php', '/wp-register.php' ) ) ){
// do something.
}
and if your wordpress is not installed in the web root folder, you should use some params like YOUR_WP_PATH/wp-login.php to replace the elements in array.
A: Here's a more readable version of @T.Todua answer. I just formatted it nicely, made the cheapest checks first and returned early:
function isLoginPage()
{
// $_SERVER['PHP_SELF'] is equal to "/wp-login.php"?
if ($_SERVER['PHP_SELF'] == '/wp-login.php') {
return true;
}
// $GLOBALS['pagenow'] is equal to "wp-login.php"?
if (isset($GLOBALS['pagenow']) && $GLOBALS['pagenow'] === 'wp-login.php') {
return true;
}
$ABSPATH_MY = str_replace(array('\\', '/'), DIRECTORY_SEPARATOR, ABSPATH);
// Was wp-login.php or wp-register.php included during this execution?
if (
in_array($ABSPATH_MY . 'wp-login.php', get_included_files()) ||
in_array($ABSPATH_MY . 'wp-register.php', get_included_files())
) {
return true;
}
return false;
}
If you want the least performance impact, leave only the first two checks.
Also, if you are running this check after the template has loaded, you can simply use:
function isLogin() {
if (!did_action('wp_loaded')) {
return null;
}
return did_action('login_head');
}
A: I have implemented it using WordPress own wp_login_url() method as follows:
public static function is_wp_login() {
$login_path = rtrim( strtolower( parse_url( wp_login_url( '', true ), PHP_URL_PATH ) ), '/' );
return ( rtrim( strtolower( $_SERVER[ 'REQUEST_URI' ] ), '/' ) == $login_path );
}
Just comparing both paths (because it's difficult to be absolutely sure about the use of SSL as it may be terminated) should be enough ... It does mean, however, that a plugin or theme developer who changes the default login form must have done so the proper way ...
A: None of the current answers worked for me.
What I've done was check if $_GET array has a 'page' key and if its value is 'sign-in'.
if (isset($_GET['page']) && $_GET['page'] == 'sign-in'){
// you're on login page
}
A: If you need to add some code for login page, you can use a hook for it
<?php add_action( 'login_head', 'login_head_add_css' );
function login_head_add_css() {
?>
<style>
body {
background-image: url('/background.png');
}
.login h1 a{
background-image: url('/logo.png');
background-size: 300px !important;
background-position: center top;
background-repeat: no-repeat;
color: #444;
height: 120px;
font-size: 20px;
font-weight: 400;
line-height: 1.3;
margin: 0 auto 25px;
padding: 0;
text-decoration: none;
width: 300px !important;
text-indent: -9999px;
outline: 0;
overflow: hidden;
display: block;
}
</style>
<?php
} ?>
A: This file has so many action hooks. Thanks WordPress devs!
Here's a listing of the most common ones to get you started in the order they execute.
*
*login_enqueue_scripts
*login_head
*login_header
*login_init
*login_form_{$action}
*
*confirm_admin_email
*postpass
*logout
*lostpassword
*retrievepassword
*resetpass
*rp
*register
*login
*confirmaction
*login_form
*login_footer
A: An alternative method:
/**
* Determines whether current page is login page.
* @return bool True if current page is login page.
*/
final public static function isLoginPage(): bool
{
return function_exists('login_header');
}
Function login_header is defined in file wp-login.php. We are assuming, that login page is not included as this is separate WP page, which shall be called directly. Probably one of the most bulletproof solutions.
A: I am only interested in register page, not in login page. So this might not be wanted by everybody.
$GLOBALS['pagenow'] returns index.php for me. Maybe because of buddypress or my theme.
So I used
is_page('register')
If you inspect the body of the registration page, it also has the ID as well, so if it says page-id-4906, you can use it this way if it works better:
is_page('4906')
A: This is my preferred method, it will handle any slug you decide to use for the login page. It also handles custom login forms if you decide not to use the default WordPress login form since is_login() won't work if you don't include the login script. Uses global $wp instead of the $_SERVER array.
global $wp;
if( trailingslashit( trailingslashit( site_url() ) . $wp->request ) !== wp_login_url() ) {
// You are on the login page
}
A: Always a good idea to use WP native function is_login(). This is introduced since 6.1.
Here is the details
A: OK, I'm changing my answer to accommodate an alternate solution on detecting wp-login part of a url, that comes really handy if your theme uses a custom login page template or you have the login page modified by a plugin... A few solutions proposed here worked, so I've came with something that works for me on an ordinary WordPress site (not tested on Multisite).
As simple as:
if( stripos($_SERVER['SCRIPT_NAME'], strrchr( wp_login_url(), '/') ) !== false ) {
...
}
|
wordpress
|
{
"language": "en",
"length": 1040,
"provenance": "stackexchange_00019.jsonl.gz:408012",
"question_score": "55",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12863"
}
|
[
0.019287109375,
0.016265869140625,
-0.044525146484375,
-0.0167083740234375,
0.01629638671875,
-0.04931640625,
0.049530029296875,
0.0055999755859375,
-0.0053558349609375,
-0.004192352294921875,
-0.005054473876953125,
0.031494140625,
-0.04547119140625,
-0.023956298828125,
0.032196044921875,
-0.01020050048828125,
0.01837158203125,
-0.0009832382202148438,
0.03570556640625,
-0.0162200927734375,
0.0012769699096679688,
-0.00884246826171875,
0.036163330078125,
-0.00910186767578125,
0.0046234130859375,
-0.0517578125,
0.10626220703125,
-0.0017375946044921875,
0.02099609375,
-0.0161590576171875,
0.0283203125,
-0.033172607421875,
0.010009765625,
0.0335693359375,
-0.0163116455078125,
-0.04742431640625,
-0.00627899169921875,
0.0195465087890625,
0.032257080078125,
-0.0095367431640625,
0.04510498046875,
-0.029693603515625,
-0.01092529296875,
-0.0292510986328125,
-0.005687713623046875,
-0.01995849609375,
0.0369873046875,
-0.017730712890625,
0.016265869140625,
0.0299530029296875,
-0.0011377334594726562,
0.045745849609375,
0.0042572021484375,
-0.00281524658203125,
-0.0072174072265625,
-0.0107421875,
-0.0372314453125,
0.0186767578125,
0.02545166015625,
0.01385498046875,
-0.0146026611328125,
-0.023223876953125,
0.019622802734375,
-0.0244598388671875,
-0.0239410400390625,
-0.0181121826171875,
-0.044158935546875,
0.0258941650390625,
-0.01534271240234375,
-0.048828125,
0.009552001953125,
-0.0030574798583984375,
0.00748443603515625,
-0.002063751220703125,
-0.0021152496337890625,
-0.031005859375,
0.0028400421142578125,
-0.00911712646484375,
-0.0036220550537109375,
0.039306640625,
-0.048248291015625,
0.0027027130126953125,
-0.059234619140625,
0.0012598037719726562,
0.012969970703125,
0.04864501953125,
-0.033599853515625,
-0.01454925537109375,
-0.0213775634765625,
-0.0170135498046875,
-0.0289306640625,
0.0208740234375,
-0.00360107421875,
-0.03814697265625,
-0.04931640625,
-0.018768310546875,
0.03314208984375,
0.061614990234375,
-0.01531219482421875,
-0.0223846435546875,
-0.015289306640625,
-0.0374755859375,
-0.0252532958984375,
-0.0212554931640625,
0.0193939208984375,
0.104736328125,
0.0056610107421875,
0.0164947509765625,
0.0261077880859375,
-0.0236358642578125,
0.0433349609375,
-0.0160369873046875,
-0.037628173828125,
-0.03558349609375,
-0.01385498046875,
0.05706787109375,
-0.0256805419921875,
-0.013427734375,
0.0031986236572265625,
0.0150604248046875,
-0.027069091796875,
-0.01519012451171875,
0.056396484375,
-0.0218505859375,
0.0297698974609375,
0.00812530517578125,
-0.0307464599609375,
-0.04632568359375,
-0.0245208740234375,
0.03985595703125,
-0.0291748046875,
0.011749267578125,
0.0309906005859375,
-0.01087188720703125,
-0.0244598388671875,
-0.03216552734375,
0.04083251953125,
0.00490570068359375,
0.01262664794921875,
0.007762908935546875,
-0.01316070556640625,
-0.041900634765625,
-0.00716400146484375,
-0.0242767333984375,
0.007137298583984375,
0.0208282470703125,
0.0298309326171875,
0.0201416015625,
-0.019073486328125,
-0.039031982421875,
0.0411376953125,
-0.031036376953125,
-0.0355224609375,
0.021759033203125,
0.07183837890625,
0.0228118896484375,
0.034912109375,
-0.001514434814453125,
0.0023193359375,
0.034698486328125,
0.035797119140625,
-0.018096923828125,
-0.0058746337890625,
-0.0234375,
-0.042449951171875,
0.023101806640625,
-0.06878662109375,
-0.005397796630859375,
0.02294921875,
0.005764007568359375,
0.040283203125,
0.0005621910095214844,
0.0428466796875,
0.008087158203125,
-0.007495880126953125,
-0.01117706298828125,
-0.016357421875,
0.040863037109375,
0.0192108154296875,
0.0303802490234375,
0.006229400634765625,
-0.01552581787109375,
0.04632568359375,
-0.0135040283203125,
-0.04681396484375,
0.0149078369140625,
0.01898193359375,
0.01396942138671875,
0.0018444061279296875,
0.001079559326171875,
0.0740966796875,
0.0135498046875,
-0.045562744140625,
0.0278167724609375,
-0.01158905029296875,
-0.001617431640625,
0.002288818359375,
0.0278472900390625,
-0.01029205322265625,
-0.028564453125,
0.033966064453125,
-0.006072998046875,
0.0012674331665039062,
-0.0194091796875,
-0.046661376953125,
-0.007171630859375,
-0.00811767578125,
0.0298004150390625,
0.020355224609375,
-0.00864410400390625,
0.0188140869140625,
0.006378173828125,
-0.015655517578125,
-0.035797119140625,
-0.06500244140625,
0.019622802734375,
-0.03167724609375,
0.01476287841796875,
-0.0225372314453125,
0.0285186767578125,
-0.0345458984375,
-0.007595062255859375,
-0.033111572265625,
-0.02349853515625,
0.031524658203125,
0.0076141357421875,
-0.03131103515625,
-0.02301025390625,
0.031951904296875,
-0.0020771026611328125,
0.00897979736328125,
0.03533935546875,
-0.037628173828125,
-0.0264434814453125,
-0.04351806640625,
-0.01300811767578125,
-0.01412200927734375,
-0.038604736328125,
0.021453857421875,
0.04388427734375,
0.047760009765625,
0.05340576171875,
0.0214996337890625,
0.0150146484375,
0.016937255859375,
-0.08929443359375,
0.0158843994140625,
-0.021148681640625,
0.0240936279296875,
0.062744140625,
-0.005771636962890625,
-0.002483367919921875,
0.0080108642578125,
0.0267181396484375,
-0.00485992431640625,
0.02899169921875,
-0.013580322265625,
-0.0162200927734375,
-0.0149993896484375,
0.01354217529296875,
-0.01611328125,
-0.032623291015625,
-0.0160369873046875,
-0.0245208740234375,
-0.0195465087890625,
-0.0335693359375,
0.001132965087890625,
-0.00208282470703125,
0.0182037353515625,
-0.053192138671875,
0.020751953125,
-0.0252838134765625,
-0.0003445148468017578,
0.0206451416015625,
0.03717041015625,
0.0010251998901367188,
-0.047332763671875,
-0.0057830810546875,
0.018768310546875,
0.00904083251953125,
-0.049285888671875,
-0.0211944580078125,
-0.05694580078125,
-0.012298583984375,
0.002532958984375,
-0.0465087890625,
0.0160064697265625,
-0.0045318603515625,
0.0633544921875,
-0.01216888427734375,
0.040130615234375,
-0.029144287109375,
-0.050201416015625,
0.080322265625,
-0.0002987384796142578,
-0.0849609375,
0.037841796875,
-0.0259857177734375,
0.044952392578125,
-0.0307769775390625,
0.00463104248046875,
0.04595947265625,
-0.004192352294921875,
0.005130767822265625,
-0.01099395751953125,
-0.00916290283203125,
-0.013763427734375,
-0.0210113525390625,
-0.0229644775390625,
0.00988006591796875,
-0.047515869140625,
0.04571533203125,
0.00833892822265625,
-0.001430511474609375,
0.0010395050048828125,
-0.034271240234375,
-0.001987457275390625,
-0.0171661376953125,
-0.09222412109375,
-0.0799560546875,
-0.08038330078125,
-0.06976318359375,
0.030853271484375,
-0.0228271484375,
-0.0111236572265625,
0.0195465087890625,
0.008819580078125,
0.032867431640625,
-0.031585693359375,
-0.04541015625,
-0.0377197265625,
-0.08660888671875,
-0.052520751953125,
0.01419830322265625,
0.005268096923828125,
0.0114898681640625,
-0.00525665283203125,
0.06268310546875,
0.0196685791015625,
-0.0009732246398925781,
0.004901885986328125,
0.053131103515625,
-0.0066986083984375,
-0.03692626953125,
-0.0161285400390625,
-0.00824737548828125,
0.038848876953125,
-0.00293731689453125,
-0.0008325576782226562,
-0.00878143310546875,
0.045135498046875,
-0.019805908203125,
0.0231475830078125,
-0.04144287109375,
0.01270294189453125,
0.0146636962890625,
-0.0251922607421875,
-0.056182861328125,
-0.001575469970703125,
-0.07891845703125,
-0.019134521484375,
-0.00849151611328125,
-0.0537109375,
0.046051025390625,
0.0304107666015625,
-0.032196044921875,
0.050567626953125,
-0.041015625,
-0.001781463623046875,
-0.00952911376953125,
0.019989013671875,
-0.0247650146484375,
0.050048828125,
0.0001672506332397461,
-0.0008749961853027344,
-0.01087188720703125,
0.01151275634765625,
-0.04296875,
0.0037174224853515625,
-0.01393890380859375,
-0.02459716796875,
-0.00855255126953125,
-0.016693115234375,
-0.021453857421875,
-0.041473388671875,
0.04486083984375,
-0.018524169921875,
0.0150146484375,
-0.04595947265625,
-0.027191162109375,
-0.00745391845703125,
0.07867431640625,
-0.0280914306640625,
-0.01015472412109375,
0.006679534912109375,
0.00948333740234375,
-0.0345458984375,
-0.024017333984375,
-0.056060791015625,
-0.0003063678741455078,
-0.061676025390625,
-0.00403594970703125,
-0.0180206298828125,
-0.01605224609375,
0.016571044921875,
-0.0279541015625,
-0.0085296630859375,
-0.055694580078125,
0.0214080810546875,
-0.004512786865234375,
0.0179290771484375,
0.0255126953125,
-0.01529693603515625,
0.0214691162109375,
0.0010919570922851562,
-0.03289794921875,
-0.0859375,
0.0009307861328125,
-0.032470703125,
0.055908203125,
0.029022216796875,
-0.05511474609375,
-0.01302337646484375,
0.0091705322265625,
0.00263214111328125,
0.00260162353515625,
0.0284881591796875,
0.003414154052734375,
0.0305023193359375,
0.019561767578125,
0.023956298828125,
-0.005962371826171875,
0.00478363037109375,
-0.01519012451171875,
-0.0137176513671875,
-0.032257080078125,
-0.049835205078125,
-0.05322265625,
-0.003021240234375,
-0.0213775634765625,
-0.05291748046875,
-0.0005288124084472656,
0.020751953125,
0.004974365234375,
-0.0020008087158203125,
0.0005588531494140625,
0.025390625,
-0.03704833984375,
0.06573486328125,
0.0199432373046875,
-0.0400390625,
0.0009236335754394531,
0.0738525390625,
0.0131683349609375,
-0.029571533203125,
-0.0517578125,
0.0265350341796875,
0.02972412109375,
-0.0093231201171875,
0.046417236328125,
0.01058197021484375,
-0.0254058837890625,
0.054901123046875,
0.0155181884765625,
-0.0287322998046875,
0.0172882080078125,
0.013214111328125,
-0.0014190673828125,
-0.0391845703125,
0.00226593017578125,
-0.031585693359375,
0.0266571044921875,
0.0208587646484375,
-0.0160064697265625,
-0.0274200439453125,
0.0276947021484375,
0.0240478515625,
-0.047515869140625,
0.0462646484375,
0.0003795623779296875,
-0.036346435546875,
0.0005574226379394531,
0.0223846435546875,
0.018829345703125,
0.038238525390625,
-0.011077880859375,
0.035430908203125,
0.025054931640625,
-0.0292205810546875,
0.0303192138671875,
0.0222015380859375,
0.03564453125,
0.02154541015625,
0.001735687255859375,
-0.003154754638671875,
-0.00522613525390625,
-0.0184783935546875,
0.095703125,
-0.0229034423828125,
-0.08135986328125,
0.0285491943359375,
-0.04327392578125,
0.01219940185546875,
0.05706787109375,
0.0179443359375,
0.0625,
-0.0128173828125,
-0.031829833984375,
-0.0272979736328125,
-0.0258331298828125,
-0.0421142578125,
-0.0750732421875,
-0.047119140625,
-0.026275634765625,
-0.01806640625,
-0.00926971435546875,
0.02734375,
-0.0208740234375,
0.023895263671875,
0.0006971359252929688,
-0.01161956787109375,
0.0257415771484375,
0.031524658203125,
0.0309906005859375,
-0.019134521484375,
-0.0020465850830078125,
0.002960205078125,
0.0364990234375,
-0.01090240478515625,
-0.025787353515625,
0.013031005859375,
0.0191650390625,
-0.006832122802734375,
0.0114288330078125,
0.015411376953125,
0.0161590576171875,
-0.0226898193359375,
0.04522705078125,
-0.00714111328125,
-0.0712890625,
-0.036590576171875,
0.036590576171875,
0.051971435546875,
-0.017913818359375,
-0.03179931640625,
0.005535125732421875,
-0.04443359375,
-0.002643585205078125,
0.04974365234375,
-0.053070068359375,
0.01399993896484375,
0.01320648193359375,
-0.061126708984375,
-0.04974365234375,
0.004123687744140625,
-0.0216217041015625,
0.037811279296875,
-0.039825439453125,
-0.036956787109375,
0.00815582275390625,
-0.00597381591796875,
0.0225677490234375,
-0.031768798828125,
-0.01071929931640625,
0.0252532958984375,
0.00016510486602783203,
0.04498291015625,
-0.00476837158203125,
-0.0290985107421875,
-0.00507354736328125,
-0.0198516845703125,
-0.022369384765625,
-0.00617218017578125,
-0.01132965087890625,
-0.041046142578125,
-0.0176544189453125,
0.0257720947265625,
0.00862884521484375,
0.01213836669921875,
-0.00838470458984375,
-0.019744873046875,
0.0241546630859375,
0.019744873046875,
0.024444580078125,
-0.006305694580078125,
0.0728759765625,
0.01018524169921875,
-0.00267791748046875,
0.0103912353515625,
0.0479736328125,
-0.01444244384765625,
-0.00193023681640625,
0.019622802734375,
0.00208282470703125,
-0.00676727294921875,
-0.0421142578125,
0.01239776611328125,
-0.0158843994140625,
0.039215087890625,
-0.006256103515625,
-0.0217437744140625,
-0.002132415771484375,
-0.0010547637939453125,
-0.0021266937255859375,
0.0328369140625,
0.037933349609375,
-0.04266357421875,
0.057281494140625,
-0.004638671875,
0.0036869049072265625,
0.00662994384765625,
0.01125335693359375,
-0.01451873779296875,
0.01690673828125,
-0.00777435302734375,
0.00952911376953125,
-0.061492919921875,
0.04150390625,
0.0606689453125,
0.0289764404296875,
0.07354736328125,
-0.01049041748046875,
0.04425048828125,
0.056610107421875,
0.0272216796875,
-0.0098114013671875,
-0.0249176025390625,
0.0770263671875,
0.0246734619140625,
-0.0244598388671875,
0.04522705078125,
-0.0294952392578125,
0.0222320556640625,
0.06011962890625,
0.07122802734375,
-0.10589599609375,
0.026275634765625,
0.0275726318359375,
0.0087738037109375,
0.02825927734375,
0.007076263427734375,
-0.00909423828125,
-0.0005660057067871094,
0.043182373046875,
-0.0323486328125,
-0.01068878173828125,
0.0307769775390625,
-0.0051727294921875,
0.0006895065307617188,
-0.00977325439453125,
0.07666015625,
0.0215606689453125,
-0.0278778076171875,
-0.0201873779296875,
0.0245513916015625,
-0.0173187255859375,
-0.02252197265625,
0.0092620849609375,
-0.01763916015625,
-0.001125335693359375,
-0.0419921875,
0.0178680419921875,
-0.0180206298828125,
0.00362396240234375,
0.017425537109375,
0.0080718994140625,
0.042510986328125,
0.057830810546875,
-0.00823974609375,
0.0013380050659179688,
0.0113677978515625,
0.0032749176025390625,
-0.0145263671875,
-0.005504608154296875,
0.01158905029296875,
0.0294189453125,
-0.022705078125,
0.01267242431640625,
-0.0361328125,
0.0008525848388671875,
-0.0006308555603027344,
-0.031982421875,
0.0758056640625,
-0.0218048095703125,
-0.0195159912109375,
0.017822265625,
-0.0121612548828125,
-0.01393890380859375,
-0.017364501953125,
0.0176239013671875,
-0.049530029296875,
-0.027984619140625,
-0.009033203125,
-0.038604736328125,
-0.00684356689453125,
-0.041046142578125,
-0.0509033203125,
0.062286376953125,
-0.0167388916015625,
0.03131103515625,
0.0170135498046875,
0.019378662109375,
-0.0025959014892578125,
0.007389068603515625,
-0.041961669921875,
0.036407470703125,
0.01184844970703125,
0.041351318359375,
0.01020050048828125,
0.01309967041015625,
0.0302886962890625,
-0.02813720703125,
0.0284881591796875,
0.006793975830078125,
0.0098114013671875,
-0.0143585205078125,
0.0010509490966796875,
0.0260009765625,
-0.0196533203125,
0.018157958984375,
0.0033969879150390625,
0.0296478271484375,
0.01528167724609375,
-0.06005859375,
0.020172119140625,
-0.027557373046875,
-0.0182342529296875,
0.028350830078125,
0.001811981201171875,
-0.027374267578125,
-0.01151275634765625,
0.04156494140625,
-0.08319091796875,
0.0215301513671875,
0.03497314453125,
0.053131103515625,
0.0200958251953125,
0.0234375,
0.0026226043701171875,
-0.012420654296875,
0.0291748046875,
-0.035614013671875,
0.0386962890625,
-0.0299072265625,
0.0227813720703125,
0.042205810546875,
0.02587890625,
0.0196533203125,
-0.00958251953125,
0.01995849609375,
0.01079559326171875,
-0.025970458984375,
0.071044921875,
0.036590576171875,
0.0245208740234375,
-0.01230621337890625,
0.0186920166015625,
0.005901336669921875,
0.0670166015625,
-0.053192138671875,
-0.057647705078125,
0.0086669921875,
-0.0036067962646484375,
0.012298583984375,
0.0258941650390625,
0.0275421142578125,
-0.050079345703125,
0.0012578964233398438,
-0.005126953125,
-0.01059722900390625,
0.0017004013061523438,
0.0023593902587890625,
0.00637054443359375,
0.034698486328125,
-0.02099609375,
-0.0112152099609375,
-0.0176544189453125,
0.0247039794921875,
0.01229095458984375,
0.0306854248046875,
-0.0224761962890625,
0.046234130859375,
-0.018157958984375,
0.012603759765625,
-0.0160369873046875,
0.0184326171875,
-0.0360107421875,
0.036376953125,
-0.068359375,
-0.04412841796875,
-0.0059967041015625,
0.054840087890625,
0.032623291015625,
-0.01247406005859375,
-0.0079193115234375,
-0.0037517547607421875,
0.0016193389892578125,
-0.0023670196533203125,
0.030487060546875,
-0.01275634765625,
-0.0157623291015625,
-0.01305389404296875,
-0.04443359375,
-0.01336669921875,
-0.0316162109375,
-0.01806640625,
0.0145721435546875,
-0.00408935546875,
-0.01250457763671875,
0.005340576171875,
0.0140380859375,
-0.032470703125,
0.00545501708984375,
0.01345062255859375,
0.052642822265625,
0.0207366943359375,
-0.094482421875,
-0.019622802734375,
-0.053558349609375,
-0.016143798828125,
0.033538818359375,
0.040130615234375,
0.00939178466796875,
-0.004108428955078125,
0.031768798828125,
0.01522064208984375,
0.0022449493408203125,
-0.01971435546875,
0.0105743408203125,
-0.005489349365234375,
0.028045654296875,
0.0297698974609375,
-0.0421142578125,
-0.00922393798828125,
-0.007198333740234375,
0.00003784894943237305,
0.01380157470703125,
0.03955078125,
0.0010700225830078125,
0.01120758056640625,
-0.0035305023193359375,
0.004669189453125,
-0.041839599609375,
-0.0272064208984375,
0.0313720703125,
-0.052337646484375,
-0.0186309814453125,
0.0218658447265625,
-0.07574462890625,
0.0721435546875,
-0.006862640380859375,
0.046722412109375,
0.06622314453125,
-0.02203369140625,
0.005130767822265625,
0.020172119140625,
-0.006961822509765625,
-0.018646240234375,
-0.04229736328125,
0.02508544921875,
0.040740966796875,
-0.00565338134765625,
0.0004115104675292969,
-0.022003173828125,
0.04876708984375,
-0.046478271484375,
-0.0428466796875,
0.004184722900390625,
-0.05023193359375,
-0.052764892578125,
0.0210723876953125,
0.027069091796875,
-0.004413604736328125,
-0.0146331787109375,
-0.012176513671875,
-0.0034503936767578125,
0.01523590087890625,
-0.013641357421875,
0.002094268798828125,
0.0299224853515625,
0.026458740234375,
0.034576416015625,
0.032958984375,
-0.0157470703125,
0.0028171539306640625,
0.040679931640625,
-0.01433563232421875,
0.0252685546875,
-0.100341796875,
-0.035797119140625,
-0.0484619140625,
-0.0018472671508789062,
0.021270751953125,
-0.00527191162109375,
-0.05487060546875,
0.0137786865234375,
0.01094818115234375,
-0.0040283203125,
-0.0338134765625,
-0.00830078125,
-0.00434112548828125,
-0.029296875,
0.04248046875,
-0.0411376953125,
0.01512908935546875,
0.0005698204040527344,
0.00988006591796875,
-0.0269622802734375,
0.044158935546875,
-0.02374267578125,
-0.0273284912109375,
0.0350341796875,
-0.01384735107421875,
0.0217132568359375,
-0.008819580078125,
-0.053070068359375,
-0.03619384765625,
-0.019927978515625,
0.001861572265625,
0.0109100341796875,
-0.017425537109375,
0.025299072265625,
-0.01476287841796875,
0.000576019287109375,
-0.01036834716796875,
0.00363922119140625,
-0.01270294189453125,
0.0026874542236328125,
-0.00975799560546875,
0.0110015869140625,
0.0288238525390625,
-0.035919189453125,
-0.0970458984375,
0.0311126708984375,
-0.0021991729736328125,
-0.050323486328125,
-0.0433349609375,
0.04193115234375,
0.0128021240234375,
-0.038787841796875,
-0.024688720703125,
-0.043212890625,
-0.004703521728515625,
0.032562255859375,
0.0287017822265625,
0.021575927734375,
0.012603759765625,
0.044525146484375,
-0.05072021484375,
0.02142333984375,
-0.0114898681640625,
0.0264434814453125,
-0.0017957687377929688,
0.0238037109375,
-0.00392913818359375,
0.04229736328125,
-0.02386474609375,
0.0240631103515625,
-0.0208282470703125,
0.01190948486328125,
0.00791168212890625,
-0.0236968994140625,
0.01435089111328125,
0.003131866455078125,
0.0089874267578125,
0.01401519775390625,
-0.011993408203125,
-0.00983428955078125,
-0.0277557373046875,
-0.051544189453125,
-0.048065185546875,
-0.0016193389892578125,
0.0303192138671875,
-0.0772705078125,
0.01654052734375,
0.0142822265625,
0.0012149810791015625,
-0.052337646484375,
0.02734375,
-0.038360595703125,
-0.022674560546875,
-0.0005125999450683594,
0.016265869140625,
-0.0177154541015625,
-0.01311492919921875,
0.0550537109375,
-0.034423828125,
-0.002468109130859375,
0.00907135009765625,
0.0172882080078125,
0.026580810546875,
0.0304718017578125,
0.051116943359375,
0.051025390625,
-0.07379150390625,
-0.044525146484375,
0.0261993408203125,
-0.0283203125,
0.004581451416015625,
-0.043121337890625,
-0.015899658203125,
0.0294036865234375,
-0.006221771240234375,
0.04241943359375,
-0.0007619857788085938,
0.01483917236328125,
0.005153656005859375,
0.0294952392578125,
0.02569580078125,
0.00923919677734375,
0.006809234619140625,
0.022247314453125,
0.025604248046875,
-0.047454833984375,
0.04302978515625,
-0.048797607421875,
-0.0093536376953125,
-0.0223846435546875,
-0.00628662109375,
-0.051239013671875,
0.0218658447265625,
-0.035736083984375,
0.004093170166015625,
0.023468017578125
] |
8ce55b431c093c13c1faaf95ad813ae250a386ed
|
Wordpress Stackexchange
Q: Stop Wordpress Redirection From /keyword to /some-post-containing-keyword/ I have tried everything I've found.
I can't stop webhostingbreak.com/ipage/ from redirecting to
webhostingbreak.com/hosting-directory/ipage-hosting/
I tried remove_filter('template_redirect', 'redirect_canonical'); in my theme's functions.php.
I tried removing or commenting out add_action(‘template_redirect’, ‘redirect_canonical’); in /wp-includes/canonical.php
I even removed EVERY line of code in canonical.php and still no result... It still redirects like I've done nothing.
I changed webhostingbreak.com/hosting-directory/ipage-hosting/ to webhostingbreak.com/hosting-directory/test/ and then I cleared the database of any attachements/old slugs that might cause redirect. It STILL redirects.
I'm out of ideas. I've spend 20 hours trying to find answers on this.
A: If that is just one exception you could add an .htaccess rule for it or just use the Redirection plugin. It's not the best solution but neither is spending 20 hours on it.
Btw, Yoast WordPress SEO has the ability to remove the category base, you don't need the second plugin anyway.
|
Q: Stop Wordpress Redirection From /keyword to /some-post-containing-keyword/ I have tried everything I've found.
I can't stop webhostingbreak.com/ipage/ from redirecting to
webhostingbreak.com/hosting-directory/ipage-hosting/
I tried remove_filter('template_redirect', 'redirect_canonical'); in my theme's functions.php.
I tried removing or commenting out add_action(‘template_redirect’, ‘redirect_canonical’); in /wp-includes/canonical.php
I even removed EVERY line of code in canonical.php and still no result... It still redirects like I've done nothing.
I changed webhostingbreak.com/hosting-directory/ipage-hosting/ to webhostingbreak.com/hosting-directory/test/ and then I cleared the database of any attachements/old slugs that might cause redirect. It STILL redirects.
I'm out of ideas. I've spend 20 hours trying to find answers on this.
A: If that is just one exception you could add an .htaccess rule for it or just use the Redirection plugin. It's not the best solution but neither is spending 20 hours on it.
Btw, Yoast WordPress SEO has the ability to remove the category base, you don't need the second plugin anyway.
|
wordpress
|
{
"language": "en",
"length": 149,
"provenance": "stackexchange_00019.jsonl.gz:408024",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12903"
}
|
[
0.07696533203125,
0.0175323486328125,
0.01715087890625,
-0.02471923828125,
0.02630615234375,
-0.044677734375,
0.04974365234375,
-0.043853759765625,
-0.022674560546875,
0.0279693603515625,
0.0309906005859375,
-0.01238250732421875,
-0.00930023193359375,
-0.040374755859375,
-0.01001739501953125,
-0.004547119140625,
0.0239105224609375,
-0.03338623046875,
-0.01312255859375,
-0.0077056884765625,
0.023834228515625,
0.0038661956787109375,
-0.01122283935546875,
-0.021697998046875,
-0.027252197265625,
-0.007518768310546875,
0.11407470703125,
-0.0770263671875,
-0.0090484619140625,
-0.06292724609375,
-0.004734039306640625,
0.03277587890625,
0.022796630859375,
0.055511474609375,
-0.0618896484375,
0.007080078125,
-0.018524169921875,
0.029205322265625,
0.0157623291015625,
-0.020538330078125,
0.0021572113037109375,
-0.00763702392578125,
0.00594329833984375,
0.033905029296875,
-0.00875091552734375,
-0.0251617431640625,
0.004398345947265625,
-0.0411376953125,
0.01325225830078125,
0.010162353515625,
-0.0264129638671875,
0.05157470703125,
-0.0210418701171875,
-0.033538818359375,
-0.001178741455078125,
-0.013885498046875,
-0.0389404296875,
0.016387939453125,
0.0243988037109375,
0.03228759765625,
0.0175323486328125,
-0.0022792816162109375,
0.0036449432373046875,
-0.0176849365234375,
-0.0174713134765625,
-0.0172882080078125,
-0.0224761962890625,
0.0170745849609375,
-0.0321044921875,
-0.01097869873046875,
0.01030731201171875,
-0.0210113525390625,
0.015228271484375,
0.024749755859375,
-0.03253173828125,
-0.060394287109375,
0.04498291015625,
0.0019092559814453125,
0.018035888671875,
0.017730712890625,
0.025299072265625,
-0.023162841796875,
0.0170135498046875,
-0.00792694091796875,
-0.0146484375,
0.0018262863159179688,
-0.003993988037109375,
-0.00815582275390625,
-0.0133209228515625,
0.003948211669921875,
-0.003948211669921875,
-0.037353515625,
-0.0179901123046875,
0.0156402587890625,
0.0247802734375,
-0.04217529296875,
0.018524169921875,
0.0222320556640625,
-0.01158905029296875,
-0.032501220703125,
-0.003322601318359375,
-0.02142333984375,
-0.031585693359375,
0.0012254714965820312,
0.0046234130859375,
0.06494140625,
0.0391845703125,
0.01904296875,
0.01910400390625,
-0.0160980224609375,
0.007579803466796875,
0.0469970703125,
-0.0499267578125,
-0.043670654296875,
-0.00418853759765625,
0.04083251953125,
-0.036376953125,
0.006984710693359375,
0.005550384521484375,
0.01488494873046875,
-0.01081085205078125,
0.00751495361328125,
0.0513916015625,
-0.054595947265625,
0.0238037109375,
-0.013092041015625,
-0.045654296875,
-0.029632568359375,
0.00470733642578125,
-0.04559326171875,
-0.0232086181640625,
0.0198211669921875,
-0.00511932373046875,
0.029266357421875,
0.0196075439453125,
0.01343536376953125,
0.03424072265625,
0.02325439453125,
-0.02484130859375,
0.0183868408203125,
-0.001781463623046875,
-0.02691650390625,
0.0024738311767578125,
-0.0226898193359375,
0.003002166748046875,
-0.006275177001953125,
0.03741455078125,
0.045989990234375,
-0.0154876708984375,
-0.0223388671875,
0.0298309326171875,
0.0123291015625,
0.09271240234375,
-0.0215911865234375,
-0.05084228515625,
-0.06427001953125,
0.0350341796875,
-0.053802490234375,
-0.0284576416015625,
-0.08251953125,
-0.02178955078125,
0.002620697021484375,
0.054534912109375,
-0.0535888671875,
-0.049957275390625,
-0.0005154609680175781,
-0.053497314453125,
-0.01024627685546875,
0.0304412841796875,
0.0008077621459960938,
0.018218994140625,
0.02740478515625,
0.039703369140625,
0.0271148681640625,
0.02130126953125,
0.004547119140625,
0.0239715576171875,
0.002368927001953125,
0.01519012451171875,
0.043304443359375,
-0.01070404052734375,
-0.03662109375,
0.03118896484375,
-0.0204620361328125,
-0.036285400390625,
0.0577392578125,
0.01922607421875,
0.044097900390625,
-0.02935791015625,
-0.002010345458984375,
0.035247802734375,
0.052459716796875,
0.003383636474609375,
0.055419921875,
-0.0067901611328125,
-0.0643310546875,
0.0244598388671875,
0.019775390625,
-0.0106353759765625,
-0.03125,
0.063720703125,
0.04095458984375,
-0.0286712646484375,
-0.0262908935546875,
-0.025238037109375,
-0.0196685791015625,
0.00395965576171875,
0.020843505859375,
0.003910064697265625,
0.03497314453125,
-0.004241943359375,
0.005859375,
-0.019256591796875,
0.00505828857421875,
-0.0171356201171875,
0.01503753662109375,
-0.0115509033203125,
0.01270294189453125,
0.033905029296875,
0.0197296142578125,
0.036895751953125,
-0.01241302490234375,
0.006473541259765625,
-0.0226593017578125,
0.005092620849609375,
-0.01904296875,
-0.004119873046875,
-0.0306396484375,
-0.0479736328125,
0.0190277099609375,
-0.07208251953125,
0.034210205078125,
0.027587890625,
0.01493072509765625,
-0.0296783447265625,
0.0404052734375,
0.0184783935546875,
-0.036712646484375,
-0.01334381103515625,
0.033660888671875,
0.052825927734375,
0.01097869873046875,
-0.017913818359375,
-0.01995849609375,
-0.0060272216796875,
-0.1011962890625,
-0.00508880615234375,
-0.0186614990234375,
0.01419830322265625,
0.031280517578125,
0.0160675048828125,
-0.019927978515625,
0.001861572265625,
-0.061309814453125,
0.0034770965576171875,
0.015533447265625,
0.005107879638671875,
-0.0233306884765625,
0.0245819091796875,
-0.00012010335922241211,
0.00727081298828125,
-0.035430908203125,
-0.0394287109375,
0.013824462890625,
-0.02484130859375,
0.0035686492919921875,
-0.0031719207763671875,
0.006481170654296875,
-0.01751708984375,
-0.017303466796875,
0.03973388671875,
0.00279998779296875,
-0.0079345703125,
0.02288818359375,
0.06439208984375,
-0.024810791015625,
-0.0239410400390625,
-0.0080718994140625,
0.0030498504638671875,
0.0096588134765625,
-0.004032135009765625,
0.05023193359375,
-0.01369476318359375,
-0.01849365234375,
-0.0264892578125,
-0.06414794921875,
-0.0205078125,
0.0250701904296875,
-0.006084442138671875,
-0.0035686492919921875,
0.0242767333984375,
0.039886474609375,
-0.00225067138671875,
0.01617431640625,
-0.0167083740234375,
-0.01206207275390625,
0.0445556640625,
-0.04583740234375,
0.03082275390625,
-0.0296173095703125,
0.055938720703125,
0.05194091796875,
-0.006832122802734375,
0.01180267333984375,
0.01053619384765625,
-0.0031414031982421875,
0.0244293212890625,
-0.035858154296875,
-0.043426513671875,
0.0249786376953125,
-0.11016845703125,
-0.0570068359375,
0.0264892578125,
0.0001995563507080078,
0.051055908203125,
-0.016876220703125,
0.023193359375,
0.00943756103515625,
-0.043060302734375,
-0.08099365234375,
0.02166748046875,
0.011871337890625,
0.017425537109375,
0.0467529296875,
-0.00634765625,
-0.04571533203125,
0.0712890625,
0.004726409912109375,
-0.0201873779296875,
-0.042205810546875,
-0.05145263671875,
-0.06787109375,
-0.05767822265625,
0.0180511474609375,
0.007244110107421875,
0.00829315185546875,
0.0221099853515625,
-0.013671875,
0.003528594970703125,
-0.00012934207916259766,
0.051910400390625,
0.05126953125,
0.01910400390625,
0.0198974609375,
-0.057098388671875,
-0.0234832763671875,
-0.0017080307006835938,
0.006259918212890625,
0.042388916015625,
-0.0308074951171875,
0.052398681640625,
-0.01348876953125,
0.034942626953125,
0.033538818359375,
0.020660400390625,
0.031707763671875,
-0.0214996337890625,
0.00002586841583251953,
0.002109527587890625,
-0.054229736328125,
-0.03155517578125,
0.01514434814453125,
-0.035797119140625,
-0.020294189453125,
0.03521728515625,
-0.015960693359375,
-0.0201873779296875,
-0.0145263671875,
0.05133056640625,
0.0128326416015625,
0.025726318359375,
-0.0236358642578125,
0.0723876953125,
0.0113983154296875,
0.05023193359375,
-0.07781982421875,
0.02197265625,
-0.01250457763671875,
-0.051788330078125,
-0.02105712890625,
0.003406524658203125,
-0.0093231201171875,
0.00875091552734375,
-0.0132904052734375,
-0.030303955078125,
0.007720947265625,
-0.049041748046875,
-0.02227783203125,
-0.004486083984375,
0.00933074951171875,
0.003658294677734375,
0.0565185546875,
-0.00611114501953125,
-0.007801055908203125,
-0.0103302001953125,
0.00231170654296875,
-0.0396728515625,
-0.0296783447265625,
-0.046112060546875,
-0.003955841064453125,
-0.0849609375,
-0.00791168212890625,
0.0108489990234375,
-0.05596923828125,
0.021881103515625,
-0.044891357421875,
-0.04742431640625,
-0.03717041015625,
0.057952880859375,
-0.0237579345703125,
-0.0085906982421875,
0.01378631591796875,
0.00197601318359375,
-0.029327392578125,
-0.045135498046875,
0.0211639404296875,
-0.04833984375,
-0.033966064453125,
0.01461029052734375,
0.0411376953125,
-0.007656097412109375,
0.0184326171875,
-0.02874755859375,
0.031463623046875,
0.0174560546875,
0.03411865234375,
-0.015045166015625,
-0.01294708251953125,
-0.030731201171875,
-0.00749969482421875,
-0.0007290840148925781,
-0.0086212158203125,
0.0057220458984375,
-0.00614166259765625,
-0.0185394287109375,
0.01056671142578125,
-0.031982421875,
-0.0308990478515625,
0.027069091796875,
-0.037139892578125,
-0.0699462890625,
-0.027374267578125,
-0.0220184326171875,
0.019378662109375,
-0.01727294921875,
-0.0012569427490234375,
-0.0579833984375,
-0.073486328125,
0.0535888671875,
0.01006317138671875,
0.0198211669921875,
-0.0125274658203125,
0.034698486328125,
0.00209808349609375,
-0.038330078125,
0.0295257568359375,
0.012939453125,
-0.00582122802734375,
0.004970550537109375,
0.06207275390625,
-0.043212890625,
0.00998687744140625,
0.09771728515625,
-0.057342529296875,
-0.017730712890625,
-0.0164642333984375,
0.048248291015625,
0.02716064453125,
-0.0201263427734375,
0.006832122802734375,
-0.0117950439453125,
0.0236053466796875,
0.0345458984375,
0.0183868408203125,
-0.0016794204711914062,
0.015625,
0.01910400390625,
0.021759033203125,
-0.0380859375,
-0.040374755859375,
-0.0156097412109375,
-0.0020656585693359375,
0.07110595703125,
0.044281005859375,
0.0015735626220703125,
0.00957489013671875,
0.016998291015625,
0.052764892578125,
0.005527496337890625,
-0.030487060546875,
0.0112457275390625,
-0.0518798828125,
0.0255126953125,
0.0024566650390625,
-0.02227783203125,
-0.029052734375,
0.008941650390625,
0.012664794921875,
-0.0272216796875,
-0.048126220703125,
-0.007289886474609375,
-0.01678466796875,
-0.0562744140625,
0.03369140625,
-0.01256561279296875,
0.048126220703125,
0.01580810546875,
-0.0266876220703125,
0.0115203857421875,
0.007328033447265625,
-0.043853759765625,
-0.04638671875,
0.003826141357421875,
-0.014923095703125,
-0.0032138824462890625,
0.0287628173828125,
0.053253173828125,
0.013275146484375,
0.0479736328125,
-0.0239105224609375,
-0.037200927734375,
0.0171661376953125,
-0.00014829635620117188,
0.0296478271484375,
-0.0130157470703125,
0.00850677490234375,
-0.0295867919921875,
0.05596923828125,
-0.050689697265625,
0.0215911865234375,
0.0201873779296875,
0.02252197265625,
0.04010009765625,
-0.03240966796875,
0.00829315185546875,
0.004726409912109375,
-0.01129150390625,
0.0163116455078125,
-0.00368499755859375,
-0.0190277099609375,
-0.01163482666015625,
0.006832122802734375,
0.01959228515625,
0.006328582763671875,
-0.0162506103515625,
-0.01502227783203125,
-0.025970458984375,
-0.00616455078125,
0.00902557373046875,
-0.06610107421875,
0.016357421875,
0.032745361328125,
-0.0189361572265625,
-0.043792724609375,
-0.01812744140625,
0.0123443603515625,
0.047607421875,
-0.03179931640625,
-0.0197906494140625,
0.02728271484375,
-0.0004405975341796875,
0.0261077880859375,
-0.01548004150390625,
-0.0176239013671875,
-0.0033111572265625,
0.01453399658203125,
0.037353515625,
0.017822265625,
-0.0390625,
-0.0007915496826171875,
-0.03759765625,
-0.0124969482421875,
0.031005859375,
-0.00640106201171875,
0.0050201416015625,
-0.00624847412109375,
0.02081298828125,
-0.0037021636962890625,
0.012298583984375,
-0.03094482421875,
-0.0301055908203125,
0.0014019012451171875,
0.03955078125,
0.0002689361572265625,
-0.00844573974609375,
0.019317626953125,
0.006237030029296875,
0.0255126953125,
-0.0035800933837890625,
0.0187530517578125,
0.046295166015625,
-0.048583984375,
0.006786346435546875,
-0.046234130859375,
0.00020456314086914062,
0.0005850791931152344,
-0.006053924560546875,
0.01479339599609375,
0.038055419921875,
0.0034236907958984375,
-0.0296783447265625,
-0.001621246337890625,
0.016082763671875,
-0.037933349609375,
0.008453369140625,
-0.00972747802734375,
0.00797271728515625,
-0.037200927734375,
-0.004032135009765625,
-0.0340576171875,
-0.0220184326171875,
-0.0158538818359375,
0.0292816162109375,
-0.0037384033203125,
0.006496429443359375,
-0.003986358642578125,
-0.06500244140625,
0.00960540771484375,
-0.005947113037109375,
0.02215576171875,
0.027862548828125,
-0.006134033203125,
0.0233001708984375,
0.020416259765625,
0.0175018310546875,
-0.0047454833984375,
-0.020599365234375,
0.0333251953125,
-0.0037994384765625,
-0.00862884521484375,
0.0176849365234375,
-0.0233917236328125,
0.004535675048828125,
0.0662841796875,
0.06561279296875,
-0.09234619140625,
0.00844573974609375,
0.026611328125,
-0.007266998291015625,
0.0069122314453125,
0.016204833984375,
0.006473541259765625,
-0.007366180419921875,
-0.06536865234375,
0.05352783203125,
-0.036285400390625,
-0.031402587890625,
0.04364013671875,
-0.005344390869140625,
-0.0221710205078125,
0.0458984375,
0.01216888427734375,
-0.04754638671875,
0.0131072998046875,
0.026336669921875,
-0.0099639892578125,
-0.052215576171875,
-0.0290679931640625,
0.043304443359375,
-0.0278472900390625,
-0.05096435546875,
0.04962158203125,
-0.0220947265625,
0.027740478515625,
0.04559326171875,
0.0121002197265625,
0.018890380859375,
0.054534912109375,
-0.0200958251953125,
0.0247802734375,
0.02911376953125,
-0.0243072509765625,
0.011566162109375,
-0.0318603515625,
-0.0047760009765625,
-0.0574951171875,
-0.0100250244140625,
-0.00563812255859375,
-0.03411865234375,
-0.05279541015625,
-0.0267486572265625,
-0.0222625732421875,
0.0462646484375,
-0.03668212890625,
-0.00566864013671875,
0.01036834716796875,
0.0088043212890625,
0.01480865478515625,
0.00400543212890625,
0.0225677490234375,
-0.0316162109375,
-0.017425537109375,
0.0005459785461425781,
-0.01910400390625,
0.0090789794921875,
-0.005809783935546875,
-0.036041259765625,
0.062469482421875,
0.0196075439453125,
0.0338134765625,
0.0247344970703125,
0.01486968994140625,
-0.01055145263671875,
0.00286102294921875,
-0.0177001953125,
0.03857421875,
0.02154541015625,
0.00669097900390625,
-0.048797607421875,
-0.0175933837890625,
0.004913330078125,
0.033355712890625,
0.05975341796875,
0.028961181640625,
-0.06317138671875,
0.01229095458984375,
0.04754638671875,
-0.024627685546875,
-0.033905029296875,
0.07586669921875,
0.007289886474609375,
-0.0260009765625,
-0.02777099609375,
-0.018402099609375,
0.0180511474609375,
-0.0204010009765625,
-0.022552490234375,
0.007389068603515625,
-0.005847930908203125,
-0.0018205642700195312,
0.00927734375,
0.0080718994140625,
-0.05804443359375,
0.0139312744140625,
0.0265960693359375,
0.027587890625,
-0.01491546630859375,
0.027008056640625,
0.035125732421875,
-0.0714111328125,
-0.00220489501953125,
-0.0523681640625,
0.057952880859375,
0.0279388427734375,
0.0299224853515625,
0.018890380859375,
0.0187835693359375,
0.0310516357421875,
-0.050048828125,
0.0258941650390625,
0.017822265625,
-0.05743408203125,
0.049713134765625,
0.028076171875,
0.036865234375,
-0.01171112060546875,
0.0124664306640625,
0.00312042236328125,
0.05474853515625,
-0.0423583984375,
-0.0252227783203125,
-0.0076904296875,
-0.01910400390625,
0.01372528076171875,
-0.0377197265625,
-0.00881195068359375,
-0.00319671630859375,
-0.0191192626953125,
0.01035308837890625,
-0.0058441162109375,
0.004878997802734375,
0.0174407958984375,
0.0020999908447265625,
0.01419830322265625,
-0.0246429443359375,
0.01129913330078125,
-0.044921875,
-0.004241943359375,
0.0379638671875,
0.06268310546875,
0.01177215576171875,
0.0611572265625,
-0.01454925537109375,
-0.03948974609375,
-0.031280517578125,
0.054779052734375,
-0.00225830078125,
0.038665771484375,
-0.061981201171875,
-0.05755615234375,
0.007564544677734375,
0.050933837890625,
0.039093017578125,
0.04217529296875,
0.01291656494140625,
0.0218048095703125,
0.0237274169921875,
0.0277099609375,
0.08489990234375,
-0.0154266357421875,
0.0179290771484375,
-0.055389404296875,
0.033935546875,
0.014678955078125,
0.00321197509765625,
0.005096435546875,
0.0125579833984375,
0.0215301513671875,
0.0023937225341796875,
-0.024749755859375,
0.0136566162109375,
-0.04962158203125,
0.05023193359375,
0.0009264945983886719,
0.034820556640625,
0.0106658935546875,
-0.0455322265625,
-0.0158233642578125,
0.0224456787109375,
-0.0237884521484375,
-0.000629425048828125,
0.0167999267578125,
-0.027862548828125,
0.031524658203125,
0.007354736328125,
-0.017730712890625,
0.01421356201171875,
0.00458526611328125,
-0.00189971923828125,
0.023223876953125,
0.024566650390625,
-0.0023632049560546875,
-0.0157012939453125,
0.007965087890625,
0.0025615692138671875,
-0.003753662109375,
0.00307464599609375,
0.1153564453125,
-0.0238494873046875,
-0.01007843017578125,
-0.034698486328125,
-0.0208892822265625,
0.0035533905029296875,
-0.0289154052734375,
0.017669677734375,
0.032440185546875,
-0.015655517578125,
-0.0280303955078125,
-0.00986480712890625,
0.0012559890747070312,
0.048614501953125,
-0.0167388916015625,
0.00818634033203125,
0.0100250244140625,
0.0108642578125,
-0.030853271484375,
0.01125335693359375,
-0.033203125,
-0.059112548828125,
-0.06011962890625,
-0.007053375244140625,
0.00933074951171875,
0.0219573974609375,
0.00603485107421875,
0.036773681640625,
-0.00897216796875,
-0.020050048828125,
-0.0006303787231445312,
-0.046844482421875,
0.006534576416015625,
0.033477783203125,
0.0080718994140625,
-0.0241546630859375,
0.01678466796875,
0.002490997314453125,
-0.022613525390625,
0.0303497314453125,
-0.002590179443359375,
0.042694091796875,
-0.0209197998046875,
-0.051910400390625,
-0.030029296875,
-0.00684356689453125,
-0.03253173828125,
0.0011749267578125,
-0.023956298828125,
-0.0130615234375,
-0.0220184326171875,
-0.017913818359375,
0.00916290283203125,
0.0013065338134765625,
-0.037078857421875,
0.006622314453125,
-0.0267791748046875,
-0.02264404296875,
-0.0051116943359375,
-0.00038361549377441406,
0.0210418701171875,
-0.00039649009704589844,
-0.07855224609375,
0.05426025390625,
-0.0242462158203125,
0.0225982666015625,
-0.0279541015625,
0.03839111328125,
-0.0244140625,
-0.0305633544921875,
-0.0933837890625,
-0.01336669921875,
-0.05096435546875,
0.0135650634765625,
-0.0391845703125,
-0.00965118408203125,
0.035980224609375,
0.003566741943359375,
-0.0177764892578125,
-0.067138671875,
-0.036163330078125,
-0.016845703125,
-0.0292510986328125,
-0.0287322998046875,
-0.004673004150390625,
0.007965087890625,
-0.004894256591796875,
-0.034637451171875,
0.009307861328125,
-0.034912109375,
-0.024566650390625,
0.01276397705078125,
-0.0517578125,
-0.04888916015625,
-0.03594970703125,
-0.0150604248046875,
0.06915283203125,
0.016357421875,
-0.0082855224609375,
-0.029205322265625,
-0.00708770751953125,
-0.0231170654296875,
0.046722412109375,
0.013153076171875,
-0.02703857421875,
-0.006519317626953125,
0.033966064453125,
-0.00287628173828125,
0.0194091796875,
-0.00577545166015625,
0.00019443035125732422,
0.01418304443359375,
0.050750732421875,
0.0560302734375,
-0.01355743408203125,
-0.0030231475830078125,
-0.03253173828125,
0.040069580078125,
0.037261962890625,
-0.0192718505859375,
-0.0263824462890625,
0.027679443359375,
0.015411376953125,
0.00949859619140625,
-0.022125244140625,
-0.0240631103515625,
-0.0255279541015625,
0.049560546875,
0.003719329833984375,
0.000988006591796875,
-0.0012407302856445312,
-0.06787109375,
-0.0445556640625,
0.019805908203125,
-0.0118255615234375,
0.0184326171875,
-0.10833740234375,
-0.0092315673828125,
0.05059814453125,
0.00676727294921875,
0.0303955078125,
-0.0350341796875,
-0.006748199462890625,
-0.01306915283203125,
-0.01380157470703125,
-0.01322174072265625,
-0.0079193115234375,
-0.00034356117248535156,
0.024688720703125,
-0.019500732421875,
-0.0003960132598876953,
-0.02142333984375,
0.031585693359375,
0.00234222412109375,
-0.0362548828125,
0.01091766357421875,
-0.006866455078125,
0.0190582275390625,
0.0181732177734375,
0.0399169921875,
0.01934814453125,
0.00838470458984375,
-0.031463623046875,
-0.0263671875,
0.030487060546875,
0.0005774497985839844,
0.031280517578125,
-0.02301025390625,
0.02606201171875,
0.01934814453125,
0.0472412109375,
0.002162933349609375,
-0.0098724365234375,
-0.005962371826171875,
0.04595947265625,
-0.037384033203125,
-0.0184173583984375,
0.01116943359375,
-0.047882080078125,
-0.006488800048828125,
0.056182861328125,
0.0458984375,
-0.0250244140625,
0.0210113525390625,
-0.04583740234375,
0.059906005859375,
-0.0036602020263671875
] |
8efa0eab5bb0ad06c50136468201c468cb95a7ad
|
Wordpress Stackexchange
Q: Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation I really need some help, I dont know where else to turn with this request. I'd like to add a shortcode to one of my posts. The template tags get_next_post() and get_previous will not work for me since I dont want post navigation on each post page and I want to control where it displays. In a DIV in an HTML structure I've created in a post.
So what I need is to generate shortcodes from get_next_post() and get_previous_post()
A: this is very simple to do...
// next
function next_shortcode($atts) {
// global $post; -unnecessary
return '<div class="nav-next">'.next_post_link( '%link', '%title <span class="meta-nav">' . _x( '', 'Next post link', ' ' ) . '</span>',true ).'</div>';
}
add_shortcode( 'next', 'next_shortcode' );
//prev
function prev_shortcode($atts) {
//global $post; -unnecessary
return '<div class="nav-previous">'.next_post_link( '%link', '%title <span class="meta-nav">' . _x( '', 'Previous post link', ' ' ) . '</span>',true ).'</div>';
}
add_shortcode( 'prev', 'prev_shortcode' );
Goodluck!
Here for any question....
|
Q: Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation I really need some help, I dont know where else to turn with this request. I'd like to add a shortcode to one of my posts. The template tags get_next_post() and get_previous will not work for me since I dont want post navigation on each post page and I want to control where it displays. In a DIV in an HTML structure I've created in a post.
So what I need is to generate shortcodes from get_next_post() and get_previous_post()
A: this is very simple to do...
// next
function next_shortcode($atts) {
// global $post; -unnecessary
return '<div class="nav-next">'.next_post_link( '%link', '%title <span class="meta-nav">' . _x( '', 'Next post link', ' ' ) . '</span>',true ).'</div>';
}
add_shortcode( 'next', 'next_shortcode' );
//prev
function prev_shortcode($atts) {
//global $post; -unnecessary
return '<div class="nav-previous">'.next_post_link( '%link', '%title <span class="meta-nav">' . _x( '', 'Previous post link', ' ' ) . '</span>',true ).'</div>';
}
add_shortcode( 'prev', 'prev_shortcode' );
Goodluck!
Here for any question....
A: There were a couple issues with the above code. You need to wrap shortcode output with ob_start() in order to get it to echo to the screen in the right place. Also, as one of the commenters above mentioned, those functions already echo their result so putting them in a return statement won't work correctly.
Here is my fix:
add_shortcode( 'prev', 'prev_shortcode' );
add_shortcode( 'next', 'next_shortcode' );
function next_shortcode($atts) {
global $post;
ob_start();
next_post_link( '<div class="nav-next">%link</div>', 'Next post link' );
$result = ob_get_contents();
ob_end_clean();
return $result;
}
function prev_shortcode($atts) {
global $post;
ob_start();
previous_post_link( '<div class="nav-previous">%link</div>', 'Previous post link' );
$result = ob_get_contents();
ob_end_clean();
return $result;
}
|
wordpress
|
{
"language": "en",
"length": 278,
"provenance": "stackexchange_00019.jsonl.gz:408025",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12904"
}
|
[
0.056304931640625,
-0.0195465087890625,
0.059600830078125,
-0.0153656005859375,
-0.01001739501953125,
0.00481414794921875,
0.029296875,
-0.04736328125,
-0.0106964111328125,
0.0282440185546875,
-0.057373046875,
0.0245361328125,
-0.048980712890625,
0.00701904296875,
-0.0246124267578125,
-0.051971435546875,
0.045806884765625,
-0.0304412841796875,
0.03607177734375,
-0.006626129150390625,
-0.0020599365234375,
0.0166473388671875,
0.05206298828125,
0.0867919921875,
0.0017948150634765625,
0.0082855224609375,
0.045654296875,
-0.036407470703125,
0.00494384765625,
-0.0114898681640625,
0.01471710205078125,
-0.01062774658203125,
0.03082275390625,
0.011322021484375,
-0.0259552001953125,
0.00447845458984375,
-0.02496337890625,
0.005962371826171875,
0.00594329833984375,
-0.0175628662109375,
0.0186920166015625,
0.0017480850219726562,
0.05810546875,
-0.02569580078125,
0.006134033203125,
-0.0261077880859375,
0.0236663818359375,
-0.04736328125,
-0.004764556884765625,
-0.0244598388671875,
0.051116943359375,
-0.0005307197570800781,
0.058441162109375,
0.0057830810546875,
-0.019256591796875,
-0.01436614990234375,
-0.0374755859375,
-0.05792236328125,
0.034454345703125,
0.0246734619140625,
-0.00312042236328125,
-0.05181884765625,
0.0192413330078125,
-0.05426025390625,
0.0016078948974609375,
0.01529693603515625,
0.0101776123046875,
0.00635528564453125,
-0.0136566162109375,
0.028533935546875,
0.04681396484375,
-0.03204345703125,
-0.01800537109375,
-0.020263671875,
-0.018218994140625,
0.0304412841796875,
0.00616455078125,
-0.0010662078857421875,
0.0014314651489257812,
0.01513671875,
-0.032196044921875,
0.0008220672607421875,
-0.0295867919921875,
-0.0296630859375,
-0.0022792816162109375,
-0.02655029296875,
-0.0249786376953125,
0.01291656494140625,
-0.01617431640625,
-0.041656494140625,
-0.02484130859375,
0.00920867919921875,
-0.0025634765625,
-0.0267486572265625,
-0.048919677734375,
-0.007381439208984375,
0.0134429931640625,
0.06719970703125,
-0.01215362548828125,
0.02130126953125,
-0.01415252685546875,
-0.0227813720703125,
0.026824951171875,
-0.055938720703125,
0.0008282661437988281,
0.006023406982421875,
-0.030609130859375,
0.01220703125,
0.04632568359375,
0.0560302734375,
-0.0117950439453125,
0.013671875,
-0.02044677734375,
-0.0086212158203125,
-0.04296875,
0.0264129638671875,
-0.049713134765625,
-0.01134490966796875,
-0.005035400390625,
-0.01172637939453125,
0.00568389892578125,
0.00839996337890625,
0.042724609375,
-0.05926513671875,
0.01560211181640625,
0.002269744873046875,
-0.036224365234375,
-0.04827880859375,
0.046783447265625,
0.03985595703125,
-0.037933349609375,
0.00860595703125,
0.0374755859375,
0.00592041015625,
-0.00534820556640625,
-0.0262451171875,
-0.024566650390625,
-0.0242462158203125,
-0.01268768310546875,
-0.006317138671875,
-0.01308441162109375,
0.006549835205078125,
0.032470703125,
-0.028228759765625,
0.0174560546875,
0.01035308837890625,
0.006038665771484375,
0.0150604248046875,
0.0160675048828125,
-0.0576171875,
0.0362548828125,
-0.03057861328125,
0.0443115234375,
0.0023746490478515625,
-0.0550537109375,
0.006847381591796875,
-0.0022983551025390625,
-0.0037078857421875,
-0.032135009765625,
-0.02593994140625,
0.029510498046875,
0.00955963134765625,
0.01031494140625,
-0.07635498046875,
-0.090576171875,
-0.0294189453125,
-0.08209228515625,
-0.010589599609375,
0.0189208984375,
0.08441162109375,
0.02752685546875,
-0.009796142578125,
-0.0305023193359375,
0.0133056640625,
-0.00948333740234375,
-0.0238037109375,
-0.00928497314453125,
-0.00841522216796875,
0.01727294921875,
0.0345458984375,
-0.0024242401123046875,
-0.028350830078125,
0.0307769775390625,
-0.00989532470703125,
-0.043853759765625,
0.0288543701171875,
0.027496337890625,
0.08447265625,
0.0026836395263671875,
0.0379638671875,
0.005245208740234375,
-0.0033283233642578125,
-0.01605224609375,
-0.0052947998046875,
0.010345458984375,
-0.038970947265625,
0.02215576171875,
-0.01372528076171875,
0.00954437255859375,
0.00800323486328125,
-0.03802490234375,
0.0009675025939941406,
-0.008819580078125,
0.0287933349609375,
-0.0081787109375,
-0.00333404541015625,
-0.00908660888671875,
0.0242156982421875,
-0.0352783203125,
-0.03070068359375,
0.0167694091796875,
-0.043121337890625,
0.0171051025390625,
-0.049835205078125,
-0.0197601318359375,
0.05224609375,
-0.0190582275390625,
-0.00405120849609375,
0.0122528076171875,
0.0265655517578125,
0.01348876953125,
0.0179290771484375,
-0.01122283935546875,
-0.01392364501953125,
0.05023193359375,
-0.01123046875,
-0.0193939208984375,
-0.03167724609375,
-0.042724609375,
0.0254669189453125,
-0.11785888671875,
0.05194091796875,
-0.008514404296875,
-0.036224365234375,
-0.05316162109375,
0.01383209228515625,
0.019683837890625,
0.0250091552734375,
0.0009918212890625,
0.0241546630859375,
0.036834716796875,
0.035736083984375,
-0.004703521728515625,
-0.0099029541015625,
0.05047607421875,
0.005062103271484375,
0.03204345703125,
-0.02813720703125,
-0.01302337646484375,
0.0609130859375,
0.048736572265625,
0.044586181640625,
-0.0159454345703125,
-0.007167816162109375,
0.0012140274047851562,
0.027099609375,
-0.00867462158203125,
0.01922607421875,
0.004608154296875,
-0.02423095703125,
0.01016998291015625,
-0.04632568359375,
-0.0274200439453125,
-0.02276611328125,
0.053924560546875,
-0.017486572265625,
0.042083740234375,
0.0069732666015625,
-0.0236053466796875,
0.00039076805114746094,
0.005481719970703125,
0.00405120849609375,
0.004825592041015625,
-0.0018491744995117188,
0.017730712890625,
0.04315185546875,
-0.0216827392578125,
-0.01314544677734375,
0.0209197998046875,
-0.0028743743896484375,
-0.0085296630859375,
0.050872802734375,
-0.0153656005859375,
-0.0167694091796875,
-0.0025634765625,
-0.038421630859375,
-0.0200347900390625,
-0.004611968994140625,
0.002933502197265625,
-0.01654052734375,
0.0033016204833984375,
0.04058837890625,
-0.03289794921875,
0.058135986328125,
0.03448486328125,
-0.012420654296875,
-0.0235595703125,
-0.03125,
0.026397705078125,
-0.03253173828125,
0.006763458251953125,
0.0576171875,
-0.00440216064453125,
0.00009781122207641602,
-0.004978179931640625,
0.0236968994140625,
-0.0025844573974609375,
-0.00024509429931640625,
-0.0095672607421875,
-0.0198974609375,
-0.030792236328125,
-0.0072021484375,
0.039031982421875,
0.0286865234375,
0.01092529296875,
-0.0177764892578125,
0.007656097412109375,
0.040313720703125,
-0.041656494140625,
-0.0472412109375,
0.02191162109375,
-0.04730224609375,
0.0352783203125,
0.01947021484375,
-0.022125244140625,
-0.039276123046875,
0.068359375,
0.00910186767578125,
-0.03143310546875,
-0.0212860107421875,
-0.00484466552734375,
-0.044525146484375,
-0.06268310546875,
-0.0014705657958984375,
0.0084381103515625,
0.0206146240234375,
-0.0008473396301269531,
0.0301361083984375,
-0.0029201507568359375,
-0.01549530029296875,
0.01221466064453125,
-0.0093994140625,
-0.017669677734375,
-0.016082763671875,
0.005733489990234375,
-0.00284576416015625,
-0.0205535888671875,
0.0051727294921875,
0.006618499755859375,
0.0124359130859375,
-0.00403594970703125,
0.006832122802734375,
-0.0173492431640625,
0.049774169921875,
0.0367431640625,
0.035003662109375,
0.01226806640625,
0.0435791015625,
0.06414794921875,
0.0186767578125,
0.0007309913635253906,
-0.006786346435546875,
-0.039459228515625,
-0.0281524658203125,
-0.004863739013671875,
0.005828857421875,
-0.013824462890625,
0.00927734375,
-0.0019044876098632812,
0.007717132568359375,
0.02423095703125,
-0.01155853271484375,
-0.01410675048828125,
-0.0097808837890625,
-0.009185791015625,
-0.013641357421875,
0.006683349609375,
-0.017242431640625,
0.025543212890625,
-0.00862884521484375,
0.037628173828125,
-0.008880615234375,
0.01352691650390625,
-0.04742431640625,
-0.0457763671875,
0.052398681640625,
-0.016448974609375,
0.037689208984375,
-0.05303955078125,
-0.040252685546875,
-0.016937255859375,
0.099853515625,
-0.10589599609375,
-0.00495147705078125,
0.0203704833984375,
0.00330352783203125,
0.04119873046875,
-0.01311492919921875,
-0.0655517578125,
-0.04296875,
-0.08819580078125,
0.0272979736328125,
-0.0121612548828125,
0.00044798851013183594,
-0.0273590087890625,
0.002277374267578125,
-0.06561279296875,
-0.0450439453125,
0.023651123046875,
-0.0108184814453125,
0.016571044921875,
0.01030731201171875,
-0.02850341796875,
0.0037250518798828125,
-0.04437255859375,
-0.0099639892578125,
-0.0203094482421875,
-0.01018524169921875,
0.0118408203125,
0.036895751953125,
0.032196044921875,
-0.05267333984375,
-0.037322998046875,
0.0010671615600585938,
0.0019359588623046875,
-0.0124359130859375,
0.0210113525390625,
0.0170440673828125,
0.023345947265625,
0.0006570816040039062,
-0.0193939208984375,
-0.0227508544921875,
0.00722503662109375,
0.0229644775390625,
0.001495361328125,
0.05792236328125,
-0.05078125,
-0.0280303955078125,
-0.033111572265625,
-0.03564453125,
-0.0205841064453125,
-0.0360107421875,
0.0248565673828125,
0.06689453125,
-0.0036678314208984375,
0.02752685546875,
-0.06683349609375,
-0.051361083984375,
0.022064208984375,
0.0010852813720703125,
-0.033416748046875,
-0.00115203857421875,
0.0118408203125,
0.03021240234375,
-0.0272216796875,
0.025238037109375,
0.02630615234375,
0.053314208984375,
0.01175689697265625,
-0.004638671875,
-0.0228271484375,
-0.04345703125,
0.055389404296875,
0.01033782958984375,
-0.0216064453125,
-0.00555419921875,
0.037750244140625,
0.01474761962890625,
-0.005779266357421875,
-0.00858306884765625,
-0.0024547576904296875,
0.01073455810546875,
0.0037555694580078125,
-0.013092041015625,
-0.0285491943359375,
-0.03033447265625,
0.054046630859375,
0.024810791015625,
0.027679443359375,
-0.04425048828125,
0.0043487548828125,
-0.022796630859375,
0.0885009765625,
0.0121307373046875,
0.054290771484375,
-0.00001245737075805664,
-0.01026153564453125,
0.00930023193359375,
-0.0218658447265625,
0.00101470947265625,
-0.00238800048828125,
0.01302337646484375,
0.0294036865234375,
-0.039031982421875,
-0.0296478271484375,
0.005001068115234375,
-0.006572723388671875,
0.07269287109375,
0.0254974365234375,
-0.01122283935546875,
-0.03887939453125,
-0.014251708984375,
-0.0006108283996582031,
-0.034271240234375,
-0.00589752197265625,
0.035552978515625,
0.0166015625,
-0.002685546875,
0.007843017578125,
-0.020843505859375,
0.00428009033203125,
-0.03680419921875,
0.0018396377563476562,
0.003475189208984375,
-0.01175689697265625,
-0.0012483596801757812,
0.0650634765625,
-0.04315185546875,
0.051513671875,
-0.0003714561462402344,
0.00043892860412597656,
0.0260772705078125,
0.008392333984375,
0.0241851806640625,
-0.012054443359375,
0.0023441314697265625,
0.003719329833984375,
0.03851318359375,
-0.0225677490234375,
-0.00620269775390625,
0.0283660888671875,
0.04217529296875,
0.003986358642578125,
-0.0079193115234375,
-0.0009293556213378906,
-0.00616455078125,
-0.016082763671875,
0.01224517822265625,
0.05975341796875,
0.01270294189453125,
-0.004932403564453125,
0.01141357421875,
0.014495849609375,
0.034637451171875,
-0.004756927490234375,
0.00518035888671875,
-0.01209259033203125,
0.020355224609375,
-0.042877197265625,
0.0242919921875,
-0.023223876953125,
-0.03155517578125,
0.00952911376953125,
-0.01111602783203125,
-0.0109405517578125,
0.032745361328125,
0.00628662109375,
-0.01435089111328125,
-0.0218048095703125,
0.009796142578125,
-0.032318115234375,
0.0198211669921875,
-0.0430908203125,
0.0180816650390625,
-0.05633544921875,
0.01093292236328125,
0.0171661376953125,
0.01239013671875,
-0.0213165283203125,
-0.0003826618194580078,
-0.0228729248046875,
-0.005237579345703125,
0.00433349609375,
-0.046142578125,
-0.0121307373046875,
-0.0284271240234375,
-0.0102081298828125,
0.0258941650390625,
-0.026702880859375,
-0.007152557373046875,
0.0205841064453125,
0.007114410400390625,
-0.0191497802734375,
0.038177490234375,
0.0005526542663574219,
0.0455322265625,
0.0277557373046875,
0.057037353515625,
0.03460693359375,
0.0161590576171875,
-0.034423828125,
-0.02777099609375,
0.03399658203125,
-0.02264404296875,
-0.051025390625,
-0.04052734375,
-0.0219268798828125,
0.0167236328125,
0.0645751953125,
-0.01837158203125,
0.036773681640625,
0.01039886474609375,
0.0064544677734375,
0.0014791488647460938,
-0.0491943359375,
0.0242462158203125,
-0.0157012939453125,
0.09039306640625,
-0.004306793212890625,
0.01090240478515625,
-0.016204833984375,
-0.019622802734375,
0.0032958984375,
0.00798797607421875,
0.01654052734375,
-0.005157470703125,
-0.0222930908203125,
0.03466796875,
0.082763671875,
0.0171356201171875,
0.05572509765625,
0.037139892578125,
0.018646240234375,
0.0292510986328125,
-0.01177978515625,
0.04388427734375,
0.03216552734375,
0.08837890625,
-0.0113067626953125,
-0.033203125,
0.03753662109375,
-0.05877685546875,
0.014312744140625,
0.0244293212890625,
0.046234130859375,
-0.0333251953125,
-0.007091522216796875,
0.01085662841796875,
-0.033843994140625,
0.006214141845703125,
0.01412200927734375,
0.0231170654296875,
0.017333984375,
0.0191192626953125,
-0.00740814208984375,
0.002635955810546875,
0.0301666259765625,
0.00036406517028808594,
-0.0015783309936523438,
-0.0345458984375,
0.004741668701171875,
0.0010976791381835938,
-0.023406982421875,
-0.01018524169921875,
0.0070343017578125,
-0.00921630859375,
-0.040191650390625,
-0.01202392578125,
0.00626373291015625,
-0.0364990234375,
-0.07244873046875,
0.01517486572265625,
0.0052642822265625,
0.00923919677734375,
0.00365447998046875,
-0.0001800060272216797,
0.016998291015625,
0.03619384765625,
-0.0142822265625,
0.01497650146484375,
0.01361083984375,
-0.00707244873046875,
0.0170745849609375,
-0.01308441162109375,
0.023895263671875,
0.02813720703125,
-0.01885986328125,
0.01227569580078125,
0.00485992431640625,
-0.013427734375,
-0.005306243896484375,
-0.0030612945556640625,
0.06878662109375,
-0.02618408203125,
-0.0250396728515625,
0.0156402587890625,
-0.01186370849609375,
-0.006237030029296875,
-0.005462646484375,
0.001911163330078125,
-0.049072265625,
0.00423431396484375,
-0.0135345458984375,
-0.01678466796875,
0.0017881393432617188,
-0.024169921875,
-0.09307861328125,
0.10076904296875,
0.00876617431640625,
0.036773681640625,
-0.01003265380859375,
0.037506103515625,
-0.004405975341796875,
0.018798828125,
-0.031890869140625,
0.05718994140625,
-0.0108489990234375,
0.06304931640625,
-0.05609130859375,
-0.0230865478515625,
0.0272979736328125,
0.071044921875,
0.00899505615234375,
0.01812744140625,
-0.0153045654296875,
0.0016927719116210938,
0.033355712890625,
0.00847625732421875,
-0.025787353515625,
0.033660888671875,
-0.00969696044921875,
0.013824462890625,
0.01473236083984375,
-0.0169830322265625,
0.03521728515625,
0.01079559326171875,
-0.02947998046875,
0.018310546875,
-0.00864410400390625,
-0.03350830078125,
0.005565643310546875,
0.0013828277587890625,
-0.039886474609375,
0.0231781005859375,
-0.00856781005859375,
0.03125,
-0.01396942138671875,
0.055908203125,
0.001964569091796875,
-0.002902984619140625,
-0.038970947265625,
-0.02423095703125,
0.0293426513671875,
-0.0022029876708984375,
0.045989990234375,
0.04644775390625,
0.024932861328125,
0.0567626953125,
0.0165863037109375,
0.03717041015625,
0.0223236083984375,
-0.0098419189453125,
0.07769775390625,
0.01336669921875,
0.0236358642578125,
-0.080322265625,
-0.0128936767578125,
0.045135498046875,
0.09619140625,
-0.05999755859375,
0.003002166748046875,
0.00395965576171875,
0.005634307861328125,
-0.004718780517578125,
-0.030792236328125,
0.0229949951171875,
-0.0174560546875,
-0.00664520263671875,
-0.03125,
-0.00814056396484375,
0.0235595703125,
0.052001953125,
0.0087738037109375,
0.00079345703125,
-0.045135498046875,
-0.039459228515625,
-0.040496826171875,
0.02392578125,
0.029876708984375,
0.04327392578125,
-0.0091094970703125,
0.040985107421875,
-0.0313720703125,
0.00087738037109375,
0.02777099609375,
0.007049560546875,
-0.0396728515625,
-0.0232696533203125,
0.0188140869140625,
-0.0305023193359375,
-0.06329345703125,
0.01373291015625,
0.02105712890625,
0.06719970703125,
0.0249481201171875,
0.005207061767578125,
0.017547607421875,
0.0075531005859375,
0.04437255859375,
-0.024993896484375,
0.015777587890625,
-0.0190277099609375,
0.0024051666259765625,
-0.00911712646484375,
-0.0245208740234375,
-0.0185546875,
-0.01025390625,
0.034912109375,
-0.04180908203125,
0.05499267578125,
-0.00885009765625,
-0.00942230224609375,
0.0504150390625,
-0.00437164306640625,
0.047821044921875,
-0.0034732818603515625,
-0.040557861328125,
0.017669677734375,
-0.0614013671875,
-0.066650390625,
0.016998291015625,
0.023956298828125,
-0.0279998779296875,
0.024871826171875,
0.01404571533203125,
-0.031707763671875,
0.00733184814453125,
0.0308685302734375,
0.01340484619140625,
0.04229736328125,
0.0189361572265625,
0.00946807861328125,
-0.05987548828125,
-0.02337646484375,
-0.0291290283203125,
0.040374755859375,
0.04718017578125,
-0.03070068359375,
0.028594970703125,
0.049407958984375,
-0.007465362548828125,
0.0233154296875,
-0.0311737060546875,
-0.03363037109375,
0.07806396484375,
-0.0025634765625,
-0.01406097412109375,
-0.0322265625,
0.0253753662109375,
0.0208587646484375,
0.0501708984375,
-0.0233154296875,
0.01297760009765625,
-0.021484375,
0.01200103759765625,
-0.035064697265625,
0.01153564453125,
-0.02703857421875,
-0.01081085205078125,
-0.05224609375,
-0.01299285888671875,
0.024658203125,
-0.0187225341796875,
-0.051300048828125,
0.02783203125,
0.05487060546875,
-0.0201416015625,
0.0469970703125,
-0.0289764404296875,
0.07281494140625,
0.035736083984375,
0.01262664794921875,
0.024017333984375,
0.01494598388671875,
-0.01446533203125,
0.0214996337890625,
0.019378662109375,
-0.0279388427734375,
0.0281829833984375,
-0.0728759765625,
0.01476287841796875,
0.06524658203125,
0.08685302734375,
-0.0025196075439453125,
0.053619384765625,
0.017852783203125,
-0.0227508544921875,
0.0180206298828125,
-0.01544189453125,
-0.0290374755859375,
-0.052337646484375,
0.00525665283203125,
0.046478271484375,
-0.025299072265625,
0.01641845703125,
-0.06854248046875,
-0.0003955364227294922,
0.024261474609375,
0.00720977783203125,
-0.051849365234375,
0.012969970703125,
0.0187225341796875,
0.034698486328125,
-0.0101470947265625,
-0.00803375244140625,
-0.00800323486328125,
-0.021697998046875,
-0.024139404296875,
-0.038543701171875,
-0.05401611328125,
0.0433349609375,
-0.049560546875,
0.002979278564453125,
0.01641845703125,
-0.0121002197265625,
-0.0230560302734375,
0.027618408203125,
0.0029773712158203125,
0.0677490234375,
0.0130462646484375,
-0.0223236083984375,
0.039459228515625,
-0.0006685256958007812,
-0.01418304443359375,
-0.058624267578125,
0.003360748291015625,
-0.054351806640625,
0.005889892578125,
0.003582000732421875,
-0.0272216796875,
-0.005828857421875,
-0.048828125,
-0.09613037109375,
0.055511474609375,
-0.013946533203125,
-0.05108642578125,
-0.05572509765625,
0.01500701904296875,
0.01203155517578125,
-0.0160064697265625,
-0.00024962425231933594,
-0.032958984375,
-0.03485107421875,
0.007080078125,
0.010711669921875,
0.080078125,
0.004711151123046875,
0.0169219970703125,
0.00984954833984375,
0.0104217529296875,
-0.01505279541015625,
-0.0013399124145507812,
0.01092529296875,
-0.0098419189453125,
0.01125335693359375,
0.0247955322265625,
-0.063232421875,
-0.0140838623046875,
-0.0159759521484375,
0.021942138671875,
0.01045989990234375,
-0.07708740234375,
-0.0230255126953125,
-0.0291900634765625,
0.050445556640625,
-0.002681732177734375,
0.01367950439453125,
-0.01364898681640625,
0.03948974609375,
0.03399658203125,
-0.029449462890625,
-0.00429534912109375,
0.004642486572265625,
-0.02203369140625,
-0.043731689453125,
-0.02362060546875,
-0.00934600830078125,
-0.010345458984375,
-0.0245819091796875,
-0.0286865234375,
-0.0014142990112304688,
-0.0238189697265625,
0.01045989990234375,
-0.04180908203125,
0.02996826171875,
0.06396484375,
-0.0369873046875,
0.03240966796875,
-0.0042877197265625,
-0.006938934326171875,
0.036590576171875,
-0.0051116943359375,
0.01309967041015625,
0.0018510818481445312,
-0.0234222412109375,
0.003116607666015625,
0.02447509765625,
0.040313720703125,
-0.0092926025390625,
-0.0214385986328125,
-0.0185394287109375,
0.0201263427734375,
0.007717132568359375,
0.0023746490478515625,
-0.0268096923828125,
0.049224853515625,
0.0230865478515625,
0.07257080078125,
-0.00807952880859375,
0.08209228515625,
0.024139404296875,
0.0294189453125,
-0.0190887451171875,
0.0024433135986328125,
-0.00807952880859375,
-0.02423095703125,
-0.006862640380859375,
0.01457977294921875,
-0.0022220611572265625,
-0.0222930908203125,
0.011627197265625,
0.00841522216796875,
0.0086669921875,
0.0096588134765625
] |
042c1db85ed86ff4299ba8b05685835dc5b741a8
|
Wordpress Stackexchange
Q: What is the constant WP_USE_THEMES for? Regarding the WP_USE_THEMES constant, the Codex states:
If you are using The Loop inside your
own design (and your own design is not
a template), set WP_USE_THEMES to
false.
But what is the actual effect on WordPress from WP_USE_THEMES being set to true or false? I would like to know how it's used by WP.
A: This is only used in template-loader.php, to determine whether it should load a theme file or not. The normal "boot sequence" of WordPress (started in wp-blog-header.php) loads the plugins, parses the URL, executes a post query based on the URL, and calls the theme. This main post query is typically used in "The Loop". So if you want all the advantages of URL parsing but not display it using the site theme, you can set WP_USE_THEMES to false and it will not execute that final step.
|
Q: What is the constant WP_USE_THEMES for? Regarding the WP_USE_THEMES constant, the Codex states:
If you are using The Loop inside your
own design (and your own design is not
a template), set WP_USE_THEMES to
false.
But what is the actual effect on WordPress from WP_USE_THEMES being set to true or false? I would like to know how it's used by WP.
A: This is only used in template-loader.php, to determine whether it should load a theme file or not. The normal "boot sequence" of WordPress (started in wp-blog-header.php) loads the plugins, parses the URL, executes a post query based on the URL, and calls the theme. This main post query is typically used in "The Loop". So if you want all the advantages of URL parsing but not display it using the site theme, you can set WP_USE_THEMES to false and it will not execute that final step.
A: Based on this line in The Loop documentation: <?php define( 'WP_USE_THEMES', false ); get_header(); ?> I would assume that the purpose of WP_USE_THEMES in this example is to run action handlers registered to the get_header hook, but not actually execute the header template file.
|
wordpress
|
{
"language": "en",
"length": 194,
"provenance": "stackexchange_00019.jsonl.gz:408031",
"question_score": "39",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12919"
}
|
[
0.038421630859375,
-0.01297760009765625,
-0.007404327392578125,
0.0002751350402832031,
-0.0034847259521484375,
-0.038421630859375,
0.029693603515625,
-0.0272369384765625,
0.01280975341796875,
0.03363037109375,
-0.01233673095703125,
-0.02484130859375,
0.017547607421875,
-0.0194549560546875,
-0.029998779296875,
-0.021453857421875,
0.0265350341796875,
-0.0142974853515625,
0.00951385498046875,
-0.0202178955078125,
0.00750732421875,
-0.0032863616943359375,
0.005634307861328125,
0.056854248046875,
0.0143585205078125,
-0.04302978515625,
0.06158447265625,
-0.0288848876953125,
0.0008087158203125,
-0.041748046875,
0.007656097412109375,
0.0283203125,
0.0288848876953125,
0.023468017578125,
-0.0164337158203125,
0.0158538818359375,
0.0084686279296875,
-0.00039386749267578125,
0.01123809814453125,
0.01421356201171875,
0.01172637939453125,
-0.01129913330078125,
0.0025787353515625,
-0.035308837890625,
-0.0143585205078125,
-0.0143890380859375,
0.0142974853515625,
-0.038543701171875,
0.01116180419921875,
-0.0012750625610351562,
0.0201416015625,
0.001186370849609375,
0.037872314453125,
-0.008819580078125,
-0.0305328369140625,
-0.035125732421875,
-0.01092529296875,
-0.00801849365234375,
0.045806884765625,
-0.037261962890625,
-0.0455322265625,
-0.046600341796875,
0.04913330078125,
-0.00423431396484375,
0.035308837890625,
-0.004520416259765625,
-0.040802001953125,
0.036651611328125,
-0.0513916015625,
0.037872314453125,
0.032928466796875,
-0.0736083984375,
-0.01126861572265625,
-0.018768310546875,
-0.0118560791015625,
0.0250701904296875,
0.0177459716796875,
0.004306793212890625,
0.00278472900390625,
0.0130615234375,
-0.007038116455078125,
-0.0179290771484375,
-0.053619384765625,
-0.017669677734375,
0.026885986328125,
0.0244293212890625,
-0.00235748291015625,
-0.0240020751953125,
-0.0300750732421875,
-0.0443115234375,
-0.030059814453125,
0.027984619140625,
-0.049835205078125,
-0.03607177734375,
-0.02398681640625,
-0.036712646484375,
0.01044464111328125,
0.0400390625,
-0.0229034423828125,
0.006801605224609375,
-0.0192413330078125,
-0.01375579833984375,
0.0020008087158203125,
-0.0267486572265625,
0.0122833251953125,
0.050201416015625,
-0.02655029296875,
0.01296234130859375,
0.0518798828125,
0.0386962890625,
0.0290374755859375,
0.007122039794921875,
-0.012725830078125,
-0.0196380615234375,
-0.045654296875,
0.0205078125,
-0.048980712890625,
-0.005340576171875,
-0.00627899169921875,
0.01447296142578125,
0.0120697021484375,
0.049224853515625,
0.010772705078125,
-0.02197265625,
-0.0276336669921875,
0.0032711029052734375,
-0.0100250244140625,
-0.06884765625,
-0.03131103515625,
0.05499267578125,
-0.01910400390625,
-0.01361846923828125,
0.02154541015625,
0.040863037109375,
0.006710052490234375,
-0.03326416015625,
0.00577545166015625,
0.02374267578125,
-0.01403045654296875,
0.0170440673828125,
0.005130767822265625,
-0.0261383056640625,
0.0032291412353515625,
-0.0232696533203125,
0.00152587890625,
0.01415252685546875,
0.00894927978515625,
0.0225982666015625,
-0.0167999267578125,
-0.030670166015625,
0.037200927734375,
-0.031280517578125,
-0.0036830902099609375,
0.03582763671875,
0.0152435302734375,
-0.00676727294921875,
0.0238494873046875,
-0.0211639404296875,
0.01409149169921875,
-0.031646728515625,
-0.051361083984375,
-0.017059326171875,
0.01715087890625,
-0.0305023193359375,
-0.040374755859375,
0.035919189453125,
0.0221710205078125,
0.00945281982421875,
0.0218048095703125,
0.0195770263671875,
0.0033550262451171875,
-0.0268402099609375,
0.006534576416015625,
0.0191497802734375,
0.0015916824340820312,
0.025970458984375,
0.0187835693359375,
0.046112060546875,
0.0152587890625,
0.035125732421875,
0.0030078887939453125,
-0.045074462890625,
0.06634521484375,
-0.01580810546875,
-0.06451416015625,
0.015777587890625,
0.0017251968383789062,
0.038543701171875,
0.0229034423828125,
0.0092010498046875,
0.050445556640625,
0.00438690185546875,
-0.01021575927734375,
0.023773193359375,
0.016387939453125,
-0.03314208984375,
-0.07818603515625,
-0.0150146484375,
-0.02911376953125,
-0.01143646240234375,
0.031341552734375,
-0.01303863525390625,
0.01187896728515625,
-0.059234619140625,
-0.0947265625,
-0.0006890296936035156,
-0.040771484375,
0.045440673828125,
-0.0033416748046875,
0.0208892822265625,
0.0021228790283203125,
-0.0104827880859375,
-0.0155792236328125,
0.003993988037109375,
-0.021453857421875,
0.0183258056640625,
-0.01617431640625,
0.03863525390625,
0.0178680419921875,
-0.005344390869140625,
0.044036865234375,
-0.0273590087890625,
0.042938232421875,
0.021514892578125,
0.033660888671875,
-0.0086517333984375,
0.00023126602172851562,
-0.0240631103515625,
0.01483154296875,
-0.0019626617431640625,
-0.00731658935546875,
0.0281982421875,
0.02117919921875,
0.035980224609375,
-0.00795745849609375,
-0.006992340087890625,
-0.0018262863159179688,
-0.06475830078125,
-0.0012159347534179688,
0.045745849609375,
0.036102294921875,
0.03271484375,
-0.048095703125,
-0.0716552734375,
0.02691650390625,
-0.01983642578125,
0.021942138671875,
-0.032806396484375,
0.044097900390625,
0.026763916015625,
-0.01412200927734375,
-0.03948974609375,
0.03912353515625,
-0.047027587890625,
0.0390625,
0.0251312255859375,
-0.035675048828125,
-0.006305694580078125,
0.030364990234375,
-0.035736083984375,
0.01279449462890625,
0.006008148193359375,
-0.00141143798828125,
-0.0104827880859375,
0.044891357421875,
-0.006549835205078125,
0.005840301513671875,
-0.0088958740234375,
-0.0460205078125,
0.0224456787109375,
0.031494140625,
-0.0289459228515625,
-0.0074920654296875,
0.00782012939453125,
0.0016002655029296875,
0.01641845703125,
-0.038177490234375,
0.004566192626953125,
0.00798797607421875,
-0.01302337646484375,
-0.050750732421875,
-0.03802490234375,
-0.0665283203125,
-0.01313018798828125,
0.00013375282287597656,
-0.07098388671875,
0.01381683349609375,
0.01265716552734375,
0.0655517578125,
-0.012451171875,
0.004970550537109375,
0.0082855224609375,
-0.03253173828125,
0.06768798828125,
0.00959014892578125,
-0.04766845703125,
-0.0325927734375,
-0.05419921875,
0.03533935546875,
-0.037567138671875,
0.010711669921875,
0.060150146484375,
0.0196380615234375,
-0.01261138916015625,
0.0248260498046875,
0.0158538818359375,
0.03839111328125,
0.032623291015625,
0.01520538330078125,
0.004108428955078125,
-0.046234130859375,
-0.0227508544921875,
0.025543212890625,
0.0182342529296875,
0.01096343994140625,
-0.0172119140625,
-0.0018434524536132812,
0.033294677734375,
-0.029937744140625,
-0.048675537109375,
0.0190887451171875,
-0.04913330078125,
-0.0207977294921875,
-0.0357666015625,
-0.0216827392578125,
0.004177093505859375,
-0.0261688232421875,
-0.01265716552734375,
-0.00592041015625,
-0.03192138671875,
-0.0313720703125,
-0.0804443359375,
-0.0775146484375,
-0.03533935546875,
0.011138916015625,
0.012420654296875,
-0.0143280029296875,
0.09490966796875,
0.01364898681640625,
-0.029388427734375,
-0.0195465087890625,
-0.005710601806640625,
-0.019500732421875,
-0.00920867919921875,
0.0297698974609375,
-0.01096343994140625,
-0.002521514892578125,
0.0146636962890625,
-0.03741455078125,
0.021759033203125,
-0.011993408203125,
-0.038177490234375,
-0.002475738525390625,
-0.01824951171875,
0.0007152557373046875,
0.017059326171875,
0.0007467269897460938,
-0.0188140869140625,
0.0128936767578125,
-0.05963134765625,
-0.0469970703125,
0.0157012939453125,
-0.057159423828125,
0.016510009765625,
0.035369873046875,
-0.0206451416015625,
0.0105133056640625,
-0.01157379150390625,
0.0246124267578125,
-0.00334930419921875,
-0.01543426513671875,
-0.031982421875,
0.107177734375,
0.0107269287109375,
0.044830322265625,
-0.037139892578125,
0.005382537841796875,
-0.0401611328125,
0.004573822021484375,
-0.005313873291015625,
-0.00888824462890625,
-0.0026569366455078125,
-0.017333984375,
-0.01213836669921875,
-0.010162353515625,
0.0297698974609375,
-0.008544921875,
0.007404327392578125,
-0.002620697021484375,
-0.00495147705078125,
-0.00640106201171875,
0.0450439453125,
-0.042083740234375,
-0.0018815994262695312,
0.00231170654296875,
0.01483917236328125,
0.00616455078125,
-0.02056884765625,
-0.040496826171875,
-0.0254669189453125,
-0.058868408203125,
0.0059661865234375,
-0.0194549560546875,
-0.007110595703125,
-0.009796142578125,
0.00647735595703125,
-0.029815673828125,
-0.040924072265625,
0.0211944580078125,
-0.0263824462890625,
0.0096588134765625,
-0.006526947021484375,
-0.00421905517578125,
-0.026824951171875,
0.0003275871276855469,
-0.036468505859375,
-0.06488037109375,
-0.01129913330078125,
0.0211944580078125,
0.0401611328125,
-0.0016527175903320312,
-0.0241241455078125,
-0.0124969482421875,
0.034423828125,
0.036041259765625,
0.06317138671875,
0.004436492919921875,
-0.0188140869140625,
0.00008040666580200195,
-0.0031223297119140625,
0.025848388671875,
-0.003833770751953125,
0.01233673095703125,
-0.003093719482421875,
-0.04840087890625,
-0.0018796920776367188,
-0.01126861572265625,
-0.0085296630859375,
0.034881591796875,
-0.04302978515625,
-0.0023059844970703125,
-0.0074920654296875,
0.0027675628662109375,
0.029510498046875,
-0.01117706298828125,
0.017608642578125,
-0.01548004150390625,
0.002178192138671875,
0.0595703125,
-0.02789306640625,
-0.001087188720703125,
-0.0009756088256835938,
0.1082763671875,
0.0178985595703125,
-0.021209716796875,
-0.0546875,
-0.00794219970703125,
0.036590576171875,
-0.043701171875,
0.034393310546875,
0.020965576171875,
-0.0345458984375,
0.057891845703125,
0.007793426513671875,
-0.0274658203125,
0.006381988525390625,
0.043548583984375,
-0.0206146240234375,
-0.056854248046875,
0.03814697265625,
-0.046539306640625,
0.0404052734375,
0.045440673828125,
0.0190277099609375,
-0.03753662109375,
0.0196533203125,
0.0250396728515625,
0.0159759521484375,
-0.045013427734375,
-0.03424072265625,
-0.01280975341796875,
0.0014505386352539062,
0.0262298583984375,
0.035797119140625,
0.01739501953125,
0.01270294189453125,
0.00286102294921875,
0.0150146484375,
0.015869140625,
0.0312042236328125,
0.024871826171875,
-0.00780487060546875,
0.034759521484375,
0.04193115234375,
0.004322052001953125,
-0.0079193115234375,
-0.006134033203125,
0.041717529296875,
-0.0198822021484375,
-0.0675048828125,
0.0006690025329589844,
-0.00763702392578125,
0.039764404296875,
0.049835205078125,
0.005138397216796875,
0.06573486328125,
-0.021484375,
-0.014312744140625,
-0.01055908203125,
-0.03131103515625,
-0.059814453125,
-0.046722412109375,
0.03839111328125,
0.02203369140625,
-0.00933074951171875,
0.0152435302734375,
0.01190948486328125,
0.055145263671875,
-0.011627197265625,
-0.020751953125,
0.01424407958984375,
0.0308990478515625,
0.00841522216796875,
0.01552581787109375,
0.0023784637451171875,
0.010040283203125,
-0.01264190673828125,
0.03515625,
-0.0377197265625,
0.004573822021484375,
0.0340576171875,
0.036865234375,
-0.04156494140625,
-0.042327880859375,
0.033538818359375,
-0.0173187255859375,
0.016571044921875,
0.031768798828125,
-0.036895751953125,
-0.001926422119140625,
-0.06805419921875,
-0.03875732421875,
0.0955810546875,
-0.0084075927734375,
-0.0167083740234375,
0.0309295654296875,
-0.016571044921875,
0.0006299018859863281,
0.035247802734375,
-0.0625,
0.0167999267578125,
0.033935546875,
-0.046356201171875,
-0.0175323486328125,
0.0177459716796875,
-0.0287628173828125,
-0.006748199462890625,
-0.0292510986328125,
-0.029052734375,
0.032958984375,
0.005916595458984375,
0.0189971923828125,
-0.0194091796875,
-0.0153350830078125,
0.01122283935546875,
0.0014591217041015625,
0.056243896484375,
0.004802703857421875,
-0.07916259765625,
0.02117919921875,
-0.053192138671875,
0.016448974609375,
-0.0753173828125,
-0.0863037109375,
-0.046051025390625,
-0.01312255859375,
0.01666259765625,
0.032257080078125,
-0.01438140869140625,
-0.038970947265625,
-0.034515380859375,
0.003444671630859375,
0.018096923828125,
0.039276123046875,
-0.0270843505859375,
0.041046142578125,
0.0195465087890625,
0.034423828125,
-0.00168609619140625,
-0.0008540153503417969,
-0.016082763671875,
-0.00791168212890625,
0.00434112548828125,
-0.01445770263671875,
-0.0230865478515625,
0.0224609375,
-0.044921875,
-0.01302337646484375,
0.047515869140625,
-0.005634307861328125,
0.053253173828125,
-0.0411376953125,
-0.01085662841796875,
-0.016357421875,
0.014862060546875,
-0.07196044921875,
0.0226593017578125,
0.016021728515625,
0.00262451171875,
-0.0078887939453125,
-0.01282501220703125,
-0.05291748046875,
0.03582763671875,
0.0191497802734375,
0.0029850006103515625,
0.01044464111328125,
-0.046630859375,
0.09088134765625,
0.09649658203125,
-0.033599853515625,
0.03546142578125,
0.016815185546875,
-0.0172882080078125,
0.03070068359375,
0.0499267578125,
-0.056610107421875,
-0.03411865234375,
0.054290771484375,
0.045867919921875,
-0.005054473876953125,
0.0484619140625,
-0.0182342529296875,
0.0175933837890625,
0.0810546875,
0.093017578125,
-0.09906005859375,
0.004459381103515625,
0.047393798828125,
0.005924224853515625,
0.005924224853515625,
-0.0110626220703125,
-0.002292633056640625,
-0.0222015380859375,
0.053070068359375,
-0.032196044921875,
-0.01739501953125,
0.007843017578125,
-0.02960205078125,
0.007354736328125,
0.0128936767578125,
0.06982421875,
-0.0021800994873046875,
-0.050140380859375,
-0.0252685546875,
0.0282135009765625,
-0.0150909423828125,
0.0096588134765625,
0.005062103271484375,
-0.0252532958984375,
-0.029876708984375,
-0.062225341796875,
-0.04083251953125,
-0.043609619140625,
-0.0137481689453125,
-0.00567626953125,
0.019622802734375,
-0.00876617431640625,
0.053558349609375,
-0.03558349609375,
0.04168701171875,
0.01739501953125,
0.0230255126953125,
-0.03680419921875,
-0.0176849365234375,
0.0411376953125,
0.05645751953125,
-0.042633056640625,
0.040069580078125,
0.00601959228515625,
-0.046875,
-0.0182342529296875,
-0.007312774658203125,
0.0843505859375,
-0.022674560546875,
-0.017913818359375,
0.027740478515625,
0.026336669921875,
-0.0193023681640625,
-0.02471923828125,
0.028900146484375,
-0.05377197265625,
-0.01629638671875,
-0.00738525390625,
-0.0243072509765625,
-0.042144775390625,
-0.037200927734375,
-0.024658203125,
0.1114501953125,
-0.07501220703125,
0.0240936279296875,
0.054168701171875,
0.04522705078125,
0.0020503997802734375,
0.043365478515625,
-0.01232147216796875,
0.0214080810546875,
0.0075225830078125,
0.0219879150390625,
-0.01513671875,
0.003742218017578125,
-0.006862640380859375,
0.017333984375,
0.01346588134765625,
-0.006229400634765625,
-0.01367950439453125,
0.0154876708984375,
0.07073974609375,
0.06396484375,
0.0283660888671875,
0.0027313232421875,
-0.02978515625,
0.039306640625,
0.0307464599609375,
-0.08001708984375,
0.0175323486328125,
-0.00974273681640625,
-0.0121002197265625,
-0.0055389404296875,
0.02801513671875,
0.0278778076171875,
0.03271484375,
0.020477294921875,
-0.06744384765625,
0.027801513671875,
0.06646728515625,
-0.00850677490234375,
-0.0167236328125,
-0.0004405975341796875,
0.0081634521484375,
-0.0389404296875,
0.000591278076171875,
-0.0202484130859375,
0.046142578125,
0.01025390625,
-0.0064544677734375,
-0.003787994384765625,
-0.008270263671875,
0.044403076171875,
-0.0244140625,
-0.01085662841796875,
0.03558349609375,
-0.0247344970703125,
-0.00557708740234375,
0.0276641845703125,
0.02899169921875,
0.0010128021240234375,
0.027618408203125,
-0.0128936767578125,
-0.00957489013671875,
-0.013397216796875,
-0.0357666015625,
0.01042938232421875,
-0.0071868896484375,
0.0012722015380859375,
-0.005748748779296875,
-0.0033473968505859375,
-0.031829833984375,
-0.005706787109375,
-0.0012407302856445312,
0.0052032470703125,
0.0347900390625,
-0.038848876953125,
0.0139617919921875,
0.07012939453125,
-0.0149688720703125,
0.035430908203125,
-0.00876617431640625,
0.00026106834411621094,
-0.00888824462890625,
0.0236968994140625,
0.012420654296875,
0.01297760009765625,
-0.043365478515625,
-0.00893402099609375,
-0.0220489501953125,
0.0576171875,
0.00469207763671875,
0.02496337890625,
-0.05413818359375,
-0.049774169921875,
0.0170135498046875,
0.055999755859375,
0.02947998046875,
0.007503509521484375,
0.041534423828125,
0.0196533203125,
-0.0237274169921875,
0.004497528076171875,
0.0304412841796875,
-0.02056884765625,
-0.00540924072265625,
-0.0102081298828125,
-0.014739990234375,
0.00897216796875,
-0.02203369140625,
-0.001056671142578125,
0.00598907470703125,
0.0244293212890625,
-0.0166168212890625,
0.033172607421875,
0.000037789344787597656,
0.01031494140625,
0.04241943359375,
-0.03387451171875,
0.021759033203125,
0.00699615478515625,
-0.04461669921875,
0.010406494140625,
-0.04315185546875,
-0.0293731689453125,
0.0071563720703125,
0.026885986328125,
0.002445220947265625,
0.00679779052734375,
-0.01222991943359375,
0.006488800048828125,
0.007678985595703125,
-0.005077362060546875,
-0.02423095703125,
-0.0071258544921875,
0.047271728515625,
-0.0181427001953125,
-0.0421142578125,
-0.005748748779296875,
-0.0046539306640625,
0.0243377685546875,
-0.0147705078125,
0.0675048828125,
-0.00333404541015625,
-0.00299835205078125,
0.0268707275390625,
-0.006793975830078125,
0.018829345703125,
0.0188751220703125,
0.003383636474609375,
0.0084228515625,
0.017364501953125,
-0.022918701171875,
-0.036712646484375,
0.0159759521484375,
0.0260772705078125,
-0.01495361328125,
0.0241546630859375,
-0.051483154296875,
0.0258026123046875,
-0.01287841796875,
-0.00998687744140625,
-0.03533935546875,
-0.05029296875,
-0.0450439453125,
0.01271820068359375,
0.00006508827209472656,
-0.0202484130859375,
-0.0303192138671875,
0.03558349609375,
-0.01528167724609375,
-0.010009765625,
0.01505279541015625,
-0.02362060546875,
-0.0224609375,
0.0156707763671875,
0.01457977294921875,
-0.02752685546875,
-0.01947021484375,
-0.027130126953125,
-0.019195556640625,
0.0007395744323730469,
0.0172882080078125,
-0.0206298828125,
-0.04644775390625,
0.036590576171875,
0.042022705078125,
0.04962158203125,
-0.0305328369140625,
0.016693115234375,
0.026275634765625,
0.01454925537109375,
0.035919189453125,
-0.039306640625,
-0.02142333984375,
-0.031707763671875,
-0.00860595703125,
0.0254364013671875,
-0.037109375,
-0.03924560546875,
-0.054534912109375,
0.01232147216796875,
0.01513671875,
-0.010345458984375,
-0.058563232421875,
0.035064697265625,
-0.0232391357421875,
0.037445068359375,
-0.045379638671875,
0.010772705078125,
-0.0004436969757080078,
0.02435302734375,
-0.0275726318359375,
-0.01399993896484375,
-0.022125244140625,
0.0207672119140625,
-0.01282501220703125,
0.0125732421875,
0.0555419921875,
-0.01395416259765625,
-0.025970458984375,
0.01611328125,
-0.0081024169921875,
0.052825927734375,
-0.035064697265625,
-0.00102996826171875,
0.016754150390625,
0.0036468505859375,
-0.0264434814453125,
-0.056610107421875,
0.0073089599609375,
-0.040924072265625,
-0.008056640625,
-0.0265045166015625,
-0.0384521484375,
-0.03656005859375,
-0.0596923828125,
-0.0523681640625,
0.0113983154296875,
0.00704193115234375,
-0.0341796875,
-0.059478759765625,
-0.0299835205078125,
-0.0081634521484375,
0.0259552001953125,
-0.0118560791015625,
-0.03973388671875,
-0.047607421875,
0.046783447265625,
0.01233673095703125,
0.06549072265625,
0.0176849365234375,
0.00734710693359375,
-0.038818359375,
-0.0113067626953125,
-0.039459228515625,
0.04443359375,
0.0200042724609375,
-0.0014925003051757812,
0.027587890625,
0.03802490234375,
-0.027557373046875,
0.0283660888671875,
-0.0254974365234375,
0.00013637542724609375,
-0.01311492919921875,
-0.0269317626953125,
0.030120849609375,
0.0180816650390625,
0.0523681640625,
0.007511138916015625,
0.003536224365234375,
-0.0276641845703125,
-0.06298828125,
-0.0316162109375,
-0.034423828125,
0.0033206939697265625,
0.0284271240234375,
-0.058990478515625,
0.039794921875,
0.0008492469787597656,
-0.025848388671875,
-0.01128387451171875,
-0.0350341796875,
-0.05023193359375,
-0.00133514404296875,
-0.057861328125,
0.00818634033203125,
-0.043731689453125,
-0.012603759765625,
-0.005657196044921875,
0.008880615234375,
0.023468017578125,
-0.0191497802734375,
0.032745361328125,
-0.0013294219970703125,
0.0263519287109375,
0.0240325927734375,
0.0237274169921875,
-0.049591064453125,
-0.00904083251953125,
0.01526641845703125,
0.00115203857421875,
0.0006580352783203125,
-0.0179443359375,
0.020843505859375,
0.0200653076171875,
-0.020263671875,
0.00258636474609375,
-0.005619049072265625,
0.0055389404296875,
-0.041168212890625,
0.0682373046875,
0.002056121826171875,
0.03863525390625,
-0.01007080078125,
0.038726806640625,
-0.0199737548828125,
-0.001567840576171875,
-0.01418304443359375,
-0.013916015625,
0.0023860931396484375,
-0.033660888671875,
-0.027587890625,
-0.031402587890625,
-0.0005764961242675781,
-0.0289154052734375,
-0.027679443359375,
0.0224456787109375
] |
54ea4e69f540bff02ff5f6269171f4cf46874da5
|
Wordpress Stackexchange
Q: Importing old blog with regular posts into new custom post types I have 2 older WP blog installs with regular posts that I would like to bring over to a new blog. One of the older installs is for "news" posts and the other is for "blog" posts (I know this was not the best way of setting things up).
In my new blog, I have created two custom post types ("news" and "blog") and I would like to import these two older installs into my new install's respective post types.
Is there an automated way of doing this (perhaps a plugin) that would save me from manually re-entering all of these posts? I'm assuming that simply importing these will not allow me to mark them as a custom post type and instead would make them generic posts.
Thank you!
Jake
A: Try importing and then using a plugin (Post Type Switcher) to change the type. There are a few other plugins out there for this, I seem to remember one which would convert multiple posts, but I couldn't find it just now.
|
Q: Importing old blog with regular posts into new custom post types I have 2 older WP blog installs with regular posts that I would like to bring over to a new blog. One of the older installs is for "news" posts and the other is for "blog" posts (I know this was not the best way of setting things up).
In my new blog, I have created two custom post types ("news" and "blog") and I would like to import these two older installs into my new install's respective post types.
Is there an automated way of doing this (perhaps a plugin) that would save me from manually re-entering all of these posts? I'm assuming that simply importing these will not allow me to mark them as a custom post type and instead would make them generic posts.
Thank you!
Jake
A: Try importing and then using a plugin (Post Type Switcher) to change the type. There are a few other plugins out there for this, I seem to remember one which would convert multiple posts, but I couldn't find it just now.
A: As an alternative, when you use the Wordpress Export tool, you can open the XML file that is exported in any text editor (I used Notepad++).
I did a simple find a replace on this line:
<wp:post_type>post</wp:post_type>
and replaced with:
<wp:post_type>blog</wp:post_type>
This took all my old "posts" and made them into my new custom content type "blog".
Then I just imported into the new site, that already had a custom post type called "blog" and it worked flawlessly.
A: Update to @gamerzfuse's answers,
After opening XML in editor, replace below lines/keywords.
Find the below line
<wp:post_type><![CDATA[post]]></wp:post_type>
and replac with:
<wp:post_type><![CDATA[CustomPostType]]></wp:post_type>
To add category, find
domain="category"
and replace with
domain="CustomPostTypeCategorySlug"
To add tags, find
post_tag
and replace with
CustomPostTypeTagSlug
This will also import Categories and Tags associated with the post into Custom Post Type.
|
wordpress
|
{
"language": "en",
"length": 318,
"provenance": "stackexchange_00019.jsonl.gz:408040",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12942"
}
|
[
0.0382080078125,
-0.00682830810546875,
0.01169586181640625,
0.040496826171875,
-0.0028324127197265625,
-0.03753662109375,
0.072021484375,
-0.0535888671875,
-0.0312347412109375,
-0.0160369873046875,
-0.016448974609375,
0.02520751953125,
-0.083251953125,
-0.0362548828125,
0.025543212890625,
-0.05596923828125,
0.039276123046875,
-0.041015625,
0.01525115966796875,
-0.0238494873046875,
0.0245208740234375,
-0.01171112060546875,
0.05731201171875,
0.039093017578125,
0.01226806640625,
0.040130615234375,
0.0433349609375,
0.0081939697265625,
0.01502227783203125,
0.010955810546875,
0.030181884765625,
-0.07183837890625,
-0.0070343017578125,
0.04632568359375,
-0.0301971435546875,
0.007232666015625,
0.0292510986328125,
0.0184783935546875,
0.01971435546875,
0.02557373046875,
-0.0018243789672851562,
-0.0006632804870605469,
0.0198516845703125,
-0.003124237060546875,
-0.004444122314453125,
-0.04022216796875,
0.0091705322265625,
-0.04376220703125,
0.0214385986328125,
-0.04376220703125,
-0.00567626953125,
-0.0439453125,
0.02984619140625,
-0.054534912109375,
-0.0390625,
-0.051788330078125,
-0.030609130859375,
0.0289154052734375,
0.035125732421875,
-0.00580596923828125,
-0.01528167724609375,
-0.0236053466796875,
0.0125732421875,
-0.01085662841796875,
-0.01172637939453125,
-0.0020923614501953125,
0.04034423828125,
0.0004248619079589844,
-0.07958984375,
-0.0211334228515625,
0.07037353515625,
-0.029296875,
0.021453857421875,
-0.032379150390625,
0.0312042236328125,
0.0166473388671875,
-0.003734588623046875,
0.012969970703125,
0.016571044921875,
0.00982666015625,
-0.00850677490234375,
0.0244140625,
0.017822265625,
-0.1136474609375,
0.044769287109375,
-0.09234619140625,
-0.009765625,
0.0249176025390625,
-0.01155853271484375,
-0.02142333984375,
-0.011077880859375,
-0.0653076171875,
-0.04638671875,
0.055389404296875,
0.01021575927734375,
-0.00015854835510253906,
-0.0248260498046875,
0.03094482421875,
-0.0288848876953125,
0.04827880859375,
-0.042938232421875,
-0.0010480880737304688,
0.033233642578125,
-0.045684814453125,
0.042572021484375,
0.033935546875,
-0.02691650390625,
-0.0299072265625,
0.0654296875,
0.0171661376953125,
0.0008068084716796875,
0.09552001953125,
0.0086212158203125,
-0.006687164306640625,
-0.0166168212890625,
0.0157623291015625,
-0.002109527587890625,
0.0267486572265625,
-0.0082244873046875,
0.0386962890625,
-0.0136566162109375,
0.02667236328125,
-0.044769287109375,
-0.027008056640625,
-0.023162841796875,
-0.0362548828125,
0.0233306884765625,
-0.011383056640625,
-0.024444580078125,
0.0292510986328125,
-0.0250091552734375,
-0.0009937286376953125,
0.062408447265625,
0.04180908203125,
0.004390716552734375,
-0.0197296142578125,
0.0168304443359375,
-0.0013513565063476562,
-0.00972747802734375,
-0.003185272216796875,
0.0134124755859375,
-0.052581787109375,
-0.058929443359375,
0.00856781005859375,
0.058685302734375,
0.0251007080078125,
0.01190185546875,
0.0243988037109375,
0.005596160888671875,
-0.017669677734375,
0.050018310546875,
-0.0164337158203125,
0.050323486328125,
-0.0147247314453125,
0.01033782958984375,
-0.07403564453125,
0.045135498046875,
-0.07080078125,
0.0203094482421875,
-0.06011962890625,
0.00921630859375,
-0.007442474365234375,
0.003772735595703125,
-0.0325927734375,
-0.054931640625,
0.0205230712890625,
-0.03143310546875,
-0.0078277587890625,
0.024261474609375,
-0.04058837890625,
0.00194549560546875,
-0.00652313232421875,
0.0330810546875,
0.00844573974609375,
-0.0015010833740234375,
0.032073974609375,
-0.004322052001953125,
-0.004451751708984375,
-0.0023651123046875,
0.053070068359375,
0.0201873779296875,
-0.007526397705078125,
0.029937744140625,
-0.0021343231201171875,
-0.050994873046875,
0.005672454833984375,
0.0252685546875,
0.037872314453125,
0.0095062255859375,
0.0234222412109375,
0.05975341796875,
0.0004363059997558594,
-0.0281524658203125,
0.009185791015625,
-0.0178070068359375,
-0.01491546630859375,
0.018768310546875,
0.021270751953125,
0.0002713203430175781,
-0.0014314651489257812,
-0.028350830078125,
0.0163726806640625,
-0.0209503173828125,
0.0161285400390625,
-0.01149749755859375,
-0.0164337158203125,
0.0047607421875,
0.0265960693359375,
-0.01557159423828125,
0.01175689697265625,
0.02532958984375,
-0.0100860595703125,
-0.0113525390625,
-0.012481689453125,
-0.0148773193359375,
-0.018890380859375,
-0.0208282470703125,
-0.01043701171875,
-0.013671875,
-0.0034008026123046875,
-0.0282135009765625,
0.00323486328125,
-0.0240936279296875,
0.03369140625,
0.005214691162109375,
-0.033355712890625,
-0.0004119873046875,
-0.0156707763671875,
-0.037872314453125,
0.034698486328125,
-0.07025146484375,
-0.0019397735595703125,
0.005397796630859375,
-0.0050201416015625,
-0.0157470703125,
0.00751495361328125,
0.042633056640625,
-0.0298919677734375,
0.0231170654296875,
0.0301055908203125,
0.01325225830078125,
-0.0086212158203125,
-0.00826263427734375,
0.0341796875,
0.034149169921875,
0.009368896484375,
0.02325439453125,
0.01096343994140625,
-0.0115203857421875,
0.060943603515625,
-0.0195770263671875,
0.036285400390625,
0.002109527587890625,
-0.005573272705078125,
-0.02081298828125,
0.0499267578125,
0.01055145263671875,
-0.0010004043579101562,
0.00617218017578125,
-0.010162353515625,
0.006137847900390625,
-0.0129241943359375,
-0.036590576171875,
0.005279541015625,
0.053558349609375,
0.0113067626953125,
0.0511474609375,
0.0338134765625,
-0.04327392578125,
0.005603790283203125,
0.00849151611328125,
0.0105133056640625,
0.007488250732421875,
0.026519775390625,
0.033599853515625,
0.049652099609375,
-0.029052734375,
-0.02362060546875,
0.022369384765625,
0.0343017578125,
-0.004150390625,
0.037322998046875,
-0.026275634765625,
-0.017669677734375,
-0.00013959407806396484,
-0.04620361328125,
-0.0088348388671875,
0.00125885009765625,
-0.020172119140625,
-0.034912109375,
-0.0164794921875,
0.035003662109375,
-0.0284576416015625,
0.050323486328125,
0.02642822265625,
-0.00803375244140625,
0.01348114013671875,
-0.11163330078125,
0.0843505859375,
-0.06451416015625,
0.03363037109375,
0.0826416015625,
0.00797271728515625,
0.0025424957275390625,
0.004840850830078125,
0.0408935546875,
0.02301025390625,
0.024810791015625,
0.0072021484375,
-0.014739990234375,
-0.04864501953125,
-0.034576416015625,
0.0281219482421875,
0.04998779296875,
0.0027866363525390625,
-0.0294189453125,
0.004940032958984375,
0.0396728515625,
-0.01181793212890625,
-0.00672149658203125,
-0.042724609375,
-0.0682373046875,
0.002811431884765625,
-0.032989501953125,
-0.03057861328125,
0.01024627685546875,
-0.02978515625,
0.01458740234375,
0.044525146484375,
0.0029010772705078125,
-0.05487060546875,
-0.0231170654296875,
-0.095458984375,
-0.044952392578125,
-0.0030384063720703125,
0.0133209228515625,
0.0135040283203125,
0.0194091796875,
-0.007415771484375,
-0.039886474609375,
0.018951416015625,
0.064697265625,
0.003116607666015625,
0.0196990966796875,
0.046417236328125,
-0.023223876953125,
0.037445068359375,
-0.0016088485717773438,
0.051544189453125,
0.0775146484375,
-0.06280517578125,
-0.0033416748046875,
-0.0139923095703125,
-0.0099945068359375,
-0.006229400634765625,
-0.007495880126953125,
0.0167388916015625,
0.0147705078125,
-0.00592803955078125,
-0.038543701171875,
0.016632080078125,
0.007183074951171875,
0.001071929931640625,
-0.032928466796875,
-0.043121337890625,
-0.01287841796875,
-0.021148681640625,
0.031280517578125,
-0.0152740478515625,
-0.0028095245361328125,
0.030975341796875,
-0.0225067138671875,
0.0007486343383789062,
-0.01544189453125,
-0.0225830078125,
-0.01580810546875,
-0.01558685302734375,
-0.03863525390625,
0.044036865234375,
-0.0005631446838378906,
0.0104522705078125,
-0.0164947509765625,
0.022125244140625,
-0.0277557373046875,
-0.1090087890625,
0.035247802734375,
-0.06201171875,
-0.01641845703125,
-0.0460205078125,
-0.0150604248046875,
0.0311279296875,
0.11541748046875,
-0.0833740234375,
0.0166473388671875,
-0.0192718505859375,
-0.00989532470703125,
0.01053619384765625,
-0.032684326171875,
-0.08367919921875,
-0.0095977783203125,
-0.0077667236328125,
-0.013885498046875,
-0.004364013671875,
-0.020904541015625,
-0.005741119384765625,
0.018890380859375,
0.004398345947265625,
-0.02392578125,
0.04046630859375,
-0.004177093505859375,
0.0308380126953125,
0.0200958251953125,
0.01496124267578125,
0.0013103485107421875,
-0.0243072509765625,
-0.00738525390625,
-0.08203125,
-0.015838623046875,
-0.01250457763671875,
0.054229736328125,
0.014129638671875,
-0.0200347900390625,
0.0015621185302734375,
0.03631591796875,
-0.035400390625,
0.0201416015625,
-0.0214996337890625,
0.03466796875,
-0.0247650146484375,
0.00618743896484375,
-0.0110931396484375,
-0.020263671875,
-0.041259765625,
-0.060546875,
-0.033721923828125,
-0.00687408447265625,
-0.010162353515625,
0.036712646484375,
-0.0130462646484375,
0.01351165771484375,
-0.0165557861328125,
0.0020198822021484375,
0.00235748291015625,
0.0293731689453125,
-0.007678985595703125,
-0.01511383056640625,
-0.0179595947265625,
-0.026336669921875,
0.0293121337890625,
0.01378631591796875,
-0.0177764892578125,
0.00783538818359375,
0.07318115234375,
0.0200653076171875,
-0.01540374755859375,
-0.0423583984375,
0.0245208740234375,
0.0208892822265625,
-0.00014650821685791016,
0.0192718505859375,
0.0062103271484375,
0.0106658935546875,
-0.0142059326171875,
-0.017181396484375,
-0.0159912109375,
-0.0177764892578125,
0.0305633544921875,
0.008880615234375,
-0.00995635986328125,
-0.0038585662841796875,
-0.0156707763671875,
0.02655029296875,
0.055084228515625,
-0.0004930496215820312,
-0.064697265625,
-0.0017728805541992188,
0.073974609375,
-0.03619384765625,
0.04669189453125,
-0.0399169921875,
-0.0258331298828125,
0.0249176025390625,
-0.0202484130859375,
-0.0262908935546875,
-0.021240234375,
0.00849151611328125,
-0.032684326171875,
-0.053436279296875,
-0.0004782676696777344,
0.02484130859375,
0.02911376953125,
0.0214385986328125,
0.0294189453125,
0.02996826171875,
0.0004258155822753906,
-0.0198822021484375,
-0.0010251998901367188,
-0.0182647705078125,
-0.0274810791015625,
-0.060760498046875,
-0.017791748046875,
-0.00116729736328125,
0.034027099609375,
0.037750244140625,
-0.0163116455078125,
0.0140380859375,
0.046142578125,
-0.0198516845703125,
0.0004341602325439453,
0.00922393798828125,
0.0171356201171875,
-0.043121337890625,
-0.040283203125,
0.00827789306640625,
-0.0170440673828125,
0.0196990966796875,
0.00881195068359375,
-0.00931549072265625,
0.01412200927734375,
-0.0175018310546875,
0.0201416015625,
0.0263519287109375,
0.0294342041015625,
0.0129852294921875,
-0.0028781890869140625,
-0.0255584716796875,
0.009796142578125,
-0.00787353515625,
-0.0262603759765625,
0.0018444061279296875,
0.007144927978515625,
0.05133056640625,
-0.0003943443298339844,
-0.024871826171875,
0.0220947265625,
-0.0234375,
-0.0118255615234375,
0.0174102783203125,
0.0110626220703125,
-0.0224609375,
-0.0122833251953125,
0.0243377685546875,
0.032196044921875,
0.0126800537109375,
-0.01026153564453125,
-0.00530242919921875,
-0.0234527587890625,
0.01033782958984375,
0.0189361572265625,
-0.0247039794921875,
-0.004009246826171875,
0.000995635986328125,
-0.0330810546875,
-0.04217529296875,
-0.001804351806640625,
-0.0178680419921875,
0.01116943359375,
-0.01537322998046875,
-0.015380859375,
0.01361083984375,
-0.01222991943359375,
0.0185089111328125,
-0.039794921875,
0.0030002593994140625,
-0.006206512451171875,
0.0042266845703125,
0.03900146484375,
-0.004451751708984375,
-0.0021457672119140625,
-0.0088958740234375,
-0.045196533203125,
-0.050201416015625,
-0.0650634765625,
-0.029632568359375,
-0.0770263671875,
0.01715087890625,
0.02215576171875,
0.028717041015625,
0.004131317138671875,
-0.0126495361328125,
0.0205078125,
-0.00971221923828125,
-0.0116729736328125,
0.0255889892578125,
0.002685546875,
0.02264404296875,
-0.00004476308822631836,
0.050445556640625,
0.01149749755859375,
0.0278472900390625,
-0.0005121231079101562,
-0.0380859375,
-0.0098419189453125,
-0.051177978515625,
-0.006988525390625,
0.0078887939453125,
-0.005161285400390625,
0.039337158203125,
0.040496826171875,
0.00032067298889160156,
0.0126495361328125,
-0.0170135498046875,
0.00876617431640625,
-0.022003173828125,
-0.0219879150390625,
-0.032928466796875,
-0.00830841064453125,
0.0003170967102050781,
-0.020416259765625,
-0.020172119140625,
0.0168914794921875,
0.01491546630859375,
-0.01505279541015625,
0.00531005859375,
-0.02044677734375,
-0.003871917724609375,
-0.01421356201171875,
-0.01279449462890625,
0.0294342041015625,
0.0075531005859375,
0.03778076171875,
-0.0181427001953125,
0.0242767333984375,
0.053466796875,
-0.01947021484375,
0.0262298583984375,
0.020294189453125,
-0.002765655517578125,
-0.033294677734375,
0.00732421875,
-0.02728271484375,
-0.0181884765625,
0.0350341796875,
0.044891357421875,
0.0772705078125,
-0.076171875,
0.02069091796875,
0.036529541015625,
-0.031646728515625,
0.02032470703125,
0.006572723388671875,
-0.00691986083984375,
-0.00751495361328125,
-0.01593017578125,
0.0179443359375,
-0.033782958984375,
-0.017120361328125,
0.01189422607421875,
-0.0169219970703125,
-0.0068206787109375,
-0.00012040138244628906,
0.0257568359375,
0.004444122314453125,
0.0218048095703125,
-0.01134490966796875,
0.020721435546875,
0.00867462158203125,
0.033782958984375,
-0.044830322265625,
-0.018341064453125,
-0.041015625,
-0.01354217529296875,
-0.02410888671875,
-0.0309600830078125,
-0.0103607177734375,
-0.0218353271484375,
0.06243896484375,
0.037567138671875,
-0.007038116455078125,
-0.0111541748046875,
0.007049560546875,
0.045074462890625,
-0.0173187255859375,
-0.0264892578125,
0.0232391357421875,
0.035400390625,
0.00293731689453125,
0.0357666015625,
0.0230560302734375,
-0.06072998046875,
-0.00992584228515625,
-0.03717041015625,
0.0285186767578125,
0.00902557373046875,
-0.01012420654296875,
0.035919189453125,
-0.0019683837890625,
-0.0171661376953125,
-0.02032470703125,
0.0159912109375,
-0.044158935546875,
-0.021697998046875,
-0.01197052001953125,
-0.0240936279296875,
-0.0312347412109375,
-0.017303466796875,
-0.08154296875,
0.1097412109375,
0.0279541015625,
0.054779052734375,
0.013763427734375,
0.0167999267578125,
-0.03936767578125,
0.003238677978515625,
-0.033447265625,
0.0374755859375,
-0.051849365234375,
0.005950927734375,
-0.05181884765625,
0.00798797607421875,
-0.023406982421875,
0.0069427490234375,
0.0037250518798828125,
-0.0031909942626953125,
-0.0029125213623046875,
-0.01378631591796875,
0.02410888671875,
0.0546875,
0.0189056396484375,
0.0102081298828125,
-0.0211334228515625,
0.037628173828125,
0.039154052734375,
-0.03021240234375,
0.028533935546875,
0.0212554931640625,
-0.047760009765625,
0.0017070770263671875,
-0.00330352783203125,
0.0014371871948242188,
0.00518798828125,
0.01113128662109375,
0.01309967041015625,
-0.0157318115234375,
-0.0125732421875,
-0.02197265625,
0.070068359375,
0.015716552734375,
0.025482177734375,
0.00922393798828125,
0.03765869140625,
-0.02593994140625,
0.05035400390625,
-0.032135009765625,
0.03826904296875,
0.016204833984375,
0.0220489501953125,
0.04620361328125,
-0.0228271484375,
0.016693115234375,
0.015380859375,
-0.038726806640625,
0.046234130859375,
0.02239990234375,
0.025543212890625,
-0.03363037109375,
0.01171875,
0.0101776123046875,
0.04217529296875,
-0.0457763671875,
-0.050537109375,
0.007282257080078125,
0.01134490966796875,
0.0202178955078125,
-0.0076751708984375,
0.013763427734375,
-0.0609130859375,
-0.00007855892181396484,
0.0024433135986328125,
-0.003803253173828125,
-0.0091400146484375,
0.0036296844482421875,
-0.006420135498046875,
0.03631591796875,
0.0048370361328125,
0.00039505958557128906,
-0.039459228515625,
0.0274505615234375,
0.0167236328125,
0.041595458984375,
-0.0148162841796875,
0.0731201171875,
0.005413055419921875,
-0.00848388671875,
-0.0009260177612304688,
0.01253509521484375,
0.005252838134765625,
-0.005054473876953125,
-0.025421142578125,
-0.041778564453125,
-0.00617218017578125,
0.037017822265625,
-0.00537109375,
0.031982421875,
0.04229736328125,
0.026031494140625,
-0.0382080078125,
-0.0129852294921875,
0.027008056640625,
-0.03411865234375,
-0.0168609619140625,
-0.028167724609375,
-0.032501220703125,
-0.0173492431640625,
-0.027984619140625,
0.00785064697265625,
0.00644683837890625,
0.00608062744140625,
-0.0012493133544921875,
0.04217529296875,
0.003021240234375,
-0.024322509765625,
0.04046630859375,
0.0252227783203125,
0.115966796875,
0.048828125,
-0.0794677734375,
-0.0203857421875,
-0.0687255859375,
-0.0172119140625,
0.03765869140625,
0.044158935546875,
0.0054931640625,
0.00635528564453125,
0.03839111328125,
-0.005756378173828125,
-0.031494140625,
0.00324249267578125,
0.048004150390625,
0.040924072265625,
0.01389312744140625,
0.048858642578125,
-0.09600830078125,
-0.052886962890625,
-0.05364990234375,
0.047332763671875,
0.021697998046875,
0.0301055908203125,
0.040679931640625,
0.03070068359375,
-0.0285797119140625,
0.017364501953125,
-0.045654296875,
-0.019805908203125,
-0.0272064208984375,
-0.01690673828125,
0.0261383056640625,
0.01715087890625,
-0.036529541015625,
-0.005706787109375,
0.039886474609375,
-0.0214691162109375,
-0.0026149749755859375,
-0.0279083251953125,
0.037261962890625,
-0.004364013671875,
0.0121917724609375,
-0.043212890625,
-0.03790283203125,
-0.038665771484375,
-0.0242462158203125,
0.007358551025390625,
-0.01360321044921875,
0.01806640625,
0.0166015625,
0.036712646484375,
-0.042816162109375,
0.0129547119140625,
-0.034515380859375,
0.031341552734375,
0.0274810791015625,
0.0626220703125,
-0.05328369140625,
0.053009033203125,
-0.005596160888671875,
-0.012847900390625,
0.032196044921875,
0.071044921875,
0.0225372314453125,
-0.036712646484375,
-0.0011548995971679688,
-0.004467010498046875,
0.036956787109375,
-0.007617950439453125,
0.01142120361328125,
-0.001560211181640625,
0.00531768798828125,
-0.0138092041015625,
-0.0020427703857421875,
-0.01267242431640625,
-0.04449462890625,
0.005199432373046875,
-0.0005412101745605469,
-0.00815582275390625,
-0.0262603759765625,
0.003692626953125,
-0.028045654296875,
0.040740966796875,
0.00093841552734375,
-0.023956298828125,
0.01035308837890625,
-0.0291900634765625,
0.0017452239990234375,
0.009124755859375,
-0.041961669921875,
0.016021728515625,
0.0714111328125,
0.0135040283203125,
-0.0270843505859375,
-0.03759765625,
0.0023822784423828125,
-0.04296875,
0.042572021484375,
0.060302734375,
-0.0447998046875,
-0.01491546630859375,
0.037200927734375,
0.044036865234375,
0.07476806640625,
0.009368896484375,
-0.01422882080078125,
-0.000904083251953125,
0.009124755859375,
-0.0411376953125,
-0.055511474609375,
0.047454833984375,
-0.08526611328125,
-0.03485107421875,
-0.02801513671875,
0.004486083984375,
0.00849151611328125,
-0.0275115966796875,
-0.0276641845703125,
0.048736572265625,
-0.0051116943359375,
-0.018218994140625,
-0.045013427734375,
-0.01494598388671875,
-0.0007700920104980469,
0.0147247314453125,
-0.01436614990234375,
-0.02734375,
-0.047271728515625,
0.034759521484375,
-0.034393310546875,
0.05242919921875,
0.0030231475830078125,
-0.02191162109375,
0.0301666259765625,
-0.00010567903518676758,
0.019378662109375,
-0.0203399658203125,
0.036468505859375,
-0.024658203125,
0.033050537109375,
0.046722412109375,
-0.0438232421875,
0.01412200927734375,
-0.0178375244140625,
0.004367828369140625,
-0.01007080078125,
-0.0279388427734375,
-0.04583740234375,
-0.01561737060546875,
0.06060791015625,
0.059906005859375,
0.0213470458984375,
-0.032958984375,
0.00931549072265625,
-0.005405426025390625,
-0.012939453125,
-0.0050201416015625,
-0.016937255859375,
-0.00247955322265625,
-0.00412750244140625,
-0.0221710205078125,
-0.005962371826171875,
0.017120361328125,
-0.061370849609375,
-0.022979736328125,
-0.01146697998046875,
-0.02447509765625,
0.01251220703125,
-0.0055694580078125,
0.0335693359375,
0.038360595703125,
-0.0225830078125,
0.03631591796875,
-0.0005393028259277344,
-0.011383056640625,
0.045196533203125,
0.032501220703125,
-0.01105499267578125,
0.0009202957153320312,
-0.01149749755859375,
-0.00783538818359375,
-0.002277374267578125,
0.005512237548828125,
0.0038089752197265625,
0.0037097930908203125,
0.01861572265625,
0.0018720626831054688,
-0.01247406005859375,
-0.0026397705078125,
0.01312255859375,
0.00940704345703125,
-0.0377197265625,
0.03912353515625,
0.0045166015625,
-0.035369873046875,
-0.027130126953125,
0.0396728515625,
-0.0361328125,
-0.00867462158203125,
-0.0190887451171875,
-0.0183563232421875,
-0.0085601806640625,
0.00357818603515625,
-0.034423828125,
-0.0169219970703125,
-0.026123046875,
0.04608154296875,
-0.0272369384765625,
-0.0015840530395507812
] |
aff4a01015de5ff1be5764f60cf218017df3974f
|
Wordpress Stackexchange
Q: Why is wp_redirect() preferable to a standard PHP header redirect? In asking a question about hooks and redirects, I was advised to use wp_redirect in place of the PHP header function. Just wondering why wp_redirect is preferable?
A: See the source. It has some additional logic for IIS servers, as well as some hooks. It is also pluggable function, so it might be redefined.
Overall it's just more flexible and gives other developers more options to work with your code, unavailable if you just hardcode things.
|
Q: Why is wp_redirect() preferable to a standard PHP header redirect? In asking a question about hooks and redirects, I was advised to use wp_redirect in place of the PHP header function. Just wondering why wp_redirect is preferable?
A: See the source. It has some additional logic for IIS servers, as well as some hooks. It is also pluggable function, so it might be redefined.
Overall it's just more flexible and gives other developers more options to work with your code, unavailable if you just hardcode things.
A: It (wp_redirect fn) is more than just setting the header. Just take a look here what it does before setting a header.
|
wordpress
|
{
"language": "en",
"length": 110,
"provenance": "stackexchange_00019.jsonl.gz:408041",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12944"
}
|
[
0.056243896484375,
0.007457733154296875,
-0.0141448974609375,
-0.02850341796875,
0.02001953125,
-0.0341796875,
0.0400390625,
-0.006336212158203125,
0.00022685527801513672,
0.01248931884765625,
-0.01523590087890625,
-0.00939178466796875,
-0.0235595703125,
-0.028717041015625,
-0.004150390625,
-0.0200958251953125,
0.018585205078125,
-0.04022216796875,
-0.0024356842041015625,
-0.012847900390625,
0.02099609375,
0.00846099853515625,
0.0157318115234375,
0.0005383491516113281,
-0.0018301010131835938,
-0.052215576171875,
0.0264739990234375,
-0.039764404296875,
-0.0036029815673828125,
-0.0335693359375,
-0.0036468505859375,
0.046173095703125,
0.00917816162109375,
0.040679931640625,
-0.02972412109375,
-0.01129150390625,
0.0254669189453125,
0.0140228271484375,
0.03375244140625,
0.010528564453125,
0.00736236572265625,
-0.006641387939453125,
0.01059722900390625,
0.0010385513305664062,
-0.018402099609375,
-0.0085906982421875,
0.01058197021484375,
-0.02606201171875,
-0.00885009765625,
-0.0001634359359741211,
0.02874755859375,
0.0206298828125,
0.0435791015625,
-0.030181884765625,
0.00806427001953125,
0.0221099853515625,
-0.0146636962890625,
0.0389404296875,
0.02069091796875,
-0.031768798828125,
-0.0411376953125,
0.0053253173828125,
0.02801513671875,
0.015777587890625,
0.00287628173828125,
0.0117950439453125,
-0.005573272705078125,
0.0292510986328125,
-0.07244873046875,
-0.029327392578125,
0.006622314453125,
-0.05303955078125,
-0.01806640625,
0.003337860107421875,
-0.0250244140625,
-0.002521514892578125,
0.027862548828125,
-0.0026092529296875,
0.007366180419921875,
0.0204010009765625,
-0.03167724609375,
-0.0159912109375,
-0.0207977294921875,
-0.0501708984375,
0.034332275390625,
-0.004085540771484375,
-0.025634765625,
-0.00786590576171875,
-0.0443115234375,
-0.034820556640625,
-0.0338134765625,
-0.0224456787109375,
-0.060211181640625,
-0.009918212890625,
0.004062652587890625,
-0.017547607421875,
-0.027923583984375,
-0.03277587890625,
0.0059814453125,
0.0009813308715820312,
0.039794921875,
-0.034027099609375,
0.035400390625,
-0.0030307769775390625,
-0.0211029052734375,
0.047149658203125,
0.0147247314453125,
0.0005679130554199219,
-0.00801849365234375,
0.01476287841796875,
0.0037899017333984375,
-0.046905517578125,
-0.0045166015625,
-0.0290374755859375,
-0.0256195068359375,
0.025634765625,
-0.024322509765625,
0.01393890380859375,
0.005519866943359375,
0.033111572265625,
0.02313232421875,
0.0161590576171875,
0.06549072265625,
-0.03173828125,
-0.01580810546875,
-0.0291900634765625,
-0.038970947265625,
-0.04327392578125,
-0.036956787109375,
0.0173187255859375,
-0.0038814544677734375,
0.0178070068359375,
0.0149993896484375,
0.0160369873046875,
-0.02978515625,
-0.0168914794921875,
0.046234130859375,
-0.01462554931640625,
-0.0017004013061523438,
0.0220489501953125,
0.0216827392578125,
-0.0261383056640625,
-0.0162200927734375,
0.00995635986328125,
0.04296875,
0.0014066696166992188,
0.0150146484375,
0.031524658203125,
0.01387786865234375,
-0.026397705078125,
0.040740966796875,
-0.0027904510498046875,
0.0064544677734375,
-0.015838623046875,
0.0236663818359375,
-0.0113983154296875,
-0.05926513671875,
0.01354217529296875,
0.019195556640625,
0.0458984375,
0.0389404296875,
-0.0004477500915527344,
-0.00876617431640625,
-0.0499267578125,
-0.0914306640625,
-0.007129669189453125,
-0.051544189453125,
-0.02496337890625,
0.025146484375,
0.0164642333984375,
0.02978515625,
0.0034637451171875,
0.010223388671875,
0.045684814453125,
0.02593994140625,
0.00885772705078125,
0.004390716552734375,
0.0159149169921875,
0.020751953125,
0.040313720703125,
0.00809478759765625,
-0.027374267578125,
0.041961669921875,
-0.0167388916015625,
-0.07958984375,
0.10467529296875,
0.01320648193359375,
0.11431884765625,
-0.0088043212890625,
0.022674560546875,
0.0367431640625,
0.035308837890625,
-0.0203857421875,
0.037628173828125,
-0.033660888671875,
-0.051422119140625,
0.00711822509765625,
0.00020420551300048828,
-0.0210723876953125,
0.01027679443359375,
0.01119232177734375,
0.035919189453125,
-0.0222930908203125,
0.0255584716796875,
-0.01306915283203125,
-0.000020325183868408203,
0.0029582977294921875,
0.0136260986328125,
0.034698486328125,
0.0218353271484375,
-0.0084228515625,
0.006160736083984375,
0.006832122802734375,
-0.04705810546875,
-0.05078125,
0.0192413330078125,
-0.0226287841796875,
0.038177490234375,
0.026458740234375,
0.0101470947265625,
0.033172607421875,
-0.0074920654296875,
0.01617431640625,
-0.04046630859375,
0.01445770263671875,
-0.0177154541015625,
-0.0097503662109375,
-0.0162353515625,
0.00833892822265625,
-0.00133514404296875,
0.0025177001953125,
0.04400634765625,
0.03753662109375,
0.0322265625,
0.00011873245239257812,
0.0080718994140625,
0.0218048095703125,
-0.058837890625,
0.002628326416015625,
0.040618896484375,
0.0172271728515625,
0.07818603515625,
-0.006526947021484375,
0.033477783203125,
0.015655517578125,
-0.053009033203125,
0.004474639892578125,
0.01039886474609375,
0.0131378173828125,
0.0026035308837890625,
0.0221405029296875,
-0.053070068359375,
0.03424072265625,
-0.04022216796875,
0.005168914794921875,
0.0157318115234375,
-0.01148223876953125,
-0.00589752197265625,
-0.022369384765625,
0.0096282958984375,
0.009857177734375,
-0.011932373046875,
-0.022125244140625,
-0.0039005279541015625,
0.03765869140625,
-0.0499267578125,
0.0037708282470703125,
-0.0157928466796875,
-0.0040740966796875,
-0.045257568359375,
0.0182037353515625,
-0.03289794921875,
0.00917816162109375,
0.047698974609375,
0.06512451171875,
-0.005153656005859375,
-0.04132080078125,
-0.0311126708984375,
0.05169677734375,
0.0193328857421875,
-0.00811767578125,
0.02911376953125,
-0.041412353515625,
-0.023162841796875,
0.00004291534423828125,
-0.01276397705078125,
-0.017181396484375,
0.0034236907958984375,
0.058746337890625,
0.016998291015625,
0.05889892578125,
-0.026641845703125,
-0.035491943359375,
0.035980224609375,
0.01308441162109375,
-0.0628662109375,
0.0011444091796875,
-0.039459228515625,
0.016082763671875,
-0.015655517578125,
0.0265045166015625,
0.060302734375,
0.01485443115234375,
-0.008636474609375,
0.0086212158203125,
0.022125244140625,
0.037200927734375,
-0.0186614990234375,
-0.0289764404296875,
0.0016107559204101562,
-0.0762939453125,
-0.060150146484375,
0.031219482421875,
0.039306640625,
-0.0163421630859375,
-0.039825439453125,
-0.020843505859375,
0.0211029052734375,
-0.09649658203125,
-0.084716796875,
-0.0767822265625,
-0.056671142578125,
0.042572021484375,
0.00860595703125,
-0.008209228515625,
-0.0040283203125,
0.037322998046875,
0.034759521484375,
0.023406982421875,
0.0128173828125,
-0.041229248046875,
-0.033050537109375,
-0.08203125,
-0.04718017578125,
-0.016082763671875,
0.01519012451171875,
0.004451751708984375,
-0.023345947265625,
-0.0220489501953125,
-0.0222930908203125,
-0.0067291259765625,
0.0227813720703125,
-0.01287078857421875,
-0.0540771484375,
-0.02777099609375,
-0.0292205810546875,
-0.0191650390625,
-0.00666046142578125,
0.03240966796875,
-0.037689208984375,
0.037445068359375,
0.0025157928466796875,
-0.032073974609375,
-0.032562255859375,
-0.0050811767578125,
-0.0147705078125,
0.0194549560546875,
-0.01739501953125,
-0.00522613525390625,
-0.05010986328125,
-0.00788116455078125,
0.0005583763122558594,
-0.0340576171875,
0.00176239013671875,
0.0163421630859375,
-0.005214691162109375,
0.005496978759765625,
-0.019927978515625,
0.0175323486328125,
0.017486572265625,
-0.0469970703125,
-0.0225067138671875,
0.0936279296875,
0.0203704833984375,
0.0537109375,
-0.005298614501953125,
0.023223876953125,
-0.02557373046875,
-0.005115509033203125,
0.006927490234375,
-0.00800323486328125,
-0.0025787353515625,
0.016204833984375,
-0.0104522705078125,
-0.08209228515625,
0.040008544921875,
-0.044219970703125,
-0.037353515625,
-0.01360321044921875,
0.0035533905029296875,
0.0225982666015625,
0.081298828125,
0.0256805419921875,
-0.01230621337890625,
-0.0016326904296875,
-0.0190887451171875,
0.00759124755859375,
0.01311492919921875,
-0.0210113525390625,
-0.0167694091796875,
-0.055755615234375,
0.034881591796875,
0.02569580078125,
0.005908966064453125,
-0.0307159423828125,
0.053741455078125,
-0.03094482421875,
-0.018829345703125,
0.00823211669921875,
-0.02288818359375,
0.004909515380859375,
0.037628173828125,
-0.019622802734375,
0.01126861572265625,
0.01824951171875,
-0.05572509765625,
-0.05328369140625,
-0.0124969482421875,
0.006786346435546875,
0.05291748046875,
0.0112762451171875,
-0.043731689453125,
-0.05078125,
-0.0035800933837890625,
0.022979736328125,
0.0250396728515625,
-0.01059722900390625,
-0.032196044921875,
0.041412353515625,
0.0110321044921875,
0.00201416015625,
0.006824493408203125,
-0.020050048828125,
-0.0634765625,
-0.027496337890625,
-0.033447265625,
-0.01751708984375,
0.018798828125,
0.005107879638671875,
0.0036449432373046875,
-0.075927734375,
-0.053680419921875,
-0.024505615234375,
0.0018472671508789062,
-0.0096435546875,
0.006366729736328125,
-0.04742431640625,
-0.0654296875,
0.068115234375,
0.032928466796875,
-0.0035419464111328125,
-0.01242828369140625,
0.08148193359375,
0.02752685546875,
-0.034576416015625,
-0.0196380615234375,
-0.0186004638671875,
0.01470947265625,
-0.006687164306640625,
0.0303955078125,
-0.03094482421875,
-0.005046844482421875,
0.0927734375,
-0.03753662109375,
0.014434814453125,
-0.00794219970703125,
0.0204010009765625,
-0.01099395751953125,
-0.03973388671875,
0.03265380859375,
-0.0245513916015625,
-0.01428985595703125,
0.0518798828125,
0.0282440185546875,
-0.021331787109375,
0.031494140625,
-0.00958251953125,
0.016571044921875,
-0.051513671875,
-0.02197265625,
0.01556396484375,
-0.0004630088806152344,
0.02569580078125,
0.025848388671875,
0.0204925537109375,
0.006542205810546875,
-0.0248260498046875,
0.005901336669921875,
0.040191650390625,
0.0205535888671875,
-0.044403076171875,
-0.0293731689453125,
0.04046630859375,
0.005290985107421875,
0.0130767822265625,
0.046905517578125,
-0.01079559326171875,
0.0577392578125,
0.031951904296875,
-0.02447509765625,
-0.03546142578125,
-0.004611968994140625,
-0.00910186767578125,
-0.033477783203125,
-0.021697998046875,
0.0357666015625,
0.024169921875,
-0.04705810546875,
-0.025054931640625,
-0.0311431884765625,
-0.006992340087890625,
-0.07269287109375,
0.0278167724609375,
0.007476806640625,
0.00264739990234375,
0.0394287109375,
0.06402587890625,
-0.008087158203125,
0.0592041015625,
-0.01885986328125,
0.021514892578125,
0.0413818359375,
0.0003039836883544922,
0.00508880615234375,
0.023681640625,
0.003925323486328125,
-0.027191162109375,
0.0216522216796875,
-0.0550537109375,
-0.0274200439453125,
0.0016345977783203125,
0.0362548828125,
-0.00669097900390625,
-0.0019588470458984375,
0.04229736328125,
0.018524169921875,
-0.008453369140625,
0.07281494140625,
0.0190887451171875,
-0.0596923828125,
-0.037628173828125,
-0.013458251953125,
0.04937744140625,
-0.01336669921875,
-0.01233673095703125,
0.0080108642578125,
-0.0274200439453125,
0.01226043701171875,
0.01439666748046875,
-0.016510009765625,
-0.01261138916015625,
-0.01219940185546875,
0.0042877197265625,
-0.00977325439453125,
-0.0104522705078125,
-0.04034423828125,
-0.022186279296875,
-0.01025390625,
-0.0059967041015625,
0.058807373046875,
-0.03741455078125,
0.01294708251953125,
-0.0246124267578125,
-0.007221221923828125,
-0.02294921875,
0.005527496337890625,
0.07415771484375,
0.053680419921875,
-0.08905029296875,
0.00433349609375,
-0.06402587890625,
0.0089569091796875,
-0.01824951171875,
-0.02642822265625,
-0.0248870849609375,
-0.0030841827392578125,
0.0369873046875,
0.012847900390625,
0.04241943359375,
0.006229400634765625,
-0.02117919921875,
0.0184478759765625,
0.006298065185546875,
0.0229644775390625,
-0.007843017578125,
0.01206207275390625,
-0.0161590576171875,
0.01105499267578125,
-0.019775390625,
-0.00223541259765625,
0.03338623046875,
-0.0283355712890625,
0.034698486328125,
-0.041412353515625,
-0.04498291015625,
-0.050872802734375,
0.0240631103515625,
-0.01175689697265625,
-0.0101776123046875,
-0.0274200439453125,
-0.004123687744140625,
0.00732421875,
0.014007568359375,
-0.030975341796875,
-0.0265045166015625,
-0.016510009765625,
-0.00643157958984375,
-0.042388916015625,
0.044708251953125,
0.0171356201171875,
-0.011810302734375,
-0.01611328125,
-0.032867431640625,
0.04791259765625,
-0.01378631591796875,
-0.0499267578125,
-0.06378173828125,
0.044464111328125,
0.068359375,
-0.003734588623046875,
0.0265350341796875,
0.00872039794921875,
-0.0026950836181640625,
0.02691650390625,
0.028564453125,
-0.0219879150390625,
-0.012481689453125,
0.053497314453125,
0.00879669189453125,
-0.0204010009765625,
0.026947021484375,
-0.0249786376953125,
0.0012159347534179688,
0.05517578125,
0.09796142578125,
-0.0810546875,
0.0263519287109375,
0.06414794921875,
0.0038623809814453125,
-0.006832122802734375,
-0.0015850067138671875,
-0.01763916015625,
-0.0121612548828125,
0.050628662109375,
-0.0207061767578125,
-0.0146484375,
0.0308837890625,
-0.00318145751953125,
-0.0169525146484375,
-0.02032470703125,
0.0216827392578125,
0.0129547119140625,
-0.051300048828125,
0.022125244140625,
0.033050537109375,
-0.00418853759765625,
0.00768280029296875,
0.007289886474609375,
0.004695892333984375,
-0.036865234375,
-0.0280914306640625,
0.004734039306640625,
-0.0251007080078125,
-0.00885772705078125,
0.03277587890625,
-0.0261688232421875,
0.033203125,
0.051483154296875,
-0.0190277099609375,
0.02655029296875,
0.012115478515625,
0.02069091796875,
-0.038909912109375,
-0.0119171142578125,
0.036590576171875,
0.00917816162109375,
-0.07183837890625,
0.03521728515625,
-0.051177978515625,
-0.0225067138671875,
-0.018280029296875,
-0.0023651123046875,
0.0635986328125,
-0.0142822265625,
-0.020751953125,
0.026275634765625,
0.006656646728515625,
-0.004978179931640625,
-0.0019273757934570312,
0.0302581787109375,
-0.06781005859375,
-0.040985107421875,
-0.008636474609375,
-0.043212890625,
-0.0028858184814453125,
-0.0191650390625,
-0.02276611328125,
0.07666015625,
0.0302734375,
-0.00099945068359375,
0.0264739990234375,
0.0303497314453125,
-0.03253173828125,
0.03131103515625,
-0.005603790283203125,
0.00804901123046875,
-0.00872039794921875,
0.0094146728515625,
0.0120697021484375,
0.0213165283203125,
0.0035953521728515625,
-0.0080413818359375,
0.028961181640625,
0.0055389404296875,
-0.01290130615234375,
0.041900634765625,
0.07611083984375,
0.029632568359375,
0.00878143310546875,
0.00927734375,
-0.003910064697265625,
0.005035400390625,
0.0207061767578125,
-0.0219573974609375,
0.02008056640625,
-0.012237548828125,
-0.00928497314453125,
0.002349853515625,
0.002094268798828125,
-0.0263824462890625,
0.001132965087890625,
0.00820159912109375,
-0.08135986328125,
0.014556884765625,
0.035369873046875,
0.0173797607421875,
-0.01010894775390625,
0.01128387451171875,
0.005413055419921875,
-0.0440673828125,
-0.0223388671875,
-0.0278778076171875,
0.0306243896484375,
0.007663726806640625,
0.01336669921875,
0.035980224609375,
0.01238250732421875,
0.04473876953125,
-0.01654052734375,
0.006542205810546875,
0.0206298828125,
-0.00196075439453125,
0.04266357421875,
0.0487060546875,
0.02716064453125,
-0.0307159423828125,
-0.041961669921875,
0.04852294921875,
0.0667724609375,
-0.02288818359375,
-0.0174560546875,
-0.0159912109375,
-0.01190185546875,
0.04315185546875,
-0.01497650146484375,
0.0648193359375,
-0.0546875,
-0.0682373046875,
0.00018858909606933594,
0.01263427734375,
0.06170654296875,
-0.0169830322265625,
0.012115478515625,
0.014556884765625,
-0.013702392578125,
0.034088134765625,
-0.025299072265625,
0.01052093505859375,
-0.006755828857421875,
0.026580810546875,
0.0005135536193847656,
0.061187744140625,
0.00909423828125,
-0.0186309814453125,
-0.0131378173828125,
0.037445068359375,
-0.01070404052734375,
0.041351318359375,
-0.06866455078125,
-0.064697265625,
0.0290985107421875,
0.0606689453125,
0.0259552001953125,
0.0136260986328125,
0.0183868408203125,
0.0196990966796875,
-0.0098114013671875,
-0.007717132568359375,
0.0290069580078125,
-0.017120361328125,
0.057037353515625,
-0.021392822265625,
-0.012969970703125,
-0.0012216567993164062,
-0.032867431640625,
-0.03948974609375,
-0.037139892578125,
0.06451416015625,
-0.0015096664428710938,
0.0400390625,
-0.0012798309326171875,
-0.030548095703125,
-0.0007066726684570312,
-0.026519775390625,
0.0716552734375,
0.02935791015625,
-0.0164947509765625,
-0.03558349609375,
0.035186767578125,
0.0024013519287109375,
0.0234375,
0.04107666015625,
-0.00557708740234375,
0.034393310546875,
-0.0017538070678710938,
0.017547607421875,
0.01406097412109375,
0.00701141357421875,
-0.0210418701171875,
-0.0107879638671875,
0.043212890625,
-0.00717926025390625,
-0.063720703125,
-0.0231475830078125,
-0.041473388671875,
0.042266845703125,
0.0160675048828125,
0.08538818359375,
-0.03448486328125,
0.018035888671875,
-0.0209503173828125,
-0.01483917236328125,
-0.0035114288330078125,
-0.0176544189453125,
0.0273590087890625,
0.0001952648162841797,
-0.00373077392578125,
-0.01910400390625,
-0.0638427734375,
0.01241302490234375,
0.0217742919921875,
-0.017669677734375,
0.032501220703125,
-0.0002944469451904297,
0.02349853515625,
-0.0294189453125,
-0.01201629638671875,
-0.033843994140625,
-0.04510498046875,
-0.048095703125,
-0.003387451171875,
0.020294189453125,
0.01534271240234375,
0.0026454925537109375,
0.013153076171875,
-0.0301055908203125,
-0.03924560546875,
-0.004238128662109375,
-0.04888916015625,
-0.02032470703125,
0.028289794921875,
-0.01074981689453125,
-0.0010595321655273438,
0.028778076171875,
-0.021514892578125,
0.002490997314453125,
0.017425537109375,
0.0212249755859375,
0.007556915283203125,
-0.0195159912109375,
-0.0582275390625,
-0.01116943359375,
0.0124053955078125,
0.00299072265625,
0.006259918212890625,
-0.0484619140625,
-0.01114654541015625,
0.00423431396484375,
-0.0012636184692382812,
0.0023193359375,
0.0114898681640625,
-0.0138397216796875,
0.0237579345703125,
0.008514404296875,
-0.0041656494140625,
-0.0192108154296875,
-0.0364990234375,
0.0258636474609375,
-0.01332855224609375,
0.01128387451171875,
-0.03131103515625,
-0.019622802734375,
-0.013214111328125,
0.00010037422180175781,
0.0211639404296875,
-0.00444793701171875,
0.00547027587890625,
-0.055755615234375,
-0.03460693359375,
-0.04779052734375,
0.0280303955078125,
-0.052581787109375,
0.01354217529296875,
0.051177978515625,
-0.0362548828125,
0.006359100341796875,
0.002414703369140625,
0.01355743408203125,
0.05419921875,
0.00824737548828125,
-0.0382080078125,
0.00556182861328125,
-0.00348663330078125,
0.00337982177734375,
0.0017910003662109375,
0.01413726806640625,
-0.01050567626953125,
-0.046173095703125,
-0.043487548828125,
-0.0012359619140625,
-0.00653076171875,
-0.054901123046875,
-0.08087158203125,
0.09503173828125,
-0.0338134765625,
-0.018585205078125,
-0.01702880859375,
0.030303955078125,
0.005977630615234375,
-0.0307464599609375,
-0.01251220703125,
-0.0011510848999023438,
0.00687408447265625,
0.0121307373046875,
0.00763702392578125,
0.024200439453125,
0.03326416015625,
-0.0224151611328125,
0.0126800537109375,
0.0274658203125,
0.0303955078125,
0.0276947021484375,
-0.0296783447265625,
-0.01629638671875,
0.044891357421875,
0.0440673828125,
-0.00389862060546875,
0.030731201171875,
0.048065185546875,
0.0282135009765625,
-0.0173187255859375,
-0.00809478759765625,
0.0243072509765625,
0.028594970703125,
-0.0004620552062988281,
0.015869140625,
-0.00714874267578125,
-0.03106689453125,
-0.049896240234375,
-0.0352783203125,
0.006927490234375,
-0.00756072998046875,
0.002864837646484375,
-0.06781005859375,
-0.00392913818359375,
0.0155181884765625,
0.00577545166015625,
0.00437164306640625,
0.00542449951171875,
-0.001251220703125,
-0.0104217529296875,
0.026763916015625,
-0.01445770263671875,
-0.0027599334716796875,
-0.052703857421875,
0.0640869140625,
-0.02520751953125,
0.0125579833984375,
0.00852203369140625,
0.050079345703125,
0.007701873779296875,
0.00913238525390625,
0.0452880859375,
0.049774169921875,
-0.05780029296875,
-0.0195159912109375,
0.017822265625,
0.022186279296875,
-0.02398681640625,
-0.034881591796875,
0.01428985595703125,
0.05230712890625,
-0.015411376953125,
0.06964111328125,
-0.00921630859375,
0.06671142578125,
0.0019273757934570312,
0.031463623046875,
-0.0057220458984375,
0.008331298828125,
-0.0216522216796875,
0.035736083984375,
-0.0190887451171875,
-0.00260162353515625,
0.004749298095703125,
-0.004192352294921875,
0.0173492431640625,
0.0299224853515625,
0.048614501953125,
0.0008096694946289062,
0.03302001953125,
0.0008153915405273438,
0.0164642333984375,
0.011749267578125
] |
cdd5168d73782476d990275567e0a731948a24eb
|
Wordpress Stackexchange
Q: How can I allow the Editor Role to change Theme Settings? I've just setup a new Blog for a friend and thought it's better to not give him Administrator Access right away as a precaution.
I created a new user as Editor therefore.
But then I saw that this user can not change the Theme Settings like Background and Header.
Is there an easy way to allow the Editor Role to edit any theme settings in Twenty Ten or a Child of it? He should basically be able to do anything an Administrator can do reg. the Theme, probably even changing themes.
A: Since this is the 1st hit on google for this question, I feel this is the right place for an update:
For me, I couldn't get it to work via edit_theme_options. Then I read the plugin source and found out that it's actually manage_options. And it worked.
tl;dr:
$role_object = get_role( 'editor' );
$role_object->add_cap( 'manage_options' );
works for me (in the year 2014)
|
Q: How can I allow the Editor Role to change Theme Settings? I've just setup a new Blog for a friend and thought it's better to not give him Administrator Access right away as a precaution.
I created a new user as Editor therefore.
But then I saw that this user can not change the Theme Settings like Background and Header.
Is there an easy way to allow the Editor Role to edit any theme settings in Twenty Ten or a Child of it? He should basically be able to do anything an Administrator can do reg. the Theme, probably even changing themes.
A: Since this is the 1st hit on google for this question, I feel this is the right place for an update:
For me, I couldn't get it to work via edit_theme_options. Then I read the plugin source and found out that it's actually manage_options. And it worked.
tl;dr:
$role_object = get_role( 'editor' );
$role_object->add_cap( 'manage_options' );
works for me (in the year 2014)
A: Don't they need the "edit_themes" capability? You can use Justin Tadlocks plugin http://wordpress.org/extend/plugins/members/ to edit the capabilities associated with each role.
A: you can add capabilities to the editor role using the role object and add_cap from you functions.php
<?php
// get the the role object
$editor = get_role('editor');
// add $cap capability to this role object
$editor->add_cap('edit_theme_options');
?>
you can also remove capabilities:
$editor->remove_cap('delete_posts');
just take a look at the list of capabilities and what each one means.
A: Another great plugin is User Role Editor (http://wordpress.org/extend/plugins/user-role-editor/). It is similar to Members, but much more basic and simple to use. Plus, the developers are always around to listen to feedback and offer assistance, if needed.
A: This is old, but here's a newer way you could achieve this:
add_filter( 'user_has_cap',
function( $caps ) {
if ( ! empty( $caps['edit_pages'] ) )
$caps['edit_theme_options'] = true;
return $caps;
} );
|
wordpress
|
{
"language": "en",
"length": 317,
"provenance": "stackexchange_00019.jsonl.gz:408056",
"question_score": "23",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12984"
}
|
[
0.0170440673828125,
-0.05560302734375,
0.039581298828125,
0.0157470703125,
-0.050262451171875,
-0.0096893310546875,
0.03070068359375,
-0.0275726318359375,
-0.00286102294921875,
0.04205322265625,
-0.0006923675537109375,
-0.016876220703125,
0.0122528076171875,
-0.02716064453125,
-0.0299224853515625,
-0.0264129638671875,
0.01678466796875,
-0.0206146240234375,
0.0016803741455078125,
-0.02978515625,
0.0256195068359375,
-0.01491546630859375,
-0.0031280517578125,
0.0119476318359375,
0.036956787109375,
0.01132965087890625,
0.0037212371826171875,
-0.0143890380859375,
0.01318359375,
-0.0047760009765625,
0.0255584716796875,
-0.0303192138671875,
0.0075225830078125,
0.029541015625,
-0.01067352294921875,
0.03240966796875,
0.022430419921875,
0.00516510009765625,
0.025177001953125,
0.0191192626953125,
0.0282440185546875,
-0.0003757476806640625,
-0.0217742919921875,
0.06768798828125,
-0.0162506103515625,
-0.0875244140625,
0.0638427734375,
-0.039459228515625,
0.004039764404296875,
-0.041046142578125,
0.006175994873046875,
0.011077880859375,
0.031402587890625,
-0.01763916015625,
-0.0186767578125,
-0.029632568359375,
0.01605224609375,
0.003932952880859375,
0.027435302734375,
-0.01360321044921875,
-0.0281982421875,
0.0024700164794921875,
0.0216217041015625,
-0.01023101806640625,
0.01448822021484375,
0.0012731552124023438,
0.031707763671875,
0.0305633544921875,
-0.07586669921875,
-0.01373291015625,
0.0269927978515625,
-0.0391845703125,
0.00797271728515625,
-0.0279693603515625,
0.0034351348876953125,
0.00592803955078125,
-0.02056884765625,
-0.0245361328125,
0.0305938720703125,
-0.0095062255859375,
0.042144775390625,
-0.01157379150390625,
0.004180908203125,
-0.015167236328125,
0.037567138671875,
0.018463134765625,
0.007564544677734375,
-0.0235748291015625,
-0.005847930908203125,
-0.00033545494079589844,
0.002254486083984375,
-0.01071929931640625,
-0.018768310546875,
0.0322265625,
0.009429931640625,
-0.009063720703125,
0.0301513671875,
0.034210205078125,
-0.005901336669921875,
0.00021600723266601562,
0.016326904296875,
-0.06365966796875,
0.05230712890625,
-0.041229248046875,
-0.0142364501953125,
0.01806640625,
0.01090240478515625,
-0.022613525390625,
0.00457763671875,
0.03155517578125,
-0.0140380859375,
-0.00742340087890625,
0.0017271041870117188,
-0.0156707763671875,
-0.01197052001953125,
0.0009760856628417969,
-0.0294036865234375,
0.00791168212890625,
-0.0068817138671875,
0.0014629364013671875,
-0.0020046234130859375,
0.026702880859375,
0.007404327392578125,
-0.041595458984375,
-0.032318115234375,
-0.043731689453125,
-0.032318115234375,
-0.0304107666015625,
0.006290435791015625,
-0.0004189014434814453,
-0.04046630859375,
0.0146331787109375,
0.07373046875,
0.05303955078125,
0.029449462890625,
-0.015106201171875,
0.031585693359375,
-0.012969970703125,
-0.0157470703125,
0.007328033447265625,
0.0130157470703125,
-0.00921630859375,
-0.004329681396484375,
-0.0169525146484375,
-0.0095672607421875,
0.0093231201171875,
0.0062713623046875,
0.0250396728515625,
0.002498626708984375,
-0.045501708984375,
0.005329132080078125,
-0.0277252197265625,
0.0031566619873046875,
0.00885009765625,
0.05841064453125,
-0.045135498046875,
0.05108642578125,
-0.035614013671875,
0.0310516357421875,
-0.0234222412109375,
-0.02423095703125,
0.003589630126953125,
0.061859130859375,
-0.00942230224609375,
-0.0218048095703125,
0.012359619140625,
-0.034423828125,
-0.00643157958984375,
0.014251708984375,
-0.06597900390625,
0.03643798828125,
0.01503753662109375,
0.0189666748046875,
-0.00362396240234375,
0.01543426513671875,
0.0201568603515625,
-0.004638671875,
-0.0103759765625,
0.00873565673828125,
0.020050048828125,
0.002376556396484375,
-0.0306854248046875,
0.0018968582153320312,
-0.0024929046630859375,
-0.01556396484375,
-0.011962890625,
-0.01470184326171875,
-0.0018939971923828125,
0.038482666015625,
0.019683837890625,
-0.0174407958984375,
0.00299835205078125,
0.00536346435546875,
-0.0257110595703125,
0.0228118896484375,
-0.01885986328125,
-0.01465606689453125,
-0.012298583984375,
0.00716400146484375,
-0.01161956787109375,
0.048187255859375,
-0.0238037109375,
0.017364501953125,
-0.043853759765625,
-0.033599853515625,
-0.031005859375,
-0.004589080810546875,
0.021820068359375,
0.0494384765625,
0.0246429443359375,
-0.020111083984375,
0.005588531494140625,
0.009124755859375,
-0.08026123046875,
-0.043792724609375,
0.0457763671875,
-0.0029392242431640625,
0.05316162109375,
0.016448974609375,
0.0155181884765625,
0.049285888671875,
-0.0567626953125,
0.049346923828125,
0.0213470458984375,
0.00949859619140625,
-0.0168304443359375,
0.006023406982421875,
-0.009765625,
0.0430908203125,
0.009765625,
0.0181427001953125,
-0.0304718017578125,
0.01317596435546875,
-0.0126800537109375,
-0.01788330078125,
-0.00732421875,
0.0037937164306640625,
-0.1094970703125,
0.0210113525390625,
0.0767822265625,
0.039764404296875,
0.0196533203125,
-0.0090179443359375,
-0.035888671875,
0.040557861328125,
-0.025604248046875,
0.022735595703125,
-0.038848876953125,
0.03668212890625,
0.044708251953125,
-0.0111846923828125,
-0.0276641845703125,
0.0232696533203125,
-0.01432037353515625,
0.019927978515625,
0.0269012451171875,
-0.0162506103515625,
-0.0052642822265625,
0.0123138427734375,
-0.0131988525390625,
-0.0026378631591796875,
-0.035888671875,
-0.005519866943359375,
-0.0330810546875,
0.013824462890625,
0.01361083984375,
0.0149078369140625,
0.00997161865234375,
-0.03900146484375,
0.01611328125,
0.01525115966796875,
-0.00823211669921875,
0.004566192626953125,
0.049224853515625,
-0.03265380859375,
0.0231781005859375,
-0.0270233154296875,
-0.00356292724609375,
0.002170562744140625,
0.0285491943359375,
-0.0267181396484375,
0.0006780624389648438,
-0.00811767578125,
-0.0173797607421875,
0.0016736984252929688,
-0.0267333984375,
0.0159759521484375,
-0.0099945068359375,
0.01055145263671875,
0.006252288818359375,
0.02880859375,
-0.01397705078125,
-0.04302978515625,
0.03350830078125,
-0.00017821788787841797,
-0.034912109375,
0.00870513916015625,
-0.0628662109375,
0.042724609375,
-0.038604736328125,
0.04150390625,
0.05914306640625,
-0.01061248779296875,
0.0034332275390625,
0.03668212890625,
-0.044036865234375,
0.038970947265625,
0.0360107421875,
0.024261474609375,
0.0121612548828125,
-0.03619384765625,
0.0355224609375,
0.0174713134765625,
-0.042144775390625,
0.0281829833984375,
-0.005645751953125,
-0.0218048095703125,
0.00604248046875,
-0.00553131103515625,
0.0247039794921875,
0.03851318359375,
-0.0731201171875,
-0.04205322265625,
0.001255035400390625,
-0.05596923828125,
-0.0062713623046875,
0.033905029296875,
-0.0162353515625,
0.0080413818359375,
-0.01155853271484375,
0.0154571533203125,
-0.004535675048828125,
-0.036956787109375,
-0.06976318359375,
0.0098114013671875,
-0.0141754150390625,
-0.01190185546875,
0.07550048828125,
-0.0156402587890625,
-0.0755615234375,
-0.037811279296875,
-0.0221099853515625,
-0.009124755859375,
-0.0019550323486328125,
0.02996826171875,
-0.01479339599609375,
0.0009360313415527344,
0.002742767333984375,
0.00652313232421875,
0.0200347900390625,
-0.0295867919921875,
-0.035369873046875,
-0.0301513671875,
-0.03094482421875,
-0.0220794677734375,
0.042327880859375,
0.035186767578125,
-0.01678466796875,
0.0169830322265625,
-0.047149658203125,
-0.01403045654296875,
-0.0177154541015625,
-0.058990478515625,
0.0242156982421875,
0.0245361328125,
0.0122528076171875,
-0.006191253662109375,
0.008453369140625,
-0.0027904510498046875,
-0.0013914108276367188,
-0.007793426513671875,
-0.0247344970703125,
0.03961181640625,
0.01059722900390625,
0.0195465087890625,
0.0185394287109375,
-0.0285491943359375,
-0.0390625,
0.0187530517578125,
-0.022552490234375,
-0.00067138671875,
-0.038970947265625,
0.048095703125,
-0.041259765625,
-0.05523681640625,
0.0418701171875,
-0.04315185546875,
0.02386474609375,
-0.043060302734375,
-0.0182647705078125,
-0.0132293701171875,
0.09588623046875,
-0.017822265625,
-0.0079193115234375,
0.0195159912109375,
0.018798828125,
-0.04840087890625,
-0.01177978515625,
-0.045654296875,
-0.01132965087890625,
-0.09576416015625,
0.008331298828125,
-0.01532745361328125,
-0.01751708984375,
-0.0301971435546875,
0.036590576171875,
-0.0526123046875,
-0.0380859375,
0.04071044921875,
-0.005588531494140625,
-0.00786590576171875,
0.033294677734375,
-0.033843994140625,
0.0079803466796875,
-0.034576416015625,
0.00568389892578125,
-0.137451171875,
-0.035888671875,
0.004791259765625,
0.10009765625,
0.006000518798828125,
0.0017232894897460938,
-0.009002685546875,
0.08111572265625,
0.007427215576171875,
0.03424072265625,
0.00707244873046875,
0.0245819091796875,
0.021575927734375,
-0.03741455078125,
0.0019207000732421875,
-0.03173828125,
0.00791168212890625,
0.0111236572265625,
-0.03125,
0.019073486328125,
-0.029998779296875,
-0.0218048095703125,
0.0179595947265625,
-0.05377197265625,
-0.05340576171875,
-0.0113983154296875,
-0.031158447265625,
0.0007376670837402344,
-0.0296630859375,
0.005462646484375,
-0.0168609619140625,
-0.048370361328125,
0.05767822265625,
-0.059844970703125,
0.0175323486328125,
0.00028777122497558594,
0.12451171875,
0.014617919921875,
0.0036792755126953125,
0.0269775390625,
-0.008575439453125,
0.02923583984375,
0.021728515625,
0.01490020751953125,
0.00337982177734375,
-0.0303802490234375,
0.052337646484375,
0.00390625,
-0.0143890380859375,
-0.0262451171875,
0.0435791015625,
-0.00034689903259277344,
-0.0191497802734375,
0.007495880126953125,
-0.018218994140625,
0.025604248046875,
-0.00994110107421875,
-0.005619049072265625,
0.00620269775390625,
0.01202392578125,
0.00801849365234375,
0.00624847412109375,
0.0053558349609375,
-0.01450347900390625,
-0.0289154052734375,
0.002468109130859375,
-0.00911712646484375,
0.039337158203125,
0.027862548828125,
0.00058746337890625,
0.023162841796875,
0.031982421875,
-0.00632476806640625,
0.005046844482421875,
0.02606201171875,
-0.0129241943359375,
0.0462646484375,
-0.0298309326171875,
-0.01444244384765625,
-0.02410888671875,
-0.01477813720703125,
0.058685302734375,
-0.01453399658203125,
-0.06671142578125,
-0.0159454345703125,
-0.0186004638671875,
0.031341552734375,
0.031494140625,
-0.0313720703125,
0.0255126953125,
0.0308837890625,
-0.00461578369140625,
-0.004638671875,
-0.005649566650390625,
-0.005970001220703125,
-0.031219482421875,
0.01934814453125,
0.0135345458984375,
-0.0247344970703125,
0.033935546875,
-0.007007598876953125,
0.0272674560546875,
-0.008544921875,
-0.0228118896484375,
0.01959228515625,
0.027923583984375,
-0.01329803466796875,
0.0011110305786132812,
0.03668212890625,
0.0161590576171875,
-0.060028076171875,
0.036712646484375,
-0.025177001953125,
-0.0083770751953125,
0.02392578125,
0.030364990234375,
-0.020355224609375,
-0.028076171875,
0.0229339599609375,
-0.01293182373046875,
0.005237579345703125,
0.0218048095703125,
-0.01555633544921875,
-0.040985107421875,
-0.00334930419921875,
0.030975341796875,
0.0287628173828125,
-0.03656005859375,
-0.00266265869140625,
-0.01837158203125,
-0.00839996337890625,
0.0024242401123046875,
-0.024993896484375,
-0.0325927734375,
0.014068603515625,
0.01555633544921875,
-0.07080078125,
-0.0017690658569335938,
0.01092529296875,
-0.07757568359375,
-0.048553466796875,
0.00714874267578125,
-0.0220794677734375,
0.026275634765625,
-0.0157928466796875,
0.00888824462890625,
-0.031707763671875,
0.00746917724609375,
-0.022430419921875,
0.0007572174072265625,
0.046661376953125,
0.007083892822265625,
-0.07568359375,
0.0180206298828125,
-0.05743408203125,
0.01331329345703125,
-0.06793212890625,
-0.0755615234375,
-0.03204345703125,
-0.002079010009765625,
0.031341552734375,
0.02655029296875,
0.00098419189453125,
-0.043670654296875,
-0.0204925537109375,
0.0265350341796875,
0.045501708984375,
0.09222412109375,
-0.01537322998046875,
0.032318115234375,
0.025299072265625,
0.01446533203125,
-0.00339508056640625,
-0.0159912109375,
-0.0235137939453125,
0.00292205810546875,
0.0061187744140625,
-0.013397216796875,
-0.01055145263671875,
-0.0115966796875,
-0.0037403106689453125,
0.01308441162109375,
0.0714111328125,
-0.004955291748046875,
0.04217529296875,
-0.036712646484375,
0.015716552734375,
-0.0243988037109375,
-0.016845703125,
-0.11328125,
-0.007434844970703125,
-0.01030731201171875,
-0.0278472900390625,
0.0230255126953125,
-0.004703521728515625,
-0.0280609130859375,
0.0458984375,
-0.0204925537109375,
0.027435302734375,
0.043701171875,
-0.056915283203125,
0.05218505859375,
0.07745361328125,
0.00972747802734375,
0.037017822265625,
0.02398681640625,
0.000125885009765625,
0.0048828125,
0.0030269622802734375,
-0.013916015625,
0.014007568359375,
-0.00508880615234375,
-0.01023101806640625,
0.018157958984375,
-0.0272064208984375,
-0.00817108154296875,
0.043975830078125,
0.08026123046875,
0.07745361328125,
-0.11236572265625,
0.020751953125,
0.00666046142578125,
0.01154327392578125,
0.0848388671875,
0.0034198760986328125,
0.00372314453125,
-0.0054168701171875,
0.05694580078125,
-0.070068359375,
-0.006984710693359375,
0.029693603515625,
-0.04345703125,
-0.016326904296875,
-0.0180511474609375,
0.0218048095703125,
0.01331329345703125,
0.00971221923828125,
0.0193328857421875,
-0.01219940185546875,
0.0092926025390625,
0.00635528564453125,
0.034149169921875,
-0.041778564453125,
-0.0202484130859375,
-0.041595458984375,
-0.03240966796875,
-0.00348663330078125,
-0.048370361328125,
-0.026214599609375,
-0.01806640625,
0.0121917724609375,
0.0504150390625,
-0.03253173828125,
-0.0004153251647949219,
0.04534912109375,
-0.031524658203125,
-0.0290679931640625,
-0.014129638671875,
0.0361328125,
0.0102996826171875,
-0.006664276123046875,
0.02685546875,
-0.0016622543334960938,
-0.0458984375,
-0.016143798828125,
-0.030242919921875,
0.0205230712890625,
0.0078125,
-0.0192108154296875,
0.0294342041015625,
0.031280517578125,
-0.01904296875,
0.0013208389282226562,
-0.015594482421875,
-0.044219970703125,
-0.01271820068359375,
-0.0096588134765625,
-0.0179595947265625,
0.0209808349609375,
0.0263214111328125,
-0.03302001953125,
0.09625244140625,
-0.03814697265625,
-0.00218963623046875,
0.0220794677734375,
0.040283203125,
-0.0160980224609375,
0.01483154296875,
-0.0144195556640625,
0.02935791015625,
-0.006603240966796875,
0.004299163818359375,
-0.0247039794921875,
0.012603759765625,
-0.0210113525390625,
0.01873779296875,
0.052215576171875,
0.0214080810546875,
-0.028533935546875,
-0.019073486328125,
0.01241302490234375,
0.01175689697265625,
-0.0199432373046875,
0.054779052734375,
-0.023529052734375,
0.0019178390502929688,
-0.0021514892578125,
-0.033416748046875,
0.02001953125,
-0.05218505859375,
-0.0275421142578125,
0.0007424354553222656,
0.000024318695068359375,
-0.006504058837890625,
0.007274627685546875,
0.01525115966796875,
-0.0472412109375,
-0.004283905029296875,
0.03741455078125,
-0.06292724609375,
-0.00763702392578125,
0.01418304443359375,
0.040252685546875,
-0.037567138671875,
-0.004985809326171875,
-0.016510009765625,
0.04888916015625,
0.0223541259765625,
-0.041168212890625,
-0.048614501953125,
-0.0007119178771972656,
-0.034423828125,
-0.036651611328125,
-0.036529541015625,
0.043792724609375,
-0.034149169921875,
0.00572967529296875,
0.0033416748046875,
0.0100860595703125,
-0.01953125,
0.039215087890625,
0.005306243896484375,
-0.005115509033203125,
-0.0293426513671875,
-0.0094146728515625,
0.0126495361328125,
0.01023101806640625,
-0.00439453125,
-0.0206146240234375,
0.0024776458740234375,
0.00750732421875,
0.025604248046875,
-0.05987548828125,
0.00649261474609375,
0.037322998046875,
0.01471710205078125,
-0.0050201416015625,
0.00897216796875,
-0.03131103515625,
0.00443267822265625,
-0.01206207275390625,
-0.01363372802734375,
0.01318359375,
0.01134490966796875,
0.0163421630859375,
0.01418304443359375,
0.022735595703125,
0.006237030029296875,
-0.01212310791015625,
0.058502197265625,
-0.0079193115234375,
0.0019159317016601562,
-0.02960205078125,
-0.0506591796875,
-0.012481689453125,
0.0300750732421875,
-0.01352691650390625,
-0.047393798828125,
-0.0019350051879882812,
0.016845703125,
-0.0186004638671875,
-0.0162200927734375,
-0.0045013427734375,
-0.016937255859375,
0.00957489013671875,
-0.0292816162109375,
0.023681640625,
0.005481719970703125,
-0.007732391357421875,
-0.007534027099609375,
0.03204345703125,
0.03851318359375,
-0.01294708251953125,
0.022796630859375,
0.005123138427734375,
0.01074981689453125,
0.00797271728515625,
-0.0157928466796875,
-0.01366424560546875,
0.01461029052734375,
-0.04583740234375,
-0.0022106170654296875,
-0.049530029296875,
-0.039703369140625,
0.0247344970703125,
0.03326416015625,
-0.0289459228515625,
0.030731201171875,
-0.050262451171875,
-0.00439453125,
0.0166015625,
-0.01332855224609375,
-0.00806427001953125,
0.014434814453125,
0.0019073486328125,
-0.01555633544921875,
-0.0160369873046875,
-0.0263824462890625,
-0.0266876220703125,
0.0625,
0.03009033203125,
0.04412841796875,
-0.0263214111328125,
0.039825439453125,
-0.03350830078125,
0.03399658203125,
-0.042572021484375,
-0.05084228515625,
0.062255859375,
0.0017261505126953125,
-0.003063201904296875,
-0.00676727294921875,
-0.045867919921875,
0.0662841796875,
0.0189666748046875,
-0.0023136138916015625,
0.03179931640625,
0.003025054931640625,
-0.004436492919921875,
-0.016204833984375,
0.031402587890625,
-0.021087646484375,
-0.035675048828125,
-0.045166015625,
0.0018463134765625,
0.004917144775390625,
-0.004611968994140625,
-0.016693115234375,
0.0186920166015625,
-0.0235443115234375,
-0.005367279052734375,
-0.01337432861328125,
0.02581787109375,
-0.046844482421875,
0.01517486572265625,
-0.042877197265625,
-0.058380126953125,
0.0528564453125,
0.0109405517578125,
-0.00789642333984375,
0.025238037109375,
0.06829833984375,
0.0286712646484375,
-0.06195068359375,
0.045013427734375,
0.0135650634765625,
0.0479736328125,
-0.016143798828125,
0.003021240234375,
0.0423583984375,
0.007781982421875,
-0.019073486328125,
-0.026824951171875,
-0.027496337890625,
-0.037811279296875,
-0.00921630859375,
0.0172576904296875,
-0.0208282470703125,
-0.07110595703125,
-0.06842041015625,
0.0146942138671875,
0.03045654296875,
0.0033245086669921875,
-0.0810546875,
0.035736083984375,
-0.0187225341796875,
0.06878662109375,
-0.023162841796875,
-0.032196044921875,
0.0294342041015625,
0.005615234375,
-0.041351318359375,
0.01532745361328125,
-0.0204925537109375,
-0.03271484375,
-0.0033206939697265625,
0.01702880859375,
0.04669189453125,
0.0014123916625976562,
-0.002471923828125,
0.038299560546875,
-0.028411865234375,
0.08941650390625,
-0.09649658203125,
-0.01357269287109375,
0.0004787445068359375,
0.0185699462890625,
-0.031707763671875,
-0.06353759765625,
0.0096435546875,
-0.04449462890625,
-0.00457763671875,
-0.036590576171875,
-0.005847930908203125,
-0.00023865699768066406,
-0.05419921875,
-0.037933349609375,
0.0173797607421875,
0.0003170967102050781,
-0.03204345703125,
-0.0169677734375,
-0.0011043548583984375,
-0.00698089599609375,
0.0171356201171875,
0.006366729736328125,
-0.018341064453125,
-0.01454925537109375,
0.021636962890625,
0.00325775146484375,
0.00534820556640625,
-0.018402099609375,
0.0017976760864257812,
-0.08349609375,
0.02484130859375,
0.01398468017578125,
-0.0033245086669921875,
0.01117706298828125,
0.015045166015625,
0.0001316070556640625,
0.04522705078125,
-0.025115966796875,
-0.053436279296875,
-0.039459228515625,
-0.03546142578125,
-0.033477783203125,
-0.0193634033203125,
-0.0166168212890625,
-0.000021278858184814453,
0.08184814453125,
0.0740966796875,
0.00989532470703125,
-0.037353515625,
-0.035736083984375,
-0.023651123046875,
-0.04400634765625,
0.0014104843139648438,
0.0296478271484375,
-0.06524658203125,
0.00481414794921875,
0.006855010986328125,
-0.00592041015625,
0.006015777587890625,
0.00891876220703125,
-0.0232391357421875,
-0.0209197998046875,
-0.021636962890625,
-0.00859832763671875,
-0.05596923828125,
-0.002262115478515625,
0.044097900390625,
-0.0276947021484375,
0.0148468017578125,
-0.0029850006103515625,
0.005077362060546875,
0.025634765625,
0.023834228515625,
-0.020477294921875,
-0.0164337158203125,
-0.048095703125,
0.03814697265625,
-0.04241943359375,
0.04144287109375,
-0.08526611328125,
0.0004811286926269531,
0.03460693359375,
0.00878143310546875,
-0.026031494140625,
0.0020542144775390625,
0.0206298828125,
0.0201263427734375,
-0.04693603515625,
0.0711669921875,
-0.004360198974609375,
0.0174102783203125,
0.0005784034729003906,
0.0163421630859375,
-0.0214080810546875,
0.0033740997314453125,
0.00841522216796875,
-0.0401611328125,
0.01464080810546875,
0.003326416015625,
0.051666259765625,
-0.01557159423828125,
0.01751708984375,
0.0013294219970703125,
0.0086517333984375,
0.01119232177734375
] |
1f31bab40d5f25dad1614338cb3973959bdecc80
|
Wordpress Stackexchange
Q: What is the best Captcha plugin for registration? I'm suffering from the issue of lots of fake registrations for my site.
I'd like to add a captcha for registrations. What is the best plugin that
will require a captcha at registration? Recommendations based on real installs are most appriciated!
Also: I'm using the most up-to-date install of WP.
A: My favorite captcha plugin is reCaptcha. The captcha images are scans from old, damaged books. A computer identifies possibilities with OCR, then the user, in correctly filling out the captcha, confirms it. It helps digitize whole books this way.
It's an initiative by Google. Read about them on their website.
|
Q: What is the best Captcha plugin for registration? I'm suffering from the issue of lots of fake registrations for my site.
I'd like to add a captcha for registrations. What is the best plugin that
will require a captcha at registration? Recommendations based on real installs are most appriciated!
Also: I'm using the most up-to-date install of WP.
A: My favorite captcha plugin is reCaptcha. The captcha images are scans from old, damaged books. A computer identifies possibilities with OCR, then the user, in correctly filling out the captcha, confirms it. It helps digitize whole books this way.
It's an initiative by Google. Read about them on their website.
A: Update: From my hard-earned and painful expereince, KeyCAPTCHA is a scam by professional spammers
keycaptcha.com site has live online demo and it serves not only WordPress/BuddyPress powered websites but all PHP5-based CMSs. It is specially designed that in case of being cracked, pool of captchas and even its type (of interactivity for passing) can be changed without plugin reinstall
Other unique features worth to mention:
*
*Customizable language support. It supports a dozen of languages (including German) and requests for new ones are welcome
*One can create his own captchas from his own images with online designer (fee-based servce in addition to free of charge one - $5/month, $20/year)
SI Captcha and reCAPTCHA (recommended in one of answers in this thread) are easily passable by spam bots
A: I actually recommend not using a traditional captcha at all.
Many usability studies show that complex or image based captchas reduce sign ups by a whopping 25-60% depending on complexity.
The alternatives are:
http://wordpress.org/extend/plugins/registrap/
Using simple math question
http://wordpress.org/extend/plugins/block-spam-by-math/
Personally I use 1 hidden field and it works like a charm and no need to squint and some lame image.
A: That depends. Do you have a custom registration page in your template, or are you using the default WordPress registration page? Or the Buddypress registration page maybe?
Have a look at SI Captcha as it supports both. http://wordpress.org/extend/plugins/si-captcha-for-wordpress/
OR if you want a cleaner looking captcha try WP-Recaptcha (API key required- free) http://wordpress.org/extend/plugins/wp-recaptcha/
I've used both and haven't had any spam sign ups yet! ... as further security you could install ban-hammer and enable stopforumspam feature that auto-blocks any e-mails on the blacklist from registering!! (do a google search for wordpress banhammer plugin... i'd link you but it won't let me post more than 2 links)
A: i like SweetCaptcha.com , they have Wordpress and Joomla plugins
here is the wordpress:
http://wordpress.org/extend/plugins/sweetcaptcha-revolutionary-free-captcha-service/
A: The one plugin all my clients love (for unknown reason) is KeyCAPTCHA - Free interactive CAPTCHA service (that is the real name).
I like it because it integrates with :
*
*Registration form
*Comment form
*Login form
*Lost password form
*Contact Form 7
*BuddyPress
A: Cartpauj Register Captcha works very well for me: http://wordpress.org/extend/plugins/cartpauj-register-captcha/
|
wordpress
|
{
"language": "en",
"length": 477,
"provenance": "stackexchange_00019.jsonl.gz:408057",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/12989"
}
|
[
0.0209808349609375,
0.0182037353515625,
0.01311492919921875,
0.0294647216796875,
-0.0038814544677734375,
-0.01276397705078125,
0.01166534423828125,
-0.06878662109375,
0.0284271240234375,
0.01560211181640625,
-0.03643798828125,
0.0101165771484375,
-0.040863037109375,
-0.0172119140625,
-0.017120361328125,
-0.03643798828125,
-0.02484130859375,
0.03228759765625,
0.006938934326171875,
-0.0309600830078125,
0.040740966796875,
-0.05255126953125,
-0.006458282470703125,
-0.005428314208984375,
0.0205535888671875,
-0.0548095703125,
0.055328369140625,
-0.00960540771484375,
0.0146026611328125,
-0.021087646484375,
0.0252227783203125,
-0.006977081298828125,
0.007709503173828125,
0.035980224609375,
-0.0155181884765625,
-0.0025005340576171875,
0.0267181396484375,
0.01654052734375,
0.01340484619140625,
0.036834716796875,
0.0309906005859375,
-0.0191802978515625,
-0.0187225341796875,
-0.0155029296875,
0.004207611083984375,
-0.034881591796875,
0.0201873779296875,
-0.035980224609375,
0.0046539306640625,
-0.07025146484375,
0.029876708984375,
0.00565338134765625,
0.061004638671875,
-0.0361328125,
-0.0249786376953125,
0.0252838134765625,
-0.00922393798828125,
0.01454925537109375,
0.00988006591796875,
0.00238037109375,
-0.005222320556640625,
0.019927978515625,
-0.00098419189453125,
0.01396942138671875,
-0.01502227783203125,
-0.0224609375,
-0.05255126953125,
0.02130126953125,
-0.0251617431640625,
-0.017669677734375,
0.041534423828125,
-0.0264129638671875,
-0.0094451904296875,
-0.013336181640625,
-0.027740478515625,
0.0306549072265625,
-0.0016050338745117188,
0.01690673828125,
0.02325439453125,
-0.007633209228515625,
-0.0214385986328125,
-0.054351806640625,
0.0019435882568359375,
0.00955963134765625,
-0.021209716796875,
0.0126800537109375,
-0.00395965576171875,
0.0210113525390625,
-0.06488037109375,
-0.0357666015625,
-0.034332275390625,
-0.00742340087890625,
-0.0919189453125,
-0.01502227783203125,
0.004547119140625,
-0.0258026123046875,
0.02752685546875,
0.0195159912109375,
-0.005962371826171875,
-0.01275634765625,
0.04510498046875,
-0.046142578125,
0.01422119140625,
0.00385284423828125,
0.0062255859375,
0.09027099609375,
0.005977630615234375,
-0.030609130859375,
-0.0038928985595703125,
-0.00008815526962280273,
0.01288604736328125,
-0.037384033203125,
0.0095977783203125,
-0.0035305023193359375,
-0.0135345458984375,
-0.000827789306640625,
-0.02423095703125,
0.036224365234375,
-0.0006709098815917969,
0.0224456787109375,
-0.01462554931640625,
-0.0054473876953125,
0.0631103515625,
-0.0016736984252929688,
-0.031585693359375,
-0.01824951171875,
-0.01377105712890625,
-0.054931640625,
-0.00890350341796875,
-0.048370361328125,
-0.027679443359375,
0.04608154296875,
0.06982421875,
0.0284881591796875,
-0.00756072998046875,
0.005748748779296875,
0.017425537109375,
0.038818359375,
0.01342010498046875,
-0.01641845703125,
0.0067138671875,
-0.007415771484375,
0.02691650390625,
0.0159149169921875,
0.0110321044921875,
0.0198822021484375,
0.006206512451171875,
-0.00458526611328125,
0.0164031982421875,
-0.0267486572265625,
0.0108795166015625,
-0.059844970703125,
0.0024738311767578125,
-0.002288818359375,
0.0219268798828125,
0.003726959228515625,
-0.035400390625,
0.01514434814453125,
0.0211181640625,
0.0367431640625,
0.0750732421875,
0.01366424560546875,
-0.0023212432861328125,
0.01424407958984375,
-0.006107330322265625,
-0.0308380126953125,
-0.047821044921875,
-0.011566162109375,
0.0218048095703125,
-0.04473876953125,
0.03143310546875,
0.0175628662109375,
0.03668212890625,
-0.0026683807373046875,
0.007793426513671875,
0.01047515869140625,
0.0219879150390625,
0.0263214111328125,
0.04095458984375,
0.028472900390625,
0.0007619857788085938,
-0.00991058349609375,
0.10760498046875,
-0.037933349609375,
-0.0283355712890625,
0.04449462890625,
-0.003002166748046875,
0.0904541015625,
0.0037631988525390625,
0.02362060546875,
-0.010498046875,
-0.0123138427734375,
-0.04486083984375,
0.0021877288818359375,
-0.016357421875,
-0.00290679931640625,
-0.00513458251953125,
0.0025386810302734375,
-0.0022106170654296875,
-0.0034618377685546875,
0.0123291015625,
-0.0162200927734375,
0.006801605224609375,
0.005863189697265625,
-0.0377197265625,
-0.0111083984375,
-0.01385498046875,
0.00347900390625,
-0.02532958984375,
-0.00556182861328125,
0.02459716796875,
-0.015838623046875,
-0.0279541015625,
0.027252197265625,
-0.00836944580078125,
-0.01082611083984375,
-0.03271484375,
0.0240631103515625,
0.01025390625,
0.00844573974609375,
0.01293182373046875,
-0.0257110595703125,
0.015594482421875,
-0.0166473388671875,
-0.01410675048828125,
0.0088348388671875,
-0.0192718505859375,
-0.000009000301361083984,
-0.00818634033203125,
0.01180267333984375,
0.0037288665771484375,
0.0245819091796875,
0.001491546630859375,
0.026947021484375,
-0.0168609619140625,
-0.029266357421875,
0.0009937286376953125,
-0.08551025390625,
0.031890869140625,
0.0457763671875,
0.027740478515625,
0.022369384765625,
0.0171661376953125,
0.042816162109375,
0.039520263671875,
-0.020904541015625,
0.020050048828125,
0.0163421630859375,
-0.0165557861328125,
-0.0191650390625,
0.03631591796875,
-0.0016622543334960938,
0.0251312255859375,
0.0452880859375,
0.0230255126953125,
0.01195526123046875,
-0.039154052734375,
-0.0001329183578491211,
-0.0301055908203125,
0.003139495849609375,
-0.0059661865234375,
-0.07379150390625,
0.0026912689208984375,
-0.040740966796875,
-0.0423583984375,
-0.0256500244140625,
-0.027069091796875,
-0.02166748046875,
0.0128173828125,
-0.029998779296875,
0.016632080078125,
-0.06500244140625,
0.0011682510375976562,
0.0276641845703125,
0.06439208984375,
0.0870361328125,
-0.074951171875,
-0.035247802734375,
0.07635498046875,
0.0712890625,
-0.031463623046875,
-0.0131378173828125,
-0.0200958251953125,
-0.007198333740234375,
-0.00640869140625,
-0.02099609375,
0.01459503173828125,
-0.005031585693359375,
-0.036102294921875,
-0.0550537109375,
-0.0010824203491210938,
0.005825042724609375,
-0.019683837890625,
0.0053863525390625,
-0.005603790283203125,
-0.034912109375,
-0.01201629638671875,
-0.0284576416015625,
0.036895751953125,
-0.03289794921875,
0.0193023681640625,
0.062225341796875,
-0.0011577606201171875,
0.0015878677368164062,
-0.00010842084884643555,
-0.023223876953125,
0.0243377685546875,
-0.02398681640625,
-0.021270751953125,
0.0016641616821289062,
-0.056549072265625,
0.0079345703125,
0.004169464111328125,
0.058868408203125,
-0.040924072265625,
-0.08087158203125,
-0.0318603515625,
-0.0009927749633789062,
-0.10968017578125,
-0.058990478515625,
-0.07049560546875,
-0.04071044921875,
0.005367279052734375,
0.007904052734375,
-0.00717926025390625,
0.004909515380859375,
0.030426025390625,
0.0035953521728515625,
-0.0267486572265625,
-0.0150146484375,
-0.03466796875,
-0.056427001953125,
-0.049774169921875,
0.012420654296875,
0.01515960693359375,
0.014495849609375,
0.0102691650390625,
0.05224609375,
0.007213592529296875,
-0.06683349609375,
0.0001914501190185547,
-0.033233642578125,
0.007503509521484375,
0.056396484375,
0.004550933837890625,
0.01177978515625,
-0.0256500244140625,
0.01580810546875,
-0.031951904296875,
-0.0030498504638671875,
0.0017671585083007812,
-0.0269317626953125,
-0.005329132080078125,
-0.044281005859375,
-0.01141357421875,
0.010498046875,
0.0009036064147949219,
-0.035186767578125,
-0.021484375,
-0.07794189453125,
0.05194091796875,
-0.01363372802734375,
0.00337982177734375,
-0.0193634033203125,
-0.0137481689453125,
-0.0272674560546875,
0.0070343017578125,
-0.035980224609375,
0.0084075927734375,
0.016510009765625,
-0.007747650146484375,
-0.02496337890625,
0.030364990234375,
-0.007236480712890625,
0.00009721517562866211,
-0.0207672119140625,
-0.0006184577941894531,
-0.052764892578125,
-0.0107574462890625,
-0.0182037353515625,
-0.0311279296875,
-0.017669677734375,
0.003082275390625,
0.001186370849609375,
-0.0880126953125,
0.0667724609375,
0.0224609375,
0.0191650390625,
-0.03521728515625,
-0.0697021484375,
0.00662994384765625,
0.15185546875,
-0.01006317138671875,
-0.00913238525390625,
0.0268402099609375,
-0.0091400146484375,
0.0227203369140625,
0.026611328125,
-0.0455322265625,
-0.0254364013671875,
-0.0396728515625,
-0.0093841552734375,
-0.0137481689453125,
-0.02398681640625,
-0.0005650520324707031,
-0.0596923828125,
-0.033111572265625,
-0.044708251953125,
0.0450439453125,
-0.036468505859375,
0.0283203125,
-0.0199127197265625,
0.020111083984375,
-0.04852294921875,
-0.0251617431640625,
-0.009674072265625,
-0.05340576171875,
-0.00933837890625,
-0.0177764892578125,
0.0489501953125,
0.027130126953125,
-0.048095703125,
0.003986358642578125,
0.0400390625,
0.0201568603515625,
0.02545166015625,
0.0308074951171875,
-0.0004620552062988281,
0.021514892578125,
-0.02166748046875,
0.025909423828125,
-0.036407470703125,
-0.025970458984375,
-0.0439453125,
-0.02581787109375,
-0.043487548828125,
-0.0083465576171875,
-0.0236358642578125,
0.028717041015625,
-0.0116729736328125,
-0.0191192626953125,
-0.014678955078125,
-0.01000213623046875,
0.0216827392578125,
-0.021331787109375,
0.01448822021484375,
-0.0189056396484375,
-0.0127105712890625,
0.019989013671875,
0.01342010498046875,
0.01415252685546875,
0.002048492431640625,
0.054901123046875,
0.01189422607421875,
-0.0149383544921875,
-0.049530029296875,
-0.0127410888671875,
0.040618896484375,
0.042755126953125,
-0.005828857421875,
0.01531982421875,
-0.04486083984375,
0.028289794921875,
0.03558349609375,
-0.017974853515625,
0.0014677047729492188,
0.0280609130859375,
0.01438140869140625,
-0.006072998046875,
-0.02227783203125,
-0.0024242401123046875,
0.0250396728515625,
0.0214996337890625,
0.0013408660888671875,
-0.048309326171875,
-0.01171112060546875,
0.06268310546875,
-0.0212249755859375,
0.02789306640625,
-0.04205322265625,
0.0030498504638671875,
0.00463104248046875,
0.0389404296875,
-0.01067352294921875,
0.00550079345703125,
0.0087890625,
-0.052642822265625,
-0.0078582763671875,
-0.01270294189453125,
0.0036754608154296875,
-0.032989501953125,
0.0379638671875,
0.004703521728515625,
0.031097412109375,
0.00832366943359375,
0.00666046142578125,
-0.0095367431640625,
0.023712158203125,
-0.03594970703125,
-0.07861328125,
-0.01270294189453125,
-0.0151824951171875,
-0.0221099853515625,
0.058441162109375,
0.01512908935546875,
0.057830810546875,
0.00629425048828125,
-0.0218353271484375,
-0.035614013671875,
-0.0174713134765625,
-0.0111846923828125,
-0.07135009765625,
-0.060272216796875,
-0.0055999755859375,
-0.046417236328125,
-0.035186767578125,
-0.0229339599609375,
-0.0489501953125,
-0.045318603515625,
0.0254364013671875,
0.020172119140625,
0.043670654296875,
0.0094451904296875,
0.01922607421875,
-0.002685546875,
-0.0043182373046875,
-0.01436614990234375,
0.01953125,
-0.00983428955078125,
-0.0028972625732421875,
0.025909423828125,
0.026611328125,
-0.032623291015625,
-0.0240631103515625,
0.0174560546875,
-0.01216888427734375,
-0.019439697265625,
0.022613525390625,
0.02069091796875,
-0.0323486328125,
-0.01447296142578125,
0.013275146484375,
0.0408935546875,
0.01175689697265625,
0.0269775390625,
-0.01739501953125,
-0.0123748779296875,
-0.02825927734375,
0.033050537109375,
-0.033355712890625,
-0.019500732421875,
-0.00626373291015625,
0.057220458984375,
0.01062774658203125,
-0.040679931640625,
0.023406982421875,
-0.0198516845703125,
-0.0225067138671875,
0.0306549072265625,
0.046051025390625,
-0.0134735107421875,
0.004974365234375,
-0.00930023193359375,
-0.0135955810546875,
0.0135650634765625,
0.0216522216796875,
0.01270294189453125,
-0.0274810791015625,
-0.002086639404296875,
-0.038543701171875,
-0.0288848876953125,
-0.05389404296875,
-0.0305023193359375,
0.001483917236328125,
-0.02154541015625,
0.0177001953125,
-0.01467132568359375,
0.00395965576171875,
-0.0268402099609375,
0.0026149749755859375,
0.0044708251953125,
0.031646728515625,
-0.0029697418212890625,
0.0208740234375,
-0.016632080078125,
0.008087158203125,
0.01448822021484375,
0.035797119140625,
-0.0099945068359375,
-0.019256591796875,
-0.022369384765625,
-0.007205963134765625,
-0.0174713134765625,
-0.0213470458984375,
-0.0037403106689453125,
-0.0172882080078125,
0.00861358642578125,
0.0400390625,
0.07073974609375,
0.00994110107421875,
-0.01013946533203125,
0.0235443115234375,
0.0153656005859375,
0.00714111328125,
0.035614013671875,
0.050994873046875,
-0.0217742919921875,
0.093505859375,
0.006832122802734375,
0.0350341796875,
-0.0159149169921875,
-0.0158233642578125,
-0.0005559921264648438,
0.0081024169921875,
0.0030231475830078125,
0.00954437255859375,
0.012939453125,
-0.004817962646484375,
-0.022674560546875,
-0.006351470947265625,
0.0201263427734375,
-0.02020263671875,
0.03240966796875,
0.0057525634765625,
0.041046142578125,
-0.043121337890625,
-0.048980712890625,
0.03936767578125,
0.0232696533203125,
-0.034088134765625,
0.031494140625,
-0.02752685546875,
-0.0150909423828125,
0.0162811279296875,
0.00327301025390625,
-0.052978515625,
0.00887298583984375,
0.00327301025390625,
0.0113525390625,
0.01042938232421875,
0.0195465087890625,
-0.031585693359375,
0.00939178466796875,
0.0283660888671875,
-0.04913330078125,
-0.0161590576171875,
0.03143310546875,
0.00539398193359375,
-0.01070404052734375,
-0.0004849433898925781,
0.054473876953125,
0.030670166015625,
-0.042938232421875,
0.0164642333984375,
0.00439453125,
0.0188446044921875,
-0.034027099609375,
0.03369140625,
0.01071929931640625,
0.006687164306640625,
-0.009033203125,
0.071533203125,
0.00011986494064331055,
0.00807952880859375,
-0.00258636474609375,
0.0062103271484375,
0.0184173583984375,
0.024566650390625,
-0.004985809326171875,
-0.0233612060546875,
-0.00853729248046875,
0.018951416015625,
0.045684814453125,
-0.020355224609375,
-0.01247406005859375,
0.00742340087890625,
0.004810333251953125,
0.0033111572265625,
0.0207977294921875,
-0.0271453857421875,
-0.0115966796875,
-0.044525146484375,
0.05718994140625,
-0.02410888671875,
-0.0009050369262695312,
0.0078277587890625,
0.0259857177734375,
0.00345611572265625,
-0.0316162109375,
0.021209716796875,
-0.0416259765625,
0.0197601318359375,
-0.015716552734375,
0.03155517578125,
0.006870269775390625,
-0.027984619140625,
-0.0206146240234375,
0.06085205078125,
0.0013875961303710938,
-0.0169525146484375,
0.00740814208984375,
0.030517578125,
-0.01312255859375,
0.013427734375,
-0.0174102783203125,
0.02490234375,
-0.037109375,
-0.0017404556274414062,
0.01149749755859375,
0.027557373046875,
-0.00926971435546875,
-0.0292816162109375,
0.038787841796875,
0.0006203651428222656,
-0.006267547607421875,
0.0012903213500976562,
0.072265625,
0.0535888671875,
0.01354217529296875,
-0.005481719970703125,
0.018402099609375,
0.0166778564453125,
0.0673828125,
-0.0162506103515625,
0.0447998046875,
-0.0144805908203125,
0.0209197998046875,
0.038330078125,
-0.0075225830078125,
-0.0299072265625,
0.006496429443359375,
0.0672607421875,
-0.07550048828125,
0.01971435546875,
0.048797607421875,
0.028228759765625,
0.0116424560546875,
0.06585693359375,
0.036895751953125,
-0.00882720947265625,
0.031646728515625,
-0.0260162353515625,
0.06622314453125,
-0.0377197265625,
0.06512451171875,
0.034423828125,
0.0186004638671875,
0.08673095703125,
0.0185546875,
0.037384033203125,
0.034637451171875,
-0.01354217529296875,
-0.00847625732421875,
-0.0308837890625,
0.01326751708984375,
-0.06597900390625,
-0.035552978515625,
0.04180908203125,
0.0181884765625,
-0.01226806640625,
-0.06878662109375,
0.01190948486328125,
0.0218963623046875,
0.0264892578125,
0.033355712890625,
0.0704345703125,
-0.115478515625,
-0.0311126708984375,
0.00013947486877441406,
-0.036590576171875,
0.01134490966796875,
-0.005489349365234375,
0.00927734375,
0.0002827644348144531,
0.0467529296875,
-0.00958251953125,
-0.035919189453125,
0.0136566162109375,
0.02166748046875,
0.0264739990234375,
0.01043701171875,
0.030914306640625,
0.004611968994140625,
-0.0196533203125,
-0.0261077880859375,
0.042144775390625,
0.0259857177734375,
0.041717529296875,
-0.03436279296875,
0.007160186767578125,
0.0345458984375,
0.01517486572265625,
0.01027679443359375,
0.0080108642578125,
0.03759765625,
0.0506591796875,
-0.004589080810546875,
-0.005878448486328125,
0.0653076171875,
0.006511688232421875,
0.02191162109375,
-0.038787841796875,
0.0128326416015625,
-0.007312774658203125,
-0.011688232421875,
-0.020965576171875,
-0.0206756591796875,
0.039398193359375,
-0.014312744140625,
-0.002208709716796875,
0.0158538818359375,
-0.037017822265625,
0.00940704345703125,
0.0232086181640625,
0.0277099609375,
0.0157012939453125,
-0.09832763671875,
-0.01271820068359375,
-0.034942626953125,
-0.0235595703125,
0.0148468017578125,
0.017913818359375,
-0.03277587890625,
0.037445068359375,
-0.016387939453125,
-0.02764892578125,
0.040679931640625,
-0.007305145263671875,
-0.0204925537109375,
-0.0333251953125,
-0.003940582275390625,
-0.060333251953125,
0.009979248046875,
0.017669677734375,
0.0262908935546875,
0.010986328125,
0.015411376953125,
0.017822265625,
0.004299163818359375,
0.0027828216552734375,
-0.0059814453125,
-0.03314208984375,
0.006618499755859375,
0.0012502670288085938,
0.004817962646484375,
-0.016265869140625,
-0.0289459228515625,
0.0029659271240234375,
-0.059478759765625,
0.04278564453125,
0.00788116455078125,
0.0133819580078125,
0.041656494140625,
-0.0151824951171875,
0.0008740425109863281,
0.0108642578125,
0.0061798095703125,
-0.038787841796875,
-0.087646484375,
-0.07452392578125,
0.00525665283203125,
0.0008335113525390625,
0.018890380859375,
-0.0240478515625,
0.00357818603515625,
-0.0214080810546875,
-0.024627685546875,
0.03167724609375,
-0.0298919677734375,
0.0357666015625,
0.033538818359375,
-0.052978515625,
0.00881195068359375,
-0.0063629150390625,
-0.0236968994140625,
-0.00684356689453125,
0.01209259033203125,
-0.004901885986328125,
-0.01546478271484375,
-0.035888671875,
0.0038604736328125,
0.036590576171875,
0.034576416015625,
0.000308990478515625,
0.00833892822265625,
0.007465362548828125,
-0.0021266937255859375,
0.01953125,
-0.058746337890625,
-0.032501220703125,
-0.0604248046875,
0.00812530517578125,
0.0173187255859375,
-0.0101470947265625,
-0.035675048828125,
-0.0240631103515625,
-0.0170440673828125,
0.016387939453125,
-0.0237884521484375,
-0.0002999305725097656,
-0.0350341796875,
-0.00966644287109375,
0.031951904296875,
-0.0159149169921875,
-0.0200958251953125,
0.00511932373046875,
0.005096435546875,
-0.031646728515625,
-0.0181121826171875,
-0.035919189453125,
0.0003750324249267578,
-0.00838470458984375,
-0.0003046989440917969,
0.041015625,
-0.0218505859375,
0.005664825439453125,
-0.02996826171875,
-0.0060272216796875,
0.01380157470703125,
-0.0037975311279296875,
-0.0234527587890625,
0.01399993896484375,
0.00864410400390625,
-0.0093231201171875,
-0.04278564453125,
-0.016754150390625,
-0.0201416015625,
-0.01422882080078125,
-0.0880126953125,
0.0570068359375,
0.037109375,
-0.0408935546875,
-0.0750732421875,
0.056915283203125,
-0.039703369140625,
-0.01141357421875,
0.0016775131225585938,
0.0053863525390625,
0.035186767578125,
-0.06329345703125,
-0.015167236328125,
0.01806640625,
-0.054718017578125,
-0.0125732421875,
0.008026123046875,
0.03021240234375,
0.0094146728515625,
0.002910614013671875,
0.056915283203125,
0.047332763671875,
0.059844970703125,
-0.00489044189453125,
0.0189208984375,
-0.00714111328125,
-0.007724761962890625,
0.01168060302734375,
-0.0667724609375,
-0.0693359375,
-0.043365478515625,
0.04180908203125,
-0.0158538818359375,
-0.060546875,
0.024322509765625,
0.0120697021484375,
0.024810791015625,
0.001922607421875,
-0.016265869140625,
-0.036407470703125,
-0.0021495819091796875,
-0.0191192626953125,
0.0338134765625,
0.0135040283203125,
-0.01232147216796875,
-0.032501220703125,
0.00687408447265625,
0.0048828125,
-0.01482391357421875,
-0.0234222412109375,
0.0316162109375,
-0.02740478515625,
-0.01116943359375,
0.0189208984375,
-0.034576416015625,
-0.010589599609375,
0.027587890625,
0.0223541259765625,
-0.01605224609375,
0.00917816162109375,
0.0017538070678710938,
-0.01129913330078125,
0.01073455810546875,
-0.0005016326904296875,
0.048431396484375,
0.0090179443359375,
-0.0491943359375,
0.0103912353515625,
0.0120849609375,
0.052337646484375,
-0.053436279296875,
-0.05706787109375,
0.006744384765625,
0.06695556640625,
0.0029773712158203125,
0.09637451171875,
-0.0136566162109375,
0.053497314453125,
0.02972412109375,
-0.052215576171875,
-0.0017118453979492188,
-0.0521240234375,
-0.04534912109375,
0.05621337890625,
0.023406982421875,
-0.033203125,
0.05572509765625,
-0.0284881591796875,
0.0293121337890625,
0.0195159912109375,
0.03558349609375,
0.019622802734375,
0.0006194114685058594,
-0.048858642578125,
-0.0192108154296875,
-0.012603759765625
] |
0359a35c2f7021bf8100c6ac84cbf7748342e126
|
Wordpress Stackexchange
Q: Display thumbnail only on the very first post in the loop? What's the best way to use <?php the_post_thumbnail();?> in my loop BUT only show a thumbnail on the FIRST post? Meaning, only the first post in the loop will have it's image shown?
Here is an example of a loop that shows the image for ALL posts:
<!-- Start the Loop. -->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<!-- Display the Title as a link to the Post's permalink. -->
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<!-- Display the posts Image thumbnail for the post -->
<?php the_post_thumbnail();?>
<!-- Display the date and a link to other posts by this posts author. -->
<small><?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?></small>
<!-- Display the Post's Content in a div box. -->
<div class="entry">
<?php the_content(); ?>
</div>
Thank you!
A: This code in your template will display the post thumbnail only for the first post:
<?php
! isset ( $loop_first ) and the_post_thumbnail();
$loop_first = 1;
?>
|
Q: Display thumbnail only on the very first post in the loop? What's the best way to use <?php the_post_thumbnail();?> in my loop BUT only show a thumbnail on the FIRST post? Meaning, only the first post in the loop will have it's image shown?
Here is an example of a loop that shows the image for ALL posts:
<!-- Start the Loop. -->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<!-- Display the Title as a link to the Post's permalink. -->
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<!-- Display the posts Image thumbnail for the post -->
<?php the_post_thumbnail();?>
<!-- Display the date and a link to other posts by this posts author. -->
<small><?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?></small>
<!-- Display the Post's Content in a div box. -->
<div class="entry">
<?php the_content(); ?>
</div>
Thank you!
A: This code in your template will display the post thumbnail only for the first post:
<?php
! isset ( $loop_first ) and the_post_thumbnail();
$loop_first = 1;
?>
A: This is what I use in my projects and it works well for me. I modified the code you provided to suit. Simply drop it in and it will display the post thumbnail only for the first post.
<!-- Start the Loop. -->
<?php $i = 1 ; ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<!-- Display the Title as a link to the Post's permalink. -->
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<?php if ($i == 1): ?>
<!-- Display the posts Image thumbnail for the post -->
<?php the_post_thumbnail();?>
<?php endif; ?>
<!-- Display the date and a link to other posts by this posts author. -->
<small><?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?></small>
<!-- Display the Post's Content in a div box. -->
<div class="entry">
<?php the_content(); ?>
</div>
<?php $i++; endwhile; endif; ?>
A: *
*add a variable before the loop (before the while), for example $first = true;
*add a check inside the loop for this variable
*after the use, change the flag
Code:
<!-- Start the Loop. -->
<?php $first = true; ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<!-- Display the Title as a link to the Post's permalink. -->
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<!-- Display the posts Image thumbnail for the post -->
<?php if ( $first ): ?>
<?php the_post_thumbnail();?>
<?php $first = false; ?>
<?php endif; ?>
<!-- Display the date and a link to other posts by this posts author. -->
<small><?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?></small>
<!-- Display the Post's Content in a div box. -->
<div class="entry">
<?php the_content(); ?>
</div>
A: Just check the current_post value
global $wp_query; // get the global query - works in custom queries too
if(0 == $wp_query->current_post){ /**is the first post**/ }
|
wordpress
|
{
"language": "en",
"length": 511,
"provenance": "stackexchange_00019.jsonl.gz:408062",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13020"
}
|
[
0.06256103515625,
-0.005069732666015625,
0.0401611328125,
-0.006298065185546875,
0.01532745361328125,
-0.029876708984375,
0.04766845703125,
-0.0592041015625,
0.0379638671875,
0.035369873046875,
-0.059783935546875,
0.00731658935546875,
-0.009796142578125,
0.001514434814453125,
-0.03692626953125,
-0.016937255859375,
0.050628662109375,
-0.03314208984375,
0.0379638671875,
0.01483917236328125,
0.00232696533203125,
0.048492431640625,
0.048492431640625,
0.04876708984375,
0.0137481689453125,
-0.048553466796875,
0.0631103515625,
-0.029998779296875,
-0.0244903564453125,
-0.03692626953125,
0.004894256591796875,
0.0338134765625,
0.02685546875,
-0.01271820068359375,
0.01043701171875,
0.025146484375,
0.005832672119140625,
-0.01258087158203125,
-0.00012099742889404297,
0.024688720703125,
0.0264129638671875,
-0.01165771484375,
-0.007198333740234375,
0.0023784637451171875,
-0.0256805419921875,
0.0071563720703125,
-0.0121917724609375,
-0.0328369140625,
0.00011545419692993164,
-0.0227203369140625,
0.0203399658203125,
-0.003139495849609375,
0.029876708984375,
0.00273895263671875,
-0.0177764892578125,
0.0128936767578125,
-0.0269622802734375,
-0.055328369140625,
0.0292510986328125,
-0.0081329345703125,
-0.0038280487060546875,
-0.043182373046875,
0.0404052734375,
-0.005039215087890625,
-0.036773681640625,
-0.00016832351684570312,
-0.01788330078125,
0.00537872314453125,
-0.040740966796875,
-0.037017822265625,
0.0183258056640625,
-0.0294952392578125,
-0.0245208740234375,
-0.051727294921875,
-0.034149169921875,
0.0501708984375,
-0.0029354095458984375,
-0.034149169921875,
0.00484466552734375,
-0.02679443359375,
-0.006137847900390625,
-0.00902557373046875,
-0.0518798828125,
0.0024585723876953125,
0.0168914794921875,
0.017242431640625,
-0.0143890380859375,
-0.01360321044921875,
-0.01519775390625,
-0.03375244140625,
-0.02984619140625,
0.031585693359375,
-0.00882720947265625,
-0.03021240234375,
-0.04315185546875,
-0.0234375,
0.058990478515625,
0.053924560546875,
-0.0157318115234375,
-0.037841796875,
-0.01812744140625,
-0.0240478515625,
-0.0341796875,
-0.020751953125,
0.022430419921875,
-0.0019683837890625,
-0.008697509765625,
-0.005039215087890625,
0.05657958984375,
0.043487548828125,
-0.00391387939453125,
0.092041015625,
-0.0305633544921875,
0.00534820556640625,
-0.021209716796875,
0.0101776123046875,
-0.06475830078125,
0.0173492431640625,
-0.00406646728515625,
0.02655029296875,
0.007175445556640625,
0.0184783935546875,
0.0304718017578125,
-0.025848388671875,
-0.0083770751953125,
0.01233673095703125,
-0.01554107666015625,
-0.0650634765625,
-0.0028591156005859375,
0.034576416015625,
-0.0190887451171875,
-0.0148468017578125,
0.039947509765625,
0.046356201171875,
0.0234832763671875,
-0.01464080810546875,
-0.01093292236328125,
-0.0178680419921875,
-0.00934600830078125,
0.0218505859375,
-0.0240478515625,
-0.01494598388671875,
0.04718017578125,
-0.0197296142578125,
-0.026031494140625,
0.050079345703125,
0.007640838623046875,
-0.0013132095336914062,
-0.0210418701171875,
-0.09271240234375,
0.024322509765625,
-0.055572509765625,
-0.0018472671508789062,
0.0015592575073242188,
0.0254364013671875,
-0.0199432373046875,
0.0217132568359375,
-0.0087432861328125,
0.020477294921875,
0.01242828369140625,
0.03826904296875,
-0.0040130615234375,
-0.01641845703125,
0.002384185791015625,
-0.01451873779296875,
-0.01248931884765625,
-0.022674560546875,
0.005260467529296875,
0.01708984375,
0.0169677734375,
0.01078033447265625,
-0.003337860107421875,
-0.0166168212890625,
-0.01470947265625,
-0.01971435546875,
-0.0009822845458984375,
0.01065826416015625,
-0.037109375,
0.0248870849609375,
0.055328369140625,
-0.0120086669921875,
-0.01428985595703125,
0.0163421630859375,
-0.0199127197265625,
-0.0277557373046875,
0.0068359375,
-0.00701904296875,
0.0096893310546875,
0.01338958740234375,
0.00955963134765625,
0.0287933349609375,
0.0263824462890625,
-0.05853271484375,
0.061370849609375,
0.00392913818359375,
-0.0345458984375,
-0.0291290283203125,
-0.01465606689453125,
-0.01348114013671875,
-0.01934814453125,
0.02935791015625,
-0.00762176513671875,
0.01342010498046875,
-0.01219940185546875,
-0.037689208984375,
0.00624847412109375,
-0.023193359375,
0.032928466796875,
0.0015239715576171875,
0.040557861328125,
0.0171661376953125,
0.01617431640625,
-0.0262908935546875,
-0.03717041015625,
-0.021270751953125,
0.01270294189453125,
-0.0249481201171875,
-0.0092010498046875,
-0.026397705078125,
0.0147247314453125,
0.0054931640625,
-0.041168212890625,
-0.0099029541015625,
0.0204315185546875,
0.08489990234375,
0.004238128662109375,
-0.0134735107421875,
-0.033843994140625,
0.0145721435546875,
0.0264434814453125,
-0.114990234375,
0.05535888671875,
-0.0306243896484375,
-0.05609130859375,
-0.07257080078125,
-0.00005918741226196289,
-0.004791259765625,
0.01364898681640625,
-0.00679779052734375,
0.0435791015625,
0.027740478515625,
0.042144775390625,
-0.01380157470703125,
0.01171875,
0.07562255859375,
0.0084381103515625,
0.02197265625,
-0.014739990234375,
0.00791168212890625,
0.0307464599609375,
-0.002643585205078125,
0.0099029541015625,
0.0183868408203125,
-0.046417236328125,
0.03533935546875,
0.0367431640625,
0.024871826171875,
0.04638671875,
-0.0384521484375,
0.047515869140625,
-0.0201263427734375,
0.0302581787109375,
0.01165771484375,
-0.01416015625,
0.02178955078125,
0.018707275390625,
0.0173492431640625,
0.001148223876953125,
-0.04400634765625,
0.020172119140625,
0.020965576171875,
0.0150299072265625,
-0.00787353515625,
0.0408935546875,
-0.02313232421875,
-0.02117919921875,
-0.033203125,
0.01016998291015625,
-0.00731658935546875,
-0.0028820037841796875,
-0.014007568359375,
-0.022979736328125,
0.01360321044921875,
0.01119232177734375,
-0.013031005859375,
-0.0465087890625,
0.053314208984375,
0.048858642578125,
0.00640106201171875,
-0.01526641845703125,
0.01537322998046875,
0.01406097412109375,
-0.0207061767578125,
0.0406494140625,
-0.01425933837890625,
-0.019500732421875,
-0.05523681640625,
-0.0310211181640625,
0.040313720703125,
-0.050140380859375,
0.00939178466796875,
0.05706787109375,
-0.0261688232421875,
0.0307159423828125,
-0.007198333740234375,
-0.00826263427734375,
-0.01407623291015625,
-0.0008330345153808594,
-0.016845703125,
-0.006298065185546875,
-0.041778564453125,
0.004058837890625,
0.0169219970703125,
0.1065673828125,
-0.04266357421875,
-0.04876708984375,
0.004634857177734375,
0.030303955078125,
-0.05047607421875,
-0.0731201171875,
-0.041412353515625,
-0.081298828125,
0.01371002197265625,
0.018829345703125,
-0.03521728515625,
-0.007236480712890625,
0.04998779296875,
0.016326904296875,
-0.0279388427734375,
-0.0002951622009277344,
-0.048858642578125,
-0.04901123046875,
-0.06427001953125,
0.016357421875,
-0.0193023681640625,
0.034271240234375,
0.0170440673828125,
0.038421630859375,
0.0201873779296875,
-0.046722412109375,
0.014556884765625,
0.037689208984375,
-0.0200347900390625,
0.01275634765625,
-0.033905029296875,
0.01953125,
-0.03924560546875,
0.017822265625,
-0.017730712890625,
-0.0237884521484375,
0.004802703857421875,
-0.011566162109375,
-0.0167999267578125,
-0.0241851806640625,
-0.002635955810546875,
0.048065185546875,
0.0301055908203125,
0.0030269622802734375,
0.041351318359375,
-0.03582763671875,
-0.024566650390625,
-0.034698486328125,
-0.0657958984375,
-0.0143280029296875,
0.054443359375,
0.0215606689453125,
-0.039093017578125,
-0.00274658203125,
-0.038787841796875,
-0.0005831718444824219,
0.00298309326171875,
-0.03131103515625,
0.04449462890625,
-0.00751495361328125,
-0.0160064697265625,
-0.0014476776123046875,
0.030181884765625,
-0.00522613525390625,
0.0103759765625,
0.01248931884765625,
0.0254364013671875,
-0.00574493408203125,
0.0034503936767578125,
-0.041717529296875,
-0.0174102783203125,
0.0237579345703125,
-0.004001617431640625,
0.01507568359375,
-0.01366424560546875,
-0.0215606689453125,
0.0032196044921875,
0.055755615234375,
-0.08270263671875,
-0.0036792755126953125,
-0.0158233642578125,
0.003917694091796875,
0.0201416015625,
-0.03338623046875,
-0.045623779296875,
-0.0132598876953125,
-0.111328125,
0.004337310791015625,
-0.005886077880859375,
-0.0233917236328125,
-0.01221466064453125,
0.0159149169921875,
-0.0626220703125,
-0.03875732421875,
0.0019130706787109375,
0.0149078369140625,
-0.025390625,
0.0440673828125,
-0.033782958984375,
0.056365966796875,
-0.01000213623046875,
-0.042510986328125,
-0.073486328125,
-0.03216552734375,
0.01219940185546875,
0.103515625,
0.0012807846069335938,
-0.0027675628662109375,
-0.037933349609375,
0.05181884765625,
-0.0312042236328125,
0.034332275390625,
-0.01319122314453125,
0.033721923828125,
-0.019134521484375,
0.029083251953125,
0.005237579345703125,
-0.002452850341796875,
-0.0213775634765625,
-0.06158447265625,
-0.01535797119140625,
0.00518035888671875,
-0.034332275390625,
0.0478515625,
-0.049835205078125,
0.03216552734375,
-0.0345458984375,
-0.021881103515625,
0.05499267578125,
0.074951171875,
0.010284423828125,
0.034576416015625,
-0.059417724609375,
-0.03680419921875,
0.033477783203125,
0.00228118896484375,
-0.0224609375,
0.00970458984375,
0.070556640625,
0.0175628662109375,
-0.01503753662109375,
-0.06549072265625,
-0.0008864402770996094,
0.01678466796875,
-0.028411865234375,
0.050384521484375,
0.02935791015625,
-0.00688934326171875,
0.041748046875,
-0.0029315948486328125,
0.01080322265625,
-0.00396728515625,
0.06219482421875,
-0.005344390869140625,
-0.02093505859375,
0.0205841064453125,
-0.02392578125,
0.0017852783203125,
-0.0240478515625,
-0.005710601806640625,
0.0309906005859375,
0.031890869140625,
-0.00838470458984375,
0.0067291259765625,
-0.006465911865234375,
-0.01247406005859375,
0.0107879638671875,
-0.00960540771484375,
0.0247039794921875,
0.053436279296875,
0.048797607421875,
-0.006427764892578125,
0.004482269287109375,
0.046112060546875,
-0.022186279296875,
0.016143798828125,
-0.0187835693359375,
0.0634765625,
0.0257568359375,
0.01157379150390625,
0.0226898193359375,
-0.03076171875,
-0.00543975830078125,
0.01166534423828125,
0.01267242431640625,
-0.022613525390625,
-0.014892578125,
0.00753021240234375,
0.06988525390625,
-0.033172607421875,
0.0279693603515625,
0.0300750732421875,
-0.01271820068359375,
-0.011688232421875,
-0.01044464111328125,
0.01134490966796875,
-0.0280303955078125,
-0.03277587890625,
0.0312347412109375,
0.0167388916015625,
-0.0008006095886230469,
0.0307159423828125,
0.016265869140625,
0.02398681640625,
0.010101318359375,
-0.020477294921875,
0.0474853515625,
0.0147857666015625,
0.010894775390625,
0.028533935546875,
0.002079010009765625,
-0.023101806640625,
0.006298065185546875,
-0.00453948974609375,
-0.0283355712890625,
0.0027942657470703125,
0.031494140625,
0.0450439453125,
-0.013031005859375,
-0.0213623046875,
0.002040863037109375,
-0.0148162841796875,
-0.007633209228515625,
0.0304107666015625,
0.03631591796875,
-0.034332275390625,
0.01021575927734375,
0.026275634765625,
0.003948211669921875,
-0.018524169921875,
-0.01079559326171875,
0.01099395751953125,
0.00844573974609375,
0.035675048828125,
-0.051513671875,
-0.0080413818359375,
0.0235595703125,
0.0265350341796875,
0.014923095703125,
-0.0396728515625,
-0.03924560546875,
0.034393310546875,
0.0191650390625,
-0.0306243896484375,
-0.005023956298828125,
0.0311737060546875,
-0.03125,
0.044097900390625,
-0.04217529296875,
-0.0163421630859375,
-0.050323486328125,
-0.002910614013671875,
0.07135009765625,
0.0606689453125,
-0.0972900390625,
0.054168701171875,
-0.039459228515625,
0.03424072265625,
-0.005828857421875,
-0.04779052734375,
-0.041412353515625,
-0.045745849609375,
0.0176239013671875,
0.0204010009765625,
0.0083465576171875,
0.012847900390625,
-0.0137176513671875,
0.0059661865234375,
0.01123809814453125,
0.05621337890625,
-0.02508544921875,
0.0721435546875,
0.0236358642578125,
0.04327392578125,
0.01505279541015625,
0.0157928466796875,
-0.021453857421875,
-0.003231048583984375,
-0.0152130126953125,
-0.062744140625,
-0.0232696533203125,
0.040374755859375,
-0.0262603759765625,
0.01174163818359375,
-0.0005221366882324219,
0.00439453125,
-0.0164031982421875,
0.0157012939453125,
0.0005731582641601562,
-0.007755279541015625,
0.00551605224609375,
0.045074462890625,
-0.018463134765625,
0.039581298828125,
0.01483917236328125,
0.0075225830078125,
0.00475311279296875,
-0.035430908203125,
-0.0025787353515625,
0.0225372314453125,
-0.020111083984375,
0.0079193115234375,
0.024505615234375,
0.02166748046875,
0.062408447265625,
-0.013885498046875,
0.043121337890625,
0.043731689453125,
0.0248565673828125,
0.00905609130859375,
0.016937255859375,
-0.027099609375,
0.0034694671630859375,
0.06024169921875,
0.01018524169921875,
0.0033206939697265625,
0.0253448486328125,
-0.013153076171875,
-0.01023101806640625,
-0.00604248046875,
0.026824951171875,
0.0310211181640625,
-0.01457977294921875,
0.01338958740234375,
-0.0406494140625,
-0.0166473388671875,
-0.0194091796875,
0.01171875,
0.0079803466796875,
0.097900390625,
-0.0151214599609375,
-0.00695037841796875,
0.034423828125,
-0.04278564453125,
0.0010232925415039062,
0.0110321044921875,
-0.0182342529296875,
0.004207611083984375,
-0.109375,
0.0202484130859375,
0.07025146484375,
-0.01393890380859375,
-0.034393310546875,
0.0059967041015625,
-0.026763916015625,
-0.00557708740234375,
-0.042999267578125,
-0.0084228515625,
-0.0093536376953125,
0.0391845703125,
0.04827880859375,
0.0399169921875,
-0.0217742919921875,
0.05615234375,
-0.010955810546875,
0.053924560546875,
0.0294342041015625,
-0.06787109375,
-0.01239013671875,
-0.033477783203125,
0.022857666015625,
0.046417236328125,
-0.061767578125,
0.03131103515625,
-0.005886077880859375,
-0.01305389404296875,
-0.01763916015625,
-0.0131378173828125,
0.08203125,
-0.02484130859375,
-0.0295562744140625,
0.011749267578125,
0.020172119140625,
-0.00365447998046875,
-0.0231170654296875,
0.0140228271484375,
-0.046875,
0.01253509521484375,
-0.00493621826171875,
0.01300811767578125,
-0.00505828857421875,
-0.03668212890625,
-0.057830810546875,
0.057708740234375,
-0.018310546875,
0.0352783203125,
0.00643157958984375,
0.0130767822265625,
0.019195556640625,
0.0000502467155456543,
-0.0189208984375,
0.041961669921875,
-0.0182647705078125,
0.046630859375,
-0.039306640625,
-0.00754547119140625,
0.0301513671875,
0.034149169921875,
0.0345458984375,
0.003978729248046875,
-0.0291748046875,
-0.01248931884765625,
0.04315185546875,
0.03350830078125,
-0.007049560546875,
0.0183563232421875,
0.0006885528564453125,
0.0155181884765625,
0.0374755859375,
-0.0142669677734375,
0.0289306640625,
0.0185546875,
-0.0275726318359375,
0.03729248046875,
0.020965576171875,
0.0252227783203125,
0.012939453125,
-0.009613037109375,
-0.0765380859375,
0.0174102783203125,
0.058013916015625,
-0.009033203125,
0.0162200927734375,
0.06024169921875,
0.047882080078125,
0.00873565673828125,
-0.0548095703125,
-0.0099029541015625,
0.039581298828125,
0.0232391357421875,
0.01568603515625,
0.005321502685546875,
0.01238250732421875,
0.032684326171875,
0.022003173828125,
0.010345458984375,
0.0345458984375,
-0.0018911361694335938,
0.0014247894287109375,
0.00992584228515625,
0.0190887451171875,
-0.046905517578125,
-0.0045623779296875,
0.039794921875,
0.024078369140625,
-0.03265380859375,
-0.0240631103515625,
0.017181396484375,
0.0094451904296875,
-0.015533447265625,
-0.0127716064453125,
-0.01444244384765625,
0.005802154541015625,
0.0489501953125,
-0.0479736328125,
0.0013980865478515625,
0.023040771484375,
0.034942626953125,
0.0010232925415039062,
-0.0051116943359375,
-0.046844482421875,
-0.0202178955078125,
-0.01178741455078125,
0.007740020751953125,
0.020538330078125,
0.02410888671875,
-0.01360321044921875,
0.022308349609375,
-0.00005233287811279297,
0.01378631591796875,
-0.017669677734375,
0.00540924072265625,
-0.0081787109375,
0.0278167724609375,
-0.038360595703125,
0.006694793701171875,
-0.0215301513671875,
0.03436279296875,
0.0244140625,
-0.0022792816162109375,
0.0172576904296875,
0.00733184814453125,
-0.032958984375,
-0.0018072128295898438,
0.0450439453125,
-0.0249786376953125,
-0.0099639892578125,
-0.007801055908203125,
0.004467010498046875,
0.00623321533203125,
-0.0187225341796875,
0.00807952880859375,
0.0238800048828125,
0.005222320556640625,
-0.05145263671875,
0.061920166015625,
-0.0175933837890625,
-0.028076171875,
0.0190887451171875,
0.00926971435546875,
0.09698486328125,
-0.00341796875,
-0.06915283203125,
0.01352691650390625,
-0.0121917724609375,
-0.0882568359375,
0.017822265625,
0.018310546875,
-0.064697265625,
0.033660888671875,
0.03704833984375,
0.0289306640625,
-0.02532958984375,
-0.0192108154296875,
0.0185546875,
0.00605010986328125,
0.03460693359375,
0.03790283203125,
-0.042449951171875,
-0.0411376953125,
-0.0213623046875,
0.0423583984375,
0.0109100341796875,
0.03778076171875,
0.0016317367553710938,
0.03564453125,
-0.000011265277862548828,
0.0065460205078125,
-0.01947021484375,
-0.01094818115234375,
0.0548095703125,
-0.0069122314453125,
-0.0024738311767578125,
-0.01885986328125,
-0.0289154052734375,
-0.005344390869140625,
0.060821533203125,
-0.0299072265625,
-0.01422119140625,
0.014556884765625,
0.0260162353515625,
-0.0345458984375,
0.026763916015625,
-0.0241851806640625,
-0.00470733642578125,
-0.0218963623046875,
-0.015899658203125,
0.04132080078125,
0.036651611328125,
0.03631591796875,
0.0175933837890625,
0.0300750732421875,
-0.007587432861328125,
0.00968170166015625,
0.004360198974609375,
-0.0005002021789550781,
0.0318603515625,
0.0256195068359375,
-0.0308685302734375,
-0.04425048828125,
-0.0126190185546875,
-0.01617431640625,
0.01387786865234375,
-0.0101470947265625,
-0.005802154541015625,
0.01348876953125,
0.01239776611328125,
0.009552001953125,
0.021270751953125,
-0.034149169921875,
-0.000751495361328125,
0.03387451171875,
-0.004077911376953125,
-0.03570556640625,
0.03350830078125,
-0.01513671875,
-0.0304718017578125,
-0.00794219970703125,
-0.004932403564453125,
-0.0156402587890625,
-0.059112548828125,
-0.051055908203125,
-0.01226043701171875,
0.00746917724609375,
-0.0025043487548828125,
-0.005039215087890625,
0.0021305084228515625,
-0.013427734375,
0.007167816162109375,
-0.0338134765625,
0.0241241455078125,
-0.0150299072265625,
0.0063934326171875,
-0.03778076171875,
-0.0221099853515625,
-0.03204345703125,
0.03277587890625,
-0.022216796875,
-0.0003898143768310547,
0.005481719970703125,
-0.0176239013671875,
0.004673004150390625,
0.01824951171875,
-0.00033545494079589844,
0.0643310546875,
-0.002269744873046875,
-0.033172607421875,
-0.002811431884765625,
0.0027618408203125,
-0.0046234130859375,
-0.035064697265625,
0.0117340087890625,
-0.04974365234375,
-0.0168304443359375,
-0.007724761962890625,
-0.0005717277526855469,
0.0221710205078125,
-0.019989013671875,
-0.027374267578125,
0.0689697265625,
-0.00392913818359375,
-0.01468658447265625,
-0.0300445556640625,
0.015167236328125,
-0.0104827880859375,
0.025360107421875,
0.007801055908203125,
-0.01922607421875,
-0.013519287109375,
-0.0018892288208007812,
-0.00608062744140625,
-0.01351165771484375,
0.057525634765625,
-0.0286407470703125,
0.00926971435546875,
-0.0144500732421875,
-0.0038623809814453125,
-0.04571533203125,
0.019012451171875,
-0.0236053466796875,
0.037811279296875,
0.041015625,
-0.033935546875,
-0.0271148681640625,
-0.014984130859375,
-0.0157012939453125,
-0.02069091796875,
-0.022796630859375,
-0.06622314453125,
-0.044677734375,
0.10382080078125,
0.049652099609375,
0.036895751953125,
0.005329132080078125,
-0.0211181640625,
-0.0185394287109375,
-0.053009033203125,
-0.01473236083984375,
0.044708251953125,
-0.09149169921875,
-0.01323699951171875,
0.015777587890625,
-0.0166778564453125,
0.036865234375,
-0.01010894775390625,
-0.029510498046875,
-0.003108978271484375,
-0.0484619140625,
-0.00989532470703125,
-0.08233642578125,
0.035491943359375,
0.058685302734375,
-0.051849365234375,
0.0097808837890625,
-0.0298919677734375,
-0.006992340087890625,
0.0272216796875,
-0.04974365234375,
0.0252685546875,
0.01422119140625,
-0.0307464599609375,
-0.0031147003173828125,
0.0176239013671875,
-0.019927978515625,
-0.0171356201171875,
-0.0209197998046875,
-0.032470703125,
-0.0009007453918457031,
0.0282135009765625,
0.0009021759033203125,
-0.005039215087890625,
-0.0251617431640625,
0.024505615234375,
-0.0014562606811523438,
-0.00833892822265625,
0.04364013671875,
0.016754150390625,
0.021636962890625,
-0.03594970703125,
-0.0014772415161132812,
-0.012115478515625,
-0.0241241455078125,
0.0030307769775390625,
0.012481689453125,
-0.04901123046875,
-0.020050048828125,
0.01030731201171875,
-0.0389404296875,
-0.0233917236328125,
0.0178070068359375
] |
a6e305a20e97d47880b93c0274ef5bf33ae9c09f
|
Wordpress Stackexchange
Q: How would I increase the Author Role to be able to add a new category? How do I increase Author Role permissions to be able to add Categories?
Other solutions welcome. We just need guest authors to be able to add categories while ensuring there is not already a existing appropriate category.
A: Should work from inside your functions.php
function add_manage_cat_to_author_role()
{
if ( ! current_user_can( 'author' ) )
return;
// here you should check if the role already has_cap already and if so, abort/return;
if ( current_user_can( 'author' ) )
{
$GLOBALS['wp_roles']->add_cap( 'author','manage_categories' );
}
}
add_action( 'admin_init', 'add_manage_cat_to_author_role', 10, 0 );
|
Q: How would I increase the Author Role to be able to add a new category? How do I increase Author Role permissions to be able to add Categories?
Other solutions welcome. We just need guest authors to be able to add categories while ensuring there is not already a existing appropriate category.
A: Should work from inside your functions.php
function add_manage_cat_to_author_role()
{
if ( ! current_user_can( 'author' ) )
return;
// here you should check if the role already has_cap already and if so, abort/return;
if ( current_user_can( 'author' ) )
{
$GLOBALS['wp_roles']->add_cap( 'author','manage_categories' );
}
}
add_action( 'admin_init', 'add_manage_cat_to_author_role', 10, 0 );
A: The easiest way is to use a plugin like Capability Manager or User Role Editor
|
wordpress
|
{
"language": "en",
"length": 120,
"provenance": "stackexchange_00019.jsonl.gz:408064",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13025"
}
|
[
0.0634765625,
0.01898193359375,
-0.02410888671875,
-0.048828125,
0.048126220703125,
-0.03448486328125,
0.01146697998046875,
-0.0185394287109375,
-0.0191802978515625,
0.026214599609375,
-0.0018033981323242188,
0.005687713623046875,
0.00386810302734375,
-0.031280517578125,
-0.005306243896484375,
-0.0287628173828125,
0.0201568603515625,
-0.02227783203125,
0.017547607421875,
-0.01229095458984375,
0.020965576171875,
-0.0017023086547851562,
0.029998779296875,
0.0193634033203125,
-0.0013837814331054688,
-0.018890380859375,
0.04888916015625,
-0.062347412109375,
0.0032825469970703125,
-0.049835205078125,
0.00592803955078125,
0.0216827392578125,
-0.0009136199951171875,
0.0178375244140625,
-0.0013799667358398438,
0.03192138671875,
0.00890350341796875,
0.007801055908203125,
0.0102081298828125,
0.0254669189453125,
0.03277587890625,
-0.0148773193359375,
0.01324462890625,
0.02288818359375,
0.004547119140625,
-0.06781005859375,
0.05120849609375,
-0.026214599609375,
0.01303863525390625,
-0.047210693359375,
0.01346588134765625,
-0.016571044921875,
0.0309600830078125,
-0.061309814453125,
-0.026275634765625,
-0.0192108154296875,
0.027618408203125,
0.00925445556640625,
0.047576904296875,
-0.0352783203125,
-0.0654296875,
-0.010986328125,
0.03009033203125,
-0.0289764404296875,
0.0228271484375,
-0.0021533966064453125,
0.058349609375,
0.03253173828125,
-0.0156707763671875,
0.004909515380859375,
0.00577545166015625,
-0.02203369140625,
-0.0052947998046875,
0.00435638427734375,
-0.0277099609375,
-0.0264129638671875,
0.00724029541015625,
-0.0294952392578125,
0.0279388427734375,
0.02239990234375,
0.01947021484375,
0.00997161865234375,
0.060150146484375,
-0.038055419921875,
0.01739501953125,
-0.022796630859375,
-0.0121307373046875,
-0.0003020763397216797,
-0.01245880126953125,
0.0044097900390625,
-0.009185791015625,
-0.050262451171875,
-0.01085662841796875,
0.045501708984375,
0.01377105712890625,
-0.020355224609375,
0.0709228515625,
0.048309326171875,
0.004711151123046875,
0.000013113021850585938,
-0.00027108192443847656,
-0.046783447265625,
0.01375579833984375,
-0.03790283203125,
0.01338958740234375,
0.05084228515625,
-0.00862884521484375,
-0.0238037109375,
0.0291900634765625,
0.0238494873046875,
0.004932403564453125,
0.010772705078125,
0.00923919677734375,
-0.009002685546875,
-0.00485992431640625,
0.00933837890625,
-0.0151214599609375,
0.044219970703125,
-0.0026149749755859375,
0.04071044921875,
-0.006656646728515625,
0.0168304443359375,
-0.0010366439819335938,
-0.032958984375,
0.011871337890625,
-0.00937652587890625,
-0.0298919677734375,
-0.004878997802734375,
-0.029937744140625,
-0.011474609375,
-0.031707763671875,
0.040252685546875,
0.063720703125,
0.017822265625,
-0.0015630722045898438,
-0.0178985595703125,
0.020111083984375,
0.01454925537109375,
0.0013341903686523438,
-0.005390167236328125,
0.007282257080078125,
0.00395965576171875,
0.0198211669921875,
-0.0084686279296875,
0.0237579345703125,
-0.003017425537109375,
-0.006526947021484375,
0.0286407470703125,
0.0208740234375,
0.002094268798828125,
0.043426513671875,
-0.0689697265625,
0.040985107421875,
-0.0013914108276367188,
-0.0006222724914550781,
-0.019287109375,
0.00928497314453125,
-0.0215606689453125,
-0.0158538818359375,
-0.032470703125,
0.02191162109375,
0.023040771484375,
0.02752685546875,
-0.038116455078125,
-0.048797607421875,
-0.040374755859375,
-0.0634765625,
-0.01203155517578125,
0.016571044921875,
-0.02386474609375,
0.02130126953125,
-0.00998687744140625,
-0.004810333251953125,
0.01447296142578125,
0.003894805908203125,
0.0277862548828125,
0.016876220703125,
0.00099945068359375,
0.005962371826171875,
0.023834228515625,
-0.0032825469970703125,
-0.02813720703125,
0.03143310546875,
-0.0171661376953125,
-0.029541015625,
0.01010894775390625,
-0.0113677978515625,
0.0592041015625,
0.02789306640625,
0.01029205322265625,
-0.021392822265625,
-0.0174407958984375,
-0.0229644775390625,
-0.0284881591796875,
-0.012908935546875,
-0.01032257080078125,
0.0221405029296875,
-0.007274627685546875,
0.004619598388671875,
0.02252197265625,
0.0214996337890625,
0.004405975341796875,
0.02423095703125,
-0.02886962890625,
-0.0031757354736328125,
0.00882720947265625,
-0.009490966796875,
0.040069580078125,
0.053619384765625,
0.01837158203125,
-0.0205230712890625,
0.017791748046875,
0.00777435302734375,
-0.08355712890625,
-0.04266357421875,
0.045318603515625,
-0.0029163360595703125,
0.037445068359375,
0.01407623291015625,
0.0304107666015625,
0.024383544921875,
-0.01119232177734375,
0.0236663818359375,
0.00930023193359375,
0.039337158203125,
-0.036163330078125,
-0.005420684814453125,
-0.03863525390625,
0.010772705078125,
0.01129150390625,
-0.07452392578125,
0.01114654541015625,
0.06549072265625,
0.0202789306640625,
-0.026641845703125,
-0.0030384063720703125,
0.0259552001953125,
-0.07318115234375,
-0.01361846923828125,
0.05120849609375,
0.038421630859375,
-0.048583984375,
-0.01153564453125,
0.00432586669921875,
-0.0023021697998046875,
-0.042449951171875,
0.0162353515625,
-0.0135345458984375,
-0.0186920166015625,
0.053253173828125,
0.01320648193359375,
0.0283203125,
-0.0131988525390625,
-0.0271148681640625,
-0.01493072509765625,
0.03594970703125,
-0.0021820068359375,
-0.01458740234375,
-0.0413818359375,
0.00745391845703125,
0.020263671875,
-0.0858154296875,
-0.053466796875,
-0.021881103515625,
-0.0067138671875,
-0.00836944580078125,
0.0011053085327148438,
0.00603485107421875,
-0.014739990234375,
-0.01055145263671875,
0.01448822021484375,
-0.0215606689453125,
0.005123138427734375,
0.01113128662109375,
-0.053741455078125,
0.016357421875,
-0.00962066650390625,
0.0235137939453125,
-0.019317626953125,
-0.004863739013671875,
-0.036468505859375,
0.033782958984375,
0.02557373046875,
-0.01126861572265625,
-0.04034423828125,
-0.036346435546875,
0.036773681640625,
-0.035980224609375,
-0.023651123046875,
-0.01316070556640625,
0.032928466796875,
-0.0182952880859375,
-0.0251312255859375,
0.0005936622619628906,
-0.01080322265625,
-0.0130157470703125,
0.0076141357421875,
-0.049072265625,
0.05340576171875,
-0.0282135009765625,
0.054473876953125,
0.074462890625,
-0.00290679931640625,
0.0256805419921875,
0.01537322998046875,
-0.034698486328125,
0.01259613037109375,
0.049591064453125,
0.0243682861328125,
-0.025115966796875,
0.0108489990234375,
0.042816162109375,
0.039459228515625,
-0.0145263671875,
0.058319091796875,
0.0043182373046875,
0.01739501953125,
0.0278778076171875,
-0.00514984130859375,
-0.0053558349609375,
0.01629638671875,
-0.0477294921875,
-0.006862640380859375,
0.025787353515625,
-0.0304412841796875,
-0.03125,
0.057861328125,
-0.0101776123046875,
-0.0025882720947265625,
-0.032318115234375,
-0.0157623291015625,
-0.0279693603515625,
-0.031829833984375,
-0.035430908203125,
0.0055694580078125,
-0.02191162109375,
-0.01024627685546875,
0.052337646484375,
-0.02337646484375,
-0.052978515625,
-0.0435791015625,
-0.04473876953125,
0.0030670166015625,
-0.0224761962890625,
0.0203094482421875,
0.01136016845703125,
0.04522705078125,
-0.000194549560546875,
0.0144500732421875,
0.0684814453125,
-0.042816162109375,
-0.021728515625,
-0.0218505859375,
0.00452423095703125,
0.0260009765625,
0.0267181396484375,
0.0085601806640625,
0.00868988037109375,
0.047119140625,
-0.023468017578125,
0.01250457763671875,
0.015869140625,
-0.0101318359375,
-0.0404052734375,
-0.03271484375,
-0.02093505859375,
-0.0014171600341796875,
-0.0150604248046875,
0.0142669677734375,
0.01009368896484375,
-0.009521484375,
0.0034046173095703125,
-0.004650115966796875,
-0.00917816162109375,
-0.0096588134765625,
0.0038166046142578125,
-0.0012807846069335938,
-0.0269622802734375,
-0.0059814453125,
-0.0165557861328125,
-0.002803802490234375,
-0.03387451171875,
0.0221405029296875,
-0.05584716796875,
-0.052825927734375,
0.029327392578125,
-0.052215576171875,
0.0196685791015625,
-0.0478515625,
-0.0161895751953125,
-0.01210784912109375,
0.0819091796875,
0.0085906982421875,
-0.021942138671875,
0.01351165771484375,
0.0237579345703125,
-0.048065185546875,
-0.0286407470703125,
-0.00345611572265625,
-0.0170440673828125,
0.01120758056640625,
-0.004730224609375,
-0.02447509765625,
0.0156707763671875,
-0.058135986328125,
0.043487548828125,
-0.004150390625,
0.000030219554901123047,
0.048492431640625,
-0.0670166015625,
0.0159149169921875,
0.0218048095703125,
0.0013599395751953125,
-0.0026950836181640625,
-0.04168701171875,
-0.0268096923828125,
-0.112060546875,
-0.01617431640625,
-0.0372314453125,
0.06463623046875,
-0.0277862548828125,
0.06695556640625,
-0.04443359375,
0.042938232421875,
0.00937652587890625,
0.0124053955078125,
0.01197052001953125,
0.009124755859375,
0.019744873046875,
-0.04193115234375,
0.0008893013000488281,
-0.036224365234375,
0.0123291015625,
-0.01128387451171875,
-0.0008826255798339844,
-0.00131988525390625,
-0.0513916015625,
-0.0158843994140625,
-0.029876708984375,
-0.0222320556640625,
-0.07098388671875,
-0.0614013671875,
-0.01502227783203125,
0.0017862319946289062,
-0.0116424560546875,
0.00949859619140625,
-0.048797607421875,
-0.07391357421875,
0.0282440185546875,
-0.0494384765625,
0.006572723388671875,
0.003833770751953125,
0.1116943359375,
0.0206756591796875,
-0.005573272705078125,
0.0200958251953125,
0.0115509033203125,
0.029388427734375,
0.00640106201171875,
0.04296875,
0.0296630859375,
-0.012847900390625,
0.01552581787109375,
0.0134429931640625,
-0.0146331787109375,
-0.0218658447265625,
0.03228759765625,
0.007144927978515625,
-0.004985809326171875,
-0.0299072265625,
-0.01029205322265625,
0.054534912109375,
-0.0287017822265625,
-0.0175933837890625,
0.024871826171875,
0.01654052734375,
0.01026153564453125,
0.01044464111328125,
-0.007415771484375,
-0.0120849609375,
0.0034809112548828125,
-0.00890350341796875,
0.0007824897766113281,
0.03289794921875,
0.035125732421875,
-0.0029239654541015625,
-0.041778564453125,
-0.02044677734375,
0.0036945343017578125,
-0.057159423828125,
-0.06121826171875,
-0.0236968994140625,
0.0153961181640625,
-0.052093505859375,
-0.01178741455078125,
0.01329803466796875,
-0.0023403167724609375,
0.0180206298828125,
0.0032749176025390625,
-0.03607177734375,
-0.0033206939697265625,
-0.004177093505859375,
0.022491455078125,
0.01035308837890625,
-0.026519775390625,
0.01178741455078125,
-0.00420379638671875,
0.0257568359375,
0.02899169921875,
-0.030029296875,
-0.0182647705078125,
0.0038909912109375,
-0.0008101463317871094,
-0.0255889892578125,
0.005519866943359375,
0.0243377685546875,
0.041107177734375,
-0.02740478515625,
0.049652099609375,
-0.0205230712890625,
0.0667724609375,
0.05609130859375,
-0.00904083251953125,
0.00704193115234375,
0.03704833984375,
0.01282501220703125,
-0.051116943359375,
-0.0149993896484375,
-0.035980224609375,
0.00504302978515625,
0.00595855712890625,
0.044769287109375,
-0.00595855712890625,
-0.041656494140625,
0.0322265625,
-0.039947509765625,
-0.005435943603515625,
-0.020721435546875,
-0.0260162353515625,
-0.0215301513671875,
0.002445220947265625,
0.01715087890625,
0.00830078125,
-0.0031566619873046875,
-0.0143890380859375,
0.009185791015625,
-0.036956787109375,
0.032196044921875,
-0.00872802734375,
0.01873779296875,
-0.007350921630859375,
-0.01519775390625,
-0.0758056640625,
-0.03948974609375,
0.005191802978515625,
0.01416778564453125,
0.002956390380859375,
-0.0193634033203125,
-0.041046142578125,
0.0087890625,
0.0266571044921875,
0.01251220703125,
-0.021453857421875,
-0.0255126953125,
0.03997802734375,
-0.018341064453125,
0.07318115234375,
-0.00623321533203125,
-0.035400390625,
-0.026153564453125,
-0.04827880859375,
-0.0229034423828125,
-0.017730712890625,
0.020294189453125,
-0.0214080810546875,
0.0211029052734375,
0.03192138671875,
0.01303863525390625,
-0.0004930496215820312,
-0.05145263671875,
-0.027191162109375,
0.03106689453125,
0.064453125,
0.036834716796875,
-0.011688232421875,
-0.0037326812744140625,
0.046600341796875,
0.01404571533203125,
0.01702880859375,
-0.0077667236328125,
-0.003955841064453125,
-0.04071044921875,
-0.007049560546875,
-0.0229949951171875,
0.0062103271484375,
0.0008373260498046875,
-0.00501251220703125,
-0.01320648193359375,
0.034881591796875,
0.00820159912109375,
0.033660888671875,
-0.0176239013671875,
0.002620697021484375,
0.0015878677368164062,
-0.0231170654296875,
-0.015869140625,
0.0100555419921875,
0.03125,
-0.01172637939453125,
0.095458984375,
-0.0272674560546875,
-0.024200439453125,
0.038055419921875,
-0.04852294921875,
0.058624267578125,
0.054840087890625,
-0.05352783203125,
0.0653076171875,
0.05963134765625,
0.006320953369140625,
0.0341796875,
0.016693115234375,
0.0236358642578125,
-0.011383056640625,
-0.014068603515625,
0.0135040283203125,
0.01467132568359375,
0.00934600830078125,
-0.00321197509765625,
0.025665283203125,
0.0218963623046875,
-0.0015468597412109375,
-0.00689697265625,
0.035186767578125,
0.0250091552734375,
-0.047454833984375,
0.005146026611328125,
0.003509521484375,
0.01245880126953125,
0.037139892578125,
0.0002772808074951172,
-0.0218658447265625,
-0.039794921875,
0.0947265625,
-0.07769775390625,
0.00027441978454589844,
0.042510986328125,
-0.0293426513671875,
-0.01522064208984375,
-0.001140594482421875,
-0.007076263427734375,
0.031585693359375,
0.0401611328125,
0.0135650634765625,
-0.029815673828125,
0.036865234375,
-0.0034427642822265625,
0.00780487060546875,
0.03564453125,
-0.0095367431640625,
-0.03118896484375,
0.05963134765625,
-0.04229736328125,
-0.00606536865234375,
-0.0233154296875,
-0.010894775390625,
0.02606201171875,
0.032196044921875,
-0.0160980224609375,
-0.00778961181640625,
0.0288238525390625,
-0.040924072265625,
-0.002193450927734375,
-0.0345458984375,
-0.004467010498046875,
-0.00180816650390625,
-0.013763427734375,
0.006900787353515625,
-0.00531005859375,
-0.03656005859375,
-0.01232147216796875,
-0.043426513671875,
0.012908935546875,
-0.005115509033203125,
-0.01383209228515625,
0.0291595458984375,
0.0171966552734375,
-0.01519012451171875,
0.0234222412109375,
0.0355224609375,
-0.054595947265625,
-0.025115966796875,
0.04974365234375,
-0.0004127025604248047,
0.0019989013671875,
0.06072998046875,
-0.0294342041015625,
0.048919677734375,
0.0006742477416992188,
-0.01132965087890625,
0.0197601318359375,
0.021820068359375,
-0.03948974609375,
-0.00677490234375,
-0.033050537109375,
0.052947998046875,
0.03179931640625,
0.0107421875,
-0.05267333984375,
-0.01922607421875,
-0.014739990234375,
0.034576416015625,
0.07830810546875,
0.0177154541015625,
-0.0117950439453125,
-0.009552001953125,
0.016876220703125,
0.00904083251953125,
-0.05316162109375,
0.047149658203125,
-0.0201263427734375,
-0.06689453125,
0.0003108978271484375,
0.0291748046875,
0.035736083984375,
-0.02545166015625,
-0.033843994140625,
-0.010528564453125,
0.007904052734375,
0.01812744140625,
-0.01287078857421875,
0.01459503173828125,
-0.025360107421875,
-0.01220703125,
0.020172119140625,
-0.007965087890625,
-0.001556396484375,
0.043792724609375,
0.033447265625,
0.01210784912109375,
0.0263214111328125,
-0.016632080078125,
0.06298828125,
0.01015472412109375,
0.05194091796875,
0.00682830810546875,
0.0177764892578125,
0.006603240966796875,
0.025909423828125,
0.026153564453125,
0.0362548828125,
-0.0316162109375,
0.049407958984375,
0.02783203125,
0.0313720703125,
-0.00722503662109375,
0.041595458984375,
0.017303466796875,
0.0489501953125,
-0.046356201171875,
-0.039825439453125,
-0.0024509429931640625,
0.001338958740234375,
0.00730133056640625,
-0.0032253265380859375,
0.0008664131164550781,
0.0242919921875,
0.05963134765625,
-0.07861328125,
0.004253387451171875,
0.042327880859375,
0.0249786376953125,
-0.0157012939453125,
-0.00920867919921875,
-0.0285186767578125,
-0.005100250244140625,
-0.03497314453125,
-0.0275421142578125,
-0.01052093505859375,
0.03424072265625,
0.03857421875,
0.0335693359375,
0.03857421875,
-0.0179595947265625,
0.006336212158203125,
0.0380859375,
-0.007373809814453125,
-0.026519775390625,
-0.0176239013671875,
-0.059539794921875,
0.003467559814453125,
0.031890869140625,
-0.039031982421875,
-0.0009756088256835938,
-0.000949859619140625,
0.046539306640625,
0.02838134765625,
-0.031524658203125,
0.0479736328125,
-0.00420379638671875,
-0.015625,
-0.04803466796875,
0.037628173828125,
0.033782958984375,
0.015716552734375,
-0.0029144287109375,
0.0245513916015625,
0.055023193359375,
-0.011932373046875,
-0.023712158203125,
0.007076263427734375,
-0.056976318359375,
0.048980712890625,
-0.0052337646484375,
0.07049560546875,
0.0061798095703125,
-0.0902099609375,
0.0130767822265625,
-0.0689697265625,
-0.08099365234375,
0.054229736328125,
0.043365478515625,
-0.055328369140625,
0.0406494140625,
-0.037109375,
-0.02069091796875,
0.03009033203125,
-0.0024261474609375,
-0.0272674560546875,
0.003726959228515625,
0.029266357421875,
-0.03265380859375,
-0.0198822021484375,
0.0018529891967773438,
0.004772186279296875,
0.020751953125,
0.037078857421875,
0.0005326271057128906,
0.01763916015625,
0.01953125,
-0.039276123046875,
0.0261993408203125,
-0.06488037109375,
-0.0445556640625,
0.052978515625,
-0.0036487579345703125,
-0.0306396484375,
0.0112762451171875,
-0.06060791015625,
0.0228271484375,
0.0272369384765625,
-0.007511138916015625,
0.0178680419921875,
-0.01085662841796875,
0.01514434814453125,
-0.01232147216796875,
0.0125579833984375,
-0.035430908203125,
-0.032928466796875,
-0.06768798828125,
-0.036895751953125,
0.0192108154296875,
-0.016387939453125,
-0.0149688720703125,
0.0091400146484375,
-0.035003662109375,
-0.0137481689453125,
-0.013946533203125,
0.0264129638671875,
-0.065185546875,
0.01239776611328125,
-0.018890380859375,
-0.0181121826171875,
0.0494384765625,
-0.0044708251953125,
0.01727294921875,
0.0115814208984375,
0.0303802490234375,
0.03271484375,
-0.07830810546875,
0.0004987716674804688,
0.02618408203125,
0.043121337890625,
-0.01294708251953125,
0.01202392578125,
-0.005367279052734375,
-0.0021266937255859375,
-0.00211334228515625,
-0.00717926025390625,
-0.0506591796875,
-0.032806396484375,
0.015960693359375,
0.0293426513671875,
0.01241302490234375,
-0.0543212890625,
-0.07940673828125,
0.05316162109375,
0.037200927734375,
0.005199432373046875,
-0.0863037109375,
0.0726318359375,
-0.045928955078125,
0.082275390625,
-0.0225067138671875,
-0.0303802490234375,
0.03143310546875,
0.0489501953125,
-0.06536865234375,
0.0175018310546875,
-0.0325927734375,
-0.06982421875,
-0.033416748046875,
0.0194244384765625,
0.004611968994140625,
-0.0232086181640625,
0.007720947265625,
0.055267333984375,
0.0213470458984375,
0.09515380859375,
0.0126190185546875,
0.005489349365234375,
0.00801849365234375,
0.01226043701171875,
-0.046600341796875,
-0.0709228515625,
0.0269317626953125,
-0.044403076171875,
-0.0261688232421875,
-0.08160400390625,
0.058349609375,
0.041229248046875,
0.001659393310546875,
-0.01708984375,
0.0233154296875,
-0.0164031982421875,
-0.0151824951171875,
-0.05535888671875,
-0.01207733154296875,
-0.0257415771484375,
0.0399169921875,
-0.00812530517578125,
-0.0162200927734375,
-0.008270263671875,
0.05194091796875,
0.033477783203125,
-0.005802154541015625,
0.03765869140625,
-0.0030651092529296875,
-0.0396728515625,
0.01093292236328125,
0.01313018798828125,
0.01340484619140625,
-0.0014162063598632812,
0.00749969482421875,
-0.008087158203125,
0.04217529296875,
-0.019500732421875,
-0.052886962890625,
-0.0258026123046875,
-0.00550079345703125,
-0.0201416015625,
-0.06927490234375,
-0.00011664628982543945,
-0.0283050537109375,
0.04815673828125,
0.007511138916015625,
0.0027294158935546875,
-0.018463134765625,
-0.0310516357421875,
-0.05218505859375,
0.008941650390625,
-0.01314544677734375,
-0.0131072998046875,
-0.043609619140625,
0.0111236572265625,
0.011566162109375,
-0.004978179931640625,
0.0029277801513671875,
-0.00283050537109375,
-0.0214691162109375,
-0.00884246826171875,
-0.006603240966796875,
-0.003509521484375,
-0.026123046875,
0.044952392578125,
0.01395416259765625,
-0.036346435546875,
-0.0182037353515625,
-0.00806427001953125,
-0.013275146484375,
-0.02227783203125,
-0.0244598388671875,
-0.02630615234375,
0.00656890869140625,
-0.0297088623046875,
0.01311492919921875,
-0.0235137939453125,
0.0286865234375,
-0.0372314453125,
0.0140380859375,
0.004302978515625,
0.0435791015625,
-0.00031185150146484375,
0.047332763671875,
-0.0062103271484375,
0.06158447265625,
-0.0059356689453125,
0.042694091796875,
-0.008026123046875,
-0.01396942138671875,
-0.005535125732421875,
0.038604736328125,
-0.021026611328125,
-0.0111083984375,
0.0185089111328125,
-0.04351806640625,
0.0167388916015625,
0.020660400390625,
0.021026611328125,
0.009552001953125,
0.006450653076171875,
0.01210784912109375,
-0.0040130615234375,
0.0146026611328125
] |
a560ef2aeac32eb0224f536299fd32bb77693f91
|
Wordpress Stackexchange
Q: Media Library plugins for better file management? Is there any plugin to extend the basic functionality of the Media Library for websites with a lot of media content?
A folder structure would be awesome...at the moment I am using the Media Tags plugin but I am wondering if there is something more powerful around.
Any suggestion?
Thanks
A: I am using Media Categories It has folder structures.
|
Q: Media Library plugins for better file management? Is there any plugin to extend the basic functionality of the Media Library for websites with a lot of media content?
A folder structure would be awesome...at the moment I am using the Media Tags plugin but I am wondering if there is something more powerful around.
Any suggestion?
Thanks
A: I am using Media Categories It has folder structures.
A: The Media Library is in its current state indeed a weak area of WordPress. If you only have images as media, I recommend the excellent and popular NEXTGen-Gallery Plugin
Keep in mind though that it lives separate from the original media library.
|
wordpress
|
{
"language": "en",
"length": 111,
"provenance": "stackexchange_00019.jsonl.gz:408066",
"question_score": "21",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13030"
}
|
[
0.003875732421875,
-0.0076141357421875,
-0.00390625,
0.011505126953125,
-0.02191162109375,
0.0006847381591796875,
0.0290679931640625,
-0.004688262939453125,
-0.004337310791015625,
0.0053863525390625,
0.0269012451171875,
0.004810333251953125,
-0.0096893310546875,
-0.04638671875,
0.01197052001953125,
-0.0052032470703125,
0.02423095703125,
-0.033416748046875,
0.023834228515625,
-0.021331787109375,
0.0160369873046875,
-0.0216522216796875,
0.0667724609375,
0.02410888671875,
-0.0028171539306640625,
0.029266357421875,
0.0198822021484375,
-0.00008469820022583008,
-0.0139007568359375,
-0.03131103515625,
0.005252838134765625,
0.01490020751953125,
0.01898193359375,
-0.01297760009765625,
0.0230255126953125,
0.0215911865234375,
0.0198211669921875,
-0.006603240966796875,
0.033172607421875,
-0.020172119140625,
0.00716400146484375,
0.012542724609375,
0.06292724609375,
0.051422119140625,
0.0261688232421875,
-0.0364990234375,
0.0008363723754882812,
-0.08294677734375,
0.014251708984375,
-0.05267333984375,
0.0166015625,
-0.01082611083984375,
0.035675048828125,
-0.04901123046875,
-0.02349853515625,
-0.0140838623046875,
0.039093017578125,
-0.02288818359375,
0.0280303955078125,
-0.05218505859375,
-0.03717041015625,
0.0006113052368164062,
0.03717041015625,
0.018646240234375,
0.01436614990234375,
-0.0227813720703125,
-0.040985107421875,
0.04498291015625,
-0.0679931640625,
0.00543975830078125,
0.057952880859375,
-0.062164306640625,
0.0014791488647460938,
-0.0280609130859375,
-0.0182647705078125,
0.0296783447265625,
-0.0059814453125,
-0.006206512451171875,
0.033447265625,
-0.01181793212890625,
-0.016998291015625,
0.0063934326171875,
-0.0214996337890625,
-0.04400634765625,
0.007183074951171875,
-0.0260467529296875,
-0.01020050048828125,
0.0102386474609375,
-0.0169677734375,
0.0316162109375,
-0.0188140869140625,
-0.015655517578125,
0.02490234375,
0.033050537109375,
-0.0092620849609375,
0.00939178466796875,
0.0231475830078125,
0.0184326171875,
0.0103912353515625,
0.018890380859375,
0.01708984375,
-0.049835205078125,
0.017242431640625,
-0.012786865234375,
0.007755279541015625,
-0.0025997161865234375,
-0.0233001708984375,
-0.044342041015625,
0.040069580078125,
0.042999267578125,
-0.03363037109375,
0.055023193359375,
0.008819580078125,
0.00348663330078125,
-0.0019159317016601562,
-0.004192352294921875,
-0.030242919921875,
0.053375244140625,
-0.0030345916748046875,
0.048126220703125,
0.006748199462890625,
0.0258941650390625,
-0.02191162109375,
-0.0191192626953125,
-0.0207061767578125,
-0.0195770263671875,
-0.013214111328125,
0.0009889602661132812,
-0.008270263671875,
-0.005054473876953125,
0.01152801513671875,
0.02685546875,
0.006412506103515625,
-0.00046062469482421875,
-0.04638671875,
0.0108489990234375,
0.0007109642028808594,
-0.0146331787109375,
0.01364898681640625,
-0.0281829833984375,
0.0038814544677734375,
0.00418853759765625,
0.0321044921875,
0.004657745361328125,
0.0288238525390625,
0.00009316205978393555,
0.0255889892578125,
0.0297698974609375,
-0.01238250732421875,
-0.020751953125,
0.03216552734375,
0.0291748046875,
0.0384521484375,
0.005283355712890625,
0.00795745849609375,
-0.01413726806640625,
0.0208587646484375,
-0.0241241455078125,
0.00606536865234375,
-0.0257415771484375,
-0.004520416259765625,
-0.006580352783203125,
0.018585205078125,
-0.05804443359375,
-0.035552978515625,
-0.0174560546875,
-0.02197265625,
0.00719451904296875,
0.01214599609375,
0.004451751708984375,
0.00688934326171875,
0.0036163330078125,
-0.01442718505859375,
0.0049591064453125,
0.013092041015625,
0.0072174072265625,
0.0087890625,
0.00707244873046875,
0.031341552734375,
0.0185089111328125,
0.007648468017578125,
-0.00978851318359375,
0.072265625,
-0.01554107666015625,
-0.04345703125,
-0.005672454833984375,
-0.0010013580322265625,
0.039031982421875,
0.035858154296875,
0.01971435546875,
0.0150909423828125,
-0.019775390625,
-0.0291748046875,
-0.00788116455078125,
-0.02984619140625,
-0.0038089752197265625,
0.0172576904296875,
0.02301025390625,
-0.0024738311767578125,
-0.0198211669921875,
-0.0077056884765625,
0.0301971435546875,
-0.034576416015625,
0.036590576171875,
0.0029850006103515625,
-0.0139007568359375,
0.019866943359375,
0.0028171539306640625,
0.0007181167602539062,
0.01119232177734375,
0.019195556640625,
0.024261474609375,
-0.0163726806640625,
-0.043487548828125,
-0.039764404296875,
0.006618499755859375,
-0.0172119140625,
-0.00872039794921875,
0.00777435302734375,
-0.0172271728515625,
-0.004741668701171875,
0.02978515625,
0.0057525634765625,
0.032684326171875,
0.01201629638671875,
0.01708984375,
-0.0328369140625,
-0.0041656494140625,
-0.03216552734375,
0.033111572265625,
-0.049713134765625,
0.0206146240234375,
0.040283203125,
0.052459716796875,
-0.007274627685546875,
-0.042938232421875,
-0.002124786376953125,
-0.109619140625,
0.0306549072265625,
0.06805419921875,
0.024322509765625,
0.04962158203125,
-0.0007371902465820312,
0.03472900390625,
0.0882568359375,
-0.0145721435546875,
0.003513336181640625,
0.0212554931640625,
0.0066986083984375,
0.048431396484375,
-0.060699462890625,
-0.0030384063720703125,
0.0207061767578125,
-0.038330078125,
-0.00666046142578125,
0.032958984375,
0.0015993118286132812,
-0.0109405517578125,
-0.0081939697265625,
0.0214691162109375,
0.004077911376953125,
0.034912109375,
-0.00872039794921875,
0.0189208984375,
0.0380859375,
0.0283050537109375,
0.043121337890625,
0.0465087890625,
-0.0008978843688964844,
0.0257110595703125,
-0.00720977783203125,
-0.04754638671875,
0.00302886962890625,
0.06451416015625,
0.019927978515625,
-0.00475311279296875,
-0.02685546875,
-0.024749755859375,
-0.0225982666015625,
0.032470703125,
-0.0347900390625,
-0.0080108642578125,
-0.07159423828125,
-0.01122283935546875,
-0.005809783935546875,
-0.0335693359375,
-0.0121612548828125,
-0.00018966197967529297,
-0.0457763671875,
-0.022491455078125,
0.0079345703125,
0.0260009765625,
-0.028594970703125,
0.0252227783203125,
-0.015899658203125,
-0.00836944580078125,
0.04803466796875,
-0.04425048828125,
0.028564453125,
-0.043914794921875,
0.07464599609375,
0.053070068359375,
-0.0204315185546875,
-0.00879669189453125,
0.0009851455688476562,
0.04022216796875,
0.03900146484375,
-0.0107269287109375,
-0.01070404052734375,
-0.014068603515625,
-0.044342041015625,
-0.057952880859375,
0.00666046142578125,
-0.0024509429931640625,
-0.01386260986328125,
-0.046295166015625,
-0.024261474609375,
-0.015777587890625,
-0.0823974609375,
-0.0430908203125,
-0.005496978759765625,
-0.0771484375,
0.0479736328125,
0.010162353515625,
-0.0305633544921875,
-0.04754638671875,
0.08526611328125,
0.0166168212890625,
-0.04132080078125,
-0.0172119140625,
-0.0210113525390625,
-0.06915283203125,
-0.0509033203125,
-0.00907135009765625,
-0.00046634674072265625,
0.0205535888671875,
0.004245758056640625,
0.0253753662109375,
-0.019622802734375,
-0.04852294921875,
-0.0026187896728515625,
-0.026123046875,
0.00969696044921875,
0.019927978515625,
0.05621337890625,
-0.0159149169921875,
-0.00615692138671875,
0.0223236083984375,
0.05169677734375,
0.058746337890625,
-0.07550048828125,
-0.01708984375,
0.0084991455078125,
-0.0024051666259765625,
0.0010089874267578125,
0.01357269287109375,
-0.00487518310546875,
-0.00502777099609375,
-0.0209503173828125,
-0.058441162109375,
0.0219573974609375,
0.004306793212890625,
-0.0152587890625,
0.0025348663330078125,
0.0010099411010742188,
-0.0221099853515625,
0.0150604248046875,
-0.02410888671875,
-0.0112762451171875,
0.01800537109375,
-0.040802001953125,
-0.020477294921875,
0.0213470458984375,
-0.0089569091796875,
0.0174102783203125,
0.031494140625,
-0.00771331787109375,
-0.039886474609375,
-0.0263519287109375,
-0.0341796875,
0.007297515869140625,
0.002536773681640625,
-0.01357269287109375,
-0.0014514923095703125,
-0.0009889602661132812,
0.004329681396484375,
-0.046051025390625,
0.04498291015625,
-0.07977294921875,
-0.019622802734375,
-0.05596923828125,
0.06732177734375,
-0.044586181640625,
0.005542755126953125,
0.00408935546875,
0.00685882568359375,
0.00921630859375,
-0.025360107421875,
-0.0579833984375,
-0.0283966064453125,
0.0069580078125,
0.00433349609375,
0.00750732421875,
-0.017425537109375,
-0.00931549072265625,
0.0206451416015625,
-0.00014829635620117188,
-0.0067596435546875,
0.01473236083984375,
-0.014190673828125,
0.03167724609375,
-0.03582763671875,
0.03729248046875,
-0.0572509765625,
-0.00406646728515625,
-0.0266876220703125,
-0.066650390625,
-0.0177154541015625,
-0.02398681640625,
0.07073974609375,
0.028900146484375,
-0.02691650390625,
-0.024688720703125,
0.04754638671875,
-0.01496124267578125,
0.0306549072265625,
0.0124664306640625,
0.0113372802734375,
0.043792724609375,
-0.01081085205078125,
0.017425537109375,
-0.01910400390625,
-0.031524658203125,
-0.07257080078125,
-0.01366424560546875,
0.0036525726318359375,
-0.01393890380859375,
0.054443359375,
-0.0265655517578125,
0.01849365234375,
-0.02001953125,
-0.0194854736328125,
-0.061553955078125,
-0.0279693603515625,
-0.0341796875,
-0.008514404296875,
-0.024688720703125,
-0.02886962890625,
0.019012451171875,
0.03411865234375,
-0.0037174224853515625,
0.0277557373046875,
0.05126953125,
0.01044464111328125,
-0.0180511474609375,
-0.103515625,
0.010162353515625,
0.039764404296875,
0.0205535888671875,
0.01812744140625,
-0.01325225830078125,
-0.05047607421875,
0.0667724609375,
-0.0005373954772949219,
0.010223388671875,
-0.0012159347534179688,
-0.0015420913696289062,
-0.0011425018310546875,
-0.0208282470703125,
0.0160369873046875,
0.00681304931640625,
0.013397216796875,
0.01837158203125,
-0.011260986328125,
-0.00787353515625,
-0.0750732421875,
0.045684814453125,
0.034423828125,
0.00640106201171875,
-0.059295654296875,
-0.07940673828125,
0.0206451416015625,
-0.01268768310546875,
0.01702880859375,
-0.0011606216430664062,
0.0023593902587890625,
0.023101806640625,
0.0179443359375,
0.0009493827819824219,
0.00812530517578125,
0.0301055908203125,
-0.02642822265625,
0.0259246826171875,
0.0094146728515625,
-0.0282440185546875,
-0.01300048828125,
-0.00855255126953125,
0.0244598388671875,
0.0098876953125,
-0.0237579345703125,
-0.01453399658203125,
-0.0205535888671875,
0.00958251953125,
0.0168609619140625,
0.017578125,
0.0225372314453125,
0.016632080078125,
-0.011474609375,
-0.01519012451171875,
-0.0005598068237304688,
0.007328033447265625,
-0.040130615234375,
0.0034637451171875,
-0.023895263671875,
-0.011322021484375,
0.01267242431640625,
0.0369873046875,
-0.05377197265625,
0.0281982421875,
0.00943756103515625,
0.026275634765625,
0.0238189697265625,
0.00763702392578125,
0.01448822021484375,
0.0115966796875,
-0.005908966064453125,
-0.00731658935546875,
0.01381683349609375,
-0.0294189453125,
0.00640869140625,
0.012298583984375,
0.024322509765625,
-0.020263671875,
-0.03375244140625,
0.038238525390625,
-0.03814697265625,
-0.011505126953125,
0.01148223876953125,
-0.043365478515625,
-0.048187255859375,
-0.0186920166015625,
0.007053375244140625,
0.031036376953125,
-0.021820068359375,
-0.009033203125,
-0.013427734375,
-0.01224517822265625,
-0.002445220947265625,
0.0290679931640625,
-0.06396484375,
0.02191162109375,
0.042510986328125,
-0.0244140625,
-0.004058837890625,
0.0142669677734375,
-0.0806884765625,
-0.0494384765625,
-0.00930023193359375,
0.0105133056640625,
0.0477294921875,
-0.0236053466796875,
0.032562255859375,
0.006389617919921875,
-0.02838134765625,
-0.043121337890625,
0.04058837890625,
-0.015869140625,
-0.015777587890625,
-0.032073974609375,
-0.0168609619140625,
-0.054656982421875,
-0.03692626953125,
-0.06793212890625,
-0.046539306640625,
-0.05035400390625,
0.0013799667358398438,
-0.0033245086669921875,
0.0118255615234375,
0.01934814453125,
0.007007598876953125,
0.004913330078125,
0.0257568359375,
-0.006671905517578125,
-0.006290435791015625,
0.0089874267578125,
-0.01071929931640625,
0.0235595703125,
0.031158447265625,
0.0175018310546875,
-0.028228759765625,
-0.0190887451171875,
-0.0254364013671875,
-0.002063751220703125,
-0.050811767578125,
-0.031768798828125,
0.018280029296875,
-0.044158935546875,
0.038360595703125,
0.036865234375,
0.01348114013671875,
0.04010009765625,
-0.037567138671875,
-0.0073699951171875,
-0.01226806640625,
0.0208587646484375,
-0.058197021484375,
-0.0129852294921875,
0.01654052734375,
0.0038509368896484375,
0.0440673828125,
-0.040985107421875,
-0.041961669921875,
0.042694091796875,
-0.004337310791015625,
0.046051025390625,
-0.0119476318359375,
-0.00978851318359375,
0.03558349609375,
-0.01446533203125,
-0.01708984375,
-0.024322509765625,
0.006458282470703125,
-0.01399993896484375,
-0.0643310546875,
-0.031280517578125,
0.0643310546875,
-0.005771636962890625,
0.060638427734375,
-0.0192108154296875,
-0.00940704345703125,
0.055694580078125,
-0.0469970703125,
0.015472412109375,
-0.0167083740234375,
0.020538330078125,
-0.00719451904296875,
0.030181884765625,
-0.00492095947265625,
-0.01239013671875,
0.017120361328125,
-0.0285797119140625,
0.006595611572265625,
-0.0123443603515625,
0.030059814453125,
0.032257080078125,
-0.037445068359375,
-0.005878448486328125,
-0.0017862319946289062,
-0.0273590087890625,
-0.016357421875,
0.005908966064453125,
0.0167694091796875,
0.0042724609375,
-0.02032470703125,
-0.0020122528076171875,
-0.00988006591796875,
0.011627197265625,
0.0210418701171875,
-0.028228759765625,
-0.0156097412109375,
0.006504058837890625,
0.0399169921875,
-0.00495147705078125,
0.00027060508728027344,
-0.03253173828125,
-0.0200042724609375,
-0.0179443359375,
0.01056671142578125,
-0.03851318359375,
-0.0196533203125,
0.00771331787109375,
-0.077392578125,
0.0012140274047851562,
-0.0112762451171875,
0.021331787109375,
0.0028629302978515625,
0.0244140625,
0.0003306865692138672,
-0.003574371337890625,
-0.047088623046875,
-0.013519287109375,
-0.05908203125,
0.041473388671875,
-0.03741455078125,
0.0199737548828125,
0.037109375,
0.038482666015625,
-0.026458740234375,
0.01107025146484375,
0.032928466796875,
-0.04925537109375,
-0.0099639892578125,
0.0208740234375,
0.0038890838623046875,
0.0030364990234375,
0.032440185546875,
-0.03875732421875,
0.06475830078125,
0.0019330978393554688,
0.0172882080078125,
0.0482177734375,
0.0070953369140625,
-0.040679931640625,
-0.022674560546875,
-0.0235595703125,
0.032379150390625,
-0.02587890625,
-0.0166015625,
-0.03326416015625,
0.0192718505859375,
-0.029876708984375,
-0.01074981689453125,
0.043792724609375,
0.027191162109375,
-0.0712890625,
-0.04217529296875,
-0.0302886962890625,
0.0230865478515625,
0.020660400390625,
0.060882568359375,
-0.0266265869140625,
0.00510406494140625,
0.0250091552734375,
-0.034881591796875,
0.046875,
-0.046112060546875,
-0.018524169921875,
-0.0225677490234375,
0.0030975341796875,
-0.0150299072265625,
-0.01381683349609375,
0.016204833984375,
-0.007476806640625,
-0.01312255859375,
-0.001415252685546875,
0.0104522705078125,
0.02923583984375,
0.036285400390625,
0.035125732421875,
-0.01358795166015625,
0.0024242401123046875,
-0.01483917236328125,
0.04827880859375,
-0.03289794921875,
0.0307159423828125,
0.041900634765625,
0.015167236328125,
0.0149993896484375,
0.006328582763671875,
0.0263519287109375,
0.01398468017578125,
-0.016571044921875,
0.0145263671875,
-0.03570556640625,
0.016571044921875,
-0.092529296875,
-0.05340576171875,
0.0308074951171875,
0.0455322265625,
-0.004535675048828125,
-0.04351806640625,
0.004985809326171875,
0.01245880126953125,
0.00015306472778320312,
-0.00531005859375,
-0.01061248779296875,
-0.0036220550537109375,
0.04583740234375,
-0.01268768310546875,
-0.0235443115234375,
0.008148193359375,
0.053619384765625,
-0.0044708251953125,
-0.0212554931640625,
-0.02508544921875,
-0.0438232421875,
0.006137847900390625,
0.0123138427734375,
-0.00621795654296875,
-0.0029754638671875,
-0.0184783935546875,
0.045074462890625,
-0.0372314453125,
0.0036869049072265625,
0.017852783203125,
0.03741455078125,
-0.00921630859375,
0.010772705078125,
-0.0360107421875,
-0.06182861328125,
0.0174560546875,
0.0247802734375,
0.045196533203125,
0.041900634765625,
0.00975799560546875,
0.033966064453125,
0.06768798828125,
0.01824951171875,
0.04296875,
0.0110015869140625,
0.0163726806640625,
-0.0596923828125,
0.06842041015625,
0.053802490234375,
0.0197601318359375,
-0.001186370849609375,
-0.0092010498046875,
0.095458984375,
-0.02752685546875,
0.02374267578125,
-0.0135345458984375,
-0.039825439453125,
0.0171966552734375,
-0.0085601806640625,
0.05780029296875,
-0.01629638671875,
-0.0838623046875,
-0.033355712890625,
-0.0113067626953125,
-0.014068603515625,
0.0233917236328125,
0.0478515625,
-0.0161590576171875,
0.01502227783203125,
-0.002086639404296875,
-0.007266998291015625,
0.018798828125,
-0.03326416015625,
0.0228118896484375,
0.012939453125,
-0.00628662109375,
0.0043487548828125,
-0.036102294921875,
-0.0253753662109375,
-0.04180908203125,
0.046142578125,
0.040557861328125,
0.06024169921875,
-0.018035888671875,
0.0555419921875,
0.039581298828125,
-0.037567138671875,
0.049591064453125,
0.046417236328125,
-0.04144287109375,
0.00814056396484375,
-0.0149383544921875,
-0.02728271484375,
-0.0017871856689453125,
0.008819580078125,
0.04083251953125,
-0.046844482421875,
-0.013671875,
-0.017303466796875,
0.01462554931640625,
-0.005039215087890625,
0.0137786865234375,
-0.01457977294921875,
-0.041717529296875,
-0.0132598876953125,
0.005031585693359375,
0.015533447265625,
0.025482177734375,
0.0014944076538085938,
0.004863739013671875,
0.0022983551025390625,
-0.007343292236328125,
-0.01311492919921875,
0.0261383056640625,
-0.0271148681640625,
0.0312347412109375,
-0.0254669189453125,
-0.06732177734375,
0.0193328857421875,
-0.00931549072265625,
-0.010040283203125,
0.01751708984375,
0.07293701171875,
0.0119171142578125,
-0.038970947265625,
0.0196685791015625,
0.026702880859375,
0.0289154052734375,
-0.01953125,
0.0028743743896484375,
0.0226593017578125,
0.005794525146484375,
-0.01409149169921875,
-0.06414794921875,
-0.0295867919921875,
-0.0640869140625,
-0.0033512115478515625,
0.01253509521484375,
-0.03717041015625,
-0.061859130859375,
-0.050384521484375,
0.00501251220703125,
0.000614166259765625,
0.0036487579345703125,
-0.0682373046875,
0.0242156982421875,
0.0036792755126953125,
0.040374755859375,
-0.024444580078125,
-0.0195159912109375,
-0.0031375885009765625,
0.0191497802734375,
-0.039154052734375,
-0.07537841796875,
-0.051849365234375,
0.04656982421875,
-0.047760009765625,
0.05328369140625,
0.034820556640625,
-0.064453125,
0.0218963623046875,
0.096923828125,
0.07586669921875,
0.1363525390625,
0.04974365234375,
-0.0289764404296875,
-0.025848388671875,
-0.008758544921875,
0.03253173828125,
0.0246429443359375,
-0.002655029296875,
0.001529693603515625,
-0.052825927734375,
0.0267333984375,
-0.031005859375,
-0.0230865478515625,
-0.0489501953125,
-0.0550537109375,
0.085693359375,
0.005462646484375,
-0.029510498046875,
-0.0297393798828125,
0.048309326171875,
-0.0034313201904296875,
0.0230560302734375,
0.003078460693359375,
0.002349853515625,
0.0091400146484375,
0.0034999847412109375,
0.0262298583984375,
-0.0160980224609375,
0.02752685546875,
-0.0008854866027832031,
-0.083984375,
-0.0036830902099609375,
-0.009063720703125,
0.016204833984375,
0.0167083740234375,
-0.01128387451171875,
-0.00009047985076904297,
0.022064208984375,
-0.050048828125,
-0.041595458984375,
-0.02777099609375,
-0.0020294189453125,
0.0007638931274414062,
-0.0009670257568359375,
-0.036102294921875,
0.00118255615234375,
0.025604248046875,
0.072265625,
0.01551055908203125,
-0.04168701171875,
0.0005412101745605469,
-0.021484375,
-0.005176544189453125,
-0.00415802001953125,
0.00463104248046875,
-0.0251312255859375,
0.017852783203125,
-0.01134490966796875,
0.00852203369140625,
-0.0223846435546875,
-0.005138397216796875,
-0.005401611328125,
-0.019989013671875,
0.0223541259765625,
0.0003485679626464844,
0.010833740234375,
0.0016164779663085938,
0.06488037109375,
-0.034637451171875,
0.0278778076171875,
0.0036830902099609375,
0.0048828125,
0.037261962890625,
0.002971649169921875,
0.0021038055419921875,
-0.0014896392822265625,
0.0003490447998046875,
0.023162841796875,
0.0144500732421875,
0.0018053054809570312,
-0.004741668701171875,
0.00220489501953125,
-0.0163421630859375,
0.0311431884765625,
-0.0015354156494140625,
0.0280609130859375,
-0.019439697265625,
0.10418701171875,
0.038177490234375,
0.0723876953125,
-0.01441192626953125,
-0.05255126953125,
-0.01837158203125,
0.007709503173828125,
-0.039031982421875,
0.016357421875,
0.005123138427734375,
-0.054107666015625,
-0.0017642974853515625,
0.032958984375,
-0.0089111328125,
-0.057373046875,
0.0209808349609375,
-0.070556640625,
0.0133819580078125,
0.010986328125
] |
2e4e03429d06dca8f24d9f3cfb24d9075c02fbe5
|
Wordpress Stackexchange
Q: How can I add title attributes to next and previous post link functions? For some reason a title attribute is not appended to next_post_link and prev_post_link calls in WordPress. How can I add one?
A: Update
As I deleted the Repo on GitHub, here's a new answer.
add_filter( 'previous_post_link', 'wpse13044_adjacent_post_link_tooltip', 10, 2 );
add_filter( 'next_post_link', 'wpse13044_adjacent_post_link_tooltip', 10, 2 );
function wpse13044_adjacent_post_link_tooltip( $format, $link )
{
$previous = 'previous_post_link' === current_filter();
// Get the next/previous post object
$post = get_adjacent_post(
false
,''
,$previous
);
// Copypasta from cores `get_adjacent_post_link()` fn
'' === $title = get_the_title( $post->ID );
AND $title = $previous
? sprint( __( 'Previous Post: %s', 'your_textdomain' ), $title )
: sprint( __( 'Next Post: %s', 'your_textdomain' ), $title );
$format = str_replace(
'rel="'
,sprintf(
'title="%s" rel="'
,$title
)
,$format
);
return "<span class='some classes'>{$format}</span>";
}
|
Q: How can I add title attributes to next and previous post link functions? For some reason a title attribute is not appended to next_post_link and prev_post_link calls in WordPress. How can I add one?
A: Update
As I deleted the Repo on GitHub, here's a new answer.
add_filter( 'previous_post_link', 'wpse13044_adjacent_post_link_tooltip', 10, 2 );
add_filter( 'next_post_link', 'wpse13044_adjacent_post_link_tooltip', 10, 2 );
function wpse13044_adjacent_post_link_tooltip( $format, $link )
{
$previous = 'previous_post_link' === current_filter();
// Get the next/previous post object
$post = get_adjacent_post(
false
,''
,$previous
);
// Copypasta from cores `get_adjacent_post_link()` fn
'' === $title = get_the_title( $post->ID );
AND $title = $previous
? sprint( __( 'Previous Post: %s', 'your_textdomain' ), $title )
: sprint( __( 'Next Post: %s', 'your_textdomain' ), $title );
$format = str_replace(
'rel="'
,sprintf(
'title="%s" rel="'
,$title
)
,$format
);
return "<span class='some classes'>{$format}</span>";
}
A: No need for functions and filters all you need to do is to use get_adjacent_post instead of next_post_link and prev_post_link, Note that get_adjacent_post is used to get previous and next post, you can read about it here
To get previous post and it's title attribute use this
$prev_post = get_adjacent_post(false, '', true);
if(!empty($prev_post)) {
echo '<a href="' . get_permalink($prev_post->ID) . '" title="' . $prev_post->post_title . '">' . $prev_post->post_title . '</a>'; }
To get next post and it's title attribute use this
$next_post = get_adjacent_post(false, '', false);
if(!empty($next_post)) {
echo '<a href="' . get_permalink($next_post->ID) . '" title="' . $next_post->post_title . '">' . $next_post->post_title . '</a>'; }
A: I'm trying to do this right now as well. The filter function seems like the best bet.
This is where I'm at now, but I can't seem to get the title of the next or previous post and pass it to the filter.
Edit: Figured it out. A bit hackey probably, but it works.
add_filter('next_post_link','add_title_to_next_post_link');
function add_title_to_next_post_link($link) {
global $post;
$post = get_post($post_id);
$next_post = get_next_post();
$title = $next_post->post_title;
$link = str_replace("rel=", " title='".$title."' rel", $link);
return $link;
}
add_filter('previous_post_link','add_title_to_previous_post_link');
function add_title_to_previous_post_link($link) {
global $post;
$post = get_post($post_id);
$previous_post = get_previous_post();
$title = $previous_post->post_title;
$link = str_replace("rel=", " title='".$title."' rel", $link);
return $link;
}
A: A bit old perhaps, and I wasn't really sure on how to make a comment on a reply...
In short, after looking for the same solution I've modified Picard102's suggestion just a tiny bit:
/**
* Filter previous_post_link and next_post_link
*/
function filter_next_post_link($link) {
global $post;
$post = get_post($post_id);
$next_post = get_next_post();
$title = $next_post->post_title;
$link = str_replace("rel=", 'title="' . $title . '" rel=', $link);
return $link;
}
add_filter('next_post_link', 'filter_next_post_link');
function filter_previous_post_link($link) {
global $post;
$post = get_post($post_id);
$previous_post = get_previous_post();
$title = $previous_post->post_title;
$link = str_replace("rel=", 'title="' . $title . '" rel=', $link);
return $link;
}
add_filter('previous_post_link', 'filter_previous_post_link');
A: Shortened the code a little.
/*
* Add "title=" to previous_post_link and next_post_link
*/
add_filter('next_post_link', function($link) {
$next_post = get_next_post();
$title = $next_post->post_title;
$link = str_replace('href=', 'title="'.$title.'" href=', $link);
return $link;
});
add_filter('previous_post_link', function($link) {
$previous_post = get_previous_post();
$title = $previous_post->post_title;
$link = str_replace('href=', 'title="'.$title.'" href=', $link);
return $link;
});
|
wordpress
|
{
"language": "en",
"length": 499,
"provenance": "stackexchange_00019.jsonl.gz:408072",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13044"
}
|
[
0.0733642578125,
-0.01290130615234375,
0.04510498046875,
-0.04534912109375,
0.01385498046875,
-0.016265869140625,
0.038116455078125,
-0.03326416015625,
-0.0028400421142578125,
0.032562255859375,
-0.010345458984375,
0.008514404296875,
0.007205963134765625,
-0.017120361328125,
-0.006046295166015625,
-0.0162200927734375,
0.01458740234375,
-0.02459716796875,
0.01459503173828125,
-0.0036830902099609375,
-0.01268768310546875,
-0.01293182373046875,
0.049468994140625,
0.01096343994140625,
0.0107574462890625,
-0.039031982421875,
0.08721923828125,
-0.0361328125,
0.032379150390625,
-0.013641357421875,
0.02362060546875,
-0.021881103515625,
0.0745849609375,
0.00576019287109375,
-0.04791259765625,
0.0236663818359375,
0.01548004150390625,
-0.0207977294921875,
-0.03082275390625,
0.0443115234375,
0.0012578964233398438,
0.0120391845703125,
0.040863037109375,
-0.02044677734375,
-0.0016508102416992188,
-0.010284423828125,
0.00708770751953125,
-0.0269927978515625,
-0.0011758804321289062,
-0.0005464553833007812,
0.036712646484375,
-0.0088958740234375,
0.039794921875,
-0.0103302001953125,
-0.01397705078125,
0.0017652511596679688,
-0.0282745361328125,
0.00261688232421875,
0.014312744140625,
0.00946807861328125,
-0.00743865966796875,
-0.00431060791015625,
0.0018892288208007812,
-0.0218353271484375,
-0.0069732666015625,
0.0035457611083984375,
0.046142578125,
0.0178680419921875,
-0.00475311279296875,
-0.02264404296875,
0.0005960464477539062,
-0.0006952285766601562,
-0.0006265640258789062,
-0.022552490234375,
0.0217742919921875,
-0.0078887939453125,
-0.006114959716796875,
-0.0390625,
0.0074920654296875,
0.0263519287109375,
-0.0269927978515625,
-0.01290130615234375,
0.003589630126953125,
-0.030059814453125,
0.011871337890625,
-0.010467529296875,
-0.029083251953125,
0.0018100738525390625,
-0.03582763671875,
-0.01947021484375,
-0.0279388427734375,
-0.047637939453125,
-0.01038360595703125,
-0.01122283935546875,
0.0086517333984375,
-0.04095458984375,
0.02874755859375,
0.048431396484375,
-0.0199737548828125,
0.004009246826171875,
-0.005199432373046875,
-0.0222320556640625,
-0.003086090087890625,
-0.034088134765625,
0.0095672607421875,
0.0254058837890625,
-0.0289306640625,
-0.0123138427734375,
0.01812744140625,
0.02117919921875,
-0.01519012451171875,
-0.0181732177734375,
0.016845703125,
0.002254486083984375,
-0.04132080078125,
0.01436614990234375,
-0.011322021484375,
-0.00399017333984375,
0.005649566650390625,
0.01023101806640625,
-0.0252532958984375,
-0.007419586181640625,
-0.00536346435546875,
-0.03363037109375,
0.046844482421875,
0.0183563232421875,
-0.0037403106689453125,
-0.005176544189453125,
0.0174102783203125,
0.0280914306640625,
-0.00027251243591308594,
0.005825042724609375,
0.004848480224609375,
-0.00821685791015625,
-0.029388427734375,
-0.019287109375,
-0.0205841064453125,
-0.034149169921875,
-0.03997802734375,
0.018646240234375,
-0.0189361572265625,
-0.016937255859375,
0.019927978515625,
-0.03173828125,
0.01123809814453125,
0.0205535888671875,
-0.01258087158203125,
0.0032196044921875,
0.01427459716796875,
-0.052276611328125,
0.06219482421875,
-0.0721435546875,
0.023345947265625,
-0.004673004150390625,
-0.059326171875,
-0.03497314453125,
-0.03448486328125,
-0.0191802978515625,
0.0200347900390625,
-0.033966064453125,
0.01317596435546875,
-0.01512908935546875,
-0.010589599609375,
-0.0665283203125,
-0.08807373046875,
0.012786865234375,
-0.0550537109375,
-0.00992584228515625,
0.02618408203125,
0.06097412109375,
0.031768798828125,
-0.00453948974609375,
0.04541015625,
0.00936126708984375,
-0.0242767333984375,
-0.0243682861328125,
-0.01309967041015625,
-0.005435943603515625,
0.0166778564453125,
0.02593994140625,
-0.01251220703125,
-0.02734375,
0.0537109375,
-0.0209503173828125,
-0.0214080810546875,
-0.020965576171875,
0.015716552734375,
0.06671142578125,
0.006061553955078125,
0.04473876953125,
-0.0203399658203125,
-0.03509521484375,
-0.02801513671875,
-0.0259552001953125,
-0.02532958984375,
-0.0226593017578125,
0.0498046875,
0.0096435546875,
-0.0091094970703125,
0.04119873046875,
-0.003932952880859375,
0.020416259765625,
0.0008330345153808594,
0.0177154541015625,
-0.0202178955078125,
0.0060272216796875,
-0.005558013916015625,
0.039337158203125,
-0.056884765625,
-0.0223236083984375,
0.04290771484375,
-0.032989501953125,
-0.0234527587890625,
-0.01226806640625,
-0.005523681640625,
0.01373291015625,
-0.004730224609375,
-0.033905029296875,
0.00035190582275390625,
-0.0310516357421875,
0.01702880859375,
0.0197296142578125,
0.0016918182373046875,
0.0219879150390625,
0.0263214111328125,
-0.026641845703125,
-0.0157012939453125,
-0.0221405029296875,
-0.004856109619140625,
0.0015497207641601562,
-0.038177490234375,
0.05035400390625,
0.032958984375,
0.029266357421875,
-0.021759033203125,
0.003448486328125,
-0.017425537109375,
-0.041290283203125,
0.005771636962890625,
0.047393798828125,
0.042694091796875,
0.04278564453125,
0.0141754150390625,
0.0049591064453125,
0.02593994140625,
-0.02056884765625,
0.040679931640625,
-0.043914794921875,
-0.008453369140625,
0.034759521484375,
-0.006317138671875,
0.015838623046875,
0.0175323486328125,
0.0032520294189453125,
-0.0023021697998046875,
0.046875,
0.0032520294189453125,
0.00945281982421875,
-0.0169830322265625,
-0.0099639892578125,
0.013946533203125,
-0.0299224853515625,
-0.035308837890625,
-0.006153106689453125,
0.030548095703125,
0.027313232421875,
0.037445068359375,
0.0174560546875,
-0.0362548828125,
0.020416259765625,
0.007965087890625,
-0.015625,
0.0070343017578125,
-0.0136260986328125,
-0.0088958740234375,
-0.0009908676147460938,
0.00504302978515625,
0.0004527568817138672,
-0.0028514862060546875,
-0.0229034423828125,
-0.00732421875,
0.0124664306640625,
-0.002346038818359375,
-0.0151519775390625,
0.0057525634765625,
-0.08111572265625,
0.0120391845703125,
0.007598876953125,
0.0133514404296875,
-0.005718231201171875,
0.00266265869140625,
0.03594970703125,
-0.0269775390625,
0.06683349609375,
0.0021572113037109375,
-0.01560211181640625,
-0.07421875,
-0.03399658203125,
0.039276123046875,
-0.053985595703125,
-0.005573272705078125,
0.05078125,
0.007320404052734375,
-0.0183563232421875,
-0.017578125,
0.0069732666015625,
-0.0092315673828125,
-0.01030731201171875,
-0.02984619140625,
-0.040069580078125,
-0.047943115234375,
-0.0226898193359375,
0.0139617919921875,
0.059234619140625,
-0.0242462158203125,
-0.06573486328125,
0.0031147003173828125,
0.0227813720703125,
-0.0743408203125,
-0.037933349609375,
0.041839599609375,
-0.06982421875,
-0.003665924072265625,
0.04473876953125,
-0.05419921875,
-0.0176239013671875,
0.09954833984375,
-0.0008091926574707031,
0.00016319751739501953,
-0.04705810546875,
-0.041534423828125,
-0.06585693359375,
-0.0618896484375,
-0.033935546875,
-0.003070831298828125,
-0.006557464599609375,
0.0030765533447265625,
0.025604248046875,
0.00983428955078125,
0.006504058837890625,
0.037078857421875,
-0.00998687744140625,
-0.00582122802734375,
-0.0143890380859375,
0.0124359130859375,
0.0138397216796875,
0.0014677047729492188,
0.0084075927734375,
0.03912353515625,
0.040557861328125,
-0.04864501953125,
0.008453369140625,
-0.01031494140625,
0.0307159423828125,
0.019500732421875,
0.005725860595703125,
0.0138092041015625,
0.051971435546875,
0.032684326171875,
-0.00045990943908691406,
-0.03607177734375,
-0.0020427703857421875,
-0.058074951171875,
-0.000039517879486083984,
0.0316162109375,
-0.0084075927734375,
-0.0045013427734375,
0.0131378173828125,
-0.047637939453125,
0.004459381103515625,
0.014678955078125,
-0.012969970703125,
0.005809783935546875,
-0.0282440185546875,
-0.05731201171875,
0.007038116455078125,
0.00986480712890625,
-0.0009722709655761719,
0.02374267578125,
0.00231170654296875,
0.035552978515625,
0.0084075927734375,
-0.006687164306640625,
-0.047119140625,
-0.042449951171875,
0.033355712890625,
-0.060821533203125,
0.034637451171875,
-0.0606689453125,
-0.0191650390625,
-0.0173187255859375,
0.07861328125,
-0.10858154296875,
-0.024139404296875,
0.01306915283203125,
0.041717529296875,
0.003604888916015625,
-0.0673828125,
-0.01027679443359375,
-0.027618408203125,
-0.08172607421875,
0.007419586181640625,
-0.01373291015625,
-0.01171875,
-0.01517486572265625,
0.07806396484375,
-0.0278778076171875,
-0.0267333984375,
0.00980377197265625,
0.0132904052734375,
-0.0175018310546875,
0.040802001953125,
-0.04290771484375,
0.040679931640625,
-0.0204315185546875,
0.0013608932495117188,
-0.0833740234375,
-0.0166778564453125,
-0.015838623046875,
0.08013916015625,
0.01427459716796875,
-0.029144287109375,
-0.044158935546875,
0.0178070068359375,
0.0075531005859375,
-0.05120849609375,
0.02581787109375,
0.000827789306640625,
0.0251312255859375,
0.01052093505859375,
-0.0157928466796875,
-0.026763916015625,
0.01080322265625,
-0.017608642578125,
-0.035888671875,
0.029022216796875,
-0.03399658203125,
0.0252838134765625,
-0.0193634033203125,
-0.0281219482421875,
-0.01222991943359375,
-0.007633209228515625,
0.045867919921875,
0.053619384765625,
-0.02099609375,
0.0341796875,
-0.0260467529296875,
-0.0263519287109375,
0.0455322265625,
0.02398681640625,
-0.042633056640625,
-0.01059722900390625,
0.006549835205078125,
0.02703857421875,
-0.04400634765625,
0.035186767578125,
0.00020635128021240234,
0.024688720703125,
-0.0122833251953125,
0.0219573974609375,
-0.00978851318359375,
-0.0245208740234375,
0.049072265625,
-0.022796630859375,
0.026702880859375,
-0.039031982421875,
0.002208709716796875,
0.0089569091796875,
-0.0229034423828125,
0.026519775390625,
0.01824951171875,
0.0185089111328125,
-0.0165863037109375,
-0.0090789794921875,
-0.03594970703125,
0.00756072998046875,
0.04248046875,
0.0009341239929199219,
0.06243896484375,
-0.0018396377563476562,
-0.01042938232421875,
-0.004215240478515625,
0.04376220703125,
0.004245758056640625,
0.0294036865234375,
-0.00479888916015625,
-0.0163421630859375,
-0.0167236328125,
-0.0220489501953125,
-0.0203399658203125,
0.00128173828125,
0.0160675048828125,
0.039581298828125,
-0.046722412109375,
-0.00437164306640625,
-0.027984619140625,
-0.00209808349609375,
0.080322265625,
0.0206756591796875,
-0.0181732177734375,
-0.02728271484375,
-0.0175018310546875,
-0.0034027099609375,
-0.0367431640625,
-0.001323699951171875,
0.0012006759643554688,
0.03350830078125,
-0.0028743743896484375,
0.0226898193359375,
-0.0009684562683105469,
0.021728515625,
-0.0101165771484375,
0.020355224609375,
0.00855255126953125,
0.00792694091796875,
0.0020503997802734375,
0.0924072265625,
0.0014638900756835938,
0.048675537109375,
-0.03753662109375,
0.0108795166015625,
0.0213470458984375,
0.01290130615234375,
0.03863525390625,
-0.0275726318359375,
0.0022983551025390625,
0.009613037109375,
0.018096923828125,
-0.0298614501953125,
0.015869140625,
0.042449951171875,
0.03582763671875,
0.032379150390625,
-0.01666259765625,
0.0110626220703125,
-0.02685546875,
-0.021209716796875,
0.0198211669921875,
0.07745361328125,
-0.0345458984375,
0.0213623046875,
0.056976318359375,
-0.0033721923828125,
0.0098876953125,
-0.01207733154296875,
0.012054443359375,
-0.0186309814453125,
0.0219573974609375,
-0.01873779296875,
-0.0025806427001953125,
-0.006195068359375,
-0.0203857421875,
-0.00555419921875,
-0.0082550048828125,
0.013458251953125,
0.016021728515625,
0.0015020370483398438,
-0.0251312255859375,
-0.0360107421875,
0.0208282470703125,
-0.0218505859375,
0.03765869140625,
-0.058685302734375,
0.0213775634765625,
-0.07611083984375,
-0.01123809814453125,
0.060791015625,
0.038909912109375,
-0.042694091796875,
0.017608642578125,
-0.055755615234375,
-0.01201629638671875,
-0.022979736328125,
-0.06292724609375,
-0.03155517578125,
-0.025909423828125,
0.004825592041015625,
0.039154052734375,
-0.0172271728515625,
0.0081787109375,
0.0165252685546875,
0.022247314453125,
-0.027252197265625,
0.0902099609375,
-0.0044097900390625,
0.1016845703125,
-0.0008492469787597656,
0.0635986328125,
0.0223541259765625,
0.033721923828125,
-0.056610107421875,
-0.00902557373046875,
0.0219573974609375,
-0.053375244140625,
-0.0489501953125,
-0.01026153564453125,
-0.053131103515625,
0.04473876953125,
0.068603515625,
-0.01317596435546875,
0.016387939453125,
0.009429931640625,
0.0100250244140625,
-0.01476287841796875,
-0.0226287841796875,
0.016448974609375,
-0.01007080078125,
0.055816650390625,
-0.0129241943359375,
0.05279541015625,
-0.00891876220703125,
0.01500701904296875,
-0.0261383056640625,
-0.0184783935546875,
-0.01230621337890625,
0.0382080078125,
-0.03033447265625,
-0.01157379150390625,
0.043060302734375,
0.0187225341796875,
0.032196044921875,
0.0010519027709960938,
0.018524169921875,
0.045745849609375,
-0.029296875,
0.04296875,
0.046844482421875,
0.083251953125,
-0.013336181640625,
-0.0203704833984375,
0.041900634765625,
-0.057037353515625,
0.0101318359375,
-0.032379150390625,
-0.00040602684020996094,
0.02191162109375,
0.00691986083984375,
-0.0245208740234375,
-0.018585205078125,
0.07415771484375,
0.009002685546875,
0.0401611328125,
0.022003173828125,
0.0159912109375,
0.01220703125,
0.01114654541015625,
0.01055908203125,
0.004238128662109375,
-0.007167816162109375,
-0.0258636474609375,
-0.01265716552734375,
-0.0006833076477050781,
-0.020355224609375,
-0.0139312744140625,
-0.0077056884765625,
-0.01517486572265625,
-0.030792236328125,
0.0001723766326904297,
0.00955963134765625,
-0.0212554931640625,
-0.071044921875,
0.0078277587890625,
0.0048065185546875,
0.0010747909545898438,
0.008087158203125,
0.01360321044921875,
0.05364990234375,
0.014404296875,
0.027130126953125,
-0.0278778076171875,
-0.011199951171875,
0.008392333984375,
0.016571044921875,
-0.033355712890625,
-0.0007524490356445312,
0.052581787109375,
0.01340484619140625,
0.0298309326171875,
0.0243988037109375,
-0.031005859375,
-0.00899505615234375,
0.009521484375,
0.07086181640625,
0.01415252685546875,
-0.03857421875,
0.03936767578125,
-0.018341064453125,
-0.023345947265625,
-0.0255126953125,
0.02191162109375,
-0.0467529296875,
-0.01454925537109375,
-0.0308685302734375,
-0.034698486328125,
0.0009322166442871094,
-0.05548095703125,
-0.09228515625,
0.08837890625,
0.0279693603515625,
0.057769775390625,
-0.0029201507568359375,
0.0171356201171875,
-0.037994384765625,
-0.01236724853515625,
-0.004791259765625,
0.028961181640625,
-0.02978515625,
0.01479339599609375,
-0.0287017822265625,
-0.02197265625,
0.0206451416015625,
0.08233642578125,
0.049530029296875,
0.0197601318359375,
-0.01467132568359375,
-0.0250396728515625,
0.0396728515625,
0.030609130859375,
-0.01739501953125,
0.0214996337890625,
-0.01055145263671875,
0.0224456787109375,
0.0090789794921875,
-0.0294952392578125,
0.0325927734375,
-0.01568603515625,
-0.02215576171875,
0.026336669921875,
0.0267486572265625,
0.02545166015625,
0.0196075439453125,
-0.0279998779296875,
-0.02880859375,
0.0216064453125,
0.0116729736328125,
0.00970458984375,
-0.0130462646484375,
0.0404052734375,
-0.00696563720703125,
-0.01168060302734375,
-0.0335693359375,
-0.02447509765625,
0.0220184326171875,
0.00695037841796875,
0.0174407958984375,
0.033782958984375,
0.01190948486328125,
0.056732177734375,
0.00313568115234375,
0.006404876708984375,
0.0069580078125,
0.035308837890625,
0.0596923828125,
0.0046234130859375,
0.0290985107421875,
-0.0628662109375,
0.00312042236328125,
0.06817626953125,
0.08575439453125,
-0.049102783203125,
0.0271148681640625,
0.0131988525390625,
0.0000022649765014648438,
-0.00948333740234375,
-0.0426025390625,
0.01416015625,
-0.0275726318359375,
-0.028961181640625,
-0.03021240234375,
-0.01141357421875,
0.03277587890625,
0.04278564453125,
0.01137542724609375,
0.01206207275390625,
-0.046112060546875,
-0.051116943359375,
-0.035369873046875,
-0.0174102783203125,
0.036285400390625,
0.07940673828125,
0.00860595703125,
0.0772705078125,
-0.025634765625,
-0.024078369140625,
0.036041259765625,
0.004947662353515625,
-0.0133056640625,
-0.0467529296875,
0.030670166015625,
-0.04156494140625,
-0.036224365234375,
-0.0027866363525390625,
0.07427978515625,
0.04425048828125,
0.042266845703125,
-0.01212310791015625,
-0.01169586181640625,
0.032958984375,
-0.0251007080078125,
-0.03204345703125,
0.01397705078125,
-0.03179931640625,
0.0254974365234375,
0.01849365234375,
-0.01149749755859375,
-0.00937652587890625,
-0.0030059814453125,
0.037841796875,
-0.04144287109375,
0.0399169921875,
-0.00879669189453125,
-0.00826263427734375,
0.048126220703125,
0.013916015625,
0.0283966064453125,
-0.0023860931396484375,
-0.052276611328125,
0.01104736328125,
-0.03521728515625,
-0.0650634765625,
0.0062713623046875,
0.037841796875,
-0.03131103515625,
0.007419586181640625,
-0.00046062469482421875,
-0.0153350830078125,
-0.00345611572265625,
0.00809478759765625,
0.024871826171875,
0.041412353515625,
0.00270843505859375,
0.01800537109375,
0.00112152099609375,
0.0016231536865234375,
0.0173187255859375,
0.0391845703125,
0.05078125,
-0.0144195556640625,
-0.0026035308837890625,
0.038909912109375,
0.00582122802734375,
0.0438232421875,
-0.02886962890625,
-0.032470703125,
0.0518798828125,
0.0080108642578125,
0.0360107421875,
-0.0138092041015625,
-0.0236053466796875,
0.01062774658203125,
0.0247955322265625,
-0.0271759033203125,
0.027099609375,
-0.045654296875,
0.0203399658203125,
-0.02886962890625,
0.035736083984375,
-0.020263671875,
-0.00005251169204711914,
-0.041900634765625,
-0.0316162109375,
0.039398193359375,
0.0011568069458007812,
-0.0191802978515625,
0.01611328125,
0.0538330078125,
0.021331787109375,
0.030242919921875,
0.0191192626953125,
0.05322265625,
0.0213165283203125,
-0.03387451171875,
0.015167236328125,
0.0304107666015625,
-0.01294708251953125,
0.029022216796875,
0.017425537109375,
0.0153961181640625,
0.015838623046875,
-0.030181884765625,
0.008392333984375,
0.005100250244140625,
0.065185546875,
0.0048980712890625,
0.045257568359375,
-0.0193023681640625,
0.022216796875,
-0.0205535888671875,
-0.04168701171875,
-0.0257415771484375,
-0.06005859375,
-0.007236480712890625,
0.038299560546875,
-0.03326416015625,
-0.013824462890625,
-0.06396484375,
-0.01552581787109375,
0.0233154296875,
0.0201263427734375,
-0.0309906005859375,
-0.001598358154296875,
0.0049896240234375,
0.01282501220703125,
0.0009937286376953125,
-0.0203704833984375,
-0.0035228729248046875,
0.033203125,
-0.00665283203125,
-0.04425048828125,
-0.054840087890625,
0.03717041015625,
-0.0692138671875,
0.014739990234375,
0.02886962890625,
-0.01300811767578125,
-0.005687713623046875,
0.002178192138671875,
0.0206756591796875,
0.043060302734375,
-0.0190582275390625,
-0.01654052734375,
0.00592041015625,
0.00016188621520996094,
-0.024200439453125,
-0.076904296875,
0.016021728515625,
-0.10198974609375,
-0.03497314453125,
0.004962921142578125,
-0.0279083251953125,
-0.0188446044921875,
-0.04901123046875,
-0.07305908203125,
0.031829833984375,
-0.0007033348083496094,
-0.043792724609375,
-0.033599853515625,
-0.00402069091796875,
-0.0016117095947265625,
-0.0065460205078125,
-0.00670623779296875,
-0.02496337890625,
-0.0275726318359375,
0.029510498046875,
0.01345062255859375,
0.0347900390625,
0.00606536865234375,
-0.00787353515625,
-0.034393310546875,
0.01044464111328125,
-0.0038890838623046875,
0.0024204254150390625,
0.0007982254028320312,
-0.0028553009033203125,
-0.007785797119140625,
-0.003360748291015625,
-0.058074951171875,
-0.01352691650390625,
-0.020660400390625,
0.035430908203125,
-0.0029544830322265625,
-0.01248931884765625,
-0.0235137939453125,
-0.004985809326171875,
0.057220458984375,
0.040252685546875,
0.00789642333984375,
-0.0308685302734375,
0.0162811279296875,
0.0200347900390625,
-0.06524658203125,
0.01241302490234375,
0.0264129638671875,
-0.033447265625,
-0.0256195068359375,
-0.0113067626953125,
0.01885986328125,
-0.0149383544921875,
-0.0258026123046875,
-0.0238037109375,
-0.0225067138671875,
-0.013397216796875,
0.027923583984375,
-0.0518798828125,
0.045989990234375,
0.08563232421875,
-0.06475830078125,
0.0032405853271484375,
0.0163726806640625,
-0.0166015625,
0.0404052734375,
-0.0401611328125,
0.0013141632080078125,
0.0044097900390625,
-0.0269927978515625,
-0.0023403167724609375,
0.01409149169921875,
0.0260772705078125,
-0.00965118408203125,
-0.028900146484375,
-0.0192108154296875,
0.00897979736328125,
0.0100250244140625,
-0.0105438232421875,
-0.044891357421875,
0.03192138671875,
0.0012388229370117188,
0.07269287109375,
-0.01947021484375,
0.060638427734375,
0.0259246826171875,
0.00791168212890625,
-0.031463623046875,
0.0016994476318359375,
0.01091766357421875,
-0.0215911865234375,
0.01375579833984375,
0.0124664306640625,
0.0108795166015625,
-0.033050537109375,
0.0256195068359375,
0.045867919921875,
0.013671875,
0.0161590576171875
] |
5a6eef3538e93312e304de3339bb9f1f0afbde56
|
Wordpress Stackexchange
Q: How do I "fix" a wp-blog-header.php error message? I recently updated a site and received the following error message:
Fatal error: Call to undefined function wp() in /home/atlmp/public_html/wp-blog-header.php on line 14
I checked the file and there doesn't seem to be any issues, so I can't figure out what's wrong?
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( !isset($wp_did_header) ) {
$wp_did_header = true;
require_once( dirname(__FILE__) . '/wp-load.php' );
wp();
require_once( ABSPATH . WPINC . '/template-loader.php' );
}
?>
Any help would be greatly appreciated.
A: No need to go here and there. I was facing the same issue and here is the only solution Fix wp-blog-header.php error
|
Q: How do I "fix" a wp-blog-header.php error message? I recently updated a site and received the following error message:
Fatal error: Call to undefined function wp() in /home/atlmp/public_html/wp-blog-header.php on line 14
I checked the file and there doesn't seem to be any issues, so I can't figure out what's wrong?
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( !isset($wp_did_header) ) {
$wp_did_header = true;
require_once( dirname(__FILE__) . '/wp-load.php' );
wp();
require_once( ABSPATH . WPINC . '/template-loader.php' );
}
?>
Any help would be greatly appreciated.
A: No need to go here and there. I was facing the same issue and here is the only solution Fix wp-blog-header.php error
A: To load WordPress it is enough to load "wp-load.php" like you did. I don't recognize the wp() function and haven't found it in the source. As other people seem to have the same problem on the internet I guess it has to do with a plugin or a possibly outdated WordPress installation.
Disable all your plugins and see if that resolves the problem.
Out of curiosity: What is this file for?
A: I agree. Usually it's a plugin that causes these issues in my experience. it can be a headache, but disabling all of your plugins, then going through and enabling your plugins one by one will often pinpoint the problem.
A: I was facing this error when moving my site files from hostgator to other host, what I did was ZIP the files and FTP them to the new host. something messed up with compressing the files, when I compressed them with tar.gz everything worked fine. that's what helped me after several hours,
probably something with the encoding of files.
A: There is some WordPress issue.
you please update your wp_load.php and using this code.
<!-- start -->
<?php
/**
* Bootstrap file for setting the ABSPATH constant
* and loading the wp-config.php file. The wp-config.php
* file will then load the wp-settings.php file, which
* will then set up the WordPress environment.
*
* If the wp-config.php file is not found then an error
* will be displayed asking the visitor to set up the
* wp-config.php file.
*
* Will also search for wp-config.php in WordPress' parent
* directory to allow the WordPress directory to remain
* untouched.
*
* @package WordPress
*/
/** Define ABSPATH as this file's directory */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', dirname( __FILE__ ) . '/' );
}
error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
/*
* If wp-config.php exists in the WordPress root, or if it exists in the root and wp-settings.php
* doesn't, load wp-config.php. The secondary check for wp-settings.php has the added benefit
* of avoiding cases where the current directory is a nested installation, e.g. / is WordPress(a)
* and /blog/ is WordPress(b).
*
* If neither set of conditions is true, initiate loading the setup process.
*/
if ( file_exists( ABSPATH . 'wp-config.php' ) ) {
/** The config file resides in ABSPATH */
require_once( ABSPATH . 'wp-config.php' );
} elseif ( @file_exists( dirname( ABSPATH ) . '/wp-config.php' ) && ! @file_exists( dirname( ABSPATH ) . '/wp-settings.php' ) ) {
/** The config file resides one level above ABSPATH but is not part of another installation */
require_once( dirname( ABSPATH ) . '/wp-config.php' );
} else {
// A config file doesn't exist
define( 'WPINC', 'wp-includes' );
require_once( ABSPATH . WPINC . '/load.php' );
// Standardize $_SERVER variables across setups.
wp_fix_server_vars();
require_once( ABSPATH . WPINC . '/functions.php' );
$path = wp_guess_url() . '/wp-admin/setup-config.php';
/*
* We're going to redirect to setup-config.php. While this shouldn't result
* in an infinite loop, that's a silly thing to assume, don't you think? If
* we're traveling in circles, our last-ditch effort is "Need more help?"
*/
if ( false === strpos( $_SERVER['REQUEST_URI'], 'setup-config' ) ) {
header( 'Location: ' . $path );
exit;
}
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
require_once( ABSPATH . WPINC . '/version.php' );
wp_check_php_mysql_versions();
wp_load_translations_early();
// Die with an error message
$die = sprintf(
/* translators: %s: wp-config.php */
__( "There doesn't seem to be a %s file. I need this before we can get started." ),
'<code>wp-config.php</code>'
) . '</p>';
$die .= '<p>' . sprintf(
/* translators: %s: Documentation URL. */
__( "Need more help? <a href='%s'>We got it</a>." ),
__( 'https://wordpress.org/support/article/editing-wp-config-php/' )
) . '</p>';
$die .= '<p>' . sprintf(
/* translators: %s: wp-config.php */
__( "You can create a %s file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file." ),
'<code>wp-config.php</code>'
) . '</p>';
$die .= '<p><a href="' . $path . '" class="button button-large">' . __( 'Create a Configuration File' ) . '</a>';
wp_die( $die, __( 'WordPress › Error' ) );
}
<!-- end -->
and please change file permission 644 to 444.
|
wordpress
|
{
"language": "en",
"length": 828,
"provenance": "stackexchange_00019.jsonl.gz:408080",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13069"
}
|
[
0.01776123046875,
-0.0237274169921875,
-0.00498199462890625,
-0.004077911376953125,
-0.00678253173828125,
-0.0208892822265625,
0.033966064453125,
-0.02593994140625,
0.0278778076171875,
0.0090789794921875,
-0.05010986328125,
-0.00024271011352539062,
-0.022216796875,
0.00791168212890625,
-0.00919342041015625,
-0.049407958984375,
0.03228759765625,
-0.0190582275390625,
0.0677490234375,
0.018218994140625,
0.007472991943359375,
0.039276123046875,
0.045654296875,
-0.00640869140625,
-0.03564453125,
0.015472412109375,
0.1083984375,
-0.033416748046875,
-0.028289794921875,
-0.045135498046875,
-0.003299713134765625,
0.0293731689453125,
0.0223388671875,
0.0254364013671875,
-0.04656982421875,
-0.0185546875,
-0.0059051513671875,
0.0031909942626953125,
-0.0160064697265625,
0.054931640625,
-0.01129150390625,
0.00957489013671875,
0.0083770751953125,
0.051025390625,
-0.0247650146484375,
-0.0274658203125,
-0.03240966796875,
-0.0445556640625,
-0.005718231201171875,
-0.00289154052734375,
0.0104217529296875,
0.0118560791015625,
0.02593994140625,
-0.00762939453125,
-0.01470947265625,
-0.03631591796875,
0.02935791015625,
0.031982421875,
0.013153076171875,
-0.0259857177734375,
-0.036407470703125,
0.039398193359375,
0.022705078125,
-0.0076141357421875,
-0.031707763671875,
0.0129241943359375,
0.000904083251953125,
0.0033512115478515625,
-0.03607177734375,
-0.01110076904296875,
0.0284423828125,
-0.033233642578125,
-0.01438140869140625,
0.0467529296875,
0.007640838623046875,
-0.06451416015625,
0.02301025390625,
-0.015838623046875,
0.0207672119140625,
0.055908203125,
0.0338134765625,
0.0005545616149902344,
-0.007488250732421875,
-0.0010814666748046875,
0.0206146240234375,
0.0303497314453125,
-0.007183074951171875,
-0.0265655517578125,
-0.03167724609375,
-0.020538330078125,
-0.0243988037109375,
-0.01503753662109375,
-0.058685302734375,
0.017364501953125,
-0.0017719268798828125,
-0.0203704833984375,
-0.0038509368896484375,
0.04327392578125,
-0.042266845703125,
0.01430511474609375,
-0.0005168914794921875,
-0.0182952880859375,
0.031524658203125,
-0.041656494140625,
-0.0084991455078125,
0.0220794677734375,
-0.01163482666015625,
0.0172119140625,
0.0156707763671875,
0.042236328125,
-0.0007710456848144531,
-0.03240966796875,
-0.0136566162109375,
-0.05859375,
-0.0004968643188476562,
0.036956787109375,
-0.02337646484375,
0.02203369140625,
0.039337158203125,
0.011138916015625,
-0.007038116455078125,
0.0234375,
-0.0209808349609375,
0.006641387939453125,
-0.002033233642578125,
-0.0095367431640625,
0.0113677978515625,
-0.0134124755859375,
0.00078582763671875,
-0.00740814208984375,
-0.0323486328125,
0.0255279541015625,
0.033416748046875,
0.00533294677734375,
-0.0163116455078125,
-0.0220794677734375,
0.0460205078125,
0.0274200439453125,
0.0032100677490234375,
0.0190887451171875,
0.02032470703125,
-0.031097412109375,
-0.0511474609375,
0.00424957275390625,
0.0299224853515625,
-0.01324462890625,
0.0261383056640625,
0.044036865234375,
0.0141754150390625,
-0.00969696044921875,
0.0169830322265625,
0.031585693359375,
0.023529052734375,
0.0176849365234375,
0.00682830810546875,
-0.0263671875,
0.0341796875,
-0.04534912109375,
-0.0082855224609375,
-0.043670654296875,
0.0009021759033203125,
-0.017852783203125,
0.011962890625,
-0.043701171875,
-0.066162109375,
0.01226043701171875,
-0.02679443359375,
-0.01898193359375,
0.0287017822265625,
-0.046844482421875,
-0.0010080337524414062,
-0.003986358642578125,
0.01049041748046875,
-0.0021305084228515625,
0.0105133056640625,
0.031585693359375,
-0.00864410400390625,
0.0231170654296875,
0.00113677978515625,
0.0440673828125,
0.013031005859375,
-0.034454345703125,
0.00223541259765625,
0.017120361328125,
-0.05731201171875,
0.032470703125,
0.001232147216796875,
0.037689208984375,
0.0037250518798828125,
0.0096435546875,
0.028533935546875,
0.0303192138671875,
-0.00502777099609375,
0.0254058837890625,
-0.037139892578125,
-0.053497314453125,
0.001186370849609375,
0.007965087890625,
-0.03387451171875,
0.0301055908203125,
-0.0071563720703125,
0.0264739990234375,
-0.038360595703125,
0.00872802734375,
-0.06475830078125,
0.0151824951171875,
-0.01216888427734375,
0.0440673828125,
-0.0030231475830078125,
0.001312255859375,
0.01342010498046875,
-0.032073974609375,
0.005626678466796875,
-0.025054931640625,
-0.0343017578125,
-0.0029125213623046875,
-0.0396728515625,
0.04803466796875,
-0.0262908935546875,
0.057952880859375,
-0.043609619140625,
-0.046661376953125,
-0.0408935546875,
-0.02655029296875,
0.03631591796875,
-0.0084228515625,
-0.02105712890625,
-0.018218994140625,
0.00379180908203125,
0.0207366943359375,
-0.04351806640625,
0.0238494873046875,
-0.0134735107421875,
0.041290283203125,
-0.01557159423828125,
-0.0251922607421875,
-0.0179595947265625,
-0.031707763671875,
0.0350341796875,
0.036376953125,
0.03631591796875,
0.033599853515625,
0.0156707763671875,
0.0181121826171875,
0.04205322265625,
-0.0286865234375,
0.028656005859375,
-0.01485443115234375,
0.011932373046875,
-0.01641845703125,
0.0308685302734375,
-0.0374755859375,
0.0379638671875,
-0.0224761962890625,
0.01861572265625,
0.03533935546875,
0.01070404052734375,
0.0007944107055664062,
-0.003261566162109375,
0.002712249755859375,
0.002674102783203125,
-0.059417724609375,
-0.041412353515625,
-0.0247802734375,
0.03814697265625,
-0.0128326416015625,
0.0191802978515625,
0.0059661865234375,
-0.016876220703125,
-0.0035266876220703125,
0.020599365234375,
-0.034942626953125,
0.00978851318359375,
0.038330078125,
0.00787353515625,
0.0609130859375,
-0.04498291015625,
-0.006488800048828125,
0.02508544921875,
0.041290283203125,
-0.001964569091796875,
0.0455322265625,
-0.007312774658203125,
-0.00778961181640625,
-0.020782470703125,
-0.021575927734375,
0.0143280029296875,
0.02801513671875,
0.0012836456298828125,
-0.0030918121337890625,
0.0261688232421875,
0.01702880859375,
-0.035491943359375,
0.03857421875,
0.01480865478515625,
-0.0166168212890625,
0.0220489501953125,
-0.03839111328125,
0.042510986328125,
-0.01421356201171875,
0.060546875,
0.0672607421875,
-0.0179290771484375,
0.027191162109375,
0.004138946533203125,
0.0160980224609375,
0.03961181640625,
0.004199981689453125,
0.0180816650390625,
-0.01041412353515625,
-0.0077362060546875,
0.02154541015625,
0.014434814453125,
0.0853271484375,
-0.0234527587890625,
-0.05377197265625,
-0.00555419921875,
0.02069091796875,
-0.06268310546875,
-0.097900390625,
-0.0170440673828125,
-0.0517578125,
0.0244140625,
-0.02227783203125,
-0.016265869140625,
-0.01438140869140625,
0.0003306865692138672,
0.0030422210693359375,
0.042205810546875,
-0.032684326171875,
-0.070068359375,
-0.054656982421875,
-0.11248779296875,
-0.048004150390625,
-0.004085540771484375,
0.018280029296875,
-0.005245208740234375,
-0.001049041748046875,
-0.003124237060546875,
-0.00977325439453125,
0.0035877227783203125,
0.003505706787109375,
0.00638580322265625,
-0.0224456787109375,
-0.0101470947265625,
-0.0155487060546875,
0.002948760986328125,
0.0005931854248046875,
-0.00954437255859375,
0.00522613525390625,
0.01071929931640625,
-0.036651611328125,
-0.0389404296875,
-0.057159423828125,
-0.02935791015625,
0.0279998779296875,
0.047607421875,
-0.1025390625,
-0.04388427734375,
-0.10845947265625,
-0.0185394287109375,
-0.0095672607421875,
-0.04107666015625,
0.0246429443359375,
0.0430908203125,
-0.031585693359375,
-0.0220184326171875,
-0.0022068023681640625,
-0.0119171142578125,
-0.01003265380859375,
-0.005584716796875,
-0.043853759765625,
0.06695556640625,
0.021942138671875,
0.0269927978515625,
0.01247406005859375,
0.03912353515625,
0.01087188720703125,
-0.0109405517578125,
0.01461029052734375,
0.008392333984375,
-0.0335693359375,
-0.00009995698928833008,
-0.0804443359375,
-0.006683349609375,
0.0509033203125,
-0.02215576171875,
-0.0202484130859375,
-0.0031948089599609375,
-0.02252197265625,
0.00901031494140625,
0.044097900390625,
0.021728515625,
-0.0308837890625,
0.01377105712890625,
0.010650634765625,
-0.027557373046875,
0.0034999847412109375,
-0.0022430419921875,
-0.0142059326171875,
-0.045989990234375,
-0.0033168792724609375,
-0.02069091796875,
-0.01152801513671875,
-0.0253143310546875,
0.041778564453125,
-0.02459716796875,
-0.037109375,
0.028106689453125,
-0.0311126708984375,
-0.0147857666015625,
0.0777587890625,
-0.0230560302734375,
0.024017333984375,
-0.01535797119140625,
-0.0268096923828125,
-0.088134765625,
-0.006908416748046875,
-0.024810791015625,
0.045806884765625,
0.0014696121215820312,
-0.0240478515625,
-0.021728515625,
0.0207061767578125,
0.01154327392578125,
0.0242919921875,
-0.007305145263671875,
-0.003284454345703125,
0.00894927978515625,
0.0014495849609375,
0.01000213623046875,
-0.0023860931396484375,
-0.00908660888671875,
0.0153045654296875,
-0.027435302734375,
0.04443359375,
0.01129150390625,
0.01554107666015625,
0.051055908203125,
-0.046600341796875,
-0.00528717041015625,
-0.0204925537109375,
0.004070281982421875,
0.07440185546875,
-0.02294921875,
0.03948974609375,
-0.04949951171875,
-0.038299560546875,
0.0361328125,
0.0002624988555908203,
-0.0150146484375,
0.0081787109375,
0.056427001953125,
0.0171356201171875,
-0.0299530029296875,
-0.0126495361328125,
0.0159454345703125,
0.036346435546875,
-0.0018529891967773438,
0.05780029296875,
0.00881195068359375,
-0.007709503173828125,
0.0755615234375,
0.002742767333984375,
-0.00487518310546875,
0.004398345947265625,
0.0229034423828125,
0.0274505615234375,
-0.0172271728515625,
0.01258087158203125,
0.0301971435546875,
-0.01406097412109375,
-0.007732391357421875,
-0.0225677490234375,
0.02142333984375,
-0.00521087646484375,
0.0102386474609375,
-0.007568359375,
0.005130767822265625,
-0.035125732421875,
-0.034912109375,
0.0199432373046875,
-0.051422119140625,
0.02386474609375,
-0.01070404052734375,
0.015869140625,
-0.0113983154296875,
-0.01348876953125,
-0.0029430389404296875,
-0.024505615234375,
0.01456451416015625,
-0.033111572265625,
0.023406982421875,
-0.0086822509765625,
-0.01800537109375,
-0.025604248046875,
-0.020355224609375,
0.0865478515625,
0.05950927734375,
-0.0249786376953125,
0.02655029296875,
0.003467559814453125,
-0.00968170166015625,
-0.038360595703125,
-0.004375457763671875,
0.0660400390625,
0.0238189697265625,
-0.0164947509765625,
-0.0218048095703125,
-0.05792236328125,
-0.0059814453125,
-0.06591796875,
0.04248046875,
0.032440185546875,
0.0017375946044921875,
0.019012451171875,
0.0479736328125,
0.0255584716796875,
0.0281219482421875,
-0.01154327392578125,
-0.029754638671875,
-0.020355224609375,
0.07989501953125,
0.0253753662109375,
-0.0279541015625,
-0.020599365234375,
0.07708740234375,
0.0237274169921875,
-0.050567626953125,
-0.00018537044525146484,
-0.01329803466796875,
0.061065673828125,
-0.0052642822265625,
-0.02423095703125,
0.033111572265625,
-0.05792236328125,
0.0074310302734375,
0.0140838623046875,
-0.005397796630859375,
-0.0307464599609375,
-0.004405975341796875,
0.044464111328125,
0.05303955078125,
-0.01209259033203125,
0.00691986083984375,
-0.00807952880859375,
-0.0012264251708984375,
0.0307159423828125,
-0.00933837890625,
0.01800537109375,
-0.015655517578125,
-0.0170440673828125,
0.00682830810546875,
-0.0296630859375,
-0.00493621826171875,
-0.00299835205078125,
0.01033782958984375,
-0.0279388427734375,
-0.0227203369140625,
0.03228759765625,
-0.0304412841796875,
0.002971649169921875,
-0.0210723876953125,
0.008453369140625,
0.0022525787353515625,
0.0194549560546875,
0.03082275390625,
0.00386810302734375,
-0.060760498046875,
0.0152435302734375,
-0.05841064453125,
0.0039825439453125,
-0.039642333984375,
-0.059051513671875,
-0.06396484375,
-0.00827789306640625,
0.009613037109375,
0.01471710205078125,
0.00412750244140625,
-0.006748199462890625,
-0.015594482421875,
0.021087646484375,
0.0010738372802734375,
0.0445556640625,
-0.042266845703125,
0.04315185546875,
0.0489501953125,
0.002590179443359375,
0.01488494873046875,
0.057769775390625,
0.052001953125,
-0.043670654296875,
0.0288543701171875,
0.00853729248046875,
-0.024261474609375,
-0.038604736328125,
0.005786895751953125,
-0.034698486328125,
0.04913330078125,
-0.0316162109375,
0.007648468017578125,
-0.025115966796875,
0.0020751953125,
-0.018585205078125,
0.0085906982421875,
-0.038116455078125,
-0.0284423828125,
0.0026683807373046875,
-0.0237274169921875,
0.02789306640625,
0.00408935546875,
-0.006877899169921875,
0.032135009765625,
-0.0247344970703125,
0.0209197998046875,
-0.0029926300048828125,
-0.054656982421875,
0.0906982421875,
0.07659912109375,
0.00543212890625,
0.04962158203125,
0.005847930908203125,
-0.0009598731994628906,
-0.0091094970703125,
0.0433349609375,
0.005664825439453125,
-0.052764892578125,
0.0611572265625,
0.03497314453125,
-0.00022649765014648438,
0.0411376953125,
-0.031646728515625,
0.0159454345703125,
0.0273895263671875,
0.0692138671875,
-0.041595458984375,
0.0088653564453125,
0.0404052734375,
-0.0231781005859375,
0.01085662841796875,
-0.0303192138671875,
-0.0198974609375,
-0.03863525390625,
0.08673095703125,
-0.00348663330078125,
-0.01216888427734375,
0.021942138671875,
-0.0020904541015625,
-0.0183258056640625,
-0.01476287841796875,
0.018951416015625,
0.0255584716796875,
-0.0408935546875,
0.03741455078125,
0.041259765625,
0.0011606216430664062,
0.003513336181640625,
0.02362060546875,
-0.0181121826171875,
-0.0194854736328125,
-0.039642333984375,
-0.00547027587890625,
-0.00859832763671875,
-0.0303192138671875,
0.0141448974609375,
-0.011962890625,
-0.01207733154296875,
0.052703857421875,
-0.034759521484375,
0.042938232421875,
0.0253143310546875,
-0.0120086669921875,
0.053558349609375,
-0.031768798828125,
0.04522705078125,
0.048797607421875,
-0.06622314453125,
0.01146697998046875,
0.010467529296875,
-0.0147705078125,
-0.00450897216796875,
-0.050994873046875,
0.051239013671875,
-0.035125732421875,
0.00339508056640625,
0.043060302734375,
0.0035572052001953125,
-0.038116455078125,
-0.006992340087890625,
0.055206298828125,
-0.060089111328125,
-0.01334381103515625,
0.0290374755859375,
0.023773193359375,
-0.0281982421875,
0.0126495361328125,
-0.041015625,
0.0828857421875,
-0.0245208740234375,
-0.0040435791015625,
0.033416748046875,
0.0252227783203125,
-0.0361328125,
0.007244110107421875,
-0.035400390625,
0.042724609375,
-0.01181793212890625,
0.04248046875,
-0.0589599609375,
0.00870513916015625,
-0.01300811767578125,
0.0234222412109375,
-0.01158905029296875,
-0.007598876953125,
0.00893402099609375,
-0.0163421630859375,
0.0224761962890625,
0.034088134765625,
0.01457977294921875,
-0.0011501312255859375,
-0.021484375,
-0.04248046875,
-0.0640869140625,
-0.0205078125,
0.0171966552734375,
-0.0743408203125,
-0.050933837890625,
-0.011138916015625,
0.019073486328125,
0.0028533935546875,
0.009246826171875,
-0.004505157470703125,
-0.038177490234375,
0.004428863525390625,
0.01377105712890625,
0.0173797607421875,
-0.015716552734375,
0.036468505859375,
-0.0015268325805664062,
-0.0221405029296875,
0.016143798828125,
-0.01904296875,
0.0390625,
-0.0179901123046875,
-0.01175689697265625,
0.0219573974609375,
0.019805908203125,
0.01459503173828125,
-0.03851318359375,
-0.01265716552734375,
0.0185546875,
-0.023284912109375,
0.07452392578125,
0.045074462890625,
0.042266845703125,
-0.04974365234375,
-0.0240631103515625,
0.03692626953125,
0.0982666015625,
-0.041839599609375,
-0.01514434814453125,
0.007678985595703125,
0.029327392578125,
0.0164947509765625,
-0.019744873046875,
0.017486572265625,
-0.007129669189453125,
0.02471923828125,
-0.002040863037109375,
0.0006823539733886719,
0.030303955078125,
-0.0243072509765625,
0.0082550048828125,
0.003536224365234375,
0.011749267578125,
0.0228424072265625,
-0.032806396484375,
0.020050048828125,
0.001132965087890625,
0.050201416015625,
-0.00861358642578125,
0.040496826171875,
-0.05963134765625,
-0.01003265380859375,
0.00284576416015625,
0.04815673828125,
-0.004322052001953125,
-0.00647735595703125,
-0.0221710205078125,
-0.042388916015625,
0.0272369384765625,
0.033416748046875,
-0.00949859619140625,
-0.007274627685546875,
0.04156494140625,
0.02203369140625,
-0.08392333984375,
-0.01493072509765625,
0.01514434814453125,
-0.03289794921875,
-0.03009033203125,
-0.01044464111328125,
-0.00232696533203125,
-0.00658416748046875,
-0.0019550323486328125,
-0.03253173828125,
0.04681396484375,
-0.004817962646484375,
-0.022979736328125,
0.0265655517578125,
-0.004398345947265625,
-0.0114898681640625,
0.0303802490234375,
0.0174713134765625,
0.038848876953125,
0.023193359375,
-0.04486083984375,
-0.01384735107421875,
-0.033935546875,
-0.0130157470703125,
0.04681396484375,
0.0489501953125,
0.007904052734375,
-0.004413604736328125,
-0.017242431640625,
0.005645751953125,
0.011444091796875,
-0.0275726318359375,
0.0207061767578125,
0.00414276123046875,
0.0127410888671875,
0.0087890625,
-0.056732177734375,
-0.065673828125,
-0.0225830078125,
0.046417236328125,
0.01727294921875,
0.080810546875,
-0.0243377685546875,
0.01050567626953125,
-0.03521728515625,
0.00363922119140625,
-0.035919189453125,
-0.0241546630859375,
0.004810333251953125,
0.005931854248046875,
-0.0055694580078125,
-0.0037021636962890625,
-0.07159423828125,
0.062347412109375,
0.01200103759765625,
0.006969451904296875,
0.0687255859375,
-0.006084442138671875,
0.0041961669921875,
-0.027191162109375,
0.0140838623046875,
-0.017791748046875,
-0.044342041015625,
-0.003936767578125,
0.022918701171875,
0.00665283203125,
0.038543701171875,
-0.0118865966796875,
0.005680084228515625,
0.006305694580078125,
-0.06597900390625,
0.00843048095703125,
-0.027740478515625,
0.0124053955078125,
0.0210418701171875,
0.0338134765625,
-0.0478515625,
-0.0218505859375,
-0.0196533203125,
-0.0125732421875,
-0.01025390625,
0.032440185546875,
-0.032012939453125,
-0.040679931640625,
0.0010662078857421875,
0.0001595020294189453,
0.005767822265625,
-0.026397705078125,
-0.01433563232421875,
0.012725830078125,
-0.01373291015625,
0.0007328987121582031,
-0.0017070770263671875,
-0.00798797607421875,
-0.031463623046875,
-0.0258941650390625,
0.006862640380859375,
-0.04193115234375,
-0.013275146484375,
-0.004978179931640625,
-0.0145263671875,
0.039276123046875,
-0.01493072509765625,
0.00455474853515625,
-0.02752685546875,
-0.04022216796875,
0.0286102294921875,
-0.007183074951171875,
-0.00994110107421875,
0.01047515869140625,
0.0601806640625,
-0.0167694091796875,
-0.0430908203125,
-0.018341064453125,
0.0184478759765625,
-0.032989501953125,
0.026153564453125,
0.058441162109375,
-0.026885986328125,
0.014495849609375,
0.015869140625,
0.01104736328125,
0.07305908203125,
-0.023223876953125,
-0.00975799560546875,
0.031951904296875,
-0.007205963134765625,
-0.0182952880859375,
-0.09503173828125,
-0.00021767616271972656,
-0.07427978515625,
0.012939453125,
-0.040740966796875,
-0.009246826171875,
-0.0188140869140625,
-0.06640625,
-0.06719970703125,
0.04052734375,
-0.004047393798828125,
-0.035186767578125,
-0.06719970703125,
-0.0033111572265625,
-0.00911712646484375,
-0.00007838010787963867,
-0.015228271484375,
-0.0170745849609375,
-0.0191192626953125,
0.068359375,
0.01605224609375,
0.01375579833984375,
0.032501220703125,
0.0005397796630859375,
-0.0177001953125,
0.01202392578125,
0.007419586181640625,
-0.0156097412109375,
-0.027008056640625,
-0.029266357421875,
0.01372528076171875,
0.037322998046875,
-0.02874755859375,
-0.027923583984375,
0.02386474609375,
-0.007457733154296875,
0.0074005126953125,
-0.0279541015625,
0.005794525146484375,
-0.005893707275390625,
0.018341064453125,
-0.0134429931640625,
0.0173797607421875,
-0.006801605224609375,
0.00800323486328125,
0.0119781494140625,
-0.013458251953125,
0.00670623779296875,
0.0193023681640625,
-0.0545654296875,
-0.004711151123046875,
0.0090484619140625,
-0.02142333984375,
-0.0117340087890625,
-0.028900146484375,
-0.035400390625,
0.0023040771484375,
-0.041656494140625,
-0.024200439453125,
0.0226898193359375,
-0.0640869140625,
0.044830322265625,
-0.0177459716796875,
0.01203155517578125,
-0.00667572021484375,
0.047332763671875,
0.01280975341796875,
0.007415771484375,
-0.01381683349609375,
0.04034423828125,
-0.032135009765625,
0.00791168212890625,
0.00152587890625,
0.011810302734375,
-0.03289794921875,
0.0031414031982421875,
0.0167388916015625,
0.01035308837890625,
-0.02655029296875,
0.008697509765625,
0.0640869140625,
0.0104827880859375,
-0.03955078125,
0.056365966796875,
-0.004238128662109375,
0.018280029296875,
-0.02734375,
0.05352783203125,
-0.029022216796875,
-0.01470947265625,
-0.0023021697998046875,
-0.0205078125,
-0.00769805908203125,
0.06072998046875,
0.032867431640625,
-0.04986572265625,
0.040435791015625,
0.03167724609375,
0.058319091796875,
0.02178955078125
] |
50a95bb65913271952d8537e78b9291abb8651e9
|
Wordpress Stackexchange
Q: wp_logout Not Logging Me Out Here is what I'm doing:
wp_logout();
var_dump(is_user_logged_in());
var_dump returns:
bool(true)
Why is wp_logout() not logging me out?
A: wp_logout() calls clear_auth_cookie(), which expires all authorization cookies set. It doesn't change the value of the global $current_user variable. So technically you're still logged in for the duration of the script.
If you're using wp_logout in your own code, its probably best to exit or wp_redirect immediately afterwards.
You can call wp_set_current_user(0) after wp_logout() to manually log the user out instantly, if you need to continue executing PHP but don't want the user to be logged in
|
Q: wp_logout Not Logging Me Out Here is what I'm doing:
wp_logout();
var_dump(is_user_logged_in());
var_dump returns:
bool(true)
Why is wp_logout() not logging me out?
A: wp_logout() calls clear_auth_cookie(), which expires all authorization cookies set. It doesn't change the value of the global $current_user variable. So technically you're still logged in for the duration of the script.
If you're using wp_logout in your own code, its probably best to exit or wp_redirect immediately afterwards.
You can call wp_set_current_user(0) after wp_logout() to manually log the user out instantly, if you need to continue executing PHP but don't want the user to be logged in
A: I had same problem with my code. I was trying to logout by using wp_logout() but It wasn't working perfectly as per my need because of some code changes so I used wp_destroy_current_session(); and then wp_redirect(); and exit();
wp_destroy_current_session();
wp_logout();
wp_redirect(site_url());
exit();
And it woked for me.
you can also use
auth_redirect();
instead of wp_redirect(site_url()); and also in my case wp_set_current_user(0); was also not working if used before redirect as it was setting user 0 active
|
wordpress
|
{
"language": "en",
"length": 178,
"provenance": "stackexchange_00019.jsonl.gz:408088",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13087"
}
|
[
0.05364990234375,
0.023681640625,
0.01116180419921875,
-0.01427459716796875,
0.021331787109375,
-0.0243072509765625,
0.043792724609375,
-0.03668212890625,
-0.01052093505859375,
0.032745361328125,
0.0092010498046875,
0.00463104248046875,
-0.0450439453125,
-0.021087646484375,
-0.0276031494140625,
-0.0283050537109375,
0.020233154296875,
-0.016815185546875,
0.0176239013671875,
-0.00980377197265625,
-0.003002166748046875,
0.006622314453125,
0.0128936767578125,
0.035308837890625,
0.0034656524658203125,
0.0250091552734375,
0.054779052734375,
-0.035736083984375,
0.0257568359375,
-0.005580902099609375,
0.0172576904296875,
-0.0272369384765625,
-0.006702423095703125,
0.08258056640625,
-0.04400634765625,
0.0215911865234375,
-0.035919189453125,
0.035797119140625,
0.029876708984375,
0.012847900390625,
-0.00070953369140625,
0.0082550048828125,
0.026397705078125,
-0.005390167236328125,
-0.02435302734375,
-0.0000903010368347168,
-0.0219573974609375,
-0.0201873779296875,
0.034637451171875,
-0.015869140625,
0.0229034423828125,
0.01059722900390625,
0.039581298828125,
-0.04248046875,
-0.0272674560546875,
0.00554656982421875,
0.00904083251953125,
-0.007366180419921875,
0.0423583984375,
-0.033538818359375,
-0.04058837890625,
-0.042877197265625,
0.037811279296875,
-0.0167694091796875,
0.00482940673828125,
0.01256561279296875,
-0.00018334388732910156,
0.0217742919921875,
-0.0276336669921875,
-0.00832366943359375,
0.0109100341796875,
-0.0262451171875,
-0.0142669677734375,
0.022735595703125,
-0.014251708984375,
-0.035614013671875,
0.02947998046875,
-0.0196685791015625,
-0.0038356781005859375,
0.045074462890625,
-0.00545501708984375,
-0.0006198883056640625,
-0.060882568359375,
0.014312744140625,
0.004558563232421875,
0.032928466796875,
-0.018035888671875,
-0.0300750732421875,
0.001605987548828125,
-0.0222625732421875,
-0.0251007080078125,
0.0161895751953125,
-0.002132415771484375,
-0.0118255615234375,
-0.045928955078125,
-0.01201629638671875,
0.00963592529296875,
0.03240966796875,
-0.00455474853515625,
-0.00795745849609375,
-0.028167724609375,
0.005764007568359375,
-0.03875732421875,
-0.004932403564453125,
-0.01090240478515625,
0.05572509765625,
0.0234832763671875,
-0.00159454345703125,
-0.01513671875,
0.002689361572265625,
0.00897216796875,
-0.0472412109375,
-0.033843994140625,
-0.07037353515625,
0.003528594970703125,
0.053863525390625,
-0.02337646484375,
0.005687713623046875,
0.0133819580078125,
0.001361846923828125,
-0.035797119140625,
-0.0193634033203125,
-0.031280517578125,
0.0168609619140625,
0.0060272216796875,
-0.0101470947265625,
0.003055572509765625,
0.025970458984375,
0.003559112548828125,
0.045989990234375,
-0.047698974609375,
0.007152557373046875,
0.03857421875,
-0.02545166015625,
-0.01398468017578125,
-0.031158447265625,
0.0281982421875,
-0.02276611328125,
-0.005809783935546875,
0.033416748046875,
-0.0016794204711914062,
-0.044219970703125,
0.0016622543334960938,
0.00963592529296875,
0.023223876953125,
0.02142333984375,
0.019866943359375,
0.0210723876953125,
-0.0157012939453125,
-0.058349609375,
0.034912109375,
-0.005615234375,
-0.0273590087890625,
0.01389312744140625,
0.06488037109375,
-0.03619384765625,
0.02679443359375,
-0.0411376953125,
0.0628662109375,
-0.005123138427734375,
0.00897216796875,
0.0021877288818359375,
0.0151519775390625,
0.0009112358093261719,
-0.0168304443359375,
0.00687408447265625,
-0.047607421875,
-0.0167236328125,
0.033294677734375,
0.002445220947265625,
0.04376220703125,
-0.0506591796875,
0.0411376953125,
0.00821685791015625,
-0.0056610107421875,
0.0122833251953125,
-0.0396728515625,
0.0281219482421875,
0.0369873046875,
-0.01641845703125,
-0.019775390625,
-0.037261962890625,
0.032928466796875,
-0.005588531494140625,
-0.0057373046875,
-0.012939453125,
0.007610321044921875,
0.0007653236389160156,
0.00034356117248535156,
0.02117919921875,
-0.0022296905517578125,
0.0171661376953125,
-0.0294952392578125,
0.045623779296875,
0.006114959716796875,
-0.031707763671875,
0.0035114288330078125,
0.001895904541015625,
-0.01251983642578125,
-0.0218658447265625,
0.064453125,
0.018035888671875,
-0.03485107421875,
-0.039794921875,
-0.121337890625,
-0.013153076171875,
-0.0209503173828125,
0.0489501953125,
0.00922393798828125,
-0.00669097900390625,
0.0163726806640625,
-0.016632080078125,
0.00406646728515625,
-0.028045654296875,
-0.054351806640625,
-0.00141143798828125,
-0.034759521484375,
0.07489013671875,
-0.005001068115234375,
0.057586669921875,
-0.01300048828125,
-0.03448486328125,
0.00814056396484375,
-0.034637451171875,
0.051361083984375,
-0.01461029052734375,
-0.020355224609375,
-0.03424072265625,
0.029083251953125,
-0.022796630859375,
0.006298065185546875,
0.059234619140625,
0.00786590576171875,
0.0144195556640625,
-0.041351318359375,
-0.0251922607421875,
-0.0116729736328125,
-0.034027099609375,
0.014251708984375,
0.04974365234375,
0.038970947265625,
0.04541015625,
-0.007518768310546875,
0.00433349609375,
0.002857208251953125,
-0.053863525390625,
0.0159759521484375,
-0.0117645263671875,
0.032806396484375,
0.0330810546875,
0.0082244873046875,
-0.0180206298828125,
0.035797119140625,
-0.039306640625,
0.00878143310546875,
0.041595458984375,
-0.02203369140625,
-0.024810791015625,
0.00612640380859375,
0.005889892578125,
-0.00653076171875,
-0.05072021484375,
0.0029125213623046875,
-0.022308349609375,
-0.01085662841796875,
-0.034210205078125,
-0.01904296875,
-0.0289459228515625,
-0.020050048828125,
-0.0177459716796875,
0.03167724609375,
-0.01561737060546875,
0.01433563232421875,
0.058837890625,
0.0195465087890625,
-0.045562744140625,
-0.0196380615234375,
-0.0169525146484375,
0.0287933349609375,
0.0138092041015625,
0.00736236572265625,
0.03155517578125,
0.00868988037109375,
-0.017303466796875,
0.0186767578125,
-0.00305938720703125,
-0.0006036758422851562,
0.01064300537109375,
0.02178955078125,
0.0059814453125,
0.023712158203125,
0.0157470703125,
-0.0241851806640625,
0.0478515625,
0.008026123046875,
-0.0245513916015625,
0.0274658203125,
-0.04498291015625,
0.043060302734375,
-0.035308837890625,
0.0235137939453125,
0.061614990234375,
-0.0010700225830078125,
0.0223388671875,
-0.005878448486328125,
0.007320404052734375,
0.00421142578125,
-0.0054931640625,
-0.027618408203125,
-0.0080718994140625,
-0.04400634765625,
0.0172882080078125,
0.0286712646484375,
0.09808349609375,
-0.031005859375,
-0.0599365234375,
-0.0046844482421875,
0.031524658203125,
-0.036834716796875,
-0.05877685546875,
-0.03753662109375,
-0.06048583984375,
0.0305023193359375,
-0.03515625,
-0.01025390625,
0.010650634765625,
-0.00978851318359375,
0.01490020751953125,
0.005878448486328125,
-0.018707275390625,
-0.020355224609375,
-0.045440673828125,
-0.05657958984375,
-0.007144927978515625,
0.0055694580078125,
0.01715087890625,
-0.002315521240234375,
0.050811767578125,
-0.0111846923828125,
-0.0208740234375,
-0.032806396484375,
0.00466156005859375,
-0.004047393798828125,
-0.036224365234375,
-0.011566162109375,
-0.01036834716796875,
0.0064239501953125,
-0.00531005859375,
0.004833221435546875,
-0.0105133056640625,
0.0229339599609375,
-0.011444091796875,
-0.0155029296875,
-0.08245849609375,
0.012908935546875,
-0.0277557373046875,
-0.034454345703125,
-0.0396728515625,
0.021240234375,
-0.06280517578125,
0.01340484619140625,
-0.0170135498046875,
-0.031463623046875,
0.044189453125,
0.01317596435546875,
-0.0080413818359375,
0.002796173095703125,
-0.004444122314453125,
0.0015916824340820312,
0.0150299072265625,
-0.0308685302734375,
-0.0008969306945800781,
0.03125,
-0.006481170654296875,
-0.0029144287109375,
0.007167816162109375,
0.02996826171875,
-0.01467132568359375,
0.01538848876953125,
-0.0017147064208984375,
-0.0002117156982421875,
-0.03753662109375,
-0.0162200927734375,
-0.0828857421875,
-0.045013427734375,
0.055694580078125,
-0.019805908203125,
-0.01094818115234375,
-0.0129852294921875,
-0.0205078125,
0.02197265625,
0.0799560546875,
-0.0267333984375,
-0.0301513671875,
0.01285552978515625,
0.0159149169921875,
-0.026275634765625,
-0.00939178466796875,
-0.031768798828125,
-0.013946533203125,
-0.0634765625,
0.0200042724609375,
0.0168304443359375,
-0.03167724609375,
-0.00920867919921875,
-0.01213836669921875,
-0.039093017578125,
-0.04180908203125,
0.009063720703125,
0.00750732421875,
0.047027587890625,
-0.004638671875,
0.02349853515625,
-0.01221466064453125,
0.039520263671875,
-0.056365966796875,
-0.04107666015625,
0.00334930419921875,
-0.030853271484375,
0.0175628662109375,
0.0159912109375,
-0.00749969482421875,
-0.029754638671875,
0.0006985664367675781,
-0.018951416015625,
-0.01215362548828125,
-0.0016622543334960938,
-0.0037097930908203125,
0.0297393798828125,
0.036285400390625,
-0.0229034423828125,
0.02215576171875,
0.0178985595703125,
-0.0258636474609375,
-0.031982421875,
-0.007465362548828125,
-0.048309326171875,
0.020416259765625,
-0.02532958984375,
-0.02734375,
-0.0189208984375,
-0.0275115966796875,
0.00612640380859375,
0.013031005859375,
-0.004024505615234375,
0.00785064697265625,
-0.0246429443359375,
-0.01763916015625,
0.05987548828125,
0.0184173583984375,
-0.024169921875,
0.00785064697265625,
0.062103271484375,
0.00780487060546875,
-0.030975341796875,
-0.035308837890625,
-0.00928497314453125,
0.0020580291748046875,
-0.0199432373046875,
0.0273895263671875,
-0.03192138671875,
-0.0163726806640625,
0.07391357421875,
-0.036346435546875,
0.0235443115234375,
-0.07281494140625,
0.0947265625,
-0.031890869140625,
-0.007015228271484375,
0.022247314453125,
-0.05499267578125,
0.00933074951171875,
0.00897216796875,
0.0152740478515625,
-0.0311431884765625,
0.05364990234375,
0.043304443359375,
-0.0196075439453125,
-0.01332855224609375,
-0.02056884765625,
-0.058349609375,
0.0103607177734375,
-0.0224456787109375,
0.037994384765625,
0.034759521484375,
-0.006084442138671875,
0.05133056640625,
0.0288238525390625,
0.001972198486328125,
-0.06378173828125,
-0.0243377685546875,
-0.0297698974609375,
0.019500732421875,
-0.038238525390625,
0.00655364990234375,
-0.023162841796875,
-0.034332275390625,
0.11541748046875,
0.044708251953125,
-0.046600341796875,
0.05609130859375,
-0.021942138671875,
-0.002414703369140625,
0.0108642578125,
-0.01458740234375,
0.0229034423828125,
-0.00980377197265625,
-0.0268402099609375,
-0.005237579345703125,
-0.029693603515625,
-0.039825439453125,
-0.035125732421875,
0.006336212158203125,
-0.039703369140625,
0.01019287109375,
0.00015246868133544922,
0.0738525390625,
-0.01161956787109375,
0.050994873046875,
-0.0183563232421875,
0.007480621337890625,
-0.006381988525390625,
0.05255126953125,
0.018890380859375,
-0.0204010009765625,
-0.00264739990234375,
0.04052734375,
0.00786590576171875,
-0.0443115234375,
-0.0634765625,
0.030609130859375,
0.0419921875,
-0.0197296142578125,
0.0133056640625,
0.0203399658203125,
0.01465606689453125,
0.00225067138671875,
0.049957275390625,
-0.00823974609375,
-0.09613037109375,
-0.004848480224609375,
0.050933837890625,
0.034759521484375,
-0.0672607421875,
-0.0000673532485961914,
-0.02716064453125,
-0.0234222412109375,
-0.00922393798828125,
0.0123138427734375,
0.0009908676147460938,
-0.021392822265625,
-0.043548583984375,
-0.08026123046875,
-0.044097900390625,
0.00576019287109375,
-0.026824951171875,
-0.004055023193359375,
-0.013580322265625,
-0.0452880859375,
0.033203125,
-0.0259857177734375,
0.016082763671875,
-0.0202789306640625,
0.00739288330078125,
0.0014410018920898438,
0.006023406982421875,
0.04376220703125,
0.0175018310546875,
-0.044464111328125,
0.0206451416015625,
-0.0445556640625,
-0.0037326812744140625,
0.002391815185546875,
-0.0445556640625,
-0.032684326171875,
-0.04229736328125,
0.044158935546875,
0.02423095703125,
0.00885772705078125,
-0.034820556640625,
-0.06195068359375,
0.0244598388671875,
0.05303955078125,
0.062469482421875,
-0.0046844482421875,
0.042510986328125,
-0.0025043487548828125,
0.0115509033203125,
0.00275421142578125,
0.0253448486328125,
-0.0013608932495117188,
-0.01416778564453125,
0.047821044921875,
0.0296783447265625,
-0.036407470703125,
-0.0703125,
0.0215301513671875,
-0.042449951171875,
0.07598876953125,
-0.032958984375,
-0.0391845703125,
-0.00433349609375,
-0.003192901611328125,
-0.0025539398193359375,
0.04974365234375,
0.063232421875,
-0.023345947265625,
0.00384521484375,
-0.0027675628662109375,
0.028900146484375,
0.00298309326171875,
-0.0030040740966796875,
-0.00888824462890625,
-0.01322174072265625,
0.00777435302734375,
-0.0006489753723144531,
-0.0294647216796875,
0.0204315185546875,
0.053253173828125,
0.01326751708984375,
0.03680419921875,
0.0025806427001953125,
0.0261993408203125,
0.017303466796875,
-0.0006232261657714844,
-0.037994384765625,
-0.006229400634765625,
0.0293731689453125,
-0.015411376953125,
-0.043670654296875,
-0.008819580078125,
-0.027984619140625,
0.0304412841796875,
0.07879638671875,
0.096923828125,
-0.1201171875,
0.04412841796875,
0.024444580078125,
0.0014390945434570312,
0.04833984375,
-0.0190582275390625,
0.0261383056640625,
0.0102691650390625,
0.0226898193359375,
-0.01263427734375,
-0.024017333984375,
-0.00003039836883544922,
-0.025177001953125,
-0.01190185546875,
-0.03887939453125,
0.031097412109375,
0.0281982421875,
-0.1171875,
0.072998046875,
0.075439453125,
-0.01214599609375,
-0.0179901123046875,
-0.0271759033203125,
0.032470703125,
-0.0335693359375,
-0.07720947265625,
0.0232086181640625,
-0.037506103515625,
0.00799560546875,
0.0245208740234375,
-0.026214599609375,
0.03717041015625,
0.055023193359375,
-0.0178070068359375,
0.0187530517578125,
0.020599365234375,
0.01024627685546875,
0.0016698837280273438,
-0.02398681640625,
0.026031494140625,
0.04901123046875,
-0.07916259765625,
0.022735595703125,
-0.02020263671875,
0.0036144256591796875,
-0.0147705078125,
-0.03802490234375,
0.07080078125,
-0.06170654296875,
0.0225830078125,
0.0211639404296875,
0.0499267578125,
-0.00618743896484375,
0.005496978759765625,
0.0220184326171875,
-0.036895751953125,
-0.027679443359375,
0.0157470703125,
-0.029205322265625,
0.0246734619140625,
0.034912109375,
-0.049652099609375,
0.0972900390625,
0.0164031982421875,
0.018524169921875,
0.00856781005859375,
0.03851318359375,
-0.02398681640625,
0.0244140625,
-0.048553466796875,
0.054840087890625,
0.01520538330078125,
0.04034423828125,
-0.045013427734375,
-0.0019855499267578125,
0.0065460205078125,
-0.0007691383361816406,
0.0321044921875,
0.0160369873046875,
-0.0239715576171875,
-0.0372314453125,
-0.00559234619140625,
0.038970947265625,
0.00807952880859375,
0.03094482421875,
-0.006076812744140625,
0.0267791748046875,
0.001384735107421875,
-0.043792724609375,
0.004131317138671875,
-0.0008397102355957031,
-0.042633056640625,
0.0216522216796875,
0.00275421142578125,
-0.033905029296875,
-0.034271240234375,
0.03118896484375,
-0.0574951171875,
0.0014085769653320312,
0.01336669921875,
0.030731201171875,
-0.006404876708984375,
0.03680419921875,
0.01120758056640625,
-0.021392822265625,
0.02508544921875,
-0.03863525390625,
0.043121337890625,
-0.0204010009765625,
-0.0006651878356933594,
0.03594970703125,
0.0182342529296875,
-0.0098876953125,
-0.042755126953125,
-0.0008635520935058594,
-0.0220489501953125,
-0.0270233154296875,
0.044921875,
0.040252685546875,
0.035491943359375,
-0.0057373046875,
0.0188446044921875,
0.0109100341796875,
0.046844482421875,
-0.042022705078125,
-0.028594970703125,
-0.0043487548828125,
-0.017547607421875,
0.02642822265625,
-0.000492095947265625,
0.051666259765625,
-0.0295257568359375,
-0.023651123046875,
-0.00637054443359375,
0.00467681884765625,
0.01021575927734375,
0.0162506103515625,
0.014892578125,
0.028656005859375,
-0.061553955078125,
-0.00112152099609375,
0.00933074951171875,
-0.020263671875,
0.004917144775390625,
-0.01763916015625,
0.0038623809814453125,
-0.0220184326171875,
0.008758544921875,
0.022186279296875,
0.01326751708984375,
0.0135040283203125,
-0.0176849365234375,
-0.005146026611328125,
-0.016876220703125,
-0.048095703125,
0.019012451171875,
0.0311431884765625,
0.0015268325805664062,
-0.03076171875,
0.0298309326171875,
0.013031005859375,
-0.0614013671875,
-0.0264434814453125,
0.019744873046875,
-0.01490020751953125,
-0.044769287109375,
-0.0009107589721679688,
-0.00689697265625,
0.024658203125,
0.006969451904296875,
-0.0124664306640625,
0.0673828125,
-0.002925872802734375,
-0.0247955322265625,
0.034423828125,
0.005405426025390625,
-0.03814697265625,
-0.002513885498046875,
0.0086822509765625,
0.0753173828125,
0.01458740234375,
-0.015655517578125,
-0.004970550537109375,
-0.022491455078125,
0.0303955078125,
0.00177001953125,
0.0177459716796875,
0.020965576171875,
0.0119476318359375,
0.006755828857421875,
-0.0056610107421875,
-0.0178985595703125,
0.024383544921875,
-0.0018177032470703125,
-0.055206298828125,
0.0301361083984375,
-0.025054931640625,
-0.067138671875,
-0.044464111328125,
-0.0265960693359375,
0.034027099609375,
0.031280517578125,
0.00768280029296875,
0.02203369140625,
0.0301513671875,
-0.0004622936248779297,
0.01554107666015625,
-0.01275634765625,
0.009613037109375,
0.0011081695556640625,
0.0003516674041748047,
-0.002643585205078125,
-0.00946044921875,
-0.08953857421875,
0.05670166015625,
-0.0011310577392578125,
0.036468505859375,
0.0709228515625,
-0.036468505859375,
0.006381988525390625,
-0.007396697998046875,
-0.01378631591796875,
-0.0287933349609375,
-0.03302001953125,
0.007701873779296875,
0.013946533203125,
-0.01062774658203125,
-0.00044846534729003906,
0.0095977783203125,
0.037200927734375,
-0.03076171875,
-0.0164337158203125,
-0.007373809814453125,
-0.035491943359375,
-0.03948974609375,
0.01232147216796875,
0.0291290283203125,
0.00937652587890625,
-0.037811279296875,
-0.029449462890625,
-0.01168060302734375,
0.0059814453125,
-0.023834228515625,
-0.0204010009765625,
-0.0186309814453125,
0.0267791748046875,
0.026397705078125,
0.0638427734375,
-0.0077362060546875,
0.02142333984375,
-0.0104522705078125,
0.017791748046875,
0.02655029296875,
-0.0775146484375,
-0.05169677734375,
-0.06085205078125,
0.00873565673828125,
0.0267333984375,
-0.0266265869140625,
-0.06353759765625,
-0.06256103515625,
-0.0096893310546875,
0.0277862548828125,
-0.01018524169921875,
-0.00226593017578125,
-0.005176544189453125,
-0.02740478515625,
-0.002002716064453125,
0.00582122802734375,
-0.036285400390625,
0.0205078125,
0.023651123046875,
-0.0203399658203125,
0.0159759521484375,
-0.017059326171875,
-0.020172119140625,
-0.0014638900756835938,
-0.018096923828125,
0.0178375244140625,
0.001979827880859375,
-0.009735107421875,
-0.01332855224609375,
-0.0225067138671875,
0.0250396728515625,
-0.0187530517578125,
-0.0382080078125,
0.0189361572265625,
-0.0017032623291015625,
0.034027099609375,
0.013885498046875,
-0.0270233154296875,
0.04571533203125,
-0.004856109619140625,
-0.024383544921875,
-0.02728271484375,
-0.021392822265625,
-0.055450439453125,
-0.051483154296875,
-0.00560760498046875,
0.0140838623046875,
-0.03643798828125,
-0.04547119140625,
0.01806640625,
0.0004107952117919922,
-0.03369140625,
-0.021514892578125,
-0.0245361328125,
-0.0083770751953125,
0.03619384765625,
0.0205230712890625,
0.0160369873046875,
0.036376953125,
0.037567138671875,
-0.0184478759765625,
0.0273895263671875,
0.00875091552734375,
0.0013360977172851562,
-0.0287017822265625,
0.0259552001953125,
0.008087158203125,
0.0350341796875,
-0.0011425018310546875,
0.054443359375,
0.01271820068359375,
0.00829315185546875,
-0.009796142578125,
0.0030193328857421875,
0.0291595458984375,
0.007320404052734375,
0.0234222412109375,
-0.01549530029296875,
-0.0117340087890625,
-0.00562286376953125,
-0.07452392578125,
-0.031463623046875,
-0.0251922607421875,
-0.0191650390625,
0.024627685546875,
-0.07861328125,
0.01702880859375,
-0.0272369384765625,
-0.01708984375,
-0.03570556640625,
0.0038776397705078125,
-0.0166015625,
-0.00600433349609375,
0.026458740234375,
-0.0036792755126953125,
0.031341552734375,
-0.01322174072265625,
0.044097900390625,
-0.037506103515625,
-0.0296630859375,
0.009429931640625,
0.01152801513671875,
-0.00167083740234375,
0.006565093994140625,
0.0416259765625,
0.0178985595703125,
-0.05145263671875,
-0.02197265625,
0.02423095703125,
0.02984619140625,
-0.0174102783203125,
-0.050537109375,
-0.007144927978515625,
0.0102691650390625,
-0.0028820037841796875,
0.0083465576171875,
0.004825592041015625,
0.0306243896484375,
0.0182952880859375,
-0.00589752197265625,
-0.004352569580078125,
-0.0139923095703125,
-0.018890380859375,
0.0460205078125,
-0.0014696121215820312,
-0.0284881591796875,
0.0263671875,
-0.019866943359375,
0.0143585205078125,
-0.051300048828125,
0.027679443359375,
-0.050537109375,
0.0445556640625,
-0.01265716552734375,
-0.0281219482421875,
0.042755126953125
] |
a8ffb7660ab5c818d44f83542a86492b67a0fa66
|
Wordpress Stackexchange
Q: WordPress Custom Query I have posts that use a custom field for start date and end date.
query_posts returns an array of posts that exist in the category I'm filtering.
How do I query posts using this custom field that has date i.e. 03/11/2010 and not the full array. Pagination works on the full array so it returns all posts. I can use an if else to only show the posts newer that today, then pagination doesn't work.
Would I have to build a custom mysql query?
A: <?php
$querystr = "
SELECT wposts.*
FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta
WHERE wposts.ID = wpostmeta.post_id
AND wpostmeta.meta_key = 'date_field'
AND wpostmeta.meta_value = '03/11/2010'
AND wposts.post_status = 'publish'
AND wposts.post_type = 'post'
ORDER BY wposts.post_date DESC
";
$pageposts = $wpdb->get_results($querystr, OBJECT);
?>
Then you would access $pageposts as an object
|
Q: WordPress Custom Query I have posts that use a custom field for start date and end date.
query_posts returns an array of posts that exist in the category I'm filtering.
How do I query posts using this custom field that has date i.e. 03/11/2010 and not the full array. Pagination works on the full array so it returns all posts. I can use an if else to only show the posts newer that today, then pagination doesn't work.
Would I have to build a custom mysql query?
A: <?php
$querystr = "
SELECT wposts.*
FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta
WHERE wposts.ID = wpostmeta.post_id
AND wpostmeta.meta_key = 'date_field'
AND wpostmeta.meta_value = '03/11/2010'
AND wposts.post_status = 'publish'
AND wposts.post_type = 'post'
ORDER BY wposts.post_date DESC
";
$pageposts = $wpdb->get_results($querystr, OBJECT);
?>
Then you would access $pageposts as an object
A: You can create custom query using following filters query_vars, posts_join, posts_where, posts_groupby.
here's the codex link to custom queries.
Some examples are listed there for help.
A: You can do this with WP_Query using meta_query.
$my_query = new WP_Query( array(
'meta_query' => array(
array(
'key' => 'date_field',
'value => '03/11/2010',
'compare' => '='
)
)
) );
By default it will search for published posts.
I would also suggest to store date in yyyy/mm/dd format. Sorting by this field will be much easier if you do this so.
|
wordpress
|
{
"language": "en",
"length": 227,
"provenance": "stackexchange_00019.jsonl.gz:408098",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13126"
}
|
[
0.073974609375,
0.0017309188842773438,
0.020904541015625,
-0.052734375,
0.0263671875,
-0.023590087890625,
0.0455322265625,
-0.0119781494140625,
0.0240936279296875,
0.018157958984375,
-0.01788330078125,
-0.01885986328125,
-0.01123046875,
-0.02447509765625,
-0.032318115234375,
-0.033660888671875,
0.0386962890625,
-0.017791748046875,
0.03875732421875,
0.00383758544921875,
0.007488250732421875,
0.030242919921875,
0.031524658203125,
0.02490234375,
0.033905029296875,
0.00025773048400878906,
0.06597900390625,
-0.0219268798828125,
0.06512451171875,
0.00537109375,
0.029296875,
-0.05523681640625,
0.02935791015625,
-0.003925323486328125,
0.0020694732666015625,
0.0156707763671875,
0.00616455078125,
0.0012493133544921875,
0.00665283203125,
0.003658294677734375,
0.02130126953125,
-0.006103515625,
-0.0191192626953125,
-0.01983642578125,
-0.0126800537109375,
-0.044708251953125,
0.038848876953125,
-0.01507568359375,
0.005077362060546875,
0.00582122802734375,
-0.01410675048828125,
0.0295562744140625,
0.0014295578002929688,
0.005390167236328125,
-0.0090484619140625,
-0.0265045166015625,
-0.001552581787109375,
-0.0088653564453125,
0.039398193359375,
-0.0355224609375,
-0.0241851806640625,
-0.01384735107421875,
0.0251922607421875,
0.0241546630859375,
-0.016754150390625,
0.005252838134765625,
0.026123046875,
0.01378631591796875,
-0.01291656494140625,
-0.0439453125,
0.00722503662109375,
0.006610870361328125,
-0.007190704345703125,
-0.01477813720703125,
0.00569915771484375,
-0.0179901123046875,
-0.0012664794921875,
-0.0438232421875,
-0.0032253265380859375,
0.031646728515625,
-0.034515380859375,
0.015625,
-0.058624267578125,
-0.023468017578125,
-0.0110321044921875,
-0.013214111328125,
-0.040863037109375,
0.0127105712890625,
-0.019134521484375,
-0.035888671875,
-0.020172119140625,
-0.017822265625,
-0.055816650390625,
-0.0165252685546875,
-0.0020961761474609375,
-0.039093017578125,
0.0068206787109375,
0.06536865234375,
-0.0229339599609375,
-0.005588531494140625,
-0.030914306640625,
-0.00034356117248535156,
-0.035430908203125,
-0.0193023681640625,
0.0239715576171875,
0.00543975830078125,
0.0019159317016601562,
0.03521728515625,
0.06683349609375,
0.0277099609375,
0.00948333740234375,
0.06317138671875,
-0.022430419921875,
-0.01055145263671875,
-0.036346435546875,
0.028228759765625,
-0.0015630722045898438,
-0.0526123046875,
-0.004512786865234375,
-0.0430908203125,
0.0162506103515625,
0.005523681640625,
0.01142120361328125,
-0.026153564453125,
0.0191497802734375,
-0.010284423828125,
-0.050323486328125,
-0.0013675689697265625,
0.01160430908203125,
0.0237274169921875,
-0.041839599609375,
0.00437164306640625,
0.03826904296875,
0.0046234130859375,
0.00028061866760253906,
-0.0299835205078125,
0.06341552734375,
-0.0262603759765625,
-0.0217742919921875,
0.0205535888671875,
0.006793975830078125,
-0.027740478515625,
-0.0312042236328125,
-0.0235748291015625,
-0.0132598876953125,
-0.00386810302734375,
0.0194549560546875,
0.034912109375,
-0.007022857666015625,
-0.0220184326171875,
0.0027923583984375,
0.0265350341796875,
0.025054931640625,
0.0075531005859375,
-0.03814697265625,
-0.003520965576171875,
-0.00852203369140625,
-0.0011110305786132812,
-0.00991058349609375,
-0.0163116455078125,
0.029937744140625,
0.0028209686279296875,
-0.0115509033203125,
-0.04925537109375,
-0.06591796875,
-0.0188751220703125,
-0.032806396484375,
-0.01091766357421875,
0.021148681640625,
-0.01096343994140625,
-0.00432586669921875,
-0.025970458984375,
0.03118896484375,
0.01470184326171875,
-0.00794219970703125,
0.042816162109375,
0.017852783203125,
-0.0135498046875,
0.01904296875,
0.0229644775390625,
-0.0181427001953125,
-0.029754638671875,
0.036773681640625,
-0.016754150390625,
-0.04156494140625,
0.046783447265625,
0.0130615234375,
0.0136260986328125,
-0.015167236328125,
0.00017714500427246094,
0.05438232421875,
0.06793212890625,
-0.042205810546875,
0.04583740234375,
0.0175933837890625,
-0.0267181396484375,
-0.0187835693359375,
-0.00724029541015625,
0.006229400634765625,
-0.03131103515625,
-0.00835418701171875,
0.0372314453125,
-0.021026611328125,
0.046112060546875,
-0.05072021484375,
0.033355712890625,
-0.0173187255859375,
0.025238037109375,
-0.016632080078125,
0.047637939453125,
0.026763916015625,
0.038909912109375,
-0.042236328125,
-0.00322723388671875,
-0.006839752197265625,
-0.020477294921875,
0.0038738250732421875,
-0.006656646728515625,
-0.010162353515625,
0.007511138916015625,
0.004302978515625,
-0.04693603515625,
-0.01407623291015625,
0.060546875,
0.0714111328125,
-0.0254669189453125,
0.00583648681640625,
-0.0248565673828125,
0.06634521484375,
0.0113525390625,
-0.039581298828125,
0.0030803680419921875,
0.0276641845703125,
0.0165557861328125,
-0.0211181640625,
0.0008544921875,
0.038787841796875,
-0.039581298828125,
0.01068878173828125,
0.04144287109375,
0.036102294921875,
0.004703521728515625,
-0.011138916015625,
-0.033233642578125,
0.03179931640625,
-0.061004638671875,
-0.00299835205078125,
-0.0201263427734375,
-0.006328582763671875,
0.01300811767578125,
0.033111572265625,
-0.0213165283203125,
0.011138916015625,
-0.01546478271484375,
0.0042877197265625,
0.0213165283203125,
0.0228729248046875,
0.039215087890625,
-0.019073486328125,
0.01233673095703125,
-0.0183563232421875,
-0.00849151611328125,
-0.0239715576171875,
0.004177093505859375,
0.0379638671875,
0.006900787353515625,
0.051727294921875,
0.038482666015625,
-0.01554107666015625,
0.00331878662109375,
-0.0114898681640625,
-0.020263671875,
0.0131072998046875,
0.0010309219360351562,
-0.061431884765625,
0.0268707275390625,
-0.01085662841796875,
0.0262603759765625,
0.000553131103515625,
-0.01322174072265625,
0.00940704345703125,
0.0166473388671875,
-0.017303466796875,
0.0006690025329589844,
0.0113067626953125,
-0.0186614990234375,
0.0151214599609375,
0.053741455078125,
0.00775909423828125,
-0.0031375885009765625,
0.0169677734375,
0.0159454345703125,
-0.028900146484375,
0.0374755859375,
-0.01494598388671875,
-0.0240478515625,
-0.0335693359375,
-0.04107666015625,
0.0521240234375,
-0.051666259765625,
-0.018768310546875,
0.055389404296875,
-0.01369476318359375,
0.0196533203125,
-0.0149383544921875,
0.006824493408203125,
-0.01509857177734375,
0.0201568603515625,
-0.01122283935546875,
-0.03411865234375,
-0.029815673828125,
0.0024166107177734375,
0.0207672119140625,
0.0382080078125,
0.023040771484375,
-0.032012939453125,
0.0280914306640625,
0.02069091796875,
-0.07208251953125,
-0.097900390625,
-0.00988006591796875,
-0.0611572265625,
-0.0217742919921875,
-0.01207733154296875,
-0.0263214111328125,
0.0214996337890625,
0.00702667236328125,
0.007053375244140625,
0.00949859619140625,
-0.0191497802734375,
-0.07012939453125,
-0.05133056640625,
-0.07611083984375,
0.0016498565673828125,
0.00238800048828125,
0.0244293212890625,
-0.0164642333984375,
0.11248779296875,
0.0107879638671875,
-0.0908203125,
-0.0341796875,
0.0311279296875,
-0.0194854736328125,
0.00337982177734375,
-0.020477294921875,
0.0254364013671875,
0.02764892578125,
0.003093719482421875,
0.054229736328125,
0.041595458984375,
-0.043121337890625,
0.0017452239990234375,
0.01715087890625,
0.01056671142578125,
0.0176239013671875,
0.00885772705078125,
-0.01305389404296875,
0.062225341796875,
0.0404052734375,
-0.003971099853515625,
-0.02703857421875,
-0.018829345703125,
-0.05999755859375,
0.00862884521484375,
0.0343017578125,
0.006900787353515625,
-0.007503509521484375,
0.00047016143798828125,
0.00679779052734375,
-0.0288543701171875,
0.01340484619140625,
-0.0462646484375,
0.03875732421875,
0.0225830078125,
0.039154052734375,
-0.01910400390625,
0.0065460205078125,
-0.043975830078125,
0.036163330078125,
-0.001422882080078125,
-0.0143890380859375,
-0.0284271240234375,
-0.00627899169921875,
-0.0626220703125,
-0.0521240234375,
0.055877685546875,
-0.0015459060668945312,
-0.012725830078125,
-0.006961822509765625,
-0.036529541015625,
0.015106201171875,
0.08392333984375,
-0.0023899078369140625,
-0.0181121826171875,
0.0169830322265625,
0.01056671142578125,
-0.026031494140625,
-0.017974853515625,
-0.035919189453125,
-0.007656097412109375,
-0.08428955078125,
0.004306793212890625,
-0.00836944580078125,
-0.0271759033203125,
-0.0182037353515625,
0.049468994140625,
-0.06005859375,
-0.03717041015625,
0.046875,
0.024261474609375,
0.00292205810546875,
0.0258026123046875,
0.0076446533203125,
-0.0006227493286132812,
-0.039520263671875,
0.0233001708984375,
-0.08282470703125,
-0.0282135009765625,
0.027069091796875,
0.04864501953125,
-0.01084136962890625,
-0.022430419921875,
-0.01690673828125,
0.045684814453125,
0.01812744140625,
0.043121337890625,
-0.006191253662109375,
-0.0240325927734375,
-0.0147552490234375,
0.007366180419921875,
0.0235443115234375,
-0.0238494873046875,
-0.0007042884826660156,
-0.01264190673828125,
0.0257720947265625,
0.003368377685546875,
-0.05914306640625,
-0.00848388671875,
-0.0474853515625,
-0.0037670135498046875,
0.003997802734375,
0.0134124755859375,
-0.0199737548828125,
0.043548583984375,
-0.022308349609375,
-0.000049591064453125,
-0.003814697265625,
-0.036407470703125,
0.04736328125,
0.024261474609375,
0.004947662353515625,
0.011566162109375,
0.0692138671875,
0.005527496337890625,
-0.03515625,
-0.0684814453125,
-0.0128936767578125,
0.037994384765625,
0.00893402099609375,
0.036712646484375,
0.015380859375,
-0.0335693359375,
0.060577392578125,
0.0094757080078125,
-0.00934600830078125,
-0.020782470703125,
0.05181884765625,
0.00870513916015625,
0.038818359375,
-0.02197265625,
-0.0106048583984375,
0.02044677734375,
0.01202392578125,
-0.01169586181640625,
-0.038604736328125,
0.035858154296875,
0.08880615234375,
-0.037841796875,
0.0263824462890625,
-0.050384521484375,
-0.0221710205078125,
0.01457977294921875,
-0.0283050537109375,
0.024810791015625,
-0.00537109375,
-0.00237274169921875,
0.0046844482421875,
0.025726318359375,
0.028411865234375,
0.016693115234375,
0.0252685546875,
-0.018798828125,
0.039276123046875,
0.0374755859375,
0.03411865234375,
-0.004825592041015625,
0.007747650146484375,
0.0188446044921875,
-0.0321044921875,
-0.0418701171875,
-0.03326416015625,
-0.0245819091796875,
0.01290130615234375,
0.0477294921875,
-0.03460693359375,
0.035888671875,
0.058990478515625,
-0.01497650146484375,
0.01885986328125,
-0.023895263671875,
0.02520751953125,
-0.042449951171875,
0.027191162109375,
-0.0008292198181152344,
0.0009074211120605469,
-0.008575439453125,
0.06939697265625,
0.0175628662109375,
0.025604248046875,
-0.0164947509765625,
0.04217529296875,
0.0064849853515625,
0.060150146484375,
0.0132904052734375,
-0.0181121826171875,
-0.01528167724609375,
0.05859375,
-0.032440185546875,
-0.00585174560546875,
-0.0242156982421875,
-0.005481719970703125,
0.0009150505065917969,
-0.01116943359375,
0.019439697265625,
0.0362548828125,
0.0193634033203125,
-0.0218353271484375,
-0.0006046295166015625,
0.052337646484375,
0.0443115234375,
-0.004154205322265625,
-0.0528564453125,
-0.004085540771484375,
0.0604248046875,
-0.01544189453125,
0.0239410400390625,
-0.060791015625,
0.054229736328125,
-0.0173187255859375,
0.055023193359375,
-0.01910400390625,
-0.047027587890625,
0.036468505859375,
-0.026763916015625,
-0.0219879150390625,
0.0276947021484375,
0.00982666015625,
-0.0276947021484375,
-0.01641845703125,
0.0248565673828125,
-0.025146484375,
0.0517578125,
-0.038055419921875,
-0.007549285888671875,
-0.04522705078125,
0.0160675048828125,
0.05389404296875,
0.050201416015625,
-0.00952911376953125,
0.0001531839370727539,
-0.048126220703125,
-0.023590087890625,
-0.004604339599609375,
-0.031494140625,
-0.00673675537109375,
-0.011566162109375,
0.0251922607421875,
0.04736328125,
0.0110626220703125,
-0.046539306640625,
-0.04486083984375,
-0.042755126953125,
0.01483154296875,
0.011749267578125,
-0.0017518997192382812,
0.05999755859375,
-0.0191650390625,
0.07208251953125,
0.01068878173828125,
0.0178375244140625,
-0.01316070556640625,
-0.0360107421875,
0.0210113525390625,
-0.07537841796875,
-0.036376953125,
0.0216522216796875,
-0.0760498046875,
0.005840301513671875,
-0.004364013671875,
0.0017595291137695312,
0.04052734375,
-0.0305633544921875,
-0.0216827392578125,
-0.01227569580078125,
0.0068206787109375,
-0.013824462890625,
0.03704833984375,
0.02886962890625,
-0.006565093994140625,
0.0208282470703125,
-0.00617218017578125,
0.01166534423828125,
-0.0126953125,
-0.01605224609375,
0.0041046142578125,
-0.0016527175903320312,
-0.01611328125,
0.010345458984375,
0.053436279296875,
0.0287933349609375,
0.05523681640625,
-0.0023193359375,
0.035125732421875,
0.035919189453125,
-0.0023899078369140625,
-0.017547607421875,
-0.0043182373046875,
0.04248046875,
-0.004055023193359375,
-0.013885498046875,
0.032989501953125,
-0.01306915283203125,
-0.0041656494140625,
0.01551055908203125,
0.045684814453125,
-0.044189453125,
0.004131317138671875,
0.0161895751953125,
-0.004825592041015625,
0.0016832351684570312,
0.0032138824462890625,
0.01221466064453125,
0.0071563720703125,
-0.0017175674438476562,
-0.01461029052734375,
-0.0305633544921875,
-0.004375457763671875,
-0.0012388229370117188,
-0.006359100341796875,
-0.002002716064453125,
0.0142059326171875,
-0.0033779144287109375,
-0.0282745361328125,
-0.0111083984375,
0.0202484130859375,
-0.012542724609375,
-0.01279449462890625,
-0.011810302734375,
-0.0178070068359375,
-0.0021457672119140625,
-0.07958984375,
-0.006633758544921875,
-0.052337646484375,
0.0145111083984375,
0.0175018310546875,
0.015411376953125,
0.01454925537109375,
0.0195770263671875,
0.01213836669921875,
-0.01568603515625,
-0.00923919677734375,
-0.01171112060546875,
-0.0286712646484375,
-0.042388916015625,
-0.01751708984375,
0.042938232421875,
0.0119476318359375,
0.0210418701171875,
0.0236663818359375,
-0.040283203125,
-0.01080322265625,
-0.027374267578125,
0.057769775390625,
-0.033111572265625,
-0.007305145263671875,
0.0162811279296875,
0.043548583984375,
-0.001880645751953125,
-0.0019702911376953125,
-0.0160369873046875,
-0.029693603515625,
-0.0029582977294921875,
-0.0211029052734375,
-0.020172119140625,
0.02093505859375,
-0.0101776123046875,
-0.049530029296875,
0.048797607421875,
0.01983642578125,
-0.000048995018005371094,
0.006160736083984375,
0.0215911865234375,
-0.0416259765625,
-0.00144195556640625,
-0.03619384765625,
0.0390625,
0.005664825439453125,
0.046112060546875,
-0.08221435546875,
-0.021881103515625,
0.00677490234375,
0.06689453125,
0.05706787109375,
0.0054473876953125,
-0.0299835205078125,
-0.042388916015625,
0.050140380859375,
0.0706787109375,
0.0200347900390625,
0.01641845703125,
0.0126953125,
0.0455322265625,
0.0462646484375,
-0.0272216796875,
0.0247344970703125,
0.0171966552734375,
-0.01532745361328125,
0.05377197265625,
-0.0020771026611328125,
-0.01036834716796875,
-0.0005826950073242188,
-0.02825927734375,
-0.008758544921875,
-0.00650787353515625,
-0.00604248046875,
-0.02044677734375,
0.0279693603515625,
0.033660888671875,
0.08251953125,
-0.09991455078125,
-0.06646728515625,
-0.0199127197265625,
0.05206298828125,
0.01184844970703125,
0.021697998046875,
0.0097198486328125,
0.019561767578125,
0.0408935546875,
-0.06005859375,
0.0029354095458984375,
-0.0012149810791015625,
-0.0482177734375,
0.0693359375,
0.015106201171875,
-0.007541656494140625,
-0.063720703125,
0.008758544921875,
0.05596923828125,
0.08135986328125,
-0.06243896484375,
-0.005825042724609375,
-0.01122283935546875,
-0.015625,
-0.01027679443359375,
-0.026824951171875,
-0.0262451171875,
0.040771484375,
0.037567138671875,
-0.03936767578125,
0.0128631591796875,
0.0404052734375,
0.0175018310546875,
0.0004906654357910156,
0.023284912109375,
-0.038177490234375,
-0.003803253173828125,
-0.019561767578125,
-0.0245208740234375,
0.0052032470703125,
0.023406982421875,
0.0228729248046875,
0.0212554931640625,
-0.015899658203125,
-0.0014829635620117188,
0.0092620849609375,
0.0197296142578125,
0.0031414031982421875,
-0.00333404541015625,
-0.01140594482421875,
-0.014251708984375,
-0.0117950439453125,
0.01317596435546875,
0.0082855224609375,
0.0022754669189453125,
0.02532958984375,
0.032806396484375,
-0.005126953125,
-0.0171966552734375,
0.026519775390625,
-0.018402099609375,
-0.06683349609375,
-0.045166015625,
0.0022144317626953125,
0.0191650390625,
0.0083770751953125,
0.039093017578125,
0.037200927734375,
-0.01100921630859375,
0.002643585205078125,
0.0391845703125,
0.00586700439453125,
0.00251007080078125,
0.044189453125,
-0.00982666015625,
0.054779052734375,
0.01184844970703125,
-0.07427978515625,
-0.016998291015625,
-0.029052734375,
-0.04986572265625,
0.0163421630859375,
0.0491943359375,
-0.015777587890625,
-0.005489349365234375,
-0.013763427734375,
-0.0092926025390625,
0.0106048583984375,
-0.00737762451171875,
0.0135040283203125,
0.0012083053588867188,
0.016357421875,
-0.005096435546875,
-0.039886474609375,
-0.01313018798828125,
0.01334381103515625,
0.00009906291961669922,
-0.0216064453125,
0.03570556640625,
0.00916290283203125,
-0.0035953521728515625,
-0.032562255859375,
0.0433349609375,
-0.05950927734375,
-0.0275421142578125,
0.039093017578125,
-0.003276824951171875,
0.0012149810791015625,
-0.007556915283203125,
-0.00322723388671875,
-0.01045989990234375,
0.05804443359375,
-0.0460205078125,
-0.0148162841796875,
-0.0172271728515625,
0.03546142578125,
-0.0242156982421875,
-0.015960693359375,
-0.04644775390625,
0.034881591796875,
0.030731201171875,
-0.043701171875,
0.022735595703125,
-0.05426025390625,
0.0258941650390625,
-0.0003502368927001953,
0.0308380126953125,
-0.034027099609375,
0.05059814453125,
-0.03350830078125,
0.1038818359375,
0.05010986328125,
-0.0240020751953125,
0.0026454925537109375,
-0.0239410400390625,
-0.0091094970703125,
-0.011749267578125,
0.02349853515625,
-0.0413818359375,
0.00435638427734375,
0.0196990966796875,
-0.0230560302734375,
-0.0005822181701660156,
0.0233306884765625,
-0.01324462890625,
0.006519317626953125,
0.01458740234375,
-0.0157928466796875,
-0.002490997314453125,
-0.01934814453125,
-0.021636962890625,
-0.0143585205078125,
-0.0164794921875,
0.0018482208251953125,
-0.01139068603515625,
-0.05804443359375,
-0.044464111328125,
-0.010009765625,
-0.00608062744140625,
0.0174713134765625,
-0.07647705078125,
0.06195068359375,
-0.01751708984375,
-0.0145111083984375,
-0.024688720703125,
-0.039642333984375,
0.0241851806640625,
0.019317626953125,
0.004283905029296875,
0.005199432373046875,
0.0017004013061523438,
0.0010786056518554688,
0.039581298828125,
-0.0015544891357421875,
0.032928466796875,
0.00023090839385986328,
-0.0899658203125,
-0.01480865478515625,
-0.0179595947265625,
0.0185089111328125,
0.0079193115234375,
0.00885009765625,
0.050048828125,
0.0142059326171875,
-0.072021484375,
-0.08599853515625,
0.0261383056640625,
-0.0479736328125,
-0.0003261566162109375,
0.03900146484375,
-0.0178070068359375,
0.0186920166015625,
-0.02410888671875,
-0.08209228515625,
0.030364990234375,
-0.0054931640625,
-0.037689208984375,
-0.0455322265625,
-0.0025424957275390625,
0.000030934810638427734,
0.01171875,
0.00180816650390625,
-0.048980712890625,
-0.041412353515625,
0.0198974609375,
0.0025157928466796875,
0.0230865478515625,
0.0103302001953125,
0.0268402099609375,
-0.08038330078125,
0.004901885986328125,
-0.03826904296875,
-0.00875091552734375,
0.0008754730224609375,
0.006076812744140625,
0.0231475830078125,
0.0248565673828125,
-0.0221710205078125,
-0.0087890625,
0.0036182403564453125,
-0.01404571533203125,
-0.0293121337890625,
-0.00768280029296875,
-0.040618896484375,
-0.025177001953125,
0.039520263671875,
0.10260009765625,
0.015899658203125,
-0.03778076171875,
-0.0188446044921875,
-0.0294036865234375,
-0.018829345703125,
-0.0116729736328125,
0.02435302734375,
-0.05804443359375,
-0.008148193359375,
0.01073455810546875,
-0.00659942626953125,
0.030487060546875,
-0.0020732879638671875,
-0.0130615234375,
-0.001201629638671875,
0.0019969940185546875,
0.0004143714904785156,
-0.08245849609375,
0.043792724609375,
0.03558349609375,
-0.05462646484375,
-0.04095458984375,
0.000698089599609375,
-0.006679534912109375,
-0.020904541015625,
-0.040802001953125,
-0.0189971923828125,
0.011932373046875,
-0.00319671630859375,
-0.031646728515625,
0.005626678466796875,
-0.0015926361083984375,
0.0364990234375,
0.0066680908203125,
0.00836944580078125,
0.0174407958984375,
-0.0168609619140625,
0.007312774658203125,
0.0012264251708984375,
0.02947998046875,
-0.021484375,
0.068603515625,
0.0010738372802734375,
0.07916259765625,
-0.01251983642578125,
0.03619384765625,
0.01309967041015625,
-0.01446533203125,
0.039154052734375,
-0.007740020751953125,
-0.00037169456481933594,
-0.0216522216796875,
-0.047393798828125,
-0.04095458984375,
-0.034820556640625,
-0.015960693359375,
-0.029296875,
0.003536224365234375
] |
168ebe9de1195666c4f69620c06c3aad90213cc5
|
Wordpress Stackexchange
Q: How to trigger 404 for custom query var? How can you trigger a 404 when using custom query vars? I've got re-write rules written for a custom query var, but if you were to request a URL for the query var that should technically be a 404 it returns a normal WP page, but no content, because nothing technically exists for the URL.
A: There is an action specifically for this:
function my_parse_query( $wp_query ) {
if ( $wp_query->get( 'my_custom_var' ) > 42 ) {
$wp_query->set_404();
status_header( 404 );
}
}
add_action( 'parse_query', 'my_parse_query' );
That should load the 404.php template in your theme, if you have it. Otherwise, it will fall back to index.php.
This will also trigger a HTTP 404 status code.
For more information see parse_query.
|
Q: How to trigger 404 for custom query var? How can you trigger a 404 when using custom query vars? I've got re-write rules written for a custom query var, but if you were to request a URL for the query var that should technically be a 404 it returns a normal WP page, but no content, because nothing technically exists for the URL.
A: There is an action specifically for this:
function my_parse_query( $wp_query ) {
if ( $wp_query->get( 'my_custom_var' ) > 42 ) {
$wp_query->set_404();
status_header( 404 );
}
}
add_action( 'parse_query', 'my_parse_query' );
That should load the 404.php template in your theme, if you have it. Otherwise, it will fall back to index.php.
This will also trigger a HTTP 404 status code.
For more information see parse_query.
A: Add a 404.php to your theme and look if it is called.
Sample 404.php
<!doctype>
<title>404</title>
<p>404 – Mwah!</p>
What is more important: the real HTTP headers, here the status code. You can see it with your browsers developer tools under network. Here is a screen shot for http://wordpress.stackexchange.com/404 in Opera Dragonfly:
See full size image
If you still get a status code 200, look into the global variables $wp and $wp_query. They will tell you more details about the fetched resource.
|
wordpress
|
{
"language": "en",
"length": 213,
"provenance": "stackexchange_00019.jsonl.gz:408110",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13161"
}
|
[
0.08673095703125,
-0.01406097412109375,
0.01523590087890625,
-0.07818603515625,
0.01378631591796875,
-0.0128631591796875,
0.01328277587890625,
0.0172576904296875,
-0.0262908935546875,
0.025146484375,
0.0012798309326171875,
0.004734039306640625,
0.0157623291015625,
-0.0225677490234375,
-0.0011234283447265625,
-0.02484130859375,
0.0293121337890625,
-0.030059814453125,
0.0026988983154296875,
-0.01491546630859375,
0.019317626953125,
-0.006725311279296875,
0.0237579345703125,
0.0300750732421875,
-0.0156097412109375,
0.048553466796875,
0.0758056640625,
-0.027801513671875,
-0.01384735107421875,
-0.0182647705078125,
-0.002094268798828125,
-0.0114898681640625,
0.0132293701171875,
0.020538330078125,
-0.0019969940185546875,
0.020721435546875,
-0.006103515625,
0.01123809814453125,
0.006313323974609375,
0.016754150390625,
0.04632568359375,
-0.03790283203125,
0.0257720947265625,
0.01020050048828125,
0.0106048583984375,
-0.0160369873046875,
0.03680419921875,
-0.061859130859375,
0.030364990234375,
0.00437164306640625,
-0.0185394287109375,
0.018280029296875,
-0.003055572509765625,
-0.06207275390625,
-0.00878143310546875,
-0.03887939453125,
0.044189453125,
-0.0208587646484375,
0.0099639892578125,
-0.0299835205078125,
-0.0157928466796875,
0.0222625732421875,
0.036224365234375,
0.02117919921875,
0.01155853271484375,
-0.004791259765625,
-0.032501220703125,
0.0225982666015625,
-0.03143310546875,
-0.0067596435546875,
0.0020732879638671875,
-0.04547119140625,
-0.0006537437438964844,
0.01197052001953125,
0.00020933151245117188,
-0.051300048828125,
0.0117034912109375,
-0.032623291015625,
0.018402099609375,
0.036346435546875,
0.04937744140625,
0.0028057098388671875,
-0.038330078125,
0.01372528076171875,
0.030975341796875,
0.03692626953125,
0.0012674331665039062,
-0.042816162109375,
-0.032318115234375,
-0.0281524658203125,
-0.017120361328125,
-0.046356201171875,
-0.05926513671875,
0.00974273681640625,
0.0146026611328125,
-0.02911376953125,
0.01543426513671875,
0.01552581787109375,
-0.02099609375,
-0.002666473388671875,
-0.020782470703125,
-0.006893157958984375,
-0.00445556640625,
-0.007617950439453125,
-0.01464080810546875,
0.01708984375,
0.0504150390625,
0.0300445556640625,
0.01702880859375,
0.004497528076171875,
-0.0011644363403320312,
0.0673828125,
-0.04241943359375,
0.026519775390625,
-0.061309814453125,
0.01230621337890625,
-0.0345458984375,
-0.06988525390625,
-0.03564453125,
-0.024749755859375,
0.0067138671875,
0.025054931640625,
0.0191192626953125,
-0.0123138427734375,
-0.01045989990234375,
-0.0292816162109375,
-0.005756378173828125,
-0.03515625,
0.035003662109375,
0.0197296142578125,
-0.0181884765625,
0.014801025390625,
-0.00609588623046875,
-0.0178680419921875,
-0.0269622802734375,
-0.019989013671875,
0.039703369140625,
0.0014591217041015625,
0.02001953125,
0.01074981689453125,
0.0384521484375,
-0.01338958740234375,
-0.005275726318359375,
0.0380859375,
-0.00955963134765625,
0.0292205810546875,
0.0266571044921875,
0.008544921875,
-0.014404296875,
-0.07489013671875,
0.00652313232421875,
0.008392333984375,
0.044189453125,
-0.007213592529296875,
-0.052459716796875,
-0.0030002593994140625,
0.0089263916015625,
-0.024993896484375,
-0.038330078125,
-0.041839599609375,
-0.009613037109375,
0.00002485513687133789,
0.024871826171875,
0.001983642578125,
0.01568603515625,
-0.0294342041015625,
-0.01412200927734375,
0.01035308837890625,
0.007366180419921875,
0.065185546875,
-0.0312042236328125,
-0.015228271484375,
-0.02227783203125,
-0.0009255409240722656,
-0.015106201171875,
-0.007015228271484375,
0.0313720703125,
0.0113372802734375,
-0.005828857421875,
0.03826904296875,
-0.0010480880737304688,
-0.0435791015625,
0.0325927734375,
-0.01294708251953125,
-0.050994873046875,
0.08331298828125,
-0.003108978271484375,
0.061859130859375,
-0.0025501251220703125,
-0.004673004150390625,
0.0182342529296875,
0.043304443359375,
-0.0174407958984375,
0.053070068359375,
0.003269195556640625,
-0.019073486328125,
-0.0224761962890625,
0.00789642333984375,
-0.014923095703125,
-0.014739990234375,
-0.007183074951171875,
0.03594970703125,
-0.017181396484375,
0.031005859375,
-0.046417236328125,
0.0301361083984375,
-0.0194091796875,
0.031646728515625,
0.01110076904296875,
0.03125,
0.01279449462890625,
0.030487060546875,
-0.03839111328125,
-0.00243377685546875,
-0.01270294189453125,
0.020050048828125,
0.0156402587890625,
0.023956298828125,
-0.00862884521484375,
0.016357421875,
-0.01366424560546875,
-0.00933837890625,
-0.02545166015625,
0.018585205078125,
0.0239715576171875,
-0.0313720703125,
-0.0002586841583251953,
-0.0119171142578125,
0.059967041015625,
0.0008573532104492188,
0.01183319091796875,
0.010528564453125,
0.0355224609375,
0.01453399658203125,
-0.01494598388671875,
0.0011444091796875,
0.01006317138671875,
-0.0755615234375,
-0.01177978515625,
0.052764892578125,
0.01922607421875,
0.0042724609375,
-0.0307464599609375,
-0.03656005859375,
0.00557708740234375,
-0.022705078125,
0.01155853271484375,
-0.0159759521484375,
0.018280029296875,
-0.0013303756713867188,
0.007266998291015625,
-0.040283203125,
0.0186004638671875,
-0.0237274169921875,
0.0151214599609375,
0.012054443359375,
-0.0089874267578125,
-0.01340484619140625,
-0.0328369140625,
0.0406494140625,
-0.005435943603515625,
0.01375579833984375,
-0.00970458984375,
0.0011692047119140625,
0.0128021240234375,
0.01012420654296875,
0.0209808349609375,
0.0280914306640625,
-0.004070281982421875,
0.0034084320068359375,
-0.0015926361083984375,
-0.049346923828125,
0.0065460205078125,
0.0440673828125,
0.0007066726684570312,
-0.006793975830078125,
-0.0143890380859375,
-0.0062103271484375,
0.0174560546875,
0.0182952880859375,
-0.007167816162109375,
0.0693359375,
-0.05657958984375,
-0.0199737548828125,
-0.0286102294921875,
-0.021820068359375,
-0.0180511474609375,
-0.0016736984252929688,
0.026580810546875,
-0.0035800933837890625,
0.0245361328125,
0.031982421875,
-0.0191192626953125,
0.054443359375,
-0.00921630859375,
-0.0253753662109375,
-0.0200958251953125,
-0.07330322265625,
0.055908203125,
-0.042694091796875,
0.044219970703125,
0.09234619140625,
-0.00013267993927001953,
0.0188751220703125,
0.0243072509765625,
-0.0003688335418701172,
0.036041259765625,
0.002033233642578125,
0.0028896331787109375,
0.0276336669921875,
-0.06884765625,
-0.015960693359375,
0.0400390625,
0.00732421875,
0.053009033203125,
-0.00928497314453125,
0.036285400390625,
0.03466796875,
-0.038330078125,
-0.09130859375,
0.0293121337890625,
-0.01552581787109375,
0.0072479248046875,
-0.01515960693359375,
-0.00264739990234375,
-0.021240234375,
-0.0289154052734375,
-0.0047607421875,
0.00452423095703125,
-0.049072265625,
-0.058685302734375,
-0.0587158203125,
-0.0726318359375,
0.038177490234375,
0.01505279541015625,
0.0222930908203125,
0.004322052001953125,
0.06304931640625,
0.0122833251953125,
-0.0615234375,
0.01611328125,
-0.01122283935546875,
-0.023529052734375,
0.0191497802734375,
0.016387939453125,
0.01003265380859375,
0.06353759765625,
-0.007671356201171875,
0.037750244140625,
0.0615234375,
-0.054718017578125,
-0.0234527587890625,
-0.0217742919921875,
-0.0028858184814453125,
-0.0061798095703125,
0.047760009765625,
0.028594970703125,
-0.03143310546875,
0.03851318359375,
-0.044708251953125,
-0.04095458984375,
-0.0240020751953125,
-0.06304931640625,
0.00856781005859375,
0.052703857421875,
0.01505279541015625,
-0.037200927734375,
0.01371002197265625,
0.0213775634765625,
-0.01168060302734375,
0.025177001953125,
-0.018218994140625,
0.0282135009765625,
0.00629425048828125,
0.01885986328125,
-0.030731201171875,
0.060882568359375,
0.0026569366455078125,
0.0182342529296875,
0.04443359375,
0.0176544189453125,
0.00566864013671875,
-0.0181121826171875,
-0.060089111328125,
-0.0148773193359375,
0.0467529296875,
-0.00617218017578125,
0.018402099609375,
-0.02191162109375,
-0.035186767578125,
0.0002149343490600586,
0.067626953125,
-0.029144287109375,
-0.0205535888671875,
-0.028839111328125,
0.0040130615234375,
-0.01053619384765625,
-0.0509033203125,
0.00876617431640625,
-0.0111541748046875,
-0.039581298828125,
-0.0081939697265625,
-0.01438140869140625,
-0.033966064453125,
-0.0180816650390625,
0.00754547119140625,
-0.046539306640625,
-0.0267486572265625,
0.0228729248046875,
-0.07879638671875,
-0.011566162109375,
0.0236663818359375,
-0.0252532958984375,
-0.0178680419921875,
-0.009552001953125,
-0.04193115234375,
-0.0634765625,
-0.031890869140625,
0.008575439453125,
0.050384521484375,
0.0273284912109375,
-0.06304931640625,
-0.0012540817260742188,
0.03955078125,
0.0036945343017578125,
0.0217437744140625,
-0.0312042236328125,
-0.03387451171875,
0.0155181884765625,
0.039642333984375,
-0.0017833709716796875,
0.016326904296875,
0.006526947021484375,
0.0152740478515625,
-0.03369140625,
-0.005260467529296875,
-0.0234527587890625,
-0.043609619140625,
0.0204010009765625,
-0.060302734375,
-0.039886474609375,
-0.02105712890625,
-0.02801513671875,
-0.0012216567993164062,
-0.0170440673828125,
-0.0138397216796875,
0.02191162109375,
-0.031707763671875,
0.029083251953125,
-0.00010180473327636719,
-0.0200347900390625,
-0.01149749755859375,
0.0302581787109375,
0.03594970703125,
-0.025909423828125,
0.025909423828125,
0.005115509033203125,
0.02838134765625,
-0.01495361328125,
0.030853271484375,
0.01068115234375,
-0.01467132568359375,
0.03790283203125,
-0.0140533447265625,
-0.004486083984375,
-0.005779266357421875,
0.0218353271484375,
-0.006465911865234375,
-0.028533935546875,
0.02105712890625,
-0.026397705078125,
0.00936126708984375,
0.056854248046875,
-0.002895355224609375,
-0.056640625,
0.04046630859375,
0.056915283203125,
-0.09088134765625,
0.06695556640625,
-0.005016326904296875,
-0.03790283203125,
0.01287078857421875,
0.036041259765625,
0.004817962646484375,
0.028076171875,
-0.005096435546875,
0.0038394927978515625,
-0.01482391357421875,
0.038055419921875,
0.0140380859375,
0.035614013671875,
-0.0263671875,
0.05743408203125,
-0.007251739501953125,
0.005096435546875,
0.0125885009765625,
0.00850677490234375,
0.0635986328125,
0.0093536376953125,
-0.0224151611328125,
-0.0428466796875,
0.007648468017578125,
-0.0286712646484375,
0.0177154541015625,
-0.00494384765625,
0.0221405029296875,
0.045196533203125,
0.0008254051208496094,
0.02001953125,
0.01392364501953125,
-0.002048492431640625,
-0.03314208984375,
0.0258331298828125,
0.0226287841796875,
0.0141448974609375,
-0.0186004638671875,
0.0662841796875,
0.0400390625,
0.00653839111328125,
-0.030181884765625,
-0.047515869140625,
-0.01458740234375,
0.034698486328125,
0.047882080078125,
-0.055389404296875,
0.0086822509765625,
0.005748748779296875,
0.0254669189453125,
-0.046539306640625,
-0.0158233642578125,
-0.0059051513671875,
0.0287017822265625,
-0.0297393798828125,
-0.0244598388671875,
0.04681396484375,
-0.006275177001953125,
-0.0284881591796875,
0.020721435546875,
-0.0280609130859375,
-0.0153045654296875,
-0.06500244140625,
-0.050811767578125,
0.049896240234375,
0.02032470703125,
-0.01464080810546875,
0.051727294921875,
-0.038665771484375,
0.055419921875,
-0.00992584228515625,
0.03521728515625,
-0.01800537109375,
-0.020904541015625,
0.020782470703125,
-0.028411865234375,
-0.017059326171875,
0.01494598388671875,
0.042266845703125,
-0.047332763671875,
-0.035919189453125,
0.052398681640625,
-0.0016775131225585938,
-0.0020008087158203125,
-0.047576904296875,
0.0259246826171875,
0.01541900634765625,
-0.007904052734375,
0.046722412109375,
-0.00606536865234375,
-0.045013427734375,
0.005023956298828125,
-0.037750244140625,
0.00655364990234375,
0.0269775390625,
-0.0418701171875,
-0.003047943115234375,
-0.0244598388671875,
0.0205230712890625,
0.0248260498046875,
0.00647735595703125,
-0.020599365234375,
-0.040283203125,
0.02056884765625,
0.0301666259765625,
0.01465606689453125,
-0.01360321044921875,
0.039947509765625,
-0.01171875,
0.05084228515625,
0.01092529296875,
0.01097869873046875,
-0.0106353759765625,
-0.0240631103515625,
-0.0010471343994140625,
-0.039276123046875,
-0.00795745849609375,
-0.00997161865234375,
0.006244659423828125,
0.022613525390625,
0.02752685546875,
-0.0038204193115234375,
0.0257720947265625,
-0.0200653076171875,
0.0011138916015625,
-0.02349853515625,
0.0190277099609375,
-0.01088714599609375,
0.017974853515625,
0.01314544677734375,
-0.0006170272827148438,
0.0029315948486328125,
-0.0106201171875,
-0.00894927978515625,
-0.0287933349609375,
0.005344390869140625,
-0.0301361083984375,
0.0126190185546875,
-0.055328369140625,
0.003086090087890625,
0.0487060546875,
0.041473388671875,
0.05841064453125,
-0.0288848876953125,
0.032989501953125,
0.023101806640625,
0.046905517578125,
-0.0107879638671875,
-0.037017822265625,
0.035400390625,
0.00782012939453125,
-0.01448822021484375,
0.0188446044921875,
-0.020416259765625,
0.022918701171875,
0.080322265625,
0.04791259765625,
-0.1256103515625,
0.0052337646484375,
-0.00934600830078125,
0.006793975830078125,
0.03521728515625,
0.00736236572265625,
-0.005191802978515625,
-0.005035400390625,
-0.01294708251953125,
-0.0016908645629882812,
-0.0230255126953125,
-0.01024627685546875,
0.0168304443359375,
-0.00615692138671875,
-0.01119232177734375,
0.00693511962890625,
-0.00833892822265625,
-0.007373809814453125,
-0.007198333740234375,
0.019989013671875,
-0.01099395751953125,
-0.002819061279296875,
0.0252227783203125,
-0.0026073455810546875,
0.015594482421875,
-0.0023021697998046875,
0.0576171875,
-0.041900634765625,
0.0064697265625,
0.00803375244140625,
0.0259552001953125,
0.027862548828125,
0.0360107421875,
0.0126495361328125,
-0.028533935546875,
0.01003265380859375,
-0.02777099609375,
0.06243896484375,
-0.0143890380859375,
0.000042498111724853516,
0.0269317626953125,
-0.040130615234375,
-0.01263427734375,
-0.0182037353515625,
0.01678466796875,
0.0014095306396484375,
0.015533447265625,
0.06817626953125,
-0.0380859375,
-0.02032470703125,
0.0279388427734375,
-0.00894927978515625,
0.0005259513854980469,
-0.0176544189453125,
0.0055694580078125,
-0.055755615234375,
-0.0156707763671875,
-0.017730712890625,
-0.0208740234375,
0.0117034912109375,
-0.029052734375,
-0.0200347900390625,
0.07305908203125,
-0.00934600830078125,
0.0022602081298828125,
0.041748046875,
0.02105712890625,
-0.031494140625,
0.00803375244140625,
-0.04583740234375,
0.0789794921875,
0.02777099609375,
0.09283447265625,
-0.056854248046875,
-0.0269012451171875,
0.06268310546875,
0.04083251953125,
0.0673828125,
0.008544921875,
-0.038726806640625,
-0.00472259521484375,
0.07769775390625,
0.042938232421875,
0.00598907470703125,
0.04974365234375,
-0.00444793701171875,
0.0499267578125,
0.05810546875,
-0.03668212890625,
0.0253448486328125,
0.0224761962890625,
-0.0345458984375,
0.0193634033203125,
0.01806640625,
0.0188751220703125,
0.00316619873046875,
0.0158843994140625,
-0.006313323974609375,
-0.00260162353515625,
0.0228118896484375,
-0.00438690185546875,
-0.0009489059448242188,
0.0701904296875,
0.06072998046875,
-0.006237030029296875,
-0.0037250518798828125,
-0.040496826171875,
0.05810546875,
0.01548004150390625,
0.019134521484375,
-0.01153564453125,
0.0036449432373046875,
0.0279083251953125,
-0.01885986328125,
-0.00220489501953125,
0.03778076171875,
-0.019805908203125,
0.06866455078125,
0.0312347412109375,
0.0166473388671875,
-0.0421142578125,
0.005496978759765625,
0.0302581787109375,
0.08087158203125,
-0.0614013671875,
-0.0718994140625,
0.00777435302734375,
-0.0018177032470703125,
-0.0005822181701660156,
0.01702880859375,
-0.016876220703125,
-0.0026683807373046875,
0.047027587890625,
-0.021942138671875,
0.0033626556396484375,
0.01513671875,
-0.005401611328125,
-0.0102691650390625,
-0.007171630859375,
0.00920867919921875,
0.0163726806640625,
-0.01141357421875,
-0.05426025390625,
-0.005962371826171875,
0.05731201171875,
0.044281005859375,
0.0189208984375,
-0.020782470703125,
-0.03802490234375,
0.0116424560546875,
0.06689453125,
-0.0033817291259765625,
-0.006290435791015625,
-0.01708984375,
-0.061859130859375,
-0.0120849609375,
0.02081298828125,
0.01434326171875,
0.0012159347534179688,
-0.0015020370483398438,
-0.0149078369140625,
0.00440216064453125,
0.006938934326171875,
0.004795074462890625,
-0.0242767333984375,
0.0103302001953125,
-0.040557861328125,
0.029510498046875,
0.00858306884765625,
0.00405120849609375,
-0.00624847412109375,
0.00811767578125,
0.0185089111328125,
0.02349853515625,
-0.003635406494140625,
0.01953125,
-0.024993896484375,
0.0311279296875,
-0.01885986328125,
0.05255126953125,
0.0282745361328125,
-0.055023193359375,
-0.015777587890625,
-0.01148223876953125,
-0.046905517578125,
0.0219879150390625,
0.0494384765625,
0.01096343994140625,
-0.0218658447265625,
0.0190887451171875,
-0.0295867919921875,
0.0216217041015625,
0.0027103424072265625,
0.0047607421875,
-0.01422882080078125,
0.01512908935546875,
-0.007190704345703125,
-0.01021575927734375,
-0.0210723876953125,
-0.00003635883331298828,
0.053741455078125,
0.0020618438720703125,
0.08221435546875,
-0.044342041015625,
0.017425537109375,
0.0260162353515625,
0.0302886962890625,
-0.0171356201171875,
0.0243988037109375,
-0.001659393310546875,
-0.00856781005859375,
0.0076141357421875,
-0.02099609375,
-0.031005859375,
0.025787353515625,
0.0298919677734375,
-0.01505279541015625,
0.0230560302734375,
-0.0008687973022460938,
0.01074981689453125,
-0.012237548828125,
-0.0292205810546875,
-0.047454833984375,
-0.035552978515625,
-0.0411376953125,
-0.032989501953125,
0.0157623291015625,
-0.012054443359375,
-0.01910400390625,
0.040496826171875,
-0.01537322998046875,
-0.045257568359375,
0.035614013671875,
-0.082275390625,
0.06732177734375,
0.054718017578125,
0.00009542703628540039,
0.0098419189453125,
-0.029144287109375,
-0.0306243896484375,
-0.007549285888671875,
-0.00011134147644042969,
-0.0355224609375,
-0.01029205322265625,
0.01409149169921875,
-0.014312744140625,
-0.0960693359375,
0.0130462646484375,
-0.00870513916015625,
-0.0236663818359375,
-0.07794189453125,
0.040924072265625,
0.00035452842712402344,
-0.047210693359375,
-0.01268768310546875,
0.006175994873046875,
-0.018829345703125,
0.0284576416015625,
0.0298919677734375,
-0.00676727294921875,
-0.0030670166015625,
0.0223236083984375,
0.0261993408203125,
0.01209259033203125,
-0.0736083984375,
0.060791015625,
-0.04827880859375,
0.0296173095703125,
-0.006015777587890625,
0.0216522216796875,
-0.007083892822265625,
0.051666259765625,
-0.01555633544921875,
0.0281829833984375,
-0.0263671875,
-0.029052734375,
0.0009741783142089844,
0.021270751953125,
0.06378173828125,
-0.0108642578125,
-0.059112548828125,
-0.004291534423828125,
-0.0181732177734375,
0.037872314453125,
-0.029083251953125,
-0.01128387451171875,
0.0232391357421875,
-0.005733489990234375,
-0.0305328369140625,
-0.0219573974609375,
0.0215301513671875,
-0.052032470703125,
-0.00899505615234375,
0.00011283159255981445,
0.0305023193359375,
0.056396484375,
-0.017669677734375,
-0.08154296875,
0.01629638671875,
-0.01201629638671875,
-0.0302581787109375,
-0.0090484619140625,
0.035858154296875,
0.01175689697265625,
-0.05328369140625,
-0.027069091796875,
0.015838623046875,
-0.0157318115234375,
-0.0238494873046875,
0.03961181640625,
0.0172882080078125,
0.0260009765625,
0.06256103515625,
-0.072021484375,
0.034332275390625,
0.0013113021850585938,
0.0164337158203125,
-0.0306854248046875,
0.001186370849609375,
0.00787353515625,
0.0156402587890625,
-0.041046142578125,
-0.008392333984375,
0.01366424560546875,
0.0184783935546875,
-0.035003662109375,
-0.00585174560546875,
0.01485443115234375,
0.00527191162109375,
0.08447265625,
0.026214599609375,
0.00130462646484375,
-0.0183868408203125,
-0.046875,
-0.06365966796875,
0.00493621826171875,
-0.05865478515625,
0.01332855224609375,
-0.09942626953125,
-0.0281219482421875,
0.034881591796875,
-0.0178680419921875,
0.015106201171875,
-0.0284881591796875,
-0.030853271484375,
0.01332855224609375,
0.005657196044921875,
-0.00102996826171875,
-0.033966064453125,
0.005825042724609375,
0.048553466796875,
-0.040557861328125,
-0.022186279296875,
-0.01385498046875,
0.0224761962890625,
-0.0009455680847167969,
-0.06134033203125,
0.0050048828125,
0.0201263427734375,
-0.0308074951171875,
0.0137481689453125,
-0.0030879974365234375,
-0.026092529296875,
-0.014739990234375,
-0.00719451904296875,
-0.0032978057861328125,
0.031524658203125,
-0.004993438720703125,
0.022613525390625,
0.0010004043579101562,
0.0286865234375,
0.012969970703125,
0.040740966796875,
-0.0035800933837890625,
0.041839599609375,
0.00853729248046875,
0.057464599609375,
0.0171356201171875,
-0.02227783203125,
0.04583740234375,
-0.043487548828125,
0.00872802734375,
0.0014562606811523438,
-0.01502227783203125,
-0.03302001953125,
0.009033203125,
0.0253753662109375,
-0.00933837890625,
0.024505615234375
] |
0375555724ff44c9b60eacbf995f94763ea4f368
|
Wordpress Stackexchange
Q: How can a plugin create a page/form in the front end? How can a plugin create a page/form in the front end thats not listed in pages (if possible). it should only be accessed through a direct link.
A: See How do you create a “virtual” page in WordPress for the solution. This should work for your case as well.
|
Q: How can a plugin create a page/form in the front end? How can a plugin create a page/form in the front end thats not listed in pages (if possible). it should only be accessed through a direct link.
A: See How do you create a “virtual” page in WordPress for the solution. This should work for your case as well.
|
wordpress
|
{
"language": "en",
"length": 61,
"provenance": "stackexchange_00019.jsonl.gz:408122",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13206"
}
|
[
0.0462646484375,
0.0161285400390625,
-0.0236968994140625,
-0.035552978515625,
0.0167236328125,
-0.042449951171875,
0.00009077787399291992,
-0.010986328125,
0.00489044189453125,
-0.04107666015625,
-0.0340576171875,
-0.0099029541015625,
-0.040985107421875,
-0.039947509765625,
0.0234527587890625,
-0.054168701171875,
0.0179290771484375,
0.011993408203125,
0.04132080078125,
-0.02325439453125,
0.053375244140625,
-0.01316070556640625,
0.0287322998046875,
0.069580078125,
0.031097412109375,
0.00302886962890625,
0.0394287109375,
-0.01416778564453125,
-0.0005998611450195312,
-0.017120361328125,
0.0257415771484375,
-0.00484466552734375,
0.023406982421875,
-0.0150604248046875,
0.006259918212890625,
-0.008392333984375,
0.02880859375,
-0.01287078857421875,
0.0175018310546875,
0.0028514862060546875,
0.057373046875,
-0.0189208984375,
-0.0111083984375,
0.04766845703125,
-0.02728271484375,
-0.0584716796875,
0.059478759765625,
-0.0265350341796875,
0.004871368408203125,
-0.0020580291748046875,
-0.0190887451171875,
0.003116607666015625,
-0.0087127685546875,
-0.0022754669189453125,
-0.0028057098388671875,
-0.0233612060546875,
0.00801849365234375,
-0.022613525390625,
0.0236968994140625,
0.0027008056640625,
-0.017608642578125,
-0.0115966796875,
0.0253753662109375,
-0.00405120849609375,
0.03033447265625,
-0.009429931640625,
-0.07135009765625,
0.045166015625,
-0.01181793212890625,
0.0543212890625,
0.01255035400390625,
-0.052337646484375,
0.029022216796875,
0.0093994140625,
-0.03460693359375,
-0.0269775390625,
0.035430908203125,
0.03314208984375,
0.0181884765625,
-0.023773193359375,
-0.0282440185546875,
0.00528717041015625,
-0.047607421875,
-0.04718017578125,
0.002197265625,
-0.0142669677734375,
-0.02850341796875,
0.004608154296875,
-0.043548583984375,
0.01131439208984375,
-0.02130126953125,
-0.036468505859375,
-0.039703369140625,
0.041778564453125,
0.01100921630859375,
0.01226806640625,
0.030487060546875,
0.01541900634765625,
0.036407470703125,
0.041717529296875,
0.0254669189453125,
-0.08551025390625,
0.10015869140625,
-0.045257568359375,
0.0009393692016601562,
0.0648193359375,
0.0032558441162109375,
-0.0075225830078125,
0.01305389404296875,
-0.00794219970703125,
0.01007843017578125,
0.0186920166015625,
-0.02166748046875,
-0.030609130859375,
0.007579803466796875,
0.0308380126953125,
-0.0310211181640625,
0.01739501953125,
0.0012941360473632812,
0.022430419921875,
-0.0174560546875,
0.0122222900390625,
0.025604248046875,
-0.03955078125,
0.00809478759765625,
0.006683349609375,
-0.0022106170654296875,
-0.055908203125,
0.049530029296875,
0.022186279296875,
-0.0440673828125,
0.00812530517578125,
0.06280517578125,
-0.01134490966796875,
-0.00038909912109375,
-0.0204010009765625,
-0.0215301513671875,
-0.00714111328125,
-0.00994110107421875,
-0.007587432861328125,
-0.002384185791015625,
-0.01261138916015625,
0.0484619140625,
-0.0200042724609375,
-0.01311492919921875,
0.01247406005859375,
0.0171966552734375,
0.016204833984375,
-0.01366424560546875,
-0.03143310546875,
-0.0170440673828125,
-0.0252532958984375,
-0.01451873779296875,
0.0164031982421875,
0.055450439453125,
0.00847625732421875,
0.043121337890625,
0.00021886825561523438,
0.0113525390625,
0.018463134765625,
0.0305328369140625,
0.04510498046875,
0.033538818359375,
-0.05706787109375,
-0.03253173828125,
-0.09930419921875,
-0.03814697265625,
-0.0041046142578125,
0.02099609375,
0.0203399658203125,
-0.0045013427734375,
-0.01094818115234375,
0.00014638900756835938,
0.033294677734375,
0.00045180320739746094,
0.042755126953125,
0.022216796875,
-0.0035915374755859375,
0.0147552490234375,
0.0228118896484375,
-0.0178985595703125,
-0.0214080810546875,
0.04937744140625,
-0.018402099609375,
-0.044281005859375,
0.044158935546875,
-0.00254058837890625,
0.02655029296875,
-0.0024871826171875,
-0.0018672943115234375,
0.03466796875,
0.041351318359375,
-0.01096343994140625,
0.01229095458984375,
-0.0198974609375,
-0.033294677734375,
0.00708770751953125,
0.0171356201171875,
-0.026092529296875,
-0.0037212371826171875,
-0.0305023193359375,
-0.007785797119140625,
0.00951385498046875,
0.0286407470703125,
0.0152587890625,
-0.0036411285400390625,
-0.000020503997802734375,
0.00958251953125,
0.029022216796875,
0.0112152099609375,
-0.0112457275390625,
-0.0011816024780273438,
0.0138397216796875,
-0.058929443359375,
-0.046417236328125,
0.029022216796875,
0.006317138671875,
0.008697509765625,
0.013153076171875,
0.006237030029296875,
0.0023593902587890625,
-0.01029205322265625,
-0.0105743408203125,
-0.01537322998046875,
0.01390838623046875,
0.0153656005859375,
-0.0200958251953125,
-0.01158905029296875,
0.004085540771484375,
0.00897979736328125,
0.00792694091796875,
0.007717132568359375,
0.0145111083984375,
0.036834716796875,
-0.007213592529296875,
-0.01540374755859375,
-0.02056884765625,
-0.08056640625,
0.011199951171875,
0.037689208984375,
0.02642822265625,
0.041473388671875,
0.0079193115234375,
0.05206298828125,
-0.0022335052490234375,
-0.07501220703125,
0.007137298583984375,
0.0274505615234375,
0.0212249755859375,
0.0341796875,
-0.0312347412109375,
-0.0008463859558105469,
0.030120849609375,
-0.0182647705078125,
0.018463134765625,
0.036590576171875,
0.0092620849609375,
-0.0172882080078125,
0.00879669189453125,
-0.02215576171875,
0.01259613037109375,
-0.0197906494140625,
-0.049896240234375,
0.0183868408203125,
0.0176239013671875,
-0.00402069091796875,
0.032501220703125,
0.023681640625,
0.0089111328125,
-0.00511932373046875,
0.0065460205078125,
-0.0300445556640625,
0.00475311279296875,
-0.009063720703125,
0.01123809814453125,
-0.0010900497436523438,
-0.044769287109375,
0.004634857177734375,
0.04229736328125,
-0.014678955078125,
-0.046173095703125,
-0.0019626617431640625,
-0.006038665771484375,
-0.016143798828125,
-0.0113067626953125,
-0.06060791015625,
0.0220184326171875,
-0.0110626220703125,
0.0303497314453125,
0.006397247314453125,
0.01261138916015625,
-0.014617919921875,
-0.054290771484375,
0.070556640625,
0.01849365234375,
-0.05059814453125,
-0.017333984375,
-0.0302581787109375,
0.030792236328125,
-0.0262603759765625,
0.02520751953125,
0.060333251953125,
-0.015167236328125,
0.006072998046875,
-0.0049591064453125,
-0.0002701282501220703,
-0.0309600830078125,
0.027191162109375,
-0.0032958984375,
-0.00911712646484375,
-0.050323486328125,
0.002964019775390625,
0.0275726318359375,
0.01519775390625,
-0.00321197509765625,
-0.037109375,
-0.035369873046875,
0.026702880859375,
-0.064453125,
-0.005657196044921875,
-0.0172119140625,
-0.032958984375,
0.0023956298828125,
-0.0154571533203125,
-0.004123687744140625,
0.006931304931640625,
0.01038360595703125,
0.01403045654296875,
0.0077056884765625,
-0.0341796875,
0.00015795230865478516,
-0.043701171875,
-0.0306854248046875,
-0.06195068359375,
0.00905609130859375,
-0.0234527587890625,
-0.0017004013061523438,
0.05975341796875,
-0.00698089599609375,
-0.08026123046875,
-0.030181884765625,
0.036956787109375,
-0.01404571533203125,
-0.000301361083984375,
0.005313873291015625,
-0.0270843505859375,
0.0050811767578125,
0.0318603515625,
-0.01142120361328125,
-0.030364990234375,
0.0255126953125,
-0.039031982421875,
-0.016571044921875,
-0.06951904296875,
-0.0222930908203125,
0.00042438507080078125,
-0.00307464599609375,
-0.041015625,
0.0020999908447265625,
-0.059722900390625,
0.007671356201171875,
0.01425933837890625,
-0.032470703125,
-0.057037353515625,
-0.01068115234375,
-0.0180206298828125,
0.01212310791015625,
-0.022064208984375,
0.0158843994140625,
0.017852783203125,
0.0124053955078125,
0.0003478527069091797,
-0.0017366409301757812,
-0.02667236328125,
0.004711151123046875,
-0.0254974365234375,
0.05279541015625,
-0.01079559326171875,
0.018341064453125,
0.0238800048828125,
-0.0036067962646484375,
0.034332275390625,
-0.0094451904296875,
0.021942138671875,
-0.036346435546875,
0.030029296875,
-0.04034423828125,
-0.0023040771484375,
-0.0093994140625,
0.0018587112426757812,
0.0167388916015625,
0.06298828125,
-0.040313720703125,
-0.005096435546875,
0.0145111083984375,
-0.0024433135986328125,
-0.033111572265625,
0.004116058349609375,
-0.06573486328125,
-0.0022296905517578125,
-0.052978515625,
0.0012111663818359375,
0.0228118896484375,
-0.03631591796875,
-0.0120086669921875,
-0.004817962646484375,
-0.0372314453125,
-0.0268402099609375,
0.01209259033203125,
-0.0080718994140625,
-0.007633209228515625,
0.0129547119140625,
-0.03082275390625,
-0.017822265625,
-0.0218505859375,
0.0010766983032226562,
-0.04620361328125,
0.0012454986572265625,
0.0017061233520507812,
0.021820068359375,
-0.0034313201904296875,
0.006824493408203125,
-0.0098114013671875,
0.03314208984375,
0.013153076171875,
0.04736328125,
-0.004222869873046875,
-0.01152801513671875,
0.004199981689453125,
-0.01421356201171875,
0.01520538330078125,
-0.01345062255859375,
-0.004119873046875,
-0.0256195068359375,
-0.0139923095703125,
0.01299285888671875,
-0.0233001708984375,
-0.0225677490234375,
-0.007236480712890625,
-0.018402099609375,
-0.01432037353515625,
-0.0225677490234375,
-0.031341552734375,
-0.0106048583984375,
-0.01383209228515625,
-0.0195159912109375,
-0.00711822509765625,
-0.0272064208984375,
0.023590087890625,
-0.00809478759765625,
-0.0181884765625,
0.0282440185546875,
0.06964111328125,
0.011962890625,
-0.017791748046875,
-0.08770751953125,
0.0027980804443359375,
0.049072265625,
0.056976318359375,
-0.0146026611328125,
-0.022125244140625,
-0.04571533203125,
0.059722900390625,
0.0369873046875,
0.0019092559814453125,
-0.01352691650390625,
0.0289459228515625,
-0.0053863525390625,
-0.05340576171875,
0.03936767578125,
-0.010772705078125,
0.0188140869140625,
0.01094818115234375,
-0.014190673828125,
0.0016460418701171875,
-0.002490997314453125,
0.0034198760986328125,
0.00786590576171875,
0.003749847412109375,
-0.004024505615234375,
-0.008148193359375,
-0.0009417533874511719,
0.0190582275390625,
0.03936767578125,
0.039154052734375,
0.0040740966796875,
0.018585205078125,
0.00997161865234375,
-0.03228759765625,
0.030975341796875,
-0.04156494140625,
0.0076141357421875,
-0.00946807861328125,
0.0025348663330078125,
-0.019683837890625,
0.042510986328125,
-0.0001882314682006836,
0.032440185546875,
-0.029754638671875,
-0.048492431640625,
-0.04217529296875,
-0.032867431640625,
-0.00679779052734375,
0.0264739990234375,
0.039581298828125,
0.0115814208984375,
-0.0291900634765625,
-0.01360321044921875,
-0.006748199462890625,
0.0733642578125,
-0.04925537109375,
-0.02166748046875,
0.00394439697265625,
-0.0123138427734375,
-0.00772857666015625,
-0.02923583984375,
0.106201171875,
-0.0182342529296875,
0.03546142578125,
-0.021331787109375,
0.041046142578125,
0.0279998779296875,
0.0005979537963867188,
0.00881195068359375,
0.0138397216796875,
0.0259552001953125,
-0.05780029296875,
0.00856781005859375,
-0.0364990234375,
-0.038818359375,
0.042449951171875,
0.0007100105285644531,
-0.0046844482421875,
0.0100860595703125,
0.0169830322265625,
0.037933349609375,
-0.0167999267578125,
0.009002685546875,
-0.02783203125,
-0.0394287109375,
-0.01343536376953125,
0.0110626220703125,
0.0232391357421875,
-0.0120086669921875,
-0.0007700920104980469,
0.00907135009765625,
0.0269317626953125,
0.047332763671875,
-0.01380157470703125,
-0.0275421142578125,
0.03289794921875,
0.037322998046875,
-0.0094451904296875,
-0.0181884765625,
-0.0057220458984375,
-0.03692626953125,
-0.003231048583984375,
-0.0169677734375,
-0.006374359130859375,
0.035064697265625,
-0.035247802734375,
0.02056884765625,
-0.023040771484375,
0.0180511474609375,
0.00013315677642822266,
0.01352691650390625,
0.037200927734375,
0.023162841796875,
-0.0292510986328125,
-0.0254974365234375,
-0.0472412109375,
-0.044403076171875,
-0.06298828125,
0.00241851806640625,
-0.05865478515625,
0.034942626953125,
0.0027599334716796875,
0.032989501953125,
-0.043243408203125,
-0.035247802734375,
0.0217437744140625,
-0.0188751220703125,
-0.0254364013671875,
-0.0034027099609375,
0.041900634765625,
0.04302978515625,
-0.04638671875,
0.0521240234375,
0.009613037109375,
-0.0139312744140625,
-0.045654296875,
-0.018157958984375,
-0.0036602020263671875,
-0.01568603515625,
-0.0303497314453125,
-0.034271240234375,
0.01360321044921875,
0.05841064453125,
0.0662841796875,
0.00846099853515625,
0.006984710693359375,
-0.0018644332885742188,
-0.00417327880859375,
-0.0181732177734375,
0.055267333984375,
-0.002513885498046875,
0.01213836669921875,
0.0021648406982421875,
-0.0246429443359375,
-0.02130126953125,
0.022705078125,
-0.004604339599609375,
0.00301361083984375,
-0.0018901824951171875,
0.0268402099609375,
-0.0284271240234375,
-0.04962158203125,
0.046356201171875,
0.0653076171875,
0.0028839111328125,
0.025146484375,
0.035858154296875,
0.00012040138244628906,
0.005039215087890625,
0.050567626953125,
-0.056915283203125,
-0.00904083251953125,
0.0966796875,
0.03924560546875,
-0.049346923828125,
0.0645751953125,
-0.0298614501953125,
0.0328369140625,
0.07501220703125,
0.06353759765625,
-0.1429443359375,
0.030303955078125,
0.0063629150390625,
0.023681640625,
0.03399658203125,
0.00626373291015625,
0.0191802978515625,
0.006084442138671875,
0.022552490234375,
0.0262298583984375,
0.0198822021484375,
0.029266357421875,
0.005756378173828125,
-0.019195556640625,
0.02203369140625,
0.037841796875,
0.017730712890625,
-0.00655364990234375,
-0.0272064208984375,
0.003002166748046875,
-0.0019521713256835938,
-0.06134033203125,
0.005069732666015625,
0.004314422607421875,
0.00015079975128173828,
-0.030120849609375,
0.058746337890625,
0.00821685791015625,
0.03558349609375,
0.059844970703125,
0.018402099609375,
0.01116180419921875,
0.030029296875,
-0.01253509521484375,
0.02423095703125,
-0.005695343017578125,
0.01580810546875,
-0.004634857177734375,
-0.03765869140625,
0.004909515380859375,
0.0032215118408203125,
-0.048614501953125,
0.02593994140625,
-0.0263824462890625,
-0.03021240234375,
-0.030731201171875,
-0.039947509765625,
0.09686279296875,
0.0126953125,
-0.046234130859375,
-0.0008778572082519531,
0.006755828857421875,
-0.012939453125,
-0.052581787109375,
-0.050689697265625,
-0.0291748046875,
0.041778564453125,
-0.052154541015625,
0.030059814453125,
0.058990478515625,
-0.0384521484375,
-0.06561279296875,
0.06781005859375,
-0.0221710205078125,
0.025177001953125,
0.01313018798828125,
0.031982421875,
-0.03192138671875,
-0.006031036376953125,
-0.0285491943359375,
0.05419921875,
-0.02618408203125,
0.0579833984375,
-0.0367431640625,
-0.0109405517578125,
0.0197906494140625,
0.030853271484375,
0.051544189453125,
0.0167236328125,
0.00652313232421875,
0.0114898681640625,
0.0772705078125,
0.019805908203125,
-0.0172119140625,
0.035919189453125,
0.0102996826171875,
-0.01000213623046875,
0.03778076171875,
-0.040496826171875,
0.03179931640625,
-0.05596923828125,
0.037628173828125,
0.02734375,
0.002475738525390625,
-0.0195770263671875,
0.027496337890625,
-0.0005779266357421875,
-0.0300750732421875,
0.01459503173828125,
0.0013799667358398438,
0.03265380859375,
0.0030345916748046875,
0.0172576904296875,
0.00722503662109375,
-0.0161590576171875,
0.006626129150390625,
-0.01739501953125,
0.041748046875,
-0.00798797607421875,
0.0271759033203125,
0.0257415771484375,
0.0227203369140625,
0.00783538818359375,
-0.036651611328125,
0.02508544921875,
0.008056640625,
-0.048309326171875,
0.0224151611328125,
-0.00972747802734375,
0.00418853759765625,
-0.08502197265625,
-0.02392578125,
0.062469482421875,
0.044952392578125,
-0.0306854248046875,
-0.04144287109375,
-0.00698089599609375,
-0.005382537841796875,
0.027923583984375,
0.011566162109375,
0.050506591796875,
0.0189056396484375,
0.0328369140625,
-0.0169525146484375,
-0.0157470703125,
0.018463134765625,
0.01605224609375,
-0.0182647705078125,
-0.0550537109375,
0.005916595458984375,
0.0021152496337890625,
-0.019073486328125,
-0.0055694580078125,
-0.00197601318359375,
0.0256195068359375,
0.019134521484375,
0.00942230224609375,
-0.016693115234375,
-0.006763458251953125,
-0.024383544921875,
0.0499267578125,
0.011962890625,
0.037841796875,
-0.014617919921875,
-0.003551483154296875,
-0.01137542724609375,
-0.0027599334716796875,
0.00206756591796875,
0.050933837890625,
0.0259552001953125,
0.01386260986328125,
0.0271148681640625,
-0.00537872314453125,
0.01898193359375,
-0.0199127197265625,
0.0019588470458984375,
-0.0189666748046875,
0.014312744140625,
0.0236968994140625,
-0.01837158203125,
-0.01093292236328125,
-0.0139923095703125,
0.04498291015625,
-0.0157470703125,
0.0285186767578125,
-0.0025920867919921875,
-0.0313720703125,
0.072265625,
-0.053192138671875,
0.08624267578125,
-0.007579803466796875,
-0.09344482421875,
-0.015716552734375,
-0.0275421142578125,
-0.0229339599609375,
0.01526641845703125,
0.04156494140625,
-0.050262451171875,
0.048614501953125,
0.040496826171875,
-0.0099029541015625,
0.038848876953125,
-0.038421630859375,
0.035858154296875,
0.0225830078125,
0.01253509521484375,
0.018157958984375,
-0.0826416015625,
-0.056671142578125,
-0.045562744140625,
0.05316162109375,
0.01474761962890625,
0.0672607421875,
-0.02001953125,
0.033172607421875,
0.003879547119140625,
-0.0195159912109375,
0.01739501953125,
-0.025299072265625,
0.03753662109375,
-0.0047454833984375,
-0.004741668701171875,
0.00585174560546875,
-0.044586181640625,
-0.00731658935546875,
0.0135955810546875,
-0.0386962890625,
-0.0338134765625,
-0.00336456298828125,
0.029327392578125,
0.038330078125,
0.0014019012451171875,
-0.01026153564453125,
-0.01445770263671875,
-0.005947113037109375,
0.0092926025390625,
0.0243682861328125,
0.0338134765625,
-0.04058837890625,
0.03216552734375,
-0.031341552734375,
-0.05841064453125,
0.0276336669921875,
-0.083740234375,
0.029296875,
0.0252685546875,
0.01800537109375,
-0.0167999267578125,
-0.01309967041015625,
-0.0175018310546875,
0.042877197265625,
-0.00728607177734375,
0.043365478515625,
0.00482177734375,
-0.01486968994140625,
0.02862548828125,
-0.033355712890625,
0.00920867919921875,
-0.052734375,
-0.01107025146484375,
-0.019866943359375,
0.027587890625,
0.01474761962890625,
-0.04144287109375,
-0.0124053955078125,
-0.02325439453125,
-0.01230621337890625,
0.0126800537109375,
-0.0036754608154296875,
-0.0577392578125,
-0.0293121337890625,
0.0182037353515625,
0.02593994140625,
-0.0005517005920410156,
-0.050048828125,
0.00415802001953125,
-0.015411376953125,
0.05316162109375,
-0.00879669189453125,
0.036865234375,
-0.00049591064453125,
0.0137939453125,
-0.0504150390625,
0.01488494873046875,
-0.01287078857421875,
-0.001224517822265625,
0.007015228271484375,
0.0345458984375,
0.057586669921875,
-0.03692626953125,
-0.0041656494140625,
0.04412841796875,
0.0361328125,
0.10784912109375,
0.00441741943359375,
-0.02825927734375,
0.018768310546875,
-0.0238189697265625,
0.0267181396484375,
-0.0214691162109375,
-0.00995635986328125,
-0.042572021484375,
-0.022705078125,
0.006870269775390625,
-0.032806396484375,
-0.0223541259765625,
-0.061614990234375,
-0.11297607421875,
0.04443359375,
0.005504608154296875,
-0.05181884765625,
-0.031707763671875,
0.006542205810546875,
0.01434326171875,
0.0050506591796875,
-0.01090240478515625,
-0.0169525146484375,
-0.036834716796875,
0.010589599609375,
0.01146697998046875,
0.033050537109375,
0.01198577880859375,
0.0228118896484375,
-0.0305938720703125,
0.01282501220703125,
-0.01363372802734375,
0.017608642578125,
-0.005329132080078125,
0.016387939453125,
0.004001617431640625,
0.0450439453125,
-0.0228729248046875,
0.0038051605224609375,
-0.025482177734375,
-0.0274658203125,
0.0182647705078125,
-0.027435302734375,
-0.001506805419921875,
-0.0105438232421875,
-0.0168914794921875,
0.02972412109375,
0.01097869873046875,
-0.012481689453125,
-0.016571044921875,
-0.02392578125,
-0.0362548828125,
-0.011199951171875,
0.035247802734375,
-0.08001708984375,
0.0035037994384765625,
0.0069122314453125,
-0.0252532958984375,
-0.0034389495849609375,
-0.0010814666748046875,
-0.0301666259765625,
0.0008573532104492188,
0.0239410400390625,
0.00785064697265625,
-0.0137939453125,
-0.0191497802734375,
0.070068359375,
-0.041412353515625,
-0.0132293701171875,
0.0182037353515625,
0.0114898681640625,
0.0234222412109375,
0.0087890625,
0.01291656494140625,
-0.01062774658203125,
-0.035888671875,
0.049713134765625,
-0.01113128662109375,
0.049530029296875,
-0.0628662109375,
-0.036651611328125,
-0.01015472412109375,
0.053955078125,
0.005123138427734375,
0.05523681640625,
-0.054351806640625,
0.09625244140625,
0.02423095703125,
0.07806396484375,
-0.01031494140625,
-0.0171966552734375,
-0.002407073974609375,
-0.000514984130859375,
-0.0261688232421875,
0.0146636962890625,
0.01136016845703125,
-0.037841796875,
0.002506256103515625,
-0.0030460357666015625,
-0.026214599609375,
0.0057525634765625,
-0.015594482421875,
-0.07574462890625,
-0.018585205078125,
0.00152587890625
] |
5972ddcc777827878244ec614e8ecafd76578855
|
Wordpress Stackexchange
Q: Seeking clarification on page request life-cycle I'm just trying to get my head around the "life-cycle" of a typical page request in WordPress. The Action Reference page lists 38 actions that occur during a typical page load, but two things aren't clear to me:
*
*does functions.php get invoked before any of the hooks are executed?
*does the framework call your "page.php", etc., somewhere within the sequence of hooks, or after all hooks have been executed?
Thanks.
(apologies if my terminology is a little off, but I believe I understand the idea behind hooks being made available by the framework, and actions being associated with these hooks by the theme author)
A: To see both when an action is fired and when a file is included, take a look here:
http://wp-roadmap.com/demo/
Note that it only covers things inside WP Core, along with the default theme.
|
Q: Seeking clarification on page request life-cycle I'm just trying to get my head around the "life-cycle" of a typical page request in WordPress. The Action Reference page lists 38 actions that occur during a typical page load, but two things aren't clear to me:
*
*does functions.php get invoked before any of the hooks are executed?
*does the framework call your "page.php", etc., somewhere within the sequence of hooks, or after all hooks have been executed?
Thanks.
(apologies if my terminology is a little off, but I believe I understand the idea behind hooks being made available by the framework, and actions being associated with these hooks by the theme author)
A: To see both when an action is fired and when a file is included, take a look here:
http://wp-roadmap.com/demo/
Note that it only covers things inside WP Core, along with the default theme.
A:
does functions.php get invoked before any of the hooks are executed?
It is processed during theme(s) load, right before after_setup_theme hook.
does the framework call your "page.php", etc., somewhere within the sequence of hooks, or after all hooks have been executed?
If I am not mistaken specific template is determined and processed in template_redirect hook.
|
wordpress
|
{
"language": "en",
"length": 202,
"provenance": "stackexchange_00019.jsonl.gz:408125",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13213"
}
|
[
0.0203857421875,
0.0054779052734375,
-0.0595703125,
-0.03546142578125,
0.0165252685546875,
-0.0462646484375,
0.0328369140625,
0.038818359375,
-0.0214385986328125,
0.015655517578125,
-0.0335693359375,
0.0447998046875,
-0.03533935546875,
-0.01910400390625,
0.0209503173828125,
-0.043243408203125,
0.059906005859375,
-0.00641632080078125,
0.064208984375,
0.017608642578125,
-0.01049041748046875,
0.04541015625,
0.06646728515625,
0.073974609375,
0.013946533203125,
-0.04034423828125,
0.026336669921875,
0.0141754150390625,
-0.003543853759765625,
-0.001361846923828125,
0.01032257080078125,
0.004955291748046875,
0.031219482421875,
-0.00904083251953125,
0.0104522705078125,
0.0259552001953125,
0.003879547119140625,
0.0030002593994140625,
0.0008091926574707031,
0.0191497802734375,
0.0274200439453125,
-0.0164947509765625,
0.050750732421875,
-0.04827880859375,
0.005279541015625,
-0.00089263916015625,
0.0298614501953125,
-0.036712646484375,
0.005687713623046875,
-0.01702880859375,
0.020111083984375,
0.045196533203125,
0.031463623046875,
0.0009679794311523438,
-0.015777587890625,
0.00395965576171875,
0.0038204193115234375,
-0.0014238357543945312,
0.0286102294921875,
-0.01470947265625,
-0.014892578125,
0.004482269287109375,
0.0166473388671875,
-0.00753021240234375,
0.008636474609375,
-0.0028247833251953125,
-0.00787353515625,
0.03271484375,
-0.035308837890625,
-0.0239410400390625,
-0.003162384033203125,
-0.0236663818359375,
-0.0225372314453125,
-0.049957275390625,
0.033721923828125,
0.034210205078125,
-0.003917694091796875,
0.0024509429931640625,
-0.017852783203125,
0.046356201171875,
0.01242828369140625,
-0.01198577880859375,
-0.004917144775390625,
0.0168609619140625,
-0.008941650390625,
0.0091094970703125,
-0.004673004150390625,
-0.01505279541015625,
-0.051544189453125,
-0.039703369140625,
-0.04541015625,
-0.0235443115234375,
-0.00997161865234375,
-0.042449951171875,
-0.050811767578125,
-0.0036411285400390625,
0.0186004638671875,
0.01186370849609375,
0.00209808349609375,
0.005954742431640625,
-0.0127716064453125,
-0.0264129638671875,
0.01439666748046875,
-0.005344390869140625,
0.00122833251953125,
0.027130126953125,
0.01715087890625,
0.03564453125,
0.036285400390625,
0.0168914794921875,
0.00963592529296875,
0.039764404296875,
0.0129547119140625,
-0.007904052734375,
0.0018329620361328125,
-0.039276123046875,
-0.039306640625,
0.03240966796875,
-0.0078887939453125,
-0.00502777099609375,
-0.0009751319885253906,
-0.0261688232421875,
0.062408447265625,
0.0012598037719726562,
0.0206756591796875,
0.01070404052734375,
-0.04693603515625,
-0.0206298828125,
-0.012481689453125,
0.028167724609375,
-0.0032711029052734375,
-0.002777099609375,
0.0162200927734375,
-0.0006799697875976562,
-0.019805908203125,
-0.016571044921875,
0.052764892578125,
-0.005146026611328125,
0.0046539306640625,
0.030914306640625,
-0.0302581787109375,
-0.057647705078125,
-0.0241851806640625,
0.01302337646484375,
0.03387451171875,
-0.0073394775390625,
-0.0052490234375,
0.0305328369140625,
0.039581298828125,
0.041778564453125,
0.019012451171875,
-0.039642333984375,
0.044158935546875,
-0.00782012939453125,
-0.030548095703125,
-0.021636962890625,
-0.0197296142578125,
-0.0091705322265625,
-0.0033550262451171875,
-0.0222015380859375,
-0.04632568359375,
-0.005725860595703125,
0.0149383544921875,
-0.025665283203125,
-0.027587890625,
0.005641937255859375,
0.0108642578125,
0.0009632110595703125,
0.0347900390625,
0.006397247314453125,
0.06671142578125,
-0.0279083251953125,
0.0298309326171875,
0.016204833984375,
0.00009393692016601562,
0.00946807861328125,
-0.00966644287109375,
0.04034423828125,
0.0159454345703125,
-0.004283905029296875,
-0.017059326171875,
-0.04119873046875,
0.046722412109375,
-0.0082550048828125,
-0.044891357421875,
0.0205535888671875,
0.0106658935546875,
0.0545654296875,
0.002704620361328125,
0.0249176025390625,
0.0168914794921875,
0.01776123046875,
-0.01259613037109375,
0.03082275390625,
-0.0188446044921875,
-0.028778076171875,
0.00836944580078125,
0.021240234375,
-0.0159149169921875,
-0.019927978515625,
0.0303192138671875,
0.010040283203125,
0.0149688720703125,
0.004673004150390625,
-0.04302978515625,
0.01544189453125,
-0.01522064208984375,
0.02191162109375,
0.035491943359375,
0.0268402099609375,
0.0025234222412109375,
0.0250244140625,
-0.025604248046875,
-0.0178985595703125,
-0.0264434814453125,
0.041900634765625,
-0.0279388427734375,
-0.0141754150390625,
-0.01070404052734375,
-0.002628326416015625,
-0.0015420913696289062,
-0.031890869140625,
-0.0239715576171875,
0.0197296142578125,
0.06939697265625,
-0.01126861572265625,
-0.031494140625,
-0.0328369140625,
0.019989013671875,
0.00019872188568115234,
-0.0489501953125,
0.054290771484375,
0.04412841796875,
0.0408935546875,
-0.0609130859375,
-0.0240020751953125,
-0.061187744140625,
-0.034912109375,
-0.004657745361328125,
0.06317138671875,
0.0184478759765625,
0.038665771484375,
-0.01276397705078125,
0.0300445556640625,
-0.021881103515625,
-0.0443115234375,
0.017578125,
-0.00881195068359375,
-0.001293182373046875,
0.0780029296875,
-0.0026493072509765625,
0.0256500244140625,
-0.0340576171875,
-0.05975341796875,
-0.02142333984375,
0.040771484375,
-0.018707275390625,
-0.061309814453125,
0.004978179931640625,
-0.008941650390625,
0.035125732421875,
-0.05352783203125,
-0.0771484375,
0.01000213623046875,
-0.00714111328125,
-0.0181732177734375,
0.0017366409301757812,
0.008453369140625,
-0.012847900390625,
-0.015899658203125,
0.03680419921875,
0.0025615692138671875,
-0.02008056640625,
0.0016298294067382812,
0.01485443115234375,
-0.048095703125,
0.00914764404296875,
0.01275634765625,
-0.07940673828125,
-0.0248260498046875,
-0.0271759033203125,
0.02105712890625,
0.01177215576171875,
-0.018341064453125,
0.01256561279296875,
0.0197906494140625,
0.01139068603515625,
-0.0272216796875,
0.06182861328125,
0.0277099609375,
0.03033447265625,
0.03985595703125,
-0.01517486572265625,
0.0650634765625,
-0.01739501953125,
-0.0296173095703125,
0.044677734375,
0.0220794677734375,
0.007137298583984375,
0.01050567626953125,
0.044586181640625,
0.051727294921875,
-0.00603485107421875,
0.007801055908203125,
-0.0017147064208984375,
0.035675048828125,
0.01044464111328125,
-0.0194244384765625,
-0.0247802734375,
0.021270751953125,
-0.038482666015625,
0.0186004638671875,
0.016845703125,
0.08001708984375,
-0.021514892578125,
-0.040313720703125,
-0.003986358642578125,
0.03167724609375,
-0.057403564453125,
-0.072265625,
-0.022430419921875,
-0.06396484375,
0.018218994140625,
-0.0298919677734375,
-0.0232391357421875,
-0.0037384033203125,
-0.002197265625,
0.0045623779296875,
-0.05517578125,
-0.0257720947265625,
-0.02691650390625,
-0.07696533203125,
-0.036529541015625,
0.016448974609375,
0.00751495361328125,
0.01503753662109375,
-0.0038166046142578125,
0.079833984375,
-0.0217437744140625,
-0.09515380859375,
-0.0643310546875,
-0.0277099609375,
-0.03607177734375,
-0.01409149169921875,
0.01390838623046875,
-0.03399658203125,
0.022674560546875,
-0.00965118408203125,
-0.01036834716796875,
0.03021240234375,
0.005069732666015625,
-0.004306793212890625,
-0.001819610595703125,
-0.042755126953125,
-0.0024471282958984375,
0.034332275390625,
-0.001567840576171875,
-0.03912353515625,
0.017578125,
-0.0726318359375,
-0.03985595703125,
-0.0024280548095703125,
-0.05419921875,
-0.016082763671875,
0.045654296875,
-0.00536346435546875,
-0.01448822021484375,
-0.0014514923095703125,
-0.0210113525390625,
-0.0255584716796875,
-0.007450103759765625,
-0.01146697998046875,
0.01203155517578125,
-0.02581787109375,
-0.0018720626831054688,
0.01290130615234375,
0.08203125,
0.0093231201171875,
0.00958251953125,
0.044036865234375,
0.0131988525390625,
0.0167999267578125,
-0.02825927734375,
-0.043365478515625,
-0.0211944580078125,
0.01502227783203125,
0.00107574462890625,
0.0198974609375,
0.0132293701171875,
-0.004276275634765625,
0.01290130615234375,
0.0484619140625,
0.0214385986328125,
-0.026458740234375,
-0.007282257080078125,
0.0211029052734375,
-0.062103271484375,
-0.052703857421875,
0.005146026611328125,
0.00743865966796875,
-0.0654296875,
0.0165557861328125,
0.005222320556640625,
-0.023193359375,
-0.017303466796875,
0.01751708984375,
-0.046173095703125,
-0.04058837890625,
0.0226287841796875,
-0.0165252685546875,
0.0008497238159179688,
-0.00022029876708984375,
-0.0239105224609375,
-0.016265869140625,
-0.00775146484375,
-0.0218963623046875,
-0.06292724609375,
0.00647735595703125,
-0.07061767578125,
0.04052734375,
0.07171630859375,
-0.0804443359375,
-0.0008554458618164062,
0.038726806640625,
0.03619384765625,
0.04681396484375,
0.0176239013671875,
-0.0248260498046875,
0.0667724609375,
-0.0121917724609375,
0.0234375,
-0.013885498046875,
-0.0172271728515625,
-0.008758544921875,
-0.0055694580078125,
0.01374053955078125,
-0.020965576171875,
-0.035980224609375,
-0.01378631591796875,
-0.01251983642578125,
-0.02008056640625,
-0.01250457763671875,
-0.040069580078125,
-0.01131439208984375,
0.0240020751953125,
-0.04144287109375,
-0.0175933837890625,
-0.04107666015625,
0.01090240478515625,
-0.0170135498046875,
0.003742218017578125,
0.01447296142578125,
0.0576171875,
0.0260009765625,
0.0014123916625976562,
-0.025390625,
-0.01776123046875,
0.0025730133056640625,
-0.00720977783203125,
0.036224365234375,
0.006359100341796875,
0.0202484130859375,
-0.00952911376953125,
-0.0233306884765625,
0.01751708984375,
-0.034912109375,
0.0836181640625,
0.0163421630859375,
0.0286865234375,
-0.0184326171875,
0.006389617919921875,
-0.025238037109375,
0.0281219482421875,
-0.039581298828125,
-0.0028705596923828125,
-0.006565093994140625,
0.030792236328125,
-0.08306884765625,
0.08843994140625,
-0.006732940673828125,
0.0289459228515625,
-0.0204620361328125,
0.017578125,
0.0693359375,
0.0555419921875,
-0.002376556396484375,
0.0020694732666015625,
0.002857208251953125,
0.01560211181640625,
-0.007480621337890625,
-0.012420654296875,
-0.0288543701171875,
0.0265045166015625,
0.00909423828125,
0.00475311279296875,
0.007297515869140625,
0.0007586479187011719,
0.0026454925537109375,
-0.0223236083984375,
-0.0693359375,
-0.019500732421875,
-0.0033168792724609375,
0.00731658935546875,
0.038482666015625,
-0.0003871917724609375,
0.01194000244140625,
-0.0008444786071777344,
-0.00644683837890625,
-0.01160430908203125,
0.015960693359375,
-0.0171966552734375,
-0.037811279296875,
0.01171875,
0.006603240966796875,
-0.011505126953125,
0.016357421875,
0.00838470458984375,
-0.01393890380859375,
-0.0024356842041015625,
-0.00841522216796875,
0.05377197265625,
0.0175933837890625,
0.05242919921875,
-0.0005679130554199219,
0.0007796287536621094,
0.0012073516845703125,
0.03521728515625,
-0.0174560546875,
-0.053985595703125,
-0.01837158203125,
0.0224761962890625,
0.042755126953125,
-0.022857666015625,
-0.0308074951171875,
0.034149169921875,
0.0055694580078125,
-0.022735595703125,
0.052398681640625,
0.0308074951171875,
-0.048583984375,
-0.0093841552734375,
-0.00789642333984375,
0.0088958740234375,
-0.013458251953125,
0.00605010986328125,
0.0631103515625,
0.08123779296875,
0.088134765625,
-0.0204925537109375,
0.0167999267578125,
0.01201629638671875,
0.02227783203125,
-0.00885772705078125,
-0.0160980224609375,
0.00013530254364013672,
-0.0274505615234375,
-0.0008234977722167969,
-0.0214691162109375,
-0.00846099853515625,
0.035491943359375,
-0.0134124755859375,
0.0167694091796875,
-0.0088348388671875,
-0.0274505615234375,
0.01044464111328125,
0.006206512451171875,
0.05169677734375,
0.01416778564453125,
-0.042877197265625,
-0.0099334716796875,
-0.0276641845703125,
-0.0087127685546875,
-0.0030345916748046875,
-0.039337158203125,
-0.0257415771484375,
-0.00928497314453125,
-0.004154205322265625,
0.02020263671875,
0.016357421875,
0.04498291015625,
-0.007457733154296875,
0.0245208740234375,
-0.027374267578125,
0.016845703125,
-0.0394287109375,
0.094482421875,
-0.0267486572265625,
0.0297393798828125,
-0.00939178466796875,
0.042144775390625,
0.006359100341796875,
0.01496124267578125,
0.0034503936767578125,
0.005825042724609375,
-0.01068878173828125,
-0.0123443603515625,
-0.01409912109375,
0.01447296142578125,
0.09100341796875,
-0.00777435302734375,
-0.00945281982421875,
-0.0099639892578125,
0.00811767578125,
-0.02581787109375,
0.05419921875,
-0.010284423828125,
-0.05426025390625,
0.0435791015625,
-0.0201416015625,
-0.0272369384765625,
0.002651214599609375,
-0.01490020751953125,
0.018585205078125,
-0.002758026123046875,
-0.007843017578125,
0.02569580078125,
-0.03802490234375,
0.0162811279296875,
0.07550048828125,
-0.007167816162109375,
0.058685302734375,
0.002735137939453125,
0.00006723403930664062,
0.071044921875,
0.052947998046875,
-0.018341064453125,
-0.02996826171875,
0.05474853515625,
0.02032470703125,
-0.028778076171875,
0.0261688232421875,
-0.0289154052734375,
-0.00951385498046875,
0.0528564453125,
0.0479736328125,
-0.09503173828125,
0.02239990234375,
0.018157958984375,
-0.003376007080078125,
-0.00579833984375,
-0.00778961181640625,
-0.01120758056640625,
-0.051971435546875,
0.052459716796875,
0.0231781005859375,
-0.0026988983154296875,
0.0280609130859375,
0.0137786865234375,
-0.0115509033203125,
-0.03094482421875,
0.0066986083984375,
0.0054473876953125,
0.0290374755859375,
0.0177459716796875,
0.00875091552734375,
0.028289794921875,
-0.038787841796875,
0.00989532470703125,
0.00849151611328125,
-0.00914764404296875,
0.0110931396484375,
0.06591796875,
-0.0181884765625,
0.032745361328125,
-0.01256561279296875,
-0.01385498046875,
-0.02423095703125,
0.02996826171875,
-0.040374755859375,
0.00650787353515625,
0.0136566162109375,
-0.04534912109375,
-0.072998046875,
-0.01012420654296875,
0.0237884521484375,
0.0082244873046875,
-0.061767578125,
0.03839111328125,
-0.0587158203125,
-0.0053253173828125,
-0.0043182373046875,
-0.0217437744140625,
0.062103271484375,
-0.037353515625,
0.0008873939514160156,
0.033203125,
0.0088348388671875,
-0.0202178955078125,
0.0016021728515625,
-0.0113372802734375,
-0.0282440185546875,
0.004241943359375,
-0.0104217529296875,
0.00579833984375,
0.0171966552734375,
-0.0008120536804199219,
-0.054718017578125,
0.050201416015625,
0.0204315185546875,
0.003406524658203125,
0.002437591552734375,
0.0184478759765625,
-0.041778564453125,
-0.0102996826171875,
-0.0567626953125,
0.058349609375,
0.028533935546875,
0.034881591796875,
-0.051422119140625,
0.0048675537109375,
0.0050506591796875,
-0.0192108154296875,
0.02008056640625,
0.0006709098815917969,
-0.018798828125,
0.00836944580078125,
0.0518798828125,
0.0207366943359375,
-0.003818511962890625,
0.037322998046875,
-0.01091766357421875,
0.004787445068359375,
-0.00704193115234375,
-0.021942138671875,
0.036651611328125,
-0.04376220703125,
-0.039154052734375,
0.006610870361328125,
0.01039886474609375,
0.01114654541015625,
-0.0020313262939453125,
0.03240966796875,
0.004199981689453125,
0.00009459257125854492,
0.0036296844482421875,
0.02691650390625,
-0.0298004150390625,
0.0262451171875,
0.00485992431640625,
-0.019775390625,
-0.04302978515625,
-0.032958984375,
0.025848388671875,
0.01027679443359375,
-0.00714111328125,
-0.00617218017578125,
0.01219940185546875,
0.03778076171875,
-0.033447265625,
-0.027496337890625,
0.0294036865234375,
-0.024688720703125,
0.069091796875,
0.006412506103515625,
0.0213470458984375,
-0.06317138671875,
0.0031185150146484375,
0.02459716796875,
0.0845947265625,
-0.046722412109375,
-0.05010986328125,
0.006256103515625,
0.0052337646484375,
0.0191192626953125,
0.0188751220703125,
0.057220458984375,
-0.0538330078125,
-0.004650115966796875,
0.0011548995971679688,
-0.02825927734375,
-0.0257720947265625,
0.007450103759765625,
-0.0031833648681640625,
0.01255035400390625,
0.027740478515625,
-0.0228424072265625,
0.0419921875,
-0.0072174072265625,
0.0007810592651367188,
-0.033966064453125,
-0.053314208984375,
0.01110076904296875,
-0.0239410400390625,
0.042083740234375,
0.0031604766845703125,
0.0239105224609375,
-0.0216064453125,
0.0092010498046875,
-0.028076171875,
-0.0615234375,
-0.005462646484375,
0.037689208984375,
0.023773193359375,
0.048370361328125,
0.0091552734375,
0.011077880859375,
0.033905029296875,
0.01152801513671875,
0.033905029296875,
-0.010986328125,
-0.032867431640625,
-0.04034423828125,
-0.029205322265625,
0.002910614013671875,
-0.0200958251953125,
0.018524169921875,
-0.0035114288330078125,
0.01383209228515625,
-0.02142333984375,
0.0474853515625,
-0.0186614990234375,
-0.032623291015625,
0.0672607421875,
-0.0278472900390625,
0.11114501953125,
-0.0048675537109375,
-0.06353759765625,
-0.0006680488586425781,
-0.03448486328125,
-0.08062744140625,
0.036102294921875,
0.04925537109375,
-0.003871917724609375,
-0.01401519775390625,
0.0285186767578125,
0.0205230712890625,
0.0004737377166748047,
-0.023956298828125,
0.01026153564453125,
0.02276611328125,
0.050445556640625,
0.027984619140625,
-0.035247802734375,
0.0018768310546875,
0.0155792236328125,
-0.02252197265625,
-0.0269012451171875,
0.1082763671875,
-0.0086517333984375,
-0.0262908935546875,
0.058013916015625,
-0.01275634765625,
0.0289459228515625,
0.007038116455078125,
0.0660400390625,
-0.023773193359375,
-0.003383636474609375,
-0.0257415771484375,
-0.06982421875,
0.05621337890625,
0.0042266845703125,
0.0140533447265625,
0.0254974365234375,
0.010528564453125,
0.00937652587890625,
0.0165252685546875,
0.038604736328125,
-0.01424407958984375,
-0.002292633056640625,
0.009002685546875,
0.0015363693237304688,
0.034423828125,
0.03411865234375,
0.0007910728454589844,
0.00555419921875,
-0.0298004150390625,
0.0169677734375,
-0.0302276611328125,
0.0352783203125,
-0.057281494140625,
0.004695892333984375,
-0.00811004638671875,
-0.0032062530517578125,
0.047210693359375,
-0.020477294921875,
0.0283355712890625,
0.02630615234375,
0.0264434814453125,
0.0335693359375,
-0.01416015625,
-0.005008697509765625,
0.01849365234375,
0.05352783203125,
-0.0001366138458251953,
0.0159759521484375,
-0.0018644332885742188,
0.00820159912109375,
0.00594329833984375,
-0.019287109375,
-0.015167236328125,
0.0054473876953125,
-0.033111572265625,
0.0007238388061523438,
-0.005584716796875,
-0.007671356201171875,
-0.00853729248046875,
-0.012725830078125,
0.0212860107421875,
0.0128173828125,
-0.0572509765625,
0.0160675048828125,
-0.0018463134765625,
0.0203857421875,
-0.005481719970703125,
0.05792236328125,
-0.022003173828125,
-0.04217529296875,
-0.06536865234375,
0.040924072265625,
-0.00701904296875,
-0.0014934539794921875,
0.06378173828125,
-0.007350921630859375,
0.016571044921875,
-0.01157379150390625,
-0.03021240234375,
-0.014801025390625,
-0.0055694580078125,
0.04425048828125,
0.0001023411750793457,
-0.0325927734375,
0.017364501953125,
0.0022411346435546875,
0.020294189453125,
-0.025177001953125,
-0.0186004638671875,
0.021881103515625,
0.01250457763671875,
-0.01117706298828125,
0.005237579345703125,
0.00989532470703125,
-0.048431396484375,
-0.0679931640625,
0.0693359375,
-0.00933074951171875,
-0.03662109375,
-0.056365966796875,
0.037078857421875,
0.0269622802734375,
0.003292083740234375,
-0.00707244873046875,
-0.0167999267578125,
-0.0239410400390625,
-0.0135650634765625,
0.03460693359375,
0.01212310791015625,
0.03863525390625,
0.03192138671875,
-0.06890869140625,
0.0196075439453125,
-0.00884246826171875,
0.03338623046875,
0.008087158203125,
0.01114654541015625,
0.038360595703125,
0.05572509765625,
-0.011962890625,
0.045654296875,
0.0011720657348632812,
-0.02996826171875,
-0.01470947265625,
-0.0312042236328125,
-0.003475189208984375,
0.016265869140625,
0.05828857421875,
0.037017822265625,
0.00980377197265625,
-0.046875,
0.030181884765625,
0.00995635986328125,
-0.057037353515625,
-0.0155029296875,
0.0157012939453125,
-0.0277099609375,
-0.0177154541015625,
-0.00846099853515625,
-0.007091522216796875,
-0.016815185546875,
-0.03656005859375,
-0.038543701171875,
-0.01274871826171875,
-0.0179290771484375,
0.0086212158203125,
0.01476287841796875,
-0.053436279296875,
0.03826904296875,
-0.01444244384765625,
-0.0017728805541992188,
0.01548004150390625,
0.03887939453125,
-0.000614166259765625,
0.04791259765625,
0.037109375,
0.054534912109375,
-0.082275390625,
-0.0163116455078125,
0.01004791259765625,
0.002979278564453125,
-0.04351806640625,
-0.02301025390625,
-0.00232696533203125,
0.0247955322265625,
-0.005176544189453125,
0.0335693359375,
0.0021877288818359375,
0.01262664794921875,
-0.021209716796875,
0.055938720703125,
-0.026580810546875,
0.09521484375,
0.00733184814453125,
0.037689208984375,
0.003070831298828125,
-0.0005006790161132812,
0.0411376953125,
-0.033203125,
0.01380157470703125,
0.01397705078125,
-0.0080413818359375,
0.0010967254638671875,
-0.00849151611328125,
0.055328369140625,
-0.026580810546875,
-0.00251007080078125
] |
15af377594526cae7ba73eb31d1e97f1f74524f0
|
Wordpress Stackexchange
Q: Change author permalink The original urls for users look like /author/login/
Is it possible to replace login by user's id?
In my dream urls should become to /users/34/ (34 is user id).
Thanks.
A: you need 3 simple functions and hooks
first change the author base:
//change author/username base to users/userID
function change_author_permalinks() {
global $wp_rewrite;
// Change the value of the author permalink base to whatever you want here
$wp_rewrite->author_base = 'users';
$wp_rewrite->flush_rules();
}
add_action('init','change_author_permalinks');
then add users to query_vars:
add_filter('query_vars', 'users_query_vars');
function users_query_vars($vars) {
// add lid to the valid list of variables
$new_vars = array('users');
$vars = $new_vars + $vars;
return $vars;
}
then add the new rewrite rule:
function user_rewrite_rules( $wp_rewrite ) {
$newrules = array();
$new_rules['users/(\d*)$'] = 'index.php?author=$matches[1]';
$wp_rewrite->rules = $new_rules + $wp_rewrite->rules;
}
add_filter('generate_rewrite_rules','user_rewrite_rules');
Now if you don't know how to use this, just copy all of the code and paste in your theme's functions.php file.
|
Q: Change author permalink The original urls for users look like /author/login/
Is it possible to replace login by user's id?
In my dream urls should become to /users/34/ (34 is user id).
Thanks.
A: you need 3 simple functions and hooks
first change the author base:
//change author/username base to users/userID
function change_author_permalinks() {
global $wp_rewrite;
// Change the value of the author permalink base to whatever you want here
$wp_rewrite->author_base = 'users';
$wp_rewrite->flush_rules();
}
add_action('init','change_author_permalinks');
then add users to query_vars:
add_filter('query_vars', 'users_query_vars');
function users_query_vars($vars) {
// add lid to the valid list of variables
$new_vars = array('users');
$vars = $new_vars + $vars;
return $vars;
}
then add the new rewrite rule:
function user_rewrite_rules( $wp_rewrite ) {
$newrules = array();
$new_rules['users/(\d*)$'] = 'index.php?author=$matches[1]';
$wp_rewrite->rules = $new_rules + $wp_rewrite->rules;
}
add_filter('generate_rewrite_rules','user_rewrite_rules');
Now if you don't know how to use this, just copy all of the code and paste in your theme's functions.php file.
A: You could use an htaccess rule to rewrite /users/34 to /?author=34
A: I built a plugin to do this. A friend wanted to hide his author URL's as he didn't like the fact they were displaying his author's usernames. I decided to go one further and allow any user to set their own URL. It redirects their old author pages. https://wordpress.org/plugins/wp-custom-author-url/
|
wordpress
|
{
"language": "en",
"length": 215,
"provenance": "stackexchange_00019.jsonl.gz:408165",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13330"
}
|
[
0.046600341796875,
-0.0012235641479492188,
0.0004973411560058594,
-0.029998779296875,
0.0024433135986328125,
-0.021636962890625,
0.0206756591796875,
-0.0156097412109375,
-0.0360107421875,
0.029571533203125,
0.0157470703125,
0.03619384765625,
-0.0067291259765625,
-0.028594970703125,
0.022216796875,
-0.001434326171875,
0.0026912689208984375,
-0.0238037109375,
-0.007381439208984375,
-0.0243072509765625,
0.035552978515625,
-0.032379150390625,
0.0270843505859375,
0.04632568359375,
0.0236663818359375,
-0.03778076171875,
0.09552001953125,
-0.037078857421875,
0.0223236083984375,
-0.0404052734375,
0.00478363037109375,
-0.0218963623046875,
0.0010395050048828125,
0.0220489501953125,
-0.0024242401123046875,
0.03240966796875,
0.0008363723754882812,
0.00909423828125,
0.020721435546875,
0.01209259033203125,
0.055206298828125,
-0.0258941650390625,
-0.059234619140625,
0.029296875,
-0.0245208740234375,
-0.058074951171875,
0.06341552734375,
-0.0188140869140625,
0.038604736328125,
-0.002750396728515625,
-0.0196990966796875,
0.052642822265625,
-0.0161895751953125,
0.0141754150390625,
-0.01259613037109375,
0.01407623291015625,
0.0271453857421875,
-0.033172607421875,
0.04327392578125,
-0.035858154296875,
-0.0251007080078125,
-0.0259552001953125,
0.032684326171875,
0.0166473388671875,
-0.008392333984375,
-0.00914764404296875,
-0.01074981689453125,
0.031768798828125,
0.009979248046875,
-0.00937652587890625,
-0.0035400390625,
0.0091094970703125,
-0.032684326171875,
-0.0036220550537109375,
-0.01369476318359375,
0.0048828125,
-0.00283050537109375,
-0.0175628662109375,
0.01357269287109375,
0.03961181640625,
0.015777587890625,
-0.0127716064453125,
0.016937255859375,
-0.010040283203125,
0.016845703125,
0.0103759765625,
-0.00202178955078125,
-0.00855255126953125,
-0.042388916015625,
-0.01116943359375,
-0.019866943359375,
-0.0260467529296875,
-0.07470703125,
0.0194244384765625,
0.0213165283203125,
-0.00836944580078125,
0.0198211669921875,
0.03704833984375,
-0.00695037841796875,
0.011932373046875,
0.01238250732421875,
-0.0291290283203125,
0.01751708984375,
-0.0291595458984375,
-0.0159759521484375,
0.07330322265625,
0.06732177734375,
0.0892333984375,
0.007602691650390625,
-0.0157623291015625,
0.0153045654296875,
0.0089569091796875,
-0.0157928466796875,
0.0138092041015625,
-0.03924560546875,
0.0011148452758789062,
-0.048675537109375,
-0.0214080810546875,
-0.0283203125,
0.01447296142578125,
-0.0369873046875,
-0.01149749755859375,
-0.0160675048828125,
0.0211944580078125,
0.0261993408203125,
-0.0115509033203125,
0.0115966796875,
0.00843048095703125,
-0.01430511474609375,
0.023712158203125,
-0.02252197265625,
0.018890380859375,
0.05487060546875,
0.029754638671875,
0.01027679443359375,
-0.031829833984375,
0.039093017578125,
-0.02105712890625,
-0.01523590087890625,
0.044677734375,
-0.014556884765625,
-0.057647705078125,
-0.021575927734375,
-0.01629638671875,
0.018341064453125,
0.0251617431640625,
0.0218505859375,
0.01308441162109375,
-0.0020198822021484375,
-0.0171356201171875,
-0.015960693359375,
-0.0201873779296875,
0.00818634033203125,
0.0161285400390625,
0.036346435546875,
0.01197052001953125,
0.042816162109375,
-0.0188140869140625,
-0.0204620361328125,
-0.005580902099609375,
0.034149169921875,
0.0028209686279296875,
0.01111602783203125,
0.0236968994140625,
-0.006389617919921875,
-0.0179290771484375,
-0.04217529296875,
-0.00873565673828125,
0.025604248046875,
0.0099334716796875,
0.017578125,
-0.006465911865234375,
-0.00566864013671875,
0.0307159423828125,
0.0222320556640625,
0.00780487060546875,
-0.020355224609375,
0.059661865234375,
-0.016143798828125,
0.06878662109375,
0.050140380859375,
-0.0286407470703125,
0.01435089111328125,
0.024627685546875,
-0.048553466796875,
0.049224853515625,
0.008270263671875,
0.08050537109375,
-0.001861572265625,
0.0172882080078125,
0.017486572265625,
0.0173492431640625,
-0.039703369140625,
-0.027557373046875,
-0.0139007568359375,
-0.01427459716796875,
0.0215911865234375,
-0.00273895263671875,
-0.0016460418701171875,
0.050872802734375,
0.0282135009765625,
0.0161895751953125,
0.0229034423828125,
-0.008270263671875,
-0.04595947265625,
0.02362060546875,
-0.0274505615234375,
0.032623291015625,
0.021209716796875,
0.03271484375,
0.0183563232421875,
0.046112060546875,
-0.04766845703125,
-0.0198211669921875,
-0.0184173583984375,
0.043701171875,
0.006504058837890625,
0.026336669921875,
0.00330352783203125,
0.0280609130859375,
0.0221405029296875,
-0.0102386474609375,
0.0178375244140625,
0.01081085205078125,
0.01617431640625,
-0.04248046875,
-0.010650634765625,
-0.04400634765625,
-0.02423095703125,
-0.020416259765625,
-0.03363037109375,
0.06683349609375,
0.044586181640625,
0.040435791015625,
-0.03753662109375,
-0.002773284912109375,
-0.0194549560546875,
-0.006267547607421875,
-0.005275726318359375,
0.03143310546875,
0.044036865234375,
0.004955291748046875,
0.0002627372741699219,
-0.0005536079406738281,
0.01143646240234375,
-0.0039215087890625,
0.0426025390625,
-0.024505615234375,
-0.0004191398620605469,
0.04718017578125,
0.01020050048828125,
-0.0026340484619140625,
0.0036678314208984375,
-0.08551025390625,
-0.0032024383544921875,
0.038909912109375,
-0.00732421875,
0.0242156982421875,
-0.045074462890625,
0.0013055801391601562,
-0.0088043212890625,
-0.033721923828125,
-0.00833892822265625,
-0.031494140625,
-0.024139404296875,
-0.0234222412109375,
-0.021148681640625,
-0.021575927734375,
-0.0306243896484375,
-0.0234222412109375,
0.03265380859375,
-0.0091094970703125,
-0.0038585662841796875,
-0.00616455078125,
-0.00437164306640625,
-0.0112762451171875,
0.00811767578125,
0.01132965087890625,
-0.015716552734375,
-0.0194854736328125,
-0.02056884765625,
0.0112457275390625,
-0.0037212371826171875,
-0.0012750625610351562,
-0.01065826416015625,
0.00743865966796875,
0.00960540771484375,
-0.00511932373046875,
0.0272674560546875,
-0.00733184814453125,
0.03778076171875,
-0.017242431640625,
-0.021484375,
0.0347900390625,
-0.00919342041015625,
-0.040802001953125,
0.01230621337890625,
-0.040374755859375,
0.055084228515625,
-0.0316162109375,
0.0269622802734375,
0.0631103515625,
0.0181732177734375,
-0.0002613067626953125,
0.021331787109375,
-0.00016367435455322266,
0.01385498046875,
0.03619384765625,
0.0215911865234375,
-0.002422332763671875,
-0.01551055908203125,
0.01232147216796875,
0.016265869140625,
0.01027679443359375,
-0.00890350341796875,
-0.023345947265625,
-0.0117034912109375,
0.00562286376953125,
-0.010162353515625,
-0.0338134765625,
-0.038818359375,
-0.06695556640625,
-0.01041412353515625,
-0.000713348388671875,
-0.02899169921875,
0.0171356201171875,
0.01324462890625,
-0.004329681396484375,
0.015472412109375,
-0.018157958984375,
-0.0958251953125,
-0.029388427734375,
-0.0699462890625,
0.04144287109375,
-0.0186614990234375,
0.0104827880859375,
-0.00605010986328125,
0.004268646240234375,
-0.0187530517578125,
-0.0278472900390625,
-0.018310546875,
0.02056884765625,
0.007526397705078125,
-0.053375244140625,
-0.0190887451171875,
-0.0165863037109375,
-0.004024505615234375,
-0.0207366943359375,
0.08648681640625,
0.032684326171875,
-0.0318603515625,
0.03863525390625,
0.0057373046875,
-0.00630950927734375,
0.027191162109375,
0.0036830902099609375,
-0.012298583984375,
-0.004261016845703125,
0.039642333984375,
-0.047515869140625,
-0.01227569580078125,
0.001895904541015625,
-0.031402587890625,
0.04229736328125,
0.005428314208984375,
-0.01446533203125,
0.03338623046875,
-0.0067138671875,
0.03668212890625,
0.00437164306640625,
0.005672454833984375,
-0.021270751953125,
0.02252197265625,
0.0120697021484375,
0.03338623046875,
-0.0183258056640625,
0.024566650390625,
-0.03228759765625,
-0.0297393798828125,
-0.007293701171875,
-0.0298004150390625,
-0.0157928466796875,
-0.02191162109375,
-0.0203094482421875,
-0.053314208984375,
0.053253173828125,
-0.06964111328125,
-0.01959228515625,
-0.05438232421875,
-0.0110931396484375,
-0.0256500244140625,
0.074951171875,
0.01324462890625,
-0.01317596435546875,
0.01541900634765625,
0.0080718994140625,
-0.0418701171875,
-0.0263671875,
-0.0460205078125,
0.0016374588012695312,
-0.045501708984375,
-0.0223236083984375,
-0.0100555419921875,
-0.033660888671875,
0.01305389404296875,
0.00783538818359375,
0.01145172119140625,
-0.0244598388671875,
0.0242462158203125,
0.060943603515625,
-0.01378631591796875,
0.0291748046875,
-0.0218353271484375,
0.0238800048828125,
-0.0247650146484375,
0.030731201171875,
-0.09466552734375,
-0.03289794921875,
-0.0036869049072265625,
0.083740234375,
0.0197296142578125,
-0.05133056640625,
-0.0287933349609375,
0.053680419921875,
-0.0269927978515625,
0.0042572021484375,
0.0010395050048828125,
0.01393890380859375,
0.00344085693359375,
0.02618408203125,
-0.0146636962890625,
0.00939178466796875,
0.028289794921875,
-0.0005502700805664062,
-0.0445556640625,
0.00023448467254638672,
-0.04132080078125,
0.0139923095703125,
-0.01132965087890625,
-0.03582763671875,
-0.09759521484375,
-0.042938232421875,
-0.03076171875,
0.010955810546875,
-0.00925445556640625,
-0.00859832763671875,
-0.051055908203125,
-0.10919189453125,
0.05718994140625,
-0.006710052490234375,
0.002758026123046875,
-0.014495849609375,
0.07061767578125,
0.00823974609375,
-0.04168701171875,
0.04180908203125,
0.028228759765625,
0.0301513671875,
-0.0195465087890625,
0.018341064453125,
-0.004627227783203125,
-0.02178955078125,
0.02874755859375,
-0.03265380859375,
-0.0011138916015625,
-0.03680419921875,
0.0186004638671875,
-0.0091400146484375,
-0.015716552734375,
0.01331329345703125,
-0.025177001953125,
0.050323486328125,
0.010345458984375,
-0.0095367431640625,
0.01568603515625,
-0.01351165771484375,
0.01947021484375,
0.0007548332214355469,
0.00010907649993896484,
-0.0263519287109375,
-0.046875,
0.032745361328125,
-0.004550933837890625,
0.0136260986328125,
-0.01126861572265625,
0.0059661865234375,
0.00769805908203125,
-0.0235137939453125,
-0.00785064697265625,
-0.0143280029296875,
-0.03240966796875,
0.00653076171875,
0.01885986328125,
-0.02069091796875,
-0.009033203125,
-0.00533294677734375,
-0.01537322998046875,
0.12152099609375,
0.038360595703125,
-0.0062103271484375,
0.032318115234375,
-0.032928466796875,
0.006420135498046875,
0.0010614395141601562,
-0.0138397216796875,
0.050537109375,
-0.00426483154296875,
-0.004535675048828125,
0.005702972412109375,
-0.045928955078125,
-0.0253448486328125,
-0.045989990234375,
0.00017786026000976562,
-0.01506805419921875,
-0.00004309415817260742,
-0.006366729736328125,
0.05657958984375,
0.01812744140625,
0.005748748779296875,
-0.0159454345703125,
0.0311279296875,
0.03692626953125,
0.01611328125,
0.005260467529296875,
0.0123443603515625,
-0.0088348388671875,
0.006229400634765625,
0.018341064453125,
-0.04583740234375,
-0.0002930164337158203,
0.0234222412109375,
0.06195068359375,
0.0364990234375,
-0.0084381103515625,
-0.0106964111328125,
-0.04132080078125,
0.01207733154296875,
0.01245880126953125,
-0.033203125,
-0.061004638671875,
-0.010711669921875,
0.02911376953125,
0.0087890625,
-0.06427001953125,
-0.005512237548828125,
-0.050811767578125,
-0.043426513671875,
-0.0116729736328125,
0.007534027099609375,
0.004734039306640625,
-0.0186004638671875,
-0.034393310546875,
-0.017486572265625,
-0.032073974609375,
0.01538848876953125,
-0.03692626953125,
0.0138397216796875,
-0.031005859375,
-0.005207061767578125,
0.024078369140625,
0.022003173828125,
0.0296478271484375,
-0.0226287841796875,
-0.0250091552734375,
0.0555419921875,
-0.02874755859375,
0.051544189453125,
-0.0140533447265625,
-0.041473388671875,
0.0105438232421875,
-0.0107421875,
0.0259857177734375,
0.006137847900390625,
0.011688232421875,
-0.02081298828125,
-0.01169586181640625,
0.00469207763671875,
0.010406494140625,
-0.01494598388671875,
0.0124359130859375,
0.01055908203125,
0.0163421630859375,
-0.01424407958984375,
0.0123291015625,
-0.016845703125,
0.0621337890625,
0.015777587890625,
0.00830078125,
0.0206756591796875,
0.0245361328125,
-0.023193359375,
-0.00833892822265625,
-0.0179595947265625,
-0.0096282958984375,
0.0033283233642578125,
-0.002529144287109375,
-0.0110626220703125,
0.001800537109375,
0.0992431640625,
0.00592803955078125,
0.0008697509765625,
0.01299285888671875,
0.0005173683166503906,
-0.027862548828125,
-0.0099029541015625,
-0.0092926025390625,
0.0294647216796875,
-0.05279541015625,
0.0322265625,
0.04510498046875,
-0.0321044921875,
-0.0055694580078125,
-0.03546142578125,
0.0087432861328125,
-0.01338958740234375,
0.00684356689453125,
-0.05963134765625,
0.0307159423828125,
0.049896240234375,
0.026214599609375,
0.0518798828125,
0.007457733154296875,
0.039154052734375,
0.034454345703125,
-0.021240234375,
0.033538818359375,
0.059295654296875,
0.064453125,
-0.0038814544677734375,
0.005771636962890625,
0.043731689453125,
-0.0175323486328125,
-0.0087432861328125,
0.03594970703125,
0.0308837890625,
-0.0906982421875,
0.01605224609375,
-0.01177978515625,
0.042572021484375,
0.04852294921875,
0.045989990234375,
-0.00823974609375,
0.006084442138671875,
0.01502227783203125,
-0.05072021484375,
0.0274810791015625,
0.02386474609375,
0.006649017333984375,
0.006931304931640625,
-0.032135009765625,
0.00897979736328125,
0.000014603137969970703,
0.0012149810791015625,
-0.004383087158203125,
0.00501251220703125,
0.01360321044921875,
-0.03741455078125,
-0.0011816024780273438,
0.03692626953125,
0.0030651092529296875,
-0.0199737548828125,
0.06231689453125,
-0.0286407470703125,
0.016815185546875,
0.0243682861328125,
-0.0048370361328125,
0.04132080078125,
0.01120758056640625,
0.006805419921875,
-0.02044677734375,
-0.01806640625,
0.013946533203125,
0.029327392578125,
-0.0287628173828125,
-0.0147552490234375,
-0.0011281967163085938,
-0.0105438232421875,
0.01309967041015625,
-0.0012989044189453125,
-0.0230865478515625,
-0.0166473388671875,
-0.068115234375,
0.055572509765625,
-0.033935546875,
-0.0020084381103515625,
0.0004987716674804688,
0.0222930908203125,
0.015838623046875,
0.015289306640625,
-0.01371002197265625,
-0.0587158203125,
-0.07794189453125,
0.008758544921875,
-0.0911865234375,
0.03076171875,
0.0075225830078125,
-0.08172607421875,
0.08551025390625,
0.0150604248046875,
0.06439208984375,
0.01215362548828125,
0.02783203125,
-0.0087432861328125,
0.0038471221923828125,
-0.02764892578125,
0.046356201171875,
0.0133056640625,
0.046539306640625,
-0.0175933837890625,
-0.012298583984375,
0.033905029296875,
0.0386962890625,
0.09503173828125,
0.033294677734375,
-0.07330322265625,
-0.018646240234375,
0.012115478515625,
0.0017061233520507812,
-0.024749755859375,
0.06671142578125,
-0.008087158203125,
0.03704833984375,
0.02276611328125,
-0.039764404296875,
0.03350830078125,
-0.040313720703125,
-0.045928955078125,
0.0025157928466796875,
0.0026493072509765625,
-0.005130767822265625,
-0.01532745361328125,
0.00611114501953125,
-0.06463623046875,
-0.0017156600952148438,
0.0433349609375,
-0.0085296630859375,
0.00991058349609375,
-0.007007598876953125,
0.034149169921875,
-0.03607177734375,
-0.02557373046875,
-0.0043182373046875,
0.043548583984375,
0.0217742919921875,
0.003917694091796875,
0.027862548828125,
0.018402099609375,
0.0276336669921875,
0.005222320556640625,
0.0022220611572265625,
0.0255889892578125,
0.0093231201171875,
0.0758056640625,
0.047637939453125,
0.03985595703125,
-0.0068359375,
0.00218963623046875,
0.0190277099609375,
0.08087158203125,
-0.05621337890625,
-0.0249176025390625,
-0.00001436471939086914,
0.0169830322265625,
0.01849365234375,
0.00801849365234375,
0.046478271484375,
-0.0202178955078125,
-0.01242828369140625,
-0.0204620361328125,
0.0003592967987060547,
0.01202392578125,
0.01059722900390625,
-0.006465911865234375,
-0.01009368896484375,
-0.00753021240234375,
0.039794921875,
-0.03582763671875,
-0.011566162109375,
-0.0035724639892578125,
0.01421356201171875,
0.0477294921875,
0.01129913330078125,
0.0487060546875,
-0.0141754150390625,
0.00183868408203125,
0.0104217529296875,
-0.018463134765625,
0.003543853759765625,
-0.039337158203125,
-0.031646728515625,
-0.0128021240234375,
0.05145263671875,
0.002655029296875,
-0.001102447509765625,
0.0034046173095703125,
-0.0130157470703125,
-0.01715087890625,
-0.004222869873046875,
0.033233642578125,
-0.0272216796875,
0.07391357421875,
-0.01029205322265625,
0.038482666015625,
-0.01357269287109375,
-0.01355743408203125,
-0.05230712890625,
0.04803466796875,
-0.0006852149963378906,
0.00021851062774658203,
0.02911376953125,
0.00714111328125,
-0.0243377685546875,
-0.01445770263671875,
0.0123748779296875,
0.038787841796875,
0.027587890625,
-0.0141754150390625,
0.023956298828125,
-0.036651611328125,
-0.0821533203125,
0.0239715576171875,
0.04052734375,
-0.01515960693359375,
0.0009112358093261719,
-0.0011138916015625,
0.01953125,
0.0005888938903808594,
-0.023406982421875,
-0.0017566680908203125,
0.00629425048828125,
0.0209503173828125,
0.006175994873046875,
-0.0576171875,
-0.01666259765625,
-0.013671875,
0.01739501953125,
0.01045989990234375,
0.0771484375,
-0.0198516845703125,
0.00669097900390625,
-0.047882080078125,
0.006710052490234375,
-0.06561279296875,
-0.045989990234375,
0.06134033203125,
-0.05035400390625,
-0.054901123046875,
0.0287933349609375,
-0.0282745361328125,
0.056365966796875,
-0.0071258544921875,
0.006580352783203125,
0.07501220703125,
-0.05755615234375,
-0.0006999969482421875,
-0.00887298583984375,
-0.001361846923828125,
-0.039947509765625,
-0.09027099609375,
-0.052734375,
0.0224761962890625,
-0.00437164306640625,
-0.0078125,
-0.0567626953125,
0.0677490234375,
0.016021728515625,
0.0108642578125,
-0.0170440673828125,
-0.0165252685546875,
-0.00963592529296875,
0.0298309326171875,
0.0150604248046875,
-0.020111083984375,
0.035797119140625,
-0.0166015625,
0.00650787353515625,
0.00896453857421875,
0.031524658203125,
0.021514892578125,
-0.055999755859375,
0.0181732177734375,
0.0030765533447265625,
0.0184783935546875,
0.00970458984375,
0.0005640983581542969,
-0.0031909942626953125,
-0.0094757080078125,
-0.0091094970703125,
-0.00864410400390625,
-0.02532958984375,
-0.0052337646484375,
0.0006279945373535156,
0.0049285888671875,
0.01422119140625,
-0.0433349609375,
-0.04071044921875,
0.0234832763671875,
-0.004024505615234375,
0.00484466552734375,
-0.10040283203125,
0.0753173828125,
-0.022308349609375,
0.0618896484375,
-0.067138671875,
-0.038238525390625,
0.005199432373046875,
0.0256805419921875,
-0.045928955078125,
-0.018035888671875,
-0.05859375,
-0.0299072265625,
-0.061859130859375,
-0.0082550048828125,
0.032196044921875,
0.013885498046875,
-0.00429534912109375,
-0.0296173095703125,
-0.04986572265625,
0.03656005859375,
-0.09759521484375,
-0.0113677978515625,
-0.0013704299926757812,
0.0255584716796875,
-0.024017333984375,
-0.07958984375,
-0.0061798095703125,
-0.03375244140625,
0.014251708984375,
-0.00569915771484375,
-0.01067352294921875,
0.00872039794921875,
-0.038482666015625,
-0.0538330078125,
0.01334381103515625,
0.00640869140625,
-0.0355224609375,
-0.041046142578125,
0.0077362060546875,
-0.01270294189453125,
0.01568603515625,
-0.0096893310546875,
-0.03204345703125,
-0.0228118896484375,
0.046356201171875,
0.018890380859375,
0.0091094970703125,
0.0139923095703125,
0.022430419921875,
-0.035369873046875,
0.00457000732421875,
0.00742340087890625,
0.0106658935546875,
0.0267333984375,
-0.00841522216796875,
0.06500244140625,
0.062347412109375,
-0.0027484893798828125,
0.06072998046875,
-0.0034275054931640625,
-0.058746337890625,
-0.0191650390625,
-0.05377197265625,
-0.006626129150390625,
-0.0186309814453125,
0.089599609375,
-0.01256561279296875,
0.00634002685546875,
-0.01403045654296875,
-0.006870269775390625,
-0.0237884521484375,
0.002147674560546875,
-0.02001953125,
0.0036449432373046875,
-0.0531005859375,
-0.018585205078125,
-0.0034942626953125,
-0.02935791015625,
-0.0304718017578125,
0.00994110107421875,
-0.0465087890625,
0.00867462158203125,
-0.0019741058349609375,
-0.02105712890625,
0.0266571044921875,
-0.0028247833251953125,
0.049591064453125,
-0.031341552734375,
-0.017059326171875,
0.003223419189453125,
0.00989532470703125,
0.00818634033203125,
-0.032012939453125,
-0.0192718505859375,
-0.00701141357421875,
-0.0117340087890625,
0.01398468017578125,
0.016326904296875,
0.04608154296875,
-0.0295562744140625,
-0.01238250732421875,
-0.02685546875,
0.0208740234375,
-0.00197601318359375,
0.01081085205078125,
-0.004695892333984375,
0.03192138671875,
0.016204833984375,
0.08941650390625,
-0.01776123046875,
-0.043365478515625,
-0.006473541259765625,
0.015869140625,
-0.02130126953125,
0.0137786865234375,
0.00885009765625,
-0.011199951171875,
-0.005512237548828125,
0.006687164306640625,
0.006671905517578125,
-0.052032470703125,
0.006748199462890625,
-0.01678466796875,
0.015716552734375,
0.019622802734375
] |
ef7431aeb8e9bee90c019f03e40c09f081082c84
|
Wordpress Stackexchange
Q: Jetpack plugin (ShareDaddy): Prevent share buttons showing on custom post types? I noticed ShareDaddy has "Show sharing buttons on this post" for default post types but not for custom post types. I'm guessing I need to add something in 'supports' => array('title','editor','thumbnail'). Does anybody know what I need to add in order for "Show sharing buttons on this post" to show up for custom post types?
A: I know this is an older post, but I found this site when searching for an answer, then found the real answer somewhere else, so I thought i would share it for anyone else having a similar issue.
I created 2 Custom Post-Types and wanted the Share buttons in Jetpack to show up.
I thought it would probably be a code in the functions.php file, as that's where I got the rest of the functionality for the Custom Post-Types.
In fact, I simply went to the Settings->Sharing menu. The Custom Post-Types were there in the list and all I needed to do was put a check in each box to make it work like I wanted.
No extra coding, just a simple check mark.
|
Q: Jetpack plugin (ShareDaddy): Prevent share buttons showing on custom post types? I noticed ShareDaddy has "Show sharing buttons on this post" for default post types but not for custom post types. I'm guessing I need to add something in 'supports' => array('title','editor','thumbnail'). Does anybody know what I need to add in order for "Show sharing buttons on this post" to show up for custom post types?
A: I know this is an older post, but I found this site when searching for an answer, then found the real answer somewhere else, so I thought i would share it for anyone else having a similar issue.
I created 2 Custom Post-Types and wanted the Share buttons in Jetpack to show up.
I thought it would probably be a code in the functions.php file, as that's where I got the rest of the functionality for the Custom Post-Types.
In fact, I simply went to the Settings->Sharing menu. The Custom Post-Types were there in the list and all I needed to do was put a check in each box to make it work like I wanted.
No extra coding, just a simple check mark.
A: ShareDaddy uses two filter hooks either the_content or the_excerpt this means that your custom post type theme template file has to use one of these two functions the_content(); or the_excerpt();.
Update
Ok I guess i didn't get the question. So to add the metabox to your custom post type add this:
// Hook things in, late enough so that add_meta_box() is defined and make sure you already registered you post type.
if (is_admin()){
add_action( 'admin_init', 'add_plugin_meta_boxes' );
add_action( 'save_post', 'save_sharing_box' );
}
// This function tells WP to add the sharing "meta box"
function add_plugin_meta_boxes() {
add_meta_box( 'sharing_meta', __( 'Sharing', 'sharedaddy' ), 'sharing_meta_box_content', 'CUSTOM POST TYPE NAME', 'advanced', 'high' );
}
function save_sharing_box( $post_id ) {
if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE )
return $post_id;
// Record sharing disable
if ( 'CUSTOM POST TYPE NAME' == $_POST['post_type'] ) {
if ( current_user_can( 'edit_post', $post_id ) ) {
if ( isset( $_POST['sharing_status_hidden'] ) ) {
if ( !isset( $_POST['enable_post_sharing'] ) )
update_post_meta( $post_id, 'sharing_disabled', 1 );
else
delete_post_meta( $post_id, 'sharing_disabled' );
}
}
}
return $post_id;
}
and change CUSTOM POST TYPE NAME to you actual custom post type name.
A: Solution is editing jetpack/modules/publicize/publicize.php
line 354 change by this
function post_type_is_publicizeable( $post_type ) {
if ( 'Your_custom_post' == $post_type )
return true;
if ( 'post' == $post_type )
return true;
return post_type_supports( $post_type, 'publicize' );
}
|
wordpress
|
{
"language": "en",
"length": 418,
"provenance": "stackexchange_00019.jsonl.gz:408166",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13333"
}
|
[
0.049407958984375,
-0.000591278076171875,
0.0147857666015625,
-0.02850341796875,
0.0098724365234375,
-0.003986358642578125,
0.038665771484375,
-0.0170745849609375,
-0.0271148681640625,
0.02056884765625,
0.0142059326171875,
0.00028586387634277344,
-0.020843505859375,
-0.05340576171875,
0.020416259765625,
-0.0345458984375,
0.01470184326171875,
0.0179901123046875,
0.0295257568359375,
-0.01477813720703125,
0.015106201171875,
-0.005374908447265625,
0.01165008544921875,
-0.01508331298828125,
0.0168914794921875,
-0.01522064208984375,
0.041107177734375,
-0.043487548828125,
0.0194549560546875,
0.0019931793212890625,
0.020416259765625,
-0.014495849609375,
-0.002979278564453125,
0.059906005859375,
-0.049774169921875,
-0.0228271484375,
0.01316070556640625,
0.0274200439453125,
0.011322021484375,
0.011383056640625,
0.014312744140625,
-0.0211029052734375,
0.020111083984375,
-0.018646240234375,
-0.02288818359375,
-0.0016717910766601562,
-0.00469207763671875,
-0.02197265625,
0.00722503662109375,
0.01233673095703125,
0.001827239990234375,
0.0168304443359375,
0.0108642578125,
0.032867431640625,
-0.007518768310546875,
-0.026153564453125,
0.0229949951171875,
0.001407623291015625,
0.0374755859375,
0.0103302001953125,
-0.02545166015625,
0.0151519775390625,
-0.0182342529296875,
-0.0267486572265625,
-0.009613037109375,
0.022918701171875,
-0.0187530517578125,
0.003875732421875,
0.0121917724609375,
0.0016851425170898438,
-0.019256591796875,
-0.04046630859375,
0.041748046875,
-0.00592041015625,
0.01959228515625,
-0.02020263671875,
-0.0105438232421875,
0.014190673828125,
0.03375244140625,
0.0026111602783203125,
-0.025390625,
-0.048980712890625,
-0.043182373046875,
0.03369140625,
-0.05145263671875,
0.04193115234375,
-0.0238800048828125,
-0.0012388229370117188,
0.0247650146484375,
-0.0023174285888671875,
0.017486572265625,
-0.03759765625,
0.0258941650390625,
0.06707763671875,
0.01021575927734375,
-0.030731201171875,
0.046875,
0.04425048828125,
-0.0183563232421875,
-0.0172271728515625,
0.037017822265625,
-0.040985107421875,
0.03070068359375,
-0.02728271484375,
0.006603240966796875,
-0.0572509765625,
-0.0272216796875,
0.0007028579711914062,
0.06427001953125,
0.0638427734375,
-0.02642822265625,
0.039337158203125,
-0.0285186767578125,
-0.0012922286987304688,
-0.0360107421875,
-0.001010894775390625,
-0.062103271484375,
0.0024852752685546875,
-0.018096923828125,
0.02191162109375,
0.0262451171875,
0.0192718505859375,
0.0008039474487304688,
0.0460205078125,
0.015655517578125,
0.0266265869140625,
-0.01271820068359375,
-0.021209716796875,
0.01432037353515625,
0.0052490234375,
-0.04345703125,
-0.0096435546875,
0.0570068359375,
0.0523681640625,
0.039794921875,
-0.01288604736328125,
0.036102294921875,
-0.033233642578125,
-0.045166015625,
0.017303466796875,
-0.040069580078125,
0.001850128173828125,
0.00841522216796875,
-0.08563232421875,
0.01068878173828125,
-0.01361083984375,
0.02886962890625,
0.049560546875,
-0.008453369140625,
-0.02728271484375,
0.01500701904296875,
0.01360321044921875,
0.037933349609375,
0.01444244384765625,
-0.0352783203125,
0.0010824203491210938,
0.00809478759765625,
-0.00128936767578125,
-0.036590576171875,
-0.039703369140625,
0.008087158203125,
-0.016937255859375,
-0.038360595703125,
0.0167236328125,
-0.00878143310546875,
0.012542724609375,
0.017242431640625,
0.01788330078125,
0.0180206298828125,
0.03692626953125,
0.00252532958984375,
0.0182952880859375,
0.046356201171875,
0.012115478515625,
-0.01081085205078125,
-0.01213836669921875,
0.03338623046875,
0.008636474609375,
0.0189056396484375,
0.0120697021484375,
-0.0270538330078125,
-0.039581298828125,
0.0916748046875,
-0.053466796875,
-0.057037353515625,
0.05322265625,
-0.00855255126953125,
0.0204010009765625,
0.01959228515625,
-0.01543426513671875,
0.057464599609375,
0.05206298828125,
0.00971221923828125,
0.018585205078125,
-0.0155487060546875,
-0.005535125732421875,
-0.00945281982421875,
0.0243682861328125,
-0.03216552734375,
-0.0188446044921875,
-0.061492919921875,
-0.001094818115234375,
-0.01812744140625,
0.037322998046875,
0.01227569580078125,
-0.015411376953125,
0.00846099853515625,
0.01036834716796875,
0.02789306640625,
0.04290771484375,
-0.0026397705078125,
-0.005138397216796875,
-0.007602691650390625,
0.01230621337890625,
0.0211029052734375,
0.011688232421875,
-0.00012362003326416016,
0.04705810546875,
0.01068878173828125,
0.01438140869140625,
-0.00774383544921875,
-0.049072265625,
-0.0030975341796875,
0.013519287109375,
0.045196533203125,
-0.044525146484375,
0.01192474365234375,
-0.037750244140625,
-0.00263214111328125,
0.019256591796875,
-0.059814453125,
0.01177215576171875,
-0.01025390625,
-0.0205230712890625,
-0.039794921875,
0.00824737548828125,
0.00661468505859375,
-0.0193023681640625,
0.0032958984375,
0.031768798828125,
0.0162506103515625,
-0.016326904296875,
-0.0233917236328125,
0.0282135009765625,
-0.0261688232421875,
-0.0131072998046875,
0.034149169921875,
0.00754547119140625,
0.0074310302734375,
0.0222015380859375,
-0.0238494873046875,
0.0019350051879882812,
0.0305938720703125,
-0.01348876953125,
0.03363037109375,
0.0240936279296875,
-0.0049896240234375,
-0.0192413330078125,
0.0186004638671875,
0.005619049072265625,
0.005092620849609375,
0.009674072265625,
-0.0162353515625,
0.007419586181640625,
0.04266357421875,
-0.00669097900390625,
0.06439208984375,
0.045745849609375,
-0.03515625,
-0.00836944580078125,
0.00478363037109375,
0.037200927734375,
0.00881195068359375,
0.03851318359375,
0.07183837890625,
-0.0251617431640625,
-0.045135498046875,
-0.035125732421875,
0.043121337890625,
0.040618896484375,
-0.0178070068359375,
-0.00487518310546875,
-0.0577392578125,
-0.0284881591796875,
0.037384033203125,
-0.0251922607421875,
-0.0200347900390625,
-0.02630615234375,
0.0270843505859375,
-0.01079559326171875,
-0.0131683349609375,
0.07257080078125,
0.005603790283203125,
0.05419921875,
0.058380126953125,
-0.0115966796875,
0.01387786865234375,
-0.048492431640625,
0.04022216796875,
-0.04010009765625,
0.044036865234375,
0.06817626953125,
-0.0015354156494140625,
0.01422119140625,
0.01084136962890625,
-0.0084228515625,
-0.0088348388671875,
0.034271240234375,
-0.0018606185913085938,
-0.03936767578125,
-0.037506103515625,
-0.007129669189453125,
0.006389617919921875,
0.0236053466796875,
-0.0380859375,
-0.039215087890625,
-0.040618896484375,
-0.002349853515625,
-0.08258056640625,
-0.04656982421875,
0.053314208984375,
-0.048370361328125,
0.005390167236328125,
-0.009185791015625,
-0.035003662109375,
-0.020355224609375,
0.049163818359375,
0.005008697509765625,
-0.06414794921875,
-0.00804901123046875,
-0.0077056884765625,
-0.047576904296875,
-0.022003173828125,
0.009857177734375,
-0.0038547515869140625,
0.010345458984375,
0.0186309814453125,
0.03460693359375,
0.03619384765625,
-0.029876708984375,
0.037841796875,
0.015869140625,
-0.040618896484375,
0.00384521484375,
0.07891845703125,
-0.06890869140625,
0.044647216796875,
0.0026683807373046875,
0.039794921875,
0.07696533203125,
-0.041534423828125,
-0.0221405029296875,
-0.0089111328125,
-0.0035114288330078125,
0.0010671615600585938,
0.01328277587890625,
0.01129913330078125,
0.0259246826171875,
0.0281829833984375,
-0.032623291015625,
-0.033538818359375,
0.0130615234375,
-0.0272369384765625,
-0.01152801513671875,
0.004131317138671875,
-0.022705078125,
-0.034881591796875,
0.03497314453125,
0.034027099609375,
0.01448822021484375,
-0.0211639404296875,
0.01221466064453125,
0.0274505615234375,
0.00719451904296875,
0.052581787109375,
-0.007511138916015625,
-0.0626220703125,
-0.0435791015625,
0.05401611328125,
-0.030517578125,
-0.005367279052734375,
-0.0278167724609375,
0.046661376953125,
-0.0321044921875,
-0.004791259765625,
0.013458251953125,
-0.07275390625,
0.02197265625,
-0.0272979736328125,
0.0194091796875,
-0.0291290283203125,
0.0303802490234375,
-0.04803466796875,
0.0088653564453125,
-0.01104736328125,
-0.0113525390625,
0.0037384033203125,
-0.025360107421875,
-0.0552978515625,
-0.01090240478515625,
-0.034271240234375,
-0.0019397735595703125,
-0.0304107666015625,
-0.0285491943359375,
0.003566741943359375,
-0.03955078125,
-0.00884246826171875,
-0.030792236328125,
0.040008544921875,
0.0196990966796875,
0.00978851318359375,
-0.00977325439453125,
0.025177001953125,
-0.0504150390625,
-0.016815185546875,
0.007488250732421875,
-0.0904541015625,
-0.004703521728515625,
-0.004856109619140625,
0.03076171875,
-0.0153961181640625,
0.0003345012664794922,
-0.031219482421875,
0.0236358642578125,
-0.0085601806640625,
0.0025501251220703125,
-0.01094818115234375,
-0.005626678466796875,
-0.00665283203125,
0.0124969482421875,
-0.01009368896484375,
-0.0040283203125,
0.007335662841796875,
0.0278778076171875,
-0.031768798828125,
-0.0274505615234375,
-0.0188446044921875,
-0.0802001953125,
0.05548095703125,
-0.06158447265625,
0.004688262939453125,
-0.048828125,
-0.030731201171875,
0.049560546875,
0.0065155029296875,
0.004482269287109375,
-0.08697509765625,
-0.0218963623046875,
0.01311492919921875,
-0.024505615234375,
-0.01326751708984375,
0.0213775634765625,
0.0499267578125,
0.0102996826171875,
0.0007104873657226562,
-0.05743408203125,
-0.0209808349609375,
0.0054779052734375,
-0.0010271072387695312,
0.0227203369140625,
0.031463623046875,
0.012481689453125,
-0.0404052734375,
-0.00714111328125,
0.01904296875,
-0.03314208984375,
0.04901123046875,
-0.0298919677734375,
-0.0177459716796875,
0.0170745849609375,
-0.040618896484375,
-0.00787353515625,
0.0014677047729492188,
-0.0010824203491210938,
0.01617431640625,
0.017578125,
0.01175689697265625,
-0.0086822509765625,
0.0002894401550292969,
-0.01308441162109375,
-0.006275177001953125,
0.0212554931640625,
0.0014486312866210938,
0.032928466796875,
0.01947021484375,
-0.0001862049102783203,
0.01459503173828125,
-0.01190185546875,
-0.02508544921875,
-0.0209197998046875,
-0.002185821533203125,
-0.027130126953125,
-0.01175689697265625,
0.016448974609375,
-0.04351806640625,
-0.0309295654296875,
0.01241302490234375,
-0.01039886474609375,
-0.01018524169921875,
-0.056396484375,
-0.03131103515625,
0.01502227783203125,
-0.0008177757263183594,
0.01401519775390625,
0.03466796875,
0.005764007568359375,
0.041748046875,
0.002162933349609375,
-0.0030879974365234375,
0.04107666015625,
0.047882080078125,
-0.016632080078125,
0.0045166015625,
0.016204833984375,
-0.00888824462890625,
0.0025081634521484375,
0.040008544921875,
-0.028594970703125,
0.02020263671875,
0.0009512901306152344,
0.054779052734375,
0.0654296875,
-0.0106964111328125,
0.0149383544921875,
0.03521728515625,
-0.0269622802734375,
-0.0302276611328125,
-0.03253173828125,
-0.019683837890625,
0.006557464599609375,
-0.01171112060546875,
0.02532958984375,
-0.0202484130859375,
-0.0369873046875,
0.048919677734375,
-0.035308837890625,
-0.019866943359375,
0.0048370361328125,
-0.03167724609375,
-0.0204010009765625,
-0.03131103515625,
-0.01026153564453125,
0.03765869140625,
0.0034160614013671875,
-0.0210418701171875,
-0.00199127197265625,
-0.0509033203125,
-0.01605224609375,
0.002838134765625,
-0.0440673828125,
0.00565338134765625,
0.02374267578125,
0.01523590087890625,
-0.0291595458984375,
-0.009796142578125,
-0.05670166015625,
0.0179901123046875,
-0.039764404296875,
-0.0122833251953125,
0.052764892578125,
-0.02703857421875,
0.055511474609375,
-0.017059326171875,
-0.020782470703125,
-0.02508544921875,
0.0273590087890625,
-0.00034809112548828125,
0.0112457275390625,
-0.0389404296875,
0.007049560546875,
-0.045562744140625,
-0.0228118896484375,
0.0352783203125,
0.006687164306640625,
-0.057830810546875,
-0.01395416259765625,
0.0362548828125,
0.05218505859375,
-0.03607177734375,
-0.0645751953125,
-0.0016431808471679688,
0.0156402587890625,
0.03826904296875,
0.11273193359375,
-0.0258941650390625,
0.032684326171875,
0.00347900390625,
0.0721435546875,
-0.019683837890625,
-0.00913238525390625,
-0.00992584228515625,
-0.0062103271484375,
0.00959014892578125,
-0.0635986328125,
-0.019775390625,
-0.01322174072265625,
-0.0309906005859375,
0.038055419921875,
0.016693115234375,
-0.0013914108276367188,
-0.0012350082397460938,
-0.004093170166015625,
0.01198577880859375,
-0.035064697265625,
0.0239715576171875,
0.01311492919921875,
0.0037288665771484375,
0.0286407470703125,
-0.02886962890625,
0.0035648345947265625,
0.006496429443359375,
-0.01357269287109375,
0.00202178955078125,
-0.0086669921875,
-0.0297698974609375,
0.031890869140625,
-0.057281494140625,
0.08148193359375,
0.0999755859375,
0.0302276611328125,
0.057281494140625,
0.008636474609375,
0.0102081298828125,
-0.0142669677734375,
0.0027179718017578125,
-0.0131072998046875,
-0.0570068359375,
0.0286102294921875,
0.0029735565185546875,
-0.0205230712890625,
0.051788330078125,
-0.02191162109375,
0.03924560546875,
0.04595947265625,
0.08624267578125,
-0.0731201171875,
0.007781982421875,
0.06494140625,
-0.00366973876953125,
0.0014190673828125,
0.0017194747924804688,
-0.00037789344787597656,
-0.007785797119140625,
-0.0191192626953125,
-0.042022705078125,
-0.053741455078125,
-0.03863525390625,
-0.02386474609375,
0.0073089599609375,
0.023345947265625,
0.020263671875,
0.003353118896484375,
-0.009552001953125,
-0.043182373046875,
0.01018524169921875,
-0.0272064208984375,
0.01451873779296875,
0.035003662109375,
-0.03594970703125,
-0.03118896484375,
-0.075927734375,
-0.04296875,
-0.007053375244140625,
-0.06103515625,
0.0648193359375,
-0.0028057098388671875,
0.004405975341796875,
0.048919677734375,
-0.025848388671875,
0.0592041015625,
-0.00311279296875,
0.0152130126953125,
-0.02618408203125,
-0.020843505859375,
0.0230255126953125,
0.05523681640625,
-0.0361328125,
0.0372314453125,
-0.00853729248046875,
-0.01485443115234375,
-0.0152587890625,
0.0277252197265625,
0.1124267578125,
-0.01068115234375,
-0.0300750732421875,
0.04254150390625,
0.0309295654296875,
-0.055145263671875,
-0.0018701553344726562,
-0.050567626953125,
-0.06536865234375,
-0.0538330078125,
-0.043609619140625,
-0.12841796875,
0.0227813720703125,
-0.0283203125,
-0.041656494140625,
0.034912109375,
0.00566864013671875,
-0.016845703125,
-0.036834716796875,
0.023681640625,
0.02215576171875,
0.028594970703125,
-0.0227508544921875,
0.0523681640625,
0.0006809234619140625,
0.0090179443359375,
-0.033660888671875,
0.0028400421142578125,
-0.01398468017578125,
0.0225372314453125,
0.0254058837890625,
0.0053253173828125,
-0.006031036376953125,
0.01383209228515625,
0.050506591796875,
0.02618408203125,
-0.00506591796875,
0.0181121826171875,
0.0022373199462890625,
0.00360107421875,
-0.0158233642578125,
-0.01287841796875,
0.027313232421875,
-0.042449951171875,
-0.03369140625,
0.0005445480346679688,
0.041351318359375,
0.052581787109375,
0.0107269287109375,
-0.024993896484375,
-0.013702392578125,
0.01241302490234375,
0.0151214599609375,
-0.00006812810897827148,
0.0062103271484375,
0.02728271484375,
0.0260162353515625,
-0.01190185546875,
-0.042236328125,
-0.03271484375,
0.039215087890625,
0.00013828277587890625,
0.05426025390625,
-0.00014543533325195312,
0.00824737548828125,
0.047332763671875,
-0.00963592529296875,
0.028564453125,
0.03192138671875,
-0.04144287109375,
0.0032329559326171875,
0.005344390869140625,
0.031402587890625,
-0.041748046875,
0.0030994415283203125,
0.0202178955078125,
0.00627899169921875,
-0.01493072509765625,
-0.02484130859375,
0.010101318359375,
-0.0032978057861328125,
-0.01456451416015625,
-0.0338134765625,
-0.03961181640625,
-0.0272216796875,
0.0258941650390625,
-0.0281524658203125,
-0.0076751708984375,
0.01654052734375,
0.0682373046875,
-0.004413604736328125,
-0.0270843505859375,
-0.04168701171875,
-0.0321044921875,
-0.0285797119140625,
-0.0140838623046875,
0.0016412734985351562,
0.05841064453125,
0.04559326171875,
0.040618896484375,
-0.0019378662109375,
-0.0240020751953125,
-0.03619384765625,
0.0019207000732421875,
-0.020294189453125,
0.051605224609375,
-0.06854248046875,
0.0002498626708984375,
0.00017845630645751953,
0.053680419921875,
0.053253173828125,
-0.013214111328125,
0.04193115234375,
-0.00478363037109375,
-0.025726318359375,
0.00859832763671875,
0.004756927490234375,
-0.021270751953125,
-0.02203369140625,
-0.03289794921875,
-0.00251007080078125,
0.016937255859375,
-0.009307861328125,
0.0215301513671875,
-0.00698089599609375,
0.03985595703125,
-0.0361328125,
0.043609619140625,
-0.0093841552734375,
-0.04010009765625,
0.03790283203125,
-0.0352783203125,
0.08966064453125,
-0.0149688720703125,
-0.033203125,
0.003108978271484375,
-0.03741455078125,
-0.030792236328125,
0.00568389892578125,
0.0250244140625,
-0.0216522216796875,
0.045166015625,
0.01436614990234375,
-0.0082855224609375,
-0.003955841064453125,
-0.0223236083984375,
0.035186767578125,
-0.014312744140625,
0.00018489360809326172,
0.004489898681640625,
-0.054901123046875,
-0.025665283203125,
-0.00035262107849121094,
0.032562255859375,
-0.0269775390625,
0.066162109375,
-0.0239105224609375,
0.00450897216796875,
0.010955810546875,
0.060150146484375,
-0.0614013671875,
-0.006961822509765625,
0.045013427734375,
-0.03857421875,
-0.0013227462768554688,
-0.0012979507446289062,
-0.03851318359375,
-0.0227203369140625,
0.050628662109375,
-0.042755126953125,
-0.0172119140625,
0.020843505859375,
0.0223236083984375,
-0.0391845703125,
-0.00914764404296875,
-0.04412841796875,
-0.037078857421875,
-0.057403564453125,
-0.0201263427734375,
0.01308441162109375,
-0.00612640380859375,
-0.002288818359375,
0.038177490234375,
-0.01454925537109375,
-0.0305328369140625,
0.02923583984375,
-0.048370361328125,
0.03363037109375,
0.03314208984375,
0.003383636474609375,
-0.0005621910095214844,
0.0109100341796875,
-0.0245513916015625,
0.03179931640625,
-0.01047515869140625,
0.04290771484375,
-0.003437042236328125,
-0.04736328125,
0.01514434814453125,
0.01535797119140625,
0.014434814453125,
-0.032562255859375,
-0.01090240478515625,
0.055084228515625,
-0.0251312255859375,
-0.036529541015625,
-0.0084686279296875,
-0.0253143310546875,
-0.01849365234375,
-0.00153350830078125,
0.01519775390625,
-0.01538848876953125,
-0.0308990478515625,
-0.05499267578125,
-0.0222625732421875,
0.0447998046875,
0.0155792236328125,
-0.052703857421875,
0.00763702392578125,
-0.023101806640625,
0.0260009765625,
0.0127716064453125,
0.03204345703125,
-0.0018815994262695312,
0.0543212890625,
-0.00554656982421875,
-0.02532958984375,
-0.013397216796875,
0.040191650390625,
-0.0035247802734375,
0.0169525146484375,
0.00650787353515625,
-0.0121307373046875,
-0.0179443359375,
0.00537109375,
-0.00290679931640625,
0.053314208984375,
0.048492431640625,
-0.024261474609375,
-0.0019073486328125,
-0.00853729248046875,
-0.02130126953125,
-0.007022857666015625,
0.024200439453125,
-0.0546875,
-0.0380859375,
-0.04437255859375,
0.016693115234375,
0.01073455810546875,
-0.019927978515625,
-0.031585693359375,
0.08502197265625,
-0.01479339599609375,
-0.00328826904296875,
-0.050872802734375,
0.048614501953125,
0.0301055908203125,
-0.015716552734375,
-0.012847900390625,
-0.024932861328125,
-0.018585205078125,
-0.01320648193359375,
-0.0199127197265625,
-0.017730712890625,
0.01538848876953125,
-0.01079559326171875,
-0.0207366943359375,
0.0215301513671875,
0.032928466796875,
-0.061279296875,
0.03497314453125,
-0.01922607421875,
0.03472900390625,
0.02960205078125,
-0.046173095703125,
0.00372314453125,
-0.029022216796875,
0.0178070068359375,
0.023590087890625,
-0.005023956298828125,
-0.043609619140625,
-0.0275726318359375,
0.00930023193359375,
0.0301055908203125,
0.010986328125,
-0.0022258758544921875,
0.03271484375,
-0.07403564453125,
-0.00809478759765625,
0.01393890380859375,
-0.0193939208984375,
-0.034393310546875,
0.004825592041015625,
0.067626953125,
-0.002452850341796875,
0.0015745162963867188,
0.0051422119140625,
-0.035858154296875,
-0.007083892822265625,
-0.0021343231201171875,
-0.019622802734375,
-0.07513427734375,
0.06866455078125,
0.01442718505859375,
-0.0233001708984375,
0.0250091552734375,
0.01074981689453125,
-0.037322998046875,
0.02471923828125,
0.0219573974609375,
0.007232666015625,
-0.0107269287109375,
-0.01441192626953125,
0.01256561279296875,
0.01055908203125,
0.0238800048828125,
-0.0299072265625,
-0.03411865234375,
-0.01175689697265625,
0.0129241943359375,
-0.0196990966796875,
0.00571441650390625,
-0.004322052001953125,
0.027618408203125,
-0.0003151893615722656,
0.052978515625,
-0.0298614501953125,
0.0246734619140625,
-0.0088653564453125,
0.01186370849609375,
-0.031982421875,
0.01313018798828125,
0.022857666015625,
-0.0175933837890625,
0.0311431884765625,
-0.0102996826171875,
0.0262603759765625,
0.01149749755859375,
-0.005130767822265625,
0.01299285888671875,
-0.048004150390625,
0.01328277587890625
] |
6b5fb565cfe7f4ed90ce3ac6d653957426275ab7
|
Wordpress Stackexchange
Q: How to resolve "Failed to send your message" problem for Contact Form 7? I am using contact form 7 but when i m trying to send msg through contact form it gives error given below
Failed to send your message. Please try later or contact administrator by other way.
please help me
A: You haven't given enough information, so it might have something to do with javascript conflicts, files not loading, server SMTP, etc. Best thing to do is work through the Contact Form 7 issues FAQ at contactform7.com/faq/
|
Q: How to resolve "Failed to send your message" problem for Contact Form 7? I am using contact form 7 but when i m trying to send msg through contact form it gives error given below
Failed to send your message. Please try later or contact administrator by other way.
please help me
A: You haven't given enough information, so it might have something to do with javascript conflicts, files not loading, server SMTP, etc. Best thing to do is work through the Contact Form 7 issues FAQ at contactform7.com/faq/
A: Check your CPANEL to make sure mail isnt going to a local mailbox.
despite any MX settings, if you have a remote mailbox somewhere else, mail sent from wordpress will first go to any local mailbox.
you must disable this in CPANEL/mx entry maintenance.
this solved my issue.
A: Something goes wrong while mailing the contact form. Maybe the server doesn't allow to send mail via sendmail().
You can use a plugin to send mail via SMTP. These plugins I've used before:
*
*WP Mail SMTP - http://wordpress.org/extend/plugins/wp-mail-smtp/
*Configure SMTP - http://wordpress.org/extend/plugins/configure-smtp/
Download and install in WordPress. Enter your SMTP-server on the settingspage.
A: The following link details a few of the fixes that have worked for some users.
http://itsjg.com/blog/2011/03/failed-to-send-your-message-please-try-later-or-contact-administrator-by-other-way/
These fixes include:
*
*change the wordpress contact form area from section ([your-name] <[your-email]>) to [email protected].
*add all fields inside <label>
*or, use “WP Mail SMTP plugin”. Then you configure your mail server details.
For me personally, I tried the first two options, but it only started working and sending emails after I installed the WP Mail SMTP plugin, and configured it to use the Gmail SMTP server (which required that I created a gmail account, as you need to provide a username and password when connecting to Gmail's server).
A: Refer to Contact Form 7 - FAQ which now covers this issue in some detail.
|
wordpress
|
{
"language": "en",
"length": 317,
"provenance": "stackexchange_00019.jsonl.gz:408176",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13367"
}
|
[
0.011962890625,
-0.01485443115234375,
-0.0011434555053710938,
-0.00433349609375,
-0.016510009765625,
-0.01044464111328125,
0.01404571533203125,
-0.0146636962890625,
0.043121337890625,
0.0185699462890625,
-0.027923583984375,
-0.0100250244140625,
0.0107421875,
-0.023712158203125,
-0.0126953125,
-0.016632080078125,
-0.0098114013671875,
0.039276123046875,
-0.00013768672943115234,
-0.033111572265625,
0.020294189453125,
-0.045501708984375,
-0.0194091796875,
0.02789306640625,
-0.00917816162109375,
0.057220458984375,
0.0001722574234008789,
-0.0210723876953125,
-0.038299560546875,
-0.0217437744140625,
-0.007274627685546875,
0.02435302734375,
0.05438232421875,
0.0265960693359375,
-0.0838623046875,
-0.01092529296875,
-0.006317138671875,
-0.010955810546875,
-0.056121826171875,
0.052337646484375,
0.0005731582641601562,
0.001598358154296875,
0.09320068359375,
0.038604736328125,
0.028900146484375,
-0.04779052734375,
0.017822265625,
-0.083740234375,
0.0225372314453125,
-0.004180908203125,
-0.0018968582153320312,
0.044097900390625,
0.0064697265625,
-0.023162841796875,
-0.00917816162109375,
-0.0010852813720703125,
-0.0156707763671875,
0.057769775390625,
0.003997802734375,
0.035858154296875,
0.0037689208984375,
0.0667724609375,
-0.0159149169921875,
-0.00972747802734375,
0.01506805419921875,
-0.0198516845703125,
-0.01580810546875,
0.0152130126953125,
-0.044036865234375,
0.0241241455078125,
0.06048583984375,
-0.039886474609375,
0.0159454345703125,
0.0143585205078125,
0.03302001953125,
-0.054107666015625,
0.0025119781494140625,
0.0137786865234375,
0.021697998046875,
0.04754638671875,
-0.03704833984375,
-0.06927490234375,
-0.020843505859375,
0.00970458984375,
-0.0238800048828125,
0.033538818359375,
-0.0174102783203125,
0.00826263427734375,
-0.01031494140625,
-0.037445068359375,
-0.006832122802734375,
-0.0162200927734375,
-0.04656982421875,
-0.0006742477416992188,
-0.0031566619873046875,
-0.05035400390625,
0.00521087646484375,
0.005527496337890625,
-0.006870269775390625,
-0.0240936279296875,
-0.02435302734375,
-0.0021610260009765625,
-0.050445556640625,
0.007732391357421875,
-0.010406494140625,
0.03680419921875,
-0.0222930908203125,
0.007701873779296875,
0.0291595458984375,
0.029296875,
0.005413055419921875,
-0.004611968994140625,
0.01226043701171875,
0.0104217529296875,
-0.0164947509765625,
-0.006099700927734375,
-0.025421142578125,
0.024627685546875,
-0.0182342529296875,
0.0187225341796875,
-0.01580810546875,
0.028411865234375,
-0.05413818359375,
-0.0293426513671875,
0.0062103271484375,
-0.021728515625,
0.01076507568359375,
0.021240234375,
0.08251953125,
-0.005748748779296875,
-0.0275115966796875,
-0.01088714599609375,
0.041839599609375,
0.031890869140625,
0.03436279296875,
-0.016693115234375,
0.00705718994140625,
-0.01403045654296875,
0.007720947265625,
0.02008056640625,
0.0108642578125,
-0.03973388671875,
-0.0037097930908203125,
0.030609130859375,
-0.06011962890625,
0.027587890625,
0.029052734375,
0.00293731689453125,
-0.0271759033203125,
-0.047271728515625,
-0.05853271484375,
0.017425537109375,
0.0170135498046875,
0.03057861328125,
-0.027008056640625,
0.026763916015625,
0.00643157958984375,
-0.003505706787109375,
-0.032196044921875,
-0.0205078125,
0.0180816650390625,
0.0082550048828125,
0.050628662109375,
-0.01560211181640625,
0.006320953369140625,
-0.0265960693359375,
-0.0750732421875,
-0.004467010498046875,
0.0035572052001953125,
-0.02734375,
-0.020965576171875,
0.03509521484375,
-0.01702880859375,
-0.005756378173828125,
0.0142669677734375,
-0.004741668701171875,
0.026702880859375,
-0.0168304443359375,
0.020660400390625,
0.01100921630859375,
-0.0249786376953125,
-0.0238037109375,
0.038299560546875,
-0.0301055908203125,
-0.0276641845703125,
0.0689697265625,
0.0110931396484375,
0.02001953125,
-0.030548095703125,
-0.01490020751953125,
0.05511474609375,
0.08001708984375,
0.004817962646484375,
0.050384521484375,
-0.038482666015625,
-0.07574462890625,
-0.0008916854858398438,
0.006061553955078125,
-0.046417236328125,
0.025238037109375,
-0.0020046234130859375,
-0.009490966796875,
0.02813720703125,
-0.017669677734375,
0.00417327880859375,
-0.004016876220703125,
-0.00836944580078125,
0.0170440673828125,
-0.01396942138671875,
0.0029430389404296875,
0.0220184326171875,
-0.0240478515625,
0.0016460418701171875,
-0.032745361328125,
-0.006755828857421875,
0.004444122314453125,
-0.021148681640625,
0.0272369384765625,
-0.01337432861328125,
0.059112548828125,
-0.045318603515625,
-0.0018224716186523438,
-0.041351318359375,
-0.031982421875,
-0.050018310546875,
0.0268707275390625,
-0.05010986328125,
0.01885986328125,
-0.060211181640625,
0.0223846435546875,
0.00525665283203125,
0.041259765625,
0.0017080307006835938,
0.0241851806640625,
-0.0259246826171875,
0.01027679443359375,
0.00543975830078125,
-0.0015125274658203125,
0.0024261474609375,
0.028472900390625,
0.018341064453125,
-0.002880096435546875,
-0.0233154296875,
0.031494140625,
0.0177001953125,
-0.06475830078125,
-0.0203094482421875,
0.035919189453125,
0.02947998046875,
-0.001598358154296875,
0.008087158203125,
-0.045196533203125,
0.041961669921875,
-0.04364013671875,
0.026397705078125,
0.0257415771484375,
-0.003078460693359375,
-0.029815673828125,
-0.009613037109375,
-0.00998687744140625,
0.02301025390625,
0.005443572998046875,
-0.06707763671875,
0.0204925537109375,
0.0112762451171875,
-0.00928497314453125,
0.0033016204833984375,
-0.005199432373046875,
0.01251983642578125,
0.006870269775390625,
0.00502777099609375,
-0.102294921875,
0.01529693603515625,
0.0256805419921875,
0.01824951171875,
0.09246826171875,
-0.04498291015625,
-0.0191192626953125,
0.0653076171875,
0.051239013671875,
-0.00467681884765625,
0.0276031494140625,
0.0185546875,
-0.00670623779296875,
-0.017425537109375,
-0.036102294921875,
0.022613525390625,
0.004680633544921875,
0.029083251953125,
-0.0079498291015625,
0.01548004150390625,
0.00135040283203125,
-0.0223846435546875,
0.055633544921875,
0.00234222412109375,
-0.03314208984375,
-0.0279693603515625,
-0.0027027130126953125,
0.03765869140625,
-0.06268310546875,
-0.0203857421875,
0.03173828125,
-0.06396484375,
0.04022216796875,
0.0038509368896484375,
-0.023223876953125,
-0.018585205078125,
0.0614013671875,
0.022491455078125,
-0.03216552734375,
0.017578125,
0.055908203125,
0.0133514404296875,
0.0111846923828125,
-0.0003228187561035156,
-0.023406982421875,
-0.01654052734375,
0.0011434555053710938,
-0.0582275390625,
-0.08355712890625,
-0.038909912109375,
-0.0299530029296875,
-0.0307464599609375,
0.0241546630859375,
-0.006427764892578125,
0.01334381103515625,
0.0306854248046875,
0.008514404296875,
0.0261383056640625,
-0.012786865234375,
-0.07135009765625,
-0.037445068359375,
-0.074462890625,
-0.002315521240234375,
-0.035430908203125,
0.0017852783203125,
0.0003504753112792969,
0.03680419921875,
-0.01261138916015625,
-0.0732421875,
-0.0113372802734375,
-0.01384735107421875,
-0.0037174224853515625,
0.0296478271484375,
-0.05853271484375,
0.05242919921875,
0.00958251953125,
0.01251220703125,
-0.0287017822265625,
0.005523681640625,
-0.0093841552734375,
-0.02557373046875,
-0.01959228515625,
-0.047027587890625,
-0.00818634033203125,
0.008636474609375,
0.00690460205078125,
-0.050384521484375,
0.016265869140625,
-0.06494140625,
0.007411956787109375,
0.01482391357421875,
-0.0026378631591796875,
-0.043487548828125,
-0.017547607421875,
-0.022918701171875,
-0.017578125,
-0.0019378662109375,
-0.0130157470703125,
0.00827789306640625,
-0.01238250732421875,
-0.046295166015625,
0.087646484375,
-0.00637054443359375,
-0.00811004638671875,
-0.023529052734375,
0.023284912109375,
-0.0296478271484375,
0.046173095703125,
0.0130615234375,
-0.005218505859375,
-0.0141754150390625,
0.033843994140625,
-0.00714874267578125,
-0.06256103515625,
0.0169525146484375,
-0.07244873046875,
-0.03326416015625,
-0.025421142578125,
0.0108795166015625,
-0.0036449432373046875,
0.04534912109375,
0.021942138671875,
-0.050689697265625,
0.0029773712158203125,
0.0134124755859375,
0.007080078125,
0.00812530517578125,
0.05096435546875,
-0.0338134765625,
-0.0244598388671875,
0.0025997161865234375,
-0.0312347412109375,
-0.005741119384765625,
0.006633758544921875,
-0.039337158203125,
0.031341552734375,
-0.054656982421875,
0.01525115966796875,
-0.00542449951171875,
-0.011077880859375,
0.0172271728515625,
-0.001415252685546875,
-0.026611328125,
0.001743316650390625,
-0.01390838623046875,
-0.0926513671875,
-0.004169464111328125,
-0.0242919921875,
0.049530029296875,
0.002834320068359375,
0.01076507568359375,
-0.033660888671875,
0.043182373046875,
0.03924560546875,
0.01342010498046875,
0.00429534912109375,
-0.05084228515625,
0.0158843994140625,
0.05853271484375,
0.034820556640625,
0.0022716522216796875,
0.0218048095703125,
0.01549530029296875,
-0.06036376953125,
-0.0246124267578125,
-0.00904083251953125,
-0.0272674560546875,
0.042816162109375,
-0.0638427734375,
-0.06646728515625,
-0.04461669921875,
-0.0283355712890625,
-0.0265045166015625,
0.0006732940673828125,
-0.034637451171875,
-0.005340576171875,
-0.05865478515625,
-0.01255035400390625,
0.00044417381286621094,
-0.0275115966796875,
0.030792236328125,
0.00022995471954345703,
0.00864410400390625,
-0.00667572021484375,
-0.05126953125,
-0.0217132568359375,
0.051116943359375,
0.01401519775390625,
-0.03729248046875,
-0.006160736083984375,
-0.05670166015625,
0.051513671875,
0.034942626953125,
0.0015916824340820312,
0.0040740966796875,
0.082763671875,
0.003292083740234375,
0.002407073974609375,
0.005962371826171875,
0.00521087646484375,
-0.02783203125,
0.00136566162109375,
0.0034637451171875,
0.0015974044799804688,
0.01027679443359375,
0.019134521484375,
-0.0021915435791015625,
0.0035419464111328125,
-0.01119232177734375,
-0.06591796875,
0.04278564453125,
-0.060821533203125,
0.00627899169921875,
-0.0004286766052246094,
0.0036907196044921875,
0.017364501953125,
-0.0203399658203125,
-0.006069183349609375,
-0.0186767578125,
-0.023773193359375,
-0.007564544677734375,
0.0012683868408203125,
0.022369384765625,
-0.00205230712890625,
-0.0113983154296875,
-0.01200103759765625,
0.04791259765625,
0.059356689453125,
-0.02850341796875,
0.0215606689453125,
0.0128631591796875,
-0.061981201171875,
-0.040283203125,
0.0291290283203125,
-0.01464080810546875,
0.03857421875,
0.0308074951171875,
0.037567138671875,
0.057037353515625,
0.07550048828125,
0.0276947021484375,
0.007221221923828125,
0.011871337890625,
-0.01483917236328125,
-0.0282135009765625,
0.08404541015625,
0.00795745849609375,
0.010650634765625,
-0.01100921630859375,
0.018707275390625,
0.03436279296875,
0.0071258544921875,
0.0576171875,
-0.0364990234375,
-0.007843017578125,
-0.0243377685546875,
-0.0113677978515625,
-0.0458984375,
-0.00943756103515625,
0.00727081298828125,
0.0129241943359375,
0.007160186767578125,
-0.0043182373046875,
0.025421142578125,
0.005096435546875,
0.0026493072509765625,
0.0010890960693359375,
0.033782958984375,
0.0077362060546875,
0.0013532638549804688,
0.02056884765625,
0.0134124755859375,
0.01171875,
0.01776123046875,
0.01318359375,
-0.003177642822265625,
0.0258941650390625,
0.017608642578125,
0.035980224609375,
-0.041015625,
-0.054443359375,
0.07763671875,
-0.0013227462768554688,
-0.02679443359375,
-0.0328369140625,
-0.011016845703125,
-0.027069091796875,
0.02923583984375,
0.076416015625,
-0.04736328125,
-0.03076171875,
-0.00833892822265625,
0.05389404296875,
-0.031890869140625,
0.0491943359375,
-0.0234222412109375,
-0.0103912353515625,
-0.0186920166015625,
0.00275421142578125,
-0.038238525390625,
-0.02081298828125,
-0.036865234375,
-0.05145263671875,
-0.0288238525390625,
-0.007419586181640625,
-0.004947662353515625,
0.01763916015625,
-0.024688720703125,
-0.033111572265625,
-0.01099395751953125,
0.01473236083984375,
0.016571044921875,
0.009857177734375,
-0.0173492431640625,
0.01508331298828125,
-0.029754638671875,
0.0166015625,
-0.021636962890625,
-0.0270538330078125,
-0.029052734375,
0.007171630859375,
0.01177215576171875,
-0.0246429443359375,
-0.00766754150390625,
-0.029083251953125,
0.0285797119140625,
-0.027801513671875,
-0.00919342041015625,
-0.00449371337890625,
-0.019134521484375,
-0.023162841796875,
-0.0018186569213867188,
-0.0204925537109375,
0.04180908203125,
-0.027496337890625,
-0.028076171875,
-0.006427764892578125,
-0.0281982421875,
0.0287322998046875,
0.00270843505859375,
-0.001247406005859375,
0.024505615234375,
-0.028656005859375,
0.0310516357421875,
0.00275421142578125,
0.0445556640625,
0.0037784576416015625,
0.00768280029296875,
-0.036865234375,
0.0017251968383789062,
0.04913330078125,
0.0170135498046875,
-0.0079498291015625,
0.065673828125,
-0.00934600830078125,
-0.0670166015625,
0.00714111328125,
0.0147857666015625,
-0.03076171875,
-0.0177459716796875,
-0.033905029296875,
0.044158935546875,
0.09246826171875,
0.132080078125,
-0.127197265625,
0.0308990478515625,
0.0723876953125,
-0.031890869140625,
-0.016876220703125,
-0.0300445556640625,
0.0180511474609375,
0.0161285400390625,
0.05950927734375,
0.01428985595703125,
-0.01180267333984375,
0.0182952880859375,
-0.01271820068359375,
0.00033283233642578125,
0.016143798828125,
0.016387939453125,
-0.006717681884765625,
0.0190277099609375,
-0.075927734375,
-0.018768310546875,
-0.0296478271484375,
-0.006000518798828125,
0.025543212890625,
-0.037933349609375,
-0.0214385986328125,
-0.0345458984375,
-0.019744873046875,
-0.0184326171875,
-0.013092041015625,
-0.09613037109375,
-0.0018749237060546875,
0.01093292236328125,
0.0115509033203125,
-0.01690673828125,
-0.0731201171875,
0.020843505859375,
-0.005870819091796875,
0.0601806640625,
-0.019317626953125,
0.01322174072265625,
0.036468505859375,
-0.045166015625,
0.0112762451171875,
0.004451751708984375,
-0.00615692138671875,
-0.0161285400390625,
-0.017181396484375,
0.0853271484375,
0.003932952880859375,
-0.045867919921875,
0.006732940673828125,
-0.00042510032653808594,
-0.01332855224609375,
-0.00919342041015625,
-0.0166168212890625,
-0.01079559326171875,
0.0232696533203125,
-0.0245361328125,
-0.01381683349609375,
0.026947021484375,
-0.0199737548828125,
-0.035919189453125,
0.0308990478515625,
-0.0185699462890625,
0.0175933837890625,
0.01708984375,
0.01094818115234375,
0.01100921630859375,
0.0038776397705078125,
-0.0010595321655273438,
0.0230865478515625,
-0.019927978515625,
0.01125335693359375,
0.0019235610961914062,
0.00664520263671875,
0.00019466876983642578,
0.0213165283203125,
0.0107879638671875,
0.0003714561462402344,
-0.036468505859375,
0.0183868408203125,
0.06500244140625,
0.0736083984375,
0.041717529296875,
0.016845703125,
-0.0261993408203125,
-0.049591064453125,
-0.00386810302734375,
0.01337432861328125,
0.0200347900390625,
-0.00408935546875,
-0.043212890625,
0.00001531839370727539,
-0.006145477294921875,
-0.018646240234375,
-0.00799560546875,
0.011810302734375,
0.01160430908203125,
-0.0185394287109375,
-0.0234375,
0.01259613037109375,
-0.04132080078125,
0.0126800537109375,
-0.04034423828125,
-0.03759765625,
0.0002627372741699219,
-0.032867431640625,
0.023345947265625,
-0.00402069091796875,
0.020538330078125,
0.038360595703125,
0.022003173828125,
0.065673828125,
-0.052581787109375,
0.00669097900390625,
-0.0129852294921875,
-0.0234832763671875,
0.0217742919921875,
-0.0160980224609375,
0.026641845703125,
-0.056121826171875,
-0.0204315185546875,
0.03985595703125,
0.03497314453125,
-0.014068603515625,
-0.037933349609375,
0.0155487060546875,
0.00963592529296875,
0.00931549072265625,
-0.016326904296875,
-0.011566162109375,
0.01593017578125,
0.044189453125,
-0.03717041015625,
-0.0012540817260742188,
0.02398681640625,
0.01372528076171875,
-0.020233154296875,
-0.02203369140625,
0.005138397216796875,
-0.0011911392211914062,
-0.0281982421875,
0.00637054443359375,
0.00727081298828125,
0.040130615234375,
0.00174713134765625,
0.026458740234375,
-0.046478271484375,
-0.01273345947265625,
0.020172119140625,
-0.0215911865234375,
0.0311737060546875,
-0.04229736328125,
0.0465087890625,
0.0261383056640625,
0.02215576171875,
-0.00641632080078125,
-0.0225677490234375,
0.0535888671875,
0.034881591796875,
0.0244903564453125,
-0.0015773773193359375,
-0.01163482666015625,
0.006031036376953125,
-0.037322998046875,
-0.023406982421875,
-0.0239715576171875,
-0.0262451171875,
-0.00698089599609375,
-0.00798797607421875,
0.0025119781494140625,
0.03265380859375,
0.0012340545654296875,
-0.0051727294921875,
0.028717041015625,
0.0008225440979003906,
-0.03375244140625,
-0.007476806640625,
-0.0241241455078125,
0.0665283203125,
0.00786590576171875,
-0.064208984375,
-0.058990478515625,
0.04498291015625,
0.068603515625,
0.00228118896484375,
0.01898193359375,
0.0090179443359375,
0.02056884765625,
-0.004802703857421875,
-0.00550079345703125,
0.0689697265625,
-0.0295562744140625,
-0.037933349609375,
-0.004390716552734375,
0.0272674560546875,
-0.038177490234375,
-0.049468994140625,
-0.035064697265625,
0.016845703125,
0.03863525390625,
-0.01384735107421875,
0.047882080078125,
-0.01019287109375,
-0.00433349609375,
-0.07080078125,
0.01220703125,
-0.029693603515625,
-0.06561279296875,
0.033966064453125,
0.0276641845703125,
-0.0196990966796875,
-0.003276824951171875,
-0.003597259521484375,
0.044464111328125,
0.005329132080078125,
-0.0062408447265625,
0.0197296142578125,
-0.00933074951171875,
0.0191497802734375,
0.0183563232421875,
-0.0021610260009765625,
-0.0235443115234375,
-0.024688720703125,
0.00927734375,
-0.00948333740234375,
0.00566864013671875,
0.0248565673828125,
0.0296173095703125,
0.022430419921875,
-0.0260009765625,
-0.0164031982421875,
0.0026226043701171875,
-0.0298004150390625,
-0.00371551513671875,
0.00823974609375,
-0.01995849609375,
-0.02496337890625,
-0.040252685546875,
-0.0194854736328125,
0.0012235641479492188,
-0.00470733642578125,
0.034088134765625,
-0.00667572021484375,
0.0147247314453125,
0.017333984375,
-0.0201263427734375,
0.0145111083984375,
-0.03466796875,
-0.01528167724609375,
0.0014600753784179688,
0.0142059326171875,
-0.0130615234375,
-0.023681640625,
0.003940582275390625,
-0.035491943359375,
0.01509857177734375,
0.01483154296875,
0.024322509765625,
0.04864501953125,
0.09307861328125,
-0.0080413818359375,
0.008209228515625,
-0.01358795166015625,
0.00682830810546875,
-0.0081024169921875,
0.0005793571472167969,
0.01320648193359375,
-0.01055908203125,
-0.024871826171875,
-0.0022754669189453125,
0.005687713623046875,
-0.00824737548828125,
-0.032073974609375,
-0.0284881591796875,
0.03350830078125,
0.004291534423828125,
-0.00788116455078125,
0.007781982421875,
0.01009368896484375,
-0.03558349609375,
-0.00701141357421875,
-0.0183258056640625,
0.037750244140625,
-0.0018892288208007812,
-0.0185546875,
-0.0017023086547851562,
0.00963592529296875,
-0.004627227783203125,
-0.040924072265625,
0.00688934326171875,
-0.036346435546875,
-0.0106201171875,
-0.0712890625,
0.0245819091796875,
0.00013005733489990234,
-0.0345458984375,
-0.04376220703125,
0.0037403106689453125,
-0.007904052734375,
-0.0229644775390625,
-0.058624267578125,
0.01227569580078125,
0.02703857421875,
-0.00496673583984375,
-0.0235748291015625,
0.0018129348754882812,
-0.06329345703125,
-0.0019779205322265625,
-0.0143280029296875,
0.04302978515625,
0.0260467529296875,
-0.005645751953125,
-0.04241943359375,
-0.032318115234375,
-0.03668212890625,
-0.01123046875,
0.00527191162109375,
0.012969970703125,
-0.0137786865234375,
0.035400390625,
-0.033966064453125,
-0.07757568359375,
-0.037078857421875,
-0.053558349609375,
-0.007061004638671875,
-0.020172119140625,
0.0042724609375,
-0.00627899169921875,
0.032135009765625,
0.0226898193359375,
-0.005474090576171875,
-0.01207733154296875,
0.0426025390625,
0.032440185546875,
0.015960693359375,
0.0111083984375,
-0.0161895751953125,
0.0015096664428710938,
-0.0201873779296875,
-0.027587890625,
-0.0229644775390625,
0.00402069091796875,
-0.0262908935546875,
-0.0213623046875,
0.0079803466796875,
-0.0034313201904296875,
-0.0299835205078125,
0.002544403076171875,
-0.0499267578125,
0.06903076171875,
-0.0216064453125,
0.0290374755859375,
0.007049560546875,
0.0367431640625,
0.03875732421875,
0.04998779296875,
0.0054931640625,
-0.02166748046875,
-0.03399658203125,
0.01529693603515625,
-0.005695343017578125,
0.0170745849609375,
-0.0195465087890625,
-0.02410888671875,
0.010009765625,
0.0191650390625,
-0.0220794677734375,
0.01000213623046875,
-0.01506805419921875,
0.057830810546875,
-0.015655517578125,
0.044830322265625,
-0.0174407958984375,
-0.06109619140625,
-0.030364990234375,
0.0283660888671875,
-0.0019626617431640625,
-0.0080413818359375,
0.045440673828125,
-0.025787353515625,
0.01428985595703125,
0.06231689453125,
0.03289794921875,
-0.036712646484375,
0.035858154296875,
0.07586669921875,
0.053619384765625,
0.00928497314453125
] |
ec49a4ec35885562f72e06be85d2e814ab488444
|
Wordpress Stackexchange
Q: Add custom template page programmatically I'm trying to add template page from a plugin,and my template page is in this plugin folder.Is this posible?Here is my code:
global $user_ID;
$new_post = array(
'post_title' => 'Test Template Page',
'post_content' => 'Some text',
'post_status' => 'publish',
'post_date' => date('Y-m-d H:i:s'),
'post_author' => $user_ID,
'post_type' => 'page',
'post_category' => array(0)
);
$post_id = wp_insert_post($new_post);
if (!$post_id) {
wp_die('Error creating template page');
} else {
update_post_meta($post_id, '_wp_page_template', 'tp-file.php');
}
tp-file.php is my custom template page.When I put that file into the my-theme folder,it works fine,but I want to do this with file from plugin folder so I don't have to force users to copy that file from plugin folder to template folder.
Is this possible?Any idea?
A: The page_template filter is deprecated now. (http://adambrown.info/p/wp_hooks/hook/page_template)
Try using single_template (or archive_template for archive templates) instead.
Based on @t31os's answer:
// Filter page template
add_filter('single_template', 'catch_plugin_template');
// Page template filter callback
function catch_plugin_template($template) {
// If tp-file.php is the set template
if( is_page_template('tp-file.php') )
// Update path(must be path, use WP_PLUGIN_DIR and not WP_PLUGIN_URL)
$template = WP_PLUGIN_DIR . '/tp-test/tp-file.php';
// Return
return $template;
}
|
Q: Add custom template page programmatically I'm trying to add template page from a plugin,and my template page is in this plugin folder.Is this posible?Here is my code:
global $user_ID;
$new_post = array(
'post_title' => 'Test Template Page',
'post_content' => 'Some text',
'post_status' => 'publish',
'post_date' => date('Y-m-d H:i:s'),
'post_author' => $user_ID,
'post_type' => 'page',
'post_category' => array(0)
);
$post_id = wp_insert_post($new_post);
if (!$post_id) {
wp_die('Error creating template page');
} else {
update_post_meta($post_id, '_wp_page_template', 'tp-file.php');
}
tp-file.php is my custom template page.When I put that file into the my-theme folder,it works fine,but I want to do this with file from plugin folder so I don't have to force users to copy that file from plugin folder to template folder.
Is this possible?Any idea?
A: The page_template filter is deprecated now. (http://adambrown.info/p/wp_hooks/hook/page_template)
Try using single_template (or archive_template for archive templates) instead.
Based on @t31os's answer:
// Filter page template
add_filter('single_template', 'catch_plugin_template');
// Page template filter callback
function catch_plugin_template($template) {
// If tp-file.php is the set template
if( is_page_template('tp-file.php') )
// Update path(must be path, use WP_PLUGIN_DIR and not WP_PLUGIN_URL)
$template = WP_PLUGIN_DIR . '/tp-test/tp-file.php';
// Return
return $template;
}
A: The article linked is on the right track, but i'll make it more simple for you.. ;)
add_filter( 'page_template', 'catch_plugin_template' );
function catch_plugin_template( $template ) {
if( 'tp-file.php' == basename( $template ) )
$template = WP_PLUGIN_DIR . '/yourpluginname/tp-file.php';
return $template;
}
The filter basically looks to see if your special page template is set for the current page, if it is, updates the path to point at your plugins template instead.
Just be sure the path is right, else you'll be seeing include errors... :)
Follow-up #1
Ok first problem is that WordPress validates any template set as a page template, ie. it checks to see if the file is in the theme folder, and is a valid template file, if not it skips past it and includes a more generic template, like page.php ...
However, this doesn't change the fact that the meta field still holds the value of your custom template, and also is_page_template( 'tp-file.php' ) will correctly return true if used in place of my previous conditional statement, eg..
// Filter page template
add_filter('page_template', 'catch_plugin_template');
// Page template filter callback
function catch_plugin_template($template) {
// If tp-file.php is the set template
if( is_page_template('tp-file.php') )
// Update path(must be path, use WP_PLUGIN_DIR and not WP_PLUGIN_URL)
$template = WP_PLUGIN_DIR . '/tp-test/tp-file.php';
// Return
return $template;
}
NOTE: I've switched the code to use WP_PLUGIN_DIR as the WP_PLUGIN_URL constant is not suitable for paths... (includes must use a path, not a URL).
One issue, and this really isn't something you can fix, is that when viewing the page from the admin area, when editting the page, the template won't be listed as the active template, and saving changes could of course change the active template. There's much we can do there, the page template dropdown is generated from a function that scans theme files, there's no hooks in place that i can see that would allows us to extend the list with plugin templates.
Personally what i'd suggest, as a work-around would be to save an additional meta field with every page that created using your special plugin page, then add a hook onto save_post or wp_insert_post_data and check if this meta field exists, if it does, also check the page template is set to tp-file.php, and if not, update it to tp-file.php. The additional meta field would just be a flag so to speak, to indicate which pages need to have your plugin template attached.
Here's your plugin working in it's most basic form(yes i tested)... :)
<?php
/*
Plugin Name: TP Test Plugin
Plugin URI:
Description: TP Test Plugin
Version: 1.0.0
Author:
Author URI:
*/
global $wp_version;
if( version_compare( $wp_version, "2.9", "<" ) )
exit( 'This plugin requires WordPress 2.9 or newer. <a href="http://codex.wordpress.org/Upgrading_WordPress">Please update!</a>' );
// Add callback to admin menu
add_action('admin_menu', 'create_tp_menu');
// Callback to add menu items
function create_tp_menu() {
add_management_page('TP Test', 'TP Test', 'manage_options', 'tp-teste', 'wp_tp_test_fnc' );
}
function wp_tp_test_fnc() {
//include('tp-form-file.php');
if( !empty( $_POST['tp_name'] ) ) {
$tp_name = $_POST['tp_name'];
global $user_ID;
$new_post = array(
'post_title' => $tp_name,
'post_content' => 'Some text',
'post_status' => 'publish',
'post_date' => date('Y-m-d H:i:s'),
'post_author' => $user_ID,
'post_type' => 'page',
);
$post_id = wp_insert_post($new_post);
if( !$post_id )
wp_die('Error creating template page');
else
update_post_meta( $post_id, '_wp_page_template', 'tp-file.php' );
/*
$pt = get_page_templates();
$pt['TP file test'] = WP_PLUGIN_URL . '/tp-test/tp-file.php';
echo "<pre>";
print_r($pt);
echo "</pre>";
*/
}
?>
<fieldset style="margin: 50px 100px;background-color: #cccccc;padding: 30px;border: 1px solid #ccc">
<legend style="background-color: #ccccff;padding: 20px;font-weight: bold;font-size: 18px">Create Template Page</legend>
<form name="frm_main" action="" method="POSt">
<input class="text" type="text" name="tp_name" size="50" />
<br />
<input class="button" type="submit" value="Create Template Page" name="btn_submit" />
</form>
</fieldset>
<?php
}
// Filter page template
add_filter('page_template', 'catch_plugin_template');
// Page template filter callback
function catch_plugin_template($template) {
// If tp-file.php is the set template
if( is_page_template('tp-file.php') )
// Update path(must be path, use WP_PLUGIN_DIR and not WP_PLUGIN_URL)
$template = WP_PLUGIN_DIR . '/tp-test/tp-file.php';
// Return
return $template;
}
Hope that helps clear things up.. :)
A:
One issue, and this really isn't something you can fix, is that when
viewing the page from the admin area, when editting the page, the
template won't be listed as the active template, and saving changes
could of course change the active template. There's much we can do
there, the page template dropdown is generated from a function that
scans theme files, there's no hooks in place that i can see that would
allows us to extend the list with plugin templates.
Actually I found a hook in another thread that does exactly that:
WordPress: Can you programmatically create page templates?
I am pasting the code here for convenience:
CONST CUSTOM_PAGE_TEMPLATES = array(
array('slug' => 'home', 'label' => 'Home'),
array('slug' => 'content-page', 'label' => 'Content Page'),
array('slug' => 'ordering', 'label' => 'Ordering'),
array('slug' => 'reviews', 'label' => 'Reviews')
);
/**
* Add file-less page templates to the page template dropdown
*/
add_filter('theme_page_templates', function($page_templates, $wp_theme, $post) {
foreach(CUSTOM_PAGE_TEMPLATES as $template) {
// Append if it doesn't already exists
if (!isset($page_templates[$template['slug']])) {
$page_templates[$template['slug']] = $template['label'];
}
}
return $page_templates;
}, PHP_INT_MAX, 3);
Hope that helps someone.
|
wordpress
|
{
"language": "en",
"length": 1023,
"provenance": "stackexchange_00019.jsonl.gz:408180",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13378"
}
|
[
0.0516357421875,
-0.0249786376953125,
0.0263824462890625,
-0.043121337890625,
-0.00928497314453125,
-0.01065826416015625,
0.01284027099609375,
-0.0169219970703125,
-0.01546478271484375,
0.011566162109375,
0.00809478759765625,
0.0003306865692138672,
-0.01256561279296875,
-0.033599853515625,
0.016265869140625,
-0.009033203125,
0.024993896484375,
-0.025054931640625,
0.008758544921875,
-0.0179290771484375,
0.032806396484375,
-0.00426483154296875,
-0.0080108642578125,
0.0386962890625,
0.0085906982421875,
0.03033447265625,
0.058502197265625,
-0.026763916015625,
0.0176239013671875,
-0.020721435546875,
0.0070037841796875,
-0.004215240478515625,
0.038360595703125,
0.01448822021484375,
-0.060943603515625,
-0.0103759765625,
-0.016448974609375,
0.002750396728515625,
-0.0304718017578125,
0.033905029296875,
0.01025390625,
0.0104522705078125,
-0.00279998779296875,
0.033660888671875,
-0.00826263427734375,
-0.0694580078125,
0.0489501953125,
-0.030181884765625,
0.00958251953125,
0.007427215576171875,
0.0021953582763671875,
-0.033721923828125,
0.01873779296875,
-0.020355224609375,
-0.005466461181640625,
-0.007808685302734375,
-0.019866943359375,
0.00916290283203125,
0.031005859375,
-0.0072479248046875,
-0.0266265869140625,
-0.011077880859375,
0.0225677490234375,
-0.01229095458984375,
0.032012939453125,
-0.0188751220703125,
-0.003902435302734375,
0.03436279296875,
-0.035125732421875,
0.023773193359375,
0.0164031982421875,
-0.0288848876953125,
0.0003714561462402344,
-0.026336669921875,
-0.02752685546875,
0.012451171875,
0.01763916015625,
-0.033172607421875,
-0.003509521484375,
-0.006866455078125,
-0.00812530517578125,
-0.0239410400390625,
-0.005130767822265625,
-0.045135498046875,
0.01058197021484375,
-0.00218963623046875,
-0.00962066650390625,
0.0013589859008789062,
-0.024383544921875,
0.038330078125,
-0.027496337890625,
0.006366729736328125,
0.032135009765625,
-0.00815582275390625,
-0.0277557373046875,
0.0135498046875,
-0.0108489990234375,
0.060943603515625,
-0.0232696533203125,
0.057586669921875,
-0.002349853515625,
-0.031036376953125,
0.07342529296875,
-0.07196044921875,
0.00374603271484375,
0.0258026123046875,
0.006687164306640625,
0.04266357421875,
0.0293426513671875,
0.0244903564453125,
0.0055084228515625,
-0.0010633468627929688,
-0.0286407470703125,
-0.035980224609375,
-0.02691650390625,
0.038330078125,
-0.01702880859375,
-0.0247344970703125,
0.0044097900390625,
-0.006801605224609375,
0.01401519775390625,
0.0096893310546875,
0.0208282470703125,
-0.0149078369140625,
-0.01338958740234375,
-0.032623291015625,
-0.04620361328125,
-0.0243377685546875,
-0.010528564453125,
-0.01406097412109375,
-0.0095367431640625,
0.0126495361328125,
0.03314208984375,
0.0450439453125,
-0.005767822265625,
-0.0027370452880859375,
0.029266357421875,
-0.0025634765625,
0.011688232421875,
-0.006282806396484375,
-0.0096282958984375,
0.0030765533447265625,
0.004451751708984375,
-0.0202484130859375,
0.0086517333984375,
-0.016357421875,
0.00307464599609375,
0.05255126953125,
0.0252838134765625,
-0.0011205673217773438,
0.0252685546875,
-0.01360321044921875,
0.01261138916015625,
0.0024242401123046875,
0.016754150390625,
-0.058380126953125,
-0.0018711090087890625,
-0.044952392578125,
0.045013427734375,
-0.026214599609375,
0.0231170654296875,
0.0025119781494140625,
-0.0113067626953125,
-0.0279541015625,
-0.037506103515625,
-0.0036525726318359375,
-0.0168609619140625,
-0.0020122528076171875,
0.013824462890625,
0.02215576171875,
0.00213623046875,
-0.006290435791015625,
-0.00809478759765625,
-0.0033283233642578125,
-0.00757598876953125,
0.006195068359375,
-0.015106201171875,
0.055419921875,
0.005859375,
0.041046142578125,
0.016082763671875,
-0.030853271484375,
0.066162109375,
0.006961822509765625,
-0.06732177734375,
0.0212249755859375,
0.02178955078125,
0.057769775390625,
-0.006603240966796875,
0.0178070068359375,
0.056854248046875,
0.0270233154296875,
-0.01971435546875,
0.01788330078125,
0.031280517578125,
-0.03277587890625,
-0.016448974609375,
-0.0192108154296875,
0.0011396408081054688,
-0.005596160888671875,
-0.01129150390625,
-0.00957489013671875,
0.00640106201171875,
0.0123291015625,
-0.04266357421875,
-0.0024852752685546875,
-0.0228271484375,
0.02667236328125,
-0.025848388671875,
-0.0155487060546875,
0.0126190185546875,
-0.0272064208984375,
-0.0099639892578125,
-0.0025882720947265625,
-0.0203704833984375,
0.023956298828125,
0.003307342529296875,
-0.006298065185546875,
0.0028858184814453125,
0.020599365234375,
0.0269927978515625,
-0.0147552490234375,
-0.0127105712890625,
0.0175933837890625,
0.0261383056640625,
-0.01381683349609375,
-0.0261077880859375,
-0.00885772705078125,
-0.0704345703125,
0.035003662109375,
-0.10693359375,
0.05712890625,
-0.0221099853515625,
-0.009521484375,
-0.0294342041015625,
-0.01374053955078125,
-0.0270843505859375,
-0.06378173828125,
0.02056884765625,
0.054168701171875,
0.03167724609375,
0.0572509765625,
0.0291748046875,
0.052276611328125,
0.07733154296875,
-0.027557373046875,
0.0055694580078125,
0.015655517578125,
0.034332275390625,
0.0311126708984375,
0.004413604736328125,
-0.019012451171875,
0.0200653076171875,
-0.0615234375,
0.0272674560546875,
0.025909423828125,
-0.020660400390625,
-0.0025959014892578125,
-0.00374603271484375,
0.01105499267578125,
0.004238128662109375,
0.01457977294921875,
0.014190673828125,
-0.0026493072509765625,
0.060882568359375,
0.00756072998046875,
0.0306396484375,
0.0171051025390625,
-0.03167724609375,
0.01090240478515625,
0.00705718994140625,
-0.0221405029296875,
0.0142059326171875,
0.0046844482421875,
-0.0230865478515625,
0.052825927734375,
-0.042633056640625,
-0.0024623870849609375,
0.045257568359375,
0.012603759765625,
-0.0018978118896484375,
0.04852294921875,
-0.0005340576171875,
-0.0093994140625,
-0.031463623046875,
-0.046478271484375,
0.005748748779296875,
0.0242919921875,
0.02337646484375,
0.002788543701171875,
0.0302581787109375,
0.0293426513671875,
-0.031402587890625,
0.054779052734375,
-0.019317626953125,
-0.0105133056640625,
0.06951904296875,
-0.040771484375,
0.0479736328125,
-0.04248046875,
0.0240020751953125,
0.043182373046875,
-0.041046142578125,
0.022125244140625,
0.023956298828125,
0.0070343017578125,
0.0294952392578125,
0.010528564453125,
-0.0022792816162109375,
-0.0306549072265625,
0.01334381103515625,
0.0193939208984375,
0.0012569427490234375,
0.035980224609375,
-0.02642822265625,
-0.052642822265625,
-0.006134033203125,
0.0014801025390625,
-0.0421142578125,
-0.0445556640625,
0.036407470703125,
-0.0693359375,
0.002269744873046875,
-0.03369140625,
-0.04351806640625,
-0.01800537109375,
0.0016069412231445312,
0.0007596015930175781,
0.0009388923645019531,
-0.023468017578125,
-0.058380126953125,
-0.035980224609375,
-0.05792236328125,
0.0189361572265625,
-0.0034427642822265625,
-0.0183258056640625,
0.006015777587890625,
0.08551025390625,
0.0207672119140625,
-0.073486328125,
0.0092315673828125,
0.031585693359375,
-0.026519775390625,
0.0229949951171875,
0.033905029296875,
-0.0277099609375,
0.02386474609375,
0.001392364501953125,
-0.024871826171875,
0.055938720703125,
-0.039154052734375,
-0.01122283935546875,
-0.044342041015625,
-0.034912109375,
-0.0284881591796875,
-0.01410675048828125,
0.0653076171875,
-0.018096923828125,
-0.0222625732421875,
-0.05743408203125,
-0.0305328369140625,
-0.0130615234375,
-0.048004150390625,
0.09918212890625,
0.03765869140625,
-0.009979248046875,
-0.00396728515625,
0.047393798828125,
-0.003200531005859375,
-0.003780364990234375,
0.025299072265625,
-0.00798797607421875,
-0.0100555419921875,
-0.006000518798828125,
-0.0220184326171875,
-0.007068634033203125,
0.030975341796875,
-0.0211944580078125,
0.0026092529296875,
0.023284912109375,
0.00959014892578125,
0.0185089111328125,
-0.00972747802734375,
-0.007305145263671875,
-0.06512451171875,
0.045928955078125,
-0.011810302734375,
0.0131988525390625,
-0.051605224609375,
-0.02734375,
-0.0017948150634765625,
0.1058349609375,
-0.051513671875,
-0.0372314453125,
0.004848480224609375,
0.02130126953125,
0.015045166015625,
-0.0292510986328125,
0.0187225341796875,
-0.032989501953125,
-0.04522705078125,
-0.00714111328125,
-0.0285491943359375,
-0.0196533203125,
0.0114288330078125,
-0.0127716064453125,
-0.005443572998046875,
-0.03515625,
0.02874755859375,
-0.0240020751953125,
0.029937744140625,
0.040771484375,
-0.01331329345703125,
0.020263671875,
-0.0182037353515625,
-0.047119140625,
-0.0784912109375,
-0.004360198974609375,
-0.033172607421875,
0.04888916015625,
0.022674560546875,
0.004833221435546875,
-0.048126220703125,
0.00637054443359375,
0.0164642333984375,
0.0242767333984375,
0.0027790069580078125,
0.003307342529296875,
0.01483917236328125,
-0.034881591796875,
0.007904052734375,
-0.0269622802734375,
0.0208892822265625,
-0.004199981689453125,
-0.024505615234375,
0.008453369140625,
-0.051849365234375,
-0.0198822021484375,
-0.016265869140625,
-0.040374755859375,
-0.0333251953125,
-0.03387451171875,
0.0017261505126953125,
0.0026569366455078125,
-0.005611419677734375,
-0.00646209716796875,
-0.031341552734375,
-0.027557373046875,
0.04437255859375,
0.0201568603515625,
-0.01497650146484375,
0.004459381103515625,
0.07843017578125,
0.0195465087890625,
-0.040283203125,
-0.06866455078125,
0.0313720703125,
0.028961181640625,
0.0201263427734375,
0.056427001953125,
0.0246124267578125,
-0.0008716583251953125,
0.032989501953125,
0.0014753341674804688,
-0.00885772705078125,
-0.03497314453125,
0.0826416015625,
-0.0170440673828125,
-0.04766845703125,
0.05487060546875,
-0.0218963623046875,
-0.002986907958984375,
0.032196044921875,
-0.0305328369140625,
-0.01033782958984375,
-0.01007843017578125,
0.05438232421875,
-0.0214996337890625,
0.0200042724609375,
-0.061920166015625,
-0.060791015625,
0.00536346435546875,
0.0160369873046875,
0.021575927734375,
0.01403045654296875,
-0.002044677734375,
0.02398681640625,
-0.00482177734375,
-0.00746917724609375,
0.0411376953125,
0.05560302734375,
0.0191650390625,
0.037445068359375,
0.01497650146484375,
-0.013336181640625,
-0.0301666259765625,
-0.0019378662109375,
0.01264190673828125,
0.013336181640625,
0.0036296844482421875,
-0.038818359375,
-0.0120391845703125,
-0.01480865478515625,
-0.0232696533203125,
-0.0016307830810546875,
0.047607421875,
0.031524658203125,
-0.0257720947265625,
-0.01517486572265625,
-0.0232086181640625,
-0.00539398193359375,
-0.059417724609375,
-0.01113128662109375,
0.0135040283203125,
-0.0294952392578125,
0.0106201171875,
-0.002964019775390625,
0.0384521484375,
-0.035003662109375,
-0.019775390625,
0.0171661376953125,
0.0245208740234375,
0.0252532958984375,
0.0136260986328125,
-0.037384033203125,
-0.01279449462890625,
0.01617431640625,
0.0012912750244140625,
-0.032745361328125,
-0.00804901123046875,
0.0062408447265625,
0.033599853515625,
-0.044921875,
-0.040069580078125,
0.045501708984375,
-0.0166473388671875,
-0.00605010986328125,
-0.0029621124267578125,
-0.025848388671875,
-0.03302001953125,
-0.035186767578125,
0.0039825439453125,
0.0212860107421875,
-0.00933837890625,
-0.0091400146484375,
0.0013933181762695312,
-0.0281829833984375,
0.0015897750854492188,
0.0205230712890625,
-0.0092010498046875,
-0.02374267578125,
-0.034912109375,
-0.0027790069580078125,
-0.01456451416015625,
-0.003284454345703125,
-0.05218505859375,
0.001415252685546875,
-0.031890869140625,
-0.017669677734375,
0.045867919921875,
-0.0269317626953125,
0.055877685546875,
-0.0164947509765625,
-0.035064697265625,
-0.00839996337890625,
0.01407623291015625,
0.0247650146484375,
0.0218505859375,
-0.04815673828125,
0.0010499954223632812,
-0.039520263671875,
-0.0185699462890625,
-0.0206756591796875,
-0.0263824462890625,
-0.043487548828125,
0.0164794921875,
0.0038089752197265625,
0.0138397216796875,
0.011688232421875,
0.01024627685546875,
-0.01336669921875,
-0.0010004043579101562,
-0.010223388671875,
0.039520263671875,
-0.0172271728515625,
0.07684326171875,
0.00890350341796875,
0.0693359375,
0.015960693359375,
0.0267333984375,
-0.01494598388671875,
-0.0219879150390625,
-0.0091400146484375,
-0.014007568359375,
0.0052947998046875,
0.0005807876586914062,
-0.041534423828125,
0.03851318359375,
0.1019287109375,
0.004184722900390625,
-0.026123046875,
-0.0282135009765625,
-0.01107025146484375,
-0.028533935546875,
0.028076171875,
0.01050567626953125,
-0.0714111328125,
0.0260467529296875,
-0.027862548828125,
-0.00521087646484375,
0.006317138671875,
-0.012298583984375,
0.030670166015625,
-0.0203399658203125,
0.01148223876953125,
0.00865936279296875,
-0.02850341796875,
0.088134765625,
0.04754638671875,
0.0008463859558105469,
0.0199432373046875,
0.006885528564453125,
0.01213836669921875,
-0.02642822265625,
0.006908416748046875,
-0.00027942657470703125,
-0.004756927490234375,
0.0535888671875,
0.0013370513916015625,
-0.0169677734375,
0.048828125,
-0.033599853515625,
0.0195465087890625,
0.044219970703125,
0.0235748291015625,
-0.0771484375,
0.007541656494140625,
-0.018218994140625,
-0.010345458984375,
0.021148681640625,
0.007694244384765625,
0.0017576217651367188,
-0.0038051605224609375,
0.048004150390625,
0.0221710205078125,
0.0052642822265625,
0.044830322265625,
0.0232086181640625,
-0.011962890625,
-0.0059356689453125,
0.055267333984375,
0.016571044921875,
-0.0266571044921875,
0.0247955322265625,
0.0084991455078125,
0.0247802734375,
-0.0010433197021484375,
0.031097412109375,
-0.03515625,
0.0123443603515625,
0.010406494140625,
0.0288848876953125,
-0.0256805419921875,
-0.00933074951171875,
0.0682373046875,
0.026275634765625,
0.037689208984375,
0.03717041015625,
0.0239715576171875,
-0.0082244873046875,
0.008880615234375,
0.00276947021484375,
-0.0288848876953125,
-0.0269775390625,
-0.01195526123046875,
0.0069580078125,
-0.038482666015625,
0.01300048828125,
-0.0197601318359375,
-0.0026912689208984375,
-0.01171112060546875,
0.0010061264038085938,
0.09381103515625,
-0.00997161865234375,
-0.0360107421875,
0.0251617431640625,
-0.0023250579833984375,
-0.0264892578125,
0.01544189453125,
0.023345947265625,
-0.0355224609375,
-0.02880859375,
0.0292510986328125,
-0.024383544921875,
-0.0216064453125,
0.0469970703125,
-0.09613037109375,
0.12237548828125,
0.020294189453125,
0.03729248046875,
-0.01216888427734375,
0.05157470703125,
-0.04815673828125,
0.00762939453125,
-0.0167083740234375,
0.033447265625,
0.021575927734375,
0.052581787109375,
-0.00016629695892333984,
0.005306243896484375,
0.026031494140625,
0.034271240234375,
0.0687255859375,
0.029449462890625,
-0.010711669921875,
-0.00952911376953125,
0.0275421142578125,
0.005283355712890625,
-0.0148773193359375,
0.0243072509765625,
-0.01213836669921875,
0.004703521728515625,
-0.0201263427734375,
-0.01380157470703125,
0.03302001953125,
-0.03924560546875,
-0.03472900390625,
0.00888824462890625,
0.009124755859375,
0.00977325439453125,
-0.004680633544921875,
-0.0279083251953125,
-0.0283355712890625,
-0.011138916015625,
0.0225677490234375,
-0.0213165283203125,
-0.0258636474609375,
0.01387786865234375,
-0.00872802734375,
-0.003437042236328125,
-0.03875732421875,
-0.0144195556640625,
0.0222625732421875,
0.0109710693359375,
0.010101318359375,
-0.021392822265625,
0.01172637939453125,
-0.020538330078125,
-0.0265655517578125,
-0.001903533935546875,
0.033416748046875,
-0.024749755859375,
0.0655517578125,
-0.01200103759765625,
0.0024433135986328125,
-0.04736328125,
0.038787841796875,
0.0105438232421875,
0.04461669921875,
-0.05523681640625,
-0.0228271484375,
0.01318359375,
0.00791168212890625,
-0.0186920166015625,
0.010986328125,
0.00106048583984375,
0.007472991943359375,
0.033599853515625,
-0.05621337890625,
-0.01430511474609375,
0.0228118896484375,
0.01113128662109375,
-0.030303955078125,
-0.046295166015625,
0.0219879150390625,
0.0031032562255859375,
-0.0552978515625,
0.0207061767578125,
0.0279083251953125,
0.052215576171875,
0.006679534912109375,
0.039825439453125,
0.01120758056640625,
-0.031585693359375,
-0.015625,
0.00052642822265625,
-0.0250091552734375,
0.0181121826171875,
-0.03564453125,
-0.042510986328125,
0.0172882080078125,
0.040985107421875,
0.00583648681640625,
-0.00412750244140625,
0.018157958984375,
0.003173828125,
-0.030548095703125,
-0.0202484130859375,
-0.00962066650390625,
-0.0306549072265625,
0.0328369140625,
-0.036407470703125,
0.0267486572265625,
-0.01239013671875,
-0.01727294921875,
-0.01210784912109375,
-0.0015735626220703125,
0.028900146484375,
-0.0256195068359375,
0.021087646484375,
-0.01421356201171875,
-0.031707763671875,
0.061737060546875,
-0.0203857421875,
0.0648193359375,
0.0011281967163085938,
-0.0916748046875,
-0.00038242340087890625,
-0.06158447265625,
-0.07696533203125,
0.047637939453125,
0.06329345703125,
-0.0273895263671875,
0.0149383544921875,
0.03509521484375,
0.0181884765625,
0.0010232925415039062,
-0.05078125,
0.0421142578125,
-0.01097869873046875,
0.0036869049072265625,
0.0199127197265625,
-0.022430419921875,
-0.0172271728515625,
-0.032440185546875,
0.04827880859375,
0.03326416015625,
0.106689453125,
-0.0523681640625,
0.0248565673828125,
0.0036869049072265625,
0.022613525390625,
-0.03839111328125,
-0.012542724609375,
0.058563232421875,
0.0043487548828125,
-0.01446533203125,
-0.0230255126953125,
-0.037994384765625,
0.0209503173828125,
0.0462646484375,
-0.01995849609375,
-0.0063323974609375,
0.0207672119140625,
0.01335906982421875,
-0.0025386810302734375,
0.0394287109375,
-0.0159759521484375,
-0.0145111083984375,
-0.060791015625,
-0.0186614990234375,
0.0521240234375,
0.021270751953125,
-0.0059356689453125,
0.0673828125,
-0.006702423095703125,
-0.0142974853515625,
0.00809478759765625,
-0.036773681640625,
0.01401519775390625,
0.0309295654296875,
-0.0178985595703125,
-0.0321044921875,
0.0240478515625,
-0.0114288330078125,
-0.007320404052734375,
0.01013946533203125,
0.05694580078125,
0.0023899078369140625,
-0.029632568359375,
0.00885772705078125,
-0.052642822265625,
0.0175323486328125,
-0.0309906005859375,
-0.00983428955078125,
-0.0164337158203125,
0.034576416015625,
-0.034271240234375,
-0.00342559814453125,
-0.037322998046875,
-0.034423828125,
0.02044677734375,
0.01245880126953125,
0.0018825531005859375,
-0.03387451171875,
-0.06585693359375,
-0.0149993896484375,
0.03594970703125,
0.01198577880859375,
-0.0635986328125,
0.00788116455078125,
-0.018157958984375,
0.04168701171875,
-0.0036716461181640625,
-0.0033359527587890625,
0.006137847900390625,
0.0167388916015625,
-0.043365478515625,
0.00041604042053222656,
-0.0213623046875,
-0.005138397216796875,
-0.001567840576171875,
-0.0127716064453125,
0.036590576171875,
0.00786590576171875,
-0.0297088623046875,
0.0275726318359375,
-0.0273590087890625,
0.08856201171875,
-0.08099365234375,
0.003047943115234375,
0.041412353515625,
-0.022857666015625,
-0.02081298828125,
-0.056976318359375,
-0.00582122802734375,
-0.038970947265625,
0.0029888153076171875,
0.027557373046875,
-0.0087432861328125,
0.01593017578125,
-0.040008544921875,
-0.09625244140625,
0.00856781005859375,
-0.005275726318359375,
-0.057281494140625,
-0.047271728515625,
0.036285400390625,
0.0010328292846679688,
-0.016754150390625,
-0.017547607421875,
-0.026702880859375,
0.01373291015625,
0.047271728515625,
0.0230865478515625,
0.0179443359375,
0.038330078125,
0.0115203857421875,
-0.04132080078125,
0.0031528472900390625,
-0.0011148452758789062,
-0.006771087646484375,
-0.0004451274871826172,
-0.040557861328125,
0.043731689453125,
0.0196075439453125,
-0.022430419921875,
-0.0174560546875,
0.04290771484375,
-0.007213592529296875,
-0.01384735107421875,
-0.01338958740234375,
-0.01898193359375,
0.01551055908203125,
0.08795166015625,
0.050567626953125,
0.026458740234375,
-0.04443359375,
0.009735107421875,
-0.044219970703125,
-0.041900634765625,
0.01305389404296875,
0.02435302734375,
-0.04888916015625,
0.0197906494140625,
0.054412841796875,
-0.0176544189453125,
-0.017974853515625,
0.0005540847778320312,
-0.0439453125,
0.0030574798583984375,
-0.00018167495727539062,
-0.00045871734619140625,
-0.028533935546875,
0.00421142578125,
0.0699462890625,
-0.04010009765625,
-0.00647735595703125,
-0.005161285400390625,
0.0186004638671875,
0.02587890625,
-0.03466796875,
-0.01001739501953125,
0.06158447265625,
-0.071044921875,
0.00878143310546875,
0.004566192626953125,
0.037841796875,
-0.052154541015625,
0.0277252197265625,
0.0127105712890625,
0.0158233642578125,
-0.0174407958984375,
-0.006587982177734375,
-0.013397216796875,
0.0474853515625,
-0.0265350341796875,
0.11517333984375,
-0.0018568038940429688,
-0.006656646728515625,
-0.017669677734375,
0.0232086181640625,
-0.00940704345703125,
-0.00669097900390625,
-0.001064300537109375,
-0.01129150390625,
-0.0180206298828125,
0.0101776123046875,
-0.0281219482421875,
-0.059417724609375,
0.0458984375,
-0.059600830078125,
-0.0013952255249023438,
0.0277557373046875
] |
f326fd89ac5c780467622364e9b7a760747f53fc
|
Wordpress Stackexchange
Q: How to disable 3.1 "Admin Bar" via script for the admin user? Every time I create a new site under 3.1, my first trip is to the Users > Admin User profile page to uncheck the "admin bar" checkbox.
I'd like to place a script in my theme's functions.php to do this automatically.
Anyone know what that would be?
A: You could use a function inside your theme's functions file to selectively disable it for specific users.
function disable_bar_for_user( $ids ) {
if( !is_user_logged_in() )
return;
global $current_user;
if( is_numeric( $ids ) )
$ids = (array) $ids;
if( !in_array( $current_user->data->ID, $ids ) )
return;
add_filter( 'show_admin_bar', '__return_false', 9 );
}
Then call it for the user or users you want to disable the bar for..
Single user:
disable_bar_for_user(1);
Multiple users:
disable_bar_for_user(array(1,2,3));
If you want to just turn it off altogether, then the following should do it(instead of the function).
add_filter( 'show_admin_bar', '__return_false', 9 );
Hope that helps.. :)
|
Q: How to disable 3.1 "Admin Bar" via script for the admin user? Every time I create a new site under 3.1, my first trip is to the Users > Admin User profile page to uncheck the "admin bar" checkbox.
I'd like to place a script in my theme's functions.php to do this automatically.
Anyone know what that would be?
A: You could use a function inside your theme's functions file to selectively disable it for specific users.
function disable_bar_for_user( $ids ) {
if( !is_user_logged_in() )
return;
global $current_user;
if( is_numeric( $ids ) )
$ids = (array) $ids;
if( !in_array( $current_user->data->ID, $ids ) )
return;
add_filter( 'show_admin_bar', '__return_false', 9 );
}
Then call it for the user or users you want to disable the bar for..
Single user:
disable_bar_for_user(1);
Multiple users:
disable_bar_for_user(array(1,2,3));
If you want to just turn it off altogether, then the following should do it(instead of the function).
add_filter( 'show_admin_bar', '__return_false', 9 );
Hope that helps.. :)
A: For functions.php:
// Disable the Admin Bar for All
add_filter( 'show_admin_bar', '__return_false' );
A: I believe you can activate such a plugin sitewide - http://wordpress.org/extend/plugins/disable-admin-bar/
A: Simply set show_admin_bar filter to false in your functions.php.
|
wordpress
|
{
"language": "en",
"length": 195,
"provenance": "stackexchange_00019.jsonl.gz:408184",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13390"
}
|
[
0.09161376953125,
-0.00858306884765625,
0.024749755859375,
-0.044403076171875,
0.0278778076171875,
-0.033782958984375,
0.044342041015625,
-0.0333251953125,
0.041748046875,
0.0268707275390625,
-0.0013895034790039062,
-0.0269317626953125,
0.02520751953125,
-0.0210723876953125,
-0.0382080078125,
-0.007419586181640625,
0.0133819580078125,
0.0198516845703125,
0.006404876708984375,
-0.004772186279296875,
-0.002170562744140625,
0.005443572998046875,
-0.043975830078125,
0.02056884765625,
-0.001216888427734375,
-0.04443359375,
0.08587646484375,
-0.010345458984375,
0.022979736328125,
-0.004688262939453125,
0.0157623291015625,
-0.0251617431640625,
-0.0235595703125,
0.0340576171875,
0.021484375,
0.035919189453125,
-0.03570556640625,
0.05963134765625,
0.0697021484375,
-0.046173095703125,
0.041656494140625,
-0.0179443359375,
-0.043975830078125,
0.02728271484375,
-0.0265045166015625,
-0.0599365234375,
0.055328369140625,
0.000667572021484375,
0.0237579345703125,
-0.00016832351684570312,
-0.006801605224609375,
0.017608642578125,
0.0038776397705078125,
-0.028564453125,
0.0071563720703125,
0.0308380126953125,
0.00804901123046875,
-0.047515869140625,
0.048431396484375,
0.042236328125,
-0.02288818359375,
-0.044189453125,
0.00994110107421875,
-0.0914306640625,
-0.0159149169921875,
0.01409912109375,
-0.01183319091796875,
0.0162353515625,
-0.046295166015625,
-0.01268768310546875,
0.01258087158203125,
-0.04949951171875,
0.023101806640625,
0.0159759521484375,
-0.040252685546875,
-0.018035888671875,
0.0056304931640625,
0.002262115478515625,
0.0382080078125,
-0.0186767578125,
0.020751953125,
0.0501708984375,
-0.04119873046875,
0.00016570091247558594,
-0.001186370849609375,
0.0193939208984375,
-0.0125885009765625,
-0.028564453125,
-0.0061492919921875,
-0.0089263916015625,
-0.0105438232421875,
-0.0018663406372070312,
-0.025054931640625,
0.01198577880859375,
0.0017900466918945312,
-0.039886474609375,
0.044769287109375,
0.03741455078125,
-0.00702667236328125,
-0.0290069580078125,
0.004261016845703125,
-0.02587890625,
-0.051605224609375,
0.004177093505859375,
-0.01476287841796875,
0.03656005859375,
0.0008382797241210938,
-0.0003333091735839844,
0.0010843276977539062,
0.0253753662109375,
0.00788116455078125,
-0.03668212890625,
-0.040985107421875,
-0.022491455078125,
-0.027862548828125,
0.029693603515625,
-0.048004150390625,
-0.00867462158203125,
-0.0004000663757324219,
0.027984619140625,
-0.01151275634765625,
0.0010366439819335938,
0.006015777587890625,
0.026153564453125,
0.0300445556640625,
0.023529052734375,
-0.01348114013671875,
-0.01702880859375,
-0.0090789794921875,
-0.0172882080078125,
-0.037689208984375,
0.0316162109375,
0.08831787109375,
0.05682373046875,
0.034210205078125,
-0.0120086669921875,
0.007068634033203125,
-0.032379150390625,
0.0034732818603515625,
0.0136260986328125,
-0.0011377334594726562,
-0.046722412109375,
-0.018280029296875,
0.003101348876953125,
-0.0298004150390625,
0.0020275115966796875,
0.012176513671875,
0.01122283935546875,
-0.011962890625,
-0.020904541015625,
-0.0270233154296875,
-0.0019502639770507812,
0.0164642333984375,
0.0265655517578125,
0.00927734375,
0.05975341796875,
0.042724609375,
0.00928497314453125,
-0.073974609375,
-0.0030879974365234375,
0.011474609375,
0.0156707763671875,
0.014984130859375,
-0.0041656494140625,
-0.02581787109375,
-0.016448974609375,
0.0008220672607421875,
0.0006203651428222656,
0.025146484375,
0.0099945068359375,
-0.00452423095703125,
-0.0267486572265625,
-0.0091094970703125,
0.002361297607421875,
-0.00841522216796875,
0.02606201171875,
0.0282745361328125,
0.023590087890625,
0.00714874267578125,
-0.0012216567993164062,
-0.029388427734375,
-0.0413818359375,
0.038482666015625,
-0.0261383056640625,
-0.059661865234375,
0.0243377685546875,
-0.0007710456848144531,
0.02410888671875,
0.02545166015625,
-0.010955810546875,
0.05218505859375,
0.03192138671875,
0.003406524658203125,
-0.056732177734375,
0.0182647705078125,
-0.029815673828125,
-0.01751708984375,
-0.033966064453125,
0.004482269287109375,
0.061492919921875,
0.05352783203125,
-0.01030731201171875,
0.025054931640625,
-0.0245513916015625,
-0.06976318359375,
-0.0017347335815429688,
-0.0223236083984375,
0.0279083251953125,
0.05499267578125,
0.0227508544921875,
-0.0231170654296875,
-0.0234375,
-0.0092620849609375,
0.050506591796875,
-0.0185546875,
0.0001112818717956543,
-0.02618408203125,
0.06646728515625,
0.0015392303466796875,
0.07232666015625,
0.0113525390625,
-0.034820556640625,
0.0216522216796875,
-0.0182647705078125,
0.041229248046875,
-0.0140228271484375,
-0.0250244140625,
-0.014556884765625,
0.043853759765625,
-0.01377105712890625,
0.003143310546875,
0.060943603515625,
0.0421142578125,
0.0252227783203125,
-0.03204345703125,
-0.001895904541015625,
-0.0084075927734375,
-0.05499267578125,
-0.0165863037109375,
0.051025390625,
0.037078857421875,
-0.0001118779182434082,
-0.025390625,
-0.0070037841796875,
0.032989501953125,
-0.054107666015625,
-0.005329132080078125,
0.01488494873046875,
-0.004024505615234375,
0.00020051002502441406,
0.000015437602996826172,
-0.017669677734375,
0.0501708984375,
-0.0287628173828125,
0.0015707015991210938,
0.0604248046875,
-0.033355712890625,
-0.006885528564453125,
-0.01036834716796875,
0.005954742431640625,
-0.00020384788513183594,
-0.0303192138671875,
0.0105438232421875,
-0.032684326171875,
0.002796173095703125,
0.006099700927734375,
0.0258331298828125,
0.0300445556640625,
-0.0072021484375,
-0.017913818359375,
0.00899505615234375,
0.01293182373046875,
-0.018157958984375,
-0.01739501953125,
0.020751953125,
-0.045867919921875,
-0.063232421875,
0.0276336669921875,
0.00787353515625,
-0.03167724609375,
-0.01248931884765625,
0.0121612548828125,
-0.01248931884765625,
-0.0064239501953125,
-0.0002598762512207031,
-0.035797119140625,
0.0100250244140625,
-0.0138092041015625,
-0.0311737060546875,
-0.041900634765625,
-0.010009765625,
0.036834716796875,
-0.015228271484375,
0.0235137939453125,
-0.00360107421875,
-0.00905609130859375,
-0.01151275634765625,
-0.023162841796875,
0.03472900390625,
-0.044708251953125,
0.0660400390625,
0.053955078125,
-0.043060302734375,
0.048431396484375,
0.0182647705078125,
-0.0284576416015625,
0.019805908203125,
0.032684326171875,
0.02642822265625,
-0.02264404296875,
-0.0009407997131347656,
0.0217132568359375,
0.03350830078125,
-0.010833740234375,
0.033111572265625,
-0.0091552734375,
0.004596710205078125,
0.0259552001953125,
-0.0186614990234375,
-0.0151824951171875,
-0.01416778564453125,
-0.05523681640625,
-0.0276031494140625,
0.020843505859375,
-0.02447509765625,
0.00823974609375,
0.052703857421875,
0.00307464599609375,
0.00678253173828125,
-0.00293731689453125,
-0.0086669921875,
0.00890350341796875,
-0.006221771240234375,
0.0031528472900390625,
-0.021728515625,
-0.036773681640625,
0.0008640289306640625,
0.078857421875,
-0.006107330322265625,
-0.09228515625,
-0.02630615234375,
-0.05096435546875,
-0.01059722900390625,
0.0283966064453125,
0.0212249755859375,
-0.01071929931640625,
-0.00012409687042236328,
0.0264434814453125,
-0.054107666015625,
-0.0095062255859375,
-0.00293731689453125,
-0.05419921875,
-0.00838470458984375,
-0.0086669921875,
0.00738525390625,
-0.0060882568359375,
-0.0126800537109375,
0.0003533363342285156,
-0.0177459716796875,
-0.0382080078125,
-0.0267333984375,
0.004077911376953125,
-0.035888671875,
0.00305938720703125,
0.00969696044921875,
-0.0209197998046875,
0.007740020751953125,
0.0121612548828125,
0.0335693359375,
0.01215362548828125,
-0.025482177734375,
-0.005733489990234375,
0.0308380126953125,
0.01445770263671875,
0.05133056640625,
-0.0029506683349609375,
-0.001708984375,
-0.045440673828125,
0.0172882080078125,
-0.01268768310546875,
-0.00445556640625,
-0.01105499267578125,
0.0007781982421875,
0.00809478759765625,
-0.01453399658203125,
0.055206298828125,
0.0066680908203125,
0.012420654296875,
-0.0310821533203125,
-0.03765869140625,
-0.0060577392578125,
0.06866455078125,
-0.032684326171875,
0.00446319580078125,
-0.0198516845703125,
-0.0060577392578125,
-0.0205230712890625,
-0.03045654296875,
-0.06256103515625,
0.00348663330078125,
-0.10809326171875,
-0.0101318359375,
-0.0469970703125,
-0.0284423828125,
-0.0207366943359375,
-0.00859832763671875,
-0.02752685546875,
-0.05767822265625,
0.0240631103515625,
-0.034423828125,
-0.0084381103515625,
0.0033512115478515625,
-0.01541900634765625,
-0.038177490234375,
0.005054473876953125,
-0.031951904296875,
-0.0833740234375,
-0.01194000244140625,
-0.030242919921875,
0.049835205078125,
0.01983642578125,
0.0021266937255859375,
-0.01568603515625,
0.0251617431640625,
0.041107177734375,
-0.0406494140625,
0.025848388671875,
-0.028411865234375,
0.01751708984375,
0.0003275871276855469,
-0.0022296905517578125,
-0.0164031982421875,
-0.03582763671875,
-0.004795074462890625,
-0.033538818359375,
-0.004917144775390625,
-0.0024013519287109375,
-0.033233642578125,
0.043243408203125,
-0.0318603515625,
-0.0709228515625,
-0.06195068359375,
-0.0171966552734375,
-0.006793975830078125,
-0.035614013671875,
0.0280609130859375,
-0.03509521484375,
-0.07635498046875,
0.017120361328125,
-0.007904052734375,
-0.001361846923828125,
0.0153350830078125,
0.051239013671875,
0.01329803466796875,
-0.01172637939453125,
-0.02813720703125,
0.0236968994140625,
0.042449951171875,
-0.0261993408203125,
0.04638671875,
0.01422882080078125,
-0.035064697265625,
0.0836181640625,
0.0013418197631835938,
0.013671875,
-0.042877197265625,
0.050750732421875,
0.0000642538070678711,
-0.0047760009765625,
0.01519775390625,
0.004856109619140625,
-0.0016412734985351562,
-0.02166748046875,
-0.014373779296875,
0.00638580322265625,
-0.0226898193359375,
0.02655029296875,
0.024139404296875,
-0.00623321533203125,
-0.041839599609375,
-0.02734375,
0.016937255859375,
-0.004119873046875,
0.026123046875,
-0.0193328857421875,
0.0216064453125,
0.0101470947265625,
0.017333984375,
-0.02728271484375,
0.0247955322265625,
0.042266845703125,
-0.01058197021484375,
0.04443359375,
-0.035980224609375,
-0.0506591796875,
-0.0021152496337890625,
-0.01454925537109375,
0.06695556640625,
0.033050537109375,
-0.0222930908203125,
0.004337310791015625,
-0.00972747802734375,
0.0238189697265625,
-0.0001806020736694336,
0.00673675537109375,
0.040496826171875,
0.038421630859375,
0.0001455545425415039,
-0.020233154296875,
-0.010345458984375,
0.011322021484375,
-0.04327392578125,
0.018768310546875,
0.01141357421875,
0.0016450881958007812,
-0.006618499755859375,
0.058563232421875,
0.01934814453125,
0.0183258056640625,
-0.021087646484375,
0.052337646484375,
0.037200927734375,
-0.0013885498046875,
0.002960205078125,
0.03466796875,
-0.004528045654296875,
-0.00801849365234375,
0.01210784912109375,
-0.0263671875,
-0.00598907470703125,
0.032501220703125,
0.01824951171875,
0.047393798828125,
0.01496124267578125,
-0.025238037109375,
-0.00531005859375,
-0.01528167724609375,
0.06817626953125,
0.010772705078125,
-0.06927490234375,
-0.026123046875,
0.00592803955078125,
0.0212554931640625,
-0.05242919921875,
-0.01285552978515625,
0.00992584228515625,
-0.045074462890625,
-0.027191162109375,
0.0516357421875,
-0.0693359375,
-0.00682830810546875,
0.007312774658203125,
-0.050140380859375,
-0.0307464599609375,
-0.002170562744140625,
-0.03692626953125,
-0.009033203125,
-0.0012884140014648438,
-0.0161590576171875,
0.004512786865234375,
-0.0169219970703125,
0.004543304443359375,
-0.0157012939453125,
0.0084991455078125,
0.016845703125,
0.003070831298828125,
0.0518798828125,
0.0103759765625,
-0.07452392578125,
0.0038242340087890625,
-0.08050537109375,
-0.0173492431640625,
-0.1080322265625,
-0.0498046875,
-0.045501708984375,
0.0310516357421875,
-0.0122222900390625,
-0.004177093505859375,
-0.0012483596801757812,
0.007465362548828125,
-0.021392822265625,
0.052978515625,
0.031463623046875,
0.048004150390625,
-0.040924072265625,
0.04180908203125,
0.015594482421875,
0.0166168212890625,
-0.0218505859375,
0.004245758056640625,
-0.0022449493408203125,
0.0024356842041015625,
0.015960693359375,
-0.0100250244140625,
-0.04266357421875,
0.003894805908203125,
-0.050079345703125,
-0.0012598037719726562,
0.052215576171875,
-0.02325439453125,
0.002716064453125,
0.0011911392211914062,
0.018890380859375,
-0.0303192138671875,
-0.01557159423828125,
-0.020904541015625,
0.00017011165618896484,
-0.030975341796875,
0.00923919677734375,
0.01348114013671875,
-0.0293731689453125,
-0.0189208984375,
0.0010671615600585938,
0.0179443359375,
-0.0036830902099609375,
-0.0113983154296875,
-0.078857421875,
0.0880126953125,
0.050537109375,
-0.006542205810546875,
0.02850341796875,
0.004436492919921875,
0.0182647705078125,
-0.00986480712890625,
-0.01702880859375,
0.0281524658203125,
0.0105438232421875,
0.03228759765625,
-0.004245758056640625,
0.0024013519287109375,
0.0306243896484375,
-0.0306854248046875,
0.0281524658203125,
0.09326171875,
0.07330322265625,
-0.10845947265625,
-0.0028705596923828125,
-0.0160369873046875,
-0.0263214111328125,
0.051849365234375,
-0.017120361328125,
-0.037811279296875,
-0.09228515625,
0.08251953125,
-0.00274658203125,
-0.0008311271667480469,
0.016326904296875,
-0.01500701904296875,
-0.0184783935546875,
0.026123046875,
0.0171356201171875,
0.00466156005859375,
0.031646728515625,
-0.044952392578125,
-0.0263824462890625,
0.00782012939453125,
0.016143798828125,
-0.005146026611328125,
-0.01053619384765625,
-0.037872314453125,
-0.06219482421875,
-0.036712646484375,
-0.0301055908203125,
-0.0254364013671875,
0.0204315185546875,
-0.0017900466918945312,
0.02166748046875,
0.0662841796875,
-0.018463134765625,
0.0198211669921875,
0.030517578125,
-0.0161285400390625,
0.0010404586791992188,
-0.0338134765625,
0.00726318359375,
0.023040771484375,
-0.0286102294921875,
0.023712158203125,
0.004863739013671875,
-0.03790283203125,
-0.008941650390625,
0.007015228271484375,
0.0723876953125,
0.01763916015625,
-0.06011962890625,
0.004299163818359375,
-0.01212310791015625,
-0.0094757080078125,
-0.00800323486328125,
0.048187255859375,
-0.0426025390625,
-0.0170135498046875,
0.003894805908203125,
-0.041748046875,
-0.0148468017578125,
-0.01226043701171875,
-0.040435791015625,
0.055755615234375,
-0.04327392578125,
0.00948333740234375,
0.01531982421875,
0.0297698974609375,
-0.01641845703125,
0.0045166015625,
0.00582122802734375,
0.03802490234375,
0.018035888671875,
0.0287017822265625,
-0.034393310546875,
-0.0267333984375,
0.01280975341796875,
0.0679931640625,
0.00481414794921875,
0.00414276123046875,
0.0077362060546875,
-0.029937744140625,
-0.0018129348754882812,
0.04473876953125,
0.0175628662109375,
0.0069732666015625,
-0.01181793212890625,
0.027587890625,
0.01302337646484375,
-0.0533447265625,
0.0244293212890625,
-0.0256805419921875,
-0.036285400390625,
0.0060577392578125,
0.01297760009765625,
0.01389312744140625,
0.026580810546875,
-0.000041484832763671875,
-0.01678466796875,
0.01270294189453125,
0.0214385986328125,
-0.07073974609375,
-0.00811004638671875,
0.006504058837890625,
-0.006267547607421875,
0.030731201171875,
0.0213775634765625,
-0.00991058349609375,
0.022308349609375,
0.019287109375,
-0.044342041015625,
0.03717041015625,
0.0171051025390625,
-0.057769775390625,
0.004657745361328125,
-0.01141357421875,
0.0231781005859375,
-0.00968170166015625,
0.0223388671875,
0.033660888671875,
0.0214691162109375,
-0.017547607421875,
0.006778717041015625,
0.00579071044921875,
0.0137176513671875,
-0.0183258056640625,
-0.03289794921875,
0.0174102783203125,
0.01242828369140625,
0.010162353515625,
0.0277557373046875,
0.0159454345703125,
-0.00827789306640625,
0.04644775390625,
-0.01224517822265625,
0.00142669677734375,
0.00949859619140625,
-0.004268646240234375,
0.0007462501525878906,
0.0087738037109375,
-0.0013475418090820312,
0.038299560546875,
-0.028106689453125,
-0.01430511474609375,
-0.01412200927734375,
0.02197265625,
0.041748046875,
0.005443572998046875,
-0.0180206298828125,
-0.0189056396484375,
-0.0236358642578125,
0.0135955810546875,
-0.022918701171875,
0.020660400390625,
-0.0728759765625,
-0.059814453125,
0.0007500648498535156,
0.062042236328125,
-0.0271759033203125,
-0.010467529296875,
0.02581787109375,
0.04632568359375,
-0.0292510986328125,
-0.026458740234375,
0.06756591796875,
-0.005279541015625,
-0.023834228515625,
-0.012298583984375,
0.0149993896484375,
0.0193634033203125,
0.0173187255859375,
0.0145416259765625,
0.049285888671875,
0.02301025390625,
-0.004375457763671875,
0.01165771484375,
0.006866455078125,
-0.0174713134765625,
0.01273345947265625,
0.0185546875,
0.0228424072265625,
0.0226287841796875,
-0.048095703125,
-0.0217132568359375,
0.04254150390625,
-0.049713134765625,
0.00007998943328857422,
0.03271484375,
-0.047149658203125,
0.0259246826171875,
0.02410888671875,
-0.01416778564453125,
-0.0026798248291015625,
-0.00635528564453125,
0.016510009765625,
-0.0309295654296875,
0.00762176513671875,
-0.00669097900390625,
-0.004032135009765625,
0.0010728836059570312,
0.004283905029296875,
0.00795745849609375,
0.045166015625,
0.0175628662109375,
0.0128936767578125,
0.0215301513671875,
-0.057464599609375,
0.020233154296875,
-0.048492431640625,
-0.045318603515625,
0.01837158203125,
0.024261474609375,
-0.0100555419921875,
-0.0002486705780029297,
-0.0260162353515625,
0.0760498046875,
0.022796630859375,
0.0112152099609375,
0.058380126953125,
0.0125274658203125,
-0.01690673828125,
-0.03436279296875,
-0.002307891845703125,
-0.0273284912109375,
-0.045166015625,
-0.03680419921875,
-0.00315093994140625,
0.0134429931640625,
0.0164642333984375,
-0.00870513916015625,
0.00424957275390625,
0.052642822265625,
-0.0006856918334960938,
-0.007389068603515625,
0.055145263671875,
-0.0051727294921875,
0.0238494873046875,
-0.007274627685546875,
0.006839752197265625,
-0.0056304931640625,
-0.016448974609375,
0.0421142578125,
-0.002895355224609375,
0.0186004638671875,
0.01110076904296875,
0.004261016845703125,
-0.022979736328125,
0.01296234130859375,
0.01059722900390625,
-0.01302337646484375,
0.00890350341796875,
0.02044677734375,
-0.0307464599609375,
-0.051849365234375,
0.035919189453125,
-0.03253173828125,
-0.0195159912109375,
-0.00737762451171875,
0.021087646484375,
-0.0306854248046875,
-0.049468994140625,
-0.12841796875,
0.056640625,
0.0560302734375,
0.0002372264862060547,
-0.0924072265625,
0.0771484375,
-0.07763671875,
0.09588623046875,
-0.0200042724609375,
0.056793212890625,
-0.009063720703125,
0.01540374755859375,
-0.038482666015625,
-0.006072998046875,
-0.0213165283203125,
0.0172119140625,
0.0046234130859375,
-0.0157928466796875,
0.0081939697265625,
0.0162811279296875,
-0.003047943115234375,
-0.015716552734375,
-0.03192138671875,
0.035400390625,
-0.04443359375,
-0.00368499755859375,
0.0028858184814453125,
0.0064239501953125,
-0.0309906005859375,
-0.019287109375,
0.016876220703125,
-0.0145416259765625,
-0.042755126953125,
-0.03375244140625,
0.0158233642578125,
0.03521728515625,
-0.02850341796875,
-0.040435791015625,
-0.021514892578125,
-0.00382232666015625,
-0.0300140380859375,
0.007373809814453125,
-0.02056884765625,
-0.01983642578125,
0.025360107421875,
0.0105743408203125,
-0.056182861328125,
-0.01418304443359375,
0.018218994140625,
0.0304412841796875,
0.018768310546875,
0.0345458984375,
0.017333984375,
-0.0192413330078125,
0.0059967041015625,
-0.007080078125,
0.005191802978515625,
-0.032196044921875,
0.010833740234375,
0.0108642578125,
0.0313720703125,
-0.0177459716796875,
-0.006023406982421875,
0.0157623291015625,
0.0012226104736328125,
-0.0203094482421875,
-0.021240234375,
-0.03485107421875,
-0.015472412109375,
0.10174560546875,
0.049102783203125,
0.0224151611328125,
-0.0157928466796875,
-0.058868408203125,
-0.0543212890625,
0.00603485107421875,
-0.0164031982421875,
0.0161895751953125,
-0.076904296875,
0.0019521713256835938,
0.03436279296875,
-0.02203369140625,
0.0030574798583984375,
0.0263824462890625,
-0.0263214111328125,
0.0216217041015625,
0.042724609375,
-0.01458740234375,
-0.046051025390625,
0.0019779205322265625,
0.0274200439453125,
-0.04388427734375,
-0.057037353515625,
-0.002643585205078125,
0.00339508056640625,
-0.03692626953125,
-0.073974609375,
-0.00868988037109375,
0.0003123283386230469,
-0.0213470458984375,
0.0244140625,
0.0024509429931640625,
0.033355712890625,
-0.03155517578125,
0.004116058349609375,
0.024566650390625,
-0.00335693359375,
-0.006832122802734375,
-0.0110015869140625,
-0.021728515625,
0.04052734375,
-0.01241302490234375,
0.0135955810546875,
0.01336669921875,
0.031829833984375,
-0.0195159912109375,
0.039276123046875,
0.0261077880859375,
-0.0274200439453125,
0.030792236328125,
-0.00681304931640625,
0.0078582763671875,
0.018310546875,
0.037506103515625,
-0.05010986328125,
0.041046142578125,
-0.0246429443359375,
0.033416748046875,
0.0313720703125
] |
e5ef21c6467843209bf1ac8fd1da1b3b0e0ea95c
|
Wordpress Stackexchange
Q: What exactly does "Posts page" do in WordPress? Hay, I'm making a WordPress template, and i have 4 main pages.
HOME
BLOG
CONTACT
ABOUT US
As you can see "Blog" is a page (i need it to display when i call wp_list_pages()), but how do i edit this blog page? I assigned the "Blog" page a custom temeplate (called blog.php), but when "Blog" is set as the "Post page" in the Reading section of the WordPress admin, the page fails to render the template.
How do i edit this "Blog" page?
A: Setting page to be "posts page" changes its template hierarchy to follow home page rules.
So your custom template is ignored and it looks for home.php or index.php, which might or might not be the reason it fails to render.
|
Q: What exactly does "Posts page" do in WordPress? Hay, I'm making a WordPress template, and i have 4 main pages.
HOME
BLOG
CONTACT
ABOUT US
As you can see "Blog" is a page (i need it to display when i call wp_list_pages()), but how do i edit this blog page? I assigned the "Blog" page a custom temeplate (called blog.php), but when "Blog" is set as the "Post page" in the Reading section of the WordPress admin, the page fails to render the template.
How do i edit this "Blog" page?
A: Setting page to be "posts page" changes its template hierarchy to follow home page rules.
So your custom template is ignored and it looks for home.php or index.php, which might or might not be the reason it fails to render.
A: When you set a page to be the Posts Page, it will override any custom template or content you assign and automatically use index.php to render the posts loop.
|
wordpress
|
{
"language": "en",
"length": 163,
"provenance": "stackexchange_00019.jsonl.gz:408186",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13410"
}
|
[
0.01128387451171875,
-0.021484375,
0.035797119140625,
0.042205810546875,
-0.0364990234375,
-0.020843505859375,
0.05194091796875,
-0.057373046875,
-0.0185394287109375,
0.002025604248046875,
-0.017486572265625,
0.017242431640625,
-0.059326171875,
-0.0181427001953125,
0.00823974609375,
-0.05078125,
0.0511474609375,
-0.04833984375,
0.01439666748046875,
0.00008791685104370117,
-0.0022945404052734375,
0.01849365234375,
0.058135986328125,
0.0261993408203125,
0.0016622543334960938,
0.014434814453125,
0.043792724609375,
-0.0153656005859375,
-0.005168914794921875,
-0.021820068359375,
0.0094146728515625,
0.0203704833984375,
0.04864501953125,
0.01013946533203125,
-0.0631103515625,
-0.01544952392578125,
-0.0192413330078125,
-0.005245208740234375,
-0.037078857421875,
0.029296875,
-0.005588531494140625,
0.01275634765625,
0.057159423828125,
0.00777435302734375,
0.01120758056640625,
-0.0177154541015625,
-0.004131317138671875,
-0.04742431640625,
-0.0028209686279296875,
-0.035888671875,
-0.00548553466796875,
0.0212860107421875,
0.0191192626953125,
-0.0088958740234375,
-0.017486572265625,
-0.021575927734375,
0.0274810791015625,
0.01561737060546875,
0.04730224609375,
-0.05072021484375,
-0.048858642578125,
-0.00653839111328125,
0.039459228515625,
-0.0009322166442871094,
0.00013363361358642578,
-0.005458831787109375,
0.01169586181640625,
0.0194091796875,
-0.07000732421875,
-0.007904052734375,
0.03338623046875,
-0.034759521484375,
-0.00695037841796875,
-0.039825439453125,
-0.0088043212890625,
0.03326416015625,
0.0048828125,
-0.0116729736328125,
-0.007293701171875,
0.0063018798828125,
0.01381683349609375,
0.0192718505859375,
-0.0025959014892578125,
-0.03643798828125,
0.0131683349609375,
-0.0242156982421875,
-0.01214599609375,
-0.019775390625,
-0.0379638671875,
-0.003055572509765625,
-0.031524658203125,
-0.0330810546875,
-0.035552978515625,
0.023193359375,
-0.00965118408203125,
0.015411376953125,
-0.0303802490234375,
0.0169525146484375,
-0.0186767578125,
0.0087738037109375,
-0.0279998779296875,
-0.0102081298828125,
0.003742218017578125,
-0.0272369384765625,
0.0031375885009765625,
0.0472412109375,
0.01806640625,
0.041656494140625,
0.051361083984375,
0.022857666015625,
0.0184783935546875,
0.03997802734375,
-0.0241546630859375,
-0.023345947265625,
-0.0165863037109375,
-0.00959014892578125,
-0.03338623046875,
-0.03131103515625,
-0.0013437271118164062,
-0.060089111328125,
0.0002276897430419922,
0.036834716796875,
0.013397216796875,
-0.0438232421875,
0.004802703857421875,
-0.003582000732421875,
-0.00441741943359375,
-0.04644775390625,
0.0160980224609375,
0.0114288330078125,
-0.04180908203125,
0.01038360595703125,
0.056549072265625,
0.03125,
0.00910186767578125,
-0.0273590087890625,
-0.00305938720703125,
-0.040435791015625,
-0.00860595703125,
0.01096343994140625,
-0.0021114349365234375,
-0.053070068359375,
-0.0130462646484375,
-0.0033626556396484375,
-0.0007777214050292969,
0.011322021484375,
0.0112152099609375,
0.03741455078125,
0.00360107421875,
-0.0033740997314453125,
-0.0051422119140625,
0.01290130615234375,
0.0005040168762207031,
0.030120849609375,
0.064208984375,
-0.030517578125,
0.036041259765625,
-0.036468505859375,
0.050079345703125,
-0.019683837890625,
0.0234222412109375,
0.002353668212890625,
0.033782958984375,
-0.0099029541015625,
-0.040191650390625,
0.00844573974609375,
-0.07293701171875,
-0.02471923828125,
0.02362060546875,
-0.02337646484375,
0.051971435546875,
-0.0085601806640625,
0.03179931640625,
0.023223876953125,
0.006763458251953125,
0.006839752197265625,
-0.009796142578125,
-0.0294647216796875,
0.01438140869140625,
0.06732177734375,
0.02069091796875,
-0.0023746490478515625,
-0.0159912109375,
0.0239410400390625,
-0.03814697265625,
0.0135345458984375,
0.0281982421875,
0.04925537109375,
-0.025787353515625,
0.032958984375,
0.0438232421875,
0.0283355712890625,
-0.0266571044921875,
0.037628173828125,
-0.0175933837890625,
-0.0218658447265625,
-0.0250244140625,
0.0181732177734375,
-0.021697998046875,
-0.0377197265625,
-0.032196044921875,
0.0291290283203125,
-0.019195556640625,
0.04449462890625,
-0.004322052001953125,
0.0064697265625,
-0.00786590576171875,
0.0240325927734375,
0.0260009765625,
0.01445770263671875,
0.002178192138671875,
0.0013570785522460938,
-0.004428863525390625,
-0.050079345703125,
-0.07171630859375,
0.0027713775634765625,
-0.006763458251953125,
-0.005405426025390625,
-0.01459503173828125,
-0.019683837890625,
-0.0269775390625,
-0.00677490234375,
-0.04376220703125,
0.0239715576171875,
0.06243896484375,
-0.0269012451171875,
-0.02825927734375,
-0.050384521484375,
-0.037384033203125,
0.0250396728515625,
-0.1446533203125,
0.0640869140625,
0.0183868408203125,
0.020782470703125,
-0.04931640625,
-0.01329803466796875,
-0.01363372802734375,
-0.006847381591796875,
0.0103607177734375,
0.03717041015625,
0.0167388916015625,
-0.0018758773803710938,
-0.026031494140625,
-0.01282501220703125,
0.03558349609375,
-0.005374908447265625,
0.01174163818359375,
-0.0010938644409179688,
0.016845703125,
0.062347412109375,
-0.00502777099609375,
0.005046844482421875,
-0.005496978759765625,
-0.059112548828125,
0.0139923095703125,
0.03363037109375,
0.015960693359375,
0.043365478515625,
-0.028839111328125,
0.0009517669677734375,
-0.01110076904296875,
0.0107269287109375,
-0.0065460205078125,
-0.0031299591064453125,
0.054107666015625,
0.0108184814453125,
0.0302734375,
0.018035888671875,
-0.04534912109375,
0.011566162109375,
0.012359619140625,
0.007965087890625,
-0.0023956298828125,
0.0227813720703125,
-0.00688934326171875,
0.00005501508712768555,
-0.0276641845703125,
0.00814056396484375,
-0.034393310546875,
-0.0004699230194091797,
-0.00040030479431152344,
0.01428985595703125,
-0.0258026123046875,
-0.010528564453125,
0.01763916015625,
-0.059417724609375,
-0.011932373046875,
0.03314208984375,
0.0247344970703125,
-0.034393310546875,
-0.006542205810546875,
-0.0006437301635742188,
-0.0491943359375,
0.059600830078125,
0.01451873779296875,
-0.0467529296875,
0.00601959228515625,
-0.070556640625,
0.055877685546875,
-0.03973388671875,
0.0421142578125,
0.072998046875,
-0.01568603515625,
0.023956298828125,
0.01139068603515625,
0.049652099609375,
0.01397705078125,
0.0160064697265625,
0.0236663818359375,
0.0127410888671875,
-0.01708984375,
0.0234222412109375,
0.027435302734375,
0.056793212890625,
-0.0049896240234375,
-0.041107177734375,
-0.00798797607421875,
0.04107666015625,
-0.07330322265625,
-0.05364990234375,
-0.004150390625,
-0.06915283203125,
0.018310546875,
-0.033905029296875,
-0.034942626953125,
-0.0026798248291015625,
-0.006687164306640625,
0.014923095703125,
-0.01715087890625,
-0.00919342041015625,
-0.036285400390625,
-0.0672607421875,
-0.07196044921875,
-0.03179931640625,
-0.00789642333984375,
0.002429962158203125,
-0.008514404296875,
0.07672119140625,
-0.00882720947265625,
-0.08978271484375,
-0.03265380859375,
0.0113677978515625,
-0.0218505859375,
0.0072479248046875,
0.002666473388671875,
-0.025177001953125,
-0.0010118484497070312,
0.00415802001953125,
0.00872802734375,
0.00934600830078125,
-0.0023097991943359375,
-0.0118255615234375,
-0.03173828125,
-0.0022125244140625,
-0.00754547119140625,
-0.0182647705078125,
0.04010009765625,
-0.0024776458740234375,
-0.0195465087890625,
-0.041748046875,
-0.050872802734375,
-0.04132080078125,
-0.08843994140625,
0.0172119140625,
0.0665283203125,
0.0248870849609375,
-0.0302734375,
-0.00382232666015625,
0.01126861572265625,
0.01568603515625,
0.024139404296875,
-0.0166778564453125,
0.043365478515625,
0.00493621826171875,
0.004695892333984375,
-0.0355224609375,
0.00859832763671875,
-0.006626129150390625,
0.0032787322998046875,
-0.0135040283203125,
0.0005483627319335938,
-0.04083251953125,
0.0408935546875,
-0.0645751953125,
-0.06781005859375,
0.040130615234375,
-0.01137542724609375,
0.003887176513671875,
-0.027008056640625,
-0.035003662109375,
0.01348114013671875,
0.09417724609375,
-0.0380859375,
-0.02276611328125,
0.0004949569702148438,
0.00640869140625,
-0.040924072265625,
-0.002838134765625,
-0.0465087890625,
0.00252532958984375,
-0.0274658203125,
-0.01898193359375,
-0.015899658203125,
-0.01085662841796875,
-0.026336669921875,
0.059661865234375,
-0.0294036865234375,
-0.018096923828125,
0.04302978515625,
0.002094268798828125,
-0.006023406982421875,
-0.0024547576904296875,
-0.012908935546875,
-0.0269012451171875,
-0.01503753662109375,
0.004634857177734375,
-0.05865478515625,
-0.019439697265625,
0.0307159423828125,
0.01198577880859375,
-0.006320953369140625,
-0.04937744140625,
-0.006134033203125,
0.041351318359375,
0.01554107666015625,
0.0139617919921875,
0.004688262939453125,
-0.00852203369140625,
0.0007662773132324219,
-0.003406524658203125,
-0.001674652099609375,
-0.0217132568359375,
-0.017578125,
0.003482818603515625,
-0.03204345703125,
0.03790283203125,
-0.0007319450378417969,
-0.003963470458984375,
0.020294189453125,
-0.0149688720703125,
-0.0413818359375,
-0.030364990234375,
0.01171112060546875,
0.035614013671875,
-0.0015468597412109375,
0.01091766357421875,
-0.037567138671875,
-0.031768798828125,
0.01910400390625,
-0.00833892822265625,
-0.0069427490234375,
0.0171661376953125,
0.0814208984375,
0.0147857666015625,
0.001934051513671875,
-0.06634521484375,
0.04278564453125,
0.0423583984375,
0.0039825439453125,
0.08209228515625,
0.052581787109375,
-0.003387451171875,
0.02838134765625,
0.020904541015625,
-0.0252532958984375,
-0.0171661376953125,
0.059783935546875,
0.01224517822265625,
-0.0200042724609375,
0.00848388671875,
-0.007232666015625,
0.03570556640625,
0.033172607421875,
-0.0330810546875,
-0.0276947021484375,
-0.039306640625,
0.06109619140625,
-0.0226593017578125,
0.050384521484375,
-0.052734375,
-0.0286102294921875,
0.01396942138671875,
-0.0007152557373046875,
0.0004208087921142578,
0.00177001953125,
0.007843017578125,
-0.0014133453369140625,
0.003173828125,
0.01088714599609375,
0.0311126708984375,
0.00531005859375,
0.0023670196533203125,
0.0245513916015625,
0.01971435546875,
-0.0043182373046875,
0.013458251953125,
-0.00856781005859375,
0.032470703125,
0.0014429092407226562,
-0.057373046875,
0.0112762451171875,
0.00199127197265625,
0.027191162109375,
0.0206451416015625,
0.0185089111328125,
0.016998291015625,
-0.00537109375,
0.005184173583984375,
-0.00433349609375,
0.006748199462890625,
-0.0220184326171875,
-0.0213775634765625,
0.0178985595703125,
0.029083251953125,
-0.0149993896484375,
0.03839111328125,
0.0058746337890625,
0.048095703125,
-0.00432586669921875,
-0.04608154296875,
0.03125,
0.03729248046875,
0.031402587890625,
0.0025348663330078125,
0.01678466796875,
-0.0208892822265625,
0.0177001953125,
-0.00424957275390625,
-0.04266357421875,
-0.01200103759765625,
0.0138397216796875,
0.032501220703125,
-0.00919342041015625,
-0.024017333984375,
0.02349853515625,
-0.021514892578125,
-0.01493072509765625,
0.01497650146484375,
-0.021087646484375,
-0.04644775390625,
-0.0173797607421875,
0.0231781005859375,
0.0438232421875,
-0.0064239501953125,
0.004795074462890625,
0.009490966796875,
0.006061553955078125,
0.058013916015625,
-0.0390625,
0.0243377685546875,
-0.01108551025390625,
-0.0218353271484375,
-0.024871826171875,
-0.01080322265625,
0.038330078125,
-0.0537109375,
-0.0386962890625,
-0.0003142356872558594,
0.003910064697265625,
0.0003256797790527344,
-0.02154541015625,
0.023895263671875,
-0.0027027130126953125,
-0.0255584716796875,
0.031829833984375,
0.0194549560546875,
0.0316162109375,
0.003387451171875,
-0.08782958984375,
-0.001224517822265625,
-0.034332275390625,
-0.01416778564453125,
-0.043060302734375,
-0.026824951171875,
-0.0694580078125,
0.0168914794921875,
-0.01482391357421875,
0.013641357421875,
-0.0192413330078125,
-0.009368896484375,
-0.046051025390625,
0.02410888671875,
0.0301361083984375,
0.060333251953125,
-0.01116180419921875,
0.0772705078125,
-0.0197296142578125,
0.049957275390625,
0.0126495361328125,
0.055511474609375,
-0.01512908935546875,
-0.03521728515625,
0.0207672119140625,
-0.0235443115234375,
-0.0268096923828125,
-0.01049041748046875,
-0.041748046875,
-0.0029277801513671875,
0.052734375,
-0.006961822509765625,
0.0013093948364257812,
-0.022735595703125,
0.004364013671875,
-0.031036376953125,
0.00884246826171875,
-0.041168212890625,
-0.03839111328125,
0.033111572265625,
-0.0013904571533203125,
0.01605224609375,
-0.014923095703125,
-0.0007452964782714844,
0.0015468597412109375,
-0.007843017578125,
0.0016775131225585938,
-0.007129669189453125,
-0.0287322998046875,
0.059722900390625,
0.0733642578125,
-0.0126800537109375,
0.033599853515625,
0.01491546630859375,
-0.0010137557983398438,
0.01268768310546875,
-0.0033168792724609375,
-0.0121917724609375,
0.00519561767578125,
0.037017822265625,
-0.0018854141235351562,
-0.00743865966796875,
0.029144287109375,
-0.0248260498046875,
0.023956298828125,
0.085205078125,
0.06475830078125,
-0.10919189453125,
0.00865936279296875,
-0.0019006729125976562,
0.010528564453125,
0.0626220703125,
0.00409698486328125,
-0.0093841552734375,
-0.021514892578125,
0.034454345703125,
-0.005733489990234375,
-0.007904052734375,
0.0195465087890625,
0.00817108154296875,
-0.0137939453125,
-0.0160064697265625,
0.06463623046875,
0.02789306640625,
-0.01444244384765625,
-0.003726959228515625,
0.030517578125,
-0.01113128662109375,
-0.017181396484375,
0.00531005859375,
-0.01444244384765625,
-0.01387786865234375,
-0.0251312255859375,
0.01030731201171875,
-0.023223876953125,
0.005218505859375,
0.0232086181640625,
-0.00034999847412109375,
-0.047637939453125,
0.0421142578125,
-0.05206298828125,
0.06573486328125,
0.01043701171875,
-0.0269012451171875,
-0.0282135009765625,
-0.0267486572265625,
0.02020263671875,
0.02532958984375,
-0.03057861328125,
0.0236053466796875,
0.01227569580078125,
-0.037689208984375,
-0.026519775390625,
-0.053680419921875,
0.0980224609375,
-0.004581451416015625,
-0.04315185546875,
-0.0022068023681640625,
-0.01568603515625,
-0.0152435302734375,
-0.01275634765625,
-0.0094146728515625,
-0.04193115234375,
0.0081634521484375,
-0.03082275390625,
-0.012908935546875,
-0.007167816162109375,
-0.032745361328125,
-0.07196044921875,
0.10504150390625,
-0.0248565673828125,
0.050323486328125,
0.01097869873046875,
0.038482666015625,
-0.01419830322265625,
0.010833740234375,
-0.035186767578125,
0.058441162109375,
-0.0097198486328125,
0.07452392578125,
-0.062255859375,
-0.0011816024780273438,
0.037109375,
0.04779052734375,
0.043609619140625,
0.006927490234375,
-0.03900146484375,
-0.043853759765625,
0.0114898681640625,
0.03448486328125,
0.010009765625,
0.041778564453125,
-0.027374267578125,
0.012603759765625,
-0.026641845703125,
-0.05108642578125,
0.01129913330078125,
-0.030181884765625,
-0.04364013671875,
0.0107269287109375,
0.0022869110107421875,
-0.0012693405151367188,
0.00907135009765625,
0.004413604736328125,
-0.0107269287109375,
-0.00506591796875,
0.0026035308837890625,
-0.025634765625,
-0.0229644775390625,
0.0545654296875,
0.04052734375,
-0.04852294921875,
-0.025726318359375,
-0.0270843505859375,
0.034698486328125,
0.0010786056518554688,
0.0272674560546875,
0.019134521484375,
0.0258026123046875,
0.035491943359375,
-0.0312347412109375,
0.012481689453125,
0.0298309326171875,
-0.041046142578125,
0.0589599609375,
0.039337158203125,
0.026641845703125,
-0.031036376953125,
0.00246429443359375,
0.0112762451171875,
0.053192138671875,
-0.040924072265625,
0.0067291259765625,
0.007160186767578125,
-0.005123138427734375,
-0.01464080810546875,
-0.04217529296875,
-0.0246734619140625,
-0.00966644287109375,
-0.01342010498046875,
-0.01373291015625,
-0.00685882568359375,
0.002010345458984375,
-0.005718231201171875,
-0.0107421875,
-0.02703857421875,
0.013519287109375,
0.0253448486328125,
-0.02374267578125,
0.005290985107421875,
-0.01010894775390625,
0.0272064208984375,
0.010528564453125,
0.0093536376953125,
-0.034423828125,
-0.00016438961029052734,
-0.0004181861877441406,
0.041412353515625,
-0.03179931640625,
0.0145721435546875,
-0.05511474609375,
-0.0716552734375,
0.00861358642578125,
0.0460205078125,
-0.0038852691650390625,
0.0027713775634765625,
0.0164947509765625,
0.01459503173828125,
-0.0225372314453125,
-0.00937652587890625,
0.02227783203125,
-0.023101806640625,
-0.01953125,
-0.0254974365234375,
-0.006511688232421875,
-0.012359619140625,
-0.01520538330078125,
0.0118865966796875,
0.04705810546875,
-0.0090484619140625,
-0.01324462890625,
0.040740966796875,
-0.0036773681640625,
-0.00931549072265625,
0.052093505859375,
0.00119781494140625,
0.0592041015625,
0.01467132568359375,
-0.06085205078125,
-0.0119171142578125,
-0.009002685546875,
-0.077392578125,
0.037811279296875,
0.052642822265625,
-0.031402587890625,
0.000751495361328125,
-0.002197265625,
-0.01071929931640625,
0.01058197021484375,
-0.0160980224609375,
0.0179595947265625,
0.04571533203125,
0.006969451904296875,
0.022552490234375,
-0.06182861328125,
-0.054443359375,
-0.0299835205078125,
0.055267333984375,
0.004421234130859375,
0.0916748046875,
-0.028900146484375,
0.0186614990234375,
-0.03363037109375,
0.03240966796875,
-0.039398193359375,
-0.038360595703125,
0.02667236328125,
0.030853271484375,
0.0180206298828125,
-0.01456451416015625,
-0.05218505859375,
0.034820556640625,
0.027008056640625,
-0.0190887451171875,
0.0333251953125,
-0.0307464599609375,
0.00814056396484375,
-0.0318603515625,
0.010711669921875,
-0.020263671875,
-0.0196075439453125,
-0.01506805419921875,
0.005237579345703125,
0.01303863525390625,
0.004024505615234375,
-0.0228118896484375,
0.06951904296875,
-0.004638671875,
-0.04034423828125,
0.034454345703125,
-0.0794677734375,
0.04345703125,
0.027099609375,
0.0302734375,
-0.01451873779296875,
0.03912353515625,
-0.01076507568359375,
0.017913818359375,
0.01216888427734375,
0.0301971435546875,
0.0178375244140625,
-0.0225982666015625,
0.0221405029296875,
-0.042694091796875,
0.0230865478515625,
-0.01419830322265625,
-0.00795745849609375,
-0.0186309814453125,
0.0310516357421875,
0.007053375244140625,
0.015411376953125,
-0.014892578125,
-0.0004603862762451172,
-0.0233154296875,
0.0001735687255859375,
-0.017578125,
-0.037139892578125,
-0.0634765625,
-0.0263824462890625,
0.0026378631591796875,
-0.0178375244140625,
-0.0287017822265625,
0.016448974609375,
-0.01690673828125,
-0.003238677978515625,
-0.040863037109375,
-0.008026123046875,
0.0212860107421875,
0.05743408203125,
-0.050994873046875,
0.039398193359375,
-0.0228118896484375,
-0.07373046875,
-0.0064239501953125,
0.04327392578125,
0.0679931640625,
-0.05181884765625,
-0.0118255615234375,
0.017852783203125,
0.042999267578125,
0.07537841796875,
0.003215789794921875,
-0.01433563232421875,
0.009124755859375,
-0.0078582763671875,
0.013275146484375,
-0.05743408203125,
-0.01076507568359375,
-0.0535888671875,
-0.002986907958984375,
0.007232666015625,
-0.00400543212890625,
0.01381683349609375,
-0.03228759765625,
-0.058441162109375,
0.0298919677734375,
-0.005619049072265625,
-0.038909912109375,
-0.045257568359375,
0.0005660057067871094,
-0.0204620361328125,
0.0318603515625,
-0.0079345703125,
-0.0148773193359375,
-0.014739990234375,
0.02978515625,
0.005275726318359375,
0.0482177734375,
0.0109100341796875,
0.00995635986328125,
-0.0239715576171875,
0.003818511962890625,
-0.020751953125,
-0.0070037841796875,
0.0022678375244140625,
-0.01020050048828125,
0.0007314682006835938,
0.0163116455078125,
-0.049530029296875,
-0.0296173095703125,
-0.00710296630859375,
0.02838134765625,
0.0141143798828125,
-0.004810333251953125,
-0.057952880859375,
-0.043060302734375,
0.047576904296875,
0.0224456787109375,
0.0241546630859375,
0.00482177734375,
0.0163726806640625,
-0.028564453125,
-0.09344482421875,
-0.0010251998901367188,
0.04229736328125,
-0.038299560546875,
0.0269927978515625,
0.008392333984375,
-0.0154876708984375,
-0.014556884765625,
-0.020263671875,
-0.046630859375,
-0.0172882080078125,
-0.03778076171875,
-0.006961822509765625,
0.016021728515625,
-0.06732177734375,
0.07208251953125,
-0.03125,
0.01221466064453125,
0.0098724365234375,
0.031463623046875,
0.0304412841796875,
0.0419921875,
-0.00724029541015625,
0.005329132080078125,
-0.0296630859375,
0.032318115234375,
-0.003566741943359375,
0.0215911865234375,
-0.0295257568359375,
0.0106201171875,
0.00913238525390625,
0.0142822265625,
-0.0147857666015625,
0.01078033447265625,
0.00775909423828125,
0.01445770263671875,
-0.033721923828125,
0.07159423828125,
0.0036754608154296875,
0.0262908935546875,
0.0027713775634765625,
0.033294677734375,
-0.0143890380859375,
-0.00920867919921875,
-0.00457763671875,
-0.0419921875,
-0.006160736083984375,
-0.0028705596923828125,
-0.01214599609375,
-0.0174560546875,
-0.0198822021484375,
-0.03143310546875,
-0.00547027587890625,
0.004734039306640625
] |
3ff3c11a1537f46a91752812796432b7068fa75f
|
Wordpress Stackexchange
Q: Troubleshooting fetch_feed and SimplePie I've got a very basic solution using fetch_feed() and SimplePie to pull in RSS items which is working on my localhost, but for some reason is_wp_error() persists as true on the live server. Is there anyway for me to get specific output about the nature of the error so as to work towards a solution on the live server?
<?php
include_once(ABSPATH . WPINC . '/feed.php');
$rss = fetch_feed( '[rss feed removed from example]' );
if (!is_wp_error( $rss ) ) :
$maxitems = $rss->get_item_quantity(5);
$rss_items = $rss->get_items(0, $maxitems);
$isc = 'http://dtd.interspire.com/rss/isc-1.0.dtd';
endif;
?>
<ul class="featured-products">
<?php if ( $maxitems == 0) : ?>
<li>No items.</li>
<?php else : ?>
<?php foreach ( $rss_items as $item ) :
$image = $item->get_item_tags( $isc, 'thumb'); ?>
<li>...</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
A: add this to your feed
$rss = fetch_feed( $url );
if ( is_wp_error( $rss ) ) {
echo $rss->get_error_message(); <---this
} else {
// do your stuff here
}
I would also suggest installing the debug toolbar extensions, like "debug-bar-extender".
|
Q: Troubleshooting fetch_feed and SimplePie I've got a very basic solution using fetch_feed() and SimplePie to pull in RSS items which is working on my localhost, but for some reason is_wp_error() persists as true on the live server. Is there anyway for me to get specific output about the nature of the error so as to work towards a solution on the live server?
<?php
include_once(ABSPATH . WPINC . '/feed.php');
$rss = fetch_feed( '[rss feed removed from example]' );
if (!is_wp_error( $rss ) ) :
$maxitems = $rss->get_item_quantity(5);
$rss_items = $rss->get_items(0, $maxitems);
$isc = 'http://dtd.interspire.com/rss/isc-1.0.dtd';
endif;
?>
<ul class="featured-products">
<?php if ( $maxitems == 0) : ?>
<li>No items.</li>
<?php else : ?>
<?php foreach ( $rss_items as $item ) :
$image = $item->get_item_tags( $isc, 'thumb'); ?>
<li>...</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
A: add this to your feed
$rss = fetch_feed( $url );
if ( is_wp_error( $rss ) ) {
echo $rss->get_error_message(); <---this
} else {
// do your stuff here
}
I would also suggest installing the debug toolbar extensions, like "debug-bar-extender".
A: This could be due to deprecation of rss-functions.php. Check for this error by setting the wp-errors in the config file on your livesite to true. Then you might get to see the problem.
Don't forget to reset them to false quickly after checking.
Use wp-includes/rss.php instead
|
wordpress
|
{
"language": "en",
"length": 223,
"provenance": "stackexchange_00019.jsonl.gz:408189",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13414"
}
|
[
0.045745849609375,
-0.01035308837890625,
0.0142364501953125,
-0.0084075927734375,
0.007472991943359375,
-0.018768310546875,
0.040313720703125,
-0.0323486328125,
0.03802490234375,
0.0300140380859375,
-0.07763671875,
-0.015625,
-0.018585205078125,
0.033203125,
-0.06622314453125,
-0.05792236328125,
0.0531005859375,
-0.030792236328125,
0.03717041015625,
0.016204833984375,
-0.019775390625,
0.047943115234375,
0.0408935546875,
0.00806427001953125,
-0.002964019775390625,
0.01320648193359375,
0.11279296875,
-0.042022705078125,
0.0146942138671875,
-0.0226287841796875,
0.0159149169921875,
-0.01261138916015625,
0.05108642578125,
0.0263519287109375,
-0.05657958984375,
-0.009613037109375,
-0.0088043212890625,
-0.0202484130859375,
-0.0703125,
0.085205078125,
0.004791259765625,
-0.0143585205078125,
0.03424072265625,
0.003795623779296875,
-0.0074310302734375,
0.01605224609375,
-0.007106781005859375,
-0.0400390625,
-0.0196990966796875,
-0.0032024383544921875,
0.0148468017578125,
-0.0161895751953125,
0.0127716064453125,
-0.005950927734375,
0.0017118453979492188,
0.0106658935546875,
0.0012969970703125,
-0.0211029052734375,
0.022918701171875,
-0.0120391845703125,
-0.0106658935546875,
-0.0099029541015625,
0.02410888671875,
0.005077362060546875,
0.009674072265625,
0.0031757354736328125,
0.053436279296875,
0.035614013671875,
-0.035369873046875,
-0.042633056640625,
-0.002864837646484375,
0.0032806396484375,
-0.00254058837890625,
0.01690673828125,
-0.0027008056640625,
-0.0273284912109375,
0.0004730224609375,
-0.0196380615234375,
0.025146484375,
0.0246734619140625,
-0.003200531005859375,
0.00894927978515625,
-0.07061767578125,
0.0023021697998046875,
-0.0038585662841796875,
0.0212249755859375,
-0.0028934478759765625,
-0.00720977783203125,
-0.0115203857421875,
-0.006011962890625,
-0.0175323486328125,
-0.05316162109375,
-0.0236053466796875,
0.011962890625,
-0.0202178955078125,
-0.0224151611328125,
0.0012254714965820312,
0.062255859375,
-0.052032470703125,
-0.00730133056640625,
-0.045166015625,
0.005641937255859375,
-0.027679443359375,
-0.0295867919921875,
0.02252197265625,
0.01419830322265625,
-0.0294342041015625,
0.0274810791015625,
0.08056640625,
0.053680419921875,
0.018157958984375,
0.053375244140625,
-0.03802490234375,
-0.0253143310546875,
0.0015993118286132812,
0.01187896728515625,
-0.041290283203125,
0.019287109375,
0.01023101806640625,
0.011383056640625,
0.01151275634765625,
0.039459228515625,
-0.03070068359375,
-0.00681304931640625,
-0.004749298095703125,
0.0003452301025390625,
-0.01132965087890625,
-0.01514434814453125,
-0.0166015625,
0.006626129150390625,
-0.007190704345703125,
0.034698486328125,
0.017547607421875,
0.006805419921875,
-0.0266265869140625,
-0.008544921875,
0.0362548828125,
-0.027862548828125,
0.013824462890625,
0.0168914794921875,
0.007534027099609375,
-0.0225067138671875,
0.01314544677734375,
0.025054931640625,
0.0124053955078125,
-0.016387939453125,
0.0290985107421875,
0.0309295654296875,
0.022369384765625,
0.001827239990234375,
-0.023284912109375,
0.036590576171875,
0.0243377685546875,
0.022308349609375,
-0.0200347900390625,
-0.01474761962890625,
0.0860595703125,
-0.053131103515625,
-0.0161590576171875,
-0.08441162109375,
0.003986358642578125,
-0.00738525390625,
0.03240966796875,
-0.055206298828125,
-0.054595947265625,
0.0180206298828125,
-0.060150146484375,
-0.00273895263671875,
0.029815673828125,
0.020233154296875,
0.0277557373046875,
-0.0107574462890625,
0.004810333251953125,
0.0281524658203125,
-0.0032176971435546875,
0.0138702392578125,
-0.0176544189453125,
0.011444091796875,
0.05279541015625,
-0.03717041015625,
-0.038177490234375,
-0.034271240234375,
0.050872802734375,
-0.0096893310546875,
-0.0792236328125,
0.0291900634765625,
-0.010894775390625,
0.0267486572265625,
0.06591796875,
-0.0030231475830078125,
0.0287017822265625,
-0.0045318603515625,
0.0014200210571289062,
0.008514404296875,
-0.0191497802734375,
-0.0567626953125,
0.06280517578125,
-0.00392913818359375,
-0.007686614990234375,
0.0113677978515625,
0.0036182403564453125,
0.0062103271484375,
0.01097869873046875,
0.005859375,
-0.054168701171875,
0.03948974609375,
-0.0286102294921875,
0.0426025390625,
-0.0153961181640625,
0.007366180419921875,
0.01018524169921875,
-0.00691986083984375,
-0.0081024169921875,
-0.032012939453125,
-0.03466796875,
0.0081787109375,
-0.0643310546875,
0.031341552734375,
-0.0265350341796875,
0.0694580078125,
-0.031097412109375,
-0.049346923828125,
-0.0279083251953125,
-0.01763916015625,
0.0169525146484375,
0.0139923095703125,
-0.0281219482421875,
0.0120697021484375,
0.0298004150390625,
0.0171051025390625,
0.021392822265625,
0.0137176513671875,
-0.012054443359375,
0.0001938343048095703,
-0.02191162109375,
-0.019683837890625,
0.017364501953125,
-0.034088134765625,
0.03369140625,
0.03912353515625,
0.054595947265625,
0.024200439453125,
0.02178955078125,
-0.01837158203125,
0.05535888671875,
-0.0185394287109375,
0.034820556640625,
-0.06317138671875,
-0.0157318115234375,
-0.0023479461669921875,
0.015716552734375,
0.0016002655029296875,
0.0362548828125,
0.00839996337890625,
-0.0208282470703125,
0.058197021484375,
-0.023406982421875,
-0.0067291259765625,
-0.039764404296875,
0.042999267578125,
0.00031304359436035156,
0.08538818359375,
0.034515380859375,
0.03375244140625,
0.060516357421875,
0.0115203857421875,
0.06268310546875,
0.041107177734375,
-0.0075531005859375,
0.00015437602996826172,
-0.019378662109375,
-0.0204620361328125,
-0.0012578964233398438,
0.05047607421875,
0.0119781494140625,
0.00043129920959472656,
-0.0123138427734375,
-0.01381683349609375,
-0.0121307373046875,
0.00928497314453125,
0.00557708740234375,
0.07476806640625,
0.01424407958984375,
-0.0189666748046875,
-0.0237274169921875,
-0.04693603515625,
-0.01548004150390625,
-0.024017333984375,
0.047607421875,
0.0343017578125,
0.03363037109375,
0.030548095703125,
-0.0166778564453125,
0.062042236328125,
0.02850341796875,
0.0064239501953125,
0.0811767578125,
-0.05255126953125,
0.029998779296875,
-0.01496124267578125,
0.076904296875,
0.05413818359375,
-0.0082550048828125,
-0.0087738037109375,
0.0023975372314453125,
-0.041473388671875,
-0.0051727294921875,
0.005733489990234375,
-0.0182647705078125,
-0.0011568069458007812,
-0.049072265625,
0.03509521484375,
0.004974365234375,
0.052703857421875,
0.00037407875061035156,
-0.0523681640625,
0.0231781005859375,
0.01036834716796875,
-0.08270263671875,
-0.10321044921875,
0.005176544189453125,
-0.045684814453125,
0.030487060546875,
0.0219879150390625,
-0.0192413330078125,
-0.03424072265625,
0.0311431884765625,
-0.002002716064453125,
0.005046844482421875,
-0.032623291015625,
-0.04693603515625,
-0.060577392578125,
-0.0733642578125,
0.018951416015625,
0.01177215576171875,
0.01552581787109375,
0.0003306865692138672,
0.00826263427734375,
0.01708984375,
-0.0015974044799804688,
0.0281219482421875,
0.0706787109375,
-0.00782012939453125,
-0.055084228515625,
-0.02020263671875,
0.01332855224609375,
0.00713348388671875,
-0.007175445556640625,
0.0221099853515625,
0.01221466064453125,
-0.0246429443359375,
-0.0115203857421875,
-0.02508544921875,
-0.006893157958984375,
0.00753021240234375,
-0.01523590087890625,
0.0291595458984375,
0.0097198486328125,
0.00792694091796875,
-0.030426025390625,
-0.076416015625,
0.006862640380859375,
-0.06866455078125,
0.0333251953125,
0.046295166015625,
0.0004954338073730469,
-0.00893402099609375,
0.0186004638671875,
-0.01561737060546875,
-0.016387939453125,
0.047576904296875,
-0.048065185546875,
0.0270538330078125,
-0.018890380859375,
-0.0284881591796875,
-0.034881591796875,
0.005641937255859375,
-0.0164794921875,
-0.00481414794921875,
-0.015655517578125,
-0.0244903564453125,
-0.0364990234375,
-0.01123046875,
-0.05401611328125,
0.0316162109375,
0.01309967041015625,
-0.01412200927734375,
0.006641387939453125,
0.00017130374908447266,
0.01078033447265625,
-0.03619384765625,
0.0018472671508789062,
-0.0249786376953125,
-0.024566650390625,
-0.0272064208984375,
0.0223846435546875,
-0.00586700439453125,
-0.08349609375,
0.04412841796875,
-0.0004181861877441406,
-0.0404052734375,
0.0063934326171875,
-0.01544189453125,
-0.01873779296875,
0.026397705078125,
-0.07672119140625,
0.007568359375,
-0.047515869140625,
0.0278778076171875,
-0.041595458984375,
0.0168304443359375,
0.0179901123046875,
0.0030002593994140625,
-0.00015842914581298828,
-0.0016279220581054688,
-0.057098388671875,
-0.1015625,
-0.0128173828125,
-0.016326904296875,
0.046966552734375,
0.0260467529296875,
-0.01424407958984375,
-0.00200653076171875,
0.0673828125,
-0.0178985595703125,
-0.01435089111328125,
0.00789642333984375,
0.0150909423828125,
-0.0016508102416992188,
0.004619598388671875,
0.007312774658203125,
-0.01415252685546875,
-0.007633209228515625,
0.0019626617431640625,
-0.05340576171875,
0.0269012451171875,
-0.010162353515625,
0.0009965896606445312,
0.0204620361328125,
-0.034393310546875,
-0.03179931640625,
-0.041015625,
0.0135955810546875,
-0.01078033447265625,
-0.023345947265625,
0.00980377197265625,
-0.0111846923828125,
-0.0111236572265625,
-0.0125732421875,
-0.0511474609375,
-0.0191650390625,
0.036346435546875,
0.0199737548828125,
0.02374267578125,
0.00982666015625,
-0.0257568359375,
-0.01419830322265625,
0.022186279296875,
0.004261016845703125,
0.0531005859375,
0.032135009765625,
0.004314422607421875,
0.036834716796875,
0.00450897216796875,
0.02520751953125,
-0.00943756103515625,
0.047698974609375,
0.01922607421875,
0.011749267578125,
0.006778717041015625,
0.039825439453125,
-0.038330078125,
0.0308990478515625,
-0.01375579833984375,
-0.017730712890625,
0.0236663818359375,
0.01497650146484375,
-0.04095458984375,
0.033966064453125,
-0.004390716552734375,
-0.01055145263671875,
0.01175689697265625,
-0.0008525848388671875,
0.01013946533203125,
0.02764892578125,
-0.01152801513671875,
-0.009552001953125,
-0.0169830322265625,
0.00502777099609375,
-0.01776123046875,
-0.005847930908203125,
-0.012298583984375,
0.0141143798828125,
-0.005680084228515625,
0.0098724365234375,
-0.03021240234375,
0.017578125,
-0.036285400390625,
-0.004337310791015625,
-0.0186920166015625,
-0.03436279296875,
0.042144775390625,
-0.00658416748046875,
0.00780487060546875,
0.0153656005859375,
0.040618896484375,
0.0027980804443359375,
-0.019989013671875,
-0.0135650634765625,
0.01142120361328125,
-0.04620361328125,
-0.034576416015625,
0.0051422119140625,
-0.01490020751953125,
-0.005855560302734375,
-0.01190948486328125,
0.086181640625,
-0.035614013671875,
0.0345458984375,
0.00641632080078125,
-0.015899658203125,
0.046600341796875,
0.013214111328125,
0.035552978515625,
-0.01058197021484375,
-0.03546142578125,
0.0157470703125,
0.0234527587890625,
-0.059051513671875,
-0.0273590087890625,
-0.00931549072265625,
0.0224761962890625,
-0.0265350341796875,
-0.02789306640625,
0.057769775390625,
0.023162841796875,
-0.049530029296875,
0.07012939453125,
0.0290679931640625,
-0.0272369384765625,
-0.07440185546875,
-0.052459716796875,
0.055450439453125,
0.0252838134765625,
-0.0033130645751953125,
-0.01323699951171875,
0.0229034423828125,
0.0121002197265625,
0.0103607177734375,
-0.058837890625,
0.037841796875,
0.033782958984375,
-0.009735107421875,
-0.0299072265625,
0.01360321044921875,
-0.0184173583984375,
0.0185394287109375,
-0.032318115234375,
-0.0278167724609375,
0.030548095703125,
-0.037994384765625,
0.0226898193359375,
-0.050201416015625,
0.033477783203125,
-0.089599609375,
0.01123809814453125,
0.0154876708984375,
0.036041259765625,
-0.06048583984375,
0.01357269287109375,
-0.0333251953125,
-0.01477813720703125,
0.0190887451171875,
-0.016571044921875,
-0.039947509765625,
-0.035003662109375,
-0.0207672119140625,
0.0185546875,
-0.008514404296875,
0.02032470703125,
0.0168609619140625,
0.0288543701171875,
-0.01494598388671875,
0.048828125,
-0.01276397705078125,
0.047119140625,
0.0226898193359375,
0.01959228515625,
0.0263519287109375,
-0.0014467239379882812,
-0.0252532958984375,
-0.01385498046875,
-0.019744873046875,
-0.0567626953125,
0.0014858245849609375,
0.01007080078125,
0.021331787109375,
0.033203125,
0.0212860107421875,
0.0180816650390625,
-0.01116943359375,
0.000499725341796875,
0.001438140869140625,
-0.0294952392578125,
0.0426025390625,
-0.028045654296875,
-0.02374267578125,
0.0162353515625,
-0.03924560546875,
-0.05438232421875,
0.0087127685546875,
0.0175628662109375,
-0.0019817352294921875,
0.0046539306640625,
-0.042877197265625,
0.0142364501953125,
-0.04168701171875,
0.08514404296875,
0.10223388671875,
-0.033966064453125,
0.035003662109375,
0.0217437744140625,
-0.026641845703125,
0.0142822265625,
0.01983642578125,
0.004085540771484375,
-0.032470703125,
0.001094818115234375,
-0.0138397216796875,
-0.00313568115234375,
-0.01532745361328125,
-0.0144195556640625,
-0.00299072265625,
0.0206146240234375,
0.045013427734375,
-0.0030803680419921875,
-0.0188446044921875,
0.00820159912109375,
-0.0748291015625,
-0.0347900390625,
-0.0223541259765625,
0.023712158203125,
-0.03338623046875,
0.04425048828125,
0.0139312744140625,
-0.016021728515625,
-0.005374908447265625,
-0.0426025390625,
-0.0025577545166015625,
0.0199432373046875,
0.059722900390625,
0.0196380615234375,
-0.0223236083984375,
-0.021575927734375,
0.031646728515625,
-0.0005354881286621094,
-0.01255035400390625,
0.0166778564453125,
0.0013427734375,
-0.03271484375,
-0.06280517578125,
-0.011749267578125,
0.0022182464599609375,
-0.0091705322265625,
0.0225372314453125,
-0.01043701171875,
0.0015087127685546875,
0.0286102294921875,
-0.020355224609375,
0.0240325927734375,
-0.007137298583984375,
0.00955963134765625,
0.0003266334533691406,
-0.036895751953125,
0.0182342529296875,
-0.00362396240234375,
-0.0304412841796875,
0.0147552490234375,
-0.010711669921875,
-0.0404052734375,
-0.004169464111328125,
-0.05291748046875,
0.05499267578125,
-0.01129150390625,
-0.012115478515625,
0.0046844482421875,
0.004718780517578125,
0.0005769729614257812,
-0.00940704345703125,
0.05908203125,
-0.0806884765625,
-0.03839111328125,
0.0166015625,
-0.00801849365234375,
-0.0256805419921875,
-0.0131683349609375,
-0.0382080078125,
0.12109375,
-0.036529541015625,
-0.0010986328125,
0.051971435546875,
0.033935546875,
-0.0543212890625,
0.01361846923828125,
-0.0193939208984375,
-0.007320404052734375,
0.0236053466796875,
0.034088134765625,
-0.048248291015625,
-0.0190582275390625,
0.0048828125,
0.0699462890625,
0.028076171875,
0.0214691162109375,
-0.026580810546875,
0.009185791015625,
0.035552978515625,
0.0252838134765625,
-0.00839996337890625,
0.0249786376953125,
-0.022491455078125,
-0.0160675048828125,
-0.005161285400390625,
-0.0247039794921875,
0.034515380859375,
-0.055206298828125,
-0.0106964111328125,
-0.0007996559143066406,
-0.005397796630859375,
-0.04327392578125,
0.016357421875,
-0.02783203125,
-0.057373046875,
0.02203369140625,
0.025360107421875,
0.025146484375,
-0.024658203125,
0.04412841796875,
-0.00934600830078125,
-0.005428314208984375,
-0.0262298583984375,
-0.0307464599609375,
0.02362060546875,
-0.0039043426513671875,
0.0582275390625,
0.0438232421875,
0.027862548828125,
0.07244873046875,
0.007720947265625,
0.038360595703125,
0.0030059814453125,
0.0019063949584960938,
-0.01322174072265625,
0.0086517333984375,
0.007564544677734375,
-0.044403076171875,
0.01192474365234375,
0.0693359375,
0.03057861328125,
-0.0195770263671875,
-0.03619384765625,
-0.01045989990234375,
-0.007389068603515625,
0.01413726806640625,
0.008087158203125,
0.0245819091796875,
-0.019866943359375,
0.00954437255859375,
-0.0299530029296875,
-0.019195556640625,
0.039459228515625,
0.0340576171875,
0.0147247314453125,
0.000762939453125,
-0.0270843505859375,
-0.07159423828125,
-0.0018901824951171875,
-0.006103515625,
0.01265716552734375,
0.029754638671875,
-0.014190673828125,
0.0225830078125,
-0.031982421875,
0.006992340087890625,
-0.009033203125,
0.050384521484375,
0.0304107666015625,
-0.00916290283203125,
-0.020599365234375,
-0.039337158203125,
0.04046630859375,
0.01204681396484375,
-0.006740570068359375,
-0.0240020751953125,
-0.0037174224853515625,
-0.00344085693359375,
-0.049041748046875,
-0.0172576904296875,
0.0225372314453125,
-0.0182342529296875,
-0.062347412109375,
-0.0214385986328125,
-0.03192138671875,
0.02301025390625,
0.00490570068359375,
0.0280303955078125,
0.0307769775390625,
-0.0037097930908203125,
-0.00431060791015625,
0.029205322265625,
-0.003787994384765625,
0.014068603515625,
0.036224365234375,
-0.0290374755859375,
0.03033447265625,
0.0083465576171875,
-0.0849609375,
-0.02764892578125,
0.0006399154663085938,
-0.0102081298828125,
0.00855255126953125,
0.0328369140625,
0.011932373046875,
0.00295257568359375,
0.00940704345703125,
0.01496124267578125,
0.0086517333984375,
-0.021087646484375,
0.004840850830078125,
0.0154571533203125,
0.0301666259765625,
0.011871337890625,
0.007747650146484375,
-0.0027217864990234375,
0.0072479248046875,
0.01378631591796875,
0.029632568359375,
-0.004192352294921875,
0.0169830322265625,
0.02471923828125,
0.027008056640625,
-0.01898193359375,
0.021392822265625,
0.0022411346435546875,
0.0005855560302734375,
-0.0187530517578125,
0.0156707763671875,
-0.01104736328125,
0.035400390625,
0.0146331787109375,
0.01287841796875,
-0.04302978515625,
-0.0215911865234375,
-0.04290771484375,
0.0296630859375,
0.036468505859375,
0.036712646484375,
-0.01983642578125,
-0.0261688232421875,
-0.0251922607421875,
-0.0024814605712890625,
0.00994873046875,
0.034637451171875,
0.0291595458984375,
0.0013074874877929688,
0.005802154541015625,
-0.0174102783203125,
0.006805419921875,
0.0024204254150390625,
0.0009832382202148438,
0.019805908203125,
-0.0192413330078125,
-0.00875091552734375,
-0.0140533447265625,
-0.0263519287109375,
0.006328582763671875,
-0.0024166107177734375,
0.044525146484375,
-0.0291748046875,
0.04949951171875,
0.06646728515625,
0.0027904510498046875,
0.0181732177734375,
-0.0192108154296875,
-0.0277252197265625,
0.06768798828125,
0.0034809112548828125,
-0.029510498046875,
-0.01084136962890625,
-0.00940704345703125,
-0.0167694091796875,
-0.03668212890625,
-0.016204833984375,
-0.0072174072265625,
-0.0391845703125,
0.0238800048828125,
0.01617431640625,
0.036651611328125,
-0.022186279296875,
-0.0103759765625,
-0.0080413818359375,
-0.041168212890625,
0.062225341796875,
0.002254486083984375,
-0.0487060546875,
0.018035888671875,
0.05242919921875,
-0.01332855224609375,
-0.0305328369140625,
-0.039794921875,
-0.00594329833984375,
-0.0504150390625,
-0.01160430908203125,
-0.01494598388671875,
-0.003948211669921875,
0.00577545166015625,
-0.0154266357421875,
-0.01678466796875,
0.027496337890625,
0.009185791015625,
-0.0350341796875,
-0.002780914306640625,
0.011749267578125,
-0.01568603515625,
-0.074462890625,
0.0058135986328125,
-0.09954833984375,
0.00827789306640625,
-0.0255126953125,
0.01515960693359375,
0.01605224609375,
-0.03985595703125,
-0.0394287109375,
0.08270263671875,
-0.007373809814453125,
-0.010406494140625,
-0.0301666259765625,
0.0212860107421875,
0.01451873779296875,
-0.0006155967712402344,
0.005710601806640625,
0.0010938644409179688,
-0.0428466796875,
0.00014829635620117188,
0.03466796875,
-0.005199432373046875,
0.07781982421875,
0.0289764404296875,
-0.047271728515625,
-0.006710052490234375,
-0.0419921875,
0.003757476806640625,
-0.032257080078125,
0.0008983612060546875,
0.0157928466796875,
0.0226593017578125,
-0.022064208984375,
-0.0169677734375,
0.03662109375,
0.018280029296875,
-0.0088653564453125,
-0.0146331787109375,
-0.039031982421875,
-0.004528045654296875,
0.055755615234375,
0.0716552734375,
0.0234375,
-0.054229736328125,
-0.016510009765625,
-0.0058746337890625,
-0.05181884765625,
-0.0262298583984375,
0.0229644775390625,
-0.06597900390625,
-0.0236663818359375,
-0.022735595703125,
-0.0230560302734375,
0.0237274169921875,
-0.043212890625,
-0.050994873046875,
0.0083770751953125,
-0.038726806640625,
-0.0130157470703125,
-0.019073486328125,
-0.0223236083984375,
0.060211181640625,
-0.027801513671875,
-0.006633758544921875,
-0.019775390625,
0.0297393798828125,
0.00638580322265625,
-0.04412841796875,
-0.0041961669921875,
0.0002677440643310547,
-0.0038604736328125,
0.01084136962890625,
0.0154266357421875,
0.02899169921875,
0.0023956298828125,
-0.01500701904296875,
0.0167694091796875,
-0.01393890380859375,
-0.00919342041015625,
-0.007720947265625,
0.0440673828125,
-0.05706787109375,
-0.054046630859375,
-0.0010614395141601562,
-0.01806640625,
-0.0268402099609375,
-0.0309295654296875,
0.0168609619140625,
-0.01422119140625,
0.002414703369140625,
0.0008225440979003906,
-0.006084442138671875,
0.00919342041015625,
0.06488037109375,
-0.0095977783203125,
-0.0311279296875,
0.020263671875,
0.00469970703125,
0.0272369384765625,
0.00794219970703125
] |
f99866b07a5400b950e7ceda6e9be8126e7dbcca
|
Wordpress Stackexchange
Q: How to Get All Posts with any post status? I am creating a front end dashboard where I need to show all the posts by the current user. So, I need to show posts in all states, mainly published, trashed and the pending. I am now using a simple query but it is returning only the published posts.
$query = array(
'post_type' => 'my-post-type',
'post_author' => $current_user->ID
);
query_posts($query);
Can anyone help? What else do I need to do?
A: In most cases you can use get_posts() with 'any' parameter for this:
$posts = get_posts(
array(
'numberposts' => -1,
'post_status' => 'any',
'post_type' => 'my-post-type',
)
);
But this way you won't get posts with status trash and auto-draft. You need to provide them explicitly, like this:
$posts = get_posts(
array(
'numberposts' => -1,
'post_status' => 'any, trash, auto-draft',
'post_type' => 'my-post-type',
)
);
Or you can use get_post_stati() function to provide all existing statuses explicitly:
$posts = get_posts(
array(
'numberposts' => -1,
'post_status' => get_post_stati(),
'post_type' => 'my-post-type',
)
);
|
Q: How to Get All Posts with any post status? I am creating a front end dashboard where I need to show all the posts by the current user. So, I need to show posts in all states, mainly published, trashed and the pending. I am now using a simple query but it is returning only the published posts.
$query = array(
'post_type' => 'my-post-type',
'post_author' => $current_user->ID
);
query_posts($query);
Can anyone help? What else do I need to do?
A: In most cases you can use get_posts() with 'any' parameter for this:
$posts = get_posts(
array(
'numberposts' => -1,
'post_status' => 'any',
'post_type' => 'my-post-type',
)
);
But this way you won't get posts with status trash and auto-draft. You need to provide them explicitly, like this:
$posts = get_posts(
array(
'numberposts' => -1,
'post_status' => 'any, trash, auto-draft',
'post_type' => 'my-post-type',
)
);
Or you can use get_post_stati() function to provide all existing statuses explicitly:
$posts = get_posts(
array(
'numberposts' => -1,
'post_status' => get_post_stati(),
'post_type' => 'my-post-type',
)
);
A: The WP_Query class method ->query() accepts an any argument for post_status. See wp_get_associated_nav_menu_items() for a proof.
The same goes for get_posts() (which is just a wrapper for above call).
A: Even if you pass any as post_status, you still will not get the post in the result if all of the following conditions are true:
*
*A single post is being queried. An example of this would be querying by name, i.e. the slug.
*The post has a post status that is not public.
*The client does not have an active admin session, i.e. you are not currently logged in.
Solution
Query explicitly for every status. For example, to query for stati which are not trash or auto-draft (it's pretty unlikely that you want those), you could do something like this:
$q = new WP_Query([
/* ... */
'post_status' => array_values(get_post_stati(['exclude_from_search' => false])),
]);
A: There is simple way, how to get all posts with any status:
$articles = get_posts(
array(
'numberposts' => -1,
'post_status' => 'any',
'post_type' => get_post_types('', 'names'),
)
);
Now you can iterate throughout all posts:
foreach ($articles as $article) {
echo $article->ID . PHP_EOL; //...
}
A: You can use the post_status parameter:
* 'publish' - a published post or page
* 'pending' - post is pending review
* 'draft' - a post in draft status
* 'auto-draft' - a newly created post, with no content
* 'future' - a post to publish in the future
* 'private' - not visible to users who are not logged in
* 'inherit' - a revision. see get_children.
* 'trash' - post is in trashbin. added with Version 2.9.
I'm not sure that it accepts 'any' so use an array with all of the statuses you want:
$args = array(
'post_type' => 'my-post-type',
'post_author' => $current_user->ID,
'post_status' => array('publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', 'trash')
);
$query = new WP_Query($args);
while ( $query->have_posts() ) : $query->the_post();
A: Since I can't yet comment: $args['post_status']='any'; works for 'publish' and 'draft', but not for 'trash', I needed $args['post_status']=array('any','trash');
|
wordpress
|
{
"language": "en",
"length": 511,
"provenance": "stackexchange_00019.jsonl.gz:408212",
"question_score": "59",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13484"
}
|
[
0.091552734375,
0.0096588134765625,
0.0257568359375,
-0.0285491943359375,
0.02020263671875,
-0.03350830078125,
0.0548095703125,
-0.018707275390625,
0.0273895263671875,
0.01094818115234375,
-0.04248046875,
-0.00795745849609375,
-0.03271484375,
-0.0163726806640625,
-0.01470184326171875,
-0.042083740234375,
0.05194091796875,
-0.050262451171875,
0.050750732421875,
-0.004947662353515625,
0.0157928466796875,
0.01580810546875,
0.06878662109375,
0.02239990234375,
0.019134521484375,
-0.0073394775390625,
0.0196685791015625,
-0.0023136138916015625,
0.003215789794921875,
-0.0110321044921875,
0.00720977783203125,
0.009307861328125,
0.011383056640625,
-0.00482177734375,
0.0182037353515625,
0.031097412109375,
0.0207061767578125,
-0.00832366943359375,
0.021881103515625,
0.0089874267578125,
0.004302978515625,
0.00936126708984375,
0.0142364501953125,
0.006977081298828125,
-0.0225067138671875,
-0.0167694091796875,
0.00244903564453125,
-0.01806640625,
0.01450347900390625,
-0.011749267578125,
0.01873779296875,
-0.022613525390625,
0.040130615234375,
0.0260009765625,
-0.034881591796875,
-0.026092529296875,
0.019805908203125,
0.00839996337890625,
0.06634521484375,
-0.07208251953125,
-0.062744140625,
-0.030792236328125,
0.0499267578125,
-0.01224517822265625,
-0.019134521484375,
0.006565093994140625,
0.0186767578125,
-0.0015869140625,
-0.05682373046875,
-0.032440185546875,
0.032379150390625,
-0.037750244140625,
0.02105712890625,
0.01122283935546875,
-0.00669097900390625,
-0.058807373046875,
0.0032138824462890625,
-0.040496826171875,
0.0208282470703125,
0.007053375244140625,
0.01117706298828125,
0.0223236083984375,
-0.05621337890625,
-0.0115509033203125,
0.00556182861328125,
0.00555419921875,
-0.0157318115234375,
-0.022186279296875,
-0.0271148681640625,
-0.020904541015625,
-0.01393890380859375,
-0.054229736328125,
-0.0430908203125,
0.020538330078125,
0.02874755859375,
-0.048980712890625,
0.0269012451171875,
0.06817626953125,
-0.0250396728515625,
-0.0011625289916992188,
-0.03363037109375,
-0.022674560546875,
-0.01091766357421875,
-0.04254150390625,
0.0227813720703125,
0.01418304443359375,
-0.0149993896484375,
-0.00562286376953125,
0.040069580078125,
0.037353515625,
0.0004680156707763672,
0.0098419189453125,
-0.02685546875,
-0.003002166748046875,
-0.0228271484375,
0.0207366943359375,
-0.0570068359375,
0.0091094970703125,
-0.020111083984375,
0.012969970703125,
0.038909912109375,
0.061279296875,
-0.040740966796875,
-0.0208587646484375,
-0.016754150390625,
-0.0196533203125,
-0.00624847412109375,
-0.0301971435546875,
0.040069580078125,
0.035614013671875,
-0.033233642578125,
0.0023136138916015625,
0.012664794921875,
-0.0181121826171875,
-0.0169677734375,
-0.024932861328125,
0.0005578994750976562,
-0.06158447265625,
-0.0255889892578125,
0.03582763671875,
-0.0092315673828125,
-0.053558349609375,
-0.00390625,
-0.0005211830139160156,
-0.007213592529296875,
0.01666259765625,
0.037261962890625,
-0.0016803741455078125,
-0.024383544921875,
-0.0191497802734375,
-0.032562255859375,
0.035247802734375,
0.027557373046875,
0.0265350341796875,
-0.006000518798828125,
0.01404571533203125,
0.02459716796875,
-0.017333984375,
-0.02398681640625,
-0.024383544921875,
0.08953857421875,
-0.000217437744140625,
-0.0177764892578125,
0.001674652099609375,
-0.033416748046875,
-0.0206298828125,
-0.056915283203125,
-0.01508331298828125,
0.024017333984375,
-0.005260467529296875,
0.0004870891571044922,
0.020233154296875,
0.039794921875,
0.02972412109375,
0.007598876953125,
0.0120697021484375,
-0.032562255859375,
-0.0244140625,
0.035064697265625,
0.0027618408203125,
-0.03875732421875,
-0.038543701171875,
-0.0234832763671875,
0.0235137939453125,
-0.05615234375,
0.029022216796875,
0.0072021484375,
0.0242919921875,
0.00690460205078125,
0.002742767333984375,
0.056976318359375,
0.03778076171875,
-0.040985107421875,
0.0163421630859375,
-0.014862060546875,
-0.03533935546875,
-0.01442718505859375,
-0.0190887451171875,
-0.0179443359375,
0.036773681640625,
0.029998779296875,
-0.0153656005859375,
0.0133819580078125,
-0.0223846435546875,
-0.061065673828125,
-0.004222869873046875,
-0.0228118896484375,
0.03546142578125,
0.0021991729736328125,
0.032379150390625,
0.023284912109375,
0.01715087890625,
-0.046173095703125,
0.011871337890625,
-0.00788116455078125,
0.0037174224853515625,
-0.0146942138671875,
-0.03302001953125,
-0.017578125,
0.01561737060546875,
-0.03314208984375,
-0.00829315185546875,
-0.04742431640625,
0.029327392578125,
0.06121826171875,
-0.040771484375,
0.01467132568359375,
-0.030792236328125,
0.0557861328125,
0.005809783935546875,
-0.0225372314453125,
0.009979248046875,
0.004871368408203125,
0.00412750244140625,
-0.0255126953125,
0.00006502866744995117,
0.0211944580078125,
-0.04632568359375,
0.01345062255859375,
0.036590576171875,
0.013214111328125,
0.0009593963623046875,
-0.00998687744140625,
0.0184478759765625,
0.0249481201171875,
-0.0185546875,
0.0087738037109375,
0.01393890380859375,
0.02398681640625,
0.05560302734375,
0.0007004737854003906,
-0.0006537437438964844,
0.0227203369140625,
-0.0216827392578125,
0.0021686553955078125,
0.05487060546875,
0.0181427001953125,
0.039337158203125,
-0.049163818359375,
0.0292205810546875,
-0.005672454833984375,
-0.030303955078125,
-0.0287322998046875,
-0.0197906494140625,
0.036529541015625,
0.01641845703125,
0.02471923828125,
0.023468017578125,
-0.034088134765625,
0.01395416259765625,
0.00426483154296875,
-0.0259857177734375,
0.00849151611328125,
0.043975830078125,
-0.056427001953125,
0.003936767578125,
-0.0037479400634765625,
-0.000797271728515625,
-0.004390716552734375,
0.000518798828125,
-0.01983642578125,
0.007602691650390625,
0.00751495361328125,
-0.005313873291015625,
0.01482391357421875,
-0.0208282470703125,
0.01369476318359375,
-0.00991058349609375,
0.002277374267578125,
-0.0032672882080078125,
0.01557159423828125,
0.030853271484375,
-0.0182342529296875,
0.040496826171875,
0.004932403564453125,
-0.00847625732421875,
-0.006397247314453125,
-0.11383056640625,
0.05242919921875,
-0.042938232421875,
0.0611572265625,
0.1024169921875,
0.0231781005859375,
0.012115478515625,
-0.007293701171875,
-0.0036067962646484375,
0.0169830322265625,
-0.02728271484375,
-0.034393310546875,
-0.03839111328125,
0.0132904052734375,
0.0550537109375,
0.035003662109375,
0.06805419921875,
0.003971099853515625,
-0.023101806640625,
0.00844573974609375,
0.054229736328125,
-0.0474853515625,
-0.06488037109375,
0.0241546630859375,
-0.035308837890625,
-0.0291595458984375,
-0.04913330078125,
-0.0196075439453125,
0.0193328857421875,
-0.06610107421875,
-0.01265716552734375,
-0.00911712646484375,
0.03253173828125,
-0.0489501953125,
0.0030059814453125,
-0.059356689453125,
0.018096923828125,
-0.016021728515625,
0.02935791015625,
0.004329681396484375,
0.09832763671875,
0.0131988525390625,
-0.08917236328125,
-0.0196075439453125,
0.10491943359375,
-0.041412353515625,
0.006633758544921875,
-0.006000518798828125,
0.028350830078125,
0.0181427001953125,
0.00926971435546875,
-0.031219482421875,
0.02642822265625,
-0.0341796875,
-0.0094146728515625,
-0.0082244873046875,
0.0004544258117675781,
-0.0007967948913574219,
0.033721923828125,
0.01212310791015625,
0.0297088623046875,
0.04034423828125,
-0.0115966796875,
-0.0178070068359375,
0.0006237030029296875,
-0.037445068359375,
-0.0121002197265625,
0.0273895263671875,
-0.0188140869140625,
-0.01438140869140625,
-0.01549530029296875,
0.002105712890625,
0.015869140625,
0.01123809814453125,
-0.01085662841796875,
0.02490234375,
0.01031494140625,
0.00817108154296875,
-0.0066070556640625,
-0.0298919677734375,
-0.0181732177734375,
0.038299560546875,
-0.0182952880859375,
0.024017333984375,
-0.023193359375,
0.01222991943359375,
-0.048736572265625,
-0.034515380859375,
0.03582763671875,
-0.029022216796875,
-0.008331298828125,
-0.0274658203125,
-0.00518798828125,
-0.02264404296875,
0.05712890625,
-0.037200927734375,
-0.0168609619140625,
-0.041717529296875,
0.00966644287109375,
-0.039459228515625,
-0.0826416015625,
-0.0219879150390625,
0.004177093505859375,
-0.051666259765625,
-0.0124053955078125,
-0.03399658203125,
-0.01494598388671875,
0.0145416259765625,
-0.0439453125,
0.00046515464782714844,
-0.047637939453125,
0.0217132568359375,
-0.02618408203125,
0.00684356689453125,
-0.003238677978515625,
-0.005474090576171875,
-0.018035888671875,
0.007373809814453125,
-0.039306640625,
-0.043060302734375,
-0.0308990478515625,
0.0531005859375,
0.0198211669921875,
-0.010009765625,
-0.038360595703125,
0.03240966796875,
0.06195068359375,
0.0033168792724609375,
0.039794921875,
-0.016204833984375,
0.01751708984375,
-0.0194854736328125,
-0.01395416259765625,
-0.01117706298828125,
-0.0362548828125,
-0.033966064453125,
-0.032257080078125,
0.03466796875,
-0.0094757080078125,
-0.051025390625,
-0.020233154296875,
-0.0440673828125,
-0.0011606216430664062,
-0.037811279296875,
-0.0272674560546875,
0.011016845703125,
-0.00238037109375,
-0.031951904296875,
0.014007568359375,
-0.0228271484375,
-0.0042572021484375,
0.05657958984375,
0.058990478515625,
-0.032806396484375,
-0.0085296630859375,
0.04052734375,
0.006389617919921875,
-0.05712890625,
-0.036224365234375,
-0.0204010009765625,
0.0284271240234375,
-0.019378662109375,
0.032470703125,
0.0272979736328125,
-0.033050537109375,
0.033538818359375,
0.0202484130859375,
-0.0261688232421875,
0.015228271484375,
-0.01200103759765625,
0.0176239013671875,
-0.0274810791015625,
-0.01305389404296875,
-0.0017843246459960938,
0.03497314453125,
0.021270751953125,
-0.0208892822265625,
-0.0133056640625,
-0.004688262939453125,
0.05963134765625,
-0.0153656005859375,
0.03564453125,
-0.03936767578125,
-0.0341796875,
0.01261138916015625,
-0.0272979736328125,
0.004421234130859375,
0.0113983154296875,
0.0012331008911132812,
-0.00803375244140625,
-0.01134490966796875,
-0.004665374755859375,
0.005245208740234375,
0.05841064453125,
0.0164794921875,
0.0184173583984375,
0.04730224609375,
-0.0092315673828125,
-0.0428466796875,
-0.0084991455078125,
0.041748046875,
-0.0374755859375,
-0.08380126953125,
0.0247955322265625,
-0.0347900390625,
0.043182373046875,
0.046875,
-0.0253753662109375,
0.048431396484375,
0.07916259765625,
-0.0229644775390625,
-0.03057861328125,
-0.00737762451171875,
0.02947998046875,
-0.0654296875,
-0.007717132568359375,
0.0243682861328125,
-0.0196075439453125,
0.0096282958984375,
0.066162109375,
-0.006366729736328125,
0.045379638671875,
-0.021942138671875,
0.035308837890625,
-0.004093170166015625,
0.0151824951171875,
0.004741668701171875,
0.042938232421875,
0.0032958984375,
-0.005565643310546875,
0.004581451416015625,
-0.02734375,
0.03704833984375,
0.01486968994140625,
0.039794921875,
0.049530029296875,
-0.0186309814453125,
-0.002071380615234375,
-0.044097900390625,
-0.01013946533203125,
0.0750732421875,
0.05548095703125,
-0.03924560546875,
-0.02117919921875,
0.0159912109375,
0.04315185546875,
-0.0048828125,
-0.01412200927734375,
0.015655517578125,
-0.033203125,
0.02490234375,
-0.019073486328125,
0.0004558563232421875,
-0.01004791259765625,
-0.00901031494140625,
-0.03668212890625,
-0.04443359375,
-0.0037899017333984375,
-0.034881591796875,
0.0229034423828125,
-0.014739990234375,
-0.03863525390625,
0.0288543701171875,
-0.041748046875,
0.02655029296875,
-0.03759765625,
0.0141448974609375,
-0.0146942138671875,
0.0165557861328125,
0.025604248046875,
0.0304718017578125,
0.01165008544921875,
0.015106201171875,
-0.03778076171875,
-0.033355712890625,
0.024078369140625,
-0.0272674560546875,
-0.043365478515625,
-0.041717529296875,
0.038421630859375,
0.0310821533203125,
0.0190277099609375,
-0.04931640625,
-0.006748199462890625,
-0.028228759765625,
0.0201416015625,
0.03643798828125,
0.0057373046875,
0.06976318359375,
-0.0227508544921875,
0.07403564453125,
0.006069183349609375,
0.01036834716796875,
-0.061248779296875,
-0.0019664764404296875,
-0.004421234130859375,
-0.06842041015625,
-0.005321502685546875,
0.011871337890625,
-0.032958984375,
0.005657196044921875,
0.003993988037109375,
0.01226043701171875,
-0.0224761962890625,
0.00926971435546875,
0.01242828369140625,
-0.0196075439453125,
-0.0027484893798828125,
0.037322998046875,
0.0004200935363769531,
-0.0016069412231445312,
-0.004253387451171875,
-0.0130157470703125,
0.006381988525390625,
0.0185699462890625,
-0.037261962890625,
0.00012683868408203125,
-0.0300140380859375,
-0.0011854171752929688,
-0.033233642578125,
0.060302734375,
0.0799560546875,
0.0012750625610351562,
0.0194854736328125,
0.01690673828125,
-0.0018568038940429688,
-0.014739990234375,
-0.0018215179443359375,
0.037017822265625,
0.009857177734375,
0.06024169921875,
-0.00742340087890625,
-0.016998291015625,
0.0309906005859375,
-0.045166015625,
-0.006805419921875,
0.009552001953125,
0.0303802490234375,
-0.046417236328125,
0.0222320556640625,
0.023590087890625,
0.0199737548828125,
0.0379638671875,
-0.01004791259765625,
0.006435394287109375,
-0.0285797119140625,
0.0209808349609375,
-0.00609588623046875,
-0.0224456787109375,
-0.003314971923828125,
-0.018341064453125,
0.004093170166015625,
-0.006168365478515625,
0.0185699462890625,
-0.0168304443359375,
-0.060211181640625,
-0.01306915283203125,
0.035369873046875,
-0.01267242431640625,
-0.0086822509765625,
0.00862884521484375,
0.003910064697265625,
-0.01009368896484375,
-0.06195068359375,
-0.0004906654357910156,
-0.0219879150390625,
-0.0246429443359375,
0.016448974609375,
-0.00745391845703125,
0.006778717041015625,
0.0711669921875,
-0.032867431640625,
0.0338134765625,
0.043975830078125,
-0.0390625,
-0.06927490234375,
-0.0201416015625,
-0.012420654296875,
0.06024169921875,
0.012176513671875,
0.04144287109375,
0.004405975341796875,
-0.01364898681640625,
-0.026519775390625,
-0.057373046875,
0.0982666015625,
-0.0472412109375,
-0.006988525390625,
0.018524169921875,
0.03826904296875,
-0.005718231201171875,
0.006420135498046875,
0.01190948486328125,
-0.04534912109375,
-0.014434814453125,
0.0082855224609375,
-0.01126861572265625,
-0.0158538818359375,
0.00589752197265625,
-0.049102783203125,
0.047149658203125,
0.0016422271728515625,
0.019561767578125,
0.0271453857421875,
0.017852783203125,
-0.023895263671875,
-0.00732421875,
-0.06085205078125,
0.043670654296875,
0.004535675048828125,
0.0283966064453125,
-0.03851318359375,
-0.00531005859375,
-0.0157928466796875,
0.00402069091796875,
0.0694580078125,
0.00925445556640625,
-0.033843994140625,
-0.02972412109375,
0.04559326171875,
0.06158447265625,
0.012176513671875,
0.0209503173828125,
0.0104827880859375,
0.03753662109375,
0.0721435546875,
-0.056396484375,
0.0325927734375,
-0.003917694091796875,
0.01568603515625,
0.0230255126953125,
0.02471923828125,
0.0171661376953125,
-0.005840301513671875,
-0.0128631591796875,
-0.062347412109375,
0.0225830078125,
0.029327392578125,
0.026031494140625,
0.039947509765625,
0.025421142578125,
0.055206298828125,
-0.05059814453125,
-0.013885498046875,
-0.0279693603515625,
0.0455322265625,
0.015045166015625,
0.0160064697265625,
0.0215301513671875,
0.013336181640625,
0.052947998046875,
-0.0139007568359375,
0.006175994873046875,
0.0010833740234375,
0.0095062255859375,
0.042938232421875,
0.027862548828125,
0.01248931884765625,
-0.04461669921875,
-0.005199432373046875,
0.0413818359375,
0.048004150390625,
-0.041473388671875,
-0.04241943359375,
0.018707275390625,
0.0042266845703125,
0.00031685829162597656,
0.019866943359375,
0.0272369384765625,
-0.01084136962890625,
0.036590576171875,
-0.03448486328125,
-0.0199432373046875,
-0.0184326171875,
0.06640625,
-0.0110015869140625,
-0.033355712890625,
-0.0157318115234375,
-0.045166015625,
-0.052764892578125,
-0.01032257080078125,
0.0270843505859375,
0.040496826171875,
0.025543212890625,
0.043121337890625,
0.0179901123046875,
-0.01245880126953125,
0.002166748046875,
0.0216064453125,
0.015289306640625,
-0.01436614990234375,
-0.0007991790771484375,
-0.0273895263671875,
0.0169219970703125,
0.0167694091796875,
0.070556640625,
-0.053009033203125,
0.036773681640625,
0.0579833984375,
-0.0078125,
-0.0030879974365234375,
0.03570556640625,
0.0181884765625,
-0.0295867919921875,
-0.0215606689453125,
-0.035736083984375,
0.01042938232421875,
-0.0205841064453125,
0.032440185546875,
0.007595062255859375,
0.01837158203125,
-0.0034427642822265625,
0.04510498046875,
-0.0061798095703125,
-0.0039825439453125,
0.0198516845703125,
-0.00988006591796875,
0.0254669189453125,
0.0125732421875,
-0.053863525390625,
-0.019561767578125,
-0.0712890625,
0.0218505859375,
0.0198974609375,
0.0084686279296875,
0.004955291748046875,
0.0262908935546875,
-0.0067596435546875,
-0.027679443359375,
0.0204315185546875,
0.0036945343017578125,
0.0321044921875,
0.027374267578125,
-0.0025844573974609375,
0.00872802734375,
-0.0156402587890625,
-0.006267547607421875,
-0.0110626220703125,
0.025390625,
0.0119476318359375,
0.022125244140625,
0.00783538818359375,
0.0251007080078125,
-0.022918701171875,
0.051025390625,
-0.07525634765625,
-0.040924072265625,
0.03118896484375,
-0.0430908203125,
-0.006153106689453125,
0.01763916015625,
0.0027866363525390625,
0.036224365234375,
0.047882080078125,
-0.0211639404296875,
0.0193939208984375,
0.0012521743774414062,
0.00266265869140625,
-0.0308837890625,
-0.01094818115234375,
-0.023956298828125,
-0.0135040283203125,
-0.03350830078125,
-0.021942138671875,
0.034881591796875,
0.006145477294921875,
-0.0216064453125,
0.04345703125,
0.007373809814453125,
-0.047149658203125,
0.0391845703125,
-0.05584716796875,
0.061859130859375,
0.0316162109375,
-0.007083892822265625,
0.052398681640625,
0.00669097900390625,
-0.01338958740234375,
0.032257080078125,
0.011871337890625,
-0.003528594970703125,
-0.00235748291015625,
0.06951904296875,
-0.0255126953125,
-0.0109100341796875,
0.05047607421875,
0.005695343017578125,
0.0224609375,
-0.038665771484375,
0.01375579833984375,
-0.0091705322265625,
-0.0193939208984375,
-0.0163421630859375,
-0.020172119140625,
-0.0240020751953125,
-0.01087188720703125,
-0.0084991455078125,
-0.068359375,
0.00011402368545532227,
-0.032470703125,
0.0097808837890625,
-0.0182342529296875,
-0.01268768310546875,
-0.017333984375,
0.0009756088256835938,
0.0269012451171875,
-0.040374755859375,
-0.0157928466796875,
0.01214599609375,
0.027740478515625,
-0.01357269287109375,
0.01332855224609375,
-0.01953125,
-0.0104522705078125,
0.0155487060546875,
0.00197601318359375,
0.006473541259765625,
-0.0159912109375,
-0.045806884765625,
0.003955841064453125,
0.0010623931884765625,
0.036163330078125,
0.036956787109375,
-0.0028553009033203125,
0.00855255126953125,
-0.005298614501953125,
-0.035675048828125,
-0.084716796875,
0.03375244140625,
-0.1031494140625,
-0.030853271484375,
0.01421356201171875,
0.0063323974609375,
0.035980224609375,
-0.01137542724609375,
-0.03924560546875,
0.1112060546875,
-0.0190887451171875,
-0.01806640625,
-0.05938720703125,
0.0093994140625,
0.03759765625,
-0.042236328125,
-0.03106689453125,
-0.00995635986328125,
-0.059051513671875,
-0.0045166015625,
0.0032024383544921875,
0.0156097412109375,
0.0123443603515625,
0.0033702850341796875,
-0.0762939453125,
-0.00010704994201660156,
-0.0179901123046875,
0.0005044937133789062,
0.027252197265625,
-0.0229949951171875,
0.030914306640625,
0.04071044921875,
-0.0382080078125,
0.00028967857360839844,
-0.01131439208984375,
-0.004276275634765625,
-0.0135955810546875,
-0.006778717041015625,
-0.0386962890625,
-0.053131103515625,
0.07147216796875,
0.006519317626953125,
0.0230560302734375,
0.0203094482421875,
-0.0098419189453125,
-0.0260772705078125,
-0.0283050537109375,
-0.01222991943359375,
0.0306854248046875,
-0.0614013671875,
-0.0010671615600585938,
0.004364013671875,
-0.00226593017578125,
-0.0161590576171875,
-0.0192413330078125,
-0.0278778076171875,
-0.027923583984375,
-0.05029296875,
-0.023040771484375,
0.0159759521484375,
0.031585693359375,
-0.002361297607421875,
-0.0135498046875,
-0.023040771484375,
-0.011474609375,
-0.0147857666015625,
-0.03155517578125,
-0.0023593902587890625,
-0.019195556640625,
0.021942138671875,
-0.00223541259765625,
0.002750396728515625,
0.02325439453125,
0.0048675537109375,
0.017425537109375,
0.0179443359375,
-0.02691650390625,
0.00628662109375,
0.01361083984375,
-0.0072021484375,
-0.0178680419921875,
0.0286865234375,
0.0259246826171875,
0.044342041015625,
0.0106353759765625,
0.07666015625,
0.0152435302734375,
0.045562744140625,
0.006000518798828125,
-0.0435791015625,
0.03436279296875,
-0.046600341796875,
-0.0186920166015625,
-0.0081329345703125,
-0.0338134765625,
-0.061920166015625,
0.039031982421875,
0.0225372314453125,
0.00295257568359375,
0.0159454345703125
] |
47ecb07c0a31c1d123966313332fc2126ef2c9bf
|
Wordpress Stackexchange
Q: List all subcategories from category How can I get all subcategories from a certain category?
A: Yes, you can use get_categories() using 'child_of' attribute.
For example all sub categories of category with the ID of 17:
$args = array('child_of' => 17);
$categories = get_categories( $args );
foreach($categories as $category) {
echo '<p>Category: <a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </p> ';
echo '<p> Description:'. $category->description . '</p>';
echo '<p> Post Count: '. $category->count . '</p>';
}
This will get all categories that are descendants (i.e. children & grandchildren).
If you want to display only categories that are direct descendants (i.e. children only) you can use 'parent' attribute.
$args = array('parent' => 17);
$categories = get_categories( $args );
foreach($categories as $category) {
echo '<p>Category: <a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </p> ';
echo '<p> Description:'. $category->description . '</p>';
echo '<p> Post Count: '. $category->count . '</p>';
}
|
Q: List all subcategories from category How can I get all subcategories from a certain category?
A: Yes, you can use get_categories() using 'child_of' attribute.
For example all sub categories of category with the ID of 17:
$args = array('child_of' => 17);
$categories = get_categories( $args );
foreach($categories as $category) {
echo '<p>Category: <a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </p> ';
echo '<p> Description:'. $category->description . '</p>';
echo '<p> Post Count: '. $category->count . '</p>';
}
This will get all categories that are descendants (i.e. children & grandchildren).
If you want to display only categories that are direct descendants (i.e. children only) you can use 'parent' attribute.
$args = array('parent' => 17);
$categories = get_categories( $args );
foreach($categories as $category) {
echo '<p>Category: <a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </p> ';
echo '<p> Description:'. $category->description . '</p>';
echo '<p> Post Count: '. $category->count . '</p>';
}
A: For custom post types "categories" use get_terms().
(Altering @Bainternet's answer)
$categories = get_terms( array(
'taxonomy' => 'product_cat',
'hide_empty' => false,
'parent' => 17 // or
//'child_of' => 17 // to target not only direct children
) );
foreach($categories as $category) {
echo '<p>Category: <a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </p> ';
echo '<p> Description:'. $category->description . '</p>';
echo '<p> Post Count: '. $category->count . '</p>';
}
|
wordpress
|
{
"language": "en",
"length": 276,
"provenance": "stackexchange_00019.jsonl.gz:408213",
"question_score": "29",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13485"
}
|
[
0.061737060546875,
-0.0186309814453125,
-0.00679779052734375,
-0.06298828125,
0.02484130859375,
-0.036346435546875,
0.0489501953125,
0.00893402099609375,
-0.0123138427734375,
0.0162200927734375,
-0.02783203125,
-0.0157928466796875,
0.0012216567993164062,
-0.02972412109375,
0.003173828125,
-0.0418701171875,
0.026519775390625,
-0.024566650390625,
0.020721435546875,
0.0031108856201171875,
-0.00496673583984375,
0.036529541015625,
0.01462554931640625,
0.027679443359375,
0.01406097412109375,
-0.042236328125,
0.03961181640625,
-0.01531982421875,
-0.01385498046875,
-0.045440673828125,
0.0095367431640625,
0.04132080078125,
0.014190673828125,
-0.01340484619140625,
0.0406494140625,
0.024444580078125,
0.008697509765625,
-0.0088958740234375,
0.02154541015625,
0.0225677490234375,
0.037689208984375,
-0.01983642578125,
0.046722412109375,
-0.0033664703369140625,
0.011199951171875,
-0.01462554931640625,
0.021728515625,
-0.05078125,
0.0124969482421875,
-0.045440673828125,
0.03961181640625,
0.00849151611328125,
0.05706787109375,
-0.030242919921875,
-0.0252227783203125,
0.0025691986083984375,
0.0005655288696289062,
0.01043701171875,
0.06842041015625,
-0.030792236328125,
-0.06976318359375,
-0.043609619140625,
0.036651611328125,
-0.041656494140625,
-0.00666046142578125,
0.0177001953125,
0.01314544677734375,
-0.0119781494140625,
-0.016143798828125,
0.01468658447265625,
0.034698486328125,
-0.0235137939453125,
0.0086822509765625,
-0.019927978515625,
0.0157012939453125,
-0.034820556640625,
-0.01221466064453125,
-0.01006317138671875,
0.0145263671875,
0.0088043212890625,
0.01094818115234375,
0.005619049072265625,
-0.049072265625,
0.037689208984375,
-0.01108551025390625,
0.041412353515625,
-0.012969970703125,
-0.035675048828125,
-0.03314208984375,
-0.055389404296875,
-0.0164642333984375,
-0.01372528076171875,
-0.086181640625,
0.0154571533203125,
0.01071929931640625,
-0.033233642578125,
0.0244598388671875,
0.04876708984375,
-0.021270751953125,
-0.01117706298828125,
-0.033233642578125,
-0.011138916015625,
-0.02618408203125,
-0.0271453857421875,
0.0107879638671875,
0.024993896484375,
-0.0112457275390625,
0.004283905029296875,
0.054901123046875,
0.039215087890625,
0.0107574462890625,
0.05010986328125,
-0.01023101806640625,
-0.0167388916015625,
-0.00762176513671875,
0.039825439453125,
-0.028961181640625,
0.02423095703125,
-0.0014371871948242188,
0.023712158203125,
0.001064300537109375,
0.03265380859375,
0.01102447509765625,
-0.01873779296875,
-0.0040130615234375,
0.0087738037109375,
0.01348114013671875,
-0.0498046875,
0.00885772705078125,
-0.0093536376953125,
-0.047027587890625,
0.03656005859375,
0.039886474609375,
-0.002208709716796875,
-0.01013946533203125,
-0.00634002685546875,
-0.0132598876953125,
-0.007289886474609375,
-0.0025272369384765625,
0.000591278076171875,
0.0244140625,
-0.00566864013671875,
0.036956787109375,
-0.0017213821411132812,
0.0103302001953125,
-0.0089263916015625,
-0.00035262107849121094,
0.017852783203125,
0.016937255859375,
0.00887298583984375,
0.022552490234375,
-0.058197021484375,
0.033355712890625,
0.0012235641479492188,
-0.03912353515625,
-0.033782958984375,
-0.0005049705505371094,
-0.0306243896484375,
-0.00653076171875,
-0.05450439453125,
0.03472900390625,
0.015289306640625,
0.021240234375,
-0.00896453857421875,
-0.033447265625,
-0.00426483154296875,
-0.0623779296875,
-0.0179595947265625,
0.024261474609375,
0.010467529296875,
0.0193328857421875,
-0.0217742919921875,
0.0159454345703125,
0.0240325927734375,
0.01377105712890625,
0.032745361328125,
-0.0709228515625,
-0.017974853515625,
0.045928955078125,
0.0137939453125,
-0.023468017578125,
-0.03936767578125,
-0.031280517578125,
0.031982421875,
-0.036773681640625,
0.0294952392578125,
0.0007729530334472656,
0.049774169921875,
0.005405426025390625,
0.01027679443359375,
0.0149993896484375,
0.0227508544921875,
-0.06787109375,
0.0280303955078125,
-0.01064300537109375,
-0.0119476318359375,
-0.01137542724609375,
-0.0013704299926757812,
0.0005993843078613281,
-0.00968170166015625,
0.0308837890625,
-0.032318115234375,
0.01210784912109375,
0.0012378692626953125,
-0.0294189453125,
-0.0196380615234375,
0.0036525726318359375,
0.0013799667358398438,
0.0192108154296875,
0.035858154296875,
0.0016384124755859375,
-0.0015048980712890625,
-0.006610870361328125,
-0.05419921875,
-0.03375244140625,
0.0178680419921875,
0.016326904296875,
0.005519866943359375,
-0.001605987548828125,
-0.01548004150390625,
-0.00740814208984375,
-0.0006003379821777344,
-0.0051422119140625,
0.061920166015625,
0.054901123046875,
0.00925445556640625,
-0.0281524658203125,
-0.0228118896484375,
0.0015058517456054688,
0.03839111328125,
-0.132080078125,
0.0213470458984375,
0.06158447265625,
0.0487060546875,
-0.05194091796875,
0.0172271728515625,
-0.01422882080078125,
0.0152435302734375,
-0.0250701904296875,
0.036468505859375,
0.036529541015625,
-0.0099029541015625,
-0.03521728515625,
-0.05877685546875,
0.064697265625,
-0.057403564453125,
-0.0229339599609375,
-0.03485107421875,
-0.0200347900390625,
0.0149383544921875,
0.0235748291015625,
0.043182373046875,
0.010955810546875,
0.060699462890625,
0.018829345703125,
0.027679443359375,
0.0280914306640625,
-0.018951416015625,
-0.026611328125,
0.01364898681640625,
0.0206146240234375,
-0.036529541015625,
-0.07916259765625,
0.01113128662109375,
0.0377197265625,
0.00978851318359375,
0.0257568359375,
0.02020263671875,
-0.0227203369140625,
0.0142974853515625,
0.01102447509765625,
-0.0222320556640625,
-0.00785064697265625,
0.035247802734375,
0.00811004638671875,
-0.00899505615234375,
-0.04229736328125,
0.005298614501953125,
-0.00821685791015625,
0.005199432373046875,
0.022064208984375,
0.0740966796875,
0.0484619140625,
-0.002544403076171875,
-0.036865234375,
-0.04730224609375,
0.0179595947265625,
0.038909912109375,
-0.039825439453125,
0.024322509765625,
0.026611328125,
0.059417724609375,
0.01055908203125,
0.00447845458984375,
-0.02008056640625,
0.039276123046875,
-0.0054473876953125,
-0.043487548828125,
0.032928466796875,
-0.031524658203125,
0.025390625,
0.059356689453125,
0.005126953125,
-0.0035915374755859375,
-0.0012922286987304688,
-0.0457763671875,
-0.001094818115234375,
0.0114898681640625,
-0.01061248779296875,
-0.023681640625,
-0.050262451171875,
0.0186767578125,
0.01641845703125,
0.06622314453125,
0.00634002685546875,
-0.052337646484375,
0.018951416015625,
0.031890869140625,
-0.048309326171875,
-0.04827880859375,
-0.005718231201171875,
-0.0594482421875,
0.0089111328125,
-0.0038471221923828125,
-0.0272064208984375,
-0.0185699462890625,
0.01824951171875,
0.0168304443359375,
0.0295562744140625,
-0.0290679931640625,
-0.041748046875,
-0.01259613037109375,
-0.059722900390625,
0.012420654296875,
-0.0012941360473632812,
0.0145721435546875,
0.0088653564453125,
0.0662841796875,
0.0206756591796875,
-0.027862548828125,
0.0013189315795898438,
0.0767822265625,
-0.021331787109375,
-0.030364990234375,
0.0087738037109375,
-0.0150299072265625,
0.00004225969314575195,
0.0099334716796875,
0.0154266357421875,
0.0180511474609375,
-0.024993896484375,
-0.0009675025939941406,
0.01218414306640625,
0.048797607421875,
0.05023193359375,
-0.041259765625,
-0.02618408203125,
0.07244873046875,
0.022552490234375,
-0.0030269622802734375,
-0.0246429443359375,
-0.0181732177734375,
-0.03594970703125,
-0.0008254051208496094,
0.0119171142578125,
0.01084136962890625,
-0.006763458251953125,
-0.0006990432739257812,
-0.0047454833984375,
0.0052032470703125,
-0.00696563720703125,
-0.032440185546875,
0.027801513671875,
-0.004573822021484375,
0.0115509033203125,
0.0066375732421875,
0.004688262939453125,
-0.0309600830078125,
0.044097900390625,
0.00133514404296875,
0.00005799531936645508,
-0.022003173828125,
0.02813720703125,
-0.0274658203125,
-0.036834716796875,
0.030853271484375,
-0.035614013671875,
-0.002593994140625,
-0.0269012451171875,
-0.0013914108276367188,
-0.006587982177734375,
0.049957275390625,
-0.021453857421875,
-0.0322265625,
-0.0258026123046875,
0.006977081298828125,
-0.0034847259521484375,
-0.0206298828125,
0.006389617919921875,
-0.0106201171875,
-0.09136962890625,
-0.003635406494140625,
-0.0107269287109375,
-0.044769287109375,
-0.00102996826171875,
0.017974853515625,
-0.056884765625,
-0.026092529296875,
0.0222015380859375,
-0.002193450927734375,
0.00855255126953125,
-0.017974853515625,
0.0009946823120117188,
-0.006145477294921875,
-0.0157012939453125,
0.0042266845703125,
-0.04815673828125,
-0.0106201171875,
0.02069091796875,
0.00202178955078125,
-0.0217437744140625,
0.0028018951416015625,
-0.00714874267578125,
0.0491943359375,
0.025787353515625,
-0.0021381378173828125,
0.0200958251953125,
-0.0031833648681640625,
-0.059967041015625,
0.0272216796875,
0.021087646484375,
-0.028106689453125,
-0.0269317626953125,
-0.04058837890625,
0.0164031982421875,
0.0180206298828125,
-0.041107177734375,
0.0166778564453125,
-0.05511474609375,
0.00678253173828125,
-0.049468994140625,
-0.047210693359375,
-0.017333984375,
-0.0321044921875,
-0.021392822265625,
0.01139068603515625,
-0.02215576171875,
-0.045562744140625,
0.027130126953125,
0.037445068359375,
-0.0107574462890625,
0.0022678375244140625,
0.057708740234375,
0.0164794921875,
-0.0426025390625,
-0.035980224609375,
0.0004978179931640625,
0.022552490234375,
-0.051727294921875,
0.042144775390625,
0.01241302490234375,
-0.023834228515625,
0.0733642578125,
-0.017059326171875,
0.0491943359375,
0.00624847412109375,
0.02545166015625,
0.006916046142578125,
-0.01141357421875,
0.0093994140625,
0.01824951171875,
-0.023773193359375,
0.0230560302734375,
-0.0164947509765625,
-0.0163421630859375,
-0.032806396484375,
0.045196533203125,
0.026580810546875,
-0.0059967041015625,
-0.050445556640625,
-0.0038051605224609375,
0.0034046173095703125,
0.0241241455078125,
0.042388916015625,
0.0340576171875,
-0.00792694091796875,
0.0188751220703125,
0.029510498046875,
-0.005779266357421875,
0.0028095245361328125,
0.03521728515625,
0.005146026611328125,
0.0268402099609375,
-0.0282440185546875,
-0.01351165771484375,
-0.026519775390625,
0.002201080322265625,
-0.010711669921875,
-0.005832672119140625,
-0.019256591796875,
-0.0222930908203125,
0.0014095306396484375,
0.0240325927734375,
0.01375579833984375,
-0.0243988037109375,
0.02734375,
0.036590576171875,
0.004459381103515625,
0.006481170654296875,
-0.048095703125,
0.0190582275390625,
-0.0318603515625,
0.00273895263671875,
-0.0000730752944946289,
-0.0200042724609375,
0.005023956298828125,
0.059600830078125,
-0.01314544677734375,
0.035675048828125,
-0.01157379150390625,
0.01219940185546875,
0.0161285400390625,
0.035430908203125,
0.039276123046875,
-0.030029296875,
-0.0026493072509765625,
-0.0028438568115234375,
0.0151519775390625,
-0.0753173828125,
-0.00007551908493041992,
0.02947998046875,
0.06982421875,
0.035125732421875,
-0.04400634765625,
0.0026493072509765625,
-0.0186614990234375,
-0.0308685302734375,
0.01218414306640625,
-0.00337982177734375,
-0.00666046142578125,
-0.024383544921875,
-0.0087127685546875,
0.012786865234375,
0.03485107421875,
-0.02484130859375,
0.0272674560546875,
-0.04296875,
0.0207061767578125,
-0.0264739990234375,
-0.0007104873657226562,
0.0043487548828125,
0.0166015625,
-0.07855224609375,
-0.0443115234375,
0.0173797607421875,
-0.00909423828125,
-0.005496978759765625,
-0.0161285400390625,
-0.050048828125,
0.0306396484375,
-0.00013971328735351562,
0.07122802734375,
-0.04180908203125,
-0.0287017822265625,
0.00795745849609375,
-0.0227203369140625,
0.09088134765625,
0.057281494140625,
-0.061248779296875,
0.003948211669921875,
-0.05645751953125,
-0.00604248046875,
-0.01340484619140625,
-0.0606689453125,
-0.043212890625,
-0.021240234375,
-0.00539398193359375,
0.00090789794921875,
0.00439453125,
0.02362060546875,
-0.030487060546875,
0.01209259033203125,
0.009918212890625,
-0.016265869140625,
0.001377105712890625,
0.043365478515625,
-0.00738525390625,
0.008392333984375,
-0.00984954833984375,
-0.0058441162109375,
-0.0239105224609375,
0.004329681396484375,
-0.0132598876953125,
-0.038299560546875,
-0.0058135986328125,
0.02069091796875,
-0.029632568359375,
-0.0304412841796875,
0.02471923828125,
0.005096435546875,
-0.00775909423828125,
-0.006687164306640625,
-0.0023136138916015625,
-0.014373779296875,
0.005611419677734375,
0.0102386474609375,
-0.0024433135986328125,
0.0274505615234375,
-0.01027679443359375,
0.007381439208984375,
-0.01103973388671875,
-0.02459716796875,
0.0218963623046875,
-0.00164794921875,
0.0149383544921875,
0.01505279541015625,
-0.0037670135498046875,
0.0268707275390625,
0.061614990234375,
0.013153076171875,
0.0265655517578125,
0.035247802734375,
0.0201263427734375,
-0.031951904296875,
0.00833892822265625,
0.059722900390625,
0.0026683807373046875,
0.06329345703125,
-0.0083770751953125,
-0.005130767822265625,
0.02484130859375,
-0.0462646484375,
-0.054901123046875,
-0.0120391845703125,
-0.004367828369140625,
-0.006496429443359375,
-0.0029926300048828125,
0.00902557373046875,
0.00679779052734375,
-0.041595458984375,
0.0174713134765625,
-0.0465087890625,
-0.0195465087890625,
0.004665374755859375,
-0.033660888671875,
-0.0401611328125,
-0.004833221435546875,
0.019073486328125,
0.0129547119140625,
0.01181793212890625,
0.051727294921875,
0.02252197265625,
-0.003376007080078125,
-0.0259857177734375,
-0.0010099411010742188,
0.025146484375,
-0.047210693359375,
0.005672454833984375,
-0.01161956787109375,
0.00695037841796875,
-0.053131103515625,
0.032806396484375,
-0.0031108856201171875,
0.0200653076171875,
-0.001979827880859375,
-0.0211334228515625,
-0.0070953369140625,
0.044281005859375,
-0.0297698974609375,
0.028106689453125,
0.0240478515625,
-0.05963134765625,
0.018463134765625,
0.0095977783203125,
-0.041473388671875,
0.0272979736328125,
-0.01197052001953125,
-0.006656646728515625,
-0.0206298828125,
0.04449462890625,
-0.0107879638671875,
-0.016326904296875,
0.056365966796875,
-0.0362548828125,
-0.02520751953125,
0.0173187255859375,
0.042205810546875,
0.007694244384765625,
-0.00101470947265625,
0.0229644775390625,
-0.02203369140625,
0.005218505859375,
0.016845703125,
0.0309295654296875,
-0.00661468505859375,
0.01568603515625,
-0.0540771484375,
0.047149658203125,
-0.0350341796875,
0.00872039794921875,
0.0084686279296875,
0.017181396484375,
-0.0029010772705078125,
-0.001659393310546875,
-0.045379638671875,
0.054290771484375,
0.081787109375,
0.01003265380859375,
-0.0260772705078125,
-0.0298614501953125,
-0.0021839141845703125,
0.04510498046875,
0.044097900390625,
0.0035610198974609375,
-0.0294647216796875,
-0.007526397705078125,
0.0187835693359375,
0.052581787109375,
0.00012743473052978516,
0.0171051025390625,
-0.00201416015625,
-0.01377105712890625,
0.045135498046875,
-0.0201873779296875,
0.0297698974609375,
-0.0009918212890625,
0.0010099411010742188,
0.01354217529296875,
0.0129547119140625,
0.0227813720703125,
0.017181396484375,
-0.00635528564453125,
-0.001911163330078125,
-0.0010623931884765625,
-0.0026111602783203125,
-0.02618408203125,
0.0007658004760742188,
0.0712890625,
0.0528564453125,
-0.067138671875,
0.0137939453125,
-0.05120849609375,
0.0777587890625,
-0.006855010986328125,
0.005950927734375,
0.020233154296875,
0.0133819580078125,
0.08087158203125,
-0.0106201171875,
-0.01033782958984375,
0.01226043701171875,
0.0023860931396484375,
0.048095703125,
0.0213470458984375,
0.0197906494140625,
-0.046600341796875,
-0.033599853515625,
0.07012939453125,
0.06787109375,
-0.034881591796875,
-0.0731201171875,
0.02691650390625,
0.0289764404296875,
0.0185394287109375,
0.06390380859375,
0.05743408203125,
0.00897216796875,
0.08953857421875,
-0.051971435546875,
-0.0080718994140625,
0.03253173828125,
0.05926513671875,
0.01373291015625,
-0.01523590087890625,
-0.043304443359375,
-0.05743408203125,
-0.0226898193359375,
-0.01515960693359375,
0.022674560546875,
0.035491943359375,
0.026885986328125,
0.022003173828125,
-0.035675048828125,
-0.0177459716796875,
0.039031982421875,
-0.0166473388671875,
0.00452423095703125,
-0.051910400390625,
0.043243408203125,
-0.0136260986328125,
-0.0106353759765625,
0.0034236907958984375,
0.01171112060546875,
-0.0107421875,
0.047943115234375,
0.058441162109375,
-0.03375244140625,
-0.0262603759765625,
0.01568603515625,
-0.01195526123046875,
0.0038051605224609375,
-0.03790283203125,
0.01480865478515625,
0.0065765380859375,
-0.0123443603515625,
0.0139007568359375,
0.006610870361328125,
0.057586669921875,
0.0121307373046875,
0.033843994140625,
0.004863739013671875,
-0.0275115966796875,
0.040557861328125,
-0.02496337890625,
0.072265625,
0.0185699462890625,
-0.0927734375,
-0.0274810791015625,
-0.01053619384765625,
0.0013322830200195312,
0.039825439453125,
0.027313232421875,
-0.0263824462890625,
0.028564453125,
-0.00909423828125,
-0.04766845703125,
0.0248870849609375,
0.040679931640625,
-0.023712158203125,
-0.0081939697265625,
0.01122283935546875,
-0.0357666015625,
0.0182037353515625,
0.0121612548828125,
0.0275421142578125,
0.02215576171875,
0.04217529296875,
-0.01091766357421875,
0.0028705596923828125,
0.018829345703125,
-0.03021240234375,
0.05712890625,
-0.0855712890625,
-0.0484619140625,
0.0675048828125,
-0.019287109375,
-0.014892578125,
-0.006072998046875,
-0.025115966796875,
0.02825927734375,
0.02777099609375,
-0.0216217041015625,
0.015045166015625,
-0.0029315948486328125,
0.004924774169921875,
-0.018280029296875,
0.0115814208984375,
-0.007717132568359375,
-0.0220489501953125,
-0.035003662109375,
-0.0290069580078125,
0.044708251953125,
0.089111328125,
0.0214996337890625,
-0.007213592529296875,
-0.00164794921875,
-0.00992584228515625,
0.01494598388671875,
0.035797119140625,
0.014892578125,
0.0307769775390625,
-0.04638671875,
0.003910064697265625,
0.030609130859375,
-0.01091766357421875,
0.038848876953125,
0.01513671875,
-0.00014781951904296875,
0.031219482421875,
-0.036773681640625,
-0.0204925537109375,
0.07427978515625,
0.052032470703125,
-0.0322265625,
0.036041259765625,
0.0245513916015625,
-0.037109375,
0.015350341796875,
-0.04254150390625,
-0.040863037109375,
-0.05828857421875,
0.00531768798828125,
0.007320404052734375,
-0.0160675048828125,
-0.03839111328125,
-0.0197906494140625,
-0.01381683349609375,
0.0374755859375,
0.007724761962890625,
-0.01450347900390625,
0.0129547119140625,
-0.0207366943359375,
0.0160675048828125,
-0.0186309814453125,
-0.0166168212890625,
-0.007720947265625,
-0.0202178955078125,
-0.04388427734375,
0.0288238525390625,
-0.052703857421875,
-0.0206756591796875,
-0.01303863525390625,
0.0211029052734375,
0.01308441162109375,
-0.0426025390625,
-0.016815185546875,
0.044677734375,
0.052215576171875,
0.0733642578125,
0.054595947265625,
-0.01490020751953125,
-0.00579833984375,
0.03411865234375,
-0.046722412109375,
-0.0310516357421875,
0.0325927734375,
-0.0216827392578125,
-0.035430908203125,
-0.027252197265625,
0.035736083984375,
0.05328369140625,
-0.021881103515625,
-0.054168701171875,
0.1085205078125,
-0.0474853515625,
-0.0263519287109375,
-0.036407470703125,
0.01462554931640625,
-0.0164947509765625,
0.01422882080078125,
-0.00004863739013671875,
-0.0094146728515625,
-0.004276275634765625,
0.0294647216796875,
0.0386962890625,
0.0036945343017578125,
0.02105712890625,
0.0104827880859375,
-0.059906005859375,
0.0311126708984375,
0.01447296142578125,
0.027923583984375,
-0.01490020751953125,
0.00408172607421875,
0.0167388916015625,
0.028106689453125,
-0.034576416015625,
-0.00969696044921875,
-0.00756072998046875,
0.02069091796875,
0.02996826171875,
-0.020904541015625,
-0.0615234375,
-0.04083251953125,
0.01727294921875,
0.010040283203125,
0.01389312744140625,
0.00969696044921875,
-0.039520263671875,
-0.037109375,
-0.00989532470703125,
-0.0011434555053710938,
0.016357421875,
-0.044708251953125,
0.0261383056640625,
0.0174102783203125,
-0.0044097900390625,
0.0035610198974609375,
-0.0061492919921875,
-0.0302886962890625,
-0.020111083984375,
-0.02056884765625,
-0.0183258056640625,
-0.0205078125,
0.05767822265625,
-0.0211639404296875,
-0.0291290283203125,
-0.04571533203125,
-0.015167236328125,
-0.0298309326171875,
-0.0628662109375,
-0.0308685302734375,
-0.016937255859375,
0.0259857177734375,
-0.0136566162109375,
-0.0085601806640625,
0.0205078125,
0.0234222412109375,
0.00933074951171875,
0.01548004150390625,
-0.051025390625,
0.0097198486328125,
0.025238037109375,
-0.01242828369140625,
-0.03411865234375,
0.041900634765625,
0.05035400390625,
0.08258056640625,
0.0194091796875,
0.0132904052734375,
-0.00860595703125,
0.07879638671875,
-0.00020599365234375,
-0.052398681640625,
0.02227783203125,
-0.06793212890625,
-0.006702423095703125,
-0.0168609619140625,
-0.0423583984375,
-0.0379638671875,
0.028594970703125,
0.036468505859375,
-0.0391845703125,
0.032958984375
] |
af35d1fff9f5b9df0a0746f737f06b96f8a274b2
|
Wordpress Stackexchange
Q: Menu capability in Wordpress Is it possible to specify two usergroups (e.g. admins and editors) into the admin menu capability field ? I tried the following but it doesnt work:
add_submenu_page(
'my-top-level-handle',
'Page title',
'Sub-menu title',
array('administrator', 'editor'),
'my-submenu-handle',
'my_magic_function'
);
error message:
Warning: Illegal offset type in isset or empty in C:\wamp\www\wordpress\wp-includes\capabilities.php on line 712
A: Capability parameter of add_submenu_page() function can only take a single capability,
so if you are using the built in roles you can select a capability fro the long list that both administrators and editors have any of these
(use any of these freely):
*
*moderate_comments
*manage_categories
*manage_links
*unfiltered_html
*edit_others_posts
*edit_pages
*edit_others_pages
*edit_published_pages
*publish_pages
*delete_pages
*delete_others_pages
*delete_published_pages
*delete_others_posts
*delete_private_posts
*edit_private_posts
*read_private_posts
*delete_private_pages
*edit_private_pages
*read_private_pages
|
Q: Menu capability in Wordpress Is it possible to specify two usergroups (e.g. admins and editors) into the admin menu capability field ? I tried the following but it doesnt work:
add_submenu_page(
'my-top-level-handle',
'Page title',
'Sub-menu title',
array('administrator', 'editor'),
'my-submenu-handle',
'my_magic_function'
);
error message:
Warning: Illegal offset type in isset or empty in C:\wamp\www\wordpress\wp-includes\capabilities.php on line 712
A: Capability parameter of add_submenu_page() function can only take a single capability,
so if you are using the built in roles you can select a capability fro the long list that both administrators and editors have any of these
(use any of these freely):
*
*moderate_comments
*manage_categories
*manage_links
*unfiltered_html
*edit_others_posts
*edit_pages
*edit_others_pages
*edit_published_pages
*publish_pages
*delete_pages
*delete_others_pages
*delete_published_pages
*delete_others_posts
*delete_private_posts
*edit_private_posts
*read_private_posts
*delete_private_pages
*edit_private_pages
*read_private_pages
A: As t31os said, you can use capabilities instead of roles there. One way to do this is to use core capabilities. (A more advanced method is to add a custom capability to the roles of your choice.) The default caps are in wp-admin/includes/schema.php in the functions called by populate_roles().
If you are using standard roles/caps, you can specify only admins and editors by the cap level_7 or edit_others_posts or several others.
|
wordpress
|
{
"language": "en",
"length": 193,
"provenance": "stackexchange_00019.jsonl.gz:408214",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13493"
}
|
[
0.0670166015625,
-0.0083770751953125,
-0.0024566650390625,
-0.0092010498046875,
0.0154571533203125,
-0.05316162109375,
0.058868408203125,
-0.02923583984375,
-0.0089874267578125,
0.006923675537109375,
0.023956298828125,
-0.042083740234375,
-0.0152740478515625,
-0.047760009765625,
-0.01372528076171875,
-0.03759765625,
0.01081085205078125,
0.020416259765625,
0.0091094970703125,
-0.0139312744140625,
-0.00510406494140625,
0.004344940185546875,
-0.0181121826171875,
0.004638671875,
0.023223876953125,
-0.020721435546875,
-0.008880615234375,
-0.01453399658203125,
0.01194000244140625,
-0.0182037353515625,
0.01373291015625,
0.0258941650390625,
-0.002227783203125,
0.0003247261047363281,
0.0286865234375,
-0.006275177001953125,
-0.02484130859375,
0.016357421875,
0.01274871826171875,
-0.0014028549194335938,
-0.021331787109375,
0.0252838134765625,
-0.004241943359375,
0.044464111328125,
-0.032196044921875,
-0.0595703125,
0.00566864013671875,
-0.01375579833984375,
0.033843994140625,
-0.0235595703125,
0.005039215087890625,
0.0021190643310546875,
0.0120391845703125,
-0.022491455078125,
-0.008880615234375,
0.0234222412109375,
-0.002201080322265625,
-0.01268768310546875,
0.040618896484375,
0.0189208984375,
-0.0288238525390625,
-0.0166168212890625,
0.01336669921875,
-0.06036376953125,
-0.00543212890625,
0.01183319091796875,
0.02435302734375,
-0.008026123046875,
-0.044769287109375,
-0.0007410049438476562,
0.0158538818359375,
-0.03131103515625,
0.0181427001953125,
-0.01088714599609375,
0.003692626953125,
-0.02178955078125,
-0.0189361572265625,
-0.030120849609375,
0.033966064453125,
0.005390167236328125,
0.0173187255859375,
0.0019521713256835938,
-0.052642822265625,
0.0418701171875,
-0.0205535888671875,
0.04522705078125,
-0.004833221435546875,
-0.0293121337890625,
0.00894927978515625,
0.0248565673828125,
-0.0103912353515625,
-0.044586181640625,
0.06591796875,
0.05523681640625,
-0.024993896484375,
0.0022678375244140625,
0.04498291015625,
0.07354736328125,
-0.0016384124755859375,
0.00653839111328125,
0.02618408203125,
-0.055084228515625,
0.039886474609375,
-0.049072265625,
0.00806427001953125,
0.0213165283203125,
-0.01552581787109375,
-0.0009784698486328125,
0.032806396484375,
0.032684326171875,
-0.01568603515625,
-0.0084381103515625,
0.0184783935546875,
-0.060272216796875,
0.01248931884765625,
0.0075225830078125,
-0.0092926025390625,
0.029998779296875,
0.0305938720703125,
-0.02545166015625,
-0.0159149169921875,
0.01296234130859375,
-0.043914794921875,
0.01123046875,
-0.0186309814453125,
-0.0240936279296875,
0.013824462890625,
0.0185394287109375,
0.019256591796875,
0.0175018310546875,
-0.0499267578125,
0.0236663818359375,
0.07818603515625,
-0.007183074951171875,
-0.0019702911376953125,
-0.021636962890625,
-0.01450347900390625,
-0.0372314453125,
0.002201080322265625,
0.01367950439453125,
0.036224365234375,
-0.00576019287109375,
0.0293426513671875,
0.009429931640625,
-0.031951904296875,
0.0179595947265625,
0.0017490386962890625,
-0.00007838010787963867,
0.013641357421875,
-0.0390625,
-0.0228271484375,
-0.05767822265625,
0.0216064453125,
0.01551055908203125,
-0.045684814453125,
-0.01019287109375,
0.0031890869140625,
-0.025421142578125,
0.01136016845703125,
-0.044677734375,
0.0098114013671875,
-0.016082763671875,
0.03094482421875,
-0.04248046875,
-0.054840087890625,
0.0156707763671875,
-0.06658935546875,
-0.02337646484375,
0.0243682861328125,
-0.0285186767578125,
0.033172607421875,
-0.04925537109375,
0.0186920166015625,
0.0121307373046875,
0.0086517333984375,
0.0428466796875,
0.009368896484375,
0.03253173828125,
0.01496124267578125,
0.038421630859375,
0.0022602081298828125,
-0.042755126953125,
0.0694580078125,
-0.028594970703125,
-0.04290771484375,
0.0012331008911132812,
-0.00006008148193359375,
0.040740966796875,
0.026336669921875,
0.01031494140625,
0.026275634765625,
-0.0001544952392578125,
-0.0038127899169921875,
0.0014085769653320312,
0.00533294677734375,
-0.06658935546875,
0.006000518798828125,
-0.03546142578125,
-0.019256591796875,
0.03277587890625,
0.0245361328125,
-0.0021114349365234375,
-0.007904052734375,
-0.023773193359375,
-0.08868408203125,
0.0107879638671875,
-0.035675048828125,
0.03594970703125,
0.016387939453125,
-0.016387939453125,
-0.0127716064453125,
-0.04156494140625,
0.0255584716796875,
-0.07537841796875,
-0.06298828125,
-0.01387786865234375,
-0.0157470703125,
0.0650634765625,
0.0138702392578125,
0.054840087890625,
0.00467681884765625,
-0.02789306640625,
0.0188751220703125,
-0.00841522216796875,
0.037200927734375,
-0.002696990966796875,
0.003948211669921875,
-0.012115478515625,
0.063720703125,
0.0008654594421386719,
0.034515380859375,
-0.006755828857421875,
0.06341552734375,
0.0253143310546875,
-0.0251922607421875,
0.0173797607421875,
0.004695892333984375,
-0.07281494140625,
-0.0243377685546875,
0.05914306640625,
0.032379150390625,
0.017425537109375,
-0.0219879150390625,
-0.02618408203125,
0.0302886962890625,
-0.045684814453125,
0.007602691650390625,
-0.0182342529296875,
-0.042205810546875,
0.004299163818359375,
-0.0035610198974609375,
0.006420135498046875,
0.0284423828125,
0.0274505615234375,
-0.0070648193359375,
0.03594970703125,
-0.03900146484375,
-0.02191162109375,
0.034149169921875,
-0.03594970703125,
0.0207061767578125,
-0.049102783203125,
-0.0022792816162109375,
-0.01201629638671875,
0.031036376953125,
-0.0152587890625,
0.0238037109375,
0.007350921630859375,
-0.01337432861328125,
-0.0222625732421875,
0.036865234375,
0.0010862350463867188,
-0.00311279296875,
-0.009185791015625,
-0.0031566619873046875,
-0.00949859619140625,
-0.012237548828125,
0.003574371337890625,
0.01258087158203125,
-0.0181732177734375,
-0.01387786865234375,
0.03704833984375,
-0.029998779296875,
-0.01406097412109375,
-0.018218994140625,
-0.06195068359375,
-0.00493621826171875,
-0.00616455078125,
0.003154754638671875,
-0.044189453125,
-0.0027484893798828125,
-0.01474761962890625,
-0.048614501953125,
0.051483154296875,
-0.02374267578125,
-0.05255126953125,
0.0692138671875,
-0.040985107421875,
0.0262451171875,
-0.027252197265625,
0.06396484375,
0.050506591796875,
-0.010467529296875,
-0.0185546875,
0.01200103759765625,
-0.00893402099609375,
0.0008702278137207031,
0.049774169921875,
0.037750244140625,
-0.00754547119140625,
0.004241943359375,
0.08172607421875,
0.006649017333984375,
-0.03338623046875,
0.0026035308837890625,
-0.01476287841796875,
-0.015899658203125,
-0.0047760009765625,
-0.0179290771484375,
0.0259246826171875,
0.020782470703125,
-0.07867431640625,
0.004055023193359375,
0.0181732177734375,
-0.050811767578125,
-0.00716400146484375,
0.075439453125,
0.01291656494140625,
-0.05859375,
-0.0002149343490600586,
0.0002065896987915039,
-0.0012712478637695312,
-0.01021575927734375,
0.01113128662109375,
-0.0168914794921875,
0.0008482933044433594,
0.00101470947265625,
0.043304443359375,
-0.00942230224609375,
-0.056396484375,
-0.037109375,
-0.0188751220703125,
-0.01384735107421875,
-0.014129638671875,
0.04156494140625,
-0.02294921875,
0.006900787353515625,
0.0088958740234375,
0.0066375732421875,
0.02593994140625,
-0.0362548828125,
-0.0193939208984375,
-0.0267486572265625,
0.032867431640625,
0.0250701904296875,
-0.034820556640625,
0.00841522216796875,
0.057373046875,
0.006328582763671875,
-0.00616455078125,
0.002773284912109375,
-0.02862548828125,
-0.041900634765625,
-0.0161590576171875,
0.033905029296875,
0.004543304443359375,
-0.0227508544921875,
0.014892578125,
0.0035495758056640625,
0.03662109375,
-0.004241943359375,
0.0179443359375,
-0.04681396484375,
-0.0159454345703125,
-0.01385498046875,
0.0193939208984375,
0.029571533203125,
-0.01245880126953125,
0.032806396484375,
0.0083160400390625,
0.0073394775390625,
-0.0182952880859375,
0.0014247894287109375,
-0.03466796875,
-0.0501708984375,
0.03704833984375,
-0.035491943359375,
0.03704833984375,
-0.05926513671875,
-0.0110321044921875,
-0.0250244140625,
0.08795166015625,
-0.01245880126953125,
-0.0200653076171875,
-0.012176513671875,
0.018463134765625,
-0.0247650146484375,
-0.041748046875,
-0.0167999267578125,
-0.00316619873046875,
-0.02191162109375,
-0.01042938232421875,
-0.0011444091796875,
-0.0209808349609375,
-0.026214599609375,
-0.0025920867919921875,
-0.0181884765625,
-0.015960693359375,
0.040618896484375,
0.008453369140625,
-0.005260467529296875,
0.037841796875,
-0.00252532958984375,
-0.00698089599609375,
-0.03497314453125,
0.0124664306640625,
-0.091552734375,
-0.0223541259765625,
-0.0246429443359375,
0.0897216796875,
0.02239990234375,
-0.018218994140625,
-0.007320404052734375,
0.063232421875,
0.01224517822265625,
0.010986328125,
-0.007190704345703125,
-0.009735107421875,
0.0200347900390625,
-0.004528045654296875,
-0.0243988037109375,
-0.007450103759765625,
0.0234222412109375,
0.0022430419921875,
-0.0123138427734375,
-0.0252532958984375,
-0.050079345703125,
-0.0213470458984375,
-0.006744384765625,
-0.037750244140625,
-0.07220458984375,
-0.043670654296875,
-0.047332763671875,
-0.01413726806640625,
-0.0179595947265625,
-0.02655029296875,
-0.03546142578125,
-0.08074951171875,
0.0120391845703125,
-0.026702880859375,
-0.00958251953125,
0.0105438232421875,
0.0241851806640625,
0.0095367431640625,
-0.0107574462890625,
0.02142333984375,
-0.0221099853515625,
0.02923583984375,
-0.03546142578125,
0.039398193359375,
0.0499267578125,
-0.00406646728515625,
-0.0006122589111328125,
0.0011301040649414062,
0.026580810546875,
-0.03643798828125,
0.0175323486328125,
0.00524139404296875,
-0.0032062530517578125,
0.0131988525390625,
0.0006842613220214844,
0.0222320556640625,
0.0124359130859375,
-0.00949859619140625,
-0.00783538818359375,
-0.040771484375,
0.04486083984375,
0.0036468505859375,
0.0074920654296875,
-0.040191650390625,
0.0022678375244140625,
-0.004924774169921875,
-0.040924072265625,
0.042510986328125,
0.035308837890625,
0.0014162063598632812,
0.00614166259765625,
0.0294647216796875,
-0.021453857421875,
-0.00312042236328125,
0.033966064453125,
-0.003917694091796875,
0.026275634765625,
-0.01018524169921875,
-0.0261993408203125,
-0.0286407470703125,
-0.01038360595703125,
0.061981201171875,
-0.0016021728515625,
-0.04443359375,
-0.0041961669921875,
0.005725860595703125,
0.058013916015625,
0.016937255859375,
-0.0132598876953125,
0.01861572265625,
0.05810546875,
0.0090179443359375,
0.00775146484375,
-0.006313323974609375,
0.019561767578125,
-0.0180206298828125,
0.0172882080078125,
-0.0023441314697265625,
-0.0012636184692382812,
-0.00460052490234375,
0.0445556640625,
0.003398895263671875,
0.00905609130859375,
-0.00811767578125,
0.055816650390625,
0.055572509765625,
-0.019622802734375,
0.00315093994140625,
0.039306640625,
-0.019622802734375,
-0.021087646484375,
0.00815582275390625,
-0.0233306884765625,
-0.023406982421875,
0.0545654296875,
0.0011205673217773438,
0.050689697265625,
0.0312042236328125,
-0.036590576171875,
0.037261962890625,
-0.0321044921875,
0.0087738037109375,
0.00722503662109375,
-0.06884765625,
0.0128173828125,
0.059722900390625,
-0.0123291015625,
-0.0165557861328125,
-0.024261474609375,
0.013458251953125,
-0.01456451416015625,
0.01702880859375,
-0.01885986328125,
-0.0243072509765625,
0.005916595458984375,
0.01073455810546875,
-0.00616455078125,
0.0180511474609375,
0.03253173828125,
-0.0826416015625,
-0.04791259765625,
-0.0113677978515625,
-0.0004544258117675781,
0.037139892578125,
0.0081939697265625,
-0.00887298583984375,
-0.03411865234375,
0.01214599609375,
-0.052734375,
-0.0251617431640625,
0.07696533203125,
0.032440185546875,
-0.01541900634765625,
-0.0010395050048828125,
-0.024810791015625,
-0.01556396484375,
-0.03155517578125,
-0.037384033203125,
-0.03375244140625,
-0.004512786865234375,
0.00205230712890625,
-0.00811004638671875,
-0.00745391845703125,
-0.0207977294921875,
-0.05548095703125,
0.041107177734375,
0.06329345703125,
0.020233154296875,
-0.0010128021240234375,
0.07391357421875,
-0.0078582763671875,
0.03851318359375,
0.01568603515625,
0.04608154296875,
-0.0232696533203125,
-0.002727508544921875,
0.01078033447265625,
-0.0240325927734375,
-0.0265045166015625,
-0.061187744140625,
-0.005908966064453125,
0.034515380859375,
0.06964111328125,
-0.0018062591552734375,
0.0266571044921875,
-0.01058197021484375,
0.00341033935546875,
-0.0200347900390625,
0.0271453857421875,
-0.0245361328125,
0.004718780517578125,
0.00814056396484375,
-0.034881591796875,
0.060394287109375,
-0.004093170166015625,
-0.0117034912109375,
0.03936767578125,
-0.050048828125,
0.049041748046875,
0.034515380859375,
-0.03973388671875,
0.038543701171875,
0.06494140625,
0.002349853515625,
0.055633544921875,
0.02423095703125,
0.0296783447265625,
0.047149658203125,
-0.03680419921875,
0.01039886474609375,
0.047821044921875,
-0.0098724365234375,
-0.03936767578125,
0.0263671875,
-0.0196533203125,
-0.00852203369140625,
0.0237579345703125,
0.07269287109375,
0.093505859375,
-0.09381103515625,
0.018585205078125,
0.040069580078125,
-0.0247802734375,
0.016632080078125,
-0.018646240234375,
0.0037326812744140625,
-0.01503753662109375,
0.0645751953125,
-0.037933349609375,
-0.014984130859375,
0.01202392578125,
-0.035186767578125,
-0.01522064208984375,
-0.0048828125,
0.0204925537109375,
0.0191802978515625,
0.05419921875,
-0.00490570068359375,
-0.0269012451171875,
0.04278564453125,
0.0146331787109375,
0.02020263671875,
-0.00868988037109375,
-0.01611328125,
-0.03466796875,
-0.0138092041015625,
-0.0178680419921875,
-0.035064697265625,
0.0212554931640625,
-0.0007348060607910156,
0.0120086669921875,
0.04095458984375,
-0.01678466796875,
0.0167694091796875,
0.0198974609375,
-0.033599853515625,
-0.032867431640625,
-0.0192413330078125,
0.01812744140625,
0.01001739501953125,
-0.01056671142578125,
0.022430419921875,
-0.0162353515625,
-0.03619384765625,
-0.0128326416015625,
0.00772857666015625,
0.048614501953125,
-0.0038700103759765625,
-0.04315185546875,
0.03662109375,
0.0228729248046875,
-0.0178985595703125,
0.022369384765625,
0.00672149658203125,
-0.04150390625,
-0.035064697265625,
0.013458251953125,
-0.055389404296875,
0.003902435302734375,
0.0234527587890625,
-0.052703857421875,
0.0914306640625,
-0.03271484375,
0.037353515625,
0.038482666015625,
0.02410888671875,
-0.033294677734375,
0.0116119384765625,
-0.01500701904296875,
0.0587158203125,
0.0157012939453125,
0.009918212890625,
0.0004930496215820312,
-0.0064239501953125,
0.004772186279296875,
0.01557159423828125,
0.0270538330078125,
0.0200042724609375,
-0.018707275390625,
0.0029582977294921875,
0.0269775390625,
-0.0069732666015625,
-0.01110076904296875,
0.0455322265625,
0.01505279541015625,
-0.005519866943359375,
0.01454925537109375,
-0.04998779296875,
0.01910400390625,
-0.06231689453125,
0.00487518310546875,
0.01523590087890625,
0.001129150390625,
0.01207733154296875,
-0.021759033203125,
0.006988525390625,
-0.0213470458984375,
-0.0180511474609375,
0.0075836181640625,
-0.0209197998046875,
-0.023956298828125,
0.0131683349609375,
0.006069183349609375,
-0.040283203125,
-0.01511383056640625,
-0.032958984375,
0.02716064453125,
0.035919189453125,
0.01561737060546875,
0.029754638671875,
0.037353515625,
-0.0266876220703125,
-0.00933837890625,
0.0106658935546875,
0.0173492431640625,
-0.0352783203125,
0.0211181640625,
0.00038170814514160156,
0.0252685546875,
-0.044525146484375,
0.0206756591796875,
0.0355224609375,
0.0321044921875,
-0.04425048828125,
-0.0552978515625,
0.000377655029296875,
0.0087432861328125,
0.01383209228515625,
0.036834716796875,
0.0243988037109375,
0.0570068359375,
0.08819580078125,
-0.0186767578125,
0.0006108283996582031,
0.03302001953125,
-0.0013093948364257812,
0.0048828125,
0.01190185546875,
-0.0025844573974609375,
0.01477813720703125,
-0.03436279296875,
0.0006809234619140625,
0.0191802978515625,
0.03192138671875,
0.01317596435546875,
0.017425537109375,
0.021087646484375,
-0.00952911376953125,
0.0106048583984375,
-0.01396942138671875,
-0.0084228515625,
-0.01239776611328125,
-0.06329345703125,
-0.08319091796875,
0.050933837890625,
0.0579833984375,
-0.027252197265625,
0.024688720703125,
-0.004550933837890625,
-0.008880615234375,
-0.027587890625,
-0.0083770751953125,
0.0352783203125,
-0.031341552734375,
-0.035186767578125,
-0.0233612060546875,
-0.019256591796875,
0.01108551025390625,
0.0011854171752929688,
-0.0148773193359375,
0.00714111328125,
0.0191497802734375,
0.045928955078125,
-0.0562744140625,
0.017791748046875,
-0.00908660888671875,
0.0264739990234375,
0.00463104248046875,
-0.04241943359375,
0.03472900390625,
-0.12158203125,
-0.0106353759765625,
-0.03466796875,
-0.048126220703125,
0.045684814453125,
0.05035400390625,
-0.032562255859375,
0.017059326171875,
0.0347900390625,
-0.01241302490234375,
0.0117950439453125,
0.0197906494140625,
0.004131317138671875,
0.0307464599609375,
0.040802001953125,
0.0208892822265625,
-0.0113677978515625,
-0.0072174072265625,
-0.0182647705078125,
0.04168701171875,
0.018951416015625,
0.060546875,
-0.0347900390625,
0.033447265625,
-0.049896240234375,
0.037994384765625,
-0.07220458984375,
-0.0609130859375,
0.031280517578125,
0.01593017578125,
-0.010406494140625,
0.0084381103515625,
-0.00960540771484375,
0.037567138671875,
0.01378631591796875,
-0.04437255859375,
0.007465362548828125,
0.01177215576171875,
-0.0026264190673828125,
-0.007350921630859375,
-0.007480621337890625,
-0.02093505859375,
-0.007205963134765625,
-0.027069091796875,
-0.0081787109375,
0.02825927734375,
0.0251922607421875,
-0.01203155517578125,
0.00626373291015625,
-0.007213592529296875,
-0.0166015625,
0.006500244140625,
0.00911712646484375,
-0.00934600830078125,
0.01468658447265625,
-0.021514892578125,
0.0009870529174804688,
0.0195159912109375,
-0.0027217864990234375,
0.0069427490234375,
0.0258026123046875,
-0.0102081298828125,
0.046905517578125,
-0.0231170654296875,
0.033203125,
-0.01465606689453125,
0.036285400390625,
-0.035003662109375,
0.0009298324584960938,
-0.0062408447265625,
0.01617431640625,
0.004367828369140625,
-0.006519317626953125,
-0.0259857177734375,
-0.03326416015625,
-0.00787353515625,
0.0166168212890625,
-0.034423828125,
-0.0399169921875,
-0.09197998046875,
0.003391265869140625,
0.0220184326171875,
0.040496826171875,
-0.09796142578125,
0.081787109375,
0.01154327392578125,
0.0234527587890625,
-0.01119232177734375,
-0.00603485107421875,
-0.0156707763671875,
-0.0179901123046875,
-0.045135498046875,
-0.0019989013671875,
-0.05438232421875,
0.004245758056640625,
-0.02960205078125,
0.042572021484375,
0.06842041015625,
-0.040191650390625,
-0.039215087890625,
0.05828857421875,
0.0309600830078125,
0.089111328125,
-0.00392913818359375,
-0.0103912353515625,
-0.02716064453125,
0.0196380615234375,
-0.0034847259521484375,
-0.05352783203125,
-0.005664825439453125,
-0.0310821533203125,
-0.0176849365234375,
0.0093994140625,
0.014129638671875,
0.03887939453125,
-0.0210723876953125,
-0.04315185546875,
0.03741455078125,
0.005069732666015625,
-0.0303497314453125,
-0.004032135009765625,
0.01165771484375,
-0.0272979736328125,
0.0352783203125,
0.01241302490234375,
-0.0234832763671875,
0.02532958984375,
0.0166015625,
0.00576019287109375,
0.015777587890625,
0.0143585205078125,
0.03033447265625,
-0.0015840530395507812,
0.0216064453125,
0.00348663330078125,
-0.039520263671875,
0.03155517578125,
-0.031829833984375,
0.028564453125,
0.04058837890625,
-0.0237274169921875,
-0.06280517578125,
-0.00670623779296875,
-0.004589080810546875,
-0.0209503173828125,
-0.018310546875,
-0.01085662841796875,
-0.0070648193359375,
0.06829833984375,
0.041046142578125,
0.0195465087890625,
-0.0238189697265625,
0.01082611083984375,
-0.06939697265625,
-0.00954437255859375,
0.005649566650390625,
-0.0054931640625,
-0.0269775390625,
0.032073974609375,
0.0261688232421875,
-0.0215606689453125,
-0.021331787109375,
0.01104736328125,
-0.027679443359375,
-0.0015201568603515625,
0.021331787109375,
0.00495147705078125,
-0.0211944580078125,
0.007720947265625,
0.040069580078125,
-0.05230712890625,
-0.0780029296875,
0.001934051513671875,
0.0015935897827148438,
-0.04132080078125,
-0.045928955078125,
-0.03118896484375,
-0.040374755859375,
-0.032012939453125,
0.020111083984375,
-0.032379150390625,
0.0623779296875,
-0.04608154296875,
-0.014892578125,
0.0012044906616210938,
0.0180511474609375,
-0.01209259033203125,
0.0177459716796875,
0.01142120361328125,
0.051544189453125,
-0.00034499168395996094,
0.0311126708984375,
-0.007289886474609375,
0.061614990234375,
-0.02166748046875,
0.049224853515625,
0.03692626953125,
-0.025115966796875,
0.057708740234375,
0.0002999305725097656,
-0.004619598388671875,
0.00901031494140625,
-0.017822265625,
-0.06390380859375,
0.058135986328125,
0.07501220703125,
0.0154266357421875,
0.0262603759765625
] |
43c615cfe4df332fe9b0388c922c9d44fea0bda0
|
Wordpress Stackexchange
Q: How to override WP_DEBUG for Ajax responses? It is highly recommended practice (that I completely agree with) to develop with WP_DEBUG enabled. However it is merely inconvenient to see not yet fixed warnings in pages, but in Ajax responses they ruin response completely.
I am just starting with Ajax in WP, is there some appropriate hook to suppress errors for Ajax responses only?
PS fix everything is not viable option at moment, because it is extremely extensive and complex environment :)
A: In wp-config.php:
if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
define( 'WP_DEBUG', false );
else
define( 'WP_DEBUG', true );
|
Q: How to override WP_DEBUG for Ajax responses? It is highly recommended practice (that I completely agree with) to develop with WP_DEBUG enabled. However it is merely inconvenient to see not yet fixed warnings in pages, but in Ajax responses they ruin response completely.
I am just starting with Ajax in WP, is there some appropriate hook to suppress errors for Ajax responses only?
PS fix everything is not viable option at moment, because it is extremely extensive and complex environment :)
A: In wp-config.php:
if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
define( 'WP_DEBUG', false );
else
define( 'WP_DEBUG', true );
|
wordpress
|
{
"language": "en",
"length": 102,
"provenance": "stackexchange_00019.jsonl.gz:408219",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13509"
}
|
[
0.102294921875,
-0.00864410400390625,
-0.0214691162109375,
-0.053955078125,
0.00988006591796875,
-0.044769287109375,
0.045257568359375,
0.0036525726318359375,
0.031951904296875,
0.0167694091796875,
-0.020660400390625,
-0.0123443603515625,
0.004241943359375,
-0.00922393798828125,
-0.0260467529296875,
-0.028961181640625,
0.037994384765625,
-0.0134735107421875,
0.0153961181640625,
-0.004291534423828125,
-0.00666046142578125,
0.00942230224609375,
0.00010126829147338867,
0.06829833984375,
-0.0023365020751953125,
0.007495880126953125,
0.029296875,
-0.01861572265625,
0.01007080078125,
-0.0032787322998046875,
0.00458526611328125,
-0.0102386474609375,
0.034759521484375,
0.072998046875,
-0.11981201171875,
0.005634307861328125,
0.00783538818359375,
0.00829315185546875,
-0.018768310546875,
0.03546142578125,
0.045013427734375,
-0.0219268798828125,
0.056121826171875,
-0.01465606689453125,
0.01338958740234375,
-0.011993408203125,
0.046875,
-0.05157470703125,
0.0197906494140625,
-0.005992889404296875,
0.0272064208984375,
-0.003643035888671875,
0.043243408203125,
0.001983642578125,
-0.043182373046875,
-0.0274505615234375,
-0.046417236328125,
0.032958984375,
0.036224365234375,
0.04681396484375,
-0.002605438232421875,
-0.031494140625,
-0.004169464111328125,
-0.06640625,
0.03814697265625,
-0.0201416015625,
0.006683349609375,
0.039947509765625,
-0.0123138427734375,
0.041046142578125,
0.037841796875,
-0.0264434814453125,
-0.0229949951171875,
0.006561279296875,
0.00034618377685546875,
-0.021820068359375,
0.01666259765625,
-0.00756072998046875,
-0.00250244140625,
0.038665771484375,
0.0579833984375,
-0.030517578125,
0.0084381103515625,
0.0158843994140625,
-0.0019741058349609375,
0.01177978515625,
0.00772857666015625,
-0.0155029296875,
-0.033721923828125,
-0.0255126953125,
-0.0272216796875,
-0.06451416015625,
-0.046966552734375,
0.00283050537109375,
0.01531982421875,
-0.036163330078125,
0.0126953125,
-0.005893707275390625,
-0.014434814453125,
-0.032501220703125,
0.0192108154296875,
-0.0255126953125,
-0.01348114013671875,
0.01087188720703125,
-0.003047943115234375,
0.01181793212890625,
0.004764556884765625,
-0.00392913818359375,
0.0256805419921875,
0.03509521484375,
-0.01519775390625,
0.0260467529296875,
0.0008778572082519531,
-0.00701141357421875,
-0.021636962890625,
0.0009760856628417969,
-0.0288543701171875,
0.01308441162109375,
-0.00583648681640625,
0.00679779052734375,
0.0212249755859375,
0.0265045166015625,
-0.0146026611328125,
0.0102691650390625,
-0.0138092041015625,
-0.003997802734375,
-0.005870819091796875,
-0.0308685302734375,
0.0175018310546875,
0.01082611083984375,
-0.03131103515625,
-0.004505157470703125,
0.03582763671875,
0.047119140625,
0.03155517578125,
-0.0189361572265625,
0.06256103515625,
-0.00800323486328125,
-0.0027446746826171875,
0.034820556640625,
-0.01568603515625,
-0.03143310546875,
-0.01390838623046875,
0.0013799667358398438,
-0.01263427734375,
-0.01540374755859375,
0.00954437255859375,
0.0300445556640625,
0.0028972625732421875,
-0.00786590576171875,
-0.004863739013671875,
0.001186370849609375,
0.007106781005859375,
0.033935546875,
0.04095458984375,
-0.0108795166015625,
0.07244873046875,
-0.050018310546875,
0.0124053955078125,
-0.043975830078125,
-0.033050537109375,
-0.0010280609130859375,
0.016357421875,
-0.00922393798828125,
-0.007720947265625,
0.007770538330078125,
0.01325225830078125,
0.01300048828125,
0.0211334228515625,
0.0982666015625,
0.0138092041015625,
0.0111846923828125,
-0.01036834716796875,
-0.01348114013671875,
-0.0272979736328125,
-0.04388427734375,
-0.0119171142578125,
0.005710601806640625,
0.041656494140625,
-0.0307769775390625,
-0.0345458984375,
-0.0264129638671875,
0.05078125,
0.0018291473388671875,
-0.044769287109375,
0.0703125,
0.01430511474609375,
0.0843505859375,
-0.01279449462890625,
0.00856781005859375,
0.0401611328125,
0.02880859375,
0.00823211669921875,
0.0216064453125,
-0.027618408203125,
-0.08123779296875,
0.01064300537109375,
-0.0352783203125,
-0.0330810546875,
0.0634765625,
0.00437164306640625,
0.0256805419921875,
-0.0198974609375,
-0.0034732818603515625,
-0.0853271484375,
0.005840301513671875,
-0.03912353515625,
0.05096435546875,
0.016357421875,
0.0192413330078125,
0.0074920654296875,
0.01202392578125,
-0.0285186767578125,
-0.00994873046875,
-0.019775390625,
0.01158905029296875,
-0.043548583984375,
0.042938232421875,
-0.0240020751953125,
0.049560546875,
-0.040435791015625,
-0.0322265625,
-0.022491455078125,
-0.004856109619140625,
0.0027751922607421875,
-0.014617919921875,
0.01012420654296875,
-0.01033782958984375,
0.05828857421875,
0.005031585693359375,
0.04730224609375,
-0.01010894775390625,
0.0196685791015625,
0.0208740234375,
-0.018585205078125,
-0.0283203125,
-0.0095062255859375,
-0.09588623046875,
0.0173492431640625,
0.0634765625,
0.040191650390625,
0.01552581787109375,
0.0003910064697265625,
0.0270538330078125,
-0.00749969482421875,
-0.072509765625,
0.02069091796875,
-0.0038776397705078125,
0.0279083251953125,
0.01001739501953125,
-0.0234222412109375,
-0.0665283203125,
0.038482666015625,
-0.10296630859375,
0.03533935546875,
0.0208587646484375,
-0.036773681640625,
-0.0277862548828125,
-0.0230560302734375,
-0.002803802490234375,
0.0087738037109375,
-0.004638671875,
-0.00580596923828125,
0.0005669593811035156,
0.02947998046875,
-0.020965576171875,
0.0305328369140625,
0.032562255859375,
0.01959228515625,
-0.03582763671875,
0.001407623291015625,
-0.04559326171875,
0.01047515869140625,
0.04937744140625,
0.023773193359375,
0.04595947265625,
-0.054595947265625,
-0.00942230224609375,
0.03814697265625,
0.047271728515625,
-0.02789306640625,
0.0160064697265625,
0.031646728515625,
-0.0194549560546875,
0.0001760721206665039,
-0.005588531494140625,
0.0299530029296875,
-0.03826904296875,
0.033477783203125,
0.0017766952514648438,
0.0085601806640625,
0.04949951171875,
-0.0002887248992919922,
0.04449462890625,
-0.028289794921875,
-0.00257110595703125,
0.01291656494140625,
-0.03515625,
0.037078857421875,
-0.034576416015625,
0.0087432861328125,
0.05474853515625,
0.006450653076171875,
-0.00618743896484375,
-0.004878997802734375,
-0.007904052734375,
0.0150604248046875,
-0.0073089599609375,
-0.03973388671875,
0.010498046875,
-0.104248046875,
-0.0267486572265625,
0.036895751953125,
0.0689697265625,
0.00926971435546875,
-0.034332275390625,
0.016754150390625,
0.05706787109375,
-0.0274200439453125,
-0.07464599609375,
-0.0303497314453125,
-0.054229736328125,
0.0537109375,
-0.00823211669921875,
0.00171661376953125,
-0.01568603515625,
0.02752685546875,
0.0164947509765625,
-0.0202484130859375,
-0.03887939453125,
-0.0236968994140625,
-0.058837890625,
-0.040771484375,
0.015838623046875,
0.01580810546875,
0.018646240234375,
0.0018100738525390625,
0.01483154296875,
0.003978729248046875,
-0.03436279296875,
-0.00634002685546875,
0.0198974609375,
-0.0155792236328125,
-0.0253143310546875,
0.024383544921875,
-0.01236724853515625,
-0.0156402587890625,
0.004894256591796875,
-0.037445068359375,
0.0072174072265625,
0.0048065185546875,
-0.0308990478515625,
-0.01690673828125,
0.00792694091796875,
-0.005035400390625,
0.0198211669921875,
0.04449462890625,
0.0086212158203125,
0.01467132568359375,
-0.01953125,
-0.0228271484375,
0.0089569091796875,
-0.048309326171875,
-0.017822265625,
0.0225372314453125,
-0.019561767578125,
-0.0027027130126953125,
-0.02301025390625,
0.0638427734375,
0.025482177734375,
0.02398681640625,
0.01029205322265625,
0.038665771484375,
0.006534576416015625,
0.027313232421875,
-0.0706787109375,
0.037445068359375,
-0.0167388916015625,
-0.032440185546875,
-0.0043792724609375,
-0.01131439208984375,
-0.018890380859375,
0.018157958984375,
-0.02020263671875,
-0.02398681640625,
0.0194549560546875,
-0.06317138671875,
-0.01186370849609375,
-0.014617919921875,
0.002651214599609375,
0.01551055908203125,
0.047607421875,
0.00887298583984375,
-0.0188140869140625,
-0.047698974609375,
0.00726318359375,
-0.033203125,
-0.07525634765625,
-0.0120086669921875,
0.0034084320068359375,
-0.0085906982421875,
0.052398681640625,
0.000972747802734375,
-0.0019216537475585938,
-0.01116180419921875,
0.0156097412109375,
-0.00942230224609375,
-0.0206756591796875,
0.0218505859375,
-0.04974365234375,
-0.00933074951171875,
0.006717681884765625,
0.0011930465698242188,
-0.040863037109375,
0.004913330078125,
-0.04058837890625,
-0.0853271484375,
-0.016082763671875,
-0.053863525390625,
0.094482421875,
0.0230560302734375,
-0.018463134765625,
-0.004459381103515625,
0.047027587890625,
0.002994537353515625,
-0.01258087158203125,
0.01128387451171875,
-0.004123687744140625,
0.0016918182373046875,
0.04876708984375,
0.0098419189453125,
0.01268768310546875,
-0.0052947998046875,
0.01371002197265625,
0.0006198883056640625,
0.0302886962890625,
-0.0203399658203125,
-0.03070068359375,
0.01837158203125,
-0.030029296875,
-0.04669189453125,
-0.04962158203125,
-0.06585693359375,
0.007633209228515625,
-0.0175018310546875,
-0.0124969482421875,
-0.06768798828125,
-0.06085205078125,
0.00981903076171875,
-0.0089874267578125,
-0.0280914306640625,
0.0029888153076171875,
0.0151214599609375,
0.038299560546875,
-0.0078277587890625,
0.0396728515625,
0.0004911422729492188,
0.016357421875,
-0.0187530517578125,
0.0239715576171875,
-0.025726318359375,
-0.03143310546875,
0.07501220703125,
-0.03424072265625,
0.0289764404296875,
0.00402069091796875,
0.0211944580078125,
-0.011871337890625,
-0.031982421875,
0.037445068359375,
0.003368377685546875,
-0.04266357421875,
0.0087127685546875,
-0.00643157958984375,
0.016815185546875,
0.053924560546875,
-0.0006957054138183594,
-0.06524658203125,
0.0215606689453125,
0.0256500244140625,
-0.0167694091796875,
-0.0018863677978515625,
0.02349853515625,
0.040771484375,
0.0089111328125,
0.00890350341796875,
-0.01110076904296875,
0.017242431640625,
0.0035915374755859375,
0.0186614990234375,
0.07110595703125,
-0.024261474609375,
0.06036376953125,
0.005645751953125,
-0.0194549560546875,
-0.033599853515625,
-0.01427459716796875,
0.05438232421875,
0.0036106109619140625,
-0.055633544921875,
-0.0008482933044433594,
-0.006633758544921875,
-0.00470733642578125,
0.00856781005859375,
-0.0118560791015625,
0.02288818359375,
-0.027557373046875,
-0.01300811767578125,
0.017059326171875,
-0.028961181640625,
-0.040802001953125,
-0.02178955078125,
0.0562744140625,
-0.0006761550903320312,
0.0025424957275390625,
0.031585693359375,
0.021148681640625,
0.0117340087890625,
0.0185546875,
-0.019012451171875,
0.00803375244140625,
0.016998291015625,
0.0338134765625,
0.03857421875,
-0.051544189453125,
0.0230712890625,
-0.0269622802734375,
0.0333251953125,
-0.04034423828125,
-0.0244903564453125,
0.00811004638671875,
0.0269317626953125,
-0.0195159912109375,
-0.0082244873046875,
0.0239105224609375,
-0.0188751220703125,
-0.015777587890625,
0.06732177734375,
0.0284423828125,
-0.04754638671875,
-0.0246124267578125,
-0.043060302734375,
0.017822265625,
-0.0244598388671875,
0.01316070556640625,
0.006072998046875,
0.0166015625,
0.0208587646484375,
-0.033660888671875,
-0.01496124267578125,
-0.00792694091796875,
0.0157318115234375,
-0.00997161865234375,
-0.01131439208984375,
-0.0008287429809570312,
-0.099365234375,
-0.036163330078125,
-0.006137847900390625,
0.01366424560546875,
0.01195526123046875,
-0.044769287109375,
0.0117340087890625,
-0.00798797607421875,
0.0102386474609375,
-0.02978515625,
0.03521728515625,
0.029083251953125,
0.03363037109375,
-0.01470184326171875,
-0.0248260498046875,
-0.044525146484375,
-0.0355224609375,
-0.0307769775390625,
0.004436492919921875,
-0.0285797119140625,
0.0243988037109375,
0.0242462158203125,
0.01198577880859375,
-0.00913238525390625,
-0.0248565673828125,
-0.03228759765625,
0.01654052734375,
0.0261688232421875,
0.02020263671875,
-0.01493072509765625,
0.06402587890625,
-0.025360107421875,
0.0235748291015625,
-0.00841522216796875,
0.03411865234375,
0.00586700439453125,
-0.017730712890625,
-0.012451171875,
-0.0192718505859375,
0.0026493072509765625,
0.01361083984375,
-0.0005946159362792969,
-0.00789642333984375,
0.0281982421875,
-0.004611968994140625,
0.0034046173095703125,
-0.03021240234375,
-0.0137786865234375,
-0.023040771484375,
0.06378173828125,
-0.0122528076171875,
0.0127410888671875,
0.006622314453125,
0.01123809814453125,
0.0274200439453125,
-0.02520751953125,
-0.021240234375,
0.022064208984375,
0.01004791259765625,
0.026763916015625,
-0.038970947265625,
0.0017290115356445312,
0.023284912109375,
0.0731201171875,
-0.00616455078125,
0.047393798828125,
0.040924072265625,
0.006427764892578125,
0.0281219482421875,
0.07086181640625,
-0.0136260986328125,
-0.06512451171875,
0.034332275390625,
0.0267791748046875,
-0.01387786865234375,
0.0223846435546875,
-0.02508544921875,
0.00806427001953125,
0.076904296875,
0.06549072265625,
-0.109375,
0.0172882080078125,
0.035003662109375,
0.015716552734375,
0.00634002685546875,
-0.0227203369140625,
0.028411865234375,
0.0010995864868164062,
0.053802490234375,
-0.01485443115234375,
-0.00746917724609375,
0.0157623291015625,
-0.05487060546875,
0.00128936767578125,
-0.00902557373046875,
0.063720703125,
0.021392822265625,
-0.07666015625,
0.0465087890625,
0.039459228515625,
0.0265350341796875,
-0.01214599609375,
0.003543853759765625,
0.042510986328125,
-0.030853271484375,
-0.06121826171875,
0.02569580078125,
-0.006298065185546875,
-0.031158447265625,
0.0185699462890625,
-0.0172271728515625,
0.0187225341796875,
0.037017822265625,
-0.0219879150390625,
0.0004010200500488281,
0.00559234619140625,
-0.00917816162109375,
0.0174102783203125,
-0.017364501953125,
0.00847625732421875,
0.0172882080078125,
-0.04437255859375,
-0.0019102096557617188,
-0.0269775390625,
-0.01482391357421875,
0.005535125732421875,
0.02923583984375,
0.0745849609375,
-0.0199432373046875,
-0.0177764892578125,
0.05084228515625,
0.0016317367553710938,
-0.038482666015625,
-0.042724609375,
0.01271820068359375,
-0.0308380126953125,
0.016143798828125,
-0.0236663818359375,
0.004688262939453125,
-0.015045166015625,
-0.05230712890625,
-0.0287322998046875,
0.05621337890625,
-0.0203857421875,
-0.0126953125,
0.0203094482421875,
0.026458740234375,
-0.03704833984375,
0.00447845458984375,
-0.0294036865234375,
0.059967041015625,
-0.004367828369140625,
0.061981201171875,
-0.03173828125,
-0.010589599609375,
0.037384033203125,
0.053131103515625,
-0.0146331787109375,
-0.00849151611328125,
0.036041259765625,
-0.017303466796875,
0.013671875,
0.0316162109375,
0.003063201904296875,
-0.016143798828125,
-0.0152587890625,
0.000965118408203125,
0.01398468017578125,
-0.0693359375,
0.0222320556640625,
-0.05352783203125,
0.0146942138671875,
0.0012292861938476562,
0.030242919921875,
0.025970458984375,
0.00628662109375,
0.051666259765625,
-0.03173828125,
0.01206207275390625,
0.042144775390625,
-0.00411224365234375,
0.0305633544921875,
-0.0021305084228515625,
0.027069091796875,
-0.019805908203125,
-0.008575439453125,
-0.0116119384765625,
0.027587890625,
0.0039825439453125,
-0.00579833984375,
0.030975341796875,
0.005279541015625,
-0.00922393798828125,
0.024444580078125,
-0.0178680419921875,
0.045684814453125,
-0.004093170166015625,
-0.0203094482421875,
0.030364990234375,
0.034881591796875,
0.0007166862487792969,
-0.057373046875,
0.051055908203125,
-0.00014853477478027344,
0.0171356201171875,
-0.0391845703125,
0.0145721435546875,
0.004383087158203125,
-0.004283905029296875,
0.011444091796875,
0.02777099609375,
-0.0216217041015625,
0.0230255126953125,
-0.02020263671875,
-0.028717041015625,
-0.01201629638671875,
0.0352783203125,
-0.0124969482421875,
0.00445556640625,
0.0235748291015625,
-0.0418701171875,
-0.0276641845703125,
-0.021575927734375,
0.0102386474609375,
0.03448486328125,
0.053375244140625,
-0.01219940185546875,
-0.005481719970703125,
-0.0176239013671875,
-0.0014591217041015625,
-0.0008625984191894531,
-0.0150909423828125,
0.0163421630859375,
-0.040618896484375,
-0.0273590087890625,
0.002162933349609375,
0.042633056640625,
-0.0026397705078125,
0.039306640625,
0.0711669921875,
0.042816162109375,
-0.052886962890625,
-0.008941650390625,
0.06884765625,
-0.0369873046875,
-0.037017822265625,
-0.0556640625,
-0.0107879638671875,
0.0303192138671875,
0.0025043487548828125,
0.0255584716796875,
-0.0004200935363769531,
0.0232696533203125,
-0.04864501953125,
0.027862548828125,
-0.0175018310546875,
-0.0440673828125,
0.050384521484375,
-0.035797119140625,
0.06121826171875,
-0.0237274169921875,
-0.06396484375,
-0.01922607421875,
-0.01096343994140625,
-0.047027587890625,
0.0188446044921875,
0.0384521484375,
-0.0057373046875,
0.0012331008911132812,
-0.013458251953125,
-0.015777587890625,
0.004650115966796875,
-0.002582550048828125,
-0.006084442138671875,
-0.0113067626953125,
-0.0018587112426757812,
-0.022369384765625,
-0.02996826171875,
-0.00788116455078125,
-0.007175445556640625,
0.019989013671875,
-0.003299713134765625,
0.05975341796875,
-0.00685882568359375,
0.0019817352294921875,
0.0121002197265625,
0.00618743896484375,
-0.00968170166015625,
-0.0144500732421875,
0.027801513671875,
-0.0224609375,
-0.01491546630859375,
-0.006931304931640625,
-0.054931640625,
0.0714111328125,
0.0002422332763671875,
0.0107269287109375,
0.07208251953125,
-0.037750244140625,
0.0017480850219726562,
-0.006359100341796875,
0.0092010498046875,
-0.03131103515625,
-0.0474853515625,
-0.032073974609375,
0.0304107666015625,
-0.00229644775390625,
0.0093536376953125,
-0.01092529296875,
0.012969970703125,
-0.01323699951171875,
0.0208282470703125,
0.01160430908203125,
0.005889892578125,
0.0008869171142578125,
0.0244293212890625,
-0.069091796875,
-0.01300811767578125,
-0.044891357421875,
-0.01505279541015625,
-0.021514892578125,
0.00725555419921875,
-0.0024890899658203125,
-0.024871826171875,
-0.004367828369140625,
-0.06463623046875,
-0.003017425537109375,
0.01163482666015625,
0.0014295578002929688,
0.0196380615234375,
-0.041290283203125,
-0.00571441650390625,
-0.00954437255859375,
0.0472412109375,
-0.005519866943359375,
0.03033447265625,
-0.022003173828125,
0.00856781005859375,
0.011138916015625,
-0.023956298828125,
-0.055938720703125,
-0.0074005126953125,
0.046783447265625,
0.008697509765625,
-0.05487060546875,
0.04150390625,
-0.041046142578125,
0.0100555419921875,
0.018707275390625,
-0.00604248046875,
-0.01983642578125,
-0.007080078125,
-0.026611328125,
-0.049896240234375,
-0.0299224853515625,
0.0611572265625,
-0.021453857421875,
0.004669189453125,
0.02777099609375,
-0.0160064697265625,
-0.046478271484375,
-0.002086639404296875,
0.00804901123046875,
0.05108642578125,
-0.007282257080078125,
-0.02130126953125,
-0.03228759765625,
0.043975830078125,
-0.003589630126953125,
-0.06793212890625,
0.0168914794921875,
-0.051239013671875,
0.007694244384765625,
0.009307861328125,
-0.0193939208984375,
-0.004932403564453125,
-0.036773681640625,
-0.045501708984375,
0.052581787109375,
0.01318359375,
-0.028961181640625,
-0.0013513565063476562,
-0.0009303092956542969,
0.010223388671875,
-0.0207366943359375,
-0.004856109619140625,
-0.004497528076171875,
-0.0377197265625,
-0.007236480712890625,
0.0102996826171875,
-0.0002541542053222656,
0.024505615234375,
0.00214385986328125,
-0.05145263671875,
0.01169586181640625,
-0.0011768341064453125,
0.017333984375,
-0.060943603515625,
0.0167388916015625,
0.03973388671875,
0.007965087890625,
0.01247406005859375,
0.08544921875,
0.079345703125,
0.0092315673828125,
0.02618408203125,
0.002277374267578125,
-0.0298004150390625,
0.007747650146484375,
0.06756591796875,
0.0127105712890625,
0.01788330078125,
-0.0260009765625,
-0.0229949951171875,
-0.050079345703125,
0.01329803466796875,
-0.021392822265625,
0.0004291534423828125,
-0.06719970703125,
-0.01450347900390625,
0.0172576904296875,
0.0027103424072265625,
0.012481689453125,
-0.020751953125,
-0.006061553955078125,
-0.0202789306640625,
0.005054473876953125,
-0.0090179443359375,
0.0197601318359375,
-0.02294921875,
0.01314544677734375,
-0.00836944580078125,
0.0294189453125,
-0.006832122802734375,
0.020416259765625,
0.020355224609375,
0.0204315185546875,
-0.0164794921875,
0.072998046875,
-0.071044921875,
-0.0260009765625,
0.004337310791015625,
0.03912353515625,
-0.021728515625,
0.0234222412109375,
-0.0129241943359375,
0.0091705322265625,
-0.0035305023193359375,
-0.00258636474609375,
0.031829833984375,
-0.02081298828125,
-0.0189361572265625,
0.01494598388671875,
-0.036590576171875,
0.0406494140625,
-0.0231781005859375,
0.0269012451171875,
-0.0013990402221679688,
0.0114288330078125,
0.061614990234375,
-0.0202789306640625,
0.0158538818359375,
0.05084228515625,
0.045684814453125,
-0.01042938232421875,
0.021820068359375,
0.051849365234375,
0.036956787109375,
-0.000006973743438720703
] |
226356cc2dc9185cb1eeedc91a49fb50cd5f1f0b
|
Wordpress Stackexchange
Q: Hide a page in the admin end without a plugin? I'm creating a series of pages with iFrames embedded in them, but it seems the only way to do this within Wordpress (i.e. using the templating system) is to create pages in the admin end and then create individual templates for each of those pages.
Is it possible to hide those pages from the admin without a plugin? I see no need for the client to see those pages when they can't edit anything in them.
Thanks,
osu
A: you can use parse_query filter hook to exclude your pages using post__not_in attribute
add_filter( 'parse_query', 'exclude_pages_from_admin' );
function exclude_pages_from_admin($query) {
global $pagenow,$post_type;
if (is_admin() && $pagenow=='edit.php' && $post_type =='page') {
$query->query_vars['post__not_in'] = array('21','22','23');
}
}
this will exclude pages with the ids of 21,22,23
and to make sure this pages will not be included on the front end using wp_list_pages
you can use wp_list_pages_excludes filter hook:
add_filter('wp_list_pages_excludes', 'exclude_from_wp_list_pages');
function exclude_from_wp_list_pages($exclude_array){
$exclude_array = $exclude_array + array('21','22','23');
return $exclude_array;
}
|
Q: Hide a page in the admin end without a plugin? I'm creating a series of pages with iFrames embedded in them, but it seems the only way to do this within Wordpress (i.e. using the templating system) is to create pages in the admin end and then create individual templates for each of those pages.
Is it possible to hide those pages from the admin without a plugin? I see no need for the client to see those pages when they can't edit anything in them.
Thanks,
osu
A: you can use parse_query filter hook to exclude your pages using post__not_in attribute
add_filter( 'parse_query', 'exclude_pages_from_admin' );
function exclude_pages_from_admin($query) {
global $pagenow,$post_type;
if (is_admin() && $pagenow=='edit.php' && $post_type =='page') {
$query->query_vars['post__not_in'] = array('21','22','23');
}
}
this will exclude pages with the ids of 21,22,23
and to make sure this pages will not be included on the front end using wp_list_pages
you can use wp_list_pages_excludes filter hook:
add_filter('wp_list_pages_excludes', 'exclude_from_wp_list_pages');
function exclude_from_wp_list_pages($exclude_array){
$exclude_array = $exclude_array + array('21','22','23');
return $exclude_array;
}
|
wordpress
|
{
"language": "en",
"length": 168,
"provenance": "stackexchange_00019.jsonl.gz:408226",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13528"
}
|
[
0.0635986328125,
-0.005527496337890625,
0.0233306884765625,
-0.0211334228515625,
0.01328277587890625,
-0.034759521484375,
0.06317138671875,
-0.0227203369140625,
-0.00867462158203125,
-0.0176544189453125,
-0.03564453125,
0.0128021240234375,
-0.038787841796875,
-0.0184478759765625,
0.034454345703125,
-0.037994384765625,
-0.0084686279296875,
0.04010009765625,
0.0212860107421875,
-0.01300811767578125,
0.01103973388671875,
-0.031036376953125,
-0.01541900634765625,
0.0201873779296875,
0.03326416015625,
-0.05889892578125,
0.0406494140625,
-0.01396942138671875,
0.0288238525390625,
0.00024020671844482422,
0.01132965087890625,
-0.0091705322265625,
0.0105133056640625,
0.0261688232421875,
-0.0105438232421875,
-0.02569580078125,
-0.043182373046875,
0.02044677734375,
0.0236358642578125,
-0.0158233642578125,
0.00418853759765625,
0.01305389404296875,
0.019805908203125,
-0.0078582763671875,
-0.018341064453125,
-0.026611328125,
-0.01084136962890625,
-0.031341552734375,
0.021148681640625,
-0.0205535888671875,
0.0005168914794921875,
-0.020294189453125,
0.01959228515625,
0.00409698486328125,
-0.01175689697265625,
0.0138702392578125,
0.03192138671875,
0.0189208984375,
0.030792236328125,
-0.033294677734375,
-0.0404052734375,
0.018951416015625,
0.0214385986328125,
-0.0168609619140625,
0.0030918121337890625,
-0.0026397705078125,
-0.0533447265625,
0.0152130126953125,
-0.07098388671875,
0.0050506591796875,
0.050079345703125,
-0.061187744140625,
0.00505828857421875,
-0.023040771484375,
-0.028289794921875,
0.0318603515625,
0.0218353271484375,
0.0158233642578125,
-0.004009246826171875,
-0.02099609375,
-0.0104827880859375,
0.001323699951171875,
-0.043365478515625,
-0.0023822784423828125,
-0.0019235610961914062,
0.039642333984375,
-0.020233154296875,
-0.01447296142578125,
-0.009490966796875,
0.048095703125,
-0.0181121826171875,
0.0094146728515625,
0.00879669189453125,
0.03240966796875,
0.00762176513671875,
0.004009246826171875,
0.035369873046875,
0.05047607421875,
-0.0085906982421875,
0.007266998291015625,
-0.0150604248046875,
-0.033935546875,
0.01155853271484375,
-0.042938232421875,
0.0022430419921875,
0.0606689453125,
0.019439697265625,
0.0251312255859375,
0.01324462890625,
0.0057525634765625,
0.0273590087890625,
-0.034271240234375,
-0.022247314453125,
-0.02056884765625,
-0.025970458984375,
0.00251007080078125,
-0.0340576171875,
-0.0195159912109375,
0.00583648681640625,
-0.00873565673828125,
-0.01071929931640625,
0.0102386474609375,
-0.009918212890625,
-0.0032482147216796875,
0.007717132568359375,
-0.0011081695556640625,
-0.021881103515625,
-0.0032329559326171875,
0.071533203125,
-0.01055908203125,
-0.03668212890625,
0.0017538070678710938,
0.0599365234375,
0.0294189453125,
0.03216552734375,
-0.0159149169921875,
0.0340576171875,
-0.0224609375,
0.0185699462890625,
-0.0007548332214355469,
0.0017595291137695312,
-0.0296173095703125,
-0.003887176513671875,
-0.002246856689453125,
0.0041351318359375,
0.006893157958984375,
0.01007843017578125,
0.026824951171875,
0.01152801513671875,
-0.01448822021484375,
0.01116943359375,
-0.0206756591796875,
0.03955078125,
0.01137542724609375,
-0.033538818359375,
0.0039215087890625,
0.042083740234375,
-0.036865234375,
-0.0313720703125,
-0.036468505859375,
0.0025844573974609375,
0.0028781890869140625,
0.0233306884765625,
-0.026763916015625,
-0.036102294921875,
-0.00034165382385253906,
-0.031646728515625,
-0.013946533203125,
0.01349639892578125,
0.00629425048828125,
0.047576904296875,
-0.053924560546875,
0.01210784912109375,
0.003475189208984375,
-0.01509857177734375,
0.0255279541015625,
-0.0068359375,
0.0140228271484375,
0.0220489501953125,
0.02789306640625,
-0.001255035400390625,
-0.0237884521484375,
0.0264739990234375,
0.00994873046875,
-0.07373046875,
0.06671142578125,
0.0231781005859375,
0.0726318359375,
-0.0252838134765625,
0.016448974609375,
0.0762939453125,
0.053466796875,
0.00817108154296875,
-0.0158843994140625,
0.0026397705078125,
-0.033050537109375,
0.018310546875,
0.0002677440643310547,
-0.010162353515625,
0.020355224609375,
0.002689361572265625,
-0.0064239501953125,
0.0239105224609375,
0.018707275390625,
-0.0269927978515625,
0.017059326171875,
-0.0290679931640625,
0.021331787109375,
-0.0032978057861328125,
0.0167694091796875,
0.01377105712890625,
-0.014404296875,
-0.0303192138671875,
0.043426513671875,
-0.0156707763671875,
-0.0162353515625,
0.00923919677734375,
0.049285888671875,
0.0068817138671875,
0.029327392578125,
0.031158447265625,
-0.0321044921875,
0.0188751220703125,
0.016357421875,
0.0562744140625,
-0.04302978515625,
-0.004245758056640625,
-0.04669189453125,
0.006450653076171875,
-0.0108184814453125,
-0.04693603515625,
0.06494140625,
0.035614013671875,
0.06573486328125,
-0.0256805419921875,
-0.01123046875,
-0.0136566162109375,
-0.0369873046875,
-0.0008535385131835938,
0.0236968994140625,
0.054351806640625,
0.046478271484375,
0.01141357421875,
-0.012176513671875,
0.040130615234375,
-0.0965576171875,
-0.0123443603515625,
-0.007144927978515625,
-0.0094451904296875,
0.003570556640625,
0.036895751953125,
0.00939178466796875,
0.022735595703125,
-0.0023822784423828125,
0.033843994140625,
0.0313720703125,
-0.0291290283203125,
0.0200958251953125,
-0.0096893310546875,
-0.0245361328125,
0.01470184326171875,
-0.02423095703125,
-0.0154571533203125,
-0.01206207275390625,
0.0438232421875,
-0.03192138671875,
0.0193023681640625,
0.01334381103515625,
-0.011871337890625,
-0.0309295654296875,
0.021087646484375,
-0.0002111196517944336,
0.0169830322265625,
-0.0055999755859375,
0.0173187255859375,
-0.004425048828125,
-0.05950927734375,
0.0136260986328125,
0.0435791015625,
-0.00145721435546875,
0.005146026611328125,
0.059661865234375,
0.01123046875,
-0.00872039794921875,
-0.038421630859375,
-0.023773193359375,
0.018157958984375,
0.03509521484375,
0.01016998291015625,
-0.0276947021484375,
-0.00365447998046875,
0.014739990234375,
-0.0279693603515625,
0.0241851806640625,
0.030059814453125,
-0.0262908935546875,
0.0173492431640625,
-0.04241943359375,
0.050384521484375,
-0.0316162109375,
0.0523681640625,
0.05340576171875,
-0.0081787109375,
0.0022335052490234375,
0.0200042724609375,
-0.024566650390625,
0.0242767333984375,
0.005626678466796875,
0.00356292724609375,
-0.0078582763671875,
-0.025909423828125,
0.0044403076171875,
-0.007282257080078125,
0.003383636474609375,
-0.017913818359375,
-0.043914794921875,
0.0008106231689453125,
-0.01392364501953125,
-0.0439453125,
-0.0157928466796875,
0.00942230224609375,
-0.06781005859375,
-0.0254974365234375,
0.0042724609375,
-0.0504150390625,
-0.0015916824340820312,
0.0474853515625,
-0.0036487579345703125,
-0.0233917236328125,
-0.0229339599609375,
-0.036285400390625,
-0.0257568359375,
-0.024169921875,
0.05450439453125,
-0.0005888938903808594,
0.0005040168762207031,
-0.0035076141357421875,
0.0958251953125,
0.00710296630859375,
-0.0848388671875,
-0.006107330322265625,
0.037628173828125,
-0.023162841796875,
0.027099609375,
-0.0179443359375,
-0.00106048583984375,
0.026885986328125,
0.00942230224609375,
0.023345947265625,
-0.004421234130859375,
0.0245208740234375,
-0.029327392578125,
-0.033599853515625,
-0.0192718505859375,
0.009765625,
-0.0391845703125,
0.025665283203125,
-0.009918212890625,
0.001911163330078125,
-0.03759765625,
-0.017669677734375,
-0.00046181678771972656,
-0.030548095703125,
0.0172576904296875,
-0.0019407272338867188,
-0.0125579833984375,
0.03582763671875,
-0.004192352294921875,
0.039337158203125,
-0.0033550262451171875,
-0.0015163421630859375,
0.007110595703125,
-0.0217132568359375,
0.0015544891357421875,
0.0297698974609375,
-0.00021350383758544922,
0.052703857421875,
0.0001322031021118164,
0.002178192138671875,
0.03192138671875,
0.0208282470703125,
0.0180511474609375,
-0.00484466552734375,
-0.0033092498779296875,
-0.03814697265625,
0.056915283203125,
0.0286407470703125,
-0.0014543533325195312,
-0.016937255859375,
-0.0367431640625,
0.004192352294921875,
0.072265625,
-0.070556640625,
-0.036102294921875,
-0.0313720703125,
0.02001953125,
0.038421630859375,
-0.08331298828125,
0.03564453125,
-0.0484619140625,
-0.0760498046875,
0.00321197509765625,
-0.016357421875,
-0.02392578125,
-0.00415802001953125,
-0.010406494140625,
-0.031982421875,
-0.03680419921875,
0.018218994140625,
0.007038116455078125,
-0.012054443359375,
0.01342010498046875,
-0.00701904296875,
-0.03265380859375,
-0.006961822509765625,
-0.00992584228515625,
-0.07745361328125,
-0.0060577392578125,
-0.01259613037109375,
0.041229248046875,
-0.00946807861328125,
0.0135040283203125,
-0.047576904296875,
0.007434844970703125,
-0.00995635986328125,
0.0159454345703125,
-0.0176544189453125,
0.0200042724609375,
-0.0250244140625,
-0.00418853759765625,
0.0019435882568359375,
-0.01531219482421875,
-0.01096343994140625,
-0.0034732818603515625,
0.005764007568359375,
0.005298614501953125,
-0.0265655517578125,
-0.054840087890625,
0.0127410888671875,
-0.020843505859375,
-0.04766845703125,
-0.057037353515625,
-0.006683349609375,
-0.04010009765625,
-0.01146697998046875,
0.0040435791015625,
-0.0306243896484375,
-0.02166748046875,
0.0176849365234375,
0.00852203369140625,
-0.032684326171875,
0.01538848876953125,
0.044769287109375,
0.022796630859375,
-0.035919189453125,
-0.08807373046875,
0.0107421875,
0.040985107421875,
-0.0672607421875,
0.0784912109375,
0.0504150390625,
-0.0185089111328125,
0.08624267578125,
-0.0085906982421875,
0.0100555419921875,
-0.03802490234375,
0.0618896484375,
-0.01502227783203125,
-0.0177459716796875,
0.01555633544921875,
-0.0306854248046875,
0.0094757080078125,
0.0133209228515625,
-0.013397216796875,
-0.018768310546875,
0.0162811279296875,
0.0467529296875,
-0.01328277587890625,
0.0078887939453125,
-0.04949951171875,
0.0062103271484375,
-0.0190582275390625,
0.0301666259765625,
0.03338623046875,
0.04217529296875,
-0.0034694671630859375,
-0.0068817138671875,
0.004764556884765625,
0.007476806640625,
0.045166015625,
0.057769775390625,
-0.008453369140625,
0.049896240234375,
0.00406646728515625,
-0.00238800048828125,
-0.0020885467529296875,
0.0029621124267578125,
0.0134429931640625,
-0.03778076171875,
-0.047454833984375,
-0.0268402099609375,
0.0023899078369140625,
0.0217437744140625,
0.05450439453125,
0.032470703125,
0.044677734375,
0.004062652587890625,
0.01174163818359375,
-0.0206451416015625,
0.026123046875,
-0.00946044921875,
-0.043609619140625,
-0.0018968582153320312,
0.0173492431640625,
-0.0151214599609375,
0.0273895263671875,
0.056884765625,
0.0019588470458984375,
0.037506103515625,
-0.0294647216796875,
0.042144775390625,
-0.0007405281066894531,
0.027679443359375,
-0.0016603469848632812,
0.00614166259765625,
0.0268402099609375,
-0.0018682479858398438,
0.00618743896484375,
-0.014404296875,
-0.0241241455078125,
0.016204833984375,
0.003597259521484375,
0.0013227462768554688,
0.010498046875,
0.0019197463989257812,
0.00872039794921875,
-0.03289794921875,
0.078369140625,
0.0175628662109375,
-0.05072021484375,
-0.056793212890625,
-0.0149078369140625,
0.0494384765625,
0.00893402099609375,
-0.0207061767578125,
0.0009183883666992188,
-0.045318603515625,
-0.040374755859375,
0.01358795166015625,
-0.07244873046875,
0.0002142190933227539,
0.00997161865234375,
-0.004741668701171875,
-0.016387939453125,
-0.0245208740234375,
-0.053497314453125,
-0.0526123046875,
-0.004608154296875,
0.0223541259765625,
0.045379638671875,
-0.011749267578125,
0.0672607421875,
-0.0229644775390625,
-0.039306640625,
0.019134521484375,
0.00794219970703125,
0.0489501953125,
0.0372314453125,
-0.050537109375,
-0.01403045654296875,
-0.06280517578125,
-0.01434326171875,
-0.031768798828125,
-0.0114593505859375,
-0.032928466796875,
0.0185546875,
-0.0225067138671875,
0.015838623046875,
-0.04010009765625,
-0.0372314453125,
0.004062652587890625,
0.0004372596740722656,
-0.00917816162109375,
0.005687713623046875,
-0.0018072128295898438,
0.0810546875,
-0.03131103515625,
0.05120849609375,
0.0198974609375,
0.035064697265625,
-0.0190887451171875,
-0.0162200927734375,
-0.0164031982421875,
-0.058074951171875,
-0.0032367706298828125,
0.0355224609375,
-0.040069580078125,
0.037322998046875,
0.030853271484375,
0.01425933837890625,
0.0010223388671875,
-0.0171356201171875,
-0.00669097900390625,
-0.04229736328125,
0.0096893310546875,
-0.023345947265625,
-0.01216888427734375,
-0.01318359375,
-0.0026702880859375,
-0.0002617835998535156,
-0.019683837890625,
-0.04052734375,
0.0269927978515625,
0.02069091796875,
0.019287109375,
-0.0232391357421875,
-0.01434326171875,
0.0531005859375,
0.0594482421875,
-0.009429931640625,
0.040496826171875,
0.027435302734375,
0.009033203125,
0.0096435546875,
-0.003936767578125,
0.0036678314208984375,
-0.0161285400390625,
0.083740234375,
0.0271759033203125,
0.0080108642578125,
0.0927734375,
-0.0168914794921875,
0.008880615234375,
0.05108642578125,
0.02691650390625,
-0.10601806640625,
0.0109405517578125,
-0.00279998779296875,
0.034271240234375,
0.01134490966796875,
-0.006305694580078125,
-0.00289154052734375,
-0.06329345703125,
0.038055419921875,
-0.01812744140625,
-0.022247314453125,
-0.007366180419921875,
-0.03729248046875,
-0.037506103515625,
-0.024627685546875,
0.039031982421875,
0.0271453857421875,
0.004520416259765625,
0.0264739990234375,
-0.002655029296875,
0.00792694091796875,
-0.01605224609375,
0.0236358642578125,
-0.01065826416015625,
-0.0413818359375,
-0.0545654296875,
-0.01337432861328125,
0.0141754150390625,
-0.038299560546875,
0.064697265625,
0.0340576171875,
0.00653076171875,
0.060821533203125,
-0.0004363059997558594,
-0.00428009033203125,
0.0276336669921875,
-0.0340576171875,
-0.01419830322265625,
-0.005802154541015625,
0.0185546875,
-0.03375244140625,
-0.04730224609375,
0.010223388671875,
-0.056793212890625,
-0.019378662109375,
-0.00399017333984375,
-0.017333984375,
0.08447265625,
-0.0118560791015625,
-0.03863525390625,
-0.00832366943359375,
-0.01312255859375,
-0.004787445068359375,
-0.0169677734375,
0.029937744140625,
-0.01837158203125,
-0.006977081298828125,
-0.00799560546875,
-0.0214691162109375,
-0.018035888671875,
-0.035186767578125,
-0.0933837890625,
0.109375,
-0.03936767578125,
0.07366943359375,
0.0257720947265625,
0.0225067138671875,
-0.0404052734375,
-0.021636962890625,
-0.048553466796875,
0.05145263671875,
0.0482177734375,
0.06500244140625,
-0.03814697265625,
-0.013519287109375,
0.031219482421875,
0.044525146484375,
0.0413818359375,
0.00824737548828125,
-0.034271240234375,
-0.0252227783203125,
0.05352783203125,
0.0780029296875,
0.04400634765625,
0.017730712890625,
-0.01476287841796875,
0.0159759521484375,
0.0177764892578125,
-0.052459716796875,
0.031890869140625,
-0.044830322265625,
-0.016448974609375,
0.0047607421875,
-0.006282806396484375,
-0.004878997802734375,
0.0231170654296875,
-0.003505706787109375,
0.01068115234375,
0.0032062530517578125,
-0.017242431640625,
-0.0097198486328125,
-0.0283660888671875,
0.0081329345703125,
-0.009979248046875,
-0.052398681640625,
-0.035797119140625,
-0.03167724609375,
0.0137176513671875,
0.0090789794921875,
0.0330810546875,
0.0157928466796875,
0.0181732177734375,
0.0469970703125,
-0.024993896484375,
0.0110321044921875,
0.005115509033203125,
-0.02166748046875,
0.025360107421875,
0.0008006095886230469,
0.01010894775390625,
-0.06439208984375,
0.00861358642578125,
0.030059814453125,
0.0267486572265625,
-0.025299072265625,
-0.050994873046875,
-0.00588226318359375,
-0.00942230224609375,
0.006072998046875,
0.0183258056640625,
0.00677490234375,
0.01505279541015625,
0.0404052734375,
-0.0293731689453125,
-0.010345458984375,
0.0256805419921875,
0.021697998046875,
-0.0271148681640625,
-0.05059814453125,
0.031829833984375,
-0.01079559326171875,
-0.0340576171875,
-0.047515869140625,
0.017120361328125,
0.053314208984375,
0.05999755859375,
0.01326751708984375,
0.015960693359375,
-0.034332275390625,
-0.04315185546875,
0.037841796875,
-0.01531219482421875,
0.034332275390625,
-0.053985595703125,
-0.0279388427734375,
0.01288604736328125,
0.026885986328125,
-0.0020580291748046875,
0.003719329833984375,
0.01183319091796875,
-0.0015954971313476562,
-0.0296783447265625,
-0.005168914794921875,
0.01873779296875,
-0.0295867919921875,
-0.01554107666015625,
-0.033905029296875,
0.039794921875,
0.031585693359375,
0.0008368492126464844,
0.022247314453125,
0.045013427734375,
0.0200042724609375,
-0.01139068603515625,
0.01074981689453125,
0.0026798248291015625,
-0.02264404296875,
0.01087188720703125,
-0.005199432373046875,
0.02783203125,
0.01212310791015625,
-0.08563232421875,
-0.0113677978515625,
-0.02825927734375,
-0.0286865234375,
0.0141448974609375,
0.026702880859375,
-0.04888916015625,
0.05859375,
0.06842041015625,
0.016357421875,
-0.0136260986328125,
-0.0217132568359375,
0.041595458984375,
-0.06317138671875,
0.012054443359375,
0.0174407958984375,
-0.0088958740234375,
-0.002712249755859375,
-0.0083160400390625,
0.050018310546875,
0.02838134765625,
0.07147216796875,
-0.0355224609375,
0.019500732421875,
0.00292205810546875,
0.01079559326171875,
-0.031707763671875,
-0.01580810546875,
0.015167236328125,
-0.02581787109375,
0.004192352294921875,
0.00360870361328125,
-0.028533935546875,
-0.00057220458984375,
0.031951904296875,
-0.039764404296875,
-0.0111083984375,
-0.0234832763671875,
0.0287017822265625,
0.0026073455810546875,
0.03668212890625,
0.002269744873046875,
-0.0240631103515625,
-0.021087646484375,
0.0077972412109375,
0.0310211181640625,
0.032501220703125,
-0.023193359375,
0.032440185546875,
-0.0223541259765625,
-0.038238525390625,
0.02362060546875,
-0.0479736328125,
0.0034656524658203125,
0.02099609375,
-0.001201629638671875,
-0.0162200927734375,
0.0035076141357421875,
-0.00632476806640625,
0.0130615234375,
0.024444580078125,
0.01262664794921875,
0.030181884765625,
-0.00290679931640625,
-0.0052642822265625,
0.00839996337890625,
0.0117034912109375,
-0.03643798828125,
0.0003123283386230469,
0.01898193359375,
-0.014495849609375,
-0.01445770263671875,
0.0147552490234375,
-0.03424072265625,
-0.026763916015625,
-0.01538848876953125,
0.007259368896484375,
-0.00970458984375,
-0.07391357421875,
-0.08233642578125,
0.021087646484375,
0.0233612060546875,
0.0243988037109375,
-0.09222412109375,
0.050506591796875,
-0.02777099609375,
0.0382080078125,
-0.0011892318725585938,
0.061492919921875,
-0.0200958251953125,
0.001354217529296875,
-0.04425048828125,
-0.009735107421875,
-0.0093841552734375,
0.034759521484375,
0.0122833251953125,
-0.01739501953125,
0.0240325927734375,
0.0057220458984375,
-0.0219879150390625,
-0.025146484375,
-0.03857421875,
0.0192413330078125,
-0.0379638671875,
0.0037250518798828125,
-0.01024627685546875,
0.03314208984375,
-0.0145111083984375,
-0.055023193359375,
-0.00116729736328125,
-0.00998687744140625,
0.00281524658203125,
0.060577392578125,
-0.044158935546875,
-0.0088958740234375,
-0.03936767578125,
-0.05853271484375,
0.05938720703125,
0.03173828125,
-0.035491943359375,
-0.01227569580078125,
0.0330810546875,
-0.018310546875,
0.009002685546875,
0.0097198486328125,
-0.047760009765625,
0.007419586181640625,
0.00992584228515625,
0.02691650390625,
0.0025177001953125,
0.026336669921875,
0.0143280029296875,
-0.045318603515625,
0.014801025390625,
0.0005640983581542969,
0.0096588134765625,
0.008392333984375,
-0.006725311279296875,
0.054718017578125,
0.0570068359375,
-0.01715087890625,
0.03326416015625,
0.00936126708984375,
-0.0260772705078125,
0.0036334991455078125,
-0.0215301513671875,
-0.06591796875,
-0.0295867919921875,
0.10760498046875,
0.06500244140625,
0.046875,
-0.0209503173828125,
0.006168365478515625,
-0.03436279296875,
0.0016908645629882812,
-0.007732391357421875,
0.016571044921875,
-0.065185546875,
-0.032073974609375,
0.02215576171875,
0.007350921630859375,
0.00855255126953125,
-0.0169830322265625,
-0.01157379150390625,
-0.030792236328125,
-0.0003161430358886719,
0.0216217041015625,
-0.04437255859375,
-0.007633209228515625,
0.0152435302734375,
-0.023834228515625,
-0.0298309326171875,
-0.02911376953125,
0.0289306640625,
-0.019195556640625,
-0.0457763671875,
-0.028961181640625,
-0.038665771484375,
-0.006938934326171875,
0.06549072265625,
-0.033477783203125,
0.040130615234375,
-0.061492919921875,
0.00969696044921875,
-0.0108489990234375,
0.02862548828125,
0.007232666015625,
0.0263671875,
-0.00980377197265625,
0.02069091796875,
0.00379180908203125,
0.02325439453125,
-0.01617431640625,
0.0859375,
0.007251739501953125,
0.00798797607421875,
0.01087188720703125,
0.004566192626953125,
0.060821533203125,
-0.040618896484375,
0.00095367431640625,
-0.005336761474609375,
-0.0111083984375,
-0.0477294921875,
0.0115966796875,
-0.06744384765625,
0.001983642578125,
0.02105712890625
] |
792862e0eafafa5ba1f165c1a3cdac6890c68569
|
Wordpress Stackexchange
Q: Check the password of a user I want to keep a check if the user has a particular password, so I have been trying it with wp_check_password but the account for which it is checked gets logged out and can't login again till there is a call of wp_check_password in the code.
Digging into the code, I found out that it sets the password by using the new hash. and moreover if I am using wp_check_password( 'hello', md5('hello'), 1 );, it doesn't even check what is inside the database and returns true. Isn't that a bug?
Any ideas how can I check the user's password?
A: You can grab their hashed password from the database, and compare it to the entry you want to check using wp_hash_password().
To check if the current user's password matches "hello", try this:
if ( $current_user->user_pass == wp_hash_password( 'hello' ) )
|
Q: Check the password of a user I want to keep a check if the user has a particular password, so I have been trying it with wp_check_password but the account for which it is checked gets logged out and can't login again till there is a call of wp_check_password in the code.
Digging into the code, I found out that it sets the password by using the new hash. and moreover if I am using wp_check_password( 'hello', md5('hello'), 1 );, it doesn't even check what is inside the database and returns true. Isn't that a bug?
Any ideas how can I check the user's password?
A: You can grab their hashed password from the database, and compare it to the entry you want to check using wp_hash_password().
To check if the current user's password matches "hello", try this:
if ( $current_user->user_pass == wp_hash_password( 'hello' ) )
A: Your example works correctly. You are checking if password hello matches hashed hello - which it naturally does.
Hadn't thought it through. Your example causes following issue:
*
*You check if hello matches md5 of hello (instead of hash from user's profile).
*It does and then WP thinks this is correct, but outdated md5 hash - that must be updated.
*It re-hashes hello and updates user with it, locking him out (since his password is now hello instead of whatever it was before).
See wp_authenticate_username_password() function for extensive example, but basic idea is:
$userdata = get_user_by('login', $username);
$result = wp_check_password($password, $userdata->user_pass, $userdata->ID);
A: require_once ABSPATH . WPINC . '/class-phpass.php';
$wp_hasher = new PasswordHash(8, TRUE);
$password_hashed = '$P$BB3pP6fQAYa61ael0LNQlpB1NOyqNY0';
$plain_password = 'admin2';
if($wp_hasher->CheckPassword($plain_password, $password_hashed)) {
print 'Password matched.';
}
Credits to: https://stackoverflow.com/a/37181662
|
wordpress
|
{
"language": "en",
"length": 278,
"provenance": "stackexchange_00019.jsonl.gz:408227",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13535"
}
|
[
0.033203125,
0.0010061264038085938,
-0.0162353515625,
0.0014190673828125,
0.00548553466796875,
-0.044464111328125,
0.046539306640625,
-0.030609130859375,
-0.00452423095703125,
0.05078125,
-0.0192108154296875,
-0.005474090576171875,
0.00103759765625,
0.0023784637451171875,
-0.04248046875,
-0.02783203125,
0.02099609375,
-0.00920867919921875,
0.00959014892578125,
-0.0163421630859375,
-0.00563812255859375,
0.0150604248046875,
0.0037631988525390625,
0.0007076263427734375,
0.016754150390625,
0.0075531005859375,
0.09600830078125,
-0.00826263427734375,
0.041961669921875,
0.0033168792724609375,
0.0307769775390625,
-0.08251953125,
-0.00022459030151367188,
0.05108642578125,
-0.03790283203125,
0.004444122314453125,
-0.025115966796875,
0.040008544921875,
0.0172882080078125,
0.02301025390625,
0.035614013671875,
-0.018951416015625,
-0.0178985595703125,
0.03167724609375,
-0.0244598388671875,
-0.06878662109375,
0.049774169921875,
-0.018402099609375,
0.0284576416015625,
0.031585693359375,
0.032012939453125,
0.0245208740234375,
0.034759521484375,
-0.027984619140625,
-0.00804901123046875,
0.002105712890625,
-0.02105712890625,
-0.0283355712890625,
0.050048828125,
0.0215911865234375,
-0.006298065185546875,
-0.060577392578125,
0.0294342041015625,
-0.0364990234375,
-0.0302581787109375,
-0.00007462501525878906,
0.0374755859375,
-0.00023818016052246094,
0.00021207332611083984,
-0.040771484375,
0.0036869049072265625,
0.027191162109375,
-0.03338623046875,
-0.012908935546875,
-0.0120849609375,
0.03436279296875,
-0.0083770751953125,
0.001453399658203125,
0.0003561973571777344,
0.028900146484375,
-0.030670166015625,
-0.0015172958374023438,
-0.062255859375,
-0.0029392242431640625,
-0.0009522438049316406,
0.0191650390625,
-0.022003173828125,
-0.01178741455078125,
-0.00446319580078125,
-0.0219879150390625,
-0.0158843994140625,
0.02789306640625,
-0.0191192626953125,
-0.01531982421875,
-0.032989501953125,
-0.03167724609375,
0.0180511474609375,
0.0731201171875,
-0.01617431640625,
0.01056671142578125,
-0.037689208984375,
-0.0198211669921875,
-0.03448486328125,
-0.028717041015625,
-0.0012664794921875,
0.047271728515625,
0.005126953125,
0.0007104873657226562,
-0.0013294219970703125,
0.01352691650390625,
-0.0057830810546875,
-0.0306243896484375,
-0.043701171875,
-0.0802001953125,
0.0055389404296875,
0.063720703125,
-0.0210113525390625,
-0.00989532470703125,
0.0270843505859375,
-0.0357666015625,
-0.012725830078125,
0.00399017333984375,
0.01788330078125,
-0.0268096923828125,
-0.0211639404296875,
-0.032928466796875,
-0.0227203369140625,
-0.020721435546875,
-0.035614013671875,
0.06298828125,
-0.056549072265625,
-0.005725860595703125,
0.0731201171875,
0.010345458984375,
0.006000518798828125,
-0.04656982421875,
0.0198211669921875,
-0.006999969482421875,
-0.01178741455078125,
0.0186004638671875,
0.0007658004760742188,
-0.030517578125,
-0.00998687744140625,
-0.017974853515625,
-0.0201263427734375,
0.03973388671875,
0.01488494873046875,
0.0131683349609375,
-0.013458251953125,
-0.076171875,
0.01263427734375,
-0.0258941650390625,
-0.047149658203125,
0.02490234375,
0.07379150390625,
0.043426513671875,
0.01273345947265625,
0.0165557861328125,
0.00473785400390625,
0.058135986328125,
0.03985595703125,
-0.01438140869140625,
-0.0233306884765625,
0.0236053466796875,
-0.02276611328125,
0.00968170166015625,
0.0024890899658203125,
-0.0013408660888671875,
0.0301361083984375,
-0.03509521484375,
0.0211029052734375,
-0.013275146484375,
0.038970947265625,
0.00167083740234375,
-0.00594329833984375,
0.0258026123046875,
-0.007343292236328125,
0.04730224609375,
0.005252838134765625,
0.070556640625,
0.016265869140625,
-0.0202178955078125,
0.0635986328125,
-0.022247314453125,
-0.0135955810546875,
-0.0312347412109375,
0.0209503173828125,
-0.0085601806640625,
0.0257415771484375,
0.0239410400390625,
0.0090789794921875,
0.01000213623046875,
-0.0269317626953125,
0.027984619140625,
-0.00984954833984375,
-0.02301025390625,
0.027923583984375,
0.01409149169921875,
-0.009674072265625,
-0.0051727294921875,
0.0872802734375,
-0.032135009765625,
0.027069091796875,
-0.06048583984375,
-0.10791015625,
0.0006594657897949219,
-0.03326416015625,
0.027587890625,
-0.0294036865234375,
0.0202178955078125,
0.027252197265625,
-0.01506805419921875,
-0.019439697265625,
-0.0036163330078125,
-0.002880096435546875,
-0.0288238525390625,
-0.034027099609375,
0.05816650390625,
-0.0016355514526367188,
0.071044921875,
-0.0180816650390625,
-0.01451873779296875,
0.004184722900390625,
-0.042144775390625,
-0.007785797119140625,
-0.02996826171875,
-0.017425537109375,
-0.01270294189453125,
-0.0404052734375,
0.01323699951171875,
-0.023681640625,
0.01325225830078125,
0.023193359375,
0.0019664764404296875,
-0.037139892578125,
-0.0093536376953125,
-0.0122528076171875,
-0.06109619140625,
0.002414703369140625,
0.06488037109375,
0.061981201171875,
0.0304718017578125,
-0.0022525787353515625,
-0.0277557373046875,
0.0198974609375,
-0.0684814453125,
0.01384735107421875,
-0.0310821533203125,
0.0172882080078125,
0.0596923828125,
-0.0178985595703125,
0.00034928321838378906,
0.0004267692565917969,
-0.0228118896484375,
-0.0236663818359375,
0.04473876953125,
-0.0099334716796875,
0.0245208740234375,
-0.018341064453125,
0.013397216796875,
-0.0280303955078125,
-0.027374267578125,
0.026519775390625,
-0.033599853515625,
0.003559112548828125,
-0.010833740234375,
0.004566192626953125,
-0.01041412353515625,
0.0016002655029296875,
-0.00679779052734375,
0.0131683349609375,
-0.06402587890625,
-0.00353240966796875,
0.03814697265625,
0.047119140625,
0.036041259765625,
-0.049591064453125,
-0.019317626953125,
0.03570556640625,
0.041046142578125,
-0.005168914794921875,
-0.0007491111755371094,
-0.01556396484375,
0.002948760986328125,
0.01413726806640625,
-0.011962890625,
0.014068603515625,
0.037567138671875,
0.011260986328125,
-0.0307159423828125,
0.0211029052734375,
0.0107574462890625,
-0.01065826416015625,
0.032196044921875,
-0.01403045654296875,
-0.026763916015625,
-0.05352783203125,
-0.038909912109375,
0.050445556640625,
-0.048919677734375,
-0.015594482421875,
0.057586669921875,
-0.00833892822265625,
0.01090240478515625,
-0.021881103515625,
0.00872802734375,
-0.03155517578125,
-0.00739288330078125,
-0.037384033203125,
-0.0135498046875,
-0.0654296875,
-0.006061553955078125,
0.016571044921875,
0.01303863525390625,
-0.0028667449951171875,
-0.017578125,
-0.0007610321044921875,
0.010406494140625,
-0.021484375,
-0.033843994140625,
-0.08013916015625,
-0.06927490234375,
0.011871337890625,
-0.0027637481689453125,
-0.009918212890625,
0.0202484130859375,
0.021514892578125,
0.03564453125,
-0.019866943359375,
-0.0404052734375,
-0.039886474609375,
-0.08135986328125,
-0.066650390625,
0.01036834716796875,
-0.001270294189453125,
0.00302886962890625,
-0.0111846923828125,
0.05731201171875,
-0.01519012451171875,
-0.0667724609375,
-0.04669189453125,
0.0184783935546875,
-0.007701873779296875,
-0.0199127197265625,
-0.0391845703125,
-0.0157470703125,
0.016265869140625,
-0.01526641845703125,
-0.0340576171875,
-0.02899169921875,
0.056243896484375,
-0.0196685791015625,
0.01540374755859375,
-0.0345458984375,
0.043060302734375,
0.037811279296875,
-0.048919677734375,
0.0118408203125,
0.072021484375,
-0.037506103515625,
0.00926971435546875,
0.0013723373413085938,
-0.026336669921875,
0.04620361328125,
-0.01126861572265625,
-0.0223236083984375,
0.0243988037109375,
0.0092315673828125,
0.020111083984375,
0.04840087890625,
-0.00525665283203125,
0.01201629638671875,
0.037506103515625,
-0.00495147705078125,
0.0009698867797851562,
-0.01983642578125,
-0.0083160400390625,
-0.03302001953125,
-0.00952911376953125,
-0.0269622802734375,
-0.00945281982421875,
-0.036407470703125,
0.01438140869140625,
-0.029205322265625,
-0.06744384765625,
0.056976318359375,
0.00521087646484375,
0.01148223876953125,
-0.048248291015625,
-0.04217529296875,
-0.007770538330078125,
0.1182861328125,
-0.0305938720703125,
-0.0187835693359375,
0.0037631988525390625,
0.01270294189453125,
-0.03582763671875,
-0.0352783203125,
-0.0277099609375,
-0.0180511474609375,
-0.047149658203125,
-0.041839599609375,
-0.0263519287109375,
-0.0390625,
0.005908966064453125,
-0.06787109375,
-0.02593994140625,
-0.039764404296875,
0.00972747802734375,
-0.04168701171875,
0.028900146484375,
-0.00696563720703125,
-0.0128326416015625,
-0.021881103515625,
0.03466796875,
-0.04779052734375,
-0.0474853515625,
0.0083160400390625,
-0.0295867919921875,
0.027099609375,
0.0226593017578125,
-0.0281219482421875,
-0.01068115234375,
0.01483154296875,
0.0196380615234375,
0.04931640625,
0.00580596923828125,
-0.01259613037109375,
0.039764404296875,
0.022430419921875,
0.0247039794921875,
0.01183319091796875,
-0.0148468017578125,
-0.009185791015625,
0.010650634765625,
0.0008683204650878906,
-0.043365478515625,
-0.005146026611328125,
-0.02203369140625,
-0.005252838134765625,
-0.044342041015625,
-0.026824951171875,
0.01102447509765625,
-0.00434112548828125,
-0.009063720703125,
0.013397216796875,
0.0007677078247070312,
-0.0250701904296875,
0.0775146484375,
0.0196990966796875,
0.002620697021484375,
-0.0211944580078125,
0.08251953125,
0.01442718505859375,
-0.04046630859375,
-0.0017299652099609375,
0.0284423828125,
0.04156494140625,
0.003429412841796875,
0.02447509765625,
0.0094757080078125,
-0.02996826171875,
0.032684326171875,
0.0177154541015625,
-0.01253509521484375,
0.0035419464111328125,
0.00748443603515625,
-0.0009756088256835938,
-0.029449462890625,
0.012298583984375,
-0.00019037723541259766,
0.016448974609375,
0.0055694580078125,
0.0162811279296875,
-0.01122283935546875,
0.0357666015625,
-0.004878997802734375,
0.004940032958984375,
-0.0257415771484375,
0.015838623046875,
-0.0888671875,
0.0300140380859375,
-0.040496826171875,
-0.0257720947265625,
-0.0099945068359375,
-0.0023784637451171875,
0.0266571044921875,
-0.004062652587890625,
0.003597259521484375,
-0.036773681640625,
-0.01438140869140625,
0.00594329833984375,
0.0560302734375,
-0.07208251953125,
0.034912109375,
-0.041229248046875,
-0.032684326171875,
0.1190185546875,
0.007122039794921875,
-0.061676025390625,
0.056304931640625,
-0.043792724609375,
-0.01250457763671875,
0.0447998046875,
-0.007354736328125,
0.052001953125,
-0.04925537109375,
-0.045379638671875,
-0.00415802001953125,
-0.07763671875,
-0.049041748046875,
-0.06585693359375,
-0.0009317398071289062,
-0.01419830322265625,
0.006534576416015625,
0.033905029296875,
0.040283203125,
-0.0082855224609375,
0.053436279296875,
-0.0118865966796875,
0.027496337890625,
0.038055419921875,
-0.016143798828125,
0.0135040283203125,
0.0498046875,
-0.0215301513671875,
-0.021728515625,
0.0181884765625,
-0.01171112060546875,
-0.04119873046875,
0.01354217529296875,
0.01397705078125,
0.01727294921875,
0.049896240234375,
-0.00771331787109375,
0.0184478759765625,
0.0117034912109375,
0.045745849609375,
-0.0247955322265625,
-0.05731201171875,
-0.039276123046875,
-0.0026531219482421875,
0.049041748046875,
-0.0472412109375,
-0.0014934539794921875,
-0.03302001953125,
-0.01250457763671875,
0.0020313262939453125,
0.03216552734375,
-0.0054168701171875,
-0.0098419189453125,
-0.030731201171875,
-0.038818359375,
-0.030670166015625,
-0.0162200927734375,
0.0304412841796875,
0.0274658203125,
-0.0279541015625,
-0.043212890625,
0.05645751953125,
-0.0037670135498046875,
0.00763702392578125,
-0.016876220703125,
-0.0035552978515625,
0.035186767578125,
-0.002361297607421875,
0.041015625,
-0.022003173828125,
-0.0386962890625,
0.00021398067474365234,
-0.03558349609375,
-0.01152801513671875,
0.01422119140625,
-0.0272064208984375,
-0.0235748291015625,
-0.02276611328125,
-0.0054931640625,
-0.0103607177734375,
0.017730712890625,
0.01300811767578125,
-0.053863525390625,
0.0214996337890625,
0.028900146484375,
-0.005680084228515625,
-0.03192138671875,
0.059600830078125,
0.04022216796875,
0.0204315185546875,
0.0223541259765625,
0.053497314453125,
0.008758544921875,
-0.0231475830078125,
0.0269012451171875,
0.02142333984375,
-0.023956298828125,
-0.039337158203125,
0.03009033203125,
-0.0567626953125,
0.00652313232421875,
-0.013458251953125,
-0.033172607421875,
0.01049041748046875,
0.006816864013671875,
-0.00681304931640625,
0.0222625732421875,
0.052947998046875,
-0.0556640625,
0.0458984375,
-0.0171051025390625,
0.0281982421875,
-0.0043487548828125,
-0.0221405029296875,
0.0345458984375,
-0.01410675048828125,
0.029052734375,
0.010986328125,
-0.03564453125,
0.046630859375,
0.047943115234375,
0.0056915283203125,
0.0357666015625,
0.03314208984375,
0.0172119140625,
-0.00576019287109375,
-0.0310821533203125,
-0.036407470703125,
0.0036754608154296875,
0.0273895263671875,
0.007328033447265625,
0.00039505958557128906,
0.0323486328125,
-0.015777587890625,
0.019622802734375,
0.031494140625,
0.053558349609375,
-0.058990478515625,
0.0094451904296875,
0.01284027099609375,
-0.039794921875,
0.005565643310546875,
0.00782012939453125,
-0.00760650634765625,
-0.016693115234375,
0.048858642578125,
-0.03875732421875,
-0.0138397216796875,
0.02191162109375,
-0.025665283203125,
0.0071868896484375,
-0.0183563232421875,
0.057403564453125,
0.0003514289855957031,
-0.06646728515625,
-0.01349639892578125,
0.046539306640625,
-0.018524169921875,
0.010162353515625,
0.01507568359375,
-0.00025963783264160156,
-0.026580810546875,
-0.07440185546875,
-0.0307769775390625,
-0.0242462158203125,
-0.0572509765625,
-0.00855255126953125,
0.0178375244140625,
0.0648193359375,
0.053192138671875,
0.00548553466796875,
-0.0210418701171875,
0.0217437744140625,
0.00608062744140625,
0.00832366943359375,
-0.01172637939453125,
-0.015106201171875,
0.01099395751953125,
-0.0439453125,
-0.0004329681396484375,
-0.042327880859375,
0.0189666748046875,
0.0007162094116210938,
-0.024139404296875,
0.056640625,
-0.0289459228515625,
-0.00637054443359375,
0.0238189697265625,
0.0308074951171875,
0.006103515625,
0.0015077590942382812,
0.039031982421875,
-0.037261962890625,
-0.0008091926574707031,
0.00679779052734375,
-0.0098419189453125,
-0.0227508544921875,
-0.003406524658203125,
-0.025177001953125,
0.052459716796875,
-0.01006317138671875,
0.0090789794921875,
0.004291534423828125,
0.024200439453125,
0.0245208740234375,
0.03741455078125,
-0.059906005859375,
0.02618408203125,
-0.0242919921875,
0.08111572265625,
-0.07098388671875,
-0.003963470458984375,
0.0081024169921875,
0.02764892578125,
0.0179443359375,
0.011322021484375,
-0.007198333740234375,
-0.042510986328125,
-0.037872314453125,
0.0138702392578125,
-0.0186309814453125,
0.0230255126953125,
0.008270263671875,
0.0267791748046875,
0.03228759765625,
-0.0489501953125,
0.018096923828125,
-0.0343017578125,
-0.008819580078125,
0.0285186767578125,
-0.0006742477416992188,
-0.03509521484375,
0.010284423828125,
0.07269287109375,
-0.08367919921875,
0.0203094482421875,
0.06640625,
-0.0007443428039550781,
0.0285186767578125,
0.0211334228515625,
0.06793212890625,
-0.02850341796875,
0.01557159423828125,
-0.018157958984375,
0.05938720703125,
0.01154327392578125,
0.0025424957275390625,
0.027099609375,
0.015960693359375,
-0.007312774658203125,
-0.002285003662109375,
0.002185821533203125,
0.003772735595703125,
-0.005901336669921875,
0.046173095703125,
0.03466796875,
0.01385498046875,
-0.0169219970703125,
0.0230560302734375,
0.0287322998046875,
0.053436279296875,
-0.051605224609375,
-0.023773193359375,
0.01177978515625,
0.01788330078125,
0.0223541259765625,
0.002445220947265625,
0.03509521484375,
0.0220794677734375,
0.037139892578125,
-0.0404052734375,
-0.00296783447265625,
0.0275726318359375,
-0.016204833984375,
-0.0007801055908203125,
0.02630615234375,
-0.00565338134765625,
0.010009765625,
0.003238677978515625,
0.00018298625946044922,
0.01910400390625,
-0.0262908935546875,
-0.039337158203125,
0.01131439208984375,
0.03411865234375,
0.030181884765625,
0.005176544189453125,
0.0186767578125,
-0.015167236328125,
0.004413604736328125,
-0.034515380859375,
-0.033782958984375,
-0.01544189453125,
0.0396728515625,
-0.01032257080078125,
-0.049346923828125,
-0.01342010498046875,
-0.005077362060546875,
-0.043426513671875,
-0.034271240234375,
0.0225982666015625,
-0.009765625,
-0.01300811767578125,
-0.0078582763671875,
-0.00678253173828125,
0.033416748046875,
0.0017709732055664062,
0.0010080337524414062,
0.01519775390625,
0.054351806640625,
0.0051116943359375,
0.051300048828125,
0.005046844482421875,
0.021820068359375,
-0.0093536376953125,
0.038848876953125,
0.0015811920166015625,
0.058441162109375,
-0.0235595703125,
-0.0035915374755859375,
0.0014743804931640625,
-0.0406494140625,
0.003589630126953125,
0.0302276611328125,
-0.0210723876953125,
0.01702880859375,
0.02203369140625,
-0.041534423828125,
0.02862548828125,
0.053375244140625,
-0.02801513671875,
-0.0045166015625,
0.03521728515625,
-0.0305938720703125,
-0.0313720703125,
-0.015533447265625,
0.02587890625,
-0.004421234130859375,
0.001911163330078125,
0.0011625289916992188,
0.0260009765625,
-0.007335662841796875,
-0.01543426513671875,
0.0199127197265625,
-0.036651611328125,
-0.02691650390625,
0.0241546630859375,
-0.01250457763671875,
-0.0007562637329101562,
0.0028057098388671875,
-0.060150146484375,
0.07415771484375,
-0.0031719207763671875,
0.04913330078125,
0.06353759765625,
-0.0372314453125,
0.004505157470703125,
0.01352691650390625,
0.0262908935546875,
-0.02020263671875,
-0.039703369140625,
-0.0151824951171875,
0.0306396484375,
0.00012135505676269531,
0.01163482666015625,
-0.029327392578125,
0.03765869140625,
-0.033905029296875,
-0.03472900390625,
0.006317138671875,
-0.05194091796875,
-0.0009708404541015625,
0.0184326171875,
-0.0133819580078125,
-0.0265045166015625,
-0.031402587890625,
-0.0212860107421875,
-0.021240234375,
0.01140594482421875,
-0.0145111083984375,
-0.0091552734375,
-0.027557373046875,
0.0274658203125,
0.04913330078125,
0.068359375,
0.016510009765625,
0.035614013671875,
0.0164642333984375,
-0.007587432861328125,
0.018798828125,
-0.05218505859375,
-0.040802001953125,
-0.042938232421875,
0.01421356201171875,
0.0079193115234375,
-0.0034580230712890625,
-0.031585693359375,
-0.0182952880859375,
0.0191802978515625,
0.023162841796875,
-0.03204345703125,
-0.030731201171875,
0.015228271484375,
-0.0496826171875,
0.051025390625,
-0.04241943359375,
-0.00628662109375,
0.0215301513671875,
0.04443359375,
-0.030670166015625,
0.0081634521484375,
-0.014862060546875,
-0.0343017578125,
-0.0166473388671875,
-0.00342559814453125,
0.0264129638671875,
-0.0043487548828125,
-0.0304718017578125,
-0.0126190185546875,
-0.0048065185546875,
0.0156707763671875,
-0.0269775390625,
-0.03900146484375,
0.01371002197265625,
-0.00518798828125,
0.017181396484375,
-0.033660888671875,
0.0001766681671142578,
-0.050567626953125,
0.0093841552734375,
-0.057159423828125,
0.0197296142578125,
0.00897216796875,
-0.066650390625,
-0.087158203125,
-0.0037174224853515625,
-0.01010894775390625,
-0.043701171875,
-0.040863037109375,
0.00206756591796875,
-0.00341796875,
-0.00948333740234375,
-0.0193634033203125,
-0.007007598876953125,
-0.0199737548828125,
0.039825439453125,
0.0212249755859375,
0.0253753662109375,
0.017913818359375,
0.034698486328125,
-0.057647705078125,
0.022430419921875,
-0.0127716064453125,
0.021148681640625,
-0.0005512237548828125,
0.0165557861328125,
-0.0038909912109375,
0.03857421875,
-0.005939483642578125,
-0.0208892822265625,
-0.0140228271484375,
-0.05303955078125,
-0.00916290283203125,
-0.004852294921875,
0.02490234375,
0.0147705078125,
0.0179443359375,
0.014373779296875,
-0.00995635986328125,
-0.0228424072265625,
-0.040863037109375,
-0.0000489354133605957,
-0.002895355224609375,
0.0308990478515625,
0.0024623870849609375,
-0.0305938720703125,
0.02838134765625,
-0.01165771484375,
-0.0089874267578125,
-0.05377197265625,
-0.01314544677734375,
-0.041015625,
-0.011016845703125,
0.0202789306640625,
0.0277862548828125,
0.023162841796875,
-0.05340576171875,
0.07470703125,
-0.037017822265625,
-0.0170135498046875,
-0.002384185791015625,
0.0347900390625,
0.012115478515625,
-0.00498199462890625,
0.011016845703125,
0.0250701904296875,
-0.0111236572265625,
-0.01436614990234375,
0.0286407470703125,
-0.0064849853515625,
0.0167694091796875,
0.006626129150390625,
0.0015697479248046875,
-0.0031490325927734375,
-0.0035686492919921875,
-0.0142669677734375,
0.00595855712890625,
0.0311431884765625,
-0.0036830902099609375,
0.044158935546875,
0.01203155517578125,
0.008514404296875,
-0.03875732421875,
0.06146240234375,
0.036041259765625,
-0.055419921875,
0.0382080078125,
-0.0076751708984375,
-0.005611419677734375,
-0.00772857666015625,
0.0167999267578125,
-0.05523681640625,
0.03204345703125,
-0.0016851425170898438,
0.021942138671875,
0.0296783447265625
] |
687e027fed1ffda2f6f9df0dc6f3df79db61d78d
|
Wordpress Stackexchange
Q: What Are Security Best Practices for WordPress Plugins and Themes? As suggested in this question, I am adding this topic as a new question, for community discussion/voting regarding best-practices for Plugin/Theme security.
Here is the starting checklist, based on my current (work-in-progress) settings/data security checklist used for reviewing Themes (the principles should be no different for Plugins than they are for Themes).
If you want to check out a theme with a secure and solidly-coded theme settings page, check out this theme:
http://wordpress.org/extend/themes/coraline
A: Only use $_GET / $_POST / $_REQUEST carefully and when better APIs are unavailable
Plugins and Themes should use the Settings API to get and save form input data rather than rely on $_POST and $_REQUEST data directly.
|
Q: What Are Security Best Practices for WordPress Plugins and Themes? As suggested in this question, I am adding this topic as a new question, for community discussion/voting regarding best-practices for Plugin/Theme security.
Here is the starting checklist, based on my current (work-in-progress) settings/data security checklist used for reviewing Themes (the principles should be no different for Plugins than they are for Themes).
If you want to check out a theme with a secure and solidly-coded theme settings page, check out this theme:
http://wordpress.org/extend/themes/coraline
A: Only use $_GET / $_POST / $_REQUEST carefully and when better APIs are unavailable
Plugins and Themes should use the Settings API to get and save form input data rather than rely on $_POST and $_REQUEST data directly.
A: Use $wpdb->prepare
When building custom queries via the $wpdb object, always use $wpdb->prepare to fill placeholders with values instead of writing the queries with data mixed with SQL code, as the mysql_* family functions have wrongly taught everyone.
A: Be careful with PHP functions that might be used to run malicious code
A nice read for anybody writing PHP: Exploitable PHP functions on StackOverflow.
Use Theme Modification API
Themes should use set_theme_mod() and related functions not an self invented name scheme.
The theme_mod API is a specialized layer for the settings API; it guarantees unique names, pushes all options into one array and is – from my experience – much easier to handle. Plus, it offers standardized filters for plugins – which is good for interoperability.
Avoid enabled register_globals
Don’t rely on register_globals = on. A Pro Theme which my last client bought does exactly this. I could hack any site using this theme in 5 minutes …
ThimbThumb did this too (and still does?).
Do not create files with unnecessary wide access permissions
Don’t create files with too liberate access permissions.
Use SSL where available
Point your Share on Twitter/Facebook/Anything links to the HTTPS URI if available. Your reader’s security is important too.
A: Save data in single array
Plugins and Themes should save options in a single array, rather than create multiple options for the settings page. The use of the Settings API would handle this.
A: Check for appropriate capability when adding and outputting settings pages
Plugins should use an appropriate capability (e.g. manage_options) for the capability to add the settings page.
Themes should use edit_theme_options as the appropriate capability to add the settings page.
*
*Roles and Capabilities (Codex)
A: Use up-to-date tutorials and information
Plugins & Themes should both implement Options and Settings pages deliberately and not rely on copy-and-paste website tutorials which are outdated and do not include proper data security, such as those listed below.
Examples of what not to do:
*
*How to create an options page for your wordpress theme (1stwebdesigner.com)
*Create an awesome WordPress theme options page part 1 (wpshout.com)
A: Use Settings API
Plugins and Themes should use the Settings API, which is easier to use, more secure, and takes care of a lot of the hard work of settings pages:
*
*Settings API (Codex)
For a good tutorials on using the Settings API, see:
*
*Incorporating the Settings API in WordPress Themes (Chip Bennett)
*Handling Plugins Options in WordPress with register_setting() (Ozh Richard)
*WordPress Settings API Tutorial (Otto)
A: Use Nonces (when not using Settings API)
Plugins and Themes should explicitly provide Settings-page nonce checking, if not using the Settings API:
*
*WordPress Nonces (Codex)
*WordPress Nonces (Mark Jaquith)
*Improving security in WordPress plugins using Nonces (Vladimir Prelovac)
*5 tips for using AJAX in WordPress > 3. Use nonces and check for permission (Gary Cao)
A: Sanitize, validate and escape data
Sanitize anything that could get in and out of (!) the database both front end and back end!
Plugins and Themes should perform proper data validation:
*
*Validate and sanitize all untrusted data before entering data
into the database
*Escape all untrusted data before being output in the Settings form
fields
*Escape all untrusted data before being output in the Theme template
files
*
*Data Validation (Codex)
Plugins and Themes should use esc_attr() for text inputs and esc_html() or esc_textarea() for text areas.
Also available from the WordPress API is esc_url(), esc_url_raw(), esc_js() and wp_filter_kses().
Bad example:
<?php $url = 'javascript:pwnd()'; ?>
<a href="<?php echo $url; ?>">anchor</a>
Good example:
<a href="<?php echo esc_url($url); ?>">anchor</a>
Here is a great video of Mark Jaquith explaining the usage of the escaping functions:
*
*Theme & Plugin Security
A: Prefix function and variable names
Plugins should prefix all options, custom functions, custom variables, and custom constants with plugin-slug.
Themes should prefix all options, custom functions, custom variables, and custom constants with theme-slug.
A: For checkboxes and select options, Plugins and Themes should use the checked() and selected() functions for outputting checked="checked" and selected="selected", respectively.
A: Use wp_safe_redirect() instead of calling php's header() function directly when directing to a page on the same domain.
A: Add settings pages to appropriate sections of admin menu
Plugins should use the add_options_page() function to add the Plugin Settings Page to the Settings menu, rather than using add_menu_page() to add a top-level menu.
Themes should use the add_theme_page() function to add the Theme Settings Page to the Appearance menu, rather than using add_menu_page() to add a top-level menu.
|
wordpress
|
{
"language": "en",
"length": 876,
"provenance": "stackexchange_00019.jsonl.gz:408228",
"question_score": "23",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13539"
}
|
[
0.044891357421875,
-0.0017185211181640625,
0.01641845703125,
-0.0007352828979492188,
0.01030731201171875,
-0.0128631591796875,
0.038330078125,
-0.0269927978515625,
-0.026885986328125,
0.0008635520935058594,
0.033294677734375,
0.027740478515625,
-0.04998779296875,
-0.048553466796875,
0.0196380615234375,
-0.007091522216796875,
0.00782012939453125,
-0.01568603515625,
0.013458251953125,
-0.0291290283203125,
0.022216796875,
-0.0253448486328125,
0.034454345703125,
0.0157928466796875,
0.047882080078125,
-0.0293426513671875,
0.068359375,
-0.029937744140625,
0.0467529296875,
-0.0143280029296875,
0.03778076171875,
-0.046630859375,
0.01117706298828125,
0.043365478515625,
-0.0292510986328125,
0.031005859375,
0.00042319297790527344,
0.0222015380859375,
0.0230255126953125,
0.0190277099609375,
0.036834716796875,
-0.0106964111328125,
0.0068511962890625,
0.04638671875,
-0.0267791748046875,
-0.045684814453125,
0.057037353515625,
-0.0216522216796875,
0.0010366439819335938,
-0.004390716552734375,
0.0252838134765625,
0.00742340087890625,
0.0567626953125,
-0.00826263427734375,
-0.0181427001953125,
-0.00975799560546875,
-0.007015228271484375,
-0.04058837890625,
0.038787841796875,
0.033935546875,
-0.0145263671875,
-0.042877197265625,
0.0176544189453125,
-0.05853271484375,
0.0274200439453125,
-0.018463134765625,
-0.0101776123046875,
0.028045654296875,
-0.07257080078125,
0.037567138671875,
0.069091796875,
-0.045562744140625,
0.0341796875,
-0.0665283203125,
0.01445770263671875,
0.01322174072265625,
-0.0143890380859375,
-0.009857177734375,
0.0253143310546875,
-0.03167724609375,
-0.06494140625,
-0.04595947265625,
-0.0447998046875,
-0.0592041015625,
0.0108642578125,
-0.00853729248046875,
-0.014312744140625,
0.0257720947265625,
0.010498046875,
-0.00374603271484375,
-0.01226806640625,
0.006839752197265625,
0.04022216796875,
0.0190887451171875,
-0.036224365234375,
-0.0027332305908203125,
0.03570556640625,
0.03375244140625,
-0.010528564453125,
0.0118865966796875,
-0.01226043701171875,
-0.03326416015625,
0.0181427001953125,
-0.0224456787109375,
-0.006237030029296875,
0.03741455078125,
0.0256500244140625,
0.0078582763671875,
-0.0034503936767578125,
0.007472991943359375,
-0.02227783203125,
0.01065826416015625,
0.0040130615234375,
-0.03363037109375,
0.006862640380859375,
0.03753662109375,
0.00241851806640625,
0.003078460693359375,
-0.0139923095703125,
-0.01268768310546875,
0.0257415771484375,
0.0226593017578125,
0.005115509033203125,
-0.00775146484375,
0.0052032470703125,
-0.0024089813232421875,
-0.053680419921875,
-0.005008697509765625,
-0.0291290283203125,
0.06866455078125,
-0.0283355712890625,
-0.0048980712890625,
0.049407958984375,
-0.0050201416015625,
-0.0267486572265625,
-0.04180908203125,
0.0305633544921875,
0.01214599609375,
0.00360107421875,
0.0006918907165527344,
-0.00569915771484375,
-0.00769805908203125,
0.019317626953125,
-0.0301361083984375,
0.01012420654296875,
0.0120086669921875,
0.0078582763671875,
0.0217742919921875,
0.003879547119140625,
-0.032196044921875,
0.04644775390625,
-0.0399169921875,
0.00029921531677246094,
0.02142333984375,
0.017822265625,
0.022796630859375,
0.00926971435546875,
-0.0040740966796875,
0.006183624267578125,
0.0010881423950195312,
0.0184173583984375,
-0.00616455078125,
0.01517486572265625,
0.002628326416015625,
-0.01317596435546875,
-0.0166473388671875,
-0.01262664794921875,
0.0064697265625,
0.0035419464111328125,
0.0029582977294921875,
0.0078582763671875,
-0.0269622802734375,
-0.019317626953125,
-0.00963592529296875,
-0.006603240966796875,
0.01202392578125,
0.01309967041015625,
-0.0009016990661621094,
0.031585693359375,
0.026702880859375,
-0.007343292236328125,
-0.0260467529296875,
0.060516357421875,
-0.017120361328125,
-0.041015625,
0.0270233154296875,
-0.0010347366333007812,
0.040618896484375,
0.0091705322265625,
0.0080108642578125,
0.0201416015625,
0.00794219970703125,
-0.0307769775390625,
0.023406982421875,
-0.031890869140625,
-0.03265380859375,
-0.00519561767578125,
0.01300048828125,
-0.024169921875,
0.0049591064453125,
-0.0016679763793945312,
0.00592041015625,
-0.00463104248046875,
-0.021575927734375,
-0.01346588134765625,
-0.03338623046875,
0.0193328857421875,
0.0175933837890625,
-0.006031036376953125,
0.0295867919921875,
0.0013599395751953125,
0.019134521484375,
-0.01142120361328125,
-0.023895263671875,
0.013092041015625,
0.047332763671875,
-0.0169525146484375,
0.023712158203125,
0.003208160400390625,
0.0196380615234375,
0.01300048828125,
-0.0147247314453125,
0.005016326904296875,
0.0025882720947265625,
0.00247955322265625,
0.0413818359375,
-0.037353515625,
0.0078887939453125,
0.0073394775390625,
0.012603759765625,
0.051788330078125,
0.00435638427734375,
-0.009918212890625,
0.02874755859375,
-0.00347900390625,
-0.018890380859375,
-0.0036411285400390625,
-0.08502197265625,
0.009613037109375,
0.045166015625,
0.03619384765625,
0.03594970703125,
-0.0350341796875,
-0.035614013671875,
0.01727294921875,
-0.09515380859375,
-0.01342010498046875,
0.005596160888671875,
0.02789306640625,
0.047393798828125,
0.002063751220703125,
-0.037841796875,
0.01776123046875,
-0.0265655517578125,
0.0002117156982421875,
0.022247314453125,
-0.0124664306640625,
0.0079193115234375,
0.00023102760314941406,
-0.0271148681640625,
0.0005593299865722656,
-0.05767822265625,
-0.0258636474609375,
-0.0217742919921875,
0.0172882080078125,
-0.0093231201171875,
0.01120758056640625,
0.00693511962890625,
-0.0032196044921875,
-0.0202484130859375,
0.017669677734375,
-0.01117706298828125,
0.0014066696166992188,
0.056640625,
0.052734375,
0.00830841064453125,
-0.01666259765625,
-0.033599853515625,
0.0112762451171875,
0.0352783203125,
-0.026458740234375,
-0.002948760986328125,
-0.042816162109375,
-0.0216827392578125,
-0.00811004638671875,
-0.0035533905029296875,
0.00576019287109375,
-0.0003447532653808594,
0.0117034912109375,
0.0039043426513671875,
0.0148468017578125,
0.01361846923828125,
-0.049072265625,
0.0736083984375,
-0.032684326171875,
-0.0272064208984375,
0.0032806396484375,
-0.0156097412109375,
0.01812744140625,
-0.01259613037109375,
0.01629638671875,
0.0548095703125,
0.02008056640625,
-0.01788330078125,
0.006381988525390625,
0.009307861328125,
0.0145263671875,
0.01129913330078125,
-0.01152801513671875,
-0.0151214599609375,
-0.058868408203125,
-0.0258026123046875,
0.0235137939453125,
0.029022216796875,
-0.01094818115234375,
-0.055267333984375,
-0.033905029296875,
0.021881103515625,
-0.0767822265625,
-0.0308380126953125,
-0.034210205078125,
-0.048614501953125,
0.0184478759765625,
-0.047515869140625,
-0.002948760986328125,
0.0153961181640625,
-0.041259765625,
0.01032257080078125,
-0.003143310546875,
-0.0218048095703125,
-0.043212890625,
-0.0670166015625,
-0.07330322265625,
-0.0163421630859375,
0.0036945343017578125,
0.01555633544921875,
-0.004467010498046875,
0.10491943359375,
0.0011959075927734375,
-0.0626220703125,
-0.01776123046875,
-0.03350830078125,
-0.01363372802734375,
0.0194091796875,
-0.00882720947265625,
0.016326904296875,
-0.005908966064453125,
0.0226898193359375,
0.0084228515625,
0.009765625,
-0.0187530517578125,
-0.0101318359375,
-0.022216796875,
-0.025238037109375,
-0.0264739990234375,
-0.0047760009765625,
0.0271148681640625,
-0.02459716796875,
-0.0262451171875,
-0.064208984375,
-0.008453369140625,
0.027099609375,
-0.01271820068359375,
0.0018062591552734375,
-0.0241241455078125,
-0.0274200439453125,
0.030029296875,
-0.0009222030639648438,
0.025360107421875,
0.0288543701171875,
-0.0162506103515625,
-0.005939483642578125,
0.0338134765625,
0.01274871826171875,
0.030731201171875,
0.0009560585021972656,
-0.0080718994140625,
-0.051483154296875,
-0.0037059783935546875,
-0.02667236328125,
-0.0213165283203125,
-0.00771331787109375,
0.0031280517578125,
0.00919342041015625,
-0.0266876220703125,
0.041412353515625,
0.01560211181640625,
0.03509521484375,
-0.0278472900390625,
-0.0233154296875,
-0.040802001953125,
0.06536865234375,
-0.0251007080078125,
-0.0112152099609375,
0.0200347900390625,
0.0121917724609375,
-0.0205078125,
-0.0204315185546875,
-0.05029296875,
-0.01409149169921875,
-0.06683349609375,
-0.002811431884765625,
0.0022144317626953125,
-0.04998779296875,
0.01473236083984375,
-0.043548583984375,
-0.037017822265625,
-0.0350341796875,
0.0209197998046875,
-0.03375244140625,
0.03369140625,
-0.034515380859375,
0.010650634765625,
-0.03924560546875,
-0.002803802490234375,
-0.0242462158203125,
-0.05413818359375,
-0.0242156982421875,
0.00981903076171875,
0.058135986328125,
0.048187255859375,
-0.101318359375,
0.004718780517578125,
0.04486083984375,
-0.03228759765625,
0.05712890625,
-0.0132904052734375,
0.0257720947265625,
-0.0164642333984375,
0.0007376670837402344,
0.0181427001953125,
-0.012542724609375,
0.021270751953125,
0.027374267578125,
-0.031951904296875,
-0.04803466796875,
-0.033843994140625,
-0.1011962890625,
0.03729248046875,
-0.06805419921875,
-0.077880859375,
-0.0256805419921875,
0.005523681640625,
-0.01151275634765625,
-0.006450653076171875,
-0.004444122314453125,
-0.0020618438720703125,
-0.033355712890625,
0.053436279296875,
-0.0008087158203125,
0.0044097900390625,
0.006298065185546875,
0.1165771484375,
0.0045013427734375,
-0.0141448974609375,
-0.0867919921875,
-0.0199737548828125,
0.041259765625,
0.03155517578125,
0.011138916015625,
-0.00531005859375,
-0.058868408203125,
0.0758056640625,
0.0272674560546875,
-0.05291748046875,
0.0098876953125,
0.0697021484375,
0.00890350341796875,
-0.02130126953125,
-0.00011914968490600586,
-0.021575927734375,
0.048370361328125,
0.012481689453125,
-0.0101470947265625,
-0.02191162109375,
-0.0014057159423828125,
0.004528045654296875,
-0.0307159423828125,
0.07086181640625,
0.022613525390625,
-0.0198516845703125,
0.017852783203125,
0.0272216796875,
0.0145416259765625,
0.0357666015625,
-0.003170013427734375,
0.0179595947265625,
-0.005580902099609375,
0.007785797119140625,
-0.0479736328125,
0.0301971435546875,
-0.038055419921875,
0.0166015625,
0.0178985595703125,
-0.0004940032958984375,
-0.06622314453125,
-0.018310546875,
0.07196044921875,
-0.0198822021484375,
-0.05816650390625,
-0.01458740234375,
-0.016143798828125,
0.0207672119140625,
0.037322998046875,
0.017913818359375,
0.05523681640625,
-0.0187225341796875,
-0.044921875,
-0.0288848876953125,
-0.037994384765625,
-0.05633544921875,
-0.06024169921875,
-0.015380859375,
-0.006168365478515625,
-0.0240936279296875,
0.031768798828125,
-0.022857666015625,
-0.042205810546875,
0.01142120361328125,
0.01436614990234375,
0.0382080078125,
0.076416015625,
-0.0457763671875,
0.0318603515625,
-0.01006317138671875,
0.01187896728515625,
-0.085693359375,
0.0264434814453125,
-0.0251617431640625,
-0.044281005859375,
0.0093231201171875,
0.0004088878631591797,
-0.04693603515625,
0.0040130615234375,
0.04302978515625,
0.057281494140625,
-0.0124053955078125,
0.00713348388671875,
-0.0210723876953125,
-0.0291290283203125,
-0.01403045654296875,
0.01409149169921875,
0.021697998046875,
-0.004718780517578125,
-0.010406494140625,
0.005313873291015625,
-0.006866455078125,
0.00914764404296875,
0.0180511474609375,
-0.03448486328125,
-0.0011653900146484375,
0.01499176025390625,
-0.0204925537109375,
-0.0078277587890625,
-0.004566192626953125,
-0.034759521484375,
-0.0277557373046875,
-0.0106964111328125,
-0.0099334716796875,
0.045867919921875,
-0.00234222412109375,
0.04315185546875,
-0.0098419189453125,
-0.03515625,
0.019317626953125,
-0.00962066650390625,
0.033599853515625,
-0.0057373046875,
-0.09039306640625,
-0.001445770263671875,
-0.0219268798828125,
0.01177978515625,
0.006504058837890625,
-0.01184844970703125,
-0.053497314453125,
-0.01000213623046875,
0.0164794921875,
0.018585205078125,
-0.02581787109375,
-0.04779052734375,
0.0283355712890625,
0.0218505859375,
0.0103759765625,
0.04461669921875,
-0.0171356201171875,
0.0330810546875,
0.00894927978515625,
0.0499267578125,
0.01151275634765625,
-0.01055908203125,
-0.02459716796875,
-0.020355224609375,
0.02093505859375,
0.003753662109375,
-0.03125,
-0.0203704833984375,
-0.00899505615234375,
-0.0009765625,
0.059906005859375,
-0.01404571533203125,
0.01543426513671875,
-0.03857421875,
0.0013751983642578125,
-0.017364501953125,
0.07708740234375,
-0.031524658203125,
-0.045257568359375,
0.0880126953125,
0.0092926025390625,
0.028778076171875,
-0.03192138671875,
-0.0523681640625,
0.0216827392578125,
0.0124053955078125,
0.0029621124267578125,
0.0215606689453125,
-0.04296875,
0.0364990234375,
0.04571533203125,
0.0185394287109375,
0.042816162109375,
0.0170440673828125,
0.0240020751953125,
-0.0124664306640625,
0.022735595703125,
-0.0291748046875,
-0.03790283203125,
0.04632568359375,
0.022186279296875,
-0.02099609375,
0.03656005859375,
-0.03662109375,
0.04119873046875,
0.02593994140625,
0.07275390625,
-0.05950927734375,
0.0242462158203125,
0.016998291015625,
-0.041168212890625,
0.03387451171875,
-0.0045318603515625,
0.014801025390625,
-0.00734710693359375,
0.060302734375,
-0.03607177734375,
0.0006966590881347656,
0.01505279541015625,
-0.0450439453125,
-0.020660400390625,
-0.00847625732421875,
0.040069580078125,
0.01751708984375,
-0.023712158203125,
0.0010395050048828125,
0.0197906494140625,
0.0030727386474609375,
0.0176544189453125,
-0.0007467269897460938,
-0.0191802978515625,
-0.03338623046875,
-0.04705810546875,
-0.0305328369140625,
-0.023284912109375,
-0.035125732421875,
-0.01074981689453125,
0.011932373046875,
0.0105133056640625,
0.043426513671875,
-0.0043182373046875,
-0.029937744140625,
0.0322265625,
0.007022857666015625,
-0.0007781982421875,
-0.0044097900390625,
0.01270294189453125,
0.04815673828125,
-0.04925537109375,
0.01157379150390625,
-0.0287628173828125,
0.0017728805541992188,
-0.032623291015625,
-0.0279083251953125,
0.099365234375,
-0.045867919921875,
-0.001026153564453125,
0.03424072265625,
0.027130126953125,
-0.02166748046875,
-0.026763916015625,
0.0391845703125,
-0.050201416015625,
0.01690673828125,
-0.005504608154296875,
0.0309600830078125,
0.004878997802734375,
-0.00559234619140625,
-0.06512451171875,
0.080078125,
0.001453399658203125,
0.0287017822265625,
-0.0001583099365234375,
0.033355712890625,
-0.0148468017578125,
0.01078033447265625,
-0.0132598876953125,
0.052032470703125,
-0.04766845703125,
0.00501251220703125,
-0.025421142578125,
0.0174407958984375,
-0.008331298828125,
-0.0023632049560546875,
0.094970703125,
0.0255279541015625,
-0.054290771484375,
-0.01415252685546875,
0.039642333984375,
0.017242431640625,
-0.01445770263671875,
0.06402587890625,
0.0010251998901367188,
0.0292205810546875,
0.0190887451171875,
-0.047943115234375,
0.041412353515625,
-0.06475830078125,
0.0167083740234375,
0.023193359375,
-0.002544403076171875,
-0.0284576416015625,
-0.0068359375,
-0.00012230873107910156,
-0.041900634765625,
0.01351165771484375,
0.01473236083984375,
0.00975799560546875,
-0.0016832351684570312,
-0.010589599609375,
-0.018829345703125,
-0.032684326171875,
0.013580322265625,
-0.0198211669921875,
0.0299835205078125,
-0.0306396484375,
0.016937255859375,
0.032318115234375,
0.0181884765625,
-0.004756927490234375,
-0.01509857177734375,
0.01107025146484375,
0.00951385498046875,
-0.040191650390625,
0.0015125274658203125,
-0.026214599609375,
0.00966644287109375,
-0.0780029296875,
0.01654052734375,
0.0294952392578125,
0.004161834716796875,
-0.028778076171875,
-0.067138671875,
0.00934600830078125,
0.005405426025390625,
0.0241241455078125,
0.040771484375,
0.035614013671875,
-0.0011587142944335938,
0.036865234375,
-0.004726409912109375,
-0.00656890869140625,
0.011077880859375,
0.0195770263671875,
-0.001476287841796875,
0.012786865234375,
-0.019134521484375,
-0.012603759765625,
-0.00469970703125,
-0.0179290771484375,
-0.005756378173828125,
-0.0017690658569335938,
0.007549285888671875,
0.028900146484375,
0.013946533203125,
-0.0022602081298828125,
-0.006137847900390625,
0.06439208984375,
0.02154541015625,
0.004550933837890625,
-0.015625,
-0.04449462890625,
0.0022792816162109375,
0.0240325927734375,
-0.018035888671875,
-0.01084136962890625,
0.02490234375,
0.04534912109375,
-0.016143798828125,
-0.0299835205078125,
-0.0029964447021484375,
-0.01788330078125,
-0.0140838623046875,
-0.0258026123046875,
-0.006984710693359375,
0.01093292236328125,
-0.0227813720703125,
0.0026798248291015625,
-0.0070953369140625,
0.034454345703125,
0.0221405029296875,
0.03558349609375,
0.01212310791015625,
0.0014905929565429688,
-0.00916290283203125,
-0.02276611328125,
0.0206451416015625,
0.041290283203125,
-0.034820556640625,
-0.00745391845703125,
-0.004802703857421875,
-0.014373779296875,
-0.0019025802612304688,
0.017608642578125,
-0.01026153564453125,
0.0262908935546875,
0.0092010498046875,
-0.02685546875,
0.035003662109375,
0.006420135498046875,
-0.01203155517578125,
-0.01111602783203125,
0.0160369873046875,
-0.0268402099609375,
-0.0128326416015625,
-0.01314544677734375,
-0.01084136962890625,
0.03173828125,
0.0185546875,
0.03424072265625,
-0.0101470947265625,
0.025146484375,
-0.020843505859375,
-0.01535797119140625,
-0.0020160675048828125,
-0.007495880126953125,
0.0232391357421875,
0.0018596649169921875,
-0.0185394287109375,
0.004253387451171875,
-0.041290283203125,
0.0067901611328125,
0.024505615234375,
-0.005176544189453125,
-0.01181793212890625,
-0.01372528076171875,
0.0394287109375,
0.009185791015625,
0.00577545166015625,
-0.03692626953125,
-0.06317138671875,
-0.037261962890625,
0.036712646484375,
-0.0142974853515625,
-0.004123687744140625,
-0.037078857421875,
0.0489501953125,
-0.0259857177734375,
0.036956787109375,
-0.0159149169921875,
-0.004817962646484375,
-0.050384521484375,
0.01015472412109375,
-0.050628662109375,
-0.0450439453125,
-0.03289794921875,
-0.0301666259765625,
0.003665924072265625,
-0.0175323486328125,
0.048431396484375,
-0.018524169921875,
-0.046051025390625,
-0.023834228515625,
0.060821533203125,
0.06085205078125,
0.0277099609375,
0.040679931640625,
0.005138397216796875,
-0.0231170654296875,
0.0013341903686523438,
-0.013336181640625,
-0.00751495361328125,
-0.017364501953125,
-0.0163116455078125,
0.0008535385131835938,
-0.019622802734375,
-0.045135498046875,
-0.04376220703125,
0.048828125,
0.02764892578125,
-0.033172607421875,
-0.0264434814453125,
-0.0024051666259765625,
-0.05963134765625,
0.093994140625,
-0.034149169921875,
0.005420684814453125,
0.00875091552734375,
0.04132080078125,
-0.02862548828125,
-0.028839111328125,
-0.0172119140625,
0.02264404296875,
-0.0267333984375,
0.03363037109375,
0.060211181640625,
-0.030914306640625,
-0.038238525390625,
0.061798095703125,
0.01123809814453125,
0.0982666015625,
-0.01198577880859375,
0.006214141845703125,
0.0309295654296875,
-0.00884246826171875,
-0.0262603759765625,
-0.0625,
-0.00408935546875,
-0.0562744140625,
-0.004932403564453125,
-0.04052734375,
0.0030975341796875,
0.004230499267578125,
-0.052215576171875,
-0.07586669921875,
0.11224365234375,
-0.042724609375,
-0.02276611328125,
-0.02978515625,
0.005954742431640625,
0.01192474365234375,
0.0000368952751159668,
-0.0181427001953125,
-0.0025196075439453125,
-0.049407958984375,
0.0006623268127441406,
0.01763916015625,
-0.0067596435546875,
0.02410888671875,
0.0256195068359375,
-0.05157470703125,
0.00916290283203125,
-0.0084686279296875,
-0.01035308837890625,
0.00406646728515625,
0.003444671630859375,
0.007068634033203125,
0.032318115234375,
-0.036224365234375,
-0.009033203125,
-0.0187225341796875,
0.0242767333984375,
-0.030914306640625,
0.0213165283203125,
0.0164031982421875,
0.059326171875,
0.060882568359375,
0.09454345703125,
0.0168914794921875,
-0.07208251953125,
-0.0260162353515625,
-0.02532958984375,
-0.0189208984375,
0.004573822021484375,
0.01209259033203125,
-0.05401611328125,
0.00855255126953125,
0.019073486328125,
0.0246124267578125,
0.00261688232421875,
-0.00881195068359375,
0.0168914794921875,
-0.0278778076171875,
0.0207672119140625,
-0.01470947265625,
0.0025043487548828125,
-0.0518798828125,
0.057891845703125,
-0.02191162109375,
0.0232696533203125,
0.0049896240234375,
0.0291900634765625,
0.033538818359375,
0.0189971923828125,
0.028656005859375,
-0.002452850341796875,
-0.0391845703125,
0.0251617431640625,
-0.0027599334716796875,
0.06756591796875,
-0.04705810546875,
-0.049041748046875,
-0.01531982421875,
0.020538330078125,
0.0037250518798828125,
0.0266571044921875,
-0.035552978515625,
0.0258331298828125,
0.00732421875,
0.05120849609375,
-0.01422882080078125,
-0.027679443359375,
-0.022918701171875,
0.0197296142578125,
0.02325439453125,
-0.012847900390625,
0.064208984375,
-0.0231475830078125,
0.0230712890625,
0.0027866363525390625,
0.00652313232421875,
0.0037708282470703125,
0.01197052001953125,
-0.0288543701171875,
-0.0220489501953125,
0.0032787322998046875
] |
c4fc2b3411532099a7b1c47f5706517bb3b8dcd3
|
Wordpress Stackexchange
Q: How to debug WordPress "Cron" wp_schedule_event How can I debug problems with WordPress Cron? I think it will trigger when users go to your site but any errors wont be shown to them, as the jobs are run "asynchronously". So how might I debug errors?
I use wp schedule event
A: You could debug manually, by creating an action and executing the Cron action inside. Like this:
add_action( 'init', function() {
if ( ! isset( $_GET['the_cron_test'] ) ) {
return;
}
error_reporting( 1 );
do_action( 'this_is_cron_event_hook' );
die();
} );
And by going to your website's address: http://example.com?the_cron_test
This should show you any errors with the cron task.
But it's without any sense doing it manually. You could use Advanced Cron Manager PRO plugin which does this for you and also saves the log and other stats.
|
Q: How to debug WordPress "Cron" wp_schedule_event How can I debug problems with WordPress Cron? I think it will trigger when users go to your site but any errors wont be shown to them, as the jobs are run "asynchronously". So how might I debug errors?
I use wp schedule event
A: You could debug manually, by creating an action and executing the Cron action inside. Like this:
add_action( 'init', function() {
if ( ! isset( $_GET['the_cron_test'] ) ) {
return;
}
error_reporting( 1 );
do_action( 'this_is_cron_event_hook' );
die();
} );
And by going to your website's address: http://example.com?the_cron_test
This should show you any errors with the cron task.
But it's without any sense doing it manually. You could use Advanced Cron Manager PRO plugin which does this for you and also saves the log and other stats.
A: You could use the plugin Cron-View. There you can see if your job is a) registered and b) what the next due time is.
In addition, you could add a lower schedule-timer to your event (e.g. every 2 min) and test your method more frequently on a local system. Use the 'cron_schedules' filter hook to register new schedule times. For example:
function my_additional_schedules($schedules) {
// interval in seconds
$schedules['every2min'] = array('interval' => 2*60, 'display' => 'Every two minutes');
return $schedules;
}
add_filter('cron_schedules', 'my_additional_schedules');
A: You can run WP cron manually by calling: http://example.com/wp-cron.php?doing_wp_cron
If you don't want the automatic cron to run while you're debugging, then add this to your /wp-config.php file:
define('DISABLE_WP_CRON', true);
If you're on a development environment and want to output debug information, calling it manually like that will show you your debug output.
Alternatively you can use PHP's built-in error_log function to log message strings to the error log for debugging. You'd need to use this in conjunction with WP_DEBUG settings, as mentioned by Rarst.
A: You can (and probably should in any case, cron or not) configure PHP error log to capture all errors.
|
wordpress
|
{
"language": "en",
"length": 328,
"provenance": "stackexchange_00019.jsonl.gz:408257",
"question_score": "26",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13625"
}
|
[
0.056793212890625,
0.0017442703247070312,
0.016448974609375,
-0.027801513671875,
-0.0009965896606445312,
-0.031524658203125,
0.0022335052490234375,
-0.04901123046875,
0.0085906982421875,
-0.00222015380859375,
-0.0134735107421875,
-0.006683349609375,
-0.0002124309539794922,
-0.0325927734375,
0.002712249755859375,
-0.022247314453125,
0.0465087890625,
-0.016815185546875,
0.0119781494140625,
-0.0170440673828125,
-0.0043182373046875,
0.0374755859375,
-0.023193359375,
0.09844970703125,
0.01873779296875,
0.04364013671875,
0.07275390625,
-0.00365447998046875,
0.0293731689453125,
0.0020313262939453125,
0.03521728515625,
-0.07427978515625,
0.01473236083984375,
0.024139404296875,
-0.0231475830078125,
0.01276397705078125,
-0.0028362274169921875,
0.0000889897346496582,
-0.002368927001953125,
0.038787841796875,
0.0133056640625,
-0.00011199712753295898,
0.094482421875,
0.01462554931640625,
0.023101806640625,
-0.035797119140625,
0.033935546875,
-0.058319091796875,
-0.0119476318359375,
0.00920867919921875,
0.0028553009033203125,
-0.01275634765625,
0.0200958251953125,
0.0224761962890625,
-0.014617919921875,
-0.03546142578125,
-0.0255889892578125,
0.06353759765625,
0.0131072998046875,
-0.00525665283203125,
-0.01464080810546875,
0.015869140625,
0.0004036426544189453,
-0.005092620849609375,
0.0308837890625,
-0.0019006729125976562,
-0.0107421875,
0.0310211181640625,
-0.020660400390625,
0.01369476318359375,
0.0159912109375,
-0.02606201171875,
-0.029693603515625,
0.046722412109375,
-0.0003306865692138672,
-0.05474853515625,
0.0281982421875,
-0.01192474365234375,
0.00215911865234375,
0.07232666015625,
0.052001953125,
-0.0298004150390625,
-0.006511688232421875,
0.023284912109375,
0.0107879638671875,
0.029754638671875,
0.00936126708984375,
-0.0297088623046875,
-0.040008544921875,
-0.031982421875,
-0.0286102294921875,
0.036102294921875,
-0.08612060546875,
-0.021575927734375,
0.006809234619140625,
-0.04327392578125,
0.0190887451171875,
0.040374755859375,
-0.04754638671875,
-0.03472900390625,
-0.0299224853515625,
-0.0020809173583984375,
-0.03826904296875,
0.0009160041809082031,
-0.0259552001953125,
0.03485107421875,
0.04681396484375,
0.036224365234375,
0.0024471282958984375,
0.011749267578125,
-0.0164031982421875,
-0.00873565673828125,
0.0177001953125,
-0.042877197265625,
0.02447509765625,
0.02008056640625,
0.0163116455078125,
0.049346923828125,
0.018829345703125,
0.0038433074951171875,
-0.01983642578125,
0.01415252685546875,
-0.0099029541015625,
-0.0267181396484375,
-0.0257568359375,
-0.06011962890625,
0.01137542724609375,
-0.0157470703125,
0.016998291015625,
0.0172119140625,
-0.03240966796875,
0.005207061767578125,
0.032684326171875,
-0.001056671142578125,
-0.0022525787353515625,
-0.0204315185546875,
0.020263671875,
-0.03619384765625,
-0.00968170166015625,
0.006099700927734375,
0.02197265625,
-0.004913330078125,
0.0016078948974609375,
0.004650115966796875,
0.0247039794921875,
0.006862640380859375,
0.019744873046875,
0.01324462890625,
-0.002445220947265625,
-0.01538848876953125,
-0.020355224609375,
0.02587890625,
-0.007312774658203125,
0.0357666015625,
0.05462646484375,
-0.0227203369140625,
0.072265625,
-0.049713134765625,
0.0491943359375,
-0.0372314453125,
-0.043670654296875,
-0.005573272705078125,
0.046905517578125,
-0.03948974609375,
-0.031768798828125,
0.0180206298828125,
-0.04339599609375,
-0.00754547119140625,
0.035308837890625,
-0.0330810546875,
0.036590576171875,
-0.00327301025390625,
0.057281494140625,
-0.00567626953125,
-0.0031566619873046875,
0.010589599609375,
-0.01235198974609375,
0.0078582763671875,
0.0283966064453125,
0.03704833984375,
0.00868988037109375,
-0.0236663818359375,
0.0416259765625,
-0.020111083984375,
-0.024627685546875,
-0.00867462158203125,
0.0032939910888671875,
0.04132080078125,
0.036376953125,
0.0207366943359375,
-0.0219879150390625,
-0.00508880615234375,
-0.0022525787353515625,
0.031402587890625,
-0.003520965576171875,
-0.0255126953125,
-0.03302001953125,
-0.004375457763671875,
-0.0294036865234375,
-0.00464630126953125,
0.01273345947265625,
0.054901123046875,
-0.025634765625,
0.00908660888671875,
-0.115478515625,
0.04986572265625,
-0.040374755859375,
0.0528564453125,
0.0191650390625,
0.005100250244140625,
-0.0032806396484375,
0.0011129379272460938,
-0.002086639404296875,
-0.04443359375,
-0.03558349609375,
0.05035400390625,
-0.03460693359375,
0.049896240234375,
-0.027984619140625,
0.04974365234375,
-0.027862548828125,
-0.055877685546875,
-0.0174560546875,
0.0016031265258789062,
0.0006170272827148438,
0.0037097930908203125,
-0.028533935546875,
0.00487518310546875,
0.03302001953125,
0.0028247833251953125,
0.024322509765625,
0.01116180419921875,
-0.001979827880859375,
0.0182952880859375,
-0.02349853515625,
-0.00572967529296875,
0.0191192626953125,
0.005523681640625,
0.0181427001953125,
0.0274505615234375,
0.042510986328125,
0.045989990234375,
0.013702392578125,
0.0021381378173828125,
0.042266845703125,
-0.06695556640625,
0.00794219970703125,
-0.011932373046875,
-0.0291595458984375,
-0.016571044921875,
-0.017822265625,
-0.0181427001953125,
0.026092529296875,
-0.061981201171875,
-0.034423828125,
0.049224853515625,
0.006237030029296875,
-0.01369476318359375,
-0.027008056640625,
0.029052734375,
0.01052093505859375,
-0.0254974365234375,
-0.04168701171875,
-0.00788116455078125,
-0.005252838134765625,
-0.0209503173828125,
-0.0170135498046875,
-0.0133819580078125,
0.010009765625,
-0.007720947265625,
0.020416259765625,
-0.0682373046875,
-0.01593017578125,
0.0322265625,
0.002475738525390625,
0.034576416015625,
-0.039794921875,
0.0077056884765625,
-0.01092529296875,
0.0279693603515625,
-0.0185699462890625,
0.06439208984375,
-0.01197052001953125,
-0.0259552001953125,
-0.0506591796875,
0.000051140785217285156,
0.0125885009765625,
-0.012786865234375,
0.00463104248046875,
0.01390838623046875,
0.031280517578125,
0.036224365234375,
-0.01800537109375,
0.0273895263671875,
-0.015106201171875,
-0.01155853271484375,
0.047454833984375,
-0.01007080078125,
0.036834716796875,
-0.0340576171875,
-0.0057373046875,
0.0286407470703125,
-0.033660888671875,
0.01397705078125,
0.006427764892578125,
0.00846099853515625,
0.018646240234375,
-0.007129669189453125,
-0.0244140625,
0.038665771484375,
-0.1268310546875,
-0.040283203125,
0.0174102783203125,
0.0989990234375,
-0.03997802734375,
-0.052459716796875,
-0.01129913330078125,
0.0350341796875,
-0.05059814453125,
-0.09197998046875,
-0.0792236328125,
-0.0484619140625,
0.002529144287109375,
-0.009796142578125,
0.002414703369140625,
0.0264739990234375,
-0.0161895751953125,
0.023895263671875,
-0.025146484375,
-0.0101776123046875,
-0.0205078125,
-0.037750244140625,
-0.047088623046875,
0.01462554931640625,
0.004627227783203125,
0.0218353271484375,
0.004093170166015625,
0.0728759765625,
0.00036406517028808594,
-0.0782470703125,
-0.037506103515625,
0.01401519775390625,
-0.037750244140625,
-0.0199432373046875,
-0.0209197998046875,
0.01554107666015625,
0.021820068359375,
0.006710052490234375,
0.001148223876953125,
0.0288238525390625,
-0.0220947265625,
-0.0192413330078125,
0.0004715919494628906,
-0.0126953125,
0.0024318695068359375,
-0.0034732818603515625,
0.0003886222839355469,
-0.051483154296875,
0.0006580352783203125,
-0.057952880859375,
0.00261688232421875,
-0.00518035888671875,
-0.0286865234375,
0.0250091552734375,
0.0250091552734375,
-0.01873779296875,
0.004009246826171875,
-0.032928466796875,
0.0265350341796875,
0.0305633544921875,
0.045135498046875,
0.0194549560546875,
0.0171966552734375,
-0.0200958251953125,
-0.02191162109375,
-0.0694580078125,
0.04107666015625,
0.000606536865234375,
0.0015573501586914062,
0.00774383544921875,
-0.00814056396484375,
-0.03607177734375,
0.026397705078125,
-0.06439208984375,
-0.03106689453125,
0.042236328125,
-0.0252685546875,
-0.0165252685546875,
-0.0031585693359375,
-0.00618743896484375,
0.01049041748046875,
0.048065185546875,
0.042633056640625,
-0.041229248046875,
-0.0386962890625,
0.00807952880859375,
-0.050567626953125,
-0.0185699462890625,
0.03289794921875,
0.0080718994140625,
-0.06353759765625,
0.0426025390625,
-0.0010137557983398438,
-0.021331787109375,
-0.0285186767578125,
0.00279998779296875,
-0.05877685546875,
-0.033599853515625,
0.00555419921875,
-0.0205841064453125,
0.0149383544921875,
-0.0229949951171875,
0.037933349609375,
-0.05841064453125,
0.032012939453125,
-0.04254150390625,
-0.0914306640625,
-0.023712158203125,
-0.02117919921875,
0.07025146484375,
0.0113677978515625,
-0.0198516845703125,
-0.018829345703125,
0.044830322265625,
0.025421142578125,
0.03643798828125,
0.0177154541015625,
-0.031158447265625,
0.03497314453125,
0.038726806640625,
0.03497314453125,
0.005359649658203125,
0.0035381317138671875,
0.01033782958984375,
-0.0638427734375,
0.024200439453125,
0.002407073974609375,
0.0178680419921875,
0.03582763671875,
-0.0372314453125,
0.00853729248046875,
-0.0254058837890625,
-0.00940704345703125,
0.02349853515625,
0.01074981689453125,
-0.0212860107421875,
-0.04364013671875,
-0.0228271484375,
0.017059326171875,
-0.046478271484375,
-0.01195526123046875,
0.01561737060546875,
0.06256103515625,
0.0313720703125,
0.0134429931640625,
0.0141754150390625,
0.0234527587890625,
0.0200042724609375,
0.0089569091796875,
0.0232086181640625,
-0.0078125,
0.00807952880859375,
0.0041046142578125,
-0.0176239013671875,
-0.0108489990234375,
0.006072998046875,
0.015869140625,
0.012847900390625,
-0.0290679931640625,
0.0006580352783203125,
-0.007045745849609375,
0.0185546875,
0.0031108856201171875,
-0.02569580078125,
0.0023193359375,
0.024139404296875,
0.017120361328125,
-0.0634765625,
0.05926513671875,
-0.00923919677734375,
-0.00824737548828125,
0.002696990966796875,
-0.0224151611328125,
0.06500244140625,
0.0298919677734375,
-0.006591796875,
0.0229034423828125,
0.03662109375,
0.01300811767578125,
0.00376129150390625,
0.0306854248046875,
-0.011810302734375,
0.035858154296875,
0.0260772705078125,
0.011383056640625,
-0.049560546875,
-0.01401519775390625,
0.0623779296875,
0.0249176025390625,
-0.03887939453125,
0.000045239925384521484,
0.00997161865234375,
-0.0243682861328125,
0.007305145263671875,
-0.044342041015625,
0.032379150390625,
0.007625579833984375,
-0.00046133995056152344,
0.0034427642822265625,
-0.056610107421875,
-0.009490966796875,
-0.03326416015625,
-0.015777587890625,
-0.03228759765625,
-0.005336761474609375,
0.020538330078125,
0.02056884765625,
-0.031341552734375,
0.028594970703125,
-0.004817962646484375,
0.0242767333984375,
0.048065185546875,
0.025604248046875,
0.0194244384765625,
-0.044342041015625,
-0.004734039306640625,
0.0164337158203125,
0.012847900390625,
-0.0227508544921875,
-0.03839111328125,
-0.007221221923828125,
0.036651611328125,
-0.04827880859375,
0.0019063949584960938,
0.04180908203125,
-0.0026454925537109375,
-0.0196990966796875,
-0.00550079345703125,
-0.0157623291015625,
-0.00739288330078125,
-0.0192108154296875,
-0.030487060546875,
0.0178680419921875,
-0.0005726814270019531,
0.0214996337890625,
0.02264404296875,
0.0227203369140625,
0.032501220703125,
-0.035919189453125,
0.03912353515625,
-0.044586181640625,
-0.039276123046875,
-0.0186920166015625,
-0.018646240234375,
0.0223388671875,
-0.0272979736328125,
-0.004131317138671875,
-0.017120361328125,
-0.0360107421875,
0.04443359375,
-0.050567626953125,
0.00423431396484375,
-0.0273895263671875,
0.034637451171875,
-0.08209228515625,
0.01192474365234375,
0.0721435546875,
0.05670166015625,
-0.051727294921875,
0.00475311279296875,
-0.043670654296875,
-0.030029296875,
-0.045867919921875,
-0.01261138916015625,
-0.059906005859375,
0.01277923583984375,
-0.0020294189453125,
0.0160064697265625,
-0.0121002197265625,
-0.00835418701171875,
-0.00823974609375,
0.0204315185546875,
-0.0008258819580078125,
0.0292205810546875,
-0.01114654541015625,
0.0634765625,
-0.004596710205078125,
0.03387451171875,
0.01392364501953125,
0.041046142578125,
0.0033092498779296875,
-0.022735595703125,
-0.0107269287109375,
0.0208892822265625,
0.0102386474609375,
-0.0203094482421875,
0.0300750732421875,
-0.020721435546875,
0.050811767578125,
-0.0096282958984375,
-0.0306549072265625,
-0.021148681640625,
-0.0012874603271484375,
-0.0194549560546875,
0.06231689453125,
0.00785064697265625,
-0.022979736328125,
0.016143798828125,
-0.03692626953125,
-0.015869140625,
-0.00728607177734375,
0.01287078857421875,
0.0161285400390625,
-0.01715087890625,
-0.006755828857421875,
0.01275634765625,
-0.0537109375,
0.07666015625,
0.1160888671875,
-0.007358551025390625,
0.0406494140625,
0.028533935546875,
-0.0186004638671875,
0.0078277587890625,
0.051116943359375,
-0.032073974609375,
-0.048797607421875,
0.0284576416015625,
0.01442718505859375,
-0.0241851806640625,
-0.00537872314453125,
-0.022369384765625,
-0.0016622543334960938,
0.060272216796875,
0.047515869140625,
-0.079345703125,
-0.0014810562133789062,
0.0120391845703125,
-0.005847930908203125,
0.006221771240234375,
-0.02032470703125,
0.0352783203125,
-0.0134124755859375,
0.04949951171875,
-0.00362396240234375,
-0.001804351806640625,
0.01371002197265625,
-0.04559326171875,
0.010406494140625,
0.005992889404296875,
0.054443359375,
0.02264404296875,
-0.10870361328125,
0.060760498046875,
0.0692138671875,
0.035003662109375,
-0.061126708984375,
-0.007091522216796875,
0.0206146240234375,
-0.006561279296875,
-0.05078125,
0.04534912109375,
-0.005695343017578125,
0.06048583984375,
-0.019012451171875,
0.003879547119140625,
0.030853271484375,
0.0186767578125,
0.003063201904296875,
-0.037353515625,
0.00957489013671875,
-0.0325927734375,
0.00991058349609375,
-0.02734375,
0.0167694091796875,
0.007465362548828125,
-0.08197021484375,
0.00537109375,
-0.0396728515625,
-0.00475311279296875,
0.005046844482421875,
0.0085296630859375,
0.0609130859375,
-0.0222015380859375,
-0.0178070068359375,
-0.00286865234375,
-0.017578125,
0.037994384765625,
0.003177642822265625,
0.0157318115234375,
-0.023468017578125,
0.002475738525390625,
0.007312774658203125,
-0.01129150390625,
-0.0148468017578125,
0.011810302734375,
0.0113372802734375,
0.08209228515625,
-0.0303192138671875,
-0.07672119140625,
0.02734375,
0.048004150390625,
-0.0196380615234375,
0.04888916015625,
-0.034393310546875,
0.062744140625,
0.00688934326171875,
0.0703125,
-0.056640625,
-0.0266571044921875,
0.041290283203125,
0.050872802734375,
0.023406982421875,
0.00778961181640625,
-0.01611328125,
0.00678253173828125,
0.01277923583984375,
0.01003265380859375,
-0.00879669189453125,
0.036346435546875,
-0.023406982421875,
0.0251617431640625,
-0.003231048583984375,
-0.041595458984375,
0.0226593017578125,
-0.039581298828125,
-0.03912353515625,
0.00341033935546875,
0.00007408857345581055,
-0.0106964111328125,
0.00522613525390625,
-0.0361328125,
0.0249786376953125,
0.00017392635345458984,
-0.03204345703125,
0.01727294921875,
0.0177459716796875,
0.055206298828125,
0.06817626953125,
-0.0183258056640625,
-0.023223876953125,
-0.0292816162109375,
0.061065673828125,
0.00949859619140625,
0.0126190185546875,
0.030670166015625,
0.0262298583984375,
0.004474639892578125,
-0.0430908203125,
-0.007770538330078125,
-0.011627197265625,
-0.03656005859375,
-0.018646240234375,
0.00780487060546875,
0.01123809814453125,
-0.0054931640625,
0.021331787109375,
0.03594970703125,
-0.00891876220703125,
-0.023162841796875,
-0.020355224609375,
0.01248931884765625,
0.0100555419921875,
0.01247406005859375,
-0.0084686279296875,
0.030548095703125,
-0.047119140625,
-0.02520751953125,
-0.0015268325805664062,
-0.028594970703125,
-0.004795074462890625,
-0.0016565322875976562,
-0.00438690185546875,
0.0014934539794921875,
0.049285888671875,
-0.01763916015625,
-0.01374053955078125,
0.0134735107421875,
-0.00782012939453125,
0.0291290283203125,
0.00554656982421875,
0.004680633544921875,
-0.030914306640625,
0.0032825469970703125,
0.016357421875,
0.0221710205078125,
0.000640869140625,
-0.039947509765625,
0.0101776123046875,
-0.0318603515625,
-0.031219482421875,
0.020660400390625,
-0.00432586669921875,
-0.00774383544921875,
0.041351318359375,
0.052581787109375,
-0.028656005859375,
-0.020721435546875,
0.058624267578125,
-0.007045745849609375,
-0.07489013671875,
-0.038482666015625,
0.001491546630859375,
0.011444091796875,
0.0248260498046875,
0.0267486572265625,
0.0697021484375,
-0.03515625,
-0.0209808349609375,
-0.007602691650390625,
0.0026092529296875,
-0.02264404296875,
0.031768798828125,
-0.03369140625,
-0.0297088623046875,
-0.0252227783203125,
-0.04754638671875,
-0.00887298583984375,
-0.0095672607421875,
-0.0201568603515625,
0.0035400390625,
0.0232086181640625,
0.0026531219482421875,
0.015167236328125,
0.03369140625,
-0.015594482421875,
-0.0004432201385498047,
0.0088653564453125,
0.0097503662109375,
-0.0287017822265625,
0.01552581787109375,
-0.0009183883666992188,
-0.042449951171875,
-0.037261962890625,
0.0026988983154296875,
0.037017822265625,
-0.01125335693359375,
0.045379638671875,
-0.02069091796875,
0.00640869140625,
-0.006458282470703125,
-0.0144195556640625,
-0.00661468505859375,
0.01371002197265625,
-0.028656005859375,
0.0005393028259277344,
0.0004074573516845703,
-0.0004925727844238281,
-0.033294677734375,
0.045196533203125,
0.008026123046875,
0.0168609619140625,
0.020263671875,
-0.0135955810546875,
0.0195770263671875,
0.01506805419921875,
0.020416259765625,
-0.0233917236328125,
-0.02655029296875,
0.01355743408203125,
0.0418701171875,
-0.0128631591796875,
-0.005947113037109375,
-0.028533935546875,
-0.0018320083618164062,
0.00872039794921875,
-0.0250091552734375,
0.01097869873046875,
-0.003818511962890625,
0.0175018310546875,
0.0247650146484375,
-0.0275115966796875,
-0.0093231201171875,
-0.02099609375,
-0.0006632804870605469,
0.0078887939453125,
-0.0037860870361328125,
0.034637451171875,
-0.02618408203125,
0.04010009765625,
0.006938934326171875,
0.006591796875,
0.007595062255859375,
-0.012237548828125,
-0.0038700103759765625,
0.005889892578125,
-0.00252532958984375,
0.0171966552734375,
-0.0293731689453125,
-0.017303466796875,
-0.01509857177734375,
-0.02362060546875,
0.0165863037109375,
-0.004337310791015625,
-0.0013561248779296875,
-0.0192108154296875,
-0.01534271240234375,
0.04864501953125,
-0.0136871337890625,
-0.01490020751953125,
0.0197906494140625,
-0.03619384765625,
0.0128173828125,
-0.00827789306640625,
0.0008339881896972656,
0.0088043212890625,
0.0301971435546875,
-0.0043792724609375,
-0.0308074951171875,
-0.0214385986328125,
0.024688720703125,
-0.03033447265625,
-0.00562286376953125,
0.0272979736328125,
-0.0021820068359375,
-0.04638671875,
-0.027435302734375,
-0.03424072265625,
0.02587890625,
-0.029876708984375,
-0.030975341796875,
-0.0290069580078125,
0.0167999267578125,
-0.00036144256591796875,
-0.0032711029052734375,
0.01934814453125,
-0.0295562744140625,
-0.034942626953125,
-0.042327880859375,
-0.0032634735107421875,
-0.0023288726806640625,
-0.041046142578125,
-0.06268310546875,
0.08404541015625,
-0.0206146240234375,
-0.020294189453125,
-0.08184814453125,
0.0007348060607910156,
0.0137786865234375,
-0.01531982421875,
-0.03515625,
0.0181427001953125,
-0.034210205078125,
0.040863037109375,
-0.005096435546875,
0.0000022649765014648438,
0.0276031494140625,
0.01190185546875,
-0.03448486328125,
0.00513458251953125,
0.0019168853759765625,
-0.0292205810546875,
0.038330078125,
-0.0225830078125,
0.029022216796875,
0.0238800048828125,
-0.0404052734375,
-0.0210723876953125,
-0.0155029296875,
-0.01025390625,
-0.024993896484375,
-0.018157958984375,
-0.049468994140625,
-0.0255584716796875,
0.115966796875,
0.0643310546875,
0.03802490234375,
-0.0447998046875,
-0.03570556640625,
-0.01190185546875,
0.00372314453125,
-0.043212890625,
0.0022735595703125,
-0.05657958984375,
-0.0198211669921875,
-0.032867431640625,
0.005828857421875,
0.0177154541015625,
0.0241546630859375,
0.0007939338684082031,
-0.00799560546875,
0.03289794921875,
-0.0214385986328125,
-0.0200653076171875,
-0.0290985107421875,
0.0295562744140625,
-0.01617431640625,
0.0513916015625,
-0.005039215087890625,
0.019378662109375,
0.036895751953125,
0.05755615234375,
0.0184478759765625,
0.00946044921875,
-0.037109375,
0.0253143310546875,
-0.0089111328125,
0.05206298828125,
-0.06182861328125,
-0.03289794921875,
0.023040771484375,
-0.016815185546875,
-0.02801513671875,
-0.0173797607421875,
0.0615234375,
-0.032257080078125,
-0.060272216796875,
0.00748443603515625,
0.004657745361328125,
0.03802490234375,
-0.023040771484375,
0.069091796875,
-0.0292816162109375,
-0.027313232421875,
-0.035552978515625,
-0.01409149169921875,
0.0132904052734375,
0.0214996337890625,
0.0220794677734375,
-0.0291290283203125,
0.0199432373046875,
-0.0122528076171875,
0.00397491455078125,
0.0157012939453125
] |
47bfd9dba30a44ab793cd27fb0d3f4ec673bd450
|
Wordpress Stackexchange
Q: How to return the_excerpt (without echo)? Hey all, I see that get_the_excerpt() echoes the post excerpt if it is manually set, but not if it is automatically generated (with just the 55 words, for example). [and its use is deprecated]
the_excerpt() on the other hand, echoes directly without giving me a string in return.
Is there a function to return the excerpt of a post in Wordpress, including automatic excerpt if not manually defined, without echoing it?
A: Sure thing my friend, you see, the function "the_excerpt" (located at "WORDPRESSINSTALLDIR/wp-includes/post-template.php") is the one that makes the echo:
function the_excerpt() {
echo apply_filters('the_excerpt', get_the_excerpt());
}
so, what you want is to use the same function "apply_filters" without the echo:
$myexcerpt = apply_filters('the_excerpt', get_the_excerpt());
...and there you have your excerpt.
|
Q: How to return the_excerpt (without echo)? Hey all, I see that get_the_excerpt() echoes the post excerpt if it is manually set, but not if it is automatically generated (with just the 55 words, for example). [and its use is deprecated]
the_excerpt() on the other hand, echoes directly without giving me a string in return.
Is there a function to return the excerpt of a post in Wordpress, including automatic excerpt if not manually defined, without echoing it?
A: Sure thing my friend, you see, the function "the_excerpt" (located at "WORDPRESSINSTALLDIR/wp-includes/post-template.php") is the one that makes the echo:
function the_excerpt() {
echo apply_filters('the_excerpt', get_the_excerpt());
}
so, what you want is to use the same function "apply_filters" without the echo:
$myexcerpt = apply_filters('the_excerpt', get_the_excerpt());
...and there you have your excerpt.
A: There's also the function wp_trim_excerpt(), which will generate and return an excerpt for the current post.
|
wordpress
|
{
"language": "en",
"length": 146,
"provenance": "stackexchange_00019.jsonl.gz:408258",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13630"
}
|
[
0.0303192138671875,
-0.0164031982421875,
0.00919342041015625,
-0.0092926025390625,
-0.017486572265625,
-0.034271240234375,
0.039581298828125,
-0.01971435546875,
0.01763916015625,
0.036376953125,
-0.003749847412109375,
-0.019683837890625,
0.001514434814453125,
-0.0267486572265625,
-0.03875732421875,
-0.0285186767578125,
0.03729248046875,
-0.00388336181640625,
0.0333251953125,
0.0030612945556640625,
0.031005859375,
0.03765869140625,
-0.02301025390625,
0.0299835205078125,
0.017608642578125,
-0.00298309326171875,
0.09454345703125,
-0.03460693359375,
0.0247344970703125,
-0.004932403564453125,
0.0289306640625,
-0.040863037109375,
0.0276641845703125,
0.061859130859375,
-0.09857177734375,
0.010101318359375,
-0.0310821533203125,
0.018157958984375,
-0.01143646240234375,
0.020172119140625,
-0.009796142578125,
0.0164031982421875,
-0.0660400390625,
-0.0256195068359375,
-0.0601806640625,
0.01058197021484375,
-0.035736083984375,
-0.0018873214721679688,
0.014312744140625,
0.0012521743774414062,
0.0164947509765625,
0.02783203125,
0.0255126953125,
-0.00371551513671875,
-0.005962371826171875,
0.0123138427734375,
-0.009552001953125,
0.02679443359375,
0.049896240234375,
-0.07598876953125,
-0.034698486328125,
-0.0007967948913574219,
0.03863525390625,
0.0180511474609375,
0.0045013427734375,
0.0301666259765625,
0.004070281982421875,
0.00795745849609375,
-0.056243896484375,
-0.020965576171875,
0.0144195556640625,
-0.04925537109375,
0.0078887939453125,
-0.052978515625,
-0.04132080078125,
0.04364013671875,
-0.038909912109375,
-0.03143310546875,
0.020050048828125,
-0.046722412109375,
-0.01189422607421875,
-0.004062652587890625,
-0.04632568359375,
-0.0038280487060546875,
0.0003299713134765625,
0.00875091552734375,
-0.01288604736328125,
-0.0124359130859375,
-0.004787445068359375,
-0.035736083984375,
-0.0045166015625,
-0.0186309814453125,
-0.01371002197265625,
0.023162841796875,
0.003307342529296875,
-0.0455322265625,
0.01361083984375,
0.0137939453125,
-0.01654052734375,
0.00618743896484375,
-0.00920867919921875,
-0.03216552734375,
0.05181884765625,
-0.041290283203125,
0.0013399124145507812,
0.04644775390625,
-0.00901031494140625,
-0.034027099609375,
0.0114288330078125,
0.0285491943359375,
0.01334381103515625,
-0.041900634765625,
-0.021514892578125,
-0.053253173828125,
0.0007729530334472656,
0.057281494140625,
-0.026519775390625,
-0.0067138671875,
0.021026611328125,
0.00629425048828125,
0.022125244140625,
0.0184783935546875,
0.0245513916015625,
0.0172119140625,
-0.02557373046875,
0.0011873245239257812,
-0.006961822509765625,
-0.04803466796875,
0.093505859375,
-0.0090484619140625,
-0.0169830322265625,
-0.005413055419921875,
-0.0084228515625,
-0.006946563720703125,
-0.0032749176025390625,
-0.0098724365234375,
0.00936126708984375,
-0.003631591796875,
-0.003688812255859375,
0.008636474609375,
-0.00235748291015625,
-0.004199981689453125,
0.017730712890625,
0.0018901824951171875,
-0.026702880859375,
0.005138397216796875,
0.0155181884765625,
-0.003997802734375,
-0.0179290771484375,
0.026702880859375,
-0.06500244140625,
0.01800537109375,
0.0291748046875,
-0.006275177001953125,
-0.015838623046875,
-0.048858642578125,
-0.0266571044921875,
-0.030426025390625,
0.044403076171875,
-0.033294677734375,
0.06915283203125,
-0.0020046234130859375,
-0.05224609375,
0.01436614990234375,
-0.029815673828125,
-0.00998687744140625,
-0.01183319091796875,
0.0021877288818359375,
0.028076171875,
0.084228515625,
0.0244293212890625,
-0.04656982421875,
0.0174407958984375,
0.00252532958984375,
-0.0225830078125,
-0.00574493408203125,
0.007114410400390625,
-0.00505828857421875,
0.007404327392578125,
0.012359619140625,
-0.015716552734375,
-0.0163421630859375,
0.0153961181640625,
-0.0127105712890625,
-0.0523681640625,
0.05731201171875,
0.0266571044921875,
0.107177734375,
0.004619598388671875,
0.026153564453125,
-0.0218963623046875,
0.0171966552734375,
-0.00214385986328125,
-0.0161895751953125,
-0.0139617919921875,
-0.056610107421875,
0.0218048095703125,
-0.049713134765625,
-0.0019083023071289062,
0.0621337890625,
0.06903076171875,
-0.044036865234375,
0.044036865234375,
-0.00974273681640625,
-0.02642822265625,
-0.0290985107421875,
0.0021648406982421875,
0.00690460205078125,
-0.0016536712646484375,
0.04217529296875,
0.013336181640625,
0.01049041748046875,
-0.0108642578125,
-0.022064208984375,
0.004650115966796875,
0.0175018310546875,
-0.042877197265625,
0.020751953125,
-0.0173797607421875,
0.039306640625,
-0.007205963134765625,
-0.0222625732421875,
-0.01052093505859375,
-0.0030841827392578125,
0.08514404296875,
-0.06292724609375,
0.01202392578125,
-0.065673828125,
0.06109619140625,
-0.04595947265625,
-0.026458740234375,
0.05828857421875,
0.0623779296875,
0.0248260498046875,
-0.038482666015625,
0.0009317398071289062,
0.003162384033203125,
-0.053741455078125,
-0.0094146728515625,
0.0733642578125,
0.037139892578125,
0.0491943359375,
-0.00913238525390625,
-0.0269012451171875,
0.0810546875,
-0.018463134765625,
0.01036834716796875,
-0.0306396484375,
-0.000005364418029785156,
-0.0173187255859375,
0.0190887451171875,
-0.029144287109375,
0.047393798828125,
-0.0301055908203125,
0.006221771240234375,
0.043975830078125,
0.00020647048950195312,
-0.007785797119140625,
-0.00475311279296875,
0.00884246826171875,
0.012786865234375,
-0.0023784637451171875,
0.0060882568359375,
-0.01824951171875,
-0.01351165771484375,
0.0401611328125,
0.040069580078125,
0.039154052734375,
-0.041717529296875,
-0.01226043701171875,
0.029388427734375,
0.096923828125,
0.005649566650390625,
0.035003662109375,
-0.017547607421875,
-0.017425537109375,
-0.0057220458984375,
-0.009613037109375,
-0.000701904296875,
-0.011444091796875,
-0.01123046875,
0.05303955078125,
0.042083740234375,
-0.025482177734375,
-0.0184173583984375,
-0.0206146240234375,
0.0132598876953125,
-0.023101806640625,
-0.002986907958984375,
-0.011627197265625,
0.0166015625,
0.039337158203125,
0.00565338134765625,
0.0115509033203125,
-0.004772186279296875,
0.011749267578125,
0.0213775634765625,
-0.045440673828125,
0.0361328125,
-0.034698486328125,
0.0860595703125,
0.0537109375,
-0.0219879150390625,
0.01438140869140625,
0.0128021240234375,
-0.04754638671875,
0.0301666259765625,
-0.0028228759765625,
-0.01776123046875,
-0.00807952880859375,
-0.04266357421875,
0.04083251953125,
0.0207977294921875,
0.0640869140625,
-0.0455322265625,
-0.044403076171875,
-0.0222930908203125,
0.031829833984375,
-0.045074462890625,
-0.0017499923706054688,
0.05853271484375,
-0.0478515625,
-0.030303955078125,
-0.0014314651489257812,
-0.040802001953125,
-0.00989532470703125,
0.0406494140625,
-0.0220184326171875,
0.037750244140625,
-0.03424072265625,
-0.051605224609375,
-0.04827880859375,
-0.09423828125,
-0.05694580078125,
0.01018524169921875,
0.0131072998046875,
0.008544921875,
0.01519775390625,
0.0103759765625,
-0.037445068359375,
-0.002147674560546875,
-0.00008672475814819336,
-0.0130615234375,
0.0020961761474609375,
0.0113067626953125,
0.004116058349609375,
0.005542755126953125,
0.0292816162109375,
-0.0019235610961914062,
-0.00672149658203125,
-0.0015306472778320312,
-0.0489501953125,
-0.0088958740234375,
0.04345703125,
0.0367431640625,
0.0396728515625,
0.01082611083984375,
0.054718017578125,
0.0753173828125,
0.002391815185546875,
-0.0142669677734375,
-0.0181121826171875,
-0.0570068359375,
0.0147247314453125,
0.061248779296875,
-0.015594482421875,
-0.032012939453125,
0.00452423095703125,
-0.037811279296875,
-0.01186370849609375,
0.0274505615234375,
-0.04541015625,
0.0305328369140625,
-0.010772705078125,
-0.038970947265625,
0.02264404296875,
0.0300140380859375,
0.005771636962890625,
0.011260986328125,
0.01132965087890625,
0.050018310546875,
0.0172271728515625,
-0.01030731201171875,
-0.046966552734375,
-0.0487060546875,
0.0193939208984375,
-0.052154541015625,
-0.0270233154296875,
0.00904083251953125,
-0.004642486572265625,
0.0232696533203125,
0.06890869140625,
-0.028411865234375,
-0.0223236083984375,
0.00211334228515625,
0.01702880859375,
-0.0014019012451171875,
-0.0489501953125,
-0.007312774658203125,
-0.01122283935546875,
-0.0518798828125,
-0.015960693359375,
-0.026824951171875,
-0.0306243896484375,
0.01235198974609375,
-0.00662994384765625,
-0.006534576416015625,
-0.0249176025390625,
0.03070068359375,
-0.0270233154296875,
0.0006699562072753906,
-0.0005383491516113281,
0.0155181884765625,
-0.0479736328125,
-0.006526947021484375,
-0.01189422607421875,
-0.067626953125,
-0.0031719207763671875,
-0.01476287841796875,
0.0313720703125,
-0.0020008087158203125,
0.002788543701171875,
0.007106781005859375,
0.038116455078125,
0.023193359375,
-0.0148468017578125,
0.0281524658203125,
0.0034637451171875,
-0.0098724365234375,
-0.007511138916015625,
0.0311737060546875,
-0.057647705078125,
-0.01995849609375,
-0.040863037109375,
-0.0141754150390625,
0.0206146240234375,
-0.03240966796875,
0.034149169921875,
-0.016845703125,
0.01033782958984375,
-0.056640625,
0.0008525848388671875,
0.0228271484375,
-0.01308441162109375,
0.00727081298828125,
0.0009469985961914062,
0.013427734375,
-0.034881591796875,
0.0271453857421875,
0.04461669921875,
-0.038330078125,
-0.00939178466796875,
0.042266845703125,
0.04437255859375,
-0.036712646484375,
-0.0030231475830078125,
0.02642822265625,
0.03912353515625,
-0.014617919921875,
0.03485107421875,
0.0234832763671875,
-0.043670654296875,
0.05145263671875,
0.011688232421875,
-0.0158233642578125,
-0.02923583984375,
0.047607421875,
-0.00000959634780883789,
-0.00861358642578125,
0.0149383544921875,
-0.031707763671875,
0.046966552734375,
0.00030040740966796875,
-0.0137786865234375,
-0.01032257080078125,
0.03411865234375,
0.03466796875,
-0.043365478515625,
0.0623779296875,
-0.01212310791015625,
-0.0190582275390625,
0.0034580230712890625,
0.01236724853515625,
0.0225982666015625,
0.023712158203125,
0.016510009765625,
0.016510009765625,
0.032440185546875,
0.006404876708984375,
-0.01306915283203125,
-0.0401611328125,
0.039276123046875,
0.045166015625,
-0.03533935546875,
0.0303955078125,
-0.00531768798828125,
-0.0008292198181152344,
-0.043548583984375,
-0.045745849609375,
-0.072021484375,
-0.0041351318359375,
-0.0101165771484375,
0.044158935546875,
0.049224853515625,
-0.00800323486328125,
0.0182037353515625,
0.0467529296875,
0.0158538818359375,
0.006885528564453125,
-0.0137481689453125,
0.0526123046875,
-0.0330810546875,
0.005023956298828125,
-0.007480621337890625,
-0.0020656585693359375,
0.02978515625,
0.053863525390625,
-0.051300048828125,
0.053924560546875,
-0.01264190673828125,
0.02093505859375,
-0.011627197265625,
0.0711669921875,
0.0285797119140625,
-0.036102294921875,
-0.00797271728515625,
0.040283203125,
-0.03778076171875,
-0.0233612060546875,
-0.01224517822265625,
0.0311279296875,
0.04833984375,
-0.02032470703125,
-0.00923919677734375,
-0.0024051666259765625,
-0.0304412841796875,
-0.0249481201171875,
0.08477783203125,
0.05133056640625,
-0.031982421875,
-0.03985595703125,
-0.01641845703125,
0.042694091796875,
0.0034694671630859375,
-0.00852203369140625,
0.0184783935546875,
0.032928466796875,
0.0093994140625,
-0.0046234130859375,
-0.07073974609375,
0.016204833984375,
0.044189453125,
0.01361083984375,
-0.00054931640625,
-0.005352020263671875,
0.0139312744140625,
-0.01548004150390625,
-0.0160064697265625,
-0.0171661376953125,
0.06719970703125,
-0.00653076171875,
-0.005947113037109375,
-0.032958984375,
0.0175018310546875,
-0.04449462890625,
-0.020751953125,
0.0946044921875,
0.044219970703125,
-0.058929443359375,
0.00885772705078125,
-0.031036376953125,
-0.003314971923828125,
0.01253509521484375,
-0.0176849365234375,
-0.0322265625,
-0.01541900634765625,
-0.00678253173828125,
-0.00033283233642578125,
0.0052032470703125,
-0.004909515380859375,
-0.007221221923828125,
0.031097412109375,
0.0031757354736328125,
0.0023822784423828125,
-0.00457000732421875,
0.0214691162109375,
0.046051025390625,
0.0469970703125,
0.01416015625,
-0.0027923583984375,
-0.0126495361328125,
-0.0300750732421875,
-0.022216796875,
-0.02093505859375,
0.0135650634765625,
0.00930023193359375,
0.0310516357421875,
-0.0150909423828125,
0.0012388229370117188,
0.022857666015625,
-0.0198516845703125,
0.00788116455078125,
-0.0012350082397460938,
-0.0157012939453125,
-0.004180908203125,
0.0325927734375,
-0.039581298828125,
0.0058441162109375,
-0.025848388671875,
0.017181396484375,
0.0006709098815917969,
0.03131103515625,
0.0021038055419921875,
-0.025543212890625,
-0.004917144775390625,
0.036651611328125,
0.00763702392578125,
0.0279388427734375,
0.06561279296875,
-0.0227813720703125,
0.03546142578125,
0.00786590576171875,
-0.0211639404296875,
0.03973388671875,
0.0247955322265625,
0.002330780029296875,
-0.001621246337890625,
0.049407958984375,
0.01262664794921875,
-0.0186309814453125,
0.0157623291015625,
-0.0333251953125,
0.007389068603515625,
0.01094818115234375,
0.0293121337890625,
-0.0653076171875,
0.028350830078125,
0.020050048828125,
0.0189361572265625,
-0.018646240234375,
0.01276397705078125,
-0.0032196044921875,
-0.04034423828125,
0.05035400390625,
-0.040313720703125,
0.0118255615234375,
0.01554107666015625,
-0.045684814453125,
-0.006866455078125,
-0.044097900390625,
0.034454345703125,
0.01120758056640625,
-0.058502197265625,
0.03778076171875,
0.040252685546875,
0.00908660888671875,
-0.0297393798828125,
-0.0006933212280273438,
-0.01117706298828125,
-0.0186004638671875,
-0.03631591796875,
0.01399993896484375,
-0.024383544921875,
0.016357421875,
0.0210723876953125,
0.00980377197265625,
0.0240325927734375,
0.0338134765625,
-0.00838470458984375,
0.002307891845703125,
0.01224517822265625,
-0.03515625,
-0.0251617431640625,
-0.0289764404296875,
0.00458526611328125,
0.09014892578125,
-0.00821685791015625,
0.045867919921875,
0.025726318359375,
-0.028167724609375,
0.0009427070617675781,
-0.02142333984375,
0.04266357421875,
-0.0198822021484375,
-0.0251312255859375,
0.038360595703125,
-0.01049041748046875,
-0.036712646484375,
-0.0191497802734375,
0.05206298828125,
-0.046417236328125,
0.0300445556640625,
-0.004291534423828125,
0.0300750732421875,
-0.03863525390625,
-0.0253143310546875,
-0.05767822265625,
0.1102294921875,
0.007183074951171875,
0.0194549560546875,
0.01001739501953125,
0.028778076171875,
-0.03228759765625,
0.021026611328125,
-0.0386962890625,
0.07110595703125,
0.025665283203125,
0.02386474609375,
-0.07379150390625,
-0.0322265625,
-0.0005178451538085938,
0.053131103515625,
0.004611968994140625,
-0.01390838623046875,
0.00727081298828125,
-0.0030651092529296875,
0.0465087890625,
0.013885498046875,
0.01168060302734375,
0.009185791015625,
0.05462646484375,
0.1102294921875,
0.08770751953125,
-0.07403564453125,
0.024139404296875,
-0.0235137939453125,
0.03656005859375,
0.075439453125,
-0.0027751922607421875,
-0.042327880859375,
0.00809478759765625,
0.00302886962890625,
-0.041778564453125,
-0.007717132568359375,
0.0112457275390625,
-0.0191650390625,
0.01270294189453125,
0.088623046875,
0.065185546875,
-0.04534912109375,
-0.0248870849609375,
-0.05010986328125,
0.05169677734375,
-0.0031833648681640625,
0.002758026123046875,
0.033935546875,
0.01184844970703125,
0.055938720703125,
-0.01076507568359375,
-0.008056640625,
0.018402099609375,
-0.00830078125,
-0.0000711679458618164,
0.01541900634765625,
0.003398895263671875,
-0.029388427734375,
-0.01087188720703125,
0.04583740234375,
0.019866943359375,
-0.0123138427734375,
-0.01146697998046875,
0.0128173828125,
-0.03253173828125,
-0.0182037353515625,
-0.0211029052734375,
-0.029052734375,
0.0171356201171875,
-0.006984710693359375,
0.0191497802734375,
-0.04632568359375,
0.011199951171875,
0.02001953125,
0.01215362548828125,
0.00615692138671875,
0.040771484375,
-0.0281829833984375,
-0.0221099853515625,
-0.002658843994140625,
0.040740966796875,
0.026611328125,
0.006412506103515625,
0.047119140625,
-0.0014448165893554688,
0.0095672607421875,
0.0013904571533203125,
0.052154541015625,
-0.0012569427490234375,
0.01325225830078125,
-0.0101470947265625,
-0.0136871337890625,
-0.006626129150390625,
0.0029277801513671875,
0.017669677734375,
-0.0504150390625,
0.025604248046875,
0.008056640625,
-0.0797119140625,
-0.0146636962890625,
0.016845703125,
-0.026702880859375,
0.0124969482421875,
-0.035736083984375,
0.005603790283203125,
0.04205322265625,
-0.0119476318359375,
0.0193634033203125,
-0.01174163818359375,
0.071044921875,
-0.029937744140625,
0.041473388671875,
-0.0113983154296875,
-0.00528717041015625,
-0.0207977294921875,
-0.004482269287109375,
-0.01263427734375,
-0.0138702392578125,
-0.061553955078125,
-0.011932373046875,
-0.01480865478515625,
-0.05059814453125,
0.01373291015625,
0.03997802734375,
-0.01058197021484375,
0.00930023193359375,
-0.0294342041015625,
0.025177001953125,
0.021270751953125,
-0.023040771484375,
-0.0222320556640625,
0.0011463165283203125,
0.043060302734375,
-0.0116119384765625,
-0.011962890625,
-0.01512908935546875,
-0.02093505859375,
0.03631591796875,
0.0258026123046875,
0.0304412841796875,
-0.01129150390625,
0.035797119140625,
0.006130218505859375,
0.00238800048828125,
-0.03875732421875,
-0.00585174560546875,
-0.00016450881958007812,
-0.0311279296875,
0.01422119140625,
0.00603485107421875,
-0.056549072265625,
0.034393310546875,
0.029815673828125,
0.0030193328857421875,
0.06048583984375,
-0.00907135009765625,
-0.00330352783203125,
-0.040130615234375,
0.0275726318359375,
-0.00774383544921875,
-0.036590576171875,
-0.01947021484375,
0.0206146240234375,
0.024017333984375,
0.056182861328125,
0.00042247772216796875,
-0.00738525390625,
0.051910400390625,
-0.0260162353515625,
0.0211029052734375,
0.00731658935546875,
0.05621337890625,
0.050933837890625,
-0.01143646240234375,
0.0293121337890625,
-0.00897979736328125,
-0.03155517578125,
0.03424072265625,
0.00525665283203125,
0.003108978271484375,
0.005771636962890625,
0.01268768310546875,
-0.04193115234375,
-0.022186279296875,
0.022552490234375,
-0.0220794677734375,
0.007648468017578125,
-0.01041412353515625,
0.003513336181640625,
0.007549285888671875,
0.0243072509765625,
-0.01094818115234375,
-0.039154052734375,
-0.01413726806640625,
-0.016815185546875,
-0.01934814453125,
-0.0206298828125,
-0.006420135498046875,
-0.006252288818359375,
-0.0011196136474609375,
-0.00817108154296875,
-0.00943756103515625,
-0.0220947265625,
0.0016193389892578125,
0.040740966796875,
-0.03973388671875,
0.00980377197265625,
0.005462646484375,
0.034759521484375,
-0.0266265869140625,
-0.012786865234375,
-0.036865234375,
0.0213775634765625,
-0.0243072509765625,
0.0221099853515625,
0.051055908203125,
-0.0229949951171875,
-0.030426025390625,
0.029693603515625,
0.008026123046875,
0.06109619140625,
-0.006465911865234375,
-0.024932861328125,
0.020721435546875,
0.0089569091796875,
-0.0038967132568359375,
-0.03424072265625,
-0.0004963874816894531,
-0.0018463134765625,
0.020660400390625,
0.005046844482421875,
-0.0039520263671875,
-0.00865936279296875,
-0.045867919921875,
-0.02685546875,
0.0127410888671875,
0.01535797119140625,
-0.0258331298828125,
-0.0026111602783203125,
-0.005825042724609375,
-0.00508880615234375,
-0.0226593017578125,
-0.00769805908203125,
-0.0007658004760742188,
-0.050384521484375,
-0.006427764892578125,
0.0290985107421875,
0.047698974609375,
0.006168365478515625,
0.03619384765625,
-0.060943603515625,
0.0089569091796875,
-0.0169677734375,
0.0139923095703125,
-0.051971435546875,
0.03558349609375,
-0.030731201171875,
0.0290985107421875,
-0.01641845703125,
-0.0242462158203125,
-0.00283050537109375,
0.003391265869140625,
-0.0197906494140625,
-0.0015020370483398438,
-0.01146697998046875,
0.00635528564453125,
-0.001224517822265625,
0.060333251953125,
-0.0041046142578125,
-0.032379150390625,
-0.004573822021484375,
0.01641845703125,
-0.034912109375,
-0.01532745361328125,
0.027984619140625,
-0.05548095703125,
-0.03228759765625,
-0.014678955078125,
-0.01263427734375,
0.0255889892578125,
-0.0411376953125,
-0.037017822265625,
-0.0152435302734375,
-0.04254150390625,
0.031463623046875,
-0.051422119140625,
-0.08624267578125,
0.0248260498046875,
-0.0267791748046875,
-0.05474853515625,
0.0212554931640625,
0.0360107421875,
-0.0496826171875,
-0.004535675048828125,
0.007419586181640625,
0.043060302734375,
-0.0214996337890625,
-0.0021457672119140625,
0.0230865478515625,
-0.00867462158203125,
-0.00751495361328125,
0.01401519775390625,
-0.01210784912109375,
0.032257080078125,
-0.0003783702850341797,
0.0426025390625,
-0.005161285400390625,
0.039825439453125,
0.0222930908203125,
0.00046563148498535156,
-0.014434814453125,
0.0246124267578125,
-0.00853729248046875,
0.031646728515625,
0.004192352294921875,
-0.0074310302734375,
0.0267486572265625,
-0.03125,
0.01441192626953125,
0.00412750244140625,
0.0165252685546875,
0.014190673828125,
-0.021331787109375,
-0.030548095703125,
-0.0100860595703125,
0.003437042236328125
] |
8e87452f0cf0c23cdadd238a9188e88fb935b163
|
Wordpress Stackexchange
Q: How can I publish Word files to a WordPress blog without losing the footnotes? I would like to take the contents from Microsoft Word files and convert them into WordPress blog posts without losing the footnotes. I've tried many different methods but have not found a simple working solution to this basic issue. The ideal solution would automatically upload a Word file (or many files) to a WordPress blog and convert the footnotes to HTML anchors.
A: Wordpress Core does not support converting DOC files into posts. You might want to look at the range of importers that are available: Importing Content (Wordpress Codex).
However the concept to import text into one blog post looks like a refreshing new concept to wordpress, core does not support anything at all of that.
Basically if you can convert something into a HTML fragment, you can just copy/paste that HTML over into the HTML editor of the post.
HTML has nothing like footnotes, so the conversion will lack of that feature and can only simulate footnotes then.
|
Q: How can I publish Word files to a WordPress blog without losing the footnotes? I would like to take the contents from Microsoft Word files and convert them into WordPress blog posts without losing the footnotes. I've tried many different methods but have not found a simple working solution to this basic issue. The ideal solution would automatically upload a Word file (or many files) to a WordPress blog and convert the footnotes to HTML anchors.
A: Wordpress Core does not support converting DOC files into posts. You might want to look at the range of importers that are available: Importing Content (Wordpress Codex).
However the concept to import text into one blog post looks like a refreshing new concept to wordpress, core does not support anything at all of that.
Basically if you can convert something into a HTML fragment, you can just copy/paste that HTML over into the HTML editor of the post.
HTML has nothing like footnotes, so the conversion will lack of that feature and can only simulate footnotes then.
A: I was attempting to do the same thing. I found cloudconvert which seems to do a nice job of this (no affiliation to me). It's not a drop-in solution but it is something that could work. They have a free tier of usage and reasonable prices beyond that.
You can also try just using the 'Save as HTML' from Word which gets pretty close.
|
wordpress
|
{
"language": "en",
"length": 240,
"provenance": "stackexchange_00019.jsonl.gz:408265",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13645"
}
|
[
0.00537872314453125,
-0.0038471221923828125,
0.037139892578125,
0.043243408203125,
-0.0278472900390625,
-0.0145721435546875,
0.05023193359375,
-0.05841064453125,
0.0140838623046875,
0.01218414306640625,
-0.029327392578125,
0.0214080810546875,
-0.002765655517578125,
-0.010650634765625,
0.0022258758544921875,
-0.01279449462890625,
0.052825927734375,
-0.0419921875,
0.0175933837890625,
0.0018939971923828125,
-0.00576019287109375,
0.041168212890625,
0.056549072265625,
0.0347900390625,
0.015899658203125,
-0.0095367431640625,
0.057159423828125,
-0.03118896484375,
0.0207366943359375,
-0.0157470703125,
0.01544952392578125,
-0.01200103759765625,
0.062042236328125,
0.01806640625,
-0.07708740234375,
-0.0011949539184570312,
-0.035919189453125,
-0.00998687744140625,
-0.0394287109375,
0.039703369140625,
-0.0134735107421875,
0.0227203369140625,
0.053497314453125,
0.0007734298706054688,
0.01629638671875,
-0.021392822265625,
-0.0198211669921875,
-0.06268310546875,
0.006961822509765625,
-0.00870513916015625,
0.032501220703125,
-0.003307342529296875,
0.059417724609375,
-0.05615234375,
-0.033966064453125,
-0.0233612060546875,
0.00429534912109375,
0.0030498504638671875,
0.0091705322265625,
-0.041168212890625,
-0.019287109375,
0.0294952392578125,
0.023834228515625,
0.054962158203125,
0.0021800994873046875,
-0.0001589059829711914,
-0.0290374755859375,
-0.0009217262268066406,
-0.0538330078125,
0.02288818359375,
0.05694580078125,
-0.060150146484375,
-0.0026702880859375,
-0.026519775390625,
0.04547119140625,
0.01305389404296875,
-0.0377197265625,
-0.03955078125,
0.00934600830078125,
0.0390625,
0.03424072265625,
0.035552978515625,
-0.01071929931640625,
-0.037139892578125,
-0.019989013671875,
-0.04425048828125,
-0.0009245872497558594,
-0.005855560302734375,
-0.033416748046875,
-0.0161895751953125,
-0.025360107421875,
0.0158843994140625,
-0.0565185546875,
0.007328033447265625,
-0.0140380859375,
-0.0044708251953125,
-0.01342010498046875,
0.005138397216796875,
-0.01305389404296875,
0.038787841796875,
-0.001689910888671875,
-0.035888671875,
0.052001953125,
-0.03326416015625,
0.0126495361328125,
0.069580078125,
-0.01824951171875,
-0.037872314453125,
0.021881103515625,
-0.005435943603515625,
0.007686614990234375,
-0.0012950897216796875,
0.01806640625,
-0.0762939453125,
0.032196044921875,
0.071533203125,
0.05584716796875,
0.03350830078125,
0.0277862548828125,
0.0030517578125,
-0.01299285888671875,
0.007007598876953125,
-0.0196380615234375,
0.017303466796875,
-0.0010404586791992188,
-0.0214385986328125,
0.009674072265625,
0.0191192626953125,
0.04852294921875,
0.0300750732421875,
-0.021392822265625,
0.007633209228515625,
0.029998779296875,
-0.0082550048828125,
-0.01068115234375,
-0.010528564453125,
-0.00875091552734375,
-0.004718780517578125,
-0.0295257568359375,
0.0287322998046875,
-0.004116058349609375,
-0.053436279296875,
-0.00933074951171875,
-0.0215911865234375,
0.005420684814453125,
0.020050048828125,
0.0218658447265625,
0.0133056640625,
0.0099639892578125,
0.004085540771484375,
-0.043548583984375,
0.0249481201171875,
0.04351806640625,
-0.0258331298828125,
-0.0163116455078125,
-0.1346435546875,
-0.00598907470703125,
-0.07421875,
0.09344482421875,
-0.06256103515625,
-0.0011396408081054688,
0.01015472412109375,
0.0230255126953125,
-0.03643798828125,
-0.0308685302734375,
-0.02276611328125,
-0.03558349609375,
0.0003330707550048828,
0.031707763671875,
0.0278472900390625,
-0.00891876220703125,
-0.0196075439453125,
0.017364501953125,
0.007404327392578125,
-0.01428985595703125,
0.019866943359375,
0.0284423828125,
0.01300048828125,
0.0026874542236328125,
0.043609619140625,
0.00901031494140625,
-0.0288543701171875,
0.067626953125,
-0.036834716796875,
-0.00836181640625,
-0.007564544677734375,
0.00579833984375,
0.017303466796875,
0.015380859375,
0.0217132568359375,
0.00833892822265625,
-0.0102386474609375,
-0.003665924072265625,
0.0175018310546875,
-0.038543701171875,
-0.037933349609375,
0.0217132568359375,
0.023406982421875,
-0.025146484375,
0.0159149169921875,
-0.0335693359375,
0.0044708251953125,
-0.004894256591796875,
0.0030765533447265625,
0.0252685546875,
-0.037261962890625,
0.012176513671875,
0.020843505859375,
-0.0028476715087890625,
0.0204010009765625,
0.0158538818359375,
0.04071044921875,
-0.0180206298828125,
-0.0374755859375,
-0.02374267578125,
0.01219940185546875,
-0.002193450927734375,
-0.00228118896484375,
0.0119476318359375,
-0.0157928466796875,
0.01300048828125,
0.01290130615234375,
-0.000858306884765625,
0.0232391357421875,
0.0135040283203125,
-0.04791259765625,
0.0033283233642578125,
-0.0323486328125,
-0.014739990234375,
-0.008209228515625,
0.0006856918334960938,
0.0281829833984375,
0.00951385498046875,
-0.0201263427734375,
-0.0345458984375,
-0.0123291015625,
-0.01520538330078125,
-0.045318603515625,
0.019287109375,
0.062408447265625,
0.0206146240234375,
0.033905029296875,
-0.00682830810546875,
0.0016698837280273438,
0.05908203125,
-0.00782012939453125,
0.002880096435546875,
0.0092315673828125,
0.014556884765625,
0.0369873046875,
0.0026988983154296875,
-0.01450347900390625,
0.0233306884765625,
-0.04248046875,
-0.0028781890869140625,
0.0352783203125,
0.0215606689453125,
-0.0079193115234375,
-0.038238525390625,
0.0305938720703125,
0.01213836669921875,
-0.006011962890625,
-0.0604248046875,
0.0034427642822265625,
-0.014068603515625,
0.0438232421875,
0.0294189453125,
0.033721923828125,
-0.046966552734375,
0.01241302490234375,
0.0189666748046875,
0.06787109375,
0.0218963623046875,
0.04534912109375,
-0.006946563720703125,
0.051025390625,
0.007747650146484375,
-0.04827880859375,
0.04638671875,
0.04803466796875,
-0.009613037109375,
0.0010967254638671875,
0.0089263916015625,
-0.01314544677734375,
0.0232086181640625,
0.01465606689453125,
0.01531982421875,
-0.0160675048828125,
-0.0272064208984375,
-0.0222320556640625,
0.003978729248046875,
0.043792724609375,
0.01303863525390625,
0.00213623046875,
0.04443359375,
0.0118408203125,
0.0226898193359375,
-0.07080078125,
0.050384521484375,
-0.0176544189453125,
0.043853759765625,
0.07958984375,
0.033111572265625,
-0.0116729736328125,
-0.0073089599609375,
0.03692626953125,
0.000682830810546875,
-0.0159454345703125,
-0.0237274169921875,
-0.0114288330078125,
-0.016937255859375,
0.00440216064453125,
-0.0004134178161621094,
0.058685302734375,
-0.0457763671875,
-0.07489013671875,
-0.01317596435546875,
-0.006824493408203125,
-0.07745361328125,
-0.0458984375,
-0.00400543212890625,
-0.0648193359375,
0.00827789306640625,
0.00702667236328125,
-0.03851318359375,
-0.015869140625,
0.03857421875,
0.0031909942626953125,
0.01131439208984375,
-0.0110015869140625,
-0.0716552734375,
-0.03533935546875,
-0.09783935546875,
-0.0276947021484375,
-0.017303466796875,
0.00928497314453125,
0.0256805419921875,
0.0025577545166015625,
0.0180206298828125,
-0.0192413330078125,
0.034332275390625,
0.08319091796875,
-0.0169219970703125,
-0.01120758056640625,
0.03631591796875,
-0.041656494140625,
-0.02862548828125,
-0.004085540771484375,
0.03338623046875,
0.026641845703125,
-0.03070068359375,
0.0189971923828125,
-0.01309967041015625,
0.00641632080078125,
-0.0019779205322265625,
-0.0064697265625,
0.0126953125,
0.00811004638671875,
-0.0161895751953125,
-0.043914794921875,
-0.00626373291015625,
0.03253173828125,
-0.0124969482421875,
-0.031829833984375,
-0.015289306640625,
-0.02520751953125,
-0.0189971923828125,
0.0137176513671875,
0.03204345703125,
0.07666015625,
0.00995635986328125,
0.048980712890625,
-0.0263519287109375,
-0.031707763671875,
-0.031982421875,
-0.04345703125,
0.041717529296875,
0.0025177001953125,
-0.01727294921875,
-0.007038116455078125,
0.03570556640625,
-0.01029205322265625,
0.02996826171875,
-0.045684814453125,
-0.06427001953125,
0.054229736328125,
-0.07568359375,
-0.03460693359375,
-0.031402587890625,
-0.0089569091796875,
-0.00701141357421875,
0.06146240234375,
-0.0440673828125,
-0.025421142578125,
0.017181396484375,
0.01039886474609375,
-0.006824493408203125,
-0.0310211181640625,
-0.025909423828125,
-0.0239715576171875,
0.006488800048828125,
-0.00864410400390625,
-0.0218963623046875,
0.01451873779296875,
-0.0117645263671875,
0.0222015380859375,
0.0121002197265625,
-0.0204620361328125,
0.00812530517578125,
-0.0167236328125,
0.061737060546875,
-0.0012149810791015625,
0.0262603759765625,
0.01219940185546875,
0.0279541015625,
-0.06768798828125,
-0.036468505859375,
-0.00972747802734375,
-0.0197296142578125,
0.0293426513671875,
0.011474609375,
-0.008819580078125,
0.0203857421875,
0.04351806640625,
-0.031951904296875,
-0.0002779960632324219,
0.01396942138671875,
0.05108642578125,
0.0148468017578125,
-0.0280609130859375,
0.001445770263671875,
-0.04803466796875,
-0.01038360595703125,
-0.036590576171875,
-0.0272064208984375,
0.005443572998046875,
-0.008636474609375,
-0.007541656494140625,
0.0186004638671875,
-0.006000518798828125,
0.002819061279296875,
-0.0113983154296875,
-0.00939178466796875,
0.024749755859375,
-0.00786590576171875,
-0.0254364013671875,
-0.01454925537109375,
-0.01068878173828125,
0.02972412109375,
0.03228759765625,
-0.030029296875,
-0.006610870361328125,
0.032257080078125,
0.0269622802734375,
-0.0222015380859375,
-0.0487060546875,
0.0213470458984375,
0.042022705078125,
0.035003662109375,
0.0390625,
0.019744873046875,
-0.023712158203125,
0.037933349609375,
0.03253173828125,
-0.01317596435546875,
0.0009260177612304688,
0.03118896484375,
0.01256561279296875,
0.00740814208984375,
-0.0130462646484375,
-0.01137542724609375,
0.020233154296875,
0.007305145263671875,
-0.009246826171875,
-0.0079803466796875,
0.02081298828125,
0.0343017578125,
0.006900787353515625,
-0.0014181137084960938,
-0.037933349609375,
-0.0347900390625,
0.0096588134765625,
-0.00890350341796875,
0.00567626953125,
0.00870513916015625,
0.0052032470703125,
-0.005340576171875,
0.0218963623046875,
-0.0377197265625,
-0.01268768310546875,
-0.057830810546875,
0.002109527587890625,
-0.019134521484375,
-0.01105499267578125,
-0.043243408203125,
0.0187530517578125,
-0.008697509765625,
0.05645751953125,
-0.0225677490234375,
-0.07098388671875,
0.01107025146484375,
-0.01526641845703125,
0.02020263671875,
0.051177978515625,
-0.037689208984375,
0.0176544189453125,
0.028472900390625,
-0.003833770751953125,
-0.0079498291015625,
-0.046905517578125,
-0.0220184326171875,
-0.044189453125,
0.0024433135986328125,
-0.00946807861328125,
-0.01654052734375,
0.035491943359375,
0.0006499290466308594,
-0.03472900390625,
0.0142669677734375,
-0.01371002197265625,
0.0230712890625,
0.006649017333984375,
0.006580352783203125,
0.0205535888671875,
0.0018711090087890625,
-0.0023670196533203125,
-0.015869140625,
-0.002094268798828125,
-0.04327392578125,
0.006618499755859375,
0.004383087158203125,
0.0592041015625,
-0.0350341796875,
-0.049163818359375,
0.023773193359375,
-0.0634765625,
-0.0061798095703125,
-0.033111572265625,
-0.0361328125,
-0.0030612945556640625,
0.020782470703125,
-0.00659942626953125,
-0.01104736328125,
0.00791168212890625,
0.01186370849609375,
-0.043304443359375,
-0.0032520294189453125,
-0.01267242431640625,
0.005970001220703125,
-0.032562255859375,
-0.005645751953125,
-0.015960693359375,
-0.0030155181884765625,
-0.0109710693359375,
-0.00335693359375,
-0.032257080078125,
-0.0144195556640625,
-0.0208740234375,
-0.0171661376953125,
0.052093505859375,
-0.0003139972686767578,
-0.005767822265625,
-0.047943115234375,
0.02386474609375,
-0.042144775390625,
-0.005825042724609375,
0.0484619140625,
0.0084686279296875,
-0.0276947021484375,
-0.0009622573852539062,
-0.03955078125,
-0.029205322265625,
0.033203125,
-0.002063751220703125,
-0.03228759765625,
-0.01163482666015625,
0.01464080810546875,
0.042510986328125,
-0.01181793212890625,
-0.045562744140625,
-0.015228271484375,
-0.023590087890625,
0.000919342041015625,
0.0199737548828125,
-0.0029087066650390625,
0.029144287109375,
-0.01354217529296875,
0.0298919677734375,
0.00005358457565307617,
-0.0032444000244140625,
-0.01338958740234375,
-0.025238037109375,
0.0019140243530273438,
-0.11407470703125,
-0.0013208389282226562,
-0.005645751953125,
-0.0054168701171875,
0.0277862548828125,
-0.027069091796875,
0.02362060546875,
-0.005947113037109375,
-0.010040283203125,
0.0062713623046875,
-0.0162200927734375,
0.014678955078125,
0.0013132095336914062,
-0.0316162109375,
0.0288848876953125,
-0.0189971923828125,
0.04034423828125,
-0.0236358642578125,
0.0037689208984375,
0.02276611328125,
-0.0283660888671875,
0.01763916015625,
0.032745361328125,
0.012969970703125,
-0.0283050537109375,
0.0064697265625,
0.005096435546875,
0.0185089111328125,
0.0264129638671875,
0.014678955078125,
-0.007617950439453125,
0.0254669189453125,
-0.0040740966796875,
0.004741668701171875,
0.017486572265625,
-0.010009765625,
-0.0244293212890625,
-0.01006317138671875,
-0.03955078125,
0.0241851806640625,
0.07476806640625,
0.0574951171875,
-0.097900390625,
0.014984130859375,
0.0081024169921875,
-0.0147857666015625,
0.0487060546875,
-0.003971099853515625,
-0.00018930435180664062,
0.0037555694580078125,
0.01090240478515625,
0.01374053955078125,
-0.0151214599609375,
0.01314544677734375,
0.017486572265625,
0.0008635520935058594,
-0.02984619140625,
0.017333984375,
0.0193023681640625,
-0.058502197265625,
0.02093505859375,
0.044189453125,
-0.00965118408203125,
-0.0173187255859375,
0.018341064453125,
-0.050811767578125,
-0.00012052059173583984,
-0.0390625,
-0.032073974609375,
-0.02032470703125,
0.0028896331787109375,
-0.0081024169921875,
-0.00830078125,
0.023651123046875,
0.037139892578125,
-0.0252685546875,
0.00983428955078125,
0.01183319091796875,
0.03173828125,
-0.03704833984375,
-0.006305694580078125,
-0.01233673095703125,
0.051239013671875,
-0.0005903244018554688,
0.0141448974609375,
-0.01224517822265625,
0.0111236572265625,
0.0009636878967285156,
-0.014068603515625,
0.05108642578125,
-0.0308685302734375,
-0.0174102783203125,
0.03521728515625,
-0.030181884765625,
-0.02227783203125,
-0.0200653076171875,
0.033599853515625,
-0.050628662109375,
-0.004558563232421875,
-0.00020313262939453125,
-0.0050506591796875,
-0.0195465087890625,
-0.0263671875,
-0.0665283203125,
0.10662841796875,
-0.0005006790161132812,
0.00260162353515625,
-0.004528045654296875,
0.052764892578125,
-0.0027904510498046875,
0.05145263671875,
-0.0294342041015625,
0.06060791015625,
0.043060302734375,
0.031707763671875,
-0.05340576171875,
-0.032501220703125,
0.0013856887817382812,
0.051361083984375,
0.035491943359375,
0.006317138671875,
-0.033905029296875,
-0.01425933837890625,
0.0738525390625,
0.0718994140625,
0.03570556640625,
0.0157928466796875,
-0.01352691650390625,
0.0235137939453125,
0.00792694091796875,
-0.0294189453125,
0.0287933349609375,
-0.0258026123046875,
-0.038604736328125,
0.0083160400390625,
0.0125274658203125,
0.005062103271484375,
0.013336181640625,
-0.029815673828125,
0.0171661376953125,
-0.002227783203125,
-0.007740020751953125,
-0.0305938720703125,
0.015655517578125,
0.0430908203125,
0.04449462890625,
-0.043792724609375,
-0.0211334228515625,
-0.0210113525390625,
0.038787841796875,
-0.0131378173828125,
0.0186309814453125,
0.006591796875,
0.00751495361328125,
0.0704345703125,
-0.0277099609375,
-0.0005841255187988281,
0.033935546875,
-0.021331787109375,
0.023773193359375,
0.0244293212890625,
0.037933349609375,
-0.006961822509765625,
0.00376129150390625,
0.030059814453125,
0.0222015380859375,
-0.03192138671875,
0.0311279296875,
0.004009246826171875,
0.002880096435546875,
-0.0025081634521484375,
-0.06634521484375,
0.00238800048828125,
-0.000499725341796875,
-0.033050537109375,
0.0209197998046875,
-0.021240234375,
0.00716400146484375,
-0.01032257080078125,
0.0087432861328125,
0.0185699462890625,
0.032440185546875,
0.017822265625,
-0.0206146240234375,
0.00855255126953125,
0.0335693359375,
0.0087127685546875,
-0.011932373046875,
0.06427001953125,
0.0251312255859375,
0.01068878173828125,
-0.00261688232421875,
0.0217132568359375,
0.01105499267578125,
-0.0026836395263671875,
-0.02783203125,
-0.032684326171875,
0.0141143798828125,
0.038665771484375,
-0.020477294921875,
0.018951416015625,
0.051666259765625,
0.07818603515625,
-0.0338134765625,
-0.03564453125,
0.054046630859375,
-0.01201629638671875,
-0.0184173583984375,
0.0231170654296875,
-0.06744384765625,
-0.0114593505859375,
-0.041717529296875,
-0.0107879638671875,
0.02740478515625,
0.01044464111328125,
0.01540374755859375,
0.026611328125,
0.013092041015625,
0.004154205322265625,
0.030242919921875,
-0.0018911361694335938,
0.0009965896606445312,
0.034942626953125,
-0.0479736328125,
0.01171112060546875,
-0.0212249755859375,
-0.051910400390625,
0.020660400390625,
0.036712646484375,
-0.0394287109375,
0.01219940185546875,
-0.004467010498046875,
-0.001194000244140625,
0.0220184326171875,
-0.0261688232421875,
0.013946533203125,
0.026153564453125,
0.01233673095703125,
0.006988525390625,
-0.07379150390625,
-0.048980712890625,
-0.0657958984375,
0.080078125,
0.006404876708984375,
0.1265869140625,
-0.057159423828125,
0.041290283203125,
-0.0279388427734375,
0.010009765625,
-0.044677734375,
-0.0157012939453125,
-0.041534423828125,
-0.004222869873046875,
0.0157928466796875,
0.007282257080078125,
-0.028472900390625,
0.006061553955078125,
0.0221405029296875,
-0.007152557373046875,
-0.009033203125,
-0.0170135498046875,
0.0142669677734375,
0.0157012939453125,
0.01088714599609375,
-0.029571533203125,
-0.01500701904296875,
0.0177459716796875,
-0.009490966796875,
0.005268096923828125,
-0.027984619140625,
0.01215362548828125,
0.0307159423828125,
0.07281494140625,
-0.031158447265625,
0.041229248046875,
-0.0413818359375,
0.0836181640625,
0.045989990234375,
0.052093505859375,
-0.006122589111328125,
0.046295166015625,
-0.00785064697265625,
0.01189422607421875,
0.01059722900390625,
0.02862548828125,
0.0302734375,
-0.088134765625,
-0.0091094970703125,
0.01055145263671875,
0.05938720703125,
0.0193634033203125,
0.03497314453125,
-0.05487060546875,
0.001415252685546875,
0.0189971923828125,
0.0101470947265625,
-0.0055389404296875,
-0.034881591796875,
-0.0401611328125,
0.00847625732421875,
-0.06048583984375,
-0.034881591796875,
-0.061859130859375,
-0.0704345703125,
0.0224151611328125,
-0.007740020751953125,
0.00693511962890625,
-0.023590087890625,
0.005214691162109375,
-0.0233306884765625,
-0.00806427001953125,
-0.0021915435791015625,
-0.0012273788452148438,
0.0147552490234375,
-0.045196533203125,
-0.0535888671875,
-0.035369873046875,
0.040008544921875,
-0.054779052734375,
0.04205322265625,
0.039794921875,
-0.045928955078125,
-0.0073394775390625,
0.040924072265625,
0.057037353515625,
0.09320068359375,
0.01120758056640625,
-0.0035419464111328125,
-0.0281219482421875,
0.0171356201171875,
-0.02484130859375,
-0.02978515625,
0.039764404296875,
-0.045257568359375,
-0.06024169921875,
-0.005443572998046875,
-0.029693603515625,
-0.0338134765625,
-0.04901123046875,
-0.0556640625,
-0.044647216796875,
0.006336212158203125,
-0.05609130859375,
-0.0264129638671875,
-0.04339599609375,
-0.0277862548828125,
0.06103515625,
0.0021114349365234375,
-0.00708770751953125,
-0.02313232421875,
0.05694580078125,
-0.0255279541015625,
0.048583984375,
0.00238800048828125,
-0.042449951171875,
0.0244293212890625,
0.0237884521484375,
0.0338134765625,
-0.024139404296875,
0.0037670135498046875,
0.0013837814331054688,
0.0264892578125,
0.042236328125,
-0.026123046875,
-0.004749298095703125,
0.0037975311279296875,
-0.018829345703125,
0.0126800537109375,
-0.02239990234375,
-0.055999755859375,
-0.026336669921875,
0.037109375,
0.054290771484375,
0.0215301513671875,
-0.01409149169921875,
0.032501220703125,
-0.00691986083984375,
-0.05419921875,
-0.01119232177734375,
0.0088958740234375,
-0.03173828125,
-0.01149749755859375,
-0.0018711090087890625,
0.01042938232421875,
-0.004364013671875,
-0.03729248046875,
-0.0322265625,
-0.026519775390625,
-0.0562744140625,
0.012420654296875,
-0.023956298828125,
0.004146575927734375,
0.05859375,
-0.027313232421875,
0.0240325927734375,
0.00975799560546875,
0.0001747608184814453,
0.049224853515625,
0.03790283203125,
-0.01131439208984375,
0.0022716522216796875,
0.004184722900390625,
0.042938232421875,
0.00597381591796875,
0.004138946533203125,
-0.02197265625,
0.00833892822265625,
0.0298919677734375,
0.006610870361328125,
-0.01763916015625,
0.011566162109375,
0.011688232421875,
0.006587982177734375,
-0.042083740234375,
0.0396728515625,
-0.01214599609375,
-0.038299560546875,
-0.01013946533203125,
0.017059326171875,
-0.0245513916015625,
-0.00185394287109375,
0.00020456314086914062,
-0.0306243896484375,
-0.010894775390625,
0.0203094482421875,
-0.03289794921875,
-0.049072265625,
0.0166015625,
-0.03228759765625,
0.0052490234375,
0.019317626953125
] |
9ad6df23a9daeca3964d8b36a8f76cdb1644756f
|
Wordpress Stackexchange
Q: Search multiple custom fields by using meta_query I'm trying to create a search results listing for a custom post type and the problem I'm running in to is with the way the 'meta_query' parameter is stringing the passed values together. It appears to be treating each 'meta_query' value as an 'AND' rather than 'OR'. Here is the code I'm using:
$strsearch = 'lorem';
$args = array(
'post_type' => 'products',
'meta_query' => array(
array('key' => '_product_make','compare' => 'LIKE','value' => $strsearch),
array('key' => '_product_model','compare' => 'LIKE','value' => $strsearch)
)
,'s' => $strsearch);
$resource_query = new WP_Query($args);
When I search anyone of the fields individually I get the desired results. When I use them together it comes up as not found since the string I'm searching for may only occur in one of the three fields listed below. Is there any way to have 'meta_query' treat each of the passed field comparisons as 'OR'?
A: Yes, since WP 3.2 you can set the 'relation' arg:
'meta_query' => array(
'relation' => 'OR',
array('key' => '_product_make','compare' => 'LIKE','value' => $strsearch),
array('key' => '_product_model','compare' => 'LIKE','value' => $strsearch)
)
See http://core.trac.wordpress.org/ticket/17011
|
Q: Search multiple custom fields by using meta_query I'm trying to create a search results listing for a custom post type and the problem I'm running in to is with the way the 'meta_query' parameter is stringing the passed values together. It appears to be treating each 'meta_query' value as an 'AND' rather than 'OR'. Here is the code I'm using:
$strsearch = 'lorem';
$args = array(
'post_type' => 'products',
'meta_query' => array(
array('key' => '_product_make','compare' => 'LIKE','value' => $strsearch),
array('key' => '_product_model','compare' => 'LIKE','value' => $strsearch)
)
,'s' => $strsearch);
$resource_query = new WP_Query($args);
When I search anyone of the fields individually I get the desired results. When I use them together it comes up as not found since the string I'm searching for may only occur in one of the three fields listed below. Is there any way to have 'meta_query' treat each of the passed field comparisons as 'OR'?
A: Yes, since WP 3.2 you can set the 'relation' arg:
'meta_query' => array(
'relation' => 'OR',
array('key' => '_product_make','compare' => 'LIKE','value' => $strsearch),
array('key' => '_product_model','compare' => 'LIKE','value' => $strsearch)
)
See http://core.trac.wordpress.org/ticket/17011
|
wordpress
|
{
"language": "en",
"length": 186,
"provenance": "stackexchange_00019.jsonl.gz:408272",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/13664"
}
|
[
0.004604339599609375,
-0.0193634033203125,
-0.0018854141235351562,
-0.01081085205078125,
-0.0137939453125,
-0.01413726806640625,
0.0302886962890625,
0.0007381439208984375,
0.002460479736328125,
0.00687408447265625,
0.00008255243301391602,
-0.0333251953125,
-0.06951904296875,
-0.030975341796875,
-0.040679931640625,
-0.06536865234375,
0.005771636962890625,
0.0241546630859375,
0.034637451171875,
-0.0207366943359375,
0.059295654296875,
-0.043121337890625,
0.0108184814453125,
0.010711669921875,
0.0474853515625,
-0.06768798828125,
0.0450439453125,
-0.034210205078125,
0.0577392578125,
0.004016876220703125,
0.03277587890625,
-0.041168212890625,
0.02935791015625,
-0.0128021240234375,
0.0241546630859375,
0.0227508544921875,
0.039947509765625,
-0.01081085205078125,
0.00373077392578125,
0.0264129638671875,
0.023712158203125,
-0.0104217529296875,
-0.023162841796875,
0.043975830078125,
-0.017791748046875,
-0.051910400390625,
0.031829833984375,
-0.0228118896484375,
0.0291748046875,
0.00833892822265625,
-0.027587890625,
0.01329803466796875,
-0.02618408203125,
-0.0172271728515625,
-0.019927978515625,
-0.037872314453125,
-0.0303497314453125,
-0.004638671875,
0.019134521484375,
0.0031375885009765625,
0.0011663436889648438,
-0.01061248779296875,
0.010345458984375,
0.007511138916015625,
-0.0118560791015625,
-0.0018949508666992188,
-0.01374053955078125,
0.01654052734375,
0.009490966796875,
-0.0307159423828125,
-0.0008654594421386719,
0.0089874267578125,
0.011077880859375,
-0.019439697265625,
-0.0269927978515625,
-0.03704833984375,
0.0111236572265625,
-0.0377197265625,
0.0007596015930175781,
0.020355224609375,
-0.0221710205078125,
-0.03314208984375,
-0.0377197265625,
-0.0261688232421875,
0.0194244384765625,
0.0014934539794921875,
-0.017181396484375,
0.003265380859375,
0.00860595703125,
-0.03338623046875,
-0.00495147705078125,
-0.07489013671875,
-0.0122528076171875,
0.030517578125,
-0.003444671630859375,
-0.042083740234375,
0.01288604736328125,
0.0024967193603515625,
-0.0004074573516845703,
0.003032684326171875,
0.01751708984375,
-0.0517578125,
0.018951416015625,
0.0005865097045898438,
0.0175628662109375,
-0.0006432533264160156,
-0.0245513916015625,
-0.00397491455078125,
0.06500244140625,
0.0538330078125,
0.004268646240234375,
0.05450439453125,
-0.03350830078125,
0.005374908447265625,
-0.0457763671875,
0.03289794921875,
-0.0355224609375,
-0.0198516845703125,
-0.01611328125,
0.031829833984375,
0.002101898193359375,
0.01308441162109375,
0.03582763671875,
-0.02947998046875,
0.02960205078125,
0.01751708984375,
-0.0074615478515625,
-0.04425048828125,
0.00008887052536010742,
0.0028820037841796875,
-0.0260772705078125,
0.00881195068359375,
0.03076171875,
0.04998779296875,
0.00289154052734375,
0.0012912750244140625,
0.028717041015625,
-0.022918701171875,
-0.005985260009765625,
0.0159912109375,
0.030731201171875,
-0.0309295654296875,
-0.006084442138671875,
0.0076751708984375,
0.003814697265625,
-0.0124359130859375,
0.013427734375,
0.0333251953125,
0.01016998291015625,
-0.0117645263671875,
-0.015869140625,
0.0189208984375,
0.032562255859375,
-0.007480621337890625,
-0.0227813720703125,
-0.006519317626953125,
0.013092041015625,
-0.01904296875,
-0.02105712890625,
-0.044097900390625,
-0.003986358642578125,
0.00977325439453125,
0.013916015625,
-0.0567626953125,
-0.064208984375,
-0.0289306640625,
-0.01727294921875,
-0.01267242431640625,
0.02117919921875,
0.01117706298828125,
0.004016876220703125,
0.0020618438720703125,
0.056854248046875,
0.01248931884765625,
-0.0072021484375,
0.0169525146484375,
0.004245758056640625,
0.0157318115234375,
0.0120086669921875,
-0.0096282958984375,
-0.021728515625,
-0.044952392578125,
0.027496337890625,
-0.005229949951171875,
-0.06463623046875,
0.0887451171875,
-0.00689697265625,
0.038421630859375,
-0.005397796630859375,
-0.0218505859375,
0.06298828125,
0.059417724609375,
-0.011810302734375,
0.0203704833984375,
-0.00791168212890625,
-0.04595947265625,
0.0174407958984375,
-0.01105499267578125,
-0.00466156005859375,
0.015960693359375,
0.042633056640625,
0.0281982421875,
-0.0058441162109375,
0.0095672607421875,
-0.09832763671875,
0.059814453125,
-0.044586181640625,
0.03887939453125,
-0.050445556640625,
0.0293121337890625,
0.0253143310546875,
-0.0172882080078125,
-0.0292816162109375,
0.06317138671875,
0.031829833984375,
-0.049896240234375,
0.01123809814453125,
0.034698486328125,
-0.00215911865234375,
-0.006931304931640625,
0.0147705078125,
-0.040313720703125,
0.01812744140625,
0.0509033203125,
0.036468505859375,
0.00904083251953125,
-0.00704193115234375,
0.0033092498779296875,
0.049407958984375,
0.02374267578125,
-0.01861572265625,
-0.00974273681640625,
0.07171630859375,
0.04620361328125,
-0.0034351348876953125,
0.042694091796875,
0.034088134765625,
-0.06787109375,
-0.003170013427734375,
0.039215087890625,
0.0276336669921875,
0.053619384765625,
0.0234375,
0.0232391357421875,
0.06927490234375,
-0.0211639404296875,
0.01409912109375,
-0.01406097412109375,
0.00820159912109375,
0.059600830078125,
-0.0186767578125,
-0.004085540771484375,
0.0024700164794921875,
-0.0131988525390625,
-0.0191497802734375,
0.0252227783203125,
-0.034271240234375,
0.006313323974609375,
-0.0279693603515625,
-0.00457000732421875,
-0.010528564453125,
-0.060394287109375,
0.005519866943359375,
-0.033721923828125,
0.034912109375,
-0.0022449493408203125,
0.025115966796875,
0.0227508544921875,
-0.04443359375,
0.007022857666015625,
0.0243682861328125,
0.0196075439453125,
-0.01153564453125,
-0.031341552734375,
-0.050079345703125,
-0.006389617919921875,
-0.06011962890625,
0.058197021484375,
0.005123138427734375,
-0.033660888671875,
0.0077972412109375,
0.017791748046875,
-0.0276641845703125,
0.0036334991455078125,
-0.0180816650390625,
-0.04443359375,
0.00923919677734375,
0.042236328125,
0.0178985595703125,
-0.018463134765625,
0.03436279296875,
0.0161285400390625,
0.0012941360473632812,
0.014190673828125,
-0.030059814453125,
-0.02825927734375,
-0.01222991943359375,
-0.0272216796875,
0.0487060546875,
-0.0333251953125,
0.021942138671875,
0.07098388671875,
-0.028533935546875,
0.029876708984375,
0.0001035928726196289,
0.0006895065307617188,
-0.053863525390625,
0.0308380126953125,
-0.001636505126953125,
-0.0286102294921875,
-0.05731201171875,
0.004791259765625,
0.05084228515625,
0.032928466796875,
0.0787353515625,
0.007099151611328125,
0.0400390625,
0.065673828125,
-0.046356201171875,
-0.1146240234375,
0.039642333984375,
-0.006221771240234375,
-0.0213165283203125,
-0.01403045654296875,
-0.021331787109375,
-0.0033435821533203125,
-0.020172119140625,
-0.01421356201171875,
0.02886962890625,
-0.00872802734375,
-0.0679931640625,
-0.016510009765625,
-0.041046142578125,
0.05157470703125,
-0.00785064697265625,
-0.00421142578125,
0.0242767333984375,
0.050323486328125,
0.01416778564453125,
-0.04656982421875,
0.01097869873046875,
0.059051513671875,
-0.01904296875,
0.0207672119140625,
0.022064208984375,
-0.05712890625,
0.0215606689453125,
-0.0218658447265625,
0.04705810546875,
0.03997802734375,
-0.017059326171875,
0.0189666748046875,
0.022064208984375,
0.00815582275390625,
0.0584716796875,
-0.02392578125,
-0.06634521484375,
0.06622314453125,
0.0504150390625,
-0.0003249645233154297,
-0.048431396484375,
-0.0155181884765625,
-0.054168701171875,
0.02386474609375,
0.0222015380859375,
0.0123291015625,
-0.01515960693359375,
0.03759765625,
0.042755126953125,
0.04071044921875,
-0.0032596588134765625,
-0.01105499267578125,
0.006107330322265625,
0.0294952392578125,
0.0369873046875,
-0.0200347900390625,
0.01235198974609375,
-0.025909423828125,
0.0019283294677734375,
-0.00518035888671875,
0.0147247314453125,
0.0125885009765625,
-0.0132904052734375,
-0.0207061767578125,
-0.0031032562255859375,
0.04498291015625,
0.0068511962890625,
0.0408935546875,
-0.05841064453125,
-0.04510498046875,
-0.066162109375,
0.047027587890625,
-0.0142822265625,
-0.04315185546875,
-0.0180206298828125,
0.0212554931640625,
-0.0531005859375,
-0.019012451171875,
-0.0008497238159179688,
0.006744384765625,
-0.041473388671875,
0.01056671142578125,
-0.00336456298828125,
-0.042388916015625,
-0.01244354248046875,
-0.0174407958984375,
-0.0374755859375,
-0.02557373046875,
0.0256195068359375,
-0.01264190673828125,
-0.0186767578125,
0.017333984375,
-0.024200439453125,
0.00487518310546875,
-0.022613525390625,
-0.005035400390625,
-0.07696533203125,
-0.029388427734375,
0.0160980224609375,
0.07293701171875,
-0.0167388916015625,
-0.003437042236328125,
-0.01357269287109375,
0.07318115234375,
0.050384521484375,
0.010589599609375,
0.0224151611328125,
-0.052215576171875,
0.0255126953125,
0.0283355712890625,
0.028839111328125,
-0.0003731250762939453,
0.00909423828125,
-0.0211181640625,
-0.0232696533203125,
-0.0029315948486328125,
-0.044281005859375,
-0.006748199462890625,
-0.0400390625,
-0.031463623046875,
-0.036529541015625,
0.004154205322265625,
-0.0052490234375,
0.01451873779296875,
-0.044525146484375,
0.009613037109375,
0.01169586181640625,
-0.034393310546875,
0.026092529296875,
-0.001617431640625,
-0.03924560546875,
0.00519561767578125,
0.049835205078125,
0.017730712890625,
-0.02392578125,
-0.041717529296875,
-0.030181884765625,
0.0024700164794921875,
-0.00201416015625,
0.0037822723388671875,
-0.03955078125,
-0.014373779296875,
0.0323486328125,
-0.05792236328125,
0.01114654541015625,
-0.0081787109375,
0.030548095703125,
-0.0102386474609375,
-0.03753662109375,
0.031951904296875,
-0.02880859375,
-0.00604248046875,
0.005496978759765625,
0.001537322998046875,
-0.018341064453125,
0.02099609375,
0.06304931640625,
-0.0004413127899169922,
-0.031494140625,
-0.048858642578125,
-0.0117950439453125,
0.0038394927978515625,
-0.01776123046875,
0.01021575927734375,
0.01551055908203125,
-0.0156097412109375,
-0.007228851318359375,
-0.0035419464111328125,
-0.0034313201904296875,
0.01535797119140625,
0.0225830078125,
-0.01318359375,
0.0423583984375,
-0.0261383056640625,
-0.026275634765625,
-0.0158843994140625,
-0.0008740425109863281,
0.03240966796875,
0.002716064453125,
-0.0323486328125,
0.0184478759765625,
-0.0226898193359375,
-0.0071563720703125,
0.009735107421875,
0.005420684814453125,
0.0204010009765625,
0.061553955078125,
-0.0011987686157226562,
0.00952911376953125,
-0.01039886474609375,
0.052581787109375,
-0.02679443359375,
0.0088043212890625,
0.00722503662109375,
0.00788116455078125,
-0.01357269287109375,
0.1104736328125,
-0.032623291015625,
0.0830078125,
-0.01174163818359375,
-0.0023860931396484375,
0.01189422607421875,
0.0452880859375,
0.0222015380859375,
-0.029876708984375,
0.004669189453125,
0.021087646484375,
0.0245819091796875,
-0.0218048095703125,
0.0033321380615234375,
-0.0014200210571289062,
0.008514404296875,
-0.0062103271484375,
-0.0130157470703125,
0.03912353515625,
-0.0205535888671875,
-0.017974853515625,
-0.006748199462890625,
-0.00540924072265625,
-0.0076751708984375,
-0.0302886962890625,
-0.00382232666015625,
0.01165008544921875,
0.00951385498046875,
0.0004978179931640625,
-0.03125,
-0.0187530517578125,
0.01678466796875,
-0.0430908203125,
0.02484130859375,
-0.0224761962890625,
-0.0273590087890625,
-0.0275115966796875,
-0.02728271484375,
0.00933837890625,
-0.04852294921875,
0.003101348876953125,
-0.0215911865234375,
-0.0308380126953125,
0.046783447265625,
-0.01317596435546875,
0.0179443359375,
-0.034149169921875,
0.00977325439453125,
0.00254058837890625,
0.000038564205169677734,
0.0537109375,
0.0164031982421875,
-0.0025691986083984375,
-0.029876708984375,
-0.042144775390625,
-0.036712646484375,
0.006343841552734375,
0.00855255126953125,
-0.00627899169921875,
0.003570556640625,
-0.0100250244140625,
0.032073974609375,
0.00608062744140625,
0.01214599609375,
-0.01611328125,
-0.023956298828125,
-0.03570556640625,
-0.0015439987182617188,
0.0022144317626953125,
0.01415252685546875,
-0.0308380126953125,
0.033294677734375,
-0.0197296142578125,
-0.032012939453125,
-0.03533935546875,
-0.004070281982421875,
-0.0270538330078125,
-0.0723876953125,
-0.020904541015625,
0.020782470703125,
-0.055450439453125,
0.059478759765625,
0.040679931640625,
-0.01001739501953125,
0.029388427734375,
-0.031036376953125,
-0.005443572998046875,
-0.006969451904296875,
0.0672607421875,
-0.04962158203125,
0.02374267578125,
0.037384033203125,
-0.00373077392578125,
0.02301025390625,
0.01055145263671875,
-0.0251007080078125,
0.026641845703125,
-0.0015811920166015625,
0.0212554931640625,
0.00789642333984375,
-0.034515380859375,
0.033172607421875,
0.004627227783203125,
0.00457763671875,
0.0128631591796875,
-0.0180816650390625,
0.005947113037109375,
0.0086669921875,
-0.02093505859375,
0.0160064697265625,
0.039154052734375,
0.022186279296875,
-0.035186767578125,
-0.0018815994262695312,
-0.0013742446899414062,
-0.0091094970703125,
-0.008880615234375,
0.025390625,
0.006336212158203125,
-0.0634765625,
0.01507568359375,
-0.01038360595703125,
-0.0020084381103515625,
0.030181884765625,
0.0253143310546875,
-0.0006542205810546875,
-0.0233154296875,
-0.04840087890625,
-0.0201263427734375,
-0.039947509765625,
-0.039947509765625,
-0.01078033447265625,
0.0150146484375,
0.0157012939453125,
0.00978851318359375,
-0.01361083984375,
-0.031005859375,
-0.0243988037109375,
0.020477294921875,
-0.006927490234375,
-0.005481719970703125,
0.0170745849609375,
-0.00872802734375,
-0.014495849609375,
-0.073486328125,
-0.0021533966064453125,
-0.02105712890625,
-0.0201416015625,
0.0006685256958007812,
0.007343292236328125,
0.057586669921875,
0.04229736328125,
0.01227569580078125,
-0.038970947265625,
0.033172607421875,
-0.005657196044921875,
-0.029205322265625,
-0.01181793212890625,
-0.01036834716796875,
0.05206298828125,
-0.0142059326171875,
0.01197052001953125,
-0.0251617431640625,
0.0132598876953125,
-0.022552490234375,
-0.0088043212890625,
0.058258056640625,
-0.007625579833984375,
-0.0138092041015625,
0.031219482421875,
0.036590576171875,
-0.021881103515625,
0.024505615234375,
-0.0266265869140625,
-0.042022705078125,
-0.04705810546875,
0.00016248226165771484,
-0.06292724609375,
-0.001316070556640625,
0.0010662078857421875,
-0.05645751953125,
0.0699462890625,
-0.0267333984375,
0.0241241455078125,
0.005077362060546875,
0.0266265869140625,
-0.005596160888671875,
0.0005269050598144531,
-0.034088134765625,
0.02459716796875,
-0.006717681884765625,
0.050079345703125,
-0.05865478515625,
-0.031219482421875,
0.018829345703125,
0.046173095703125,
0.0213165283203125,
-0.00048804283142089844,
-0.029327392578125,
-0.01088714599609375,
0.035980224609375,
0.023590087890625,
0.0015153884887695312,
0.03857421875,
0.02880859375,
0.030059814453125,
0.08465576171875,
-0.044677734375,
0.037139892578125,
0.0098724365234375,
0.0301513671875,
0.036041259765625,
0.004848480224609375,
0.0182952880859375,
-0.021820068359375,
0.04400634765625,
-0.0187835693359375,
-0.0293731689453125,
0.0287933349609375,
-0.0413818359375,
0.0251312255859375,
-0.0148468017578125,
0.0190887451171875,
-0.0543212890625,
0.0264129638671875,
-0.0187835693359375,
0.036956787109375,
0.00241851806640625,
0.0287017822265625,
0.046600341796875,
0.00476837158203125,
0.06317138671875,
0.0030059814453125,
0.0124664306640625,
0.00791168212890625,
0.01495361328125,
0.0210418701171875,
-0.01056671142578125,
-0.02093505859375,
-0.04827880859375,
0.0238037109375,
0.03436279296875,
0.0306854248046875,
-0.044586181640625,
-0.07171630859375,
0.0011005401611328125,
-0.002044677734375,
0.01311492919921875,
-0.006755828857421875,
-0.0281524658203125,
0.017730712890625,
0.071533203125,
-0.045013427734375,
0.0237884521484375,
0.0204925537109375,
-0.017303466796875,
-0.01079559326171875,
-0.0079193115234375,
-0.01885986328125,
0.038787841796875,
-0.045806884765625,
0.03253173828125,
0.0013895034790039062,
0.06976318359375,
0.008514404296875,
0.03948974609375,
-0.055999755859375,
-0.033721923828125,
-0.0283050537109375,
0.039154052734375,
-0.01105499267578125,
0.019744873046875,
-0.035064697265625,
-0.051239013671875,
-0.00659942626953125,
0.036376953125,
0.00759124755859375,
0.067138671875,
0.041107177734375,
0.0174560546875,
-0.007549285888671875,
0.01126861572265625,
0.061553955078125,
-0.034912109375,
-0.0287017822265625,
-0.00788116455078125,
-0.00272369384765625,
0.040435791015625,
0.0213165283203125,
-0.01119232177734375,
0.022125244140625,
0.026702880859375,
0.01519775390625,
0.0206146240234375,
0.00727081298828125,
-0.01016998291015625,
0.022705078125,
0.005035400390625,
0.0419921875,
0.04388427734375,
-0.019989013671875,
-0.0035266876220703125,
-0.0152740478515625,
-0.037017822265625,
0.01421356201171875,
0.039398193359375,
0.0025615692138671875,
0.00873565673828125,
0.019622802734375,
-0.0257568359375,
-0.0310516357421875,
0.041534423828125,
0.01068115234375,
-0.01309967041015625,
0.0030956268310546875,
-0.00699615478515625,
-0.026824951171875,
0.01157379150390625,
0.057220458984375,
-0.038177490234375,
-0.038665771484375,
0.031707763671875,
0.00959014892578125,
-0.04473876953125,
0.0275726318359375,
0.0255279541015625,
0.00310516357421875,
-0.00830078125,
0.0533447265625,
-0.01381683349609375,
0.0160980224609375,
-0.007053375244140625,
0.08758544921875,
-0.0083160400390625,
0.06317138671875,
-0.0657958984375,
-0.0124359130859375,
-0.01512908935546875,
0.025054931640625,
-0.032135009765625,
-0.005786895751953125,
-0.0430908203125,
-0.014373779296875,
-0.052001953125,
-0.03228759765625,
0.037384033203125,
0.004238128662109375,
-0.0237884521484375,
0.0241546630859375,
0.0178070068359375,
-0.03936767578125,
0.0428466796875,
-0.046783447265625,
0.10595703125,
0.0491943359375,
-0.006977081298828125,
0.034881591796875,
-0.00881195068359375,
-0.024932861328125,
0.02557373046875,
0.001995086669921875,
-0.0261993408203125,
0.0309906005859375,
0.0214691162109375,
0.0001773834228515625,
0.056243896484375,
0.034149169921875,
0.0201873779296875,
-0.004047393798828125,
0.02752685546875,
-0.0614013671875,
-0.032073974609375,
-0.049896240234375,
-0.03448486328125,
0.00014328956604003906,
0.00839996337890625,
-0.0094757080078125,
0.0248565673828125,
-0.062744140625,
-0.0067138671875,
-0.01078033447265625,
0.0232391357421875,
-0.007190704345703125,
-0.03167724609375,
0.02593994140625,
-0.0242156982421875,
-0.0151824951171875,
-0.022979736328125,
-0.05328369140625,
0.0275421142578125,
0.046966552734375,
0.01265716552734375,
0.0210723876953125,
-0.0157470703125,
-0.0180816650390625,
0.0035247802734375,
0.004444122314453125,
0.02386474609375,
-0.0122528076171875,
-0.06756591796875,
0.01511383056640625,
0.00888824462890625,
0.038360595703125,
0.0162353515625,
0.0118560791015625,
0.0295867919921875,
0.00763702392578125,
-0.06854248046875,
-0.048431396484375,
0.04248046875,
-0.033966064453125,
-0.0185394287109375,
-0.00725555419921875,
0.041473388671875,
0.07275390625,
0.0029621124267578125,
-0.080078125,
0.040618896484375,
-0.0281982421875,
-0.025726318359375,
-0.06103515625,
-0.0311431884765625,
0.0113677978515625,
0.01250457763671875,
-0.024017333984375,
0.0030364990234375,
-0.07818603515625,
0.0123291015625,
0.0154571533203125,
0.006755828857421875,
0.006923675537109375,
0.04034423828125,
-0.08447265625,
0.0028629302978515625,
-0.036041259765625,
-0.002155303955078125,
0.0126953125,
0.002170562744140625,
-0.00702667236328125,
0.007358551025390625,
-0.048004150390625,
-0.044769287109375,
-0.0182647705078125,
0.01190185546875,
-0.00975799560546875,
-0.0179901123046875,
-0.0266876220703125,
-0.016876220703125,
0.038848876953125,
0.03143310546875,
-0.0022029876708984375,
-0.01511383056640625,
-0.005527496337890625,
-0.029937744140625,
-0.01568603515625,
-0.0452880859375,
0.000012695789337158203,
-0.052398681640625,
-0.018280029296875,
-0.01788330078125,
0.0207672119140625,
-0.009185791015625,
0.011322021484375,
0.0068511962890625,
-0.02972412109375,
0.06524658203125,
-0.0030002593994140625,
-0.01214599609375,
0.0238800048828125,
0.0210418701171875,
-0.0283660888671875,
-0.0294952392578125,
-0.027008056640625,
0.01076507568359375,
-0.0233306884765625,
-0.06866455078125,
-0.004123687744140625,
-0.01329803466796875,
0.036956787109375,
0.0054168701171875,
0.033538818359375,
-0.0306243896484375,
0.0305023193359375,
0.00606536865234375,
0.00498199462890625,
0.034088134765625,
-0.0171051025390625,
0.03277587890625,
-0.044830322265625,
0.046844482421875,
-0.0163726806640625,
0.103515625,
-0.0169219970703125,
0.03399658203125,
-0.0233917236328125,
0.0260467529296875,
-0.008392333984375,
0.00518035888671875,
0.0400390625,
0.005855560302734375,
0.0026721954345703125,
-0.0028839111328125,
-0.04119873046875,
-0.035064697265625,
0.0014972686767578125,
0.06060791015625,
-0.0210418701171875,
0.01493072509765625
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.