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
|
---|---|---|---|---|---|
c96fc83922aa9e0bb8aa0bdd7fc09316dfe5499f | Wordpress Stackexchange
Q: WP_Query sort by comment meta data Is it possible to use the WP_Query class to order by comments meta data fields?
A: I solved my problem by adding a hook on the action wp_insert_comment.
When my hook is called i calculate the average rating for each rating meta-tag of my comments. Then i add a meta tag to the post with the result
I can use the post meta-tag to sort with wp-query
| Q: WP_Query sort by comment meta data Is it possible to use the WP_Query class to order by comments meta data fields?
A: I solved my problem by adding a hook on the action wp_insert_comment.
When my hook is called i calculate the average rating for each rating meta-tag of my comments. Then i add a meta tag to the post with the result
I can use the post meta-tag to sort with wp-query
| wordpress | {
"language": "en",
"length": 74,
"provenance": "stackexchange_00019.jsonl.gz:454070",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/181881"
} | [
0.040496826171875,
-0.004367828369140625,
0.0192108154296875,
0.0203399658203125,
0.01238250732421875,
-0.030120849609375,
0.070068359375,
-0.03704833984375,
0.0150146484375,
0.04815673828125,
-0.03143310546875,
-0.0263519287109375,
0.005954742431640625,
-0.006153106689453125,
-0.06304931640625,
-0.053619384765625,
0.0272369384765625,
0.00572967529296875,
0.0270538330078125,
0.00022327899932861328,
0.01476287841796875,
0.0247650146484375,
-0.0004394054412841797,
-0.0057220458984375,
0.021514892578125,
-0.01279449462890625,
0.091064453125,
-0.030364990234375,
0.05340576171875,
0.015289306640625,
0.0241546630859375,
-0.06268310546875,
0.00931549072265625,
0.0038852691650390625,
0.03265380859375,
-0.0030765533447265625,
0.03509521484375,
-0.004039764404296875,
0.0264434814453125,
0.0082244873046875,
0.0308380126953125,
-0.01062774658203125,
-0.00994873046875,
0.01174163818359375,
-0.002506256103515625,
-0.0323486328125,
0.021331787109375,
-0.05169677734375,
0.062042236328125,
-0.0277862548828125,
0.000644683837890625,
0.039031982421875,
0.0179443359375,
-0.058135986328125,
-0.0213165283203125,
-0.0035037994384765625,
-0.017364501953125,
0.021484375,
0.019134521484375,
-0.032073974609375,
-0.0091705322265625,
0.0179290771484375,
0.00740814208984375,
0.026702880859375,
0.004482269287109375,
-0.007511138916015625,
0.0399169921875,
0.0224761962890625,
-0.00336456298828125,
-0.00020134449005126953,
0.01332855224609375,
0.01224517822265625,
-0.00926971435546875,
-0.004852294921875,
0.0194549560546875,
-0.0236663818359375,
-0.00289154052734375,
-0.0185699462890625,
0.016876220703125,
0.036163330078125,
0.0125885009765625,
-0.0004184246063232422,
0.005611419677734375,
-0.0421142578125,
0.0029964447021484375,
-0.0310516357421875,
-0.0211029052734375,
-0.00844573974609375,
0.0031490325927734375,
-0.033294677734375,
-0.0035305023193359375,
-0.03778076171875,
-0.039459228515625,
0.0401611328125,
0.003387451171875,
-0.033111572265625,
0.025390625,
0.031585693359375,
-0.0279083251953125,
-0.012939453125,
-0.02166748046875,
-0.0207672119140625,
-0.019805908203125,
-0.0166015625,
0.00112152099609375,
-0.03631591796875,
-0.0193634033203125,
-0.033905029296875,
0.031646728515625,
0.06549072265625,
-0.02630615234375,
0.01187896728515625,
-0.0138092041015625,
-0.01349639892578125,
-0.032073974609375,
0.0151214599609375,
-0.03643798828125,
0.004825592041015625,
-0.00418853759765625,
-0.0153045654296875,
0.034515380859375,
0.03887939453125,
0.01515960693359375,
-0.02569580078125,
0.0025157928466796875,
-0.0028018951416015625,
-0.03472900390625,
-0.03857421875,
-0.0648193359375,
0.016845703125,
0.0006465911865234375,
0.036895751953125,
0.0246124267578125,
0.023101806640625,
-0.036651611328125,
-0.00691986083984375,
0.020843505859375,
-0.03594970703125,
-0.01448822021484375,
-0.0011606216430664062,
0.0038585662841796875,
-0.0231475830078125,
-0.01715087890625,
-0.00984954833984375,
-0.0018053054809570312,
0.01189422607421875,
0.0151824951171875,
-0.006107330322265625,
-0.005992889404296875,
-0.0118560791015625,
-0.035919189453125,
0.0194549560546875,
0.011627197265625,
0.01071929931640625,
0.0186920166015625,
-0.0160369873046875,
0.046295166015625,
-0.035400390625,
0.004848480224609375,
-0.033355712890625,
-0.00936126708984375,
0.007419586181640625,
0.027496337890625,
-0.015533447265625,
-0.0180206298828125,
-0.0191192626953125,
-0.014434814453125,
-0.004558563232421875,
0.0187835693359375,
0.0276947021484375,
-0.01273345947265625,
-0.00875091552734375,
0.0430908203125,
0.00830078125,
-0.025177001953125,
0.00531768798828125,
0.0182342529296875,
-0.020050048828125,
0.00434112548828125,
0.02301025390625,
-0.0301513671875,
-0.035919189453125,
0.00589752197265625,
-0.01132965087890625,
-0.0119476318359375,
0.050018310546875,
0.033477783203125,
0.05096435546875,
-0.03350830078125,
0.019683837890625,
0.03387451171875,
0.053619384765625,
-0.01047515869140625,
0.041717529296875,
-0.00806427001953125,
-0.0279998779296875,
-0.0038890838623046875,
0.023773193359375,
-0.0038433074951171875,
-0.045562744140625,
-0.037200927734375,
0.01953125,
-0.03875732421875,
0.032623291015625,
-0.06756591796875,
0.0116729736328125,
-0.0247955322265625,
0.047027587890625,
0.0020751953125,
0.02545166015625,
0.0110321044921875,
-0.01348114013671875,
-0.04217529296875,
0.0433349609375,
-0.0100860595703125,
-0.0107421875,
-0.0034427642822265625,
0.0013475418090820312,
0.01459503173828125,
0.01605224609375,
-0.00881195068359375,
0.0111236572265625,
-0.03521728515625,
0.0007610321044921875,
0.02178955078125,
-0.01715087890625,
-0.0186920166015625,
-0.014495849609375,
0.0287628173828125,
-0.0016345977783203125,
-0.00965118408203125,
0.0193939208984375,
0.00864410400390625,
0.05419921875,
-0.0087738037109375,
-0.00882720947265625,
0.0017995834350585938,
-0.056976318359375,
0.019287109375,
0.026947021484375,
0.0357666015625,
0.03460693359375,
0.025726318359375,
0.043914794921875,
0.03692626953125,
0.0025482177734375,
0.044281005859375,
-0.00820159912109375,
0.0175628662109375,
0.04986572265625,
0.01258087158203125,
-0.00038361549377441406,
0.034881591796875,
0.01055145263671875,
-0.002880096435546875,
0.0396728515625,
0.0149078369140625,
0.035430908203125,
-0.024658203125,
0.0039005279541015625,
-0.00798797607421875,
-0.01184844970703125,
-0.01557159423828125,
-0.0019283294677734375,
0.034088134765625,
-0.0255889892578125,
0.02532958984375,
0.0169830322265625,
-0.003276824951171875,
-0.014007568359375,
0.01390838623046875,
0.0010957717895507812,
0.00853729248046875,
0.014007568359375,
-0.05938720703125,
0.047119140625,
-0.017913818359375,
-0.0063934326171875,
0.02294921875,
0.004169464111328125,
0.0070343017578125,
0.048919677734375,
-0.0019989013671875,
-0.005733489990234375,
-0.0195159912109375,
-0.0155029296875,
0.00628662109375,
0.0136871337890625,
-0.042205810546875,
-0.042022705078125,
0.00516510009765625,
0.042938232421875,
-0.0088958740234375,
0.00667572021484375,
0.021697998046875,
-0.01104736328125,
-0.0004012584686279297,
-0.0230560302734375,
0.031524658203125,
-0.03192138671875,
0.0248565673828125,
0.06500244140625,
-0.01348114013671875,
0.01180267333984375,
-0.012420654296875,
0.01084136962890625,
-0.01471710205078125,
0.0157318115234375,
-0.0070037841796875,
-0.03448486328125,
-0.018951416015625,
0.01959228515625,
0.041412353515625,
0.0279388427734375,
0.03179931640625,
-0.00916290283203125,
0.017669677734375,
0.049224853515625,
-0.0478515625,
-0.0924072265625,
0.01259613037109375,
-0.0226898193359375,
-0.0228424072265625,
-0.01494598388671875,
-0.0210723876953125,
0.00908660888671875,
-0.024871826171875,
-0.011566162109375,
0.00391387939453125,
-0.00782012939453125,
-0.078125,
-0.0218963623046875,
-0.06231689453125,
0.049346923828125,
-0.0081329345703125,
0.0283203125,
0.00865936279296875,
0.042999267578125,
-0.00173187255859375,
-0.03839111328125,
-0.0005259513854980469,
-0.00446319580078125,
-0.01751708984375,
-0.00823211669921875,
0.0290069580078125,
-0.056182861328125,
0.0234527587890625,
-0.005115509033203125,
0.039154052734375,
0.04681396484375,
-0.0302734375,
0.004993438720703125,
-0.006076812744140625,
-0.002658843994140625,
0.0302581787109375,
-0.00569915771484375,
-0.010711669921875,
0.022796630859375,
0.03790283203125,
-0.02789306640625,
0.0036869049072265625,
-0.0008502006530761719,
-0.00568389892578125,
-0.037933349609375,
-0.0225982666015625,
0.0074920654296875,
-0.036773681640625,
0.044677734375,
0.028778076171875,
0.02734375,
0.04193115234375,
-0.0168609619140625,
0.006561279296875,
-0.012054443359375,
-0.0053863525390625,
-0.04461669921875,
0.006206512451171875,
-0.03277587890625,
0.0272369384765625,
-0.0103607177734375,
0.0160064697265625,
-0.0361328125,
0.036163330078125,
-0.07220458984375,
-0.018218994140625,
0.05828857421875,
0.006011962890625,
0.035888671875,
-0.039215087890625,
-0.04150390625,
-0.041778564453125,
0.08636474609375,
-0.00618743896484375,
-0.029632568359375,
-0.0096435546875,
-0.00383758544921875,
-0.0416259765625,
0.039581298828125,
-0.0305633544921875,
0.0081787109375,
-0.0784912109375,
0.015777587890625,
0.00991058349609375,
-0.05426025390625,
-0.029541015625,
0.00669097900390625,
-0.06280517578125,
-0.0279388427734375,
0.0303955078125,
-0.037811279296875,
0.0122222900390625,
0.03680419921875,
-0.01751708984375,
0.035247802734375,
-0.0276947021484375,
-0.02911376953125,
-0.04962158203125,
-0.00689697265625,
-0.03668212890625,
0.05853271484375,
0.0182647705078125,
0.0068359375,
-0.01580810546875,
0.0362548828125,
-0.0156402587890625,
0.0322265625,
0.00936126708984375,
0.026611328125,
0.001667022705078125,
-0.00963592529296875,
0.0107421875,
-0.027618408203125,
-0.0022182464599609375,
-0.02447509765625,
0.0227508544921875,
0.04193115234375,
-0.061676025390625,
-0.00673675537109375,
-0.06964111328125,
0.00916290283203125,
-0.01340484619140625,
-0.03009033203125,
-0.04766845703125,
0.01459503173828125,
-0.006359100341796875,
-0.006755828857421875,
-0.0215606689453125,
-0.043304443359375,
0.01529693603515625,
-0.01019287109375,
-0.0161895751953125,
0.01502227783203125,
0.075439453125,
0.0270233154296875,
-0.0008273124694824219,
-0.06915283203125,
-0.0260772705078125,
0.006649017333984375,
0.008056640625,
0.0345458984375,
-0.00421142578125,
-0.0006623268127441406,
0.035430908203125,
-0.0189361572265625,
0.01248931884765625,
-0.01216888427734375,
0.0484619140625,
-0.0165863037109375,
-0.0269622802734375,
0.031585693359375,
-0.02398681640625,
-0.006717681884765625,
0.02508544921875,
0.01320648193359375,
-0.05743408203125,
-0.020965576171875,
0.059539794921875,
0.01082611083984375,
0.01255035400390625,
-0.04754638671875,
-0.05645751953125,
0.01580810546875,
-0.06683349609375,
0.035491943359375,
0.01381683349609375,
-0.01215362548828125,
0.0297088623046875,
0.0195770263671875,
0.01293182373046875,
0.01413726806640625,
0.0157928466796875,
-0.047332763671875,
0.021697998046875,
0.01220703125,
-0.0236968994140625,
0.0204315185546875,
-0.019561767578125,
0.1234130859375,
0.02398681640625,
-0.046844482421875,
-0.0040283203125,
-0.018890380859375,
0.032501220703125,
0.003452301025390625,
-0.0045013427734375,
0.009521484375,
0.0028171539306640625,
-0.002819061279296875,
0.01186370849609375,
-0.0169525146484375,
-0.007472991943359375,
-0.0170135498046875,
0.033721923828125,
0.0146484375,
-0.01233673095703125,
-0.005401611328125,
0.06658935546875,
-0.0158843994140625,
0.02972412109375,
-0.0198974609375,
0.0194244384765625,
-0.025787353515625,
0.0192108154296875,
0.02264404296875,
-0.0203094482421875,
0.0254974365234375,
-0.01198577880859375,
0.00664520263671875,
-0.00039458274841308594,
-0.00666046142578125,
-0.01178741455078125,
-0.0278472900390625,
0.010650634765625,
0.03533935546875,
0.021881103515625,
0.018463134765625,
-0.014892578125,
0.0186920166015625,
0.04351806640625,
-0.0142059326171875,
-0.0023708343505859375,
-0.04412841796875,
-0.01181793212890625,
0.0119781494140625,
-0.00041413307189941406,
0.017730712890625,
0.0036296844482421875,
0.050750732421875,
-0.006412506103515625,
0.035400390625,
-0.015777587890625,
-0.03814697265625,
-0.020263671875,
0.01374053955078125,
-0.0032749176025390625,
-0.024871826171875,
-0.0275421142578125,
-0.0017948150634765625,
-0.0160980224609375,
0.0543212890625,
0.0049896240234375,
0.007549285888671875,
-0.04376220703125,
0.036529541015625,
-0.0305633544921875,
-0.0014934539794921875,
0.014984130859375,
-0.0261383056640625,
-0.0061187744140625,
-0.00731658935546875,
-0.0697021484375,
-0.027374267578125,
-0.003509521484375,
-0.031219482421875,
-0.0258331298828125,
-0.01116943359375,
-0.006427764892578125,
0.03741455078125,
-0.032989501953125,
-0.05767822265625,
0.0120697021484375,
-0.033172607421875,
-0.01506805419921875,
-0.0298004150390625,
-0.02874755859375,
0.10015869140625,
-0.00897979736328125,
0.03521728515625,
0.019561767578125,
0.0699462890625,
0.0002734661102294922,
-0.01009368896484375,
0.01438140869140625,
-0.0295867919921875,
-0.049102783203125,
-0.01450347900390625,
-0.04254150390625,
0.0111236572265625,
0.035369873046875,
-0.01311492919921875,
0.045318603515625,
-0.0182342529296875,
-0.0061798095703125,
-0.01071929931640625,
-0.0144805908203125,
-0.0189361572265625,
0.040130615234375,
0.0194244384765625,
0.01471710205078125,
0.01557159423828125,
-0.0281524658203125,
0.0012416839599609375,
-0.007495880126953125,
0.0098876953125,
-0.0013446807861328125,
-0.0296783447265625,
-0.07110595703125,
0.0487060546875,
0.08209228515625,
0.0296630859375,
0.039215087890625,
-0.0027618408203125,
0.017333984375,
0.01214599609375,
0.022491455078125,
0.039337158203125,
-0.00980377197265625,
0.057525634765625,
-0.01044464111328125,
-0.0237274169921875,
0.01139068603515625,
-0.04339599609375,
0.038055419921875,
0.005950927734375,
0.0467529296875,
-0.056976318359375,
0.04205322265625,
0.016326904296875,
-0.009490966796875,
0.05126953125,
0.006961822509765625,
-0.0143585205078125,
-0.035888671875,
0.04266357421875,
-0.033416748046875,
-0.01507568359375,
0.0181732177734375,
-0.02386474609375,
-0.0146331787109375,
-0.0231475830078125,
-0.0155029296875,
-0.0120849609375,
-0.005069732666015625,
-0.0261993408203125,
0.0111236572265625,
-0.03875732421875,
-0.030059814453125,
0.0139617919921875,
0.00948333740234375,
-0.00884246826171875,
-0.08203125,
0.00724029541015625,
-0.019317626953125,
-0.0145263671875,
-0.01129913330078125,
-0.01490020751953125,
0.046600341796875,
0.0330810546875,
0.0043792724609375,
-0.043060302734375,
0.02166748046875,
-0.043487548828125,
-0.056396484375,
-0.0307464599609375,
0.018768310546875,
-0.0078887939453125,
0.04339599609375,
0.0308685302734375,
0.010986328125,
-0.08880615234375,
0.00435638427734375,
-0.005016326904296875,
0.02392578125,
-0.040008544921875,
-0.0029048919677734375,
0.029388427734375,
0.018798828125,
-0.006069183349609375,
0.0216522216796875,
0.0198516845703125,
0.01085662841796875,
0.04010009765625,
0.017913818359375,
0.025421142578125,
-0.01294708251953125,
0.008148193359375,
-0.047393798828125,
0.07403564453125,
0.012786865234375,
-0.0007405281066894531,
0.002178192138671875,
0.0278472900390625,
-0.034881591796875,
0.00374603271484375,
-0.035797119140625,
0.1002197265625,
-0.0189056396484375,
0.091064453125,
-0.0885009765625,
-0.0227203369140625,
0.049224853515625,
0.04266357421875,
0.037994384765625,
0.00862884521484375,
-0.059326171875,
0.00312042236328125,
0.0731201171875,
0.041351318359375,
0.03253173828125,
0.040008544921875,
-0.00040078163146972656,
0.03436279296875,
0.01279449462890625,
-0.0182647705078125,
0.031585693359375,
-0.0195465087890625,
-0.055511474609375,
0.029815673828125,
0.0157928466796875,
0.0007176399230957031,
-0.01824951171875,
0.04254150390625,
-0.038665771484375,
-0.0083465576171875,
0.041748046875,
-0.0158538818359375,
0.01059722900390625,
0.05572509765625,
0.058258056640625,
-0.07110595703125,
-0.0880126953125,
-0.015167236328125,
0.04052734375,
0.0192718505859375,
0.056243896484375,
0.03948974609375,
0.0211944580078125,
0.0723876953125,
-0.0374755859375,
0.0175628662109375,
-0.01953125,
-0.031585693359375,
0.0792236328125,
-0.003688812255859375,
0.0338134765625,
-0.06494140625,
-0.017974853515625,
0.00453948974609375,
0.09796142578125,
-0.034515380859375,
0.004383087158203125,
0.01062774658203125,
-0.00687408447265625,
0.0000584721565246582,
-0.036956787109375,
-0.00632476806640625,
-0.004192352294921875,
-0.006000518798828125,
-0.040863037109375,
-0.03118896484375,
0.0021610260009765625,
0.035797119140625,
-0.007747650146484375,
0.00759124755859375,
0.00884246826171875,
-0.056060791015625,
-0.0194244384765625,
0.01050567626953125,
0.0172882080078125,
0.0277099609375,
-0.003963470458984375,
0.06182861328125,
0.007404327392578125,
-0.0023937225341796875,
-0.005367279052734375,
0.0458984375,
-0.01690673828125,
0.00203704833984375,
-0.03179931640625,
-0.051361083984375,
-0.0193023681640625,
0.043701171875,
0.037841796875,
0.04052734375,
0.044586181640625,
0.0357666015625,
0.00940704345703125,
0.002437591552734375,
0.0419921875,
-0.01163482666015625,
-0.0149078369140625,
-0.0235137939453125,
0.032684326171875,
0.03778076171875,
0.00858306884765625,
0.00727081298828125,
0.00785064697265625,
0.0594482421875,
0.0020885467529296875,
0.010009765625,
0.01361083984375,
0.00653839111328125,
0.03179931640625,
0.0116119384765625,
-0.01119232177734375,
0.0257568359375,
-0.03326416015625,
0.004726409912109375,
-0.0247955322265625,
-0.032623291015625,
0.0335693359375,
0.044189453125,
-0.01212310791015625,
0.0304107666015625,
-0.0226593017578125,
-0.0106658935546875,
0.060394287109375,
-0.039520263671875,
0.002460479736328125,
0.0396728515625,
0.0142364501953125,
0.003299713134765625,
-0.078125,
-0.0511474609375,
-0.016754150390625,
0.0260467529296875,
0.01166534423828125,
0.043243408203125,
0.01666259765625,
0.0260009765625,
-0.056427001953125,
-0.024261474609375,
0.0099945068359375,
-0.035064697265625,
0.04345703125,
0.03228759765625,
-0.046661376953125,
-0.0237274169921875,
0.0191802978515625,
0.0035400390625,
0.05218505859375,
-0.0211029052734375,
-0.022918701171875,
-0.018402099609375,
0.02642822265625,
-0.017852783203125,
-0.0011606216430664062,
-0.03448486328125,
-0.0003306865692138672,
-0.0151214599609375,
-0.034637451171875,
0.0240478515625,
-0.0117340087890625,
0.0171051025390625,
0.013458251953125,
-0.011199951171875,
-0.00823974609375,
0.01776123046875,
0.003978729248046875,
0.030029296875,
0.0389404296875,
-0.075439453125,
0.0267791748046875,
0.0521240234375,
-0.00897979736328125,
0.048309326171875,
0.0163421630859375,
0.01543426513671875,
0.044464111328125,
-0.04058837890625,
-0.01055145263671875,
0.048614501953125,
0.0802001953125,
0.029296875,
0.029052734375,
-0.0206756591796875,
-0.01995849609375,
-0.00943756103515625,
0.002685546875,
-0.03155517578125,
-0.05694580078125,
0.006587982177734375,
0.01548004150390625,
-0.04534912109375,
-0.015625,
-0.063720703125,
-0.00997161865234375,
0.00710296630859375,
-0.0024814605712890625,
-0.009368896484375,
-0.01361846923828125,
-0.006633758544921875,
0.0022678375244140625,
0.0010776519775390625,
-0.035125732421875,
0.0092620849609375,
0.01467132568359375,
-0.01678466796875,
0.0038433074951171875,
-0.0296630859375,
-0.005054473876953125,
-0.0058135986328125,
0.06671142578125,
0.046051025390625,
-0.054595947265625,
0.037322998046875,
0.08599853515625,
0.05926513671875,
0.1361083984375,
0.0247802734375,
0.004138946533203125,
0.0161895751953125,
0.02587890625,
-0.0180511474609375,
-0.06982421875,
-0.0017862319946289062,
-0.016510009765625,
0.0172882080078125,
-0.022064208984375,
0.05487060546875,
0.07733154296875,
-0.0045166015625,
-0.0889892578125,
0.1053466796875,
-0.053009033203125,
-0.033416748046875,
-0.029083251953125,
-0.00920867919921875,
0.007709503173828125,
0.0164794921875,
-0.0021514892578125,
-0.00490570068359375,
-0.052276611328125,
-0.007022857666015625,
0.019378662109375,
-0.002716064453125,
0.039520263671875,
0.004268646240234375,
-0.0601806640625,
0.011993408203125,
0.005298614501953125,
0.0104827880859375,
-0.0035114288330078125,
-0.00920867919921875,
0.0236968994140625,
0.0213470458984375,
-0.053558349609375,
0.0019664764404296875,
0.0106201171875,
0.0364990234375,
0.004459381103515625,
-0.02764892578125,
-0.00263214111328125,
0.0021114349365234375,
0.0011377334594726562,
0.01464080810546875,
-0.012298583984375,
-0.0289459228515625,
0.043853759765625,
-0.0116119384765625,
-0.0159759521484375,
-0.043853759765625,
0.0027561187744140625,
-0.04193115234375,
-0.07073974609375,
0.003658294677734375,
0.0153961181640625,
0.01081085205078125,
-0.03173828125,
-0.01316070556640625,
-0.01080322265625,
0.029144287109375,
0.0192413330078125,
-0.0250244140625,
-0.0017185211181640625,
0.058624267578125,
-0.051300048828125,
-0.00655364990234375,
0.01385498046875,
-0.0019083023071289062,
0.01837158203125,
-0.00856781005859375,
-0.002246856689453125,
-0.0179443359375,
0.039031982421875,
0.0260467529296875,
0.0297698974609375,
-0.01406097412109375,
0.0302276611328125,
-0.01351165771484375,
-0.030029296875,
0.02734375,
0.0204315185546875,
0.031951904296875,
-0.04052734375,
0.01126861572265625,
0.025787353515625,
-0.00206756591796875,
-0.00958251953125,
0.037628173828125,
-0.004608154296875,
0.032135009765625,
-0.0205078125,
-0.01276397705078125,
0.01367950439453125,
-0.011962890625,
0.00691986083984375,
-0.00021266937255859375,
0.0018110275268554688,
-0.0133056640625,
0.01235198974609375,
0.04205322265625,
-0.01123046875,
0.0196990966796875
]
|
5e5324560800c3da87bd87047b6b2bd384d13305 | Wordpress Stackexchange
Q: How to get attachment id as soon as it is uploaded through media uploader in jquery? Using jquery, I am trying to get image attachment id of all images requested to upload through media uploader on post edit page or upload.php.
Here is what I tried but this works after all images are uploaded:
if (typeof wp.Uploader !== 'undefined' && typeof wp.Uploader.queue !== 'undefined') {
wp.Uploader.queue.on('reset', function() {
console.log('images uploaded!');
});
}
How can achieve the same?
Thanks
A: You are close, you just need to hook into the add event instead of the reset event. (In case you did not know, these are standard events provided by Backbone collections. So familiarizing yourself with that will be helpful when developing things around stuff where WordPress employs Backbone.js.)
So basically you'd modify your code like this:
if (typeof wp.Uploader !== 'undefined' && typeof wp.Uploader.queue !== 'undefined') {
wp.Uploader.queue.on('add', function() {
console.log('image uploaded!');
});
}
| Q: How to get attachment id as soon as it is uploaded through media uploader in jquery? Using jquery, I am trying to get image attachment id of all images requested to upload through media uploader on post edit page or upload.php.
Here is what I tried but this works after all images are uploaded:
if (typeof wp.Uploader !== 'undefined' && typeof wp.Uploader.queue !== 'undefined') {
wp.Uploader.queue.on('reset', function() {
console.log('images uploaded!');
});
}
How can achieve the same?
Thanks
A: You are close, you just need to hook into the add event instead of the reset event. (In case you did not know, these are standard events provided by Backbone collections. So familiarizing yourself with that will be helpful when developing things around stuff where WordPress employs Backbone.js.)
So basically you'd modify your code like this:
if (typeof wp.Uploader !== 'undefined' && typeof wp.Uploader.queue !== 'undefined') {
wp.Uploader.queue.on('add', function() {
console.log('image uploaded!');
});
}
| wordpress | {
"language": "en",
"length": 154,
"provenance": "stackexchange_00019.jsonl.gz:454072",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/181891"
} | [
0.03155517578125,
0.03460693359375,
-0.0225067138671875,
0.00312042236328125,
0.03961181640625,
-0.0396728515625,
0.0406494140625,
-0.053558349609375,
0.035614013671875,
0.0206451416015625,
-0.0226898193359375,
0.0017566680908203125,
0.009063720703125,
-0.0276641845703125,
-0.0081024169921875,
-0.004100799560546875,
0.032135009765625,
-0.0261383056640625,
0.037322998046875,
-0.00042057037353515625,
0.01041412353515625,
0.0311279296875,
0.040069580078125,
0.0103302001953125,
0.0012178421020507812,
0.048095703125,
0.0491943359375,
0.014862060546875,
-0.016845703125,
-0.0155029296875,
0.0164794921875,
-0.004169464111328125,
0.004207611083984375,
-0.028564453125,
0.033416748046875,
-0.0289764404296875,
-0.008636474609375,
-0.0013408660888671875,
0.0034694671630859375,
0.019439697265625,
0.035888671875,
-0.025482177734375,
0.009979248046875,
-0.0112152099609375,
-0.00167083740234375,
-0.017730712890625,
0.0271453857421875,
-0.040557861328125,
0.041839599609375,
0.0537109375,
0.0068511962890625,
0.0148162841796875,
-0.0011529922485351562,
0.0307159423828125,
-0.0197906494140625,
-0.027984619140625,
-0.04132080078125,
0.017333984375,
0.0190887451171875,
0.04730224609375,
-0.00833892822265625,
0.0020771026611328125,
-0.0013971328735351562,
-0.0450439453125,
-0.04095458984375,
0.01094818115234375,
0.020782470703125,
-0.004894256591796875,
-0.036407470703125,
-0.06585693359375,
0.0014705657958984375,
-0.01446533203125,
0.001621246337890625,
-0.019134521484375,
-0.007061004638671875,
-0.01332855224609375,
0.02911376953125,
-0.03375244140625,
-0.013824462890625,
0.01403045654296875,
0.04241943359375,
-0.015899658203125,
-0.033172607421875,
0.04437255859375,
0.01194000244140625,
0.0672607421875,
0.007175445556640625,
-0.044952392578125,
-0.033447265625,
-0.00868988037109375,
-0.0304718017578125,
0.01554107666015625,
0.02020263671875,
-0.042205810546875,
-0.0557861328125,
-0.0179595947265625,
0.02471923828125,
0.04974365234375,
-0.000156402587890625,
0.0012540817260742188,
0.011505126953125,
-0.038482666015625,
0.00634002685546875,
-0.032073974609375,
0.005878448486328125,
-0.026702880859375,
0.00264739990234375,
-0.06689453125,
0.0101318359375,
0.0200347900390625,
-0.04193115234375,
0.052398681640625,
0.0290679931640625,
0.015594482421875,
-0.007694244384765625,
-0.0164794921875,
-0.0124053955078125,
0.0197906494140625,
-0.0258026123046875,
-0.0053863525390625,
-0.00887298583984375,
-0.00585174560546875,
-0.01078033447265625,
0.0063629150390625,
0.032318115234375,
0.00688934326171875,
-0.01195526123046875,
0.009185791015625,
-0.0176849365234375,
0.02069091796875,
-0.0239715576171875,
0.0120391845703125,
0.0231170654296875,
0.01401519775390625,
0.00033473968505859375,
-0.00695037841796875,
0.0248565673828125,
0.0158233642578125,
0.02252197265625,
-0.00421905517578125,
-0.002223968505859375,
-0.0187835693359375,
0.0072174072265625,
0.00617218017578125,
-0.052398681640625,
0.038665771484375,
0.014190673828125,
-0.00045299530029296875,
-0.031341552734375,
-0.08734130859375,
-0.00527191162109375,
-0.046600341796875,
0.0489501953125,
0.022247314453125,
-0.051177978515625,
-0.01280975341796875,
0.04266357421875,
-0.035552978515625,
-0.0282135009765625,
-0.08648681640625,
0.023284912109375,
0.01305389404296875,
0.0247802734375,
0.030792236328125,
0.04107666015625,
-0.014495849609375,
-0.05340576171875,
0.003459930419921875,
0.033599853515625,
0.059600830078125,
0.006717681884765625,
-0.03204345703125,
0.02056884765625,
0.0062103271484375,
-0.0197296142578125,
0.005977630615234375,
0.01220703125,
-0.007137298583984375,
0.01305389404296875,
0.02392578125,
-0.01500701904296875,
-0.034210205078125,
0.03240966796875,
-0.0149078369140625,
-0.044281005859375,
0.032379150390625,
0.01468658447265625,
0.06414794921875,
0.0087432861328125,
0.0143585205078125,
0.039886474609375,
0.0174713134765625,
-0.049224853515625,
0.0131378173828125,
0.0000622868537902832,
0.0208740234375,
-0.031341552734375,
0.0299530029296875,
-0.0142974853515625,
-0.034698486328125,
0.004474639892578125,
0.00267791748046875,
-0.01092529296875,
-0.01003265380859375,
-0.05126953125,
-0.024749755859375,
-0.01282501220703125,
0.022064208984375,
-0.0196075439453125,
-0.00666046142578125,
0.033477783203125,
-0.002288818359375,
-0.031463623046875,
-0.01080322265625,
-0.01537322998046875,
0.021331787109375,
-0.045745849609375,
0.007808685302734375,
-0.042724609375,
0.06390380859375,
-0.08526611328125,
-0.02227783203125,
-0.07373046875,
-0.0096282958984375,
0.022308349609375,
0.0307159423828125,
-0.0306549072265625,
-0.006221771240234375,
0.0384521484375,
0.006500244140625,
0.01531219482421875,
0.012420654296875,
-0.04571533203125,
-0.022552490234375,
-0.030914306640625,
-0.03387451171875,
-0.048583984375,
-0.10638427734375,
0.04364013671875,
0.0650634765625,
0.02093505859375,
0.0278472900390625,
0.006603240966796875,
0.054443359375,
0.03204345703125,
0.031524658203125,
0.041748046875,
0.005764007568359375,
0.0178985595703125,
0.050506591796875,
-0.028411865234375,
0.006565093994140625,
0.0162200927734375,
-0.03985595703125,
0.00457763671875,
0.05426025390625,
-0.00952911376953125,
-0.00223541259765625,
-0.0227508544921875,
0.058349609375,
-0.0246124267578125,
-0.01409912109375,
0.0163421630859375,
-0.0269622802734375,
0.0302276611328125,
0.0244598388671875,
0.042633056640625,
0.037811279296875,
-0.039642333984375,
0.035888671875,
0.0169525146484375,
-0.0138092041015625,
0.01100921630859375,
0.06109619140625,
0.037872314453125,
0.01428985595703125,
-0.0094757080078125,
-0.0478515625,
0.01322174072265625,
0.035186767578125,
-0.0254974365234375,
-0.0170745849609375,
-0.01012420654296875,
-0.017578125,
0.0152130126953125,
-0.02777099609375,
0.0173797607421875,
-0.040283203125,
-0.0369873046875,
0.005222320556640625,
0.0281524658203125,
0.032379150390625,
-0.004398345947265625,
0.0186920166015625,
-0.0220794677734375,
-0.0009765625,
0.0076446533203125,
-0.0335693359375,
0.03900146484375,
-0.0168609619140625,
0.0447998046875,
0.0679931640625,
-0.0169677734375,
0.047149658203125,
-0.018096923828125,
-0.0103607177734375,
0.0025882720947265625,
-0.001312255859375,
-0.0102386474609375,
-0.03082275390625,
-0.007564544677734375,
0.01045989990234375,
0.0028743743896484375,
0.01213836669921875,
-0.0276947021484375,
-0.04254150390625,
-0.0151214599609375,
-0.0110015869140625,
-0.082763671875,
-0.07562255859375,
-0.01253509521484375,
-0.0858154296875,
-0.00518035888671875,
-0.01507568359375,
-0.047088623046875,
0.0005817413330078125,
0.0128936767578125,
0.00927734375,
-0.047760009765625,
0.00008785724639892578,
0.0034637451171875,
-0.026580810546875,
-0.01224517822265625,
-0.0033168792724609375,
-0.006626129150390625,
0.00028705596923828125,
0.00843048095703125,
-0.006999969482421875,
-0.007053375244140625,
-0.032867431640625,
-0.0014963150024414062,
-0.006404876708984375,
-0.0067901611328125,
-0.004283905029296875,
0.0029926300048828125,
-0.027923583984375,
0.00870513916015625,
0.00856781005859375,
0.004871368408203125,
0.0168914794921875,
-0.003406524658203125,
-0.028106689453125,
-0.0201873779296875,
-0.02325439453125,
-0.01183319091796875,
0.0450439453125,
0.029296875,
-0.02728271484375,
0.019683837890625,
-0.0543212890625,
0.0281524658203125,
-0.025299072265625,
-0.01149749755859375,
-0.0081024169921875,
0.011077880859375,
-0.0288238525390625,
-0.0176849365234375,
-0.005138397216796875,
-0.0015621185302734375,
-0.0143280029296875,
-0.0241851806640625,
-0.04278564453125,
0.078369140625,
0.0008931159973144531,
0.0253448486328125,
-0.0026988983154296875,
0.03350830078125,
0.0089111328125,
-0.01039886474609375,
-0.01267242431640625,
0.0236053466796875,
-0.01546478271484375,
0.01435089111328125,
-0.076416015625,
-0.041107177734375,
0.0310821533203125,
-0.00959014892578125,
0.0211639404296875,
-0.03948974609375,
-0.0150299072265625,
-0.0122222900390625,
0.06915283203125,
0.004940032958984375,
-0.01122283935546875,
-0.0267181396484375,
0.0008263587951660156,
-0.0239410400390625,
-0.03009033203125,
-0.02227783203125,
-0.0018310546875,
0.00010144710540771484,
0.01324462890625,
-0.00548553466796875,
0.01123809814453125,
-0.0099639892578125,
0.00873565673828125,
0.0063323974609375,
-0.026458740234375,
0.03387451171875,
-0.0535888671875,
0.0229034423828125,
-0.0178375244140625,
0.0012674331665039062,
-0.040435791015625,
-0.01528167724609375,
-0.03765869140625,
-0.09307861328125,
-0.007709503173828125,
0.01412200927734375,
0.045166015625,
-0.03509521484375,
0.034210205078125,
-0.037994384765625,
0.048431396484375,
-0.01849365234375,
0.02923583984375,
-0.01849365234375,
0.032012939453125,
-0.016448974609375,
-0.056365966796875,
-0.0159912109375,
-0.049102783203125,
-0.005229949951171875,
-0.07061767578125,
-0.06536865234375,
-0.09832763671875,
-0.0528564453125,
-0.0224609375,
-0.004764556884765625,
-0.0155029296875,
-0.035003662109375,
-0.03509521484375,
-0.0396728515625,
0.02520751953125,
-0.02239990234375,
0.0009889602661132812,
-0.05755615234375,
-0.052764892578125,
0.0188751220703125,
-0.0286712646484375,
-0.0005769729614257812,
0.0006432533264160156,
0.08331298828125,
0.0239105224609375,
0.0006909370422363281,
-0.01058197021484375,
0.01259613037109375,
0.058837890625,
-0.0230865478515625,
0.048248291015625,
0.052703857421875,
-0.030975341796875,
0.061309814453125,
0.04241943359375,
0.01207733154296875,
-0.0282745361328125,
0.0243682861328125,
-0.00039076805114746094,
-0.0364990234375,
0.028717041015625,
0.005767822265625,
0.00618743896484375,
-0.0283966064453125,
-0.03631591796875,
0.0282440185546875,
-0.01329803466796875,
-0.012176513671875,
-0.0223236083984375,
0.0626220703125,
0.01157379150390625,
-0.0635986328125,
0.020904541015625,
-0.0438232421875,
0.040283203125,
-0.0124969482421875,
-0.001251220703125,
0.039825439453125,
0.045440673828125,
-0.0196533203125,
0.01515960693359375,
0.01453399658203125,
0.016571044921875,
0.0226287841796875,
0.006938934326171875,
-0.017059326171875,
-0.021697998046875,
-0.0010766983032226562,
-0.017120361328125,
0.01247406005859375,
-0.01428985595703125,
-0.01232147216796875,
-0.01371002197265625,
0.0006604194641113281,
-0.022064208984375,
-0.031707763671875,
0.042266845703125,
0.028533935546875,
-0.01482391357421875,
-0.00936126708984375,
-0.0704345703125,
0.02001953125,
-0.0640869140625,
0.0406494140625,
0.0079498291015625,
-0.02099609375,
0.0174102783203125,
-0.010467529296875,
-0.0258331298828125,
-0.01163482666015625,
0.012420654296875,
0.028533935546875,
0.005405426025390625,
0.053985595703125,
0.007320404052734375,
-0.010345458984375,
-0.0062255859375,
0.029083251953125,
-0.00693511962890625,
-0.054168701171875,
0.0309600830078125,
0.0201873779296875,
0.06500244140625,
-0.01319122314453125,
-0.06024169921875,
0.037139892578125,
-0.061187744140625,
-0.004207611083984375,
0.0242462158203125,
-0.00911712646484375,
-0.03912353515625,
-0.01097869873046875,
0.032318115234375,
0.044219970703125,
-0.004108428955078125,
-0.0029392242431640625,
0.0036830902099609375,
0.0097503662109375,
0.015655517578125,
0.007526397705078125,
-0.034088134765625,
0.0131683349609375,
0.025482177734375,
-0.00656890869140625,
-0.019622802734375,
-0.0238037109375,
-0.0225067138671875,
-0.0016717910766601562,
-0.023468017578125,
-0.004901885986328125,
0.0697021484375,
0.00848388671875,
0.017425537109375,
-0.030517578125,
-0.018280029296875,
-0.05322265625,
0.000014483928680419922,
0.027313232421875,
-0.0006761550903320312,
0.034149169921875,
-0.03619384765625,
-0.0440673828125,
-0.033935546875,
0.0283966064453125,
-0.0214691162109375,
-0.00978851318359375,
-0.0155181884765625,
-0.020050048828125,
0.0322265625,
-0.007476806640625,
0.00885772705078125,
0.0016937255859375,
0.025604248046875,
-0.00208282470703125,
0.055023193359375,
0.01226043701171875,
-0.004627227783203125,
0.007030487060546875,
0.0131683349609375,
0.01273345947265625,
-0.0084686279296875,
-0.01788330078125,
-0.03363037109375,
-0.04010009765625,
-0.048431396484375,
0.054656982421875,
0.02618408203125,
0.0111846923828125,
-0.02276611328125,
-0.017242431640625,
0.0343017578125,
0.018829345703125,
-0.017303466796875,
-0.0016241073608398438,
-0.021453857421875,
0.0157623291015625,
-0.0246124267578125,
-0.00843048095703125,
0.02117919921875,
-0.04107666015625,
-0.007259368896484375,
0.0157318115234375,
0.03033447265625,
0.01111602783203125,
-0.0299530029296875,
-0.01009368896484375,
0.0292816162109375,
0.038238525390625,
0.0194854736328125,
0.051025390625,
-0.030609130859375,
0.0257568359375,
0.04437255859375,
0.0007791519165039062,
0.0174713134765625,
0.042633056640625,
-0.03594970703125,
-0.056304931640625,
0.06268310546875,
0.0297393798828125,
-0.0287628173828125,
0.04412841796875,
-0.03021240234375,
0.022857666015625,
-0.036529541015625,
0.03619384765625,
0.025604248046875,
0.0054931640625,
-0.004459381103515625,
-0.041717529296875,
0.03668212890625,
-0.0164337158203125,
0.0118560791015625,
0.006420135498046875,
0.0323486328125,
0.0030002593994140625,
-0.0308380126953125,
0.01076507568359375,
-0.00787353515625,
-0.0032863616943359375,
0.0037364959716796875,
0.002864837646484375,
-0.006175994873046875,
-0.0185394287109375,
-0.043548583984375,
0.03466796875,
-0.022186279296875,
-0.0183563232421875,
0.0024585723876953125,
-0.0147705078125,
-0.00835418701171875,
-0.0391845703125,
0.0014886856079101562,
-0.0208892822265625,
0.018829345703125,
0.01171875,
-0.0092315673828125,
0.04022216796875,
0.0288543701171875,
0.0007328987121582031,
0.0025463104248046875,
0.01385498046875,
-0.0235748291015625,
-0.0201568603515625,
-0.0350341796875,
0.0197296142578125,
0.032257080078125,
-0.053985595703125,
0.0259246826171875,
-0.01154327392578125,
-0.01335906982421875,
-0.0008258819580078125,
-0.0011453628540039062,
0.0285491943359375,
-0.07879638671875,
0.0259857177734375,
0.037567138671875,
0.0634765625,
-0.006805419921875,
0.0276031494140625,
0.0084381103515625,
-0.0252532958984375,
-0.0013427734375,
0.0177459716796875,
-0.033935546875,
-0.01229095458984375,
0.022857666015625,
-0.061279296875,
0.0830078125,
0.01213836669921875,
0.0167694091796875,
0.0039520263671875,
0.030517578125,
-0.0221405029296875,
0.0156097412109375,
-0.0462646484375,
0.005794525146484375,
-0.057281494140625,
0.045806884765625,
-0.06793212890625,
0.0055084228515625,
-0.02105712890625,
0.031524658203125,
0.070068359375,
0.0084991455078125,
-0.0105743408203125,
-0.0218963623046875,
0.04681396484375,
0.0631103515625,
-0.0007262229919433594,
0.01523590087890625,
0.01470947265625,
-0.01421356201171875,
0.046966552734375,
-0.008209228515625,
0.0369873046875,
-0.039093017578125,
0.0197906494140625,
0.01837158203125,
0.0179595947265625,
0.035125732421875,
0.0017852783203125,
0.028106689453125,
-0.0089874267578125,
-0.007671356201171875,
0.0316162109375,
-0.040863037109375,
0.033660888671875,
0.052337646484375,
0.044189453125,
-0.0190582275390625,
0.00481414794921875,
-0.0228729248046875,
0.052581787109375,
-0.02862548828125,
0.0055389404296875,
0.044525146484375,
0.0171661376953125,
-0.02911376953125,
0.045440673828125,
0.0157012939453125,
0.030242919921875,
0.004238128662109375,
0.01459503173828125,
-0.039794921875,
-0.0008211135864257812,
-0.09234619140625,
-0.046600341796875,
0.05194091796875,
0.040496826171875,
-0.0154876708984375,
-0.040069580078125,
0.020721435546875,
0.005664825439453125,
0.0017747879028320312,
-0.01422882080078125,
0.01006317138671875,
-0.07794189453125,
-0.023284912109375,
0.0031032562255859375,
0.0098419189453125,
0.0076904296875,
0.02947998046875,
0.01806640625,
0.06866455078125,
-0.0718994140625,
-0.016693115234375,
-0.0275421142578125,
-0.0045928955078125,
0.0244903564453125,
0.0241241455078125,
-0.0004429817199707031,
0.0285797119140625,
0.01238250732421875,
-0.001796722412109375,
-0.029266357421875,
0.044891357421875,
-0.0037403106689453125,
0.03094482421875,
-0.01308441162109375,
-0.01134490966796875,
0.004375457763671875,
0.016845703125,
0.041046142578125,
0.0244903564453125,
0.0474853515625,
-0.021240234375,
-0.05413818359375,
0.018402099609375,
0.00914764404296875,
-0.03997802734375,
0.0127716064453125,
-0.024627685546875,
0.040863037109375,
0.042327880859375,
-0.00027751922607421875,
-0.0023555755615234375,
-0.0092926025390625,
0.0928955078125,
-0.053558349609375,
0.0428466796875,
-0.01666259765625,
-0.053558349609375,
0.01200103759765625,
-0.02337646484375,
0.089599609375,
-0.030059814453125,
-0.0869140625,
-0.0210113525390625,
-0.038543701171875,
-0.0276336669921875,
0.02752685546875,
0.0247039794921875,
-0.0469970703125,
0.053192138671875,
-0.013946533203125,
-0.029266357421875,
-0.005176544189453125,
0.016448974609375,
0.00787353515625,
-0.0017004013061523438,
0.0078582763671875,
-0.0126800537109375,
-0.03973388671875,
0.005950927734375,
0.01145172119140625,
-0.0269317626953125,
0.044158935546875,
0.0009822845458984375,
0.04473876953125,
0.0037078857421875,
0.035430908203125,
0.01204681396484375,
-0.012176513671875,
0.02093505859375,
0.0147705078125,
-0.0318603515625,
0.0091094970703125,
-0.00022590160369873047,
0.0020313262939453125,
0.041290283203125,
-0.01477813720703125,
0.0010166168212890625,
0.00909423828125,
-0.0496826171875,
0.017333984375,
0.05352783203125,
0.0277252197265625,
-0.01485443115234375,
-0.020416259765625,
-0.01812744140625,
-0.0169525146484375,
0.03802490234375,
0.03271484375,
-0.00359344482421875,
0.0163116455078125,
0.0021514892578125,
-0.0206451416015625,
0.0168914794921875,
0.0020275115966796875,
0.01491546630859375,
0.0301361083984375,
-0.033538818359375,
-0.04156494140625,
-0.0249481201171875,
-0.00820159912109375,
-0.02435302734375,
0.005458831787109375,
0.0150299072265625,
-0.01580810546875,
-0.00885772705078125,
0.0092620849609375,
0.024017333984375,
0.0347900390625,
-0.0160980224609375,
0.00933837890625,
0.0240936279296875,
-0.0048828125,
-0.00453948974609375,
-0.0927734375,
-0.0120697021484375,
-0.038177490234375,
0.00684356689453125,
0.0445556640625,
0.001861572265625,
0.0195770263671875,
0.004962921142578125,
-0.013946533203125,
0.003040313720703125,
0.01042938232421875,
-0.047088623046875,
0.0266265869140625,
-0.01235198974609375,
0.01025390625,
-0.0235595703125,
0.054351806640625,
-0.0312042236328125,
0.0007429122924804688,
-0.033447265625,
-0.082275390625,
-0.03631591796875,
0.097412109375,
-0.024627685546875,
0.01154327392578125,
0.02117919921875,
-0.021331787109375,
0.019012451171875,
-0.012542724609375,
0.026519775390625,
0.0460205078125,
0.00634765625,
-0.02764892578125,
-0.003154754638671875,
0.006072998046875,
0.00995635986328125,
-0.031036376953125,
-0.013916015625,
-0.0196990966796875,
0.0117340087890625,
-0.054931640625,
0.031463623046875,
0.0237884521484375,
-0.039794921875,
-0.09515380859375,
0.058746337890625,
-0.040802001953125,
-0.03167724609375,
-0.054351806640625,
0.053375244140625,
0.0294952392578125,
-0.03436279296875,
-0.0245208740234375,
-0.01399993896484375,
-0.00882720947265625,
0.00844573974609375,
0.0006613731384277344,
-0.0251007080078125,
0.05419921875,
-0.0214080810546875,
-0.041290283203125,
-0.0177154541015625,
-0.0160064697265625,
0.001369476318359375,
-0.0062408447265625,
0.01090240478515625,
0.0291595458984375,
0.0279998779296875,
-0.0271148681640625,
0.016204833984375,
0.0072021484375,
-0.020965576171875,
-0.040802001953125,
-0.005229949951171875,
-0.036285400390625,
0.0155029296875,
0.08160400390625,
0.10693359375,
0.0210113525390625,
-0.045166015625,
0.0157928466796875,
0.007354736328125,
-0.0148468017578125,
-0.018707275390625,
0.010528564453125,
-0.043853759765625,
-0.0194549560546875,
-0.0244140625,
0.0006456375122070312,
-0.0469970703125,
0.0008444786071777344,
-0.051025390625,
-0.01593017578125,
-0.022674560546875,
-0.00122833251953125,
-0.0313720703125,
0.037322998046875,
0.0899658203125,
-0.0462646484375,
0.0190277099609375,
0.0009737014770507812,
0.00283050537109375,
0.06964111328125,
-0.006221771240234375,
0.0218048095703125,
0.039276123046875,
-0.035064697265625,
-0.00264739990234375,
0.0328369140625,
-0.017669677734375,
-0.00907135009765625,
-0.006885528564453125,
0.00600433349609375,
0.006984710693359375,
-0.00417327880859375,
0.0081329345703125,
0.0151519775390625,
-0.00884246826171875,
-0.0276336669921875,
0.01849365234375,
-0.042633056640625,
0.05810546875,
-0.007732391357421875,
0.01959228515625,
-0.016632080078125,
0.02178955078125,
0.043182373046875,
-0.041595458984375,
-0.0034885406494140625,
0.042266845703125,
-0.0296173095703125,
-0.033966064453125,
0.0103607177734375,
-0.01284027099609375,
0.01004791259765625,
-0.0006575584411621094
]
|
28578973a78b392ab5497898c1e9728d067b2dea | Wordpress Stackexchange
Q: Implementing the wp json-rest api I have a client that wants to use the wp json-rest api to allow third-party sites to push custom posts (in this case property listings) up to our site.
I've been looking at using the wp json-rest api, since people seem to be having really good success with it and it looks like it would remove several headaches from my job.
There seems to be an abundance of information on what the json-rest api plugin can do, what you can use it for, things like that. But I've found very little information on actually implementing the api.
I don't have any experience building api clients, so I'm a little lost here.
Does anybody have some good resources for this? Or at least something to use as a starting point?
EDIT: I've also considered using Thermal, if that makes a difference.
Thanks in advance!
| Q: Implementing the wp json-rest api I have a client that wants to use the wp json-rest api to allow third-party sites to push custom posts (in this case property listings) up to our site.
I've been looking at using the wp json-rest api, since people seem to be having really good success with it and it looks like it would remove several headaches from my job.
There seems to be an abundance of information on what the json-rest api plugin can do, what you can use it for, things like that. But I've found very little information on actually implementing the api.
I don't have any experience building api clients, so I'm a little lost here.
Does anybody have some good resources for this? Or at least something to use as a starting point?
EDIT: I've also considered using Thermal, if that makes a difference.
Thanks in advance!
| wordpress | {
"language": "en",
"length": 149,
"provenance": "stackexchange_00019.jsonl.gz:454153",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/182154"
} | [
0.04681396484375,
0.0187225341796875,
-0.026702880859375,
-0.025177001953125,
0.035675048828125,
-0.03497314453125,
0.04119873046875,
-0.019317626953125,
-0.03448486328125,
0.0128326416015625,
0.0032558441162109375,
-0.007129669189453125,
-0.003627777099609375,
-0.03173828125,
0.0036334991455078125,
-0.059814453125,
0.043060302734375,
0.0199127197265625,
0.054046630859375,
0.00127410888671875,
0.01168060302734375,
0.0210113525390625,
0.026763916015625,
0.05938720703125,
0.03857421875,
-0.0175933837890625,
0.019073486328125,
-0.0260772705078125,
0.040283203125,
0.01068878173828125,
0.01800537109375,
-0.0394287109375,
-0.01198577880859375,
0.0462646484375,
-0.0200653076171875,
-0.0136566162109375,
0.0264129638671875,
0.0107574462890625,
0.00021779537200927734,
0.03411865234375,
0.02545166015625,
-0.019744873046875,
-0.00948333740234375,
-0.0158843994140625,
-0.0133056640625,
-0.00921630859375,
0.0139007568359375,
-0.033782958984375,
0.01320648193359375,
-0.0174713134765625,
-0.01401519775390625,
0.006610870361328125,
0.0108184814453125,
-0.0194091796875,
-0.0211181640625,
-0.02734375,
0.059844970703125,
0.010406494140625,
0.056121826171875,
-0.05694580078125,
-0.076416015625,
-0.0015125274658203125,
0.04010009765625,
-0.0243072509765625,
0.027984619140625,
-0.013702392578125,
0.00533294677734375,
0.0247039794921875,
-0.0022411346435546875,
0.03277587890625,
0.00853729248046875,
-0.0180206298828125,
-0.0018558502197265625,
-0.0261383056640625,
-0.02996826171875,
-0.0243377685546875,
0.025115966796875,
-0.02935791015625,
-0.002811431884765625,
0.0005650520324707031,
0.007656097412109375,
0.033905029296875,
0.00858306884765625,
-0.02874755859375,
-0.0110626220703125,
-0.012664794921875,
-0.01535797119140625,
-0.01715087890625,
-0.0401611328125,
-0.0206756591796875,
-0.018707275390625,
-0.057281494140625,
-0.052978515625,
0.04010009765625,
-0.004337310791015625,
-0.003360748291015625,
-0.0217437744140625,
-0.02996826171875,
-0.004596710205078125,
0.035980224609375,
0.03228759765625,
-0.05084228515625,
0.08734130859375,
-0.0202178955078125,
0.0037822723388671875,
-0.0081024169921875,
0.01119232177734375,
0.0158843994140625,
0.05474853515625,
0.0198516845703125,
-0.023712158203125,
0.08740234375,
0.044281005859375,
-0.004589080810546875,
-0.039306640625,
-0.0198211669921875,
0.0133514404296875,
-0.0169677734375,
0.005069732666015625,
-0.037872314453125,
-0.01197052001953125,
0.0026302337646484375,
-0.016082763671875,
0.026092529296875,
0.0029544830322265625,
0.01568603515625,
-0.002338409423828125,
-0.003505706787109375,
-0.01611328125,
-0.0011014938354492188,
-0.007152557373046875,
0.05157470703125,
0.0176544189453125,
0.0011396408081054688,
-0.02215576171875,
0.00504302978515625,
0.0301055908203125,
0.015960693359375,
0.023651123046875,
-0.013214111328125,
0.013214111328125,
0.0022373199462890625,
0.01763916015625,
-0.00807952880859375,
0.01507568359375,
-0.0035724639892578125,
0.00814056396484375,
0.0294647216796875,
0.0094146728515625,
0.001277923583984375,
0.0191650390625,
-0.00917816162109375,
-0.00237274169921875,
-0.006343841552734375,
0.082275390625,
-0.03631591796875,
0.0274505615234375,
-0.032806396484375,
0.030914306640625,
0.006488800048828125,
-0.0103607177734375,
-0.0109710693359375,
0.0140533447265625,
-0.01230621337890625,
-0.0120697021484375,
0.01180267333984375,
-0.0096588134765625,
0.012359619140625,
0.0258331298828125,
0.045684814453125,
0.02239990234375,
-0.045745849609375,
-0.0187225341796875,
-0.01297760009765625,
-0.017059326171875,
0.001117706298828125,
0.03399658203125,
0.0296630859375,
0.0214996337890625,
0.00957489013671875,
-0.01076507568359375,
-0.0350341796875,
0.08837890625,
-0.04205322265625,
-0.0275115966796875,
0.08154296875,
0.0198974609375,
0.0787353515625,
-0.033111572265625,
0.01523590087890625,
0.00997161865234375,
0.0869140625,
0.01354217529296875,
0.0283660888671875,
-0.0011510848999023438,
-0.0572509765625,
-0.0167083740234375,
-0.01352691650390625,
-0.022491455078125,
-0.01480865478515625,
-0.07708740234375,
0.0276336669921875,
-0.0092926025390625,
0.032470703125,
0.038787841796875,
0.00830841064453125,
0.0018930435180664062,
0.039520263671875,
0.0033206939697265625,
0.033538818359375,
0.00394439697265625,
0.00774383544921875,
-0.025177001953125,
0.0008878707885742188,
0.01007843017578125,
0.01064300537109375,
-0.005550384521484375,
0.03717041015625,
-0.00798797607421875,
0.0147247314453125,
0.00827789306640625,
-0.0285186767578125,
0.008453369140625,
0.0031032562255859375,
0.029327392578125,
-0.002231597900390625,
-0.0094146728515625,
-0.01788330078125,
0.050445556640625,
0.01092529296875,
0.00714111328125,
-0.00006788969039916992,
0.06890869140625,
0.055694580078125,
-0.0006556510925292969,
-0.0003578662872314453,
0.0247955322265625,
-0.06329345703125,
-0.0002739429473876953,
0.05230712890625,
0.022552490234375,
0.00412750244140625,
0.005054473876953125,
0.008056640625,
0.004150390625,
-0.04718017578125,
0.0225067138671875,
-0.0131072998046875,
0.02764892578125,
0.040496826171875,
-0.0498046875,
-0.0177001953125,
0.02154541015625,
-0.09124755859375,
-0.01207733154296875,
0.05084228515625,
-0.021697998046875,
-0.0161895751953125,
0.007183074951171875,
-0.0179290771484375,
0.0263519287109375,
-0.00829315185546875,
-0.030517578125,
-0.009063720703125,
0.0196990966796875,
-0.00457763671875,
0.0511474609375,
0.056121826171875,
-0.0192108154296875,
-0.020233154296875,
0.0012788772583007812,
0.0219573974609375,
-0.0011873245239257812,
0.04217529296875,
0.02667236328125,
0.05145263671875,
-0.043792724609375,
-0.0180511474609375,
0.0379638671875,
0.0538330078125,
-0.0184326171875,
-0.0025177001953125,
-0.043670654296875,
-0.01263427734375,
0.0005235671997070312,
0.01617431640625,
0.003803253173828125,
0.00859832763671875,
-0.019134521484375,
0.020263671875,
0.025665283203125,
0.059722900390625,
0.01436614990234375,
0.027435302734375,
-0.011260986328125,
0.0279083251953125,
0.018768310546875,
-0.004505157470703125,
0.01003265380859375,
-0.039154052734375,
-0.03143310546875,
0.0236358642578125,
0.0287017822265625,
-0.06427001953125,
-0.0027980804443359375,
-0.002864837646484375,
-0.028045654296875,
0.0278472900390625,
0.0019197463989257812,
-0.042205810546875,
-0.011688232421875,
0.03753662109375,
0.0296173095703125,
-0.0015506744384765625,
0.050567626953125,
-0.0175018310546875,
0.0035991668701171875,
0.0430908203125,
-0.0845947265625,
-0.11395263671875,
0.073486328125,
-0.076904296875,
-0.0220794677734375,
0.005260467529296875,
-0.06512451171875,
-0.00335693359375,
0.049163818359375,
-0.01739501953125,
-0.0102996826171875,
-0.00872802734375,
-0.024993896484375,
-0.038360595703125,
-0.06622314453125,
-0.024383544921875,
0.01306915283203125,
0.01800537109375,
0.007537841796875,
0.061187744140625,
0.0104522705078125,
-0.036407470703125,
-0.00505828857421875,
0.024078369140625,
-0.015228271484375,
-0.0022640228271484375,
0.031951904296875,
-0.0016164779663085938,
-0.0079193115234375,
0.00867462158203125,
0.021728515625,
0.04534912109375,
-0.0528564453125,
-0.0185699462890625,
-0.031982421875,
-0.006526947021484375,
-0.04840087890625,
0.05322265625,
0.05926513671875,
-0.018829345703125,
-0.018341064453125,
-0.045166015625,
0.00229644775390625,
0.01134490966796875,
-0.0248870849609375,
-0.05267333984375,
-0.005100250244140625,
-0.00942230224609375,
-0.029876708984375,
0.00885009765625,
-0.01535797119140625,
-0.0188751220703125,
-0.006519317626953125,
-0.0180511474609375,
0.0294189453125,
-0.01248931884765625,
-0.01276397705078125,
-0.00640106201171875,
0.038330078125,
-0.01433563232421875,
-0.033660888671875,
-0.002574920654296875,
-0.0265045166015625,
-0.044921875,
0.006427764892578125,
-0.073486328125,
-0.0274810791015625,
0.0479736328125,
0.0037441253662109375,
0.0223541259765625,
-0.0169219970703125,
-0.029998779296875,
-0.0020618438720703125,
0.0731201171875,
-0.0086517333984375,
-0.01003265380859375,
-0.00039196014404296875,
0.01561737060546875,
-0.043182373046875,
0.0063018798828125,
-0.053619384765625,
0.0027942657470703125,
0.046234130859375,
-0.0097808837890625,
-0.0285797119140625,
-0.007781982421875,
0.0002205371856689453,
0.0229339599609375,
0.043731689453125,
-0.0015840530395507812,
0.04901123046875,
-0.0748291015625,
0.0195770263671875,
-0.017242431640625,
0.03564453125,
-0.08612060546875,
-0.01508331298828125,
-0.040069580078125,
-0.06787109375,
0.004474639892578125,
-0.054046630859375,
0.05401611328125,
0.0430908203125,
-0.048828125,
-0.007518768310546875,
0.028961181640625,
0.01009368896484375,
0.025238037109375,
0.004764556884765625,
0.00027823448181152344,
-0.0265350341796875,
0.0023326873779296875,
0.026611328125,
-0.0235595703125,
-0.022216796875,
0.00519561767578125,
-0.0272216796875,
0.039703369140625,
0.022735595703125,
0.0004298686981201172,
0.043426513671875,
-0.0282135009765625,
-0.018646240234375,
-0.0238800048828125,
-0.01200103759765625,
0.030609130859375,
-0.01107025146484375,
-0.003948211669921875,
-0.027130126953125,
-0.02398681640625,
0.04046630859375,
-0.0134735107421875,
-0.007358551025390625,
0.00585174560546875,
0.043975830078125,
-0.0059967041015625,
-0.01241302490234375,
-0.05926513671875,
0.0015230178833007812,
0.0191497802734375,
-0.01155853271484375,
0.0164642333984375,
-0.015380859375,
-0.02386474609375,
0.0875244140625,
-0.0308685302734375,
0.0027256011962890625,
0.053741455078125,
-0.0011796951293945312,
0.019989013671875,
-0.01151275634765625,
-0.0001627206802368164,
0.0333251953125,
-0.051971435546875,
0.01079559326171875,
0.007293701171875,
-0.01490020751953125,
0.01190948486328125,
0.03521728515625,
-0.052215576171875,
0.042755126953125,
-0.0173797607421875,
-0.062225341796875,
0.03125,
-0.0186767578125,
-0.0243377685546875,
-0.011749267578125,
0.0072174072265625,
0.004482269287109375,
-0.031768798828125,
0.016937255859375,
-0.01837158203125,
0.003658294677734375,
-0.02362060546875,
0.05810546875,
-0.0374755859375,
0.01439666748046875,
-0.0252838134765625,
-0.0098876953125,
0.062042236328125,
-0.005252838134765625,
-0.07611083984375,
0.01546478271484375,
-0.0018167495727539062,
0.037353515625,
0.0253448486328125,
-0.021728515625,
0.035552978515625,
0.0677490234375,
-0.0185089111328125,
-0.01125335693359375,
-0.0224761962890625,
0.0151214599609375,
-0.06280517578125,
0.022552490234375,
0.0014905929565429688,
-0.0030803680419921875,
-0.0293731689453125,
0.056243896484375,
0.0023403167724609375,
0.0186920166015625,
-0.0157928466796875,
0.05670166015625,
0.044586181640625,
0.01399993896484375,
0.002361297607421875,
0.042266845703125,
-0.026397705078125,
0.0013284683227539062,
-0.0296478271484375,
-0.0194091796875,
0.00772857666015625,
0.0174407958984375,
0.03497314453125,
-0.0007047653198242188,
-0.0285491943359375,
0.01751708984375,
-0.033355712890625,
-0.0235748291015625,
-0.006256103515625,
-0.00894927978515625,
0.0208587646484375,
-0.01262664794921875,
0.0178375244140625,
0.034881591796875,
0.037750244140625,
0.003665924072265625,
0.033111572265625,
0.0158843994140625,
0.035003662109375,
-0.028228759765625,
0.00695037841796875,
-0.015350341796875,
0.002429962158203125,
-0.037628173828125,
-0.042877197265625,
-0.031341552734375,
-0.01071929931640625,
0.006195068359375,
-0.01220703125,
-0.0139617919921875,
0.0255889892578125,
-0.0187225341796875,
-0.00531005859375,
-0.023406982421875,
0.0026111602783203125,
-0.026031494140625,
0.007144927978515625,
0.060791015625,
0.0257720947265625,
0.015533447265625,
-0.035888671875,
-0.0335693359375,
-0.03094482421875,
0.007259368896484375,
-0.037384033203125,
-0.0111236572265625,
0.0071868896484375,
0.037841796875,
0.00951385498046875,
0.01458740234375,
-0.0321044921875,
-0.00814056396484375,
0.0285797119140625,
0.01239013671875,
-0.008575439453125,
-0.021514892578125,
0.08233642578125,
-0.01727294921875,
0.07440185546875,
-0.0104522705078125,
0.01264190673828125,
-0.0305328369140625,
-0.0030841827392578125,
0.006275177001953125,
-0.0736083984375,
-0.044189453125,
-0.0074310302734375,
-0.048492431640625,
0.06390380859375,
0.038970947265625,
-0.0124664306640625,
0.025909423828125,
-0.036224365234375,
0.000621795654296875,
-0.01447296142578125,
0.07666015625,
-0.050018310546875,
-0.00653839111328125,
0.0177764892578125,
0.01396942138671875,
0.003032684326171875,
-0.0199432373046875,
-0.049896240234375,
0.01080322265625,
0.039031982421875,
-0.0015468597412109375,
-0.00102996826171875,
-0.0009593963623046875,
0.01178741455078125,
0.06964111328125,
0.01209259033203125,
0.059600830078125,
0.0104827880859375,
0.01593017578125,
0.04339599609375,
-0.019317626953125,
0.045440673828125,
-0.0257568359375,
0.028411865234375,
-0.0146484375,
0.006412506103515625,
0.024200439453125,
-0.0232391357421875,
0.036163330078125,
0.006084442138671875,
0.05609130859375,
-0.055023193359375,
0.01947021484375,
0.0092010498046875,
-0.0243988037109375,
0.0350341796875,
0.0094451904296875,
-0.0234222412109375,
-0.019378662109375,
0.0015010833740234375,
-0.040802001953125,
-0.04351806640625,
-0.01715087890625,
0.0040130615234375,
-0.01195526123046875,
-0.0175628662109375,
0.01531219482421875,
0.010955810546875,
0.0128631591796875,
-0.0028934478759765625,
-0.0090789794921875,
0.0091552734375,
0.0196380615234375,
0.005252838134765625,
0.01251220703125,
-0.045867919921875,
-0.02874755859375,
0.033172607421875,
-0.007083892822265625,
-0.034088134765625,
0.02191162109375,
-0.01110076904296875,
0.031463623046875,
0.049102783203125,
-0.01090240478515625,
0.01183319091796875,
0.0167388916015625,
-0.04248046875,
-0.006511688232421875,
-0.04547119140625,
0.0079345703125,
0.0411376953125,
-0.046539306640625,
0.0281829833984375,
0.0083465576171875,
-0.0272216796875,
-0.00865936279296875,
-0.016998291015625,
0.07232666015625,
-0.04705810546875,
0.006237030029296875,
0.035614013671875,
0.0078277587890625,
-0.0209503173828125,
-0.0104217529296875,
-0.0005521774291992188,
-0.04583740234375,
0.0008778572082519531,
0.0048980712890625,
-0.01326751708984375,
0.00809478759765625,
0.0089874267578125,
-0.0032100677490234375,
0.07916259765625,
-0.0183563232421875,
-0.0254364013671875,
0.0005197525024414062,
0.045501708984375,
-0.0013475418090820312,
0.054840087890625,
-0.053314208984375,
0.0287628173828125,
-0.03857421875,
0.03594970703125,
-0.048614501953125,
0.0078277587890625,
-0.005764007568359375,
-0.0065155029296875,
0.034088134765625,
0.018524169921875,
-0.043853759765625,
-0.0188446044921875,
-0.0226593017578125,
-0.00788116455078125,
-0.034423828125,
0.064697265625,
0.01006317138671875,
-0.0049285888671875,
0.038543701171875,
-0.005886077880859375,
0.0287933349609375,
0.0033512115478515625,
0.006687164306640625,
0.0186309814453125,
0.027587890625,
0.0301971435546875,
-0.00507354736328125,
0.036834716796875,
-0.0250091552734375,
-0.0116119384765625,
0.03375244140625,
-0.01364898681640625,
-0.0384521484375,
0.034637451171875,
-0.0335693359375,
0.044189453125,
0.0004706382751464844,
-0.02471923828125,
0.01319122314453125,
-0.00811004638671875,
0.04473876953125,
-0.002841949462890625,
0.0206146240234375,
-0.007610321044921875,
-0.00327301025390625,
0.0159149169921875,
0.037445068359375,
-0.057281494140625,
0.0496826171875,
0.03582763671875,
0.037017822265625,
-0.045196533203125,
-0.03955078125,
0.040557861328125,
0.08740234375,
-0.037994384765625,
-0.049591064453125,
0.0105438232421875,
0.0032787322998046875,
0.0316162109375,
0.0303497314453125,
0.0694580078125,
-0.02752685546875,
0.0127716064453125,
-0.005290985107421875,
0.002597808837890625,
-0.008941650390625,
0.02752685546875,
0.01096343994140625,
0.0234527587890625,
-0.046539306640625,
-0.009124755859375,
-0.040191650390625,
0.0032176971435546875,
-0.00264739990234375,
0.0555419921875,
0.0291900634765625,
0.0291900634765625,
-0.0426025390625,
-0.0235595703125,
0.0173797607421875,
0.00717926025390625,
0.06317138671875,
-0.063720703125,
0.05047607421875,
-0.01096343994140625,
0.04339599609375,
-0.0093231201171875,
0.006317138671875,
0.04681396484375,
0.048095703125,
0.01444244384765625,
-0.023529052734375,
-0.00339508056640625,
0.061920166015625,
-0.02691650390625,
-0.048126220703125,
-0.0274810791015625,
-0.00873565673828125,
0.03692626953125,
0.0094757080078125,
0.019683837890625,
0.0015869140625,
0.0298919677734375,
-0.0304412841796875,
0.01605224609375,
-0.00514984130859375,
-0.053558349609375,
0.053863525390625,
0.0016508102416992188,
0.09649658203125,
-0.01018524169921875,
-0.0109405517578125,
0.0125274658203125,
0.0146484375,
-0.0296783447265625,
-0.0228424072265625,
0.01195526123046875,
-0.0311431884765625,
0.065673828125,
-0.0202178955078125,
-0.02435302734375,
0.020263671875,
-0.02197265625,
0.0305938720703125,
-0.046844482421875,
-0.021881103515625,
-0.030914306640625,
-0.0279541015625,
-0.0174102783203125,
0.005207061767578125,
0.03338623046875,
-0.0197296142578125,
0.05902099609375,
-0.0265350341796875,
-0.002773284912109375,
-0.05743408203125,
-0.02691650390625,
0.020233154296875,
0.0005841255187988281,
-0.057159423828125,
0.06646728515625,
0.0184783935546875,
-0.007205963134765625,
-0.0726318359375,
-0.00608062744140625,
0.038726806640625,
-0.0305633544921875,
0.0205841064453125,
-0.0111846923828125,
0.02142333984375,
-0.049896240234375,
-0.00693511962890625,
-0.058868408203125,
-0.005218505859375,
-0.01490020751953125,
-0.042144775390625,
-0.010772705078125,
-0.04620361328125,
0.0379638671875,
0.05194091796875,
0.0082855224609375,
0.00974273681640625,
0.00589752197265625,
-0.044708251953125,
0.00847625732421875,
0.01317596435546875,
0.005313873291015625,
0.0213623046875,
-0.006977081298828125,
-0.022308349609375,
0.0007262229919433594,
0.00913238525390625,
-0.025360107421875,
0.019012451171875,
-0.0160369873046875,
-0.032684326171875,
0.0178680419921875,
0.032928466796875,
0.01384735107421875,
0.00809478759765625,
-0.0300445556640625,
-0.006587982177734375,
0.0101165771484375,
0.0169219970703125,
-0.005054473876953125,
-0.0217742919921875,
0.00005167722702026367,
0.02362060546875,
0.00011670589447021484,
0.016448974609375,
-0.039276123046875,
-0.01428985595703125,
0.0058746337890625,
-0.0245361328125,
0.000576019287109375,
0.0019245147705078125,
-0.037506103515625,
-0.025421142578125,
-0.0253143310546875,
-0.0000393986701965332,
-0.01409912109375,
0.01195526123046875,
-0.0308685302734375,
-0.027435302734375,
-0.028839111328125,
0.0107269287109375,
-0.0227508544921875,
0.05303955078125,
0.038970947265625,
-0.038238525390625,
-0.00943756103515625,
0.05267333984375,
0.05120849609375,
0.07977294921875,
0.0013914108276367188,
0.0015401840209960938,
0.0018596649169921875,
0.0162353515625,
-0.035369873046875,
-0.0692138671875,
0.0082550048828125,
-0.050872802734375,
-0.00299835205078125,
-0.031890869140625,
0.03460693359375,
0.03961181640625,
-0.0281524658203125,
-0.09014892578125,
0.072021484375,
-0.0404052734375,
-0.0174713134765625,
-0.06072998046875,
-0.02703857421875,
0.019805908203125,
-0.02471923828125,
-0.04229736328125,
0.0010118484497070312,
-0.0728759765625,
0.0350341796875,
0.00669097900390625,
0.051788330078125,
-0.02203369140625,
0.024322509765625,
-0.05560302734375,
0.01708984375,
-0.01447296142578125,
0.0100555419921875,
0.00312042236328125,
-0.0081329345703125,
0.029296875,
0.022430419921875,
-0.033905029296875,
0.0244598388671875,
0.00916290283203125,
0.02911376953125,
-0.023895263671875,
-0.0137176513671875,
-0.003795623779296875,
0.006649017333984375,
0.051239013671875,
0.0592041015625,
0.01006317138671875,
-0.044677734375,
0.02069091796875,
-0.023345947265625,
0.0038471221923828125,
-0.0030841827392578125,
-0.022064208984375,
-0.005275726318359375,
0.006816864013671875,
-0.02239990234375,
0.038299560546875,
0.0106353759765625,
-0.04681396484375,
0.01580810546875,
-0.0297393798828125,
0.0182952880859375,
-0.01248931884765625,
0.035888671875,
-0.00015497207641601562,
0.06341552734375,
-0.04205322265625,
-0.0146484375,
0.007297515869140625,
0.01122283935546875,
0.0092010498046875,
-0.005565643310546875,
-0.002197265625,
-0.0006232261657714844,
-0.05169677734375,
0.018402099609375,
-0.00823211669921875,
0.009246826171875,
-0.047210693359375,
-0.0225677490234375,
-0.0102081298828125,
0.02813720703125,
0.0074310302734375,
0.043853759765625,
-0.006443023681640625,
0.0257720947265625,
0.02734375,
-0.0015630722045898438,
-0.0292205810546875,
0.00418853759765625,
-0.032379150390625,
0.0287017822265625,
-0.0306549072265625,
0.0026531219482421875,
0.0186004638671875,
-0.0225982666015625,
-0.0003857612609863281,
0.0177001953125,
-0.039947509765625,
-0.02618408203125,
-0.033721923828125,
-0.0167999267578125,
-0.005535125732421875,
-0.007602691650390625
]
|
902a8f53445a41345152c1570bd3baa1d353d19f | Wordpress Stackexchange
Q: Can I have two child pages of different parents with the same name? I have two pages
- new.hillsong.com/australia/sisterhood
- new.hillsong.com/hills/sisterhood
Both pages are displaying the content for the /hills/sisterhood site but they are different pages with different content. I can't seem to find anything online about this. Is this possible? Are there any ways to make this work.
Thanks for the help!
Paul
A: Yes, you can.
In the old days, this was not possible (as evident from other answers). However, it's possible now.
WordPress now lets child pages (of any post type that is hierarchical) from different parents to have the same slug / name. This is possible because now WordPress considers the entire hierarchical tree (parent-child combination) for uniqueness check.
So the following page URL(s) are possible now:
example.com/parent-1/child
example.com/parent-2/child
| Q: Can I have two child pages of different parents with the same name? I have two pages
- new.hillsong.com/australia/sisterhood
- new.hillsong.com/hills/sisterhood
Both pages are displaying the content for the /hills/sisterhood site but they are different pages with different content. I can't seem to find anything online about this. Is this possible? Are there any ways to make this work.
Thanks for the help!
Paul
A: Yes, you can.
In the old days, this was not possible (as evident from other answers). However, it's possible now.
WordPress now lets child pages (of any post type that is hierarchical) from different parents to have the same slug / name. This is possible because now WordPress considers the entire hierarchical tree (parent-child combination) for uniqueness check.
So the following page URL(s) are possible now:
example.com/parent-1/child
example.com/parent-2/child
A: No, at the time of writing this, no you cannot. Once a slug is used by a page, it cannot be used by other pages. It also can't be used by other posts, regardless of post types
There is a Trac ticket on WP Core that's attempting to fix this so that a slug can be reused by post type, but that would still only allow you one use of your page slug. The chances that you could do what you're trying to do are remote at best, and vanishingly small at worst.
The nearest you could get to this is by adding a /sisterhood/ endpoint via the rewrite rules interface, which would allow you to change the content of a page when the sisterhood endpoint is present. However, this endpoint is just that, an endpoint, it isn't a page with post meta and content, it's just the same page but with an endpoint ( in this case, you'd still be on the Australia page, you'd just have the option to show something different )
Rewrite rules and endpoints are not for the faint of heart, if you're interested in this, I advise you ask the question:
"How do I add a page endpoint? I'm trying to add a sisterhood endpoint to my pages, so that I can display a different template. How do I add the endpoint then load a different template?"
Make sure you link here, and you put the new question link here too
A: I know its an old post, but thought is was worth mentioning (for those like me finding it in search engines).. What I use to get around something similar is a Custom Permalinks plugin. (https://wordpress.org/plugins/custom-permalinks/).
I have been using this plugin for a number of years on about 30 client websites and have never had an issue with it, and it will allow you to create almost any url you like.. if you have 2 or more URLs ending in /sisterhood/, it will do that without any issues, regardless of what the slug is.
A: The easiest way to do it is to not use pages for that, but instead create a new post types for "hills" and/or "australia" this can be a PITA but you need to understand that the combination of post type and slug should be unique (the reason it is done this way is to let you change the permalink structure without having to update whole of the content).
Another option it seems like you need to consider is to use a multisite install with a subdirectory structure. This depends on how distinct are "australia" and "hills" sections and if you have to have aggregating things like native search working on all of your content.
Most complex option is to write your own url parsing. For example, check in your functions.php if the url is "hills/sisterhood" before any template handling code is loaded, and replace the query with one that will serve the specific page you want. The problems here is that it is hard to scale and you might need to find a solution to generating a proper permalink for the page for example to be used in your site map.
| wordpress | {
"language": "en",
"length": 669,
"provenance": "stackexchange_00019.jsonl.gz:454225",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/182424"
} | [
0.022735595703125,
-0.0018529891967773438,
-0.0115203857421875,
-0.0281524658203125,
-0.01548004150390625,
-0.016754150390625,
0.00847625732421875,
-0.0117340087890625,
-0.0212860107421875,
0.01441192626953125,
-0.042083740234375,
0.0195159912109375,
-0.0063323974609375,
-0.029296875,
0.0158538818359375,
-0.041748046875,
0.029022216796875,
0.0081634521484375,
0.018402099609375,
-0.025421142578125,
0.0007939338684082031,
-0.00771331787109375,
0.02105712890625,
0.07843017578125,
0.053009033203125,
-0.046722412109375,
0.0034885406494140625,
0.0008821487426757812,
0.0211029052734375,
-0.01433563232421875,
0.036590576171875,
-0.00887298583984375,
0.0170440673828125,
-0.016571044921875,
0.033233642578125,
-0.03509521484375,
0.03594970703125,
-0.0138702392578125,
-0.0005674362182617188,
0.048797607421875,
0.010223388671875,
-0.0007638931274414062,
0.02081298828125,
0.0286407470703125,
0.00009185075759887695,
-0.0648193359375,
0.041290283203125,
-0.033538818359375,
0.046478271484375,
-0.0135650634765625,
0.0218353271484375,
0.0105743408203125,
0.01409149169921875,
0.002223968505859375,
-0.019775390625,
0.0100555419921875,
0.00737762451171875,
0.0279541015625,
0.0142364501953125,
-0.032745361328125,
-0.022674560546875,
0.022735595703125,
0.0124053955078125,
0.023895263671875,
0.0135955810546875,
-0.0007739067077636719,
-0.01207733154296875,
0.0296173095703125,
-0.0295867919921875,
0.01324462890625,
0.01297760009765625,
-0.024078369140625,
0.0309906005859375,
-0.040374755859375,
-0.005954742431640625,
0.029571533203125,
-0.0288238525390625,
0.005626678466796875,
0.0152740478515625,
-0.000446319580078125,
-0.045013427734375,
-0.026580810546875,
-0.08111572265625,
-0.0276031494140625,
0.0023517608642578125,
0.0022983551025390625,
-0.0310821533203125,
0.00437164306640625,
-0.040557861328125,
0.004634857177734375,
-0.0303955078125,
-0.054931640625,
-0.019683837890625,
0.046630859375,
0.0160064697265625,
0.0006856918334960938,
0.0117645263671875,
0.06085205078125,
-0.045562744140625,
0.0232696533203125,
-0.0499267578125,
0.00261688232421875,
0.0137176513671875,
-0.05401611328125,
0.02215576171875,
0.0288848876953125,
0.02740478515625,
0.048492431640625,
0.05242919921875,
0.0012159347534179688,
-0.0112457275390625,
0.0758056640625,
0.006885528564453125,
-0.06317138671875,
0.0136566162109375,
0.045196533203125,
-0.0017538070678710938,
0.0335693359375,
0.038421630859375,
0.006946563720703125,
-0.017120361328125,
-0.0009198188781738281,
-0.0124053955078125,
0.01293182373046875,
0.01035308837890625,
0.01300048828125,
-0.007625579833984375,
-0.00821685791015625,
0.03704833984375,
0.004726409912109375,
-0.03155517578125,
-0.00849151611328125,
0.061859130859375,
0.051910400390625,
0.0227508544921875,
-0.007152557373046875,
0.004138946533203125,
-0.031097412109375,
-0.0059356689453125,
0.005970001220703125,
-0.0013208389282226562,
-0.02740478515625,
0.0236968994140625,
-0.0273895263671875,
0.01421356201171875,
0.00797271728515625,
0.01166534423828125,
0.0305328369140625,
0.01363372802734375,
0.0121917724609375,
-0.004207611083984375,
-0.01325225830078125,
0.051300048828125,
-0.0345458984375,
-0.0043792724609375,
-0.06549072265625,
-0.0250091552734375,
-0.021514892578125,
0.0286102294921875,
-0.01201629638671875,
0.009857177734375,
0.01605224609375,
0.045166015625,
-0.0172271728515625,
-0.03143310546875,
-0.0171661376953125,
-0.06414794921875,
-0.01800537109375,
0.00566864013671875,
-0.0860595703125,
0.039154052734375,
0.020263671875,
-0.036163330078125,
-0.014373779296875,
0.04638671875,
0.00882720947265625,
-0.03497314453125,
0.00806427001953125,
0.0159149169921875,
0.033721923828125,
0.024169921875,
-0.01495361328125,
0.00496673583984375,
0.03375244140625,
-0.061126708984375,
0.061004638671875,
0.01175689697265625,
0.06414794921875,
-0.0027675628662109375,
-0.0063323974609375,
0.03936767578125,
0.03704833984375,
-0.051055908203125,
0.03729248046875,
0.00115966796875,
-0.004505157470703125,
-0.0275421142578125,
0.01052093505859375,
-0.02069091796875,
-0.01148223876953125,
-0.00395965576171875,
-0.003002166748046875,
0.0032558441162109375,
0.01509857177734375,
-0.00399017333984375,
-0.003574371337890625,
-0.006374359130859375,
0.0243682861328125,
0.00507354736328125,
0.01134490966796875,
0.007427215576171875,
0.017974853515625,
-0.01497650146484375,
-0.040740966796875,
-0.0273895263671875,
0.0134429931640625,
0.00860595703125,
-0.0006060600280761719,
0.0133209228515625,
0.01042938232421875,
0.00992584228515625,
0.0230712890625,
-0.01800537109375,
-0.037750244140625,
0.052825927734375,
0.01300048828125,
-0.025726318359375,
-0.016937255859375,
0.013397216796875,
0.007015228271484375,
-0.06951904296875,
0.0496826171875,
0.03009033203125,
0.0018634796142578125,
-0.0438232421875,
0.00867462158203125,
-0.014862060546875,
-0.019927978515625,
-0.01128387451171875,
0.03729248046875,
0.04058837890625,
0.027923583984375,
-0.001983642578125,
-0.00506591796875,
0.021514892578125,
-0.07568359375,
-0.01454925537109375,
-0.012237548828125,
-0.0028591156005859375,
0.058929443359375,
0.0161895751953125,
0.0093994140625,
-0.007843017578125,
-0.048431396484375,
-0.00215911865234375,
0.03509521484375,
-0.018341064453125,
-0.026611328125,
-0.005126953125,
0.01117706298828125,
0.01337432861328125,
-0.0007696151733398438,
-0.00624847412109375,
0.007537841796875,
-0.02667236328125,
0.01136016845703125,
0.003032684326171875,
0.0005807876586914062,
0.006473541259765625,
-0.00780487060546875,
0.005832672119140625,
-0.052642822265625,
0.004169464111328125,
0.0120697021484375,
0.0406494140625,
-0.0159759521484375,
-0.015777587890625,
-0.007137298583984375,
0.0012121200561523438,
0.0027313232421875,
-0.038909912109375,
-0.023468017578125,
-0.04766845703125,
-0.0164642333984375,
-0.0005135536193847656,
-0.033843994140625,
0.0220489501953125,
0.018829345703125,
-0.0126953125,
0.00809478759765625,
0.01482391357421875,
0.050140380859375,
-0.0090484619140625,
0.0273590087890625,
0.00946044921875,
-0.0022125244140625,
0.02178955078125,
0.0014543533325195312,
0.0239410400390625,
-0.0286102294921875,
0.006000518798828125,
0.0240936279296875,
-0.004520416259765625,
-0.017822265625,
0.0017118453979492188,
-0.0178985595703125,
-0.00942230224609375,
0.01328277587890625,
-0.0014848709106445312,
-0.0169219970703125,
-0.0247802734375,
0.03338623046875,
0.0390625,
0.06396484375,
0.0139007568359375,
-0.0267791748046875,
0.00450897216796875,
0.06744384765625,
-0.0144195556640625,
-0.05120849609375,
-0.042327880859375,
0.01146697998046875,
0.0061798095703125,
0.03326416015625,
0.01186370849609375,
-0.008758544921875,
0.03155517578125,
0.018463134765625,
0.01447296142578125,
-0.046905517578125,
-0.0634765625,
-0.044921875,
-0.04656982421875,
0.0272369384765625,
-0.0016994476318359375,
0.0019063949584960938,
0.024200439453125,
-0.02801513671875,
0.021575927734375,
-0.0012998580932617188,
0.035797119140625,
0.100341796875,
-0.0117340087890625,
-0.0272674560546875,
-0.00811767578125,
-0.0272216796875,
0.01678466796875,
-0.006183624267578125,
0.03546142578125,
0.0170440673828125,
-0.01039886474609375,
-0.004062652587890625,
-0.00577545166015625,
0.05877685546875,
0.007366180419921875,
-0.041259765625,
0.021331787109375,
0.0718994140625,
-0.0025730133056640625,
-0.007198333740234375,
-0.101318359375,
-0.0302734375,
-0.0987548828125,
-0.0008158683776855469,
0.07220458984375,
0.04583740234375,
-0.055084228515625,
0.0206146240234375,
-0.0009226799011230469,
-0.0225982666015625,
0.04107666015625,
-0.0265045166015625,
0.040679931640625,
-0.0211944580078125,
-0.02606201171875,
-0.03997802734375,
0.0140228271484375,
-0.0198974609375,
0.0092010498046875,
-0.01529693603515625,
0.03167724609375,
-0.002567291259765625,
0.04638671875,
-0.04180908203125,
-0.036285400390625,
0.042449951171875,
-0.0234375,
0.00574493408203125,
-0.036407470703125,
-0.0034332275390625,
-0.01316070556640625,
0.07464599609375,
-0.08984375,
-0.0181732177734375,
-0.01934814453125,
0.035247802734375,
-0.0133514404296875,
-0.05694580078125,
-0.0279998779296875,
-0.03387451171875,
-0.015869140625,
0.0032138824462890625,
0.011138916015625,
-0.014892578125,
-0.01068878173828125,
0.00574493408203125,
0.00098419189453125,
-0.005718231201171875,
0.04669189453125,
-0.00652313232421875,
-0.021484375,
0.0250091552734375,
-0.0299072265625,
0.0169219970703125,
-0.0350341796875,
0.006099700927734375,
-0.08154296875,
-0.0253753662109375,
0.013702392578125,
0.06005859375,
-0.029510498046875,
0.00617218017578125,
-0.0218658447265625,
0.0465087890625,
-0.0186767578125,
0.08551025390625,
-0.0019893646240234375,
0.010467529296875,
0.0095977783203125,
0.034027099609375,
0.042633056640625,
-0.0079345703125,
-0.0010099411010742188,
-0.0247955322265625,
0.00975799560546875,
0.0084381103515625,
-0.042236328125,
-0.0007305145263671875,
-0.0166473388671875,
-0.00830841064453125,
-0.06866455078125,
-0.042724609375,
-0.024658203125,
-0.0055389404296875,
0.005657196044921875,
-0.02532958984375,
-0.0296630859375,
-0.067138671875,
0.024383544921875,
0.0076141357421875,
-0.01554107666015625,
-0.000050127506256103516,
0.043304443359375,
0.005237579345703125,
-0.036529541015625,
-0.04437255859375,
-0.026702880859375,
-0.01107025146484375,
0.021209716796875,
0.037384033203125,
-0.0163726806640625,
0.0149078369140625,
0.029571533203125,
-0.0261688232421875,
0.006839752197265625,
0.05499267578125,
-0.0008997917175292969,
0.01023101806640625,
-0.0180206298828125,
0.0035152435302734375,
0.01708984375,
-0.045379638671875,
0.039794921875,
-0.0225830078125,
-0.0054473876953125,
-0.047576904296875,
0.019744873046875,
-0.024017333984375,
0.03564453125,
-0.032257080078125,
-0.020355224609375,
-0.0021152496337890625,
-0.020111083984375,
0.0313720703125,
0.0161590576171875,
-0.0132293701171875,
0.0186920166015625,
0.01971435546875,
-0.0111083984375,
-0.00580596923828125,
0.030609130859375,
-0.0081329345703125,
0.0350341796875,
-0.04052734375,
-0.0247802734375,
-0.0164031982421875,
-0.0241241455078125,
0.09393310546875,
0.03472900390625,
-0.0072174072265625,
0.0267333984375,
-0.039031982421875,
-0.01447296142578125,
-0.0152587890625,
0.018585205078125,
-0.00910186767578125,
-0.0207061767578125,
0.01287841796875,
0.0254669189453125,
0.0220489501953125,
0.00507354736328125,
0.0032806396484375,
-0.024322509765625,
0.0241851806640625,
-0.048187255859375,
-0.019012451171875,
0.034698486328125,
0.01129150390625,
-0.007564544677734375,
-0.0162353515625,
-0.02252197265625,
-0.004375457763671875,
0.0235595703125,
0.033935546875,
-0.007442474365234375,
0.006618499755859375,
0.0018138885498046875,
0.0325927734375,
-0.032257080078125,
-0.0203094482421875,
0.0711669921875,
0.057098388671875,
0.02978515625,
-0.01032257080078125,
-0.0274505615234375,
0.0022182464599609375,
-0.020355224609375,
-0.0241546630859375,
-0.00839996337890625,
0.0200958251953125,
-0.00396728515625,
0.012115478515625,
0.0173492431640625,
0.0509033203125,
-0.0251007080078125,
-0.0252532958984375,
-0.042449951171875,
-0.019805908203125,
0.0185699462890625,
-0.044952392578125,
0.03265380859375,
0.012847900390625,
0.0249176025390625,
-0.005580902099609375,
-0.0089111328125,
-0.05426025390625,
0.0033416748046875,
-0.03564453125,
-0.00971221923828125,
0.0689697265625,
-0.004547119140625,
0.052947998046875,
-0.036468505859375,
-0.0190277099609375,
-0.022308349609375,
-0.01107025146484375,
0.07830810546875,
0.0592041015625,
-0.039154052734375,
0.0089874267578125,
-0.08392333984375,
-0.021331787109375,
-0.0098876953125,
-0.02496337890625,
-0.0306243896484375,
-0.00542449951171875,
0.014129638671875,
0.006969451904296875,
0.01277923583984375,
-0.00913238525390625,
-0.024505615234375,
-0.011566162109375,
0.0184478759765625,
-0.01898193359375,
-0.00632476806640625,
0.053619384765625,
-0.05242919921875,
0.0177001953125,
-0.0204620361328125,
0.0107421875,
0.00858306884765625,
-0.00807952880859375,
0.01403045654296875,
-0.0193939208984375,
-0.02716064453125,
0.0007405281066894531,
-0.04388427734375,
-0.00785064697265625,
0.0196075439453125,
-0.01546478271484375,
0.0253753662109375,
-0.036346435546875,
-0.003017425537109375,
-0.0221099853515625,
0.01529693603515625,
-0.06744384765625,
-0.00945281982421875,
0.0174560546875,
-0.01412200927734375,
0.0094757080078125,
-0.006374359130859375,
-0.0089569091796875,
0.035400390625,
-0.018890380859375,
0.041046142578125,
0.00942230224609375,
-0.044921875,
0.00653839111328125,
0.0302276611328125,
0.0174560546875,
0.04449462890625,
-0.0028209686279296875,
0.031005859375,
0.046417236328125,
0.0298004150390625,
-0.0186614990234375,
-0.0013380050659179688,
0.057098388671875,
0.0013484954833984375,
-0.04571533203125,
0.0030002593994140625,
-0.04949951171875,
-0.019561767578125,
0.00913238525390625,
0.0179901123046875,
-0.0206756591796875,
-0.002269744873046875,
-0.017486572265625,
-0.02197265625,
-0.00847625732421875,
0.031768798828125,
-0.006038665771484375,
0.043426513671875,
-0.0131988525390625,
-0.016265869140625,
-0.00945281982421875,
0.027130126953125,
0.020965576171875,
-0.00925445556640625,
-0.028472900390625,
0.0394287109375,
0.0166778564453125,
0.04144287109375,
-0.0206451416015625,
-0.040313720703125,
0.031890869140625,
-0.0096893310546875,
-0.016754150390625,
-0.0153045654296875,
-0.04132080078125,
-0.00725555419921875,
0.0039825439453125,
-0.03173828125,
0.031341552734375,
0.00875091552734375,
0.053741455078125,
0.0086669921875,
0.04193115234375,
-0.0046234130859375,
0.0022182464599609375,
-0.003032684326171875,
0.00954437255859375,
0.0036067962646484375,
0.0079803466796875,
0.00576019287109375,
-0.031219482421875,
-0.0338134765625,
-0.00214385986328125,
-0.07037353515625,
0.021759033203125,
0.002590179443359375,
0.0208740234375,
0.023162841796875,
-0.005741119384765625,
-0.031951904296875,
0.02728271484375,
-0.01203155517578125,
-0.01087188720703125,
0.0557861328125,
0.0063934326171875,
-0.0391845703125,
-0.072509765625,
0.04156494140625,
-0.07861328125,
0.012908935546875,
0.043365478515625,
-0.11041259765625,
0.11767578125,
0.0045318603515625,
0.09747314453125,
-0.0032215118408203125,
0.02496337890625,
-0.011749267578125,
-0.018707275390625,
-0.033935546875,
0.07476806640625,
0.0504150390625,
0.04876708984375,
-0.0027675628662109375,
-0.0179901123046875,
0.04168701171875,
0.0269927978515625,
0.02679443359375,
-0.0035686492919921875,
-0.0280609130859375,
0.003513336181640625,
0.0496826171875,
-0.0263214111328125,
-0.031707763671875,
0.080322265625,
0.005695343017578125,
-0.016265869140625,
0.040679931640625,
-0.01800537109375,
0.0017919540405273438,
0.01088714599609375,
0.0154571533203125,
0.0182952880859375,
0.005458831787109375,
0.0024204254150390625,
-0.0272979736328125,
0.0007619857788085938,
-0.026947021484375,
-0.02020263671875,
0.0193328857421875,
-0.0181732177734375,
-0.00421905517578125,
0.0408935546875,
0.033111572265625,
-0.0518798828125,
-0.04669189453125,
-0.0257720947265625,
0.050323486328125,
0.00353240966796875,
-0.0012187957763671875,
-0.007568359375,
0.0099945068359375,
-0.031890869140625,
0.0015468597412109375,
-0.0142669677734375,
0.0291900634765625,
-0.0484619140625,
0.03228759765625,
0.027923583984375,
0.0272064208984375,
-0.0192718505859375,
0.01032257080078125,
0.05047607421875,
0.05841064453125,
-0.046722412109375,
-0.035308837890625,
0.01335906982421875,
-0.0234375,
0.00751495361328125,
-0.00754547119140625,
0.0066070556640625,
0.01169586181640625,
0.0036640167236328125,
-0.0253143310546875,
-0.00901031494140625,
0.0159912109375,
0.0289306640625,
-0.0102386474609375,
0.00598907470703125,
-0.0250091552734375,
-0.0117645263671875,
-0.027435302734375,
-0.0088043212890625,
0.03399658203125,
0.0653076171875,
0.01161956787109375,
0.0310821533203125,
-0.033111572265625,
-0.03515625,
-0.022430419921875,
0.006839752197265625,
0.01861572265625,
0.0176849365234375,
-0.03656005859375,
-0.01348876953125,
0.05712890625,
0.031341552734375,
0.0496826171875,
0.0679931640625,
0.04901123046875,
0.01971435546875,
-0.00574493408203125,
0.0110626220703125,
0.0272216796875,
-0.0224761962890625,
0.061614990234375,
-0.03369140625,
-0.01288604736328125,
-0.049591064453125,
-0.041748046875,
-0.0330810546875,
-0.0107574462890625,
-0.006591796875,
0.003662109375,
0.0140228271484375,
0.010833740234375,
-0.01313018798828125,
0.0079803466796875,
0.03717041015625,
0.016021728515625,
0.042510986328125,
-0.09765625,
-0.040008544921875,
-0.0033206939697265625,
-0.02471923828125,
0.052581787109375,
0.0604248046875,
-0.0175323486328125,
0.007373809814453125,
0.06488037109375,
-0.007205963134765625,
-0.02520751953125,
0.0008177757263183594,
0.035369873046875,
0.01291656494140625,
0.00656890869140625,
0.045806884765625,
-0.04107666015625,
0.01407623291015625,
0.01000213623046875,
-0.019256591796875,
0.002170562744140625,
0.1143798828125,
-0.004913330078125,
-0.009033203125,
-0.0172119140625,
0.024749755859375,
-0.01552581787109375,
-0.042449951171875,
0.0809326171875,
-0.01702880859375,
-0.0181732177734375,
-0.00846099853515625,
-0.01042938232421875,
0.024322509765625,
0.01226806640625,
-0.0196075439453125,
0.0188140869140625,
-0.03125,
0.0184326171875,
0.0050811767578125,
0.039031982421875,
-0.0221099853515625,
-0.02947998046875,
-0.03515625,
0.0271453857421875,
0.027740478515625,
0.0085601806640625,
-0.0732421875,
0.026641845703125,
-0.00005692243576049805,
-0.0300140380859375,
0.022552490234375,
-0.053314208984375,
0.0293121337890625,
0.0179901123046875,
0.01290130615234375,
-0.06915283203125,
0.02069091796875,
0.001628875732421875,
-0.0015649795532226562,
0.0087890625,
0.07550048828125,
0.01641845703125,
-0.0673828125,
0.002597808837890625,
0.005916595458984375,
-0.00762176513671875,
-0.0295562744140625,
-0.02252197265625,
0.0282135009765625,
-0.0243377685546875,
-0.02081298828125,
-0.040496826171875,
-0.0288543701171875,
-0.0268707275390625,
0.00836944580078125,
0.0187835693359375,
0.0021076202392578125,
-0.0030155181884765625,
-0.002635955810546875,
0.01136016845703125,
0.035125732421875,
0.0244598388671875,
-0.04083251953125,
0.039825439453125,
-0.0203094482421875,
-0.0021457672119140625,
0.03265380859375,
0.018890380859375,
-0.0087432861328125,
-0.03759765625,
-0.0645751953125,
0.01428985595703125,
-0.020050048828125,
0.003932952880859375,
-0.006038665771484375,
0.019256591796875,
0.0142822265625,
-0.024383544921875,
0.0058746337890625,
0.003749847412109375,
0.02972412109375,
0.058685302734375,
0.02166748046875,
-0.0241851806640625,
-0.024200439453125,
0.001132965087890625,
-0.00646209716796875,
0.01374053955078125,
0.039459228515625,
-0.021759033203125,
-0.04705810546875,
0.004711151123046875,
-0.0019502639770507812,
0.0231781005859375,
-0.043914794921875,
-0.049957275390625,
0.08123779296875,
0.0079345703125,
-0.0357666015625,
-0.04302978515625,
0.0285797119140625,
-0.014556884765625,
0.0345458984375,
-0.00934600830078125,
-0.000006973743438720703,
0.017059326171875,
0.032958984375,
-0.0081634521484375,
0.05194091796875,
-0.03997802734375,
0.037628173828125,
0.0271453857421875,
0.0662841796875,
0.046722412109375,
-0.0238189697265625,
0.030609130859375,
0.04315185546875,
-0.00482177734375,
0.059814453125,
-0.01312255859375,
0.03271484375,
-0.0404052734375,
-0.06427001953125,
-0.01380157470703125,
-0.019012451171875,
-0.01222991943359375,
0.017852783203125,
0.042266845703125,
0.070556640625,
0.004451751708984375,
-0.04351806640625,
-0.065185546875,
-0.056427001953125,
-0.024749755859375,
0.0202789306640625,
0.03643798828125,
-0.0880126953125,
0.02337646484375,
0.0662841796875,
-0.0220489501953125,
0.01180267333984375,
0.0017137527465820312,
-0.0218658447265625,
-0.001636505126953125,
0.030303955078125,
0.00140380859375,
-0.03521728515625,
-0.018218994140625,
0.0179595947265625,
-0.0171051025390625,
0.015625,
-0.0184173583984375,
0.0276336669921875,
0.00994873046875,
-0.00402069091796875,
0.0172119140625,
0.025177001953125,
-0.034088134765625,
0.0006432533264160156,
0.01031494140625,
0.01111602783203125,
-0.029205322265625,
-0.00812530517578125,
-0.030059814453125,
0.0164794921875,
0.016143798828125,
0.003215789794921875,
-0.0183563232421875,
0.0282135009765625,
0.01055145263671875,
0.05194091796875,
0.0171661376953125,
0.0310821533203125,
-0.0017747879028320312,
0.0491943359375,
-0.0281524658203125,
-0.0181427001953125,
-0.0183868408203125,
-0.034881591796875,
-0.00444793701171875,
-0.0232391357421875,
-0.0179595947265625,
-0.06512451171875,
0.0286865234375,
0.0173797607421875,
-0.009918212890625,
0.030914306640625
]
|
8c9cb280bffaa769717c3b628689a1e855e5427f | Wordpress Stackexchange
Q: How to change default width parameter of embedded video in wordpress? I am using embedded video short code of Wordpress for showing video in the content of a post
[embed width="600" height="456"]https://www.youtube.com/watch?v=f5CcOq8UzkI[/embed].
and the rendered html is
<iframe width="600" height="338" src="https://www.youtube.com/embed/f5CcOq8UzkI?feature=oembed" frameborder="0" allowfullscreen=""></iframe>
I found it really nice and cool. It works great.
The only problem is video is not responsive because this takes width in px.
Is there any way to change the width parameter from px to % like 100% ?
A: if you could make it to something like this:
<div class="videoWrapper">
<iframe width="600" height="338" src="https://www.youtube.com/embed/f5CcOq8UzkI?feature=oembed" frameborder="0" allowfullscreen=""></iframe>
</div>
then responsive css for that would be like this:
.videoWrapper {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
height: 0;
}
.videoWrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
if you have no control on the markup, then what we can do is when you put that shortcode in the editor, add some div around it like this:
<div class="videoWrapper">
[embed width="600" height="456"]https://www.youtube.com/watch?v=f5CcOq8UzkI[/embed]
</div>
| Q: How to change default width parameter of embedded video in wordpress? I am using embedded video short code of Wordpress for showing video in the content of a post
[embed width="600" height="456"]https://www.youtube.com/watch?v=f5CcOq8UzkI[/embed].
and the rendered html is
<iframe width="600" height="338" src="https://www.youtube.com/embed/f5CcOq8UzkI?feature=oembed" frameborder="0" allowfullscreen=""></iframe>
I found it really nice and cool. It works great.
The only problem is video is not responsive because this takes width in px.
Is there any way to change the width parameter from px to % like 100% ?
A: if you could make it to something like this:
<div class="videoWrapper">
<iframe width="600" height="338" src="https://www.youtube.com/embed/f5CcOq8UzkI?feature=oembed" frameborder="0" allowfullscreen=""></iframe>
</div>
then responsive css for that would be like this:
.videoWrapper {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
height: 0;
}
.videoWrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
if you have no control on the markup, then what we can do is when you put that shortcode in the editor, add some div around it like this:
<div class="videoWrapper">
[embed width="600" height="456"]https://www.youtube.com/watch?v=f5CcOq8UzkI[/embed]
</div>
| wordpress | {
"language": "en",
"length": 175,
"provenance": "stackexchange_00019.jsonl.gz:454254",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/182539"
} | [
0.0228424072265625,
-0.005207061767578125,
-0.0345458984375,
0.01064300537109375,
0.01428985595703125,
-0.031982421875,
0.06048583984375,
-0.0249481201171875,
-0.019134521484375,
0.00946807861328125,
-0.037506103515625,
0.0179595947265625,
-0.034820556640625,
-0.00199127197265625,
0.005001068115234375,
-0.054534912109375,
0.0249786376953125,
0.044219970703125,
0.0252685546875,
-0.00885009765625,
-0.024810791015625,
0.01035308837890625,
0.00160980224609375,
0.0782470703125,
0.01178741455078125,
-0.0252685546875,
0.0968017578125,
-0.035614013671875,
-0.01470184326171875,
-0.033172607421875,
0.019500732421875,
0.007106781005859375,
0.044769287109375,
0.0225830078125,
-0.059600830078125,
-0.034454345703125,
-0.017822265625,
0.0024013519287109375,
-0.02301025390625,
0.03289794921875,
-0.00611114501953125,
0.020172119140625,
0.07403564453125,
-0.01192474365234375,
0.0099639892578125,
-0.00888824462890625,
-0.0301513671875,
-0.06561279296875,
0.0211639404296875,
-0.0226287841796875,
0.0032291412353515625,
0.0160980224609375,
0.017852783203125,
-0.0251007080078125,
-0.0254058837890625,
0.01537322998046875,
-0.0234222412109375,
-0.025909423828125,
-0.0003256797790527344,
0.02728271484375,
0.034088134765625,
0.039031982421875,
0.00006014108657836914,
0.034088134765625,
-0.0015878677368164062,
-0.045196533203125,
-0.00487518310546875,
0.02313232421875,
-0.005252838134765625,
0.01096343994140625,
0.05401611328125,
0.01256561279296875,
-0.00787353515625,
-0.0416259765625,
-0.0062255859375,
0.020843505859375,
0.03192138671875,
0.00583648681640625,
-0.017669677734375,
-0.0101776123046875,
0.0307769775390625,
0.0014944076538085938,
0.00888824462890625,
-0.05865478515625,
0.058624267578125,
-0.0209503173828125,
0.0023746490478515625,
-0.0070953369140625,
-0.017669677734375,
-0.03143310546875,
-0.01629638671875,
-0.016937255859375,
-0.039398193359375,
-0.0133819580078125,
-0.0413818359375,
-0.0157318115234375,
-0.00917816162109375,
0.002475738525390625,
0.00675201416015625,
0.015106201171875,
0.006744384765625,
-0.03314208984375,
0.027069091796875,
-0.035552978515625,
0.00948333740234375,
0.0180511474609375,
0.00634002685546875,
0.0062408447265625,
0.030303955078125,
0.015106201171875,
-0.007904052734375,
0.053802490234375,
-0.047515869140625,
-0.01442718505859375,
-0.05419921875,
0.0188140869140625,
-0.0477294921875,
-0.0272216796875,
-0.0194854736328125,
0.00458526611328125,
-0.00090789794921875,
0.018157958984375,
0.040557861328125,
-0.0253753662109375,
0.0013151168823242188,
0.0055389404296875,
-0.00815582275390625,
-0.0577392578125,
-0.014923095703125,
0.040313720703125,
-0.0465087890625,
-0.0194854736328125,
0.08929443359375,
0.059112548828125,
0.029937744140625,
-0.021270751953125,
0.017822265625,
-0.001262664794921875,
-0.004852294921875,
0.0258941650390625,
-0.049591064453125,
0.0152740478515625,
0.0560302734375,
-0.039703369140625,
-0.01038360595703125,
0.0059356689453125,
0.015167236328125,
0.0182647705078125,
-0.0285797119140625,
-0.054412841796875,
0.0169677734375,
-0.00749969482421875,
0.023468017578125,
0.035980224609375,
0.033477783203125,
-0.0131683349609375,
0.094970703125,
-0.03778076171875,
-0.039520263671875,
-0.05279541015625,
-0.00559234619140625,
0.0306243896484375,
0.059844970703125,
-0.01113128662109375,
0.01520538330078125,
-0.04046630859375,
-0.049346923828125,
0.01143646240234375,
0.029541015625,
0.11480712890625,
-0.028564453125,
0.005096435546875,
-0.0189208984375,
0.0233917236328125,
-0.015533447265625,
-0.00939178466796875,
-0.0157928466796875,
-0.0019388198852539062,
0.016143798828125,
-0.019805908203125,
-0.01192474365234375,
-0.0095672607421875,
0.03900146484375,
-0.00864410400390625,
0.0263824462890625,
-0.01318359375,
0.01153564453125,
-0.033966064453125,
-0.01409149169921875,
0.03173828125,
-0.00699615478515625,
0.03271484375,
-0.002223968505859375,
0.030029296875,
0.025299072265625,
-0.0249481201171875,
-0.00568389892578125,
-0.009429931640625,
0.004528045654296875,
-0.046875,
0.029510498046875,
0.0033969879150390625,
0.0260162353515625,
-0.0104522705078125,
-0.0008835792541503906,
-0.002056121826171875,
-0.0016231536865234375,
0.0280914306640625,
-0.005916595458984375,
-0.0059814453125,
-0.0112762451171875,
-0.0131683349609375,
0.01312255859375,
-0.041748046875,
-0.0286712646484375,
0.033050537109375,
0.013702392578125,
0.08489990234375,
-0.022003173828125,
0.031646728515625,
-0.0146026611328125,
-0.058135986328125,
0.012176513671875,
0.03955078125,
0.0213623046875,
-0.05963134765625,
0.0186004638671875,
-0.055938720703125,
0.043212890625,
-0.03350830078125,
0.0255279541015625,
0.050201416015625,
0.01373291015625,
-0.0235748291015625,
-0.06512451171875,
-0.01568603515625,
-0.0295257568359375,
-0.01114654541015625,
0.0183868408203125,
0.057586669921875,
0.039093017578125,
0.04718017578125,
-0.0086517333984375,
-0.00858306884765625,
0.0733642578125,
0.01885986328125,
0.038360595703125,
-0.043487548828125,
0.0032711029052734375,
0.0028228759765625,
0.0159759521484375,
-0.01172637939453125,
0.016876220703125,
-0.07098388671875,
0.025238037109375,
0.0147705078125,
0.006191253662109375,
0.034515380859375,
-0.05426025390625,
0.0675048828125,
-0.050933837890625,
0.010467529296875,
0.057342529296875,
-0.043792724609375,
0.0209808349609375,
-0.00902557373046875,
0.034942626953125,
0.0311737060546875,
-0.015625,
0.0009169578552246094,
0.0172576904296875,
0.027099609375,
-0.02313232421875,
0.06982421875,
0.06146240234375,
-0.055328369140625,
-0.0206451416015625,
-0.01264190673828125,
-0.018890380859375,
0.0114288330078125,
0.0020465850830078125,
0.03753662109375,
-0.05108642578125,
-0.0229644775390625,
-0.00995635986328125,
-0.040435791015625,
-0.0343017578125,
0.0142059326171875,
0.023284912109375,
-0.0157623291015625,
0.001514434814453125,
0.03460693359375,
-0.033935546875,
0.065185546875,
0.024139404296875,
-0.0294036865234375,
0.051544189453125,
-0.09271240234375,
0.06976318359375,
-0.0504150390625,
0.04083251953125,
0.05987548828125,
-0.0284423828125,
0.0102691650390625,
0.0010776519775390625,
-0.00826263427734375,
-0.035186767578125,
0.01129913330078125,
-0.0245819091796875,
-0.036224365234375,
-0.0283660888671875,
0.0111083984375,
0.005329132080078125,
0.0078125,
-0.02471923828125,
-0.04034423828125,
-0.033203125,
0.003498077392578125,
-0.060760498046875,
0.0183868408203125,
0.0396728515625,
-0.1480712890625,
0.01140594482421875,
0.00978851318359375,
-0.093994140625,
-0.0225982666015625,
0.09814453125,
-0.006870269775390625,
-0.0012903213500976562,
-0.035980224609375,
-0.01490020751953125,
-0.0309295654296875,
-0.044830322265625,
0.027496337890625,
0.0155487060546875,
-0.0010995864868164062,
0.0130615234375,
-0.013519287109375,
0.01947021484375,
0.005794525146484375,
0.042938232421875,
0.0235595703125,
-0.01474761962890625,
-0.037872314453125,
0.037445068359375,
-0.024139404296875,
-0.031402587890625,
0.01009368896484375,
-0.050994873046875,
0.019927978515625,
-0.010223388671875,
-0.0164794921875,
-0.0279083251953125,
-0.0716552734375,
-0.025909423828125,
0.01264190673828125,
0.0206451416015625,
-0.0484619140625,
0.0006222724914550781,
-0.07513427734375,
0.00106048583984375,
-0.026947021484375,
-0.040191650390625,
-0.0006747245788574219,
0.022918701171875,
-0.01438140869140625,
-0.0112152099609375,
-0.028045654296875,
-0.005161285400390625,
0.007320404052734375,
0.056060791015625,
-0.0245819091796875,
0.003997802734375,
-0.0330810546875,
-0.03204345703125,
-0.04693603515625,
-0.0294189453125,
-0.0258026123046875,
0.042938232421875,
-0.0169830322265625,
0.0265655517578125,
-0.004802703857421875,
0.041351318359375,
-0.0308837890625,
0.0007772445678710938,
0.0394287109375,
0.02130126953125,
0.048309326171875,
-0.01399993896484375,
-0.04217529296875,
-0.01116943359375,
0.0635986328125,
-0.0246124267578125,
-0.017730712890625,
0.0302276611328125,
0.0007181167602539062,
-0.018829345703125,
-0.017730712890625,
-0.06298828125,
0.005748748779296875,
-0.01018524169921875,
0.0094146728515625,
0.0157928466796875,
-0.01200103759765625,
-0.029998779296875,
0.020843505859375,
-0.046112060546875,
-0.01398468017578125,
0.0157318115234375,
0.04840087890625,
-0.0209197998046875,
0.01198577880859375,
-0.04376220703125,
0.034423828125,
-0.0107879638671875,
-0.0021038055419921875,
-0.04449462890625,
-0.0168914794921875,
-0.0171661376953125,
0.06097412109375,
0.016357421875,
-0.00328826904296875,
-0.041107177734375,
0.027801513671875,
-0.008148193359375,
-0.0002244710922241211,
0.0035495758056640625,
0.00612640380859375,
0.019195556640625,
0.0269622802734375,
0.0065155029296875,
-0.002246856689453125,
0.0281982421875,
0.0217437744140625,
-0.049041748046875,
0.01727294921875,
-0.0350341796875,
0.0072479248046875,
0.01062774658203125,
-0.033416748046875,
-0.095703125,
-0.0460205078125,
0.0531005859375,
0.0222625732421875,
-0.0021457672119140625,
0.03887939453125,
-0.03717041015625,
-0.05889892578125,
0.06475830078125,
0.03143310546875,
-0.006954193115234375,
-0.0178985595703125,
0.027862548828125,
0.008697509765625,
-0.049530029296875,
0.00006788969039916992,
0.059112548828125,
0.05877685546875,
-0.00852203369140625,
0.039215087890625,
0.040924072265625,
-0.0284881591796875,
0.0467529296875,
0.033538818359375,
0.0266265869140625,
0.029998779296875,
0.0269775390625,
0.0184783935546875,
-0.044708251953125,
0.06903076171875,
0.032958984375,
-0.0760498046875,
-0.015838623046875,
-0.0185089111328125,
0.00868988037109375,
0.033416748046875,
0.0010213851928710938,
-0.01326751708984375,
0.006496429443359375,
-0.005092620849609375,
-0.0024700164794921875,
-0.0211029052734375,
0.04632568359375,
0.046173095703125,
0.045623779296875,
0.0004000663757324219,
0.01953125,
0.0439453125,
0.01430511474609375,
0.03997802734375,
0.0008678436279296875,
0.0067596435546875,
0.03924560546875,
0.03375244140625,
0.01137542724609375,
0.030303955078125,
0.0106658935546875,
-0.00457763671875,
0.002471923828125,
-0.0229644775390625,
-0.04937744140625,
0.005924224853515625,
0.0012044906616210938,
0.00047898292541503906,
-0.0055084228515625,
0.04376220703125,
0.0278778076171875,
0.004535675048828125,
-0.0157318115234375,
-0.039581298828125,
0.0400390625,
-0.0291595458984375,
0.03228759765625,
0.023529052734375,
-0.0052642822265625,
0.0176849365234375,
0.035064697265625,
0.056365966796875,
0.01276397705078125,
-0.0281524658203125,
0.026702880859375,
0.0265350341796875,
0.0175323486328125,
0.0186004638671875,
-0.002689361572265625,
-0.033905029296875,
0.0260009765625,
-0.0170440673828125,
-0.00795745849609375,
0.0088653564453125,
-0.029510498046875,
0.0144805908203125,
0.0025634765625,
-0.0137481689453125,
0.04437255859375,
-0.032684326171875,
-0.011077880859375,
-0.022491455078125,
-0.032806396484375,
-0.00751495361328125,
-0.01708984375,
0.0168609619140625,
0.0288543701171875,
0.0127716064453125,
-0.0171966552734375,
-0.04449462890625,
-0.00928497314453125,
-0.0023365020751953125,
0.0247344970703125,
-0.0531005859375,
0.0159454345703125,
0.01445770263671875,
0.028778076171875,
-0.0168609619140625,
-0.031005859375,
-0.01934814453125,
0.00555419921875,
-0.04071044921875,
-0.0013675689697265625,
0.081787109375,
-0.060546875,
0.01551055908203125,
-0.0295562744140625,
0.029296875,
-0.0260009765625,
0.0311279296875,
-0.0011129379272460938,
-0.00263214111328125,
-0.0130615234375,
-0.0227813720703125,
-0.045501708984375,
-0.047332763671875,
-0.0163421630859375,
-0.007659912109375,
-0.0380859375,
-0.011444091796875,
-0.057830810546875,
-0.0098114013671875,
-0.03460693359375,
0.026397705078125,
-0.028472900390625,
0.061248779296875,
0.01308441162109375,
0.01015472412109375,
-0.0075836181640625,
0.005828857421875,
0.01343536376953125,
0.00006604194641113281,
0.0243988037109375,
0.0186920166015625,
0.01096343994140625,
-0.0303802490234375,
0.006725311279296875,
-0.01788330078125,
-0.0238494873046875,
0.01110076904296875,
-0.0173187255859375,
-0.031646728515625,
0.00200653076171875,
-0.0036907196044921875,
0.0281982421875,
-0.01284027099609375,
-0.0204315185546875,
-0.0308685302734375,
0.058563232421875,
-0.017608642578125,
0.041259765625,
-0.0013561248779296875,
0.0210418701171875,
0.060211181640625,
-0.041107177734375,
-0.0140533447265625,
-0.008026123046875,
-0.0175933837890625,
-0.00472259521484375,
0.0166473388671875,
-0.024749755859375,
0.0226593017578125,
0.07855224609375,
-0.01259613037109375,
0.03912353515625,
0.0208740234375,
-0.0003845691680908203,
0.00753021240234375,
0.01557159423828125,
-0.00771331787109375,
0.00884246826171875,
0.0238189697265625,
-0.01116943359375,
-0.0034465789794921875,
-0.0121307373046875,
-0.01552581787109375,
0.02166748046875,
-0.0184173583984375,
0.03411865234375,
-0.005615234375,
0.00502777099609375,
-0.00021779537200927734,
-0.046905517578125,
0.020355224609375,
-0.019683837890625,
0.0139312744140625,
-0.021881103515625,
0.047210693359375,
-0.010467529296875,
-0.019561767578125,
0.00458526611328125,
-0.010528564453125,
0.006305694580078125,
0.0057373046875,
0.037353515625,
0.017364501953125,
-0.060150146484375,
0.01422119140625,
0.020233154296875,
0.0246734619140625,
0.0022830963134765625,
0.049407958984375,
-0.0305328369140625,
-0.00420379638671875,
-0.01270294189453125,
0.006725311279296875,
0.00024509429931640625,
-0.028350830078125,
-0.0150909423828125,
0.01316070556640625,
-0.009918212890625,
0.045440673828125,
-0.02490234375,
0.022857666015625,
0.03228759765625,
-0.02630615234375,
-0.0200042724609375,
0.0015201568603515625,
0.0156707763671875,
0.00887298583984375,
-0.031402587890625,
0.0230865478515625,
-0.0509033203125,
-0.007389068603515625,
0.018157958984375,
-0.02911376953125,
0.0145416259765625,
-0.029144287109375,
0.00759124755859375,
0.0273590087890625,
0.01079559326171875,
-0.004169464111328125,
-0.03204345703125,
0.022979736328125,
-0.07867431640625,
-0.0262908935546875,
-0.0004477500915527344,
-0.0252838134765625,
-0.0175018310546875,
-0.029754638671875,
-0.04193115234375,
0.06658935546875,
0.0129852294921875,
-0.008056640625,
-0.00609588623046875,
0.04815673828125,
-0.0251007080078125,
0.0244598388671875,
0.0117645263671875,
0.006832122802734375,
0.04718017578125,
-0.0286865234375,
0.017791748046875,
-0.030853271484375,
0.004848480224609375,
0.0562744140625,
-0.00395965576171875,
0.0004703998565673828,
0.01401519775390625,
0.0174407958984375,
0.08819580078125,
0.059295654296875,
0.0338134765625,
-0.0172882080078125,
-0.023223876953125,
-0.00528717041015625,
-0.0229949951171875,
-0.01374053955078125,
0.00982666015625,
-0.008331298828125,
-0.045501708984375,
0.01187896728515625,
0.0102081298828125,
0.01253509521484375,
0.033843994140625,
0.020477294921875,
-0.0235443115234375,
0.010498046875,
0.0130615234375,
-0.050323486328125,
0.002986907958984375,
0.056732177734375,
0.02716064453125,
-0.060943603515625,
0.00725555419921875,
-0.044830322265625,
0.04681396484375,
-0.028106689453125,
-0.0394287109375,
0.0254058837890625,
-0.00421905517578125,
0.032623291015625,
-0.0124664306640625,
-0.03631591796875,
0.00623321533203125,
0.05078125,
0.0274810791015625,
0.0045623779296875,
-0.000560760498046875,
-0.033050537109375,
0.032073974609375,
0.0280914306640625,
0.0341796875,
-0.042724609375,
0.0104217529296875,
0.01468658447265625,
0.0037994384765625,
-0.007373809814453125,
-0.06890869140625,
-0.031768798828125,
-0.03692626953125,
-0.0177154541015625,
-0.024200439453125,
-0.0011434555053710938,
0.024383544921875,
0.01528167724609375,
0.01239013671875,
0.0196075439453125,
-0.039581298828125,
-0.00937652587890625,
-0.040771484375,
-0.0009398460388183594,
0.0149993896484375,
0.05120849609375,
0.04388427734375,
0.0188446044921875,
-0.0010995864868164062,
-0.0207366943359375,
-0.01525115966796875,
0.026763916015625,
0.038116455078125,
0.0017910003662109375,
0.0036029815673828125,
0.01244354248046875,
0.0181121826171875,
0.0178070068359375,
-0.01104736328125,
0.03662109375,
0.01244354248046875,
-0.0181884765625,
-0.03472900390625,
-0.0015878677368164062,
0.009765625,
-0.0509033203125,
0.0144500732421875,
-0.027099609375,
0.00018668174743652344,
0.00803375244140625,
-0.014923095703125,
-0.01220703125,
-0.006099700927734375,
0.056365966796875,
-0.0108642578125,
0.0195770263671875,
0.005092620849609375,
0.0199127197265625,
-0.03045654296875,
-0.0095977783203125,
-0.03619384765625,
0.035247802734375,
0.008758544921875,
0.0157318115234375,
-0.0484619140625,
-0.0711669921875,
0.01031494140625,
0.021636962890625,
-0.029754638671875,
0.03424072265625,
0.016082763671875,
0.0177764892578125,
-0.044769287109375,
-0.004772186279296875,
0.032318115234375,
-0.0288238525390625,
0.004703521728515625,
0.020294189453125,
-0.0330810546875,
-0.040374755859375,
-0.02606201171875,
0.0535888671875,
-0.006435394287109375,
0.061859130859375,
-0.034698486328125,
0.0101318359375,
0.0023899078369140625,
-0.057952880859375,
0.046173095703125,
-0.024932861328125,
0.014312744140625,
-0.0236968994140625,
-0.027679443359375,
-0.01024627685546875,
0.0197601318359375,
0.0345458984375,
0.011993408203125,
-0.0266265869140625,
0.0224761962890625,
-0.053131103515625,
0.01081085205078125,
-0.005901336669921875,
-0.022491455078125,
-0.035919189453125,
-0.0552978515625,
-0.006866455078125,
0.03375244140625,
-0.0221405029296875,
-0.043853759765625,
-0.028564453125,
0.05999755859375,
0.01459503173828125,
0.004047393798828125,
0.0238494873046875,
-0.0430908203125,
0.032257080078125,
0.033294677734375,
-0.03485107421875,
0.0093841552734375,
-0.01763916015625,
-0.020294189453125,
0.02496337890625,
-0.017974853515625,
0.006931304931640625,
0.01291656494140625,
-0.039337158203125,
0.0158233642578125,
0.02099609375,
0.048675537109375,
-0.01226806640625,
0.005268096923828125,
0.01175689697265625,
-0.02410888671875,
0.01434326171875,
0.044921875,
-0.0171051025390625,
-0.00461578369140625,
-0.001598358154296875,
-0.0021648406982421875,
0.00437164306640625,
-0.032379150390625,
-0.031280517578125,
-0.0074462890625,
0.040130615234375,
0.0113372802734375,
-0.0280303955078125,
-0.01313018798828125,
0.00872039794921875,
0.02880859375,
0.025848388671875,
0.018218994140625,
-0.0122833251953125,
0.0267333984375,
-0.03497314453125,
-0.040802001953125,
-0.0219879150390625,
0.03411865234375,
-0.037628173828125,
0.002307891845703125,
0.03704833984375,
-0.0037384033203125,
-0.025970458984375,
0.032562255859375,
0.018035888671875,
0.0745849609375,
-0.04266357421875,
0.0213470458984375,
0.02069091796875,
0.036376953125,
-0.04345703125,
-0.0672607421875,
-0.00971221923828125,
-0.00846099853515625,
0.0222015380859375,
0.054412841796875,
-0.06622314453125,
-0.04205322265625,
-0.046142578125,
-0.00777435302734375,
0.0218353271484375,
0.04656982421875,
-0.0311126708984375,
-0.01468658447265625,
-0.0003368854522705078,
-0.005001068115234375,
0.033721923828125,
0.007251739501953125,
-0.0019931793212890625,
-0.0168304443359375,
0.0137176513671875,
-0.002208709716796875,
0.022918701171875,
0.033966064453125,
-0.0265960693359375,
-0.01934814453125,
0.0015239715576171875,
-0.0128021240234375,
-0.01093292236328125,
-0.005512237548828125,
0.01213836669921875,
0.0274200439453125,
0.0307769775390625,
-0.01190948486328125,
-0.0153350830078125,
-0.0011529922485351562,
-0.033966064453125,
-0.003170013427734375,
-0.039337158203125,
-0.025787353515625,
-0.0288238525390625,
0.051910400390625,
0.04095458984375,
-0.00909423828125,
-0.01026153564453125,
-0.044036865234375,
-0.0236663818359375,
0.006870269775390625,
-0.0268096923828125,
0.007472991943359375,
-0.0712890625,
-0.029754638671875,
-0.02252197265625,
0.009796142578125,
-0.0024967193603515625,
-0.05438232421875,
-0.025634765625,
-0.02734375,
-0.038787841796875,
0.013916015625,
-0.031707763671875,
0.0178680419921875,
0.09356689453125,
-0.062347412109375,
-0.023193359375,
0.0214996337890625,
0.000972747802734375,
0.0250396728515625,
-0.022857666015625,
-0.0034084320068359375,
-0.007343292236328125,
-0.00891876220703125,
0.020904541015625,
0.025421142578125,
0.0282135009765625,
-0.007709503173828125,
-0.028350830078125,
-0.01194000244140625,
-0.0201263427734375,
-0.0076751708984375,
-0.00685882568359375,
0.016815185546875,
-0.0230560302734375,
-0.002590179443359375,
-0.00008469820022583008,
-0.047027587890625,
0.01079559326171875,
-0.0163726806640625,
-0.00439453125,
0.01409149169921875,
0.033477783203125,
0.07794189453125,
-0.004665374755859375,
0.00862884521484375,
0.031951904296875,
-0.00234222412109375,
-0.04193115234375,
0.0248260498046875,
-0.055084228515625,
0.015472412109375,
0.0006895065307617188
]
|
0a46dc90e690ec7c47b2186063e050bc4dd744ee | Wordpress Stackexchange
Q: Getting headers property from WP_Theme object Using wp_get_theme returns an object holding the properties of the current theme. The headers property contains any array of information I wish to access.
I can access the other properties using normal notation
wp_get_theme()->theme_root
When I try
wp_get_theme()->headers
I get NULL
How can I access the array within the headers property? Below is a var_dump of wp_get_theme()
object(WP_Theme)#381 (11) {
["theme_root":"WP_Theme":private]=>
string(14) "/path/to/theme"
["headers":"WP_Theme":private]=>
array(11) {
["Name"]=>
string(9) "Site Name"
["ThemeURI"]=>
string(0) ""
["Description"]=>
string(11) "Description"
...
}
["headers_sanitized":"WP_Theme":private]=>
NULL`
...
A: You cannot access the $headers property as it is a private property.
Members declared as private may only be accessed by the class that defines the member
For that reason, you get NULL when you try to access the property with wp_get_theme()->headers. You need to make use of the magic __get() method of the class to get the info you are after.
Example: (From the codex page, wp_get_theme())
<?php
$my_theme = wp_get_theme();
echo $my_theme->get( 'TextDomain' );
echo $my_theme->get( 'ThemeURI' );
?>
| Q: Getting headers property from WP_Theme object Using wp_get_theme returns an object holding the properties of the current theme. The headers property contains any array of information I wish to access.
I can access the other properties using normal notation
wp_get_theme()->theme_root
When I try
wp_get_theme()->headers
I get NULL
How can I access the array within the headers property? Below is a var_dump of wp_get_theme()
object(WP_Theme)#381 (11) {
["theme_root":"WP_Theme":private]=>
string(14) "/path/to/theme"
["headers":"WP_Theme":private]=>
array(11) {
["Name"]=>
string(9) "Site Name"
["ThemeURI"]=>
string(0) ""
["Description"]=>
string(11) "Description"
...
}
["headers_sanitized":"WP_Theme":private]=>
NULL`
...
A: You cannot access the $headers property as it is a private property.
Members declared as private may only be accessed by the class that defines the member
For that reason, you get NULL when you try to access the property with wp_get_theme()->headers. You need to make use of the magic __get() method of the class to get the info you are after.
Example: (From the codex page, wp_get_theme())
<?php
$my_theme = wp_get_theme();
echo $my_theme->get( 'TextDomain' );
echo $my_theme->get( 'ThemeURI' );
?>
| wordpress | {
"language": "en",
"length": 170,
"provenance": "stackexchange_00019.jsonl.gz:454277",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/182641"
} | [
-0.0188751220703125,
-0.032012939453125,
-0.0025348663330078125,
0.002643585205078125,
-0.034332275390625,
-0.004428863525390625,
0.00460052490234375,
-0.0016717910766601562,
-0.01010894775390625,
0.029083251953125,
-0.0311737060546875,
-0.0019445419311523438,
-0.0174560546875,
-0.004364013671875,
-0.022003173828125,
-0.0340576171875,
0.04876708984375,
-0.0224456787109375,
0.0693359375,
0.02008056640625,
0.0094757080078125,
0.055572509765625,
0.04437255859375,
-0.00490570068359375,
0.039947509765625,
-0.049407958984375,
0.07293701171875,
-0.0182647705078125,
0.0313720703125,
-0.0204925537109375,
0.033294677734375,
0.0034847259521484375,
0.006988525390625,
0.0511474609375,
-0.0196380615234375,
0.009124755859375,
-0.004547119140625,
0.02447509765625,
0.03521728515625,
0.00628662109375,
0.020477294921875,
0.01218414306640625,
-0.034515380859375,
0.07269287109375,
-0.03839111328125,
-0.08526611328125,
0.0141448974609375,
-0.04449462890625,
-0.0116729736328125,
0.00885772705078125,
0.004199981689453125,
0.0102081298828125,
0.01410675048828125,
-0.00344085693359375,
-0.00473785400390625,
0.0029087066650390625,
-0.014129638671875,
0.034271240234375,
0.035919189453125,
-0.0247802734375,
-0.06402587890625,
-0.0251922607421875,
0.02447509765625,
-0.038116455078125,
-0.005672454833984375,
0.02020263671875,
0.01336669921875,
0.00598907470703125,
-0.01824951171875,
-0.003765106201171875,
0.026702880859375,
-0.01372528076171875,
-0.001049041748046875,
-0.01059722900390625,
0.00965118408203125,
-0.05645751953125,
-0.01241302490234375,
-0.07281494140625,
0.01442718505859375,
0.0244140625,
0.03125,
-0.00848388671875,
-0.07574462890625,
0.0253753662109375,
0.0105438232421875,
0.05548095703125,
-0.0005431175231933594,
-0.051025390625,
-0.01319122314453125,
-0.0181732177734375,
-0.0225372314453125,
-0.016693115234375,
-0.0215606689453125,
0.0153045654296875,
-0.0014896392822265625,
-0.031982421875,
0.00943756103515625,
0.01419830322265625,
-0.01560211181640625,
0.006420135498046875,
0.0026569366455078125,
-0.039276123046875,
0.05670166015625,
-0.03082275390625,
-0.01092529296875,
-0.00902557373046875,
-0.0010042190551757812,
0.0028533935546875,
0.0009188652038574219,
0.035125732421875,
-0.033447265625,
-0.00395965576171875,
0.036102294921875,
-0.0340576171875,
-0.0171661376953125,
0.017669677734375,
0.006046295166015625,
0.00948333740234375,
0.0322265625,
-0.0035858154296875,
0.00537109375,
0.0239105224609375,
0.0029144287109375,
-0.007541656494140625,
-0.02789306640625,
-0.016021728515625,
-0.023040771484375,
-0.016998291015625,
0.033721923828125,
0.01812744140625,
-0.0019550323486328125,
0.0008854866027832031,
-0.00516510009765625,
-0.00440216064453125,
-0.01500701904296875,
-0.0171661376953125,
0.0543212890625,
0.007129669189453125,
-0.0079803466796875,
-0.0034637451171875,
0.0150146484375,
0.0106353759765625,
-0.004825592041015625,
-0.0310211181640625,
-0.0311279296875,
-0.022735595703125,
0.007648468017578125,
0.03387451171875,
-0.0117645263671875,
-0.04241943359375,
0.0233306884765625,
-0.00189971923828125,
-0.006381988525390625,
0.055938720703125,
-0.01331329345703125,
0.01331329345703125,
0.0145263671875,
-0.01561737060546875,
0.0086212158203125,
-0.0272369384765625,
0.0005540847778320312,
-0.0301361083984375,
-0.00467681884765625,
0.00992584228515625,
-0.04266357421875,
0.0458984375,
0.0206451416015625,
-0.01232147216796875,
0.015960693359375,
-0.000926971435546875,
0.0033702850341796875,
-0.0008635520935058594,
0.0238494873046875,
0.022308349609375,
0.0150604248046875,
0.01276397705078125,
0.01235198974609375,
-0.01187896728515625,
0.026214599609375,
0.0108489990234375,
-0.0141448974609375,
-0.025634765625,
0.0028705596923828125,
-0.00244140625,
-0.03656005859375,
0.048370361328125,
0.009918212890625,
0.041778564453125,
0.0004742145538330078,
0.005519866943359375,
0.0185089111328125,
0.035858154296875,
-0.0672607421875,
0.01806640625,
-0.01849365234375,
0.03466796875,
-0.00212860107421875,
0.04638671875,
-0.0115814208984375,
-0.0196685791015625,
0.0245361328125,
-0.02227783203125,
0.0226593017578125,
-0.0254364013671875,
-0.0186309814453125,
-0.00792694091796875,
0.008056640625,
0.01256561279296875,
0.005146026611328125,
0.040802001953125,
0.005275726318359375,
-0.0017957687377929688,
-0.037445068359375,
0.00676727294921875,
-0.01236724853515625,
-0.0202178955078125,
-0.0166473388671875,
0.044189453125,
-0.0011749267578125,
0.00897216796875,
0.01129150390625,
-0.033203125,
0.0240020751953125,
0.01531219482421875,
0.01053619384765625,
0.0237579345703125,
0.0038394927978515625,
0.0189666748046875,
0.065185546875,
0.0546875,
0.0175628662109375,
-0.0751953125,
0.006134033203125,
0.00872802734375,
-0.021331787109375,
-0.01324462890625,
0.01467132568359375,
-0.05792236328125,
0.0189666748046875,
0.04791259765625,
0.0462646484375,
0.056396484375,
-0.0028247833251953125,
-0.0262908935546875,
0.061431884765625,
-0.054412841796875,
-0.006870269775390625,
-0.0250244140625,
0.0251922607421875,
0.0174407958984375,
-0.005924224853515625,
-0.0256195068359375,
0.031463623046875,
-0.0103607177734375,
0.0216827392578125,
0.032806396484375,
-0.00624847412109375,
-0.01528167724609375,
-0.04364013671875,
0.05450439453125,
-0.0047607421875,
-0.005603790283203125,
-0.011474609375,
-0.0006966590881347656,
0.065185546875,
0.006076812744140625,
0.0295257568359375,
0.0214996337890625,
-0.040618896484375,
0.020050048828125,
0.0136871337890625,
-0.00969696044921875,
0.004009246826171875,
0.056671142578125,
0.017730712890625,
0.031463623046875,
0.00539398193359375,
-0.03594970703125,
0.004611968994140625,
0.034515380859375,
-0.0209808349609375,
0.0200653076171875,
-0.05010986328125,
-0.003925323486328125,
-0.027435302734375,
-0.0262908935546875,
0.01116180419921875,
0.033966064453125,
0.0191802978515625,
0.035797119140625,
0.022857666015625,
0.06640625,
-0.0169677734375,
0.058563232421875,
-0.0159912109375,
0.023284912109375,
0.0234222412109375,
-0.035247802734375,
0.031463623046875,
-0.01885986328125,
0.0236663818359375,
0.052764892578125,
0.010955810546875,
-0.01251983642578125,
0.00838470458984375,
-0.044189453125,
-0.00901031494140625,
0.021270751953125,
-0.009552001953125,
-0.01126861572265625,
-0.06878662109375,
0.024749755859375,
0.0195159912109375,
0.017913818359375,
-0.0061492919921875,
-0.05181884765625,
-0.019775390625,
0.022491455078125,
-0.115234375,
-0.08990478515625,
0.001956939697265625,
-0.057708740234375,
-0.00951385498046875,
-0.042572021484375,
-0.03375244140625,
0.01513671875,
-0.05108642578125,
-0.0106353759765625,
0.0172119140625,
-0.0140533447265625,
-0.07122802734375,
-0.03778076171875,
-0.0927734375,
-0.0733642578125,
-0.0164947509765625,
0.0100555419921875,
-0.02642822265625,
0.0303802490234375,
-0.01593017578125,
-0.0103302001953125,
-0.0292816162109375,
0.0723876953125,
0.01078033447265625,
-0.055755615234375,
-0.013214111328125,
0.00949859619140625,
-0.004917144775390625,
0.0063018798828125,
0.0017528533935546875,
0.008026123046875,
-0.012054443359375,
-0.006378173828125,
-0.0216064453125,
-0.05291748046875,
-0.01509857177734375,
0.048370361328125,
0.0185546875,
-0.058685302734375,
0.010040283203125,
-0.078369140625,
-0.0745849609375,
-0.006092071533203125,
-0.07818603515625,
0.0232086181640625,
0.054412841796875,
0.0136566162109375,
-0.01447296142578125,
0.01020050048828125,
-0.011688232421875,
-0.023345947265625,
-0.056884765625,
-0.034515380859375,
0.08795166015625,
0.00641632080078125,
0.0296783447265625,
0.03485107421875,
0.01232147216796875,
-0.0305938720703125,
0.0248565673828125,
0.002239227294921875,
-0.0016603469848632812,
-0.034332275390625,
-0.0006918907165527344,
-0.048980712890625,
-0.03253173828125,
0.0462646484375,
-0.0176544189453125,
0.02447509765625,
-0.03094482421875,
-0.033355712890625,
-0.0019588470458984375,
0.072509765625,
-0.003757476806640625,
-0.020965576171875,
0.0035991668701171875,
0.03265380859375,
-0.063232421875,
-0.0545654296875,
-0.01812744140625,
0.00013530254364013672,
-0.11431884765625,
-0.00780487060546875,
-0.0183563232421875,
-0.034332275390625,
-0.0240020751953125,
0.02459716796875,
-0.078369140625,
-0.04656982421875,
0.0109405517578125,
0.0305023193359375,
0.007244110107421875,
0.0160675048828125,
-0.039703369140625,
0.041107177734375,
0.0042724609375,
-0.01456451416015625,
-0.055755615234375,
-0.0289306640625,
0.044158935546875,
0.04925537109375,
-0.00566864013671875,
-0.036865234375,
0.006870269775390625,
0.043121337890625,
0.0223846435546875,
0.06903076171875,
0.0008878707885742188,
-0.00089263916015625,
0.0230560302734375,
-0.055267333984375,
0.00031876564025878906,
-0.0273895263671875,
0.0243682861328125,
-0.007793426513671875,
-0.05462646484375,
0.010833740234375,
-0.0217437744140625,
0.0169677734375,
0.01445770263671875,
-0.034912109375,
0.024658203125,
-0.0023822784423828125,
0.0256500244140625,
0.0234375,
-0.00574493408203125,
0.0249176025390625,
0.0034999847412109375,
0.03094482421875,
0.0673828125,
0.03240966796875,
-0.006137847900390625,
-0.018402099609375,
0.0826416015625,
0.01849365234375,
-0.04852294921875,
-0.0152587890625,
0.00664520263671875,
0.04376220703125,
-0.029144287109375,
0.023590087890625,
-0.0007867813110351562,
-0.05401611328125,
0.10479736328125,
0.00508880615234375,
-0.022247314453125,
0.036895751953125,
0.01407623291015625,
0.03802490234375,
-0.00820159912109375,
-0.0115509033203125,
0.03363037109375,
-0.0057220458984375,
0.0183258056640625,
-0.0025920867919921875,
-0.007232666015625,
0.00365447998046875,
0.0026950836181640625,
-0.017303466796875,
0.01552581787109375,
0.0025634765625,
-0.0263519287109375,
-0.0018825531005859375,
0.01039886474609375,
0.0111541748046875,
0.01439666748046875,
-0.0020599365234375,
-0.021697998046875,
0.00763702392578125,
0.0180816650390625,
-0.041107177734375,
0.0182952880859375,
-0.037109375,
0.020172119140625,
0.00818634033203125,
0.004703521728515625,
-0.03424072265625,
-0.01311492919921875,
0.035552978515625,
-0.028228759765625,
-0.08331298828125,
0.00812530517578125,
-0.0218658447265625,
0.06524658203125,
0.0474853515625,
-0.0379638671875,
0.0477294921875,
0.037506103515625,
-0.002147674560546875,
-0.0032291412353515625,
-0.031463623046875,
0.01024627685546875,
-0.03997802734375,
0.0513916015625,
0.0233001708984375,
-0.00386810302734375,
-0.0007185935974121094,
0.0753173828125,
0.01023101806640625,
0.03497314453125,
0.00079345703125,
-0.00896453857421875,
-0.00927734375,
0.0396728515625,
0.009765625,
-0.0040283203125,
0.036163330078125,
-0.0110015869140625,
0.031646728515625,
-0.0234527587890625,
0.0102081298828125,
0.01824951171875,
0.04071044921875,
-0.00362396240234375,
-0.0165557861328125,
0.0123138427734375,
-0.028289794921875,
0.01230621337890625,
0.0029754638671875,
0.01119232177734375,
-0.0011081695556640625,
-0.009002685546875,
0.045135498046875,
0.05096435546875,
0.0160980224609375,
-0.005786895751953125,
-0.01605224609375,
-0.0221710205078125,
0.0018472671508789062,
0.019683837890625,
-0.024749755859375,
0.01059722900390625,
0.005382537841796875,
-0.06243896484375,
-0.01605224609375,
0.00849151611328125,
-0.0943603515625,
-0.03106689453125,
-0.004543304443359375,
-0.0160064697265625,
0.01551055908203125,
-0.023162841796875,
0.0116424560546875,
-0.041473388671875,
0.0220489501953125,
-0.07080078125,
-0.005138397216796875,
0.06768798828125,
0.048675537109375,
-0.04718017578125,
0.0242462158203125,
-0.03656005859375,
0.01395416259765625,
-0.016998291015625,
-0.0751953125,
-0.0290069580078125,
-0.0164337158203125,
-0.0186004638671875,
0.0170745849609375,
-0.005588531494140625,
-0.00867462158203125,
0.01739501953125,
0.0186004638671875,
-0.009979248046875,
0.052947998046875,
-0.012603759765625,
0.0731201171875,
0.035797119140625,
0.036285400390625,
0.037078857421875,
0.0469970703125,
-0.00843048095703125,
-0.0228118896484375,
0.042999267578125,
-0.012786865234375,
-0.037841796875,
-0.05059814453125,
-0.004283905029296875,
-0.016357421875,
0.0472412109375,
-0.01611328125,
0.000385284423828125,
-0.018096923828125,
-0.00002473592758178711,
-0.0234527587890625,
0.01715087890625,
-0.0445556640625,
-0.02764892578125,
-0.0128326416015625,
0.0021953582763671875,
0.017547607421875,
-0.021026611328125,
-0.02606201171875,
0.0244293212890625,
-0.01009368896484375,
0.033233642578125,
-0.00009125471115112305,
-0.044525146484375,
0.07696533203125,
0.09588623046875,
-0.0169219970703125,
0.034393310546875,
0.01629638671875,
-0.00299072265625,
0.01177978515625,
0.034942626953125,
0.01873779296875,
-0.023223876953125,
0.06353759765625,
0.0234222412109375,
-0.0027179718017578125,
0.043914794921875,
-0.0297088623046875,
0.00836944580078125,
0.0119781494140625,
0.0743408203125,
-0.0279388427734375,
0.0027599334716796875,
0.061309814453125,
-0.015869140625,
-0.0053558349609375,
0.0159454345703125,
0.0011682510375976562,
-0.028778076171875,
0.0270538330078125,
-0.0108795166015625,
0.00432586669921875,
0.01468658447265625,
-0.01514434814453125,
-0.00916290283203125,
-0.006313323974609375,
0.049224853515625,
-0.00942230224609375,
-0.03302001953125,
-0.0265960693359375,
0.015655517578125,
-0.0293426513671875,
-0.00760650634765625,
0.01558685302734375,
-0.0171356201171875,
-0.029632568359375,
-0.062744140625,
-0.0252227783203125,
-0.0123291015625,
-0.044708251953125,
0.004650115966796875,
-0.002231597900390625,
0.039093017578125,
0.041656494140625,
0.0023593902587890625,
-0.0133209228515625,
0.01953125,
-0.01873779296875,
0.01441192626953125,
-0.025482177734375,
0.03106689453125,
0.047760009765625,
-0.0364990234375,
0.033203125,
0.011444091796875,
-0.0221099853515625,
-0.0100860595703125,
-0.031158447265625,
0.042755126953125,
-0.01544189453125,
-0.005313873291015625,
0.03570556640625,
0.035614013671875,
-0.016845703125,
0.000934600830078125,
0.072265625,
-0.043182373046875,
0.007381439208984375,
0.045318603515625,
0.04400634765625,
-0.0297393798828125,
0.0321044921875,
-0.040374755859375,
0.05908203125,
0.023834228515625,
0.005840301513671875,
0.024078369140625,
0.023040771484375,
-0.05316162109375,
-0.005741119384765625,
-0.04656982421875,
0.01334381103515625,
0.00444793701171875,
0.030426025390625,
-0.07501220703125,
-0.01320648193359375,
-0.019378662109375,
0.034820556640625,
0.06182861328125,
0.0005860328674316406,
0.0252685546875,
-0.0272979736328125,
0.038848876953125,
0.0279998779296875,
-0.0282135009765625,
-0.0004372596740722656,
0.03204345703125,
0.0242767333984375,
0.021697998046875,
-0.035797119140625,
0.0335693359375,
-0.0751953125,
0.0176239013671875,
0.036895751953125,
-0.00406646728515625,
-0.0237274169921875,
0.03857421875,
-0.004177093505859375,
-0.061798095703125,
0.016876220703125,
0.032745361328125,
-0.0219573974609375,
-0.024078369140625,
0.038238525390625,
0.028106689453125,
0.000949859619140625,
0.005016326904296875,
-0.0255584716796875,
0.047393798828125,
0.0380859375,
-0.0089263916015625,
0.001598358154296875,
0.01554107666015625,
-0.00862884521484375,
-0.0263671875,
-0.012786865234375,
0.01885986328125,
-0.020782470703125,
0.06256103515625,
0.0200347900390625,
0.03680419921875,
-0.0303497314453125,
-0.00274658203125,
0.0204315185546875,
0.064697265625,
-0.041839599609375,
-0.0143890380859375,
0.0234375,
-0.0025310516357421875,
-0.010467529296875,
0.00417327880859375,
0.02947998046875,
0.01285552978515625,
0.00774383544921875,
-0.0194549560546875,
0.019073486328125,
0.052703857421875,
0.0013446807861328125,
0.005405426025390625,
0.03643798828125,
-0.0428466796875,
0.01326751708984375,
-0.0240936279296875,
0.00501251220703125,
0.023468017578125,
0.022216796875,
-0.02880859375,
0.06365966796875,
-0.0085296630859375,
-0.0008673667907714844,
-0.00807952880859375,
0.0256500244140625,
0.010498046875,
0.00656890869140625,
-0.00274658203125,
-0.00467681884765625,
-0.002269744873046875,
0.0262298583984375,
0.0206451416015625,
-0.0157318115234375,
0.037841796875,
0.0243988037109375,
-0.041748046875,
-0.01023101806640625,
-0.01971435546875,
-0.018218994140625,
0.01436614990234375,
-0.036346435546875,
0.00452423095703125,
-0.0037994384765625,
-0.022674560546875,
-0.00850677490234375,
-0.01287078857421875,
0.038299560546875,
-0.01288604736328125,
0.03094482421875,
-0.0010404586791992188,
0.0266265869140625,
0.00035262107849121094,
-0.041473388671875,
-0.058349609375,
-0.003505706787109375,
-0.055084228515625,
-0.0281524658203125,
-0.0174560546875,
0.0005931854248046875,
0.02313232421875,
0.04644775390625,
0.0220947265625,
-0.006999969482421875,
-0.036407470703125,
0.00823974609375,
0.003841400146484375,
-0.01186370849609375,
-0.0011920928955078125,
0.0030765533447265625,
0.0256805419921875,
0.0027599334716796875,
-0.0498046875,
-0.0413818359375,
-0.01800537109375,
0.0287933349609375,
0.036224365234375,
-0.0159454345703125,
0.0482177734375,
0.0286712646484375,
-0.04461669921875,
0.03515625,
-0.052215576171875,
-0.046539306640625,
0.036224365234375,
0.011505126953125,
0.00225067138671875,
-0.00733184814453125,
-0.07196044921875,
-0.010223388671875,
0.06317138671875,
-0.01261138916015625,
0.00982666015625,
0.01904296875,
0.034576416015625,
-0.05926513671875,
0.0260772705078125,
-0.0122528076171875,
-0.034515380859375,
-0.04327392578125,
-0.0021877288818359375,
0.021148681640625,
0.0362548828125,
0.0013513565063476562,
-0.00469970703125,
0.0104522705078125,
-0.0318603515625,
0.055999755859375,
-0.027862548828125,
0.06591796875,
0.0242767333984375,
-0.010467529296875,
-0.044281005859375,
0.00223541259765625,
-0.007205963134765625,
0.0156097412109375,
0.0006489753723144531,
0.046356201171875,
0.01416778564453125,
0.00101470947265625,
0.048492431640625,
0.0206451416015625,
0.04473876953125,
-0.016143798828125,
-0.004856109619140625,
0.028167724609375,
0.001064300537109375,
0.0210723876953125,
-0.0240936279296875,
-0.0184326171875,
-0.0372314453125,
-0.00955963134765625,
0.02532958984375,
-0.01523590087890625,
-0.00010013580322265625,
-0.056243896484375,
-0.004856109619140625,
-0.01145172119140625,
-0.025421142578125,
-0.0006575584411621094,
-0.0238037109375,
-0.01030731201171875,
0.01471710205078125,
-0.04620361328125,
0.0194549560546875,
-0.0012979507446289062,
-0.01641845703125,
-0.017425537109375,
-0.001556396484375,
0.00008392333984375,
0.046783447265625,
0.0201873779296875,
-0.0016193389892578125,
0.035614013671875,
0.002414703369140625,
0.016571044921875,
0.011016845703125,
-0.0131072998046875,
0.058258056640625,
-0.0589599609375,
-0.02545166015625,
0.0230560302734375,
-0.0173797607421875,
-0.01422119140625,
-0.050262451171875,
0.0031604766845703125,
-0.058563232421875,
0.008636474609375,
-0.00951385498046875,
-0.016265869140625,
-0.00661468505859375,
-0.04083251953125,
-0.01522064208984375,
0.030303955078125,
0.01849365234375,
-0.0323486328125,
-0.07916259765625,
-0.004024505615234375,
0.0044403076171875,
0.0106964111328125,
-0.031829833984375,
-0.04168701171875,
-0.040313720703125,
0.0517578125,
0.0283966064453125,
0.019622802734375,
0.023834228515625,
0.02496337890625,
-0.06280517578125,
0.0083465576171875,
-0.019989013671875,
0.027862548828125,
-0.0357666015625,
0.00736236572265625,
-0.0007805824279785156,
0.0220184326171875,
-0.010040283203125,
-0.01036834716796875,
0.02239990234375,
0.002902984619140625,
-0.0021038055419921875,
0.006500244140625,
-0.0209197998046875,
-0.0025157928466796875,
0.05694580078125,
0.0126190185546875,
0.0077667236328125,
-0.013519287109375,
-0.0195465087890625,
0.004154205322265625,
-0.0227203369140625,
-0.0012121200561523438,
0.035430908203125,
-0.08331298828125,
-0.019378662109375,
0.02557373046875,
0.0151214599609375,
0.00868988037109375,
-0.01375579833984375,
-0.0048980712890625,
-0.0377197265625,
-0.049713134765625,
-0.03594970703125,
-0.0010576248168945312,
-0.099609375,
0.0298004150390625,
-0.0070953369140625,
-0.0091094970703125,
-0.0045928955078125,
0.0745849609375,
0.0009341239929199219,
0.040283203125,
0.006244659423828125,
0.0193634033203125,
-0.0579833984375,
0.01026153564453125,
-0.006153106689453125,
0.033172607421875,
-0.0408935546875,
-0.017364501953125,
-0.007755279541015625,
-0.0033092498779296875,
-0.0170135498046875,
-0.01219940185546875,
-0.0018205642700195312,
-0.001056671142578125,
-0.019622802734375,
0.052764892578125,
-0.0011720657348632812,
0.0206298828125,
-0.00528717041015625,
0.05010986328125,
0.00740814208984375,
-0.030242919921875,
0.04290771484375,
-0.046966552734375,
0.0024547576904296875,
-0.0041351318359375,
0.0078887939453125,
-0.039581298828125,
0.019927978515625,
-0.007190704345703125,
0.01544189453125,
0.01824951171875
]
|
bb258b5b6ccd27dc095ce84c7ad8f674d8746b76 | Wordpress Stackexchange
Q: Allow editors access to added plugins I created a custom plugin which i want Users who are Editors to be able to use the plugin.
I found a link here to allow access for editors to allow editors to edit menusallow editors to edit menus?
using this code.
$role_object = get_role( 'editor' );
// add $cap capability to this role object
$role_object->add_cap( 'edit_theme_options' );
So, is there a possible way i can allow Editors access to my custom added plugins
A: Please add the following code.
function activate_plugin_name() {
$role = get_role( 'editor' );
$role->add_cap( 'manage_options' ); // capability
}
// Register our activation hook
register_activation_hook( __FILE__, 'activate_plugin_name' );
function deactivate_plugin_name() {
$role = get_role( 'editor' );
$role->remove_cap( 'manage_options' ); // capability
}
// Register our de-activation hook
register_deactivation_hook( __FILE__, 'deactivate_plugin_name' );`
Refer my tutorial for further explanation.
http://www.pearlbells.co.uk/user-role-editor-access-wordpress-plugins/
| Q: Allow editors access to added plugins I created a custom plugin which i want Users who are Editors to be able to use the plugin.
I found a link here to allow access for editors to allow editors to edit menusallow editors to edit menus?
using this code.
$role_object = get_role( 'editor' );
// add $cap capability to this role object
$role_object->add_cap( 'edit_theme_options' );
So, is there a possible way i can allow Editors access to my custom added plugins
A: Please add the following code.
function activate_plugin_name() {
$role = get_role( 'editor' );
$role->add_cap( 'manage_options' ); // capability
}
// Register our activation hook
register_activation_hook( __FILE__, 'activate_plugin_name' );
function deactivate_plugin_name() {
$role = get_role( 'editor' );
$role->remove_cap( 'manage_options' ); // capability
}
// Register our de-activation hook
register_deactivation_hook( __FILE__, 'deactivate_plugin_name' );`
Refer my tutorial for further explanation.
http://www.pearlbells.co.uk/user-role-editor-access-wordpress-plugins/
A: After a quick search, i got my answer here
https://wordpress.org/support/topic/how-to-allow-non-admins-editors-authors-to-use-certain-wordpress-plugins
By changing all occurances of 'manage_options' to 'edit_pages' in my Plugins files.
Editors are allowed to use plugins with Edit_pages
A: This is just a use case of a need to activate a plugin for "editor" user role. The plugin is called bulk images to posts. This plugin is active only for admin role. So to activate it for "editor" role, you have to go through the "bulk-images-to-posts.php" file and search for big_create_menu() function (responsible of creating a menu in the left admin bar)
Now if you replace "manage_options" by "edit_pages" you will see that in "editor" role admin menu, the plugin becomes active.
Again this is just an example of 1 use case to show the effect of "edit_pages"
Here is a code snippet showing this:
// create new top-level menu
global $bip_admin_page;
$bip_admin_page = add_menu_page(__('Bulk Images to Posts Uploader','bulk-images-to-posts'), __('Bulk','bulk-images-to-posts'), 'edit_pages', 'bulk-images-to-post','bip_upload_page','dashicons-images-alt2');
// create submenu pages
add_submenu_page( 'bulk-images-to-post', __('Bulk Images to Post - Upload','bulk-images-to-posts'), __('Uploader','bulk-images-to-posts'), 'edit_pages', 'bulk-images-to-post');
A: Thanks Liz Eipe for your solution, but unfortunately that did not work for me. What did work for me, was changing the 'capability' for all the add_menu_page() and the add_submenu_page() hooks.
Basically the capability value you set, corresponds to access for different types and combinations of users. You can view all the possible capabilities and their access here.
I choose 'publish_posts' as value, which gives Super Admin, Admin, Editor and Author access to the admin page you register with your hooks.
This was my code before:
add_menu_page(
'My Menu Title',
'custom menu',
'administrator', // Only a admin access
'myplugin/myplugin-admin.php',
'',
plugins_url( 'myplugin/images/icon.png' ),
3
);
And now with Admin, Editor and Author access it's changed to:
add_menu_page(
'My Menu Title',
'custom menu',
'publish_posts', // Admin, Editor, Author access
'myplugin/myplugin-admin.php',
'',
plugins_url( 'myplugin/images/icon.png' ),
3
);
One last small note; do not forget to change this for all the plugin admin pages you want other users to have access to, like all the submenu pages.
| wordpress | {
"language": "en",
"length": 475,
"provenance": "stackexchange_00019.jsonl.gz:454288",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/182693"
} | [
0.0560302734375,
-0.006160736083984375,
0.0287322998046875,
0.003421783447265625,
0.0092315673828125,
-0.0106658935546875,
0.060760498046875,
-0.04888916015625,
-0.01204681396484375,
0.04205322265625,
0.0230255126953125,
-0.022430419921875,
0.00916290283203125,
-0.036834716796875,
-0.01052093505859375,
-0.0186920166015625,
0.00688934326171875,
0.0049896240234375,
0.00933837890625,
-0.04443359375,
0.0237884521484375,
-0.0294952392578125,
0.0200347900390625,
0.01287841796875,
0.03369140625,
0.0301971435546875,
0.03411865234375,
-0.028228759765625,
0.005687713623046875,
-0.019439697265625,
0.035308837890625,
-0.04241943359375,
0.0027256011962890625,
0.0289306640625,
-0.0196075439453125,
0.013458251953125,
0.00298309326171875,
0.009307861328125,
0.01387786865234375,
-0.00089263916015625,
0.042633056640625,
-0.01320648193359375,
-0.057159423828125,
0.042633056640625,
-0.0298919677734375,
-0.08526611328125,
0.07122802734375,
-0.0162353515625,
0.0196380615234375,
-0.011810302734375,
0.0121002197265625,
0.0225372314453125,
0.0258636474609375,
-0.038665771484375,
-0.01422119140625,
-0.016937255859375,
0.0035076141357421875,
0.00661468505859375,
0.0224609375,
0.04986572265625,
-0.017486572265625,
-0.0005879402160644531,
-0.00417327880859375,
-0.05352783203125,
0.0214691162109375,
-0.01436614990234375,
0.0086517333984375,
0.038970947265625,
-0.051116943359375,
0.01047515869140625,
0.0209503173828125,
-0.03216552734375,
0.0221710205078125,
0.0200042724609375,
-0.0125274658203125,
-0.036468505859375,
0.0182952880859375,
0.000766754150390625,
0.036529541015625,
-0.0137176513671875,
0.011810302734375,
0.0010995864868164062,
-0.0304412841796875,
0.0116119384765625,
-0.01439666748046875,
0.0224456787109375,
-0.00823211669921875,
-0.007556915283203125,
-0.01203155517578125,
0.0302886962890625,
-0.013641357421875,
-0.0004954338073730469,
-0.003643035888671875,
0.030517578125,
-0.0010156631469726562,
0.0010919570922851562,
0.054107666015625,
0.03472900390625,
0.00445556640625,
-0.01038360595703125,
0.032012939453125,
-0.07196044921875,
0.0345458984375,
-0.033111572265625,
0.00015103816986083984,
0.03936767578125,
0.0238037109375,
-0.0129547119140625,
-0.005695343017578125,
0.005702972412109375,
-0.01435089111328125,
-0.030364990234375,
-0.016845703125,
-0.0313720703125,
0.03375244140625,
0.026275634765625,
-0.035369873046875,
0.040618896484375,
0.0023593902587890625,
0.033111572265625,
-0.0119476318359375,
0.00861358642578125,
-0.0201416015625,
-0.0284271240234375,
-0.0063629150390625,
-0.042938232421875,
-0.0269927978515625,
0.028106689453125,
0.004871368408203125,
0.0092926025390625,
-0.03802490234375,
0.0067901611328125,
0.08197021484375,
0.0462646484375,
0.0241851806640625,
-0.0196533203125,
0.00485992431640625,
-0.003971099853515625,
-0.0054168701171875,
-0.010345458984375,
0.015625,
0.0288543701171875,
0.04156494140625,
-0.0290679931640625,
-0.01519775390625,
0.0116119384765625,
-0.005157470703125,
0.00811767578125,
0.017669677734375,
-0.00897979736328125,
-0.032623291015625,
-0.04449462890625,
0.0435791015625,
-0.01404571533203125,
0.0210418701171875,
-0.047393798828125,
0.045562744140625,
-0.033721923828125,
0.0018863677978515625,
-0.0276336669921875,
-0.013916015625,
-0.009429931640625,
0.0250701904296875,
-0.05609130859375,
-0.03955078125,
-0.0106201171875,
-0.0278167724609375,
0.00470733642578125,
0.016632080078125,
-0.0124664306640625,
0.03350830078125,
-0.0294647216796875,
-0.00934600830078125,
0.01947021484375,
0.022857666015625,
0.042388916015625,
-0.029083251953125,
0.03765869140625,
0.01386260986328125,
0.0160369873046875,
0.0160369873046875,
-0.0267486572265625,
0.06396484375,
-0.01236724853515625,
-0.042327880859375,
-0.0027370452880859375,
-0.016021728515625,
0.0157623291015625,
0.04266357421875,
0.006008148193359375,
0.0034332275390625,
-0.008026123046875,
-0.0031890869140625,
-0.0189971923828125,
-0.0093841552734375,
-0.0242767333984375,
0.02301025390625,
-0.01284027099609375,
-0.00482177734375,
0.0181427001953125,
0.05328369140625,
-0.0142669677734375,
0.002552032470703125,
-0.04852294921875,
-0.086181640625,
-0.012939453125,
-0.021148681640625,
0.0260772705078125,
0.06060791015625,
0.01372528076171875,
-0.031951904296875,
-0.01019287109375,
0.00226593017578125,
-0.032196044921875,
-0.0267333984375,
0.0306854248046875,
-0.0045928955078125,
0.07073974609375,
0.016204833984375,
0.034759521484375,
0.044647216796875,
-0.0562744140625,
0.06170654296875,
0.0160980224609375,
0.01007080078125,
-0.00824737548828125,
-0.0039520263671875,
0.02191162109375,
0.01499176025390625,
0.01462554931640625,
0.022247314453125,
-0.007411956787109375,
0.033843994140625,
-0.0163421630859375,
-0.0134735107421875,
-0.006298065185546875,
-0.0191497802734375,
-0.1348876953125,
0.00988006591796875,
0.08685302734375,
0.035003662109375,
0.03564453125,
-0.0284271240234375,
-0.0355224609375,
0.055145263671875,
-0.04925537109375,
0.00856781005859375,
-0.026580810546875,
0.00621795654296875,
0.044677734375,
-0.018585205078125,
0.0223388671875,
0.0218963623046875,
0.06280517578125,
-0.016754150390625,
0.042724609375,
-0.023773193359375,
-0.0239715576171875,
0.02435302734375,
-0.02825927734375,
0.014495849609375,
-0.053314208984375,
-0.005771636962890625,
-0.02569580078125,
-0.003475189208984375,
0.01837158203125,
0.0158233642578125,
0.042205810546875,
-0.01537322998046875,
0.00742340087890625,
0.01068878173828125,
0.0253448486328125,
-0.0111236572265625,
-0.01102447509765625,
0.01251220703125,
-0.0390625,
-0.0303802490234375,
0.018951416015625,
0.007801055908203125,
-0.0128173828125,
-0.0281219482421875,
-0.0019245147705078125,
-0.002300262451171875,
-0.0101165771484375,
0.004730224609375,
-0.052490234375,
0.0217437744140625,
-0.021331787109375,
-0.0110626220703125,
-0.00968170166015625,
0.0280303955078125,
-0.0237274169921875,
-0.051544189453125,
0.032684326171875,
0.0009870529174804688,
-0.033477783203125,
0.01259613037109375,
-0.032501220703125,
0.0260772705078125,
-0.0190887451171875,
0.042510986328125,
0.059906005859375,
-0.0059967041015625,
-0.0087127685546875,
0.03399658203125,
-0.052520751953125,
0.019775390625,
0.050201416015625,
0.032684326171875,
0.0011548995971679688,
-0.029205322265625,
0.037841796875,
-0.00670623779296875,
-0.0080108642578125,
-0.00653076171875,
-0.0271453857421875,
-0.0227813720703125,
-0.0006923675537109375,
-0.0216522216796875,
0.0167083740234375,
0.046875,
-0.07757568359375,
0.0310516357421875,
0.00867462158203125,
-0.051361083984375,
-0.0228271484375,
0.053436279296875,
-0.005035400390625,
-0.0305633544921875,
0.0033740997314453125,
0.00006288290023803711,
0.00028133392333984375,
-0.01282501220703125,
-0.006366729736328125,
-0.00620269775390625,
-0.01146697998046875,
-0.00083160400390625,
0.06610107421875,
-0.007694244384765625,
-0.04901123046875,
-0.0014495849609375,
-0.08599853515625,
-0.0248260498046875,
0.0009279251098632812,
0.026824951171875,
0.0001327991485595703,
-0.005680084228515625,
0.0034732818603515625,
-0.0020885467529296875,
0.017303466796875,
-0.0296173095703125,
-0.0284423828125,
0.00978851318359375,
0.02313232421875,
0.036590576171875,
0.038116455078125,
-0.019989013671875,
0.04571533203125,
0.06561279296875,
-0.0041961669921875,
0.04852294921875,
-0.020172119140625,
-0.005794525146484375,
0.0025424957275390625,
-0.01873779296875,
-0.0024566650390625,
0.0013608932495117188,
0.00460052490234375,
-0.00981903076171875,
0.01136016845703125,
0.0067596435546875,
-0.0201873779296875,
0.01019287109375,
-0.0003743171691894531,
0.01702880859375,
0.022857666015625,
0.0225982666015625,
-0.0198974609375,
-0.00782012939453125,
-0.01230621337890625,
-0.00940704345703125,
-0.02191162109375,
0.00605010986328125,
-0.05389404296875,
-0.038543701171875,
0.037994384765625,
-0.041229248046875,
0.01303863525390625,
-0.038848876953125,
-0.01287078857421875,
-0.01496124267578125,
0.0697021484375,
-0.015960693359375,
-0.021270751953125,
-0.0017528533935546875,
0.002277374267578125,
-0.024810791015625,
0.00624847412109375,
-0.0343017578125,
-0.004055023193359375,
-0.06103515625,
0.01073455810546875,
-0.007080078125,
-0.0165557861328125,
-0.0306243896484375,
0.0122528076171875,
-0.05535888671875,
-0.01348114013671875,
0.057342529296875,
-0.06817626953125,
0.0135955810546875,
0.048583984375,
-0.02001953125,
-0.005573272705078125,
-0.055633544921875,
-0.0103302001953125,
-0.11688232421875,
-0.023284912109375,
-0.005443572998046875,
0.080810546875,
0.00727081298828125,
0.0126495361328125,
-0.0292510986328125,
0.0634765625,
0.028900146484375,
0.042510986328125,
0.006092071533203125,
0.0084228515625,
0.00395965576171875,
-0.044921875,
0.01227569580078125,
-0.036895751953125,
0.0232086181640625,
0.00730133056640625,
-0.027801513671875,
-0.0021457672119140625,
-0.058258056640625,
-0.03765869140625,
0.003253936767578125,
-0.061614990234375,
-0.06549072265625,
-0.032257080078125,
-0.0286865234375,
-0.01387786865234375,
0.00012481212615966797,
-0.0222625732421875,
-0.015350341796875,
-0.05352783203125,
0.04290771484375,
-0.048309326171875,
0.01007843017578125,
0.0092620849609375,
0.09686279296875,
0.01253509521484375,
-0.00499725341796875,
0.008270263671875,
0.0013036727905273438,
0.0200347900390625,
0.0142974853515625,
0.0343017578125,
0.02093505859375,
-0.01520538330078125,
0.006877899169921875,
0.01268768310546875,
0.008819580078125,
-0.0355224609375,
0.0260467529296875,
0.0008525848388671875,
-0.0201873779296875,
0.01172637939453125,
0.000972747802734375,
0.02679443359375,
-0.005016326904296875,
-0.0184783935546875,
-0.01275634765625,
0.0288848876953125,
0.0313720703125,
-0.051483154296875,
0.061431884765625,
0.0003120899200439453,
-0.0269622802734375,
0.006771087646484375,
-0.01535797119140625,
0.031890869140625,
0.040008544921875,
-0.01739501953125,
0.01259613037109375,
0.0003905296325683594,
-0.021026611328125,
0.0142364501953125,
0.0174713134765625,
-0.00664520263671875,
0.042572021484375,
-0.0252838134765625,
-0.0274200439453125,
-0.00620269775390625,
-0.00710296630859375,
0.0672607421875,
-0.0162506103515625,
-0.042327880859375,
-0.033111572265625,
-0.0156402587890625,
0.05322265625,
0.037872314453125,
-0.0265960693359375,
0.042816162109375,
0.05059814453125,
-0.01386260986328125,
0.02117919921875,
-0.004108428955078125,
0.010040283203125,
-0.0350341796875,
-0.017242431640625,
0.01045989990234375,
-0.0313720703125,
0.009063720703125,
0.044586181640625,
0.0075225830078125,
0.02154541015625,
-0.0161285400390625,
0.044647216796875,
0.055755615234375,
-0.0027523040771484375,
0.0168304443359375,
0.01412200927734375,
-0.0184783935546875,
-0.037872314453125,
-0.0028057098388671875,
-0.0288238525390625,
-0.0132293701171875,
0.020904541015625,
0.0301055908203125,
-0.00640869140625,
-0.0226593017578125,
0.026123046875,
-0.006946563720703125,
-0.01898193359375,
0.033599853515625,
-0.006465911865234375,
-0.06689453125,
-0.02044677734375,
0.0104217529296875,
0.027618408203125,
-0.029205322265625,
-0.0017185211181640625,
-0.004314422607421875,
0.01270294189453125,
-0.000850677490234375,
-0.02459716796875,
-0.056884765625,
0.02886962890625,
0.04656982421875,
-0.0031032562255859375,
0.01236724853515625,
0.01013946533203125,
-0.0670166015625,
-0.039764404296875,
-0.01305389404296875,
-0.0020275115966796875,
0.048797607421875,
-0.0169830322265625,
0.013336181640625,
-0.044708251953125,
0.0210113525390625,
-0.0667724609375,
-0.0150909423828125,
0.05584716796875,
0.0303955078125,
-0.0491943359375,
-0.006740570068359375,
-0.01436614990234375,
0.0055389404296875,
-0.0279388427734375,
-0.0823974609375,
-0.020355224609375,
-0.0158843994140625,
0.0107574462890625,
0.01194000244140625,
0.01837158203125,
0.0019397735595703125,
-0.010833740234375,
0.04107666015625,
0.0148773193359375,
0.0831298828125,
-0.005863189697265625,
0.0404052734375,
0.027618408203125,
0.0465087890625,
0.025238037109375,
0.002582550048828125,
-0.02362060546875,
-0.0253143310546875,
-0.00582122802734375,
-0.01055145263671875,
-0.0066070556640625,
-0.03961181640625,
0.017364501953125,
0.031402587890625,
0.0733642578125,
0.0036220550537109375,
-0.002071380615234375,
-0.01166534423828125,
0.00907135009765625,
-0.01763916015625,
0.01360321044921875,
-0.0198822021484375,
-0.016021728515625,
0.005153656005859375,
-0.072265625,
0.0160980224609375,
0.0107879638671875,
-0.006072998046875,
0.05694580078125,
-0.051239013671875,
0.04034423828125,
0.05712890625,
-0.025909423828125,
0.04010009765625,
0.057464599609375,
-0.0147857666015625,
0.03485107421875,
0.01922607421875,
0.00569915771484375,
0.01161956787109375,
-0.033843994140625,
0.0176239013671875,
0.033935546875,
0.0192718505859375,
-0.0185546875,
0.02130126953125,
0.01006317138671875,
-0.0012674331665039062,
0.03515625,
0.06201171875,
0.05743408203125,
-0.09527587890625,
0.0162506103515625,
0.0031986236572265625,
0.00482940673828125,
0.0662841796875,
-0.03167724609375,
0.00725555419921875,
-0.022857666015625,
0.057464599609375,
-0.040985107421875,
-0.027313232421875,
0.00406646728515625,
-0.047515869140625,
-0.024932861328125,
-0.0007214546203613281,
-0.01323699951171875,
0.005893707275390625,
0.047515869140625,
-0.005092620849609375,
-0.02801513671875,
0.0304107666015625,
0.01227569580078125,
0.0031681060791015625,
-0.0094146728515625,
-0.0131072998046875,
-0.0305938720703125,
-0.007419586181640625,
-0.050262451171875,
-0.003185272216796875,
0.03399658203125,
-0.01076507568359375,
0.023345947265625,
0.036956787109375,
-0.0204315185546875,
0.0135650634765625,
0.0199127197265625,
-0.028076171875,
-0.02484130859375,
-0.0511474609375,
-0.00716400146484375,
0.01776123046875,
-0.004558563232421875,
0.020538330078125,
0.0237274169921875,
-0.055999755859375,
-0.0017385482788085938,
0.007701873779296875,
0.05950927734375,
0.01329803466796875,
-0.047515869140625,
0.0213775634765625,
-0.01003265380859375,
-0.0161590576171875,
-0.00775909423828125,
-0.0265350341796875,
-0.045623779296875,
0.0009412765502929688,
-0.01415252685546875,
-0.006198883056640625,
0.0263824462890625,
0.01401519775390625,
-0.0560302734375,
0.0926513671875,
-0.01247406005859375,
0.018280029296875,
0.032440185546875,
0.0198974609375,
-0.04571533203125,
-0.005214691162109375,
-0.01538848876953125,
0.03509521484375,
-0.0218048095703125,
0.006969451904296875,
-0.0149688720703125,
0.018524169921875,
-0.00940704345703125,
0.028106689453125,
0.0531005859375,
0.0360107421875,
-0.036529541015625,
-0.02880859375,
-0.00982666015625,
-0.00484466552734375,
-0.0261383056640625,
0.0601806640625,
0.0141754150390625,
-0.0159149169921875,
0.0217437744140625,
0.003818511962890625,
0.04107666015625,
-0.05743408203125,
0.0080108642578125,
0.031280517578125,
-0.01264190673828125,
-0.0292510986328125,
-0.0362548828125,
0.0267486572265625,
-0.0150909423828125,
-0.0179595947265625,
-0.0030117034912109375,
-0.0121917724609375,
-0.0107421875,
0.0173797607421875,
0.00850677490234375,
-0.024078369140625,
-0.052032470703125,
-0.00865936279296875,
0.026397705078125,
-0.00154876708984375,
-0.030548095703125,
0.0084228515625,
0.0266571044921875,
-0.060302734375,
-0.0215301513671875,
-0.01318359375,
0.034454345703125,
-0.038787841796875,
0.019683837890625,
0.00408935546875,
0.010772705078125,
-0.021240234375,
0.0298614501953125,
0.0309906005859375,
0.0165252685546875,
-0.0285797119140625,
-0.031524658203125,
0.0024471282958984375,
0.0143585205078125,
0.017791748046875,
0.023040771484375,
0.0282135009765625,
0.04107666015625,
0.062255859375,
-0.050048828125,
0.01959228515625,
0.0194854736328125,
0.00928497314453125,
-0.01549530029296875,
-0.023101806640625,
-0.0210723876953125,
0.0241851806640625,
-0.0284881591796875,
-0.02264404296875,
0.009368896484375,
0.0011548995971679688,
0.0262908935546875,
0.001369476318359375,
0.08441162109375,
0.013946533203125,
-0.02264404296875,
0.0648193359375,
0.006267547607421875,
0.01047515869140625,
-0.058807373046875,
-0.087646484375,
0.0295257568359375,
0.0460205078125,
-0.0025310516357421875,
0.000028014183044433594,
-0.00920867919921875,
-0.00569915771484375,
-0.0015306472778320312,
-0.00858306884765625,
0.003360748291015625,
-0.01444244384765625,
-0.0169219970703125,
-0.02642822265625,
0.01467132568359375,
0.017059326171875,
0.00704193115234375,
-0.00920867919921875,
0.0197296142578125,
0.0291290283203125,
-0.023468017578125,
0.0309295654296875,
-0.004657745361328125,
-0.0006303787231445312,
-0.0063018798828125,
-0.05157470703125,
-0.016754150390625,
-0.0283660888671875,
-0.09185791015625,
-0.016754150390625,
-0.060546875,
-0.0232391357421875,
0.040069580078125,
0.04302978515625,
-0.015472412109375,
0.029541015625,
0.004688262939453125,
-0.0025043487548828125,
0.034698486328125,
-0.0272369384765625,
0.00608062744140625,
0.017303466796875,
0.01473236083984375,
0.0030307769775390625,
0.0061492919921875,
-0.0073699951171875,
-0.0118560791015625,
0.056304931640625,
0.03662109375,
0.0253753662109375,
-0.0308990478515625,
0.0623779296875,
-0.032012939453125,
0.01485443115234375,
-0.029541015625,
-0.036956787109375,
0.035797119140625,
0.023590087890625,
-0.01050567626953125,
-0.00506591796875,
-0.043670654296875,
0.059051513671875,
0.005634307861328125,
0.010101318359375,
0.0278778076171875,
0.004932403564453125,
0.001728057861328125,
0.006282806396484375,
0.031982421875,
-0.01300811767578125,
-0.0233612060546875,
-0.021514892578125,
0.0035457611083984375,
0.004062652587890625,
0.005504608154296875,
0.003673553466796875,
0.0177764892578125,
-0.05078125,
-0.0131683349609375,
-0.0153961181640625,
-0.0012769699096679688,
-0.075439453125,
0.004787445068359375,
-0.0201873779296875,
-0.03076171875,
0.0306854248046875,
-0.0031642913818359375,
-0.0178680419921875,
0.042327880859375,
-0.0002372264862060547,
0.03399658203125,
-0.031463623046875,
0.0250091552734375,
0.01558685302734375,
0.04840087890625,
0.0206451416015625,
0.010589599609375,
0.012725830078125,
-0.01439666748046875,
-0.049224853515625,
-0.056427001953125,
-0.0523681640625,
-0.05328369140625,
0.0215301513671875,
0.036376953125,
-0.01026153564453125,
-0.043975830078125,
-0.09136962890625,
0.0335693359375,
0.02056884765625,
0.00682830810546875,
-0.07647705078125,
0.0467529296875,
-0.0281524658203125,
0.063720703125,
-0.01361846923828125,
-0.031036376953125,
0.026824951171875,
0.021575927734375,
-0.03326416015625,
0.00039887428283691406,
-0.01245880126953125,
-0.0234832763671875,
0.004322052001953125,
0.03009033203125,
0.028778076171875,
-0.01611328125,
-0.016387939453125,
0.061737060546875,
0.00016176700592041016,
0.089111328125,
-0.024566650390625,
0.0013990402221679688,
-0.0003135204315185547,
-0.004589080810546875,
-0.027801513671875,
-0.048583984375,
0.0200958251953125,
-0.05096435546875,
-0.041229248046875,
0.00768280029296875,
0.00399017333984375,
0.0313720703125,
-0.039764404296875,
-0.0697021484375,
0.024169921875,
0.0007801055908203125,
-0.050445556640625,
-0.024322509765625,
-0.00726318359375,
-0.00911712646484375,
0.02093505859375,
0.0022735595703125,
-0.0299530029296875,
-0.0072021484375,
0.0305938720703125,
-0.01788330078125,
0.0182952880859375,
-0.0175933837890625,
0.023101806640625,
-0.032257080078125,
0.0234222412109375,
0.0178375244140625,
-0.062255859375,
-0.00984954833984375,
0.00302886962890625,
0.01654052734375,
0.027740478515625,
-0.0186767578125,
-0.041778564453125,
0.001422882080078125,
-0.016754150390625,
-0.0224151611328125,
-0.055938720703125,
0.0009107589721679688,
0.00188446044921875,
0.067138671875,
0.05853271484375,
0.00952911376953125,
-0.0491943359375,
-0.0148468017578125,
-0.0648193359375,
-0.040771484375,
0.003993988037109375,
0.00945281982421875,
-0.043731689453125,
0.034759521484375,
0.0181121826171875,
-0.0168914794921875,
0.014739990234375,
0.0094757080078125,
-0.029510498046875,
-0.0018396377563476562,
0.0009360313415527344,
-0.005458831787109375,
-0.062225341796875,
0.011749267578125,
0.0288543701171875,
-0.039825439453125,
-0.02142333984375,
-0.009124755859375,
0.0022945404052734375,
-0.0177459716796875,
-0.0157470703125,
-0.04827880859375,
-0.02435302734375,
-0.048736572265625,
0.040924072265625,
-0.052703857421875,
0.0743408203125,
-0.061920166015625,
0.008697509765625,
0.01123046875,
0.042144775390625,
-0.00868988037109375,
0.051849365234375,
-0.0211944580078125,
0.0609130859375,
-0.0005125999450683594,
0.06072998046875,
0.007137298583984375,
-0.0282440185546875,
-0.01337432861328125,
0.0169830322265625,
0.01282501220703125,
-0.017303466796875,
0.03857421875,
-0.040618896484375,
0.021026611328125,
0.006259918212890625,
0.0250244140625,
-0.0152740478515625,
0.0245361328125,
0.030181884765625,
0.000005245208740234375,
0.01123046875
]
|
2331aedc247a7342db4e73568803c96c1babb251 | Wordpress Stackexchange
Q: How to preview your website without the top WordPress admin bar, but remain signed in? Is there a way to preview your website without the top WordPress admin bar, but remain signed in?
Basically, want to continue making changes in the panel and review the site, but without the top admin bar...but don't want to sign in every time. I don't want to remove the top bar...just don't want it there when I preview my changes, if that makes sense. When working with the top header, I want to see it as users will see it.
Thank you!
A: OR you can go into your own user profile (hover over your name on the right end of the bar and click on Edit My Profile) and uncheck the box that says Show Toolbar when viewing site. Click Update Profile at the bottom of the page and the bar will go away.
Reverse the process when you want to bring it back.
| Q: How to preview your website without the top WordPress admin bar, but remain signed in? Is there a way to preview your website without the top WordPress admin bar, but remain signed in?
Basically, want to continue making changes in the panel and review the site, but without the top admin bar...but don't want to sign in every time. I don't want to remove the top bar...just don't want it there when I preview my changes, if that makes sense. When working with the top header, I want to see it as users will see it.
Thank you!
A: OR you can go into your own user profile (hover over your name on the right end of the bar and click on Edit My Profile) and uncheck the box that says Show Toolbar when viewing site. Click Update Profile at the bottom of the page and the bar will go away.
Reverse the process when you want to bring it back.
A: It's easy. Just put this in your plugin/theme or what have you:
function remove_teh_menu_barz() {
add_filter('show_admin_bar', 'show_admin_bar');
}
function show_admin_bar() {
return false;
}
add_action('init', 'remove_teh_menu_barz');
This hooks into the init action hook in wordpress and fires the function. The function drops in a filter(which references the show_admin_bar()) telling WP not to show the admin bar. Notice the return false; This will hide the admin bar, but still keep you logged in. You can also just do away with the initial action hook, and drop the call to the show_admin_bar into the filter on an early enough hook and it will do the same thing.
A: You can also: right click> open in incognito window
| wordpress | {
"language": "en",
"length": 278,
"provenance": "stackexchange_00019.jsonl.gz:454297",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/182734"
} | [
0.024810791015625,
-0.00409698486328125,
0.0172576904296875,
0.01165008544921875,
-0.003814697265625,
-0.028106689453125,
0.0203399658203125,
-0.048736572265625,
0.018829345703125,
0.0012063980102539062,
-0.02191162109375,
-0.00537872314453125,
-0.029449462890625,
-0.031494140625,
-0.0102691650390625,
-0.0272979736328125,
0.0241546630859375,
-0.0050506591796875,
0.020782470703125,
-0.0002532005310058594,
-0.01529693603515625,
0.023712158203125,
0.004856109619140625,
0.0478515625,
-0.01110076904296875,
-0.00502777099609375,
0.06292724609375,
-0.02569580078125,
-0.0033817291259765625,
-0.0255279541015625,
0.006649017333984375,
0.0029888153076171875,
-0.01505279541015625,
0.02008056640625,
0.027435302734375,
0.011627197265625,
-0.0259857177734375,
0.04107666015625,
0.0716552734375,
-0.054168701171875,
0.00911712646484375,
0.0110321044921875,
-0.0369873046875,
0.036712646484375,
-0.059173583984375,
-0.01541900634765625,
-0.0330810546875,
-0.019256591796875,
0.029937744140625,
-0.039215087890625,
0.004901885986328125,
0.00400543212890625,
0.04144287109375,
-0.0276641845703125,
-0.0301971435546875,
-0.0219573974609375,
0.0276947021484375,
-0.051116943359375,
0.0185089111328125,
0.01247406005859375,
-0.01369476318359375,
0.0005359649658203125,
0.00955963134765625,
-0.061553955078125,
-0.024749755859375,
0.0272216796875,
-0.056671142578125,
-0.01447296142578125,
-0.024139404296875,
-0.004283905029296875,
0.0223541259765625,
-0.0631103515625,
0.0122222900390625,
-0.0140228271484375,
-0.0293426513671875,
-0.01708984375,
-0.0179901123046875,
-0.0245208740234375,
0.032501220703125,
-0.01027679443359375,
0.00543212890625,
0.045745849609375,
-0.070068359375,
-0.0309600830078125,
0.02740478515625,
0.01043701171875,
-0.007625579833984375,
-0.01959228515625,
-0.00635528564453125,
0.0207061767578125,
-0.00872039794921875,
0.0284881591796875,
-0.03839111328125,
0.04888916015625,
0.01410675048828125,
-0.0080413818359375,
-0.003887176513671875,
-0.0122528076171875,
0.0243377685546875,
-0.0184478759765625,
-0.020233154296875,
-0.025909423828125,
-0.047760009765625,
-0.00628662109375,
0.006603240966796875,
0.0604248046875,
-0.00543975830078125,
-0.024749755859375,
0.0173187255859375,
0.014923095703125,
0.0189208984375,
-0.032073974609375,
-0.030731201171875,
-0.034332275390625,
-0.0152740478515625,
0.058135986328125,
-0.01788330078125,
0.0035266876220703125,
-0.005962371826171875,
0.034149169921875,
-0.01244354248046875,
0.00830078125,
-0.0290679931640625,
0.0010004043579101562,
0.025604248046875,
0.0112762451171875,
-0.0146331787109375,
0.0152740478515625,
-0.036041259765625,
0.01141357421875,
-0.022247314453125,
0.016448974609375,
0.036376953125,
0.038421630859375,
0.0080718994140625,
-0.01108551025390625,
-0.00507354736328125,
0.033782958984375,
-0.0020198822021484375,
0.0083160400390625,
-0.0242919921875,
-0.03533935546875,
0.01146697998046875,
-0.02532958984375,
-0.007495880126953125,
0.005695343017578125,
0.01163482666015625,
0.0252227783203125,
0.01436614990234375,
-0.0286712646484375,
-0.01094818115234375,
-0.0209197998046875,
-0.01117706298828125,
0.032745361328125,
0.01526641845703125,
0.00798797607421875,
0.032989501953125,
-0.016265869140625,
0.007686614990234375,
0.001995086669921875,
0.026397705078125,
0.020538330078125,
0.00919342041015625,
-0.0098876953125,
-0.0247650146484375,
-0.034820556640625,
-0.014923095703125,
0.00522613525390625,
0.0413818359375,
0.002735137939453125,
0.062408447265625,
-0.0210723876953125,
0.0728759765625,
0.0300140380859375,
0.0039520263671875,
0.0190887451171875,
0.037628173828125,
0.02349853515625,
-0.00559234619140625,
0.00939178466796875,
-0.020477294921875,
-0.0335693359375,
0.037567138671875,
-0.033905029296875,
-0.01279449462890625,
0.0026111602783203125,
0.0157470703125,
0.03350830078125,
0.01097869873046875,
0.0239410400390625,
0.008331298828125,
-0.01206207275390625,
-0.027008056640625,
-0.0004220008850097656,
0.0202789306640625,
-0.012451171875,
-0.0323486328125,
-0.012420654296875,
-0.00943756103515625,
-0.0035190582275390625,
0.006252288818359375,
0.0109710693359375,
-0.01629638671875,
-0.04034423828125,
-0.03759765625,
-0.037628173828125,
-0.003025054931640625,
0.03985595703125,
0.0246429443359375,
0.026153564453125,
0.0026569366455078125,
0.0099639892578125,
-0.0231475830078125,
-0.005615234375,
-0.0509033203125,
-0.043731689453125,
-0.0109710693359375,
0.06268310546875,
0.0153656005859375,
0.06439208984375,
0.006832122802734375,
-0.00830078125,
-0.006023406982421875,
-0.05743408203125,
0.06884765625,
-0.0224609375,
-0.0011949539184570312,
-0.043792724609375,
0.0771484375,
-0.0294342041015625,
0.0031337738037109375,
0.034332275390625,
-0.0222320556640625,
-0.01346588134765625,
-0.034576416015625,
0.007572174072265625,
-0.0213470458984375,
-0.03802490234375,
-0.0031833648681640625,
0.045257568359375,
0.020599365234375,
-0.009765625,
-0.0263671875,
0.026611328125,
0.04437255859375,
-0.0333251953125,
-0.01102447509765625,
0.0267181396484375,
0.02325439453125,
0.01397705078125,
-0.006061553955078125,
-0.050811767578125,
0.049774169921875,
-0.03680419921875,
0.0080718994140625,
0.040191650390625,
-0.00431060791015625,
-0.038787841796875,
-0.023681640625,
0.0293121337890625,
0.004749298095703125,
0.0016918182373046875,
-0.00634765625,
-0.00030493736267089844,
-0.0258026123046875,
-0.007678985595703125,
0.01479339599609375,
0.02093505859375,
-0.00913238525390625,
-0.0287933349609375,
0.0245208740234375,
0.06451416015625,
0.007518768310546875,
0.059417724609375,
0.0399169921875,
-0.01318359375,
-0.00447845458984375,
-0.047332763671875,
0.0190582275390625,
0.0233917236328125,
-0.03387451171875,
0.01538848876953125,
0.00921630859375,
-0.0247039794921875,
-0.0085296630859375,
0.0072021484375,
0.0054779052734375,
-0.05517578125,
-0.005847930908203125,
-0.01372528076171875,
0.031280517578125,
-0.02264404296875,
-0.03369140625,
0.030029296875,
-0.0181121826171875,
-0.038177490234375,
-0.007320404052734375,
-0.0243072509765625,
-0.00278472900390625,
-0.0114593505859375,
0.0926513671875,
0.07269287109375,
0.0086669921875,
0.01502227783203125,
-0.016510009765625,
-0.0088653564453125,
-0.00397491455078125,
-0.023529052734375,
-0.0295257568359375,
0.005580902099609375,
-0.0535888671875,
0.0235137939453125,
0.02587890625,
0.0056610107421875,
0.00927734375,
-0.0016222000122070312,
-0.026885986328125,
0.016571044921875,
-0.00821685791015625,
0.03759765625,
-0.0775146484375,
-0.07745361328125,
-0.03094482421875,
0.00717926025390625,
-0.046630859375,
0.05224609375,
0.0289459228515625,
0.006229400634765625,
-0.003185272216796875,
-0.016021728515625,
-0.01134490966796875,
-0.0516357421875,
-0.051361083984375,
-0.067626953125,
-0.0021724700927734375,
-0.0196380615234375,
0.005741119384765625,
-0.0294647216796875,
-0.009552001953125,
-0.0386962890625,
-0.009368896484375,
0.0223541259765625,
0.0006113052368164062,
-0.015045166015625,
0.01111602783203125,
-0.005367279052734375,
-0.00748443603515625,
0.0265960693359375,
-0.072265625,
-0.0248260498046875,
0.01922607421875,
-0.0367431640625,
-0.035980224609375,
-0.0703125,
-0.01427459716796875,
0.00794219970703125,
0.0280914306640625,
-0.0275115966796875,
0.01367950439453125,
-0.0506591796875,
0.016021728515625,
-0.00577545166015625,
-0.029937744140625,
-0.01300811767578125,
0.0262603759765625,
-0.0288238525390625,
0.00829315185546875,
-0.04840087890625,
0.0269775390625,
0.02520751953125,
0.0217437744140625,
0.01097869873046875,
-0.005779266357421875,
-0.0124664306640625,
0.01116943359375,
-0.0229034423828125,
0.01479339599609375,
-0.03167724609375,
0.0178680419921875,
0.0028533935546875,
0.0005702972412109375,
0.0108489990234375,
0.0095672607421875,
0.03302001953125,
-0.0386962890625,
0.04669189453125,
0.0111846923828125,
0.04290771484375,
-0.03570556640625,
-0.05426025390625,
-0.000050961971282958984,
0.11895751953125,
-0.00980377197265625,
0.01264190673828125,
0.032928466796875,
0.01114654541015625,
-0.04779052734375,
-0.006084442138671875,
-0.10906982421875,
-0.0002428293228149414,
-0.08026123046875,
0.02490234375,
-0.01515960693359375,
-0.01404571533203125,
0.0017242431640625,
-0.0193634033203125,
-0.016265869140625,
-0.0614013671875,
0.015655517578125,
0.011688232421875,
0.0292205810546875,
-0.0166778564453125,
-0.00095367431640625,
-0.0396728515625,
0.0176239013671875,
-0.03082275390625,
-0.0413818359375,
-0.01202392578125,
-0.020416259765625,
0.00785064697265625,
-0.0186614990234375,
0.02557373046875,
-0.0258941650390625,
0.007007598876953125,
-0.0182037353515625,
-0.0003764629364013672,
-0.00818634033203125,
0.0338134765625,
-0.01082611083984375,
-0.030548095703125,
-0.01422119140625,
-0.038604736328125,
-0.0144500732421875,
-0.035186767578125,
-0.027252197265625,
-0.0306243896484375,
-0.0216217041015625,
0.007904052734375,
0.016510009765625,
-0.0129547119140625,
-0.0291900634765625,
-0.036041259765625,
-0.021148681640625,
0.01255035400390625,
0.0003578662872314453,
-0.005260467529296875,
-0.03155517578125,
-0.040283203125,
-0.0092315673828125,
-0.0291900634765625,
-0.018341064453125,
0.032989501953125,
0.04962158203125,
0.025970458984375,
0.008819580078125,
0.00115966796875,
0.00177764892578125,
0.05926513671875,
0.011566162109375,
0.037322998046875,
0.03643798828125,
-0.039215087890625,
0.07275390625,
0.0418701171875,
0.023468017578125,
-0.005828857421875,
0.0192718505859375,
0.0045318603515625,
-0.028961181640625,
0.02972412109375,
0.0057525634765625,
-0.0310211181640625,
-0.00650787353515625,
-0.0027599334716796875,
0.00957489013671875,
-0.0046539306640625,
-0.006103515625,
0.031829833984375,
-0.0235137939453125,
-0.0005364418029785156,
0.025115966796875,
-0.0178375244140625,
0.010650634765625,
0.038970947265625,
0.062164306640625,
-0.00746917724609375,
-0.006130218505859375,
0.038787841796875,
-0.035980224609375,
-0.01352691650390625,
-0.0386962890625,
-0.0152587890625,
-0.0308990478515625,
0.006969451904296875,
-0.050811767578125,
0.007671356201171875,
-0.01580810546875,
0.059844970703125,
0.01319122314453125,
-0.070556640625,
0.03387451171875,
-0.00887298583984375,
0.03363037109375,
0.0262298583984375,
0.03155517578125,
0.033111572265625,
-0.034210205078125,
0.0240631103515625,
-0.01084136962890625,
0.00762176513671875,
-0.0281524658203125,
-0.0229339599609375,
0.049957275390625,
0.006008148193359375,
0.006084442138671875,
0.0308074951171875,
0.04132080078125,
-0.041717529296875,
0.039794921875,
0.007381439208984375,
0.0298004150390625,
0.01302337646484375,
-0.006244659423828125,
-0.0158843994140625,
0.06982421875,
0.035064697265625,
-0.04595947265625,
0.037445068359375,
-0.024627685546875,
-0.004123687744140625,
0.005474090576171875,
0.0212860107421875,
0.0777587890625,
0.0296630859375,
-0.019775390625,
-0.01430511474609375,
0.0107879638671875,
0.0458984375,
-0.0151519775390625,
-0.05810546875,
-0.01165008544921875,
0.0002880096435546875,
-0.003032684326171875,
-0.060546875,
0.005939483642578125,
-0.0283355712890625,
-0.029022216796875,
-0.035552978515625,
0.0176849365234375,
-0.08367919921875,
-0.0025882720947265625,
0.0096435546875,
-0.00894927978515625,
-0.004306793212890625,
0.028533935546875,
-0.031280517578125,
0.008331298828125,
-0.0435791015625,
-0.0098876953125,
0.1063232421875,
-0.029510498046875,
0.0122222900390625,
-0.0294189453125,
0.01393890380859375,
-0.019012451171875,
0.001251220703125,
0.061065673828125,
0.02850341796875,
-0.03857421875,
-0.022369384765625,
-0.0869140625,
-0.04815673828125,
-0.07049560546875,
-0.01078033447265625,
-0.05853271484375,
0.04327392578125,
0.0259857177734375,
0.0269927978515625,
-0.02569580078125,
-0.0234527587890625,
-0.034149169921875,
0.04754638671875,
0.0296630859375,
0.103515625,
-0.0159912109375,
0.05377197265625,
-0.0120086669921875,
0.020599365234375,
0.0008764266967773438,
0.0224456787109375,
-0.0248565673828125,
-0.004589080810546875,
0.0301513671875,
0.04144287109375,
-0.0345458984375,
-0.042633056640625,
-0.01496124267578125,
-0.03424072265625,
0.062164306640625,
-0.0258331298828125,
-0.019683837890625,
-0.00824737548828125,
0.0254058837890625,
-0.039459228515625,
0.051177978515625,
-0.03753662109375,
-0.035430908203125,
-0.03961181640625,
0.0089569091796875,
0.047454833984375,
-0.037841796875,
-0.0026378631591796875,
-0.03045654296875,
0.00638580322265625,
0.002044677734375,
-0.00870513916015625,
-0.030731201171875,
0.043548583984375,
0.0643310546875,
-0.0186614990234375,
0.02349853515625,
0.038543701171875,
0.0009965896606445312,
-0.01410675048828125,
-0.0133819580078125,
-0.013641357421875,
-0.003269195556640625,
0.0347900390625,
0.0010805130004882812,
0.01044464111328125,
0.0293731689453125,
-0.0124969482421875,
0.0042877197265625,
0.07891845703125,
0.0305633544921875,
-0.13916015625,
0.012969970703125,
-0.0169830322265625,
0.0198974609375,
0.033172607421875,
-0.00628662109375,
-0.0283050537109375,
-0.05755615234375,
0.0260772705078125,
-0.0146331787109375,
-0.0190887451171875,
0.0007200241088867188,
0.002399444580078125,
-0.00402069091796875,
-0.0284423828125,
0.034698486328125,
0.007106781005859375,
-0.033294677734375,
0.0006380081176757812,
0.014892578125,
-0.009857177734375,
0.003993988037109375,
-0.004062652587890625,
0.01727294921875,
-0.0231475830078125,
-0.03515625,
0.03509521484375,
-0.0357666015625,
-0.0151824951171875,
0.06036376953125,
0.0306549072265625,
0.0023784637451171875,
0.03924560546875,
-0.006656646728515625,
0.038726806640625,
-0.026763916015625,
0.043304443359375,
0.029052734375,
-0.037567138671875,
0.0079193115234375,
0.00540924072265625,
-0.03900146484375,
0.019134521484375,
0.017303466796875,
-0.0625,
0.0199737548828125,
0.057098388671875,
0.03564453125,
-0.0102081298828125,
-0.0352783203125,
0.050018310546875,
-0.0254364013671875,
-0.0262298583984375,
-0.01300811767578125,
0.030914306640625,
-0.0389404296875,
0.0207672119140625,
-0.01180267333984375,
0.021331787109375,
0.002521514892578125,
0.0062713623046875,
-0.06298828125,
0.0596923828125,
0.00905609130859375,
0.02703857421875,
0.037445068359375,
0.00475311279296875,
-0.04376220703125,
-0.033905029296875,
0.0117950439453125,
0.06622314453125,
0.0190277099609375,
-0.0188446044921875,
-0.011688232421875,
-0.011383056640625,
-0.0033512115478515625,
0.0333251953125,
0.0667724609375,
0.01136016845703125,
-0.004207611083984375,
-0.0069580078125,
0.053955078125,
0.0290985107421875,
-0.002315521240234375,
0.031585693359375,
0.005435943603515625,
0.0295562744140625,
0.005733489990234375,
-0.046661376953125,
0.02587890625,
-0.02252197265625,
-0.030426025390625,
0.02471923828125,
0.0022907257080078125,
-0.0145263671875,
0.04290771484375,
0.0187225341796875,
-0.054290771484375,
0.033966064453125,
0.0355224609375,
-0.005680084228515625,
0.0009002685546875,
-0.0198822021484375,
0.003238677978515625,
-0.006275177001953125,
0.023529052734375,
-0.029693603515625,
0.0328369140625,
0.025421142578125,
-0.0293121337890625,
0.01540374755859375,
0.0255584716796875,
-0.0452880859375,
-0.046142578125,
-0.0145721435546875,
0.015777587890625,
-0.0428466796875,
0.0292816162109375,
0.0272369384765625,
0.0307159423828125,
-0.03533935546875,
0.0081939697265625,
0.0380859375,
0.046051025390625,
-0.0245208740234375,
-0.0367431640625,
0.0022525787353515625,
-0.0158233642578125,
0.006656646728515625,
0.00734710693359375,
0.026397705078125,
0.0090179443359375,
0.0119781494140625,
0.03265380859375,
-0.006168365478515625,
-0.0033721923828125,
0.005817413330078125,
0.00008732080459594727,
0.0150604248046875,
0.01305389404296875,
0.024810791015625,
-0.01142120361328125,
0.016754150390625,
-0.00762176513671875,
-0.00795745849609375,
0.014068603515625,
0.01468658447265625,
0.01465606689453125,
0.006351470947265625,
-0.03948974609375,
0.0142059326171875,
-0.022613525390625,
0.043182373046875,
-0.0850830078125,
-0.0300445556640625,
0.00623321533203125,
0.0635986328125,
-0.01523590087890625,
-0.03778076171875,
0.021575927734375,
0.051605224609375,
-0.0260009765625,
-0.035858154296875,
0.0080718994140625,
-0.00835418701171875,
-0.02099609375,
-0.027099609375,
0.024566650390625,
0.057525634765625,
0.017333984375,
0.01526641845703125,
0.007137298583984375,
0.06890869140625,
-0.035552978515625,
0.007480621337890625,
-0.004238128662109375,
-0.0513916015625,
0.0211944580078125,
-0.0195770263671875,
0.0345458984375,
-0.01099395751953125,
-0.06622314453125,
-0.01363372802734375,
-0.01013946533203125,
-0.0237884521484375,
0.0091400146484375,
0.0302276611328125,
-0.02490234375,
0.02764892578125,
0.002811431884765625,
0.0248565673828125,
-0.01409912109375,
-0.043792724609375,
0.03692626953125,
0.020111083984375,
-0.0005621910095214844,
0.026580810546875,
-0.049407958984375,
-0.038299560546875,
-0.033172607421875,
0.041168212890625,
0.017333984375,
0.06634521484375,
-0.00292205810546875,
0.0135955810546875,
-0.0601806640625,
0.040679931640625,
-0.0634765625,
-0.033172607421875,
0.016571044921875,
-0.007457733154296875,
-0.0127716064453125,
0.01100921630859375,
-0.04473876953125,
0.06060791015625,
0.0012989044189453125,
-0.0029163360595703125,
0.06298828125,
-0.0019168853759765625,
-0.0194549560546875,
-0.0460205078125,
0.0086517333984375,
-0.020111083984375,
-0.04339599609375,
0.00499725341796875,
0.04705810546875,
-0.006168365478515625,
-0.0051116943359375,
-0.050384521484375,
0.006656646728515625,
-0.0031642913818359375,
-0.0243682861328125,
0.024078369140625,
0.007236480712890625,
0.01322174072265625,
0.02325439453125,
-0.017242431640625,
0.07550048828125,
-0.00916290283203125,
-0.01995849609375,
0.04718017578125,
0.004467010498046875,
-0.039581298828125,
0.0076751708984375,
-0.0168609619140625,
-0.01024627685546875,
0.0207977294921875,
0.0244140625,
-0.0305938720703125,
0.01336669921875,
0.011688232421875,
-0.0011568069458007812,
-0.03045654296875,
0.02716064453125,
-0.03973388671875,
-0.0286865234375,
0.0005307197570800781,
0.0191802978515625,
-0.01953125,
-0.06256103515625,
-0.12469482421875,
0.031585693359375,
0.032379150390625,
0.006290435791015625,
-0.05535888671875,
0.05291748046875,
-0.037200927734375,
0.005130767822265625,
0.0022411346435546875,
0.0626220703125,
-0.0155487060546875,
-0.007312774658203125,
-0.045135498046875,
-0.0224151611328125,
-0.0201263427734375,
0.045684814453125,
-0.006847381591796875,
-0.0279388427734375,
-0.0035610198974609375,
0.0206451416015625,
0.0222625732421875,
-0.065185546875,
-0.040771484375,
0.0012378692626953125,
-0.03582763671875,
-0.0120086669921875,
0.0024051666259765625,
0.0128326416015625,
0.00420379638671875,
-0.00856781005859375,
-0.01568603515625,
0.032958984375,
-0.01555633544921875,
-0.03143310546875,
-0.005664825439453125,
0.012725830078125,
-0.034332275390625,
-0.034454345703125,
-0.002063751220703125,
0.0034694671630859375,
-0.027069091796875,
-0.026580810546875,
-0.00980377197265625,
-0.035125732421875,
0.05810546875,
-0.00836944580078125,
-0.0142059326171875,
-0.00022363662719726562,
0.050201416015625,
0.02874755859375,
-0.010955810546875,
0.036590576171875,
0.00022745132446289062,
-0.018585205078125,
0.0299224853515625,
0.049163818359375,
0.00560760498046875,
-0.035003662109375,
0.0308685302734375,
-0.0110931396484375,
0.0150299072265625,
-0.0289459228515625,
-0.01788330078125,
0.005786895751953125,
0.006504058837890625,
-0.0101165771484375,
0.00563812255859375,
-0.01549530029296875,
0.004138946533203125,
0.035797119140625,
0.06964111328125,
0.01253509521484375,
-0.0217437744140625,
-0.02520751953125,
-0.036590576171875,
-0.0290374755859375,
-0.020965576171875,
0.0259552001953125,
-0.08056640625,
-0.0177001953125,
0.011962890625,
-0.020355224609375,
-0.017913818359375,
-0.0015735626220703125,
-0.03070068359375,
-0.007503509521484375,
-0.00930023193359375,
0.0052337646484375,
-0.004390716552734375,
-0.0218048095703125,
0.0135040283203125,
-0.025848388671875,
-0.03973388671875,
-0.00817108154296875,
0.03466796875,
-0.0322265625,
-0.043182373046875,
0.00934600830078125,
0.048370361328125,
-0.07232666015625,
-0.0030117034912109375,
-0.00434112548828125,
0.021759033203125,
-0.0682373046875,
-0.0224151611328125,
-0.0280609130859375,
0.01268768310546875,
0.01012420654296875,
0.0237579345703125,
-0.038726806640625,
0.0192108154296875,
0.0248870849609375,
-0.0020008087158203125,
0.013092041015625,
0.044189453125,
-0.001277923583984375,
0.043670654296875,
0.024993896484375,
-0.035980224609375,
0.05487060546875,
-0.047515869140625,
0.0015153884887695312,
-0.00647735595703125,
0.03253173828125,
-0.07720947265625,
0.034759521484375,
0.00006514787673950195,
0.040740966796875,
0.036041259765625
]
|
54d98610ea8ac71935e2326c1df3b880a689baef | Wordpress Stackexchange
Q: How can I bulk delete media and attachments using WP-CLI? I'm trying to mass delete 4000 images in a wordpress website. WP itself sets the max to 999, which would work fine and take a few minutes to delete them via the backend. However, I get REQUEST URI TOO LARGE because the backend form uses GET instead of POST.
How can I use WP-CLI to perform the operation if it's possible and ensure the integrity of the WP database. In other words, I don't want to run an SQL command.
A: From the WP-CLI documentation about wp post delete:
wp post delete --force $(wp post list --post_type='attachment' --format=ids)
See wp post list for additional information.
| Q: How can I bulk delete media and attachments using WP-CLI? I'm trying to mass delete 4000 images in a wordpress website. WP itself sets the max to 999, which would work fine and take a few minutes to delete them via the backend. However, I get REQUEST URI TOO LARGE because the backend form uses GET instead of POST.
How can I use WP-CLI to perform the operation if it's possible and ensure the integrity of the WP database. In other words, I don't want to run an SQL command.
A: From the WP-CLI documentation about wp post delete:
wp post delete --force $(wp post list --post_type='attachment' --format=ids)
See wp post list for additional information.
| wordpress | {
"language": "en",
"length": 116,
"provenance": "stackexchange_00019.jsonl.gz:454315",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/182817"
} | [
0.01116180419921875,
-0.0030841827392578125,
-0.037933349609375,
-0.0272979736328125,
0.0098724365234375,
-0.0202178955078125,
0.03857421875,
0.005706787109375,
0.047698974609375,
0.0083160400390625,
-0.003627777099609375,
-0.015472412109375,
0.029205322265625,
-0.036956787109375,
-0.00499725341796875,
0.0034809112548828125,
0.0357666015625,
-0.01419830322265625,
0.048370361328125,
-0.007236480712890625,
0.00897216796875,
0.0117645263671875,
0.06756591796875,
0.03955078125,
-0.0081024169921875,
0.036590576171875,
0.0147857666015625,
-0.0184326171875,
-0.04388427734375,
-0.049468994140625,
-0.00689697265625,
0.06854248046875,
0.01274871826171875,
0.0198516845703125,
-0.0026912689208984375,
0.00640106201171875,
-0.022491455078125,
0.0163726806640625,
0.01425933837890625,
0.0014972686767578125,
0.020416259765625,
0.0010356903076171875,
0.03961181640625,
-0.0015687942504882812,
0.0022449493408203125,
0.0066070556640625,
-0.0015621185302734375,
-0.048095703125,
0.027740478515625,
0.02935791015625,
-0.00838470458984375,
-0.00383758544921875,
-0.006931304931640625,
-0.023651123046875,
-0.01012420654296875,
-0.0274810791015625,
0.00600433349609375,
0.01611328125,
0.042205810546875,
-0.016571044921875,
-0.058746337890625,
-0.007526397705078125,
0.0194854736328125,
-0.033111572265625,
0.017242431640625,
-0.00457763671875,
-0.0244293212890625,
0.0312347412109375,
-0.044464111328125,
0.0014514923095703125,
0.0198822021484375,
-0.050933837890625,
0.01465606689453125,
-0.0233154296875,
0.0279541015625,
0.0098724365234375,
-0.02587890625,
-0.0122222900390625,
0.025146484375,
-0.0014867782592773438,
0.0282440185546875,
-0.0092010498046875,
-0.01381683349609375,
0.0200347900390625,
0.0263671875,
0.050262451171875,
-0.008514404296875,
-0.0262603759765625,
-0.0030574798583984375,
-0.032745361328125,
-0.0209808349609375,
-0.086669921875,
0.015960693359375,
0.0152587890625,
-0.03472900390625,
-0.024810791015625,
-0.01123809814453125,
-0.02947998046875,
0.006671905517578125,
0.006900787353515625,
0.031951904296875,
-0.048675537109375,
0.0171356201171875,
0.0024166107177734375,
-0.0004639625549316406,
0.0019779205322265625,
-0.009613037109375,
-0.03314208984375,
0.00612640380859375,
0.0312042236328125,
-0.034576416015625,
-0.02435302734375,
0.0107879638671875,
0.0297088623046875,
-0.016693115234375,
-0.0251617431640625,
-0.052947998046875,
0.051910400390625,
-0.0142974853515625,
0.029449462890625,
0.00018393993377685547,
0.0130157470703125,
-0.01568603515625,
0.0227203369140625,
0.008087158203125,
0.021697998046875,
-0.00994110107421875,
-0.0247802734375,
0.0087890625,
0.006317138671875,
-0.011474609375,
0.02960205078125,
-0.0096282958984375,
-0.040557861328125,
-0.046142578125,
-0.0041351318359375,
-0.002475738525390625,
-0.005336761474609375,
-0.0005636215209960938,
0.0122833251953125,
0.0248260498046875,
-0.03265380859375,
-0.00615692138671875,
0.0274810791015625,
0.039398193359375,
0.06292724609375,
0.01534271240234375,
-0.04241943359375,
0.01413726806640625,
-0.0267486572265625,
-0.036773681640625,
-0.006572723388671875,
0.06500244140625,
0.004932403564453125,
-0.01202392578125,
-0.036285400390625,
0.0870361328125,
-0.060699462890625,
-0.016204833984375,
-0.09271240234375,
0.0222930908203125,
0.004627227783203125,
0.0589599609375,
0.0035991668701171875,
-0.0131683349609375,
0.0011129379272460938,
-0.0887451171875,
-0.0207672119140625,
0.03729248046875,
-0.0050811767578125,
0.023895263671875,
-0.050872802734375,
-0.005924224853515625,
0.0176239013671875,
-0.002376556396484375,
0.04754638671875,
0.033538818359375,
-0.012115478515625,
0.0066375732421875,
0.0218963623046875,
-0.01094818115234375,
-0.0266876220703125,
0.05908203125,
-0.03204345703125,
-0.0672607421875,
-0.0179290771484375,
0.00946044921875,
0.082275390625,
0.06884765625,
0.039398193359375,
0.0350341796875,
-0.06573486328125,
0.01514434814453125,
-0.01334381103515625,
0.01407623291015625,
-0.0404052734375,
-0.00873565673828125,
-0.021270751953125,
-0.01080322265625,
0.0211944580078125,
0.01216888427734375,
-0.016693115234375,
0.009307861328125,
-0.0009293556213378906,
-0.053314208984375,
0.0172882080078125,
-0.02667236328125,
0.030487060546875,
-0.044281005859375,
0.0061798095703125,
0.040985107421875,
0.0224151611328125,
-0.0294342041015625,
-0.03936767578125,
-0.0013141632080078125,
-0.0142364501953125,
-0.01367950439453125,
0.0382080078125,
-0.0216217041015625,
0.05169677734375,
-0.051239013671875,
-0.050933837890625,
-0.03765869140625,
-0.00490570068359375,
0.0209197998046875,
0.01251983642578125,
-0.0154571533203125,
-0.002277374267578125,
0.04345703125,
0.00844573974609375,
0.0025272369384765625,
0.0057830810546875,
0.049285888671875,
0.047149658203125,
-0.0037593841552734375,
-0.008819580078125,
0.00994110107421875,
-0.0867919921875,
0.01041412353515625,
0.0526123046875,
0.0223388671875,
0.01934814453125,
0.00804901123046875,
0.034210205078125,
0.055084228515625,
0.00043487548828125,
0.016754150390625,
0.004634857177734375,
-0.007518768310546875,
0.01393890380859375,
-0.0149383544921875,
-0.010772705078125,
0.01238250732421875,
-0.058837890625,
0.004528045654296875,
0.039093017578125,
0.0265045166015625,
-0.0053253173828125,
-0.016510009765625,
0.0218505859375,
0.01861572265625,
-0.013580322265625,
-0.06646728515625,
0.0021724700927734375,
0.02001953125,
0.0003170967102050781,
0.009185791015625,
-0.0053863525390625,
-0.035736083984375,
0.036224365234375,
0.031982421875,
-0.04583740234375,
0.01239013671875,
-0.03167724609375,
-0.02911376953125,
-0.022674560546875,
-0.01416015625,
0.03033447265625,
0.0273590087890625,
-0.038848876953125,
-0.0265045166015625,
-0.032745361328125,
-0.01544189453125,
-0.0105438232421875,
0.0119476318359375,
-0.0230865478515625,
0.0243072509765625,
-0.012542724609375,
-0.053955078125,
-0.00704193115234375,
-0.00209808349609375,
0.06854248046875,
0.0169219970703125,
0.005809783935546875,
-0.005062103271484375,
0.0303192138671875,
0.05218505859375,
-0.0304412841796875,
0.031402587890625,
-0.0264129638671875,
0.0648193359375,
0.05352783203125,
-0.0246429443359375,
0.006305694580078125,
-0.0113677978515625,
0.06317138671875,
0.038909912109375,
-0.0294036865234375,
-0.035186767578125,
0.00475311279296875,
-0.0256805419921875,
-0.00960540771484375,
0.00292205810546875,
0.0318603515625,
-0.039337158203125,
-0.06439208984375,
-0.01666259765625,
-0.012115478515625,
-0.10028076171875,
-0.0537109375,
0.05670166015625,
-0.0245513916015625,
-0.021697998046875,
-0.021881103515625,
-0.0210418701171875,
-0.01490020751953125,
-0.004947662353515625,
-0.021728515625,
0.0053558349609375,
-0.003734588623046875,
0.03851318359375,
0.01025390625,
-0.0045166015625,
-0.030426025390625,
0.0243988037109375,
-0.0028896331787109375,
-0.00009304285049438477,
0.06634521484375,
-0.0081634521484375,
-0.0740966796875,
-0.031005859375,
0.00543212890625,
-0.00560760498046875,
0.0067138671875,
0.06512451171875,
-0.019134521484375,
-0.01123809814453125,
-0.002582550048828125,
-0.013336181640625,
0.065185546875,
-0.07305908203125,
-0.0218658447265625,
-0.0116119384765625,
-0.0604248046875,
-0.00582122802734375,
0.00864410400390625,
-0.0004749298095703125,
-0.0404052734375,
0.02056884765625,
-0.06536865234375,
-0.00011783838272094727,
-0.0311431884765625,
-0.01482391357421875,
0.0139923095703125,
0.0244903564453125,
-0.0020771026611328125,
-0.0193023681640625,
0.03314208984375,
0.0251007080078125,
0.03253173828125,
-0.0086212158203125,
0.0054473876953125,
0.02728271484375,
-0.0112457275390625,
-0.01323699951171875,
-0.0219879150390625,
0.032501220703125,
-0.0174407958984375,
-0.005817413330078125,
0.0112762451171875,
-0.00948333740234375,
-0.00872802734375,
-0.006984710693359375,
-0.021453857421875,
-0.02923583984375,
0.043060302734375,
0.013671875,
0.0200653076171875,
-0.026153564453125,
-0.0338134765625,
-0.004734039306640625,
0.07666015625,
-0.038665771484375,
-0.040435791015625,
-0.04119873046875,
0.0245361328125,
0.0137481689453125,
-0.07696533203125,
0.056060791015625,
-0.042572021484375,
-0.07708740234375,
0.035888671875,
0.0243682861328125,
-0.0304718017578125,
-0.00649261474609375,
-0.0169677734375,
-0.0452880859375,
-0.0386962890625,
0.0272674560546875,
-0.040435791015625,
0.046417236328125,
-0.042572021484375,
0.033355712890625,
-0.038299560546875,
-0.00789642333984375,
-0.032440185546875,
-0.0904541015625,
-0.0146636962890625,
0.001613616943359375,
0.042633056640625,
-0.037933349609375,
0.046051025390625,
-0.034820556640625,
0.04412841796875,
0.005016326904296875,
0.0289154052734375,
-0.01337432861328125,
-0.006229400634765625,
0.0037899017333984375,
-0.036529541015625,
-0.0176849365234375,
-0.0128021240234375,
-0.02593994140625,
-0.071044921875,
-0.01202392578125,
-0.03875732421875,
-0.01299285888671875,
0.029327392578125,
-0.0291900634765625,
0.0215911865234375,
-0.0450439453125,
-0.03558349609375,
-0.055816650390625,
0.00861358642578125,
-0.0205078125,
-0.00919342041015625,
-0.054046630859375,
-0.046295166015625,
0.055908203125,
0.01531219482421875,
0.0179595947265625,
0.000370025634765625,
0.0947265625,
-0.004962921142578125,
-0.0111541748046875,
-0.0784912109375,
-0.006561279296875,
0.0029449462890625,
-0.00151824951171875,
0.034423828125,
0.0007753372192382812,
0.005733489990234375,
-0.0070648193359375,
-0.01328277587890625,
-0.00897979736328125,
-0.01326751708984375,
0.037567138671875,
0.0209503173828125,
0.006561279296875,
-0.014190673828125,
0.00655364990234375,
0.0281829833984375,
0.02960205078125,
-0.0015773773193359375,
-0.02593994140625,
0.00435638427734375,
0.04937744140625,
-0.003093719482421875,
-0.01517486572265625,
-0.050506591796875,
-0.0689697265625,
0.029205322265625,
-0.06903076171875,
0.006420135498046875,
-0.0132293701171875,
0.0022411346435546875,
0.031463623046875,
0.01535797119140625,
0.021087646484375,
-0.0207366943359375,
-0.005695343017578125,
-0.0567626953125,
0.02581787109375,
-0.004146575927734375,
-0.006137847900390625,
-0.00412750244140625,
-0.0037670135498046875,
-0.00005418062210083008,
-0.023956298828125,
-0.043243408203125,
-0.047698974609375,
0.004985809326171875,
0.00958251953125,
0.0294342041015625,
0.006298065185546875,
0.04937744140625,
0.0157470703125,
-0.03338623046875,
-0.0136260986328125,
-0.01192474365234375,
-0.0221405029296875,
-0.08074951171875,
-0.0050201416015625,
-0.00884246826171875,
-0.01480865478515625,
0.056304931640625,
-0.03314208984375,
-0.034423828125,
0.00928497314453125,
0.005756378173828125,
0.053192138671875,
0.03326416015625,
0.01119232177734375,
0.016387939453125,
0.01678466796875,
-0.021087646484375,
0.003772735595703125,
-0.0241546630859375,
-0.0489501953125,
0.00685882568359375,
0.04217529296875,
0.075439453125,
0.0205841064453125,
-0.0240020751953125,
-0.023162841796875,
-0.03369140625,
-0.0026988983154296875,
0.02294921875,
-0.002105712890625,
-0.02972412109375,
-0.0253753662109375,
-0.0003368854522705078,
0.031158447265625,
-0.01904296875,
-0.00804901123046875,
0.0224456787109375,
0.007534027099609375,
0.01611328125,
0.054840087890625,
-0.033935546875,
0.00553131103515625,
0.0048370361328125,
0.01708984375,
-0.01273345947265625,
0.0080718994140625,
-0.0157470703125,
0.0011577606201171875,
-0.032196044921875,
-0.016632080078125,
0.06201171875,
-0.013916015625,
-0.0218658447265625,
0.0229339599609375,
0.006191253662109375,
-0.00945281982421875,
0.018646240234375,
-0.0016307830810546875,
-0.01081085205078125,
0.0286102294921875,
-0.0240020751953125,
-0.011505126953125,
-0.0369873046875,
0.031524658203125,
0.04290771484375,
-0.029449462890625,
-0.00785064697265625,
-0.01983642578125,
0.0004954338073730469,
-0.017852783203125,
0.013214111328125,
-0.0092010498046875,
0.02142333984375,
0.00510406494140625,
0.0004382133483886719,
-0.0290985107421875,
-0.01165771484375,
0.0538330078125,
-0.0139312744140625,
0.0005097389221191406,
-0.010223388671875,
0.028106689453125,
-0.02044677734375,
-0.00926971435546875,
-0.0654296875,
0.019256591796875,
0.012176513671875,
-0.02777099609375,
0.004810333251953125,
0.003108978271484375,
0.020233154296875,
0.0250396728515625,
-0.0423583984375,
-0.023162841796875,
-0.034423828125,
0.052520751953125,
-0.0286407470703125,
0.061187744140625,
-0.04132080078125,
-0.027618408203125,
0.0008931159973144531,
0.0272979736328125,
0.0227203369140625,
-0.01241302490234375,
-0.0258941650390625,
-0.03155517578125,
0.03497314453125,
0.0275421142578125,
0.0008320808410644531,
0.057952880859375,
-0.0450439453125,
0.0215301513671875,
0.0237274169921875,
-0.02276611328125,
0.0295257568359375,
0.004177093505859375,
-0.01517486572265625,
-0.0174407958984375,
0.033447265625,
-0.01036834716796875,
0.0033416748046875,
0.0186004638671875,
-0.01947021484375,
0.01300811767578125,
-0.0104522705078125,
0.06048583984375,
0.00934600830078125,
0.004329681396484375,
-0.0018024444580078125,
-0.034332275390625,
0.052337646484375,
-0.006275177001953125,
0.0180816650390625,
0.0002472400665283203,
0.02459716796875,
0.00475311279296875,
-0.0251312255859375,
-0.00499725341796875,
-0.00809478759765625,
0.003108978271484375,
0.0270538330078125,
-0.0278778076171875,
-0.0148468017578125,
-0.0499267578125,
-0.03558349609375,
0.05096435546875,
-0.0287017822265625,
-0.0006971359252929688,
0.0302581787109375,
-0.0190277099609375,
-0.01171875,
-0.03863525390625,
0.01195526123046875,
-0.0022602081298828125,
-0.0321044921875,
0.00865936279296875,
-0.022674560546875,
0.034637451171875,
0.04962158203125,
-0.01226043701171875,
0.0072784423828125,
0.008514404296875,
-0.0219268798828125,
-0.049591064453125,
-0.012908935546875,
0.052001953125,
-0.0157928466796875,
-0.0966796875,
0.02276611328125,
-0.0745849609375,
0.00304412841796875,
-0.0208892822265625,
-0.03924560546875,
0.0653076171875,
-0.0157623291015625,
-0.0096435546875,
0.037933349609375,
0.0181121826171875,
-0.0299530029296875,
0.002330780029296875,
0.048370361328125,
-0.031585693359375,
-0.0304718017578125,
0.01538848876953125,
-0.04156494140625,
-0.045196533203125,
-0.0101165771484375,
-0.04833984375,
0.08380126953125,
-0.01471710205078125,
0.0257110595703125,
-0.01178741455078125,
0.04547119140625,
0.0313720703125,
0.04931640625,
-0.0220794677734375,
0.01654052734375,
-0.016357421875,
0.0030002593994140625,
-0.053314208984375,
-0.002628326416015625,
-0.0243377685546875,
0.032501220703125,
0.082275390625,
0.01049041748046875,
0.00157928466796875,
-0.0267181396484375,
0.04754638671875,
0.00830841064453125,
-0.020721435546875,
0.021636962890625,
-0.0111541748046875,
0.0035915374755859375,
0.033203125,
-0.0262603759765625,
0.034759521484375,
-0.0206756591796875,
-0.01055908203125,
0.01293182373046875,
0.0236968994140625,
0.03179931640625,
0.0036907196044921875,
0.048095703125,
-0.01120758056640625,
-0.003993988037109375,
0.029541015625,
-0.0219268798828125,
0.012847900390625,
0.031646728515625,
0.0241241455078125,
-0.05615234375,
-0.035308837890625,
-0.0191497802734375,
0.035247802734375,
-0.010955810546875,
0.032470703125,
0.02392578125,
0.017181396484375,
0.0595703125,
-0.0221710205078125,
0.01259613037109375,
0.00675201416015625,
-0.0121917724609375,
0.03564453125,
0.01276397705078125,
0.03179931640625,
-0.04229736328125,
-0.0400390625,
0.05499267578125,
0.06060791015625,
-0.0204925537109375,
-0.072998046875,
0.01511383056640625,
0.0229339599609375,
0.0222320556640625,
0.016204833984375,
0.01120758056640625,
-0.0225372314453125,
0.0465087890625,
-0.001125335693359375,
0.00951385498046875,
-0.00812530517578125,
0.0164642333984375,
0.007785797119140625,
0.0491943359375,
-0.050262451171875,
-0.007061004638671875,
-0.035003662109375,
0.025543212890625,
0.01593017578125,
0.0174407958984375,
-0.0030422210693359375,
0.023468017578125,
0.029327392578125,
0.0036754608154296875,
-0.01515960693359375,
0.043121337890625,
0.01520538330078125,
0.00720977783203125,
-0.0039043426513671875,
-0.028045654296875,
0.033721923828125,
0.011138916015625,
-0.0152435302734375,
0.0187835693359375,
0.047882080078125,
0.04736328125,
-0.03912353515625,
-0.029998779296875,
0.016326904296875,
-0.031646728515625,
0.00047779083251953125,
-0.0006656646728515625,
-0.0340576171875,
-0.00896453857421875,
-0.037506103515625,
-0.004150390625,
0.0161895751953125,
-0.01009368896484375,
-0.0117645263671875,
0.01141357421875,
0.00225067138671875,
-0.00901031494140625,
0.046875,
-0.01464080810546875,
-0.0007290840148925781,
0.0109710693359375,
-0.0163726806640625,
0.0026111602783203125,
-0.0267486572265625,
-0.027435302734375,
-0.004116058349609375,
0.021759033203125,
-0.0166778564453125,
0.03924560546875,
-0.0308837890625,
-0.03179931640625,
-0.00299072265625,
0.0301513671875,
-0.00525665283203125,
0.01065826416015625,
0.0085296630859375,
-0.00858306884765625,
-0.03955078125,
-0.0169677734375,
-0.01059722900390625,
0.0205078125,
0.019073486328125,
0.069091796875,
0.0010900497436523438,
0.0205535888671875,
0.01335906982421875,
0.0101470947265625,
0.01232147216796875,
0.0280303955078125,
-0.018035888671875,
0.006938934326171875,
0.0117340087890625,
-0.0242919921875,
0.0084686279296875,
0.00022864341735839844,
0.0228271484375,
-0.038421630859375,
-0.016754150390625,
-0.0167236328125,
0.0179901123046875,
0.0273590087890625,
0.0157318115234375,
-0.0264739990234375,
-0.01038360595703125,
-0.0261077880859375,
-0.00897979736328125,
0.034515380859375,
0.005603790283203125,
-0.02850341796875,
-0.01071929931640625,
0.015716552734375,
-0.007244110107421875,
0.00421142578125,
0.026123046875,
0.021820068359375,
0.03314208984375,
-0.02227783203125,
-0.0238800048828125,
-0.0250396728515625,
-0.0283660888671875,
-0.0234527587890625,
0.0147247314453125,
-0.025634765625,
0.00971221923828125,
-0.0394287109375,
0.00330352783203125,
-0.032318115234375,
0.027130126953125,
-0.0029392242431640625,
-0.007503509521484375,
-0.049163818359375,
0.02264404296875,
0.006267547607421875,
-0.0177459716796875,
-0.0133514404296875,
-0.045867919921875,
0.0005388259887695312,
0.01398468017578125,
-0.0055084228515625,
-0.02838134765625,
-0.026031494140625,
-0.0207366943359375,
0.00506591796875,
0.013824462890625,
-0.023834228515625,
0.05078125,
-0.0075836181640625,
-0.08404541015625,
0.01508331298828125,
0.007442474365234375,
-0.0399169921875,
-0.04339599609375,
-0.036285400390625,
-0.088623046875,
-0.07159423828125,
0.08038330078125,
-0.0679931640625,
-0.005527496337890625,
0.0186004638671875,
-0.01399993896484375,
-0.00044989585876464844,
-0.053955078125,
0.0024127960205078125,
0.01226806640625,
0.0132904052734375,
-0.03375244140625,
-0.01134490966796875,
0.02569580078125,
-0.0040130615234375,
-0.022125244140625,
0.0017452239990234375,
-0.00685882568359375,
0.00499725341796875,
-0.0264129638671875,
0.0244293212890625,
0.03863525390625,
-0.04840087890625,
-0.1427001953125,
0.00630950927734375,
-0.03900146484375,
-0.044708251953125,
-0.029144287109375,
0.00899505615234375,
-0.0031185150146484375,
-0.015655517578125,
-0.00724029541015625,
0.004497528076171875,
-0.01212310791015625,
0.032135009765625,
0.005413055419921875,
0.0164794921875,
0.00299835205078125,
-0.009796142578125,
-0.00255584716796875,
0.03826904296875,
0.05059814453125,
0.0275726318359375,
0.00829315185546875,
0.0063934326171875,
0.055633544921875,
0.048126220703125,
-0.00798797607421875,
0.09619140625,
0.0233306884765625,
-0.04937744140625,
-0.0169219970703125,
0.0036487579345703125,
-0.0401611328125,
0.01458740234375,
0.0789794921875,
0.10565185546875,
0.0304107666015625,
-0.060821533203125,
0.03546142578125,
0.04449462890625,
0.0207061767578125,
-0.0133819580078125,
-0.0012531280517578125,
-0.0223388671875,
-0.04229736328125,
-0.0148162841796875,
0.0247955322265625,
0.01776123046875,
-0.017852783203125,
-0.005245208740234375,
-0.029449462890625,
0.00554656982421875,
0.0007443428039550781,
-0.039337158203125,
0.03668212890625,
0.045318603515625,
-0.038360595703125,
0.017578125,
-0.033111572265625,
-0.0011129379272460938,
0.033782958984375,
-0.04217529296875,
-0.03887939453125,
-0.0033397674560546875,
-0.02764892578125,
0.0248260498046875,
-0.0189666748046875,
0.029541015625,
-0.04931640625,
0.020233154296875,
0.0200347900390625,
0.01207733154296875,
-0.01415252685546875,
0.0038471221923828125,
0.00551605224609375,
0.032012939453125,
-0.0295562744140625,
0.04779052734375,
-0.00890350341796875,
0.0016431808471679688,
-0.013641357421875,
0.031951904296875,
-0.0191802978515625,
0.0002903938293457031,
0.046966552734375,
-0.0288238525390625,
0.0005435943603515625,
0.0211029052734375,
-0.0272216796875,
-0.04730224609375,
0.047698974609375,
0.04827880859375,
0.0007586479187011719,
0.017364501953125
]
|
7c72f17338471807e3a2803653ab776e4b9270bf | Wordpress Stackexchange
Q: When oEmbed fails, display an alternative I want to specify an alternative image that will be displayed when oEmbed fails.
The specific use case is to offer an alternative when China (or other countries) block YouTube. We know the YouTube content won't be available there, but want to provide an alternate image in that case.
Can the oEmbed error code be made accessible for this purpose?
A: I think the best thing to do in this case is to wrap your oEmbed content with a div before they are rendered and then show an alternate image with the CSS background-image property. If the video loads, then the oEmbed content will cover the background image.
You can add the wrapper using the embed_oembed_html filter.
add_filter('embed_oembed_html', 'your_function_here');
If you're worried about loading in extra elements, then you can do a client side check with JS to see if the oEmbed loaded, and if not, load a background image into the wrapper.
You could get a lot more complicated by adding in custom fields for each video, but that's essentially the gist of it.
| Q: When oEmbed fails, display an alternative I want to specify an alternative image that will be displayed when oEmbed fails.
The specific use case is to offer an alternative when China (or other countries) block YouTube. We know the YouTube content won't be available there, but want to provide an alternate image in that case.
Can the oEmbed error code be made accessible for this purpose?
A: I think the best thing to do in this case is to wrap your oEmbed content with a div before they are rendered and then show an alternate image with the CSS background-image property. If the video loads, then the oEmbed content will cover the background image.
You can add the wrapper using the embed_oembed_html filter.
add_filter('embed_oembed_html', 'your_function_here');
If you're worried about loading in extra elements, then you can do a client side check with JS to see if the oEmbed loaded, and if not, load a background image into the wrapper.
You could get a lot more complicated by adding in custom fields for each video, but that's essentially the gist of it.
A: One approach might be to make another request using oEmbed on the server side via a proxy which is based in China.
This way you would know ahead of time if the call to the resource on the client is going to fail. Early on in the page request you can ascertain where the client's IP is located geographically, make a server-side call via a proxy to the resource e.g youtube and then leverage the oEmbed error you'll presumably get.
You could take a look at Wonderproxy for achieving this (I am not affiliated with them but hear good things)
| wordpress | {
"language": "en",
"length": 283,
"provenance": "stackexchange_00019.jsonl.gz:454436",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/183283"
} | [
0.09808349609375,
0.029022216796875,
0.01306915283203125,
-0.061065673828125,
0.03680419921875,
-0.018524169921875,
0.017608642578125,
-0.03619384765625,
-0.01007843017578125,
0.00147247314453125,
-0.0635986328125,
0.030303955078125,
-0.0106353759765625,
-0.00731658935546875,
0.0285797119140625,
-0.036865234375,
0.033447265625,
-0.008514404296875,
0.022613525390625,
-0.01126861572265625,
-0.002582550048828125,
0.0243072509765625,
0.023529052734375,
-0.0272369384765625,
0.01352691650390625,
-0.08233642578125,
0.1009521484375,
-0.03662109375,
0.0178375244140625,
-0.03192138671875,
0.0166778564453125,
0.0304412841796875,
0.0277252197265625,
0.01806640625,
-0.0274505615234375,
0.011932373046875,
0.02294921875,
-0.0149078369140625,
-0.0143280029296875,
0.0338134765625,
0.003383636474609375,
-0.003231048583984375,
0.122802734375,
-0.00891876220703125,
0.04095458984375,
0.00962066650390625,
0.003330230712890625,
-0.07373046875,
0.0125885009765625,
0.005779266357421875,
0.0284271240234375,
-0.00835418701171875,
0.0273895263671875,
0.0006966590881347656,
-0.022186279296875,
0.0008335113525390625,
-0.057708740234375,
0.0517578125,
0.0164337158203125,
0.04345703125,
0.01105499267578125,
0.026031494140625,
-0.0270233154296875,
-0.0279541015625,
0.0239715576171875,
-0.0172882080078125,
0.0169525146484375,
0.035064697265625,
-0.0261077880859375,
0.00910186767578125,
0.0238494873046875,
-0.0270538330078125,
-0.0268096923828125,
-0.010009765625,
-0.04156494140625,
0.0242767333984375,
0.02923583984375,
-0.00958251953125,
-0.01378631591796875,
0.01568603515625,
0.04241943359375,
0.007232666015625,
0.032989501953125,
-0.02362060546875,
0.01465606689453125,
-0.0198974609375,
0.01166534423828125,
-0.012939453125,
-0.0186920166015625,
-0.0028228759765625,
-0.03070068359375,
-0.014129638671875,
-0.01451873779296875,
-0.009063720703125,
-0.042449951171875,
-0.003345489501953125,
0.070068359375,
0.066162109375,
-0.0255584716796875,
-0.0163116455078125,
-0.002567291259765625,
-0.0435791015625,
0.0076904296875,
-0.036163330078125,
0.00884246826171875,
0.00022685527801513672,
0.0253448486328125,
-0.0777587890625,
0.007572174072265625,
-0.01302337646484375,
-0.049835205078125,
0.07196044921875,
-0.0081329345703125,
-0.055328369140625,
-0.040802001953125,
0.038177490234375,
0.003589630126953125,
-0.043914794921875,
0.0193328857421875,
-0.02874755859375,
-0.0175018310546875,
0.0011281967163085938,
0.022308349609375,
-0.04205322265625,
0.0310516357421875,
0.0047607421875,
-0.0306854248046875,
-0.0008149147033691406,
0.0093841552734375,
0.01103973388671875,
-0.040740966796875,
-0.01220703125,
0.0645751953125,
0.03863525390625,
0.025848388671875,
-0.0215911865234375,
0.03240966796875,
0.0115814208984375,
0.013336181640625,
0.025604248046875,
0.0003361701965332031,
-0.042510986328125,
-0.0100860595703125,
0.0208740234375,
-0.01629638671875,
0.0147857666015625,
0.00936126708984375,
0.004680633544921875,
-0.02642822265625,
-0.078369140625,
0.0304718017578125,
-0.0121917724609375,
0.022979736328125,
-0.006359100341796875,
0.04901123046875,
-0.055511474609375,
0.03375244140625,
-0.03948974609375,
0.020355224609375,
-0.0283203125,
-0.007755279541015625,
0.0255889892578125,
0.064453125,
-0.0003094673156738281,
0.028900146484375,
-0.042755126953125,
-0.04852294921875,
0.0016984939575195312,
0.0118865966796875,
0.04498291015625,
-0.0230865478515625,
-0.0196990966796875,
-0.022918701171875,
-0.00470733642578125,
-0.013336181640625,
0.009246826171875,
-0.0016889572143554688,
0.0021038055419921875,
0.03619384765625,
-0.00844573974609375,
0.001361846923828125,
-0.0164947509765625,
0.1051025390625,
-0.0455322265625,
-0.040374755859375,
0.01523590087890625,
-0.0008444786071777344,
0.04058837890625,
0.0198516845703125,
0.02447509765625,
0.0169830322265625,
-0.004268646240234375,
-0.045928955078125,
0.030853271484375,
0.0014705657958984375,
-0.0171966552734375,
-0.0232391357421875,
-0.01088714599609375,
-0.003597259521484375,
0.004535675048828125,
0.04193115234375,
0.04058837890625,
-0.047943115234375,
0.008056640625,
-0.0552978515625,
-0.016754150390625,
0.008636474609375,
0.020782470703125,
-0.0144500732421875,
0.0217742919921875,
0.0079193115234375,
-0.0173187255859375,
-0.028533935546875,
0.04486083984375,
0.01197052001953125,
0.00589752197265625,
-0.03216552734375,
0.040435791015625,
-0.008209228515625,
0.041015625,
-0.01212310791015625,
-0.04290771484375,
-0.0198822021484375,
-0.01385498046875,
0.00576019287109375,
-0.00916290283203125,
-0.0024433135986328125,
-0.0010824203491210938,
0.00432586669921875,
0.036376953125,
-0.0263214111328125,
-0.006099700927734375,
0.0697021484375,
0.02252197265625,
-0.035430908203125,
-0.0011072158813476562,
-0.024078369140625,
-0.08123779296875,
-0.0206298828125,
0.0625,
0.0281829833984375,
0.00524139404296875,
0.019287109375,
0.02545166015625,
0.07354736328125,
0.006816864013671875,
0.0234222412109375,
-0.0030803680419921875,
-0.034210205078125,
-0.045928955078125,
-0.006557464599609375,
-0.0205535888671875,
0.04803466796875,
-0.0826416015625,
0.007965087890625,
0.03802490234375,
-0.01201629638671875,
-0.0007314682006835938,
-0.051910400390625,
0.052490234375,
-0.0111083984375,
0.03179931640625,
0.0217437744140625,
-0.0104217529296875,
0.048126220703125,
-0.022918701171875,
0.0311431884765625,
-0.0011348724365234375,
-0.022216796875,
0.0095672607421875,
0.01493072509765625,
-0.0360107421875,
-0.0013418197631835938,
0.0570068359375,
0.0318603515625,
-0.007221221923828125,
0.01399993896484375,
-0.035491943359375,
-0.02142333984375,
0.0265655517578125,
-0.0077972412109375,
0.027862548828125,
-0.007442474365234375,
-0.0121002197265625,
0.0092010498046875,
-0.002994537353515625,
0.003299713134765625,
-0.010894775390625,
0.007495880126953125,
-0.00377655029296875,
0.0208892822265625,
0.00693511962890625,
-0.0085906982421875,
0.01055145263671875,
-0.0053558349609375,
-0.019073486328125,
-0.03167724609375,
-0.06805419921875,
0.0657958984375,
-0.07366943359375,
0.0026493072509765625,
0.05059814453125,
-0.029022216796875,
0.01898193359375,
-0.006954193115234375,
0.016815185546875,
-0.00884246826171875,
0.02203369140625,
-0.01561737060546875,
-0.0200653076171875,
-0.0465087890625,
-0.042694091796875,
0.03369140625,
0.0243988037109375,
0.015716552734375,
-0.0288848876953125,
-0.0004982948303222656,
0.018951416015625,
-0.047882080078125,
-0.042022705078125,
0.003459930419921875,
-0.0273590087890625,
0.04449462890625,
0.047332763671875,
0.00027823448181152344,
-0.0435791015625,
0.09814453125,
0.01253509521484375,
0.003452301025390625,
-0.043853759765625,
-0.031829833984375,
-0.051025390625,
-0.08013916015625,
-0.0124969482421875,
0.005847930908203125,
0.011962890625,
0.017120361328125,
-0.004291534423828125,
0.01654052734375,
-0.04058837890625,
0.0296783447265625,
0.050933837890625,
-0.00466156005859375,
0.0157928466796875,
-0.00836181640625,
-0.01806640625,
-0.028564453125,
0.00849151611328125,
-0.01250457763671875,
-0.00496673583984375,
-0.0045013427734375,
-0.004245758056640625,
-0.0172882080078125,
-0.02691650390625,
-0.005405426025390625,
0.025054931640625,
0.005542755126953125,
-0.028167724609375,
0.0130615234375,
-0.044525146484375,
-0.0041046142578125,
-0.0278472900390625,
-0.0445556640625,
0.049285888671875,
0.029449462890625,
-0.01552581787109375,
0.0013370513916015625,
-0.0039215087890625,
0.00559234619140625,
-0.024810791015625,
0.044830322265625,
-0.013519287109375,
0.00943756103515625,
-0.01410675048828125,
-0.002658843994140625,
-0.028594970703125,
0.0015096664428710938,
-0.0198211669921875,
-0.02093505859375,
-0.01959228515625,
0.007724761962890625,
-0.02734375,
0.06396484375,
-0.024078369140625,
0.01126861572265625,
0.00980377197265625,
-0.0239105224609375,
0.06463623046875,
-0.033660888671875,
-0.0162353515625,
-0.024505615234375,
0.0684814453125,
0.00838470458984375,
-0.04010009765625,
0.015838623046875,
0.007350921630859375,
-0.00315093994140625,
0.0406494140625,
0.0037899017333984375,
-0.01464080810546875,
-0.01195526123046875,
-0.0227203369140625,
-0.0168609619140625,
-0.02276611328125,
-0.006595611572265625,
-0.0276031494140625,
0.0059356689453125,
-0.031341552734375,
0.0022430419921875,
0.01251983642578125,
-0.041656494140625,
0.01088714599609375,
-0.056396484375,
0.0014410018920898438,
0.0014476776123046875,
-0.005706787109375,
-0.0528564453125,
-0.01617431640625,
-0.034698486328125,
0.04974365234375,
0.0026874542236328125,
0.02301025390625,
-0.00965118408203125,
0.0372314453125,
0.0247039794921875,
0.054779052734375,
0.0096435546875,
-0.019439697265625,
0.0936279296875,
-0.038818359375,
0.0090179443359375,
-0.02484130859375,
0.0009303092956542969,
-0.00785064697265625,
-0.03204345703125,
-0.0121307373046875,
-0.00652313232421875,
-0.006160736083984375,
0.02850341796875,
-0.0293731689453125,
-0.03997802734375,
-0.0217437744140625,
0.033172607421875,
0.00963592529296875,
0.031524658203125,
-0.005718231201171875,
-0.0212249755859375,
-0.019317626953125,
-0.004673004150390625,
0.04583740234375,
-0.01105499267578125,
0.00519561767578125,
-0.0478515625,
0.019195556640625,
-0.044281005859375,
0.0389404296875,
0.0206756591796875,
0.03704833984375,
-0.037078857421875,
0.008392333984375,
0.01513671875,
-0.02557373046875,
0.037506103515625,
-0.0211334228515625,
-0.0132598876953125,
0.06640625,
0.013671875,
0.0293426513671875,
-0.0057373046875,
-0.01465606689453125,
0.03509521484375,
-0.045257568359375,
0.021331787109375,
-0.031158447265625,
0.0256195068359375,
-0.016265869140625,
0.00016236305236816406,
-0.004634857177734375,
0.002262115478515625,
-0.0313720703125,
-0.0005426406860351562,
0.00720977783203125,
-0.0200958251953125,
0.0509033203125,
0.034393310546875,
0.005352020263671875,
-0.007144927978515625,
0.0016956329345703125,
0.02435302734375,
0.0024566650390625,
-0.02923583984375,
0.007610321044921875,
0.042938232421875,
0.014984130859375,
0.04388427734375,
0.0240325927734375,
0.0181427001953125,
0.0184326171875,
0.002117156982421875,
-0.03271484375,
-0.04443359375,
0.007709503173828125,
-0.025543212890625,
0.0252532958984375,
0.03900146484375,
0.023101806640625,
0.03131103515625,
0.0162353515625,
-0.0302886962890625,
0.02142333984375,
0.0450439453125,
-0.0287017822265625,
0.0225067138671875,
0.0160064697265625,
-0.01531219482421875,
-0.01079559326171875,
0.0305023193359375,
0.0164642333984375,
0.000980377197265625,
-0.0201416015625,
0.0298004150390625,
0.0165863037109375,
0.03839111328125,
0.0250701904296875,
-0.0162353515625,
-0.035675048828125,
0.053192138671875,
-0.0374755859375,
-0.0076904296875,
-0.0300445556640625,
-0.028778076171875,
-0.0199737548828125,
-0.06982421875,
-0.01392364501953125,
0.07159423828125,
0.01088714599609375,
-0.030364990234375,
0.036590576171875,
-0.0299072265625,
-0.0333251953125,
-0.058441162109375,
-0.0065460205078125,
0.07061767578125,
0.0110626220703125,
-0.0193328857421875,
0.0016145706176757812,
0.0069427490234375,
0.006908416748046875,
0.02978515625,
-0.06494140625,
0.020904541015625,
0.03143310546875,
0.0123443603515625,
-0.045257568359375,
-0.042724609375,
-0.033966064453125,
0.01285552978515625,
-0.012359619140625,
0.0235443115234375,
0.020355224609375,
-0.068603515625,
-0.0021190643310546875,
0.00612640380859375,
0.033203125,
0.0218963623046875,
0.047088623046875,
-0.0047607421875,
-0.0104522705078125,
-0.04296875,
0.0229644775390625,
-0.0261383056640625,
-0.031646728515625,
-0.048828125,
-0.044952392578125,
-0.07391357421875,
-0.022247314453125,
-0.0036716461181640625,
-0.00978851318359375,
-0.00543212890625,
0.0118408203125,
-0.0303192138671875,
0.056121826171875,
0.031036376953125,
0.04071044921875,
-0.010589599609375,
0.020721435546875,
0.01380157470703125,
0.0182952880859375,
-0.00018477439880371094,
0.007289886474609375,
0.003032684326171875,
-0.0245513916015625,
-0.055084228515625,
-0.0677490234375,
0.02984619140625,
0.05804443359375,
0.037261962890625,
0.059600830078125,
0.00023031234741210938,
0.039031982421875,
0.01467132568359375,
-0.01126861572265625,
-0.0073089599609375,
-0.0105743408203125,
0.045623779296875,
0.0040435791015625,
0.01519775390625,
0.036041259765625,
-0.03106689453125,
0.01183319091796875,
-0.0173187255859375,
0.0020885467529296875,
-0.0092620849609375,
-0.032928466796875,
-0.0137481689453125,
0.06365966796875,
-0.055877685546875,
0.064697265625,
0.05426025390625,
-0.006275177001953125,
0.0261688232421875,
0.0012149810791015625,
-0.0150604248046875,
0.0025234222412109375,
0.0232086181640625,
-0.07232666015625,
-0.05401611328125,
-0.04327392578125,
-0.00032329559326171875,
0.00937652587890625,
-0.01280975341796875,
0.007480621337890625,
-0.007030487060546875,
-0.028228759765625,
0.0193939208984375,
0.012420654296875,
0.01727294921875,
0.008392333984375,
-0.01204681396484375,
0.0021820068359375,
-0.00213623046875,
0.0009312629699707031,
-0.003971099853515625,
0.02679443359375,
0.01605224609375,
-0.007114410400390625,
0.0210113525390625,
0.0103759765625,
-0.01251983642578125,
-0.01143646240234375,
-0.004039764404296875,
-0.0109710693359375,
-0.035400390625,
0.0004773139953613281,
0.01248931884765625,
-0.01325225830078125,
-0.0251312255859375,
0.040313720703125,
-0.05645751953125,
-0.0192413330078125,
-0.00807952880859375,
0.0030612945556640625,
0.01187896728515625,
0.00699615478515625,
0.010162353515625,
0.012237548828125,
0.01227569580078125,
0.03076171875,
-0.0068817138671875,
-0.007694244384765625,
-0.0081024169921875,
-0.006366729736328125,
0.052398681640625,
0.0372314453125,
0.0128631591796875,
0.0088958740234375,
-0.049468994140625,
-0.01184844970703125,
-0.061187744140625,
0.06036376953125,
-0.0019483566284179688,
-0.055816650390625,
0.0261077880859375,
-0.0089569091796875,
-0.0096435546875,
0.0096282958984375,
0.00606536865234375,
-0.003322601318359375,
-0.0021209716796875,
0.01157379150390625,
-0.02471923828125,
-0.0140533447265625,
-0.0156402587890625,
-0.046234130859375,
-0.00514984130859375,
-0.01873779296875,
-0.06494140625,
0.06695556640625,
0.01503753662109375,
0.0262451171875,
-0.0024585723876953125,
0.020477294921875,
-0.0162506103515625,
0.005672454833984375,
-0.00550079345703125,
0.0748291015625,
0.0012025833129882812,
-0.0009908676147460938,
-0.03985595703125,
-0.01184844970703125,
0.004638671875,
0.020263671875,
-0.023590087890625,
0.00151824951171875,
-0.057342529296875,
-0.018310546875,
0.0014162063598632812,
0.0391845703125,
0.025238037109375,
0.0496826171875,
-0.00609588623046875,
0.0180816650390625,
-0.0157470703125,
-0.00992584228515625,
0.044189453125,
-0.09259033203125,
-0.03662109375,
0.0034694671630859375,
0.01148223876953125,
0.006740570068359375,
0.03778076171875,
0.0053253173828125,
-0.04736328125,
0.01849365234375,
0.034149169921875,
-0.037841796875,
0.03936767578125,
0.031890869140625,
0.029815673828125,
-0.0170135498046875,
-0.0252685546875,
-0.0067596435546875,
0.04266357421875,
-0.0090789794921875,
-0.0224761962890625,
0.02349853515625,
0.002544403076171875,
-0.01044464111328125,
0.034423828125,
-0.01190185546875,
0.0230255126953125,
0.027679443359375,
0.0160675048828125,
0.00481414794921875,
0.0084228515625,
-0.0345458984375,
0.00858306884765625,
0.0352783203125,
0.0248565673828125,
-0.026275634765625,
-0.046173095703125,
0.0159149169921875,
-0.003265380859375,
-0.01165008544921875,
-0.006244659423828125,
-0.0252227783203125,
-0.056854248046875,
-0.009521484375,
-0.009765625,
0.01486968994140625,
0.00843048095703125,
-0.00727081298828125,
-0.0019054412841796875,
0.01251220703125,
-0.01171112060546875,
0.051513671875,
-0.0540771484375,
-0.0240936279296875,
0.019195556640625,
0.0745849609375,
0.043548583984375,
0.033203125,
0.001049041748046875,
-0.04180908203125,
-0.02374267578125,
0.01467132568359375,
-0.00514984130859375,
0.0157928466796875,
-0.0318603515625,
-0.01415252685546875,
0.0096893310546875,
0.026123046875,
-0.0247802734375,
-0.022216796875,
-0.03765869140625,
0.01788330078125,
0.00994873046875,
-0.0155487060546875,
0.0305938720703125,
-0.0130615234375,
0.0265960693359375,
-0.04669189453125,
0.02777099609375,
0.033203125,
-0.0074005126953125,
-0.002010345458984375,
-0.0477294921875,
0.089111328125,
-0.0145721435546875,
0.056976318359375,
-0.0025539398193359375,
-0.006500244140625,
0.0021839141845703125,
-0.0188446044921875,
0.03265380859375,
0.0078887939453125,
-0.0655517578125,
-0.031341552734375,
-0.01222991943359375,
-0.01318359375,
0.0033893585205078125,
0.0277557373046875,
-0.00206756591796875,
0.0189361572265625,
0.041107177734375,
0.017578125,
-0.047698974609375,
-0.01381683349609375,
0.03643798828125,
-0.02886962890625,
0.0034465789794921875,
0.0275421142578125,
-0.0310211181640625,
-0.018280029296875,
-0.005039215087890625,
0.03826904296875,
-0.00257110595703125,
0.047760009765625,
-0.0159912109375,
0.0277099609375,
-0.00399017333984375,
-0.048858642578125,
0.037628173828125,
0.01537322998046875,
-0.048614501953125,
0.0113067626953125,
0.003025054931640625,
-0.01503753662109375,
0.0078582763671875,
0.05078125,
-0.005924224853515625,
0.01412200927734375,
0.003910064697265625,
-0.028778076171875,
0.02288818359375,
0.0540771484375,
-0.0114898681640625,
-0.034271240234375,
-0.0765380859375,
-0.0292205810546875,
0.0697021484375,
-0.028076171875,
0.007701873779296875,
-0.049560546875,
0.02685546875,
-0.025421142578125,
-0.0032291412353515625,
0.0165863037109375,
-0.021759033203125,
0.0267791748046875,
0.01458740234375,
-0.064453125,
-0.038177490234375,
-0.01751708984375,
-0.00432586669921875,
0.035736083984375,
-0.0269927978515625,
0.0706787109375,
0.0062713623046875,
0.0253143310546875,
0.0015316009521484375,
-0.0164642333984375,
-0.003253936767578125,
-0.060150146484375,
-0.0233001708984375,
0.0245513916015625,
0.007144927978515625,
0.0191802978515625,
0.032562255859375,
-0.01788330078125,
0.0012073516845703125,
-0.00736236572265625,
-0.01123046875,
0.0225677490234375,
-0.050048828125,
0.0078277587890625,
-0.0092010498046875,
0.01338958740234375,
0.02081298828125,
-0.0625,
0.028076171875,
0.0164337158203125,
0.03240966796875,
-0.01995849609375,
0.02838134765625,
-0.0277557373046875,
-0.0252838134765625,
-0.039093017578125,
-0.0272216796875,
-0.0362548828125,
0.050140380859375,
-0.02130126953125,
0.01102447509765625,
0.039154052734375,
-0.01476287841796875,
-0.0135345458984375,
0.0228118896484375,
0.01334381103515625,
0.070068359375,
-0.08221435546875,
-0.0150604248046875,
-0.026611328125,
0.01230621337890625,
-0.0428466796875,
-0.019561767578125,
0.05731201171875,
-0.060943603515625,
-0.0726318359375,
0.00867462158203125,
-0.030914306640625,
-0.01398468017578125,
-0.032623291015625,
0.004245758056640625,
-0.006450653076171875,
0.0419921875,
-0.020172119140625,
0.00841522216796875,
-0.002635955810546875,
-0.02447509765625,
0.011749267578125,
0.0047149658203125,
-0.0046539306640625,
0.01448822021484375,
0.0227203369140625,
-0.01061248779296875,
-0.01568603515625,
0.047210693359375,
-0.03759765625,
-0.052886962890625,
-0.034820556640625,
-0.023956298828125,
-0.0170440673828125,
0.0035266876220703125,
-0.01194000244140625,
0.0219573974609375,
0.045928955078125,
-0.024139404296875,
-0.047332763671875,
0.0178070068359375,
0.004611968994140625,
0.0117950439453125,
-0.004451751708984375,
-0.0196533203125,
-0.044281005859375,
0.028564453125,
-0.0037555694580078125,
0.0014219284057617188,
0.0048065185546875,
-0.03570556640625,
-0.006847381591796875,
-0.04217529296875,
-0.0328369140625,
0.044586181640625,
-0.09808349609375,
-0.0233612060546875,
-0.001270294189453125,
-0.006870269775390625,
0.01885986328125,
0.007015228271484375,
-0.0282745361328125,
0.01445770263671875,
0.031341552734375,
0.0170440673828125,
-0.0865478515625,
0.007793426513671875,
0.0970458984375,
-0.06378173828125,
-0.01361846923828125,
0.009063720703125,
0.0034275054931640625,
0.040863037109375,
-0.0335693359375,
-0.0125885009765625,
-0.073974609375,
0.0007157325744628906,
0.027496337890625,
-0.017425537109375,
0.0220947265625,
-0.00333404541015625,
-0.00977325439453125,
0.003108978271484375,
-0.004364013671875,
-0.01239776611328125,
-0.0021343231201171875,
0.006656646728515625,
0.01226043701171875,
-0.02374267578125,
0.021820068359375,
-0.079345703125,
0.0265960693359375,
-0.0225830078125,
-0.0185699462890625,
-0.01142120361328125,
0.054901123046875,
0.0699462890625,
-0.003513336181640625,
0.0225677490234375,
0.01342010498046875,
0.01018524169921875,
-0.0064239501953125,
0.0225982666015625,
-0.05670166015625,
0.004253387451171875,
0.01486968994140625
]
|
42ee37770721d6b9075f9698219b12832ddade8f | Wordpress Stackexchange
Q: Give Author users the right to embed I'm trying to allow "author" users to embed in posts. I (the administrator) can iframe, embed, etc...., but authors can not.
Can someone show me to give authors 'just' the ability to embed and iframe in posts?
A: The capability you are after is called unfiltered_html. Some options:
*
*Modify author capabilities in your theme functions.php. This is saved in the DB, so you can access a page, make sure it works then remove it from your functions.php file. A better option would be to run it on theme activation. See this page on WP Codex for options:
function add_theme_caps() {
// gets the author role
$role = get_role( 'author' );
// This only works, because it accesses the class instance.
// would allow the author to edit others' posts for current theme only
$role->add_cap( 'unfiltered_html' );
}
add_action( 'admin_init', 'add_theme_caps');
*Use a plugin that allows you to modify it using a UI, like User Role Editor.
| Q: Give Author users the right to embed I'm trying to allow "author" users to embed in posts. I (the administrator) can iframe, embed, etc...., but authors can not.
Can someone show me to give authors 'just' the ability to embed and iframe in posts?
A: The capability you are after is called unfiltered_html. Some options:
*
*Modify author capabilities in your theme functions.php. This is saved in the DB, so you can access a page, make sure it works then remove it from your functions.php file. A better option would be to run it on theme activation. See this page on WP Codex for options:
function add_theme_caps() {
// gets the author role
$role = get_role( 'author' );
// This only works, because it accesses the class instance.
// would allow the author to edit others' posts for current theme only
$role->add_cap( 'unfiltered_html' );
}
add_action( 'admin_init', 'add_theme_caps');
*Use a plugin that allows you to modify it using a UI, like User Role Editor.
A: This is a bad idea and you might as well just give those users "higher" roles as with the "unfiltered_html" permission it is not very hard to duplicate the admin authorization cookies and take control of the site.
What you should do is to teach them to use the built-in functionality of oEmbed, which should be enough to embed content from many sites in a simple way, by just putting the url of the content on a line of its own, but if that is not good enough, then you need to write shortcodes that will do the actual embed into the content.
| wordpress | {
"language": "en",
"length": 269,
"provenance": "stackexchange_00019.jsonl.gz:454482",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/183502"
} | [
0.07281494140625,
-0.007480621337890625,
0.004413604736328125,
-0.0220489501953125,
0.0289764404296875,
-0.037445068359375,
0.0400390625,
-0.019317626953125,
-0.030059814453125,
0.0182647705078125,
-0.020172119140625,
0.012725830078125,
-0.0243072509765625,
-0.0222930908203125,
-0.0012807846069335938,
-0.042205810546875,
0.01202392578125,
0.035308837890625,
0.04095458984375,
-0.018096923828125,
-0.004741668701171875,
-0.0186309814453125,
0.018463134765625,
0.0081787109375,
0.04156494140625,
-0.043426513671875,
0.059967041015625,
-0.039947509765625,
0.023345947265625,
-0.019500732421875,
0.025146484375,
-0.0146331787109375,
-0.0106201171875,
0.03680419921875,
-0.047698974609375,
0.004611968994140625,
-0.0421142578125,
0.047637939453125,
0.0131072998046875,
-0.01055908203125,
0.009552001953125,
0.008148193359375,
-0.006710052490234375,
0.04949951171875,
-0.0261383056640625,
-0.08782958984375,
0.06610107421875,
-0.00946044921875,
0.016143798828125,
-0.011871337890625,
0.0008721351623535156,
0.00720977783203125,
0.00887298583984375,
-0.030242919921875,
-0.00025534629821777344,
0.0088958740234375,
0.048248291015625,
-0.013397216796875,
0.037811279296875,
-0.0257568359375,
-0.049102783203125,
0.0175933837890625,
0.01470184326171875,
-0.017120361328125,
0.0244140625,
-0.0179595947265625,
0.051666259765625,
0.0198974609375,
-0.040374755859375,
0.02777099609375,
0.041961669921875,
-0.01042938232421875,
0.013092041015625,
-0.00455474853515625,
-0.02978515625,
0.0182037353515625,
-0.01288604736328125,
0.0007538795471191406,
0.04730224609375,
-0.038970947265625,
-0.004428863525390625,
0.02105712890625,
0.0128173828125,
-0.01131439208984375,
-0.00897216796875,
0.00469970703125,
-0.0226898193359375,
-0.0135040283203125,
-0.0161895751953125,
0.03472900390625,
-0.0251922607421875,
-0.01207733154296875,
-0.01427459716796875,
0.08251953125,
0.002582550048828125,
0.0277557373046875,
0.082275390625,
0.07928466796875,
0.00414276123046875,
0.01155853271484375,
0.0099029541015625,
-0.0643310546875,
0.03936767578125,
-0.05804443359375,
0.01849365234375,
0.0782470703125,
-0.006572723388671875,
0.004444122314453125,
0.022979736328125,
0.0086669921875,
0.0297088623046875,
-0.036773681640625,
0.002483367919921875,
-0.041412353515625,
-0.0146484375,
0.007358551025390625,
-0.0168304443359375,
0.0027637481689453125,
0.00695037841796875,
-0.004619598388671875,
-0.0003502368927001953,
0.00907135009765625,
0.01206207275390625,
-0.02227783203125,
-0.0007266998291015625,
-0.0045166015625,
-0.035736083984375,
-0.017578125,
-0.00859832763671875,
0.002239227294921875,
-0.022613525390625,
-0.007251739501953125,
0.0396728515625,
0.041778564453125,
0.02276611328125,
-0.018096923828125,
-0.0302581787109375,
-0.00008004903793334961,
-0.00611114501953125,
0.02056884765625,
-0.011993408203125,
-0.0484619140625,
0.019561767578125,
0.00383758544921875,
-0.032073974609375,
0.019805908203125,
0.00458526611328125,
0.017913818359375,
0.00807952880859375,
-0.045379638671875,
-0.00939178466796875,
-0.05596923828125,
0.0125885009765625,
-0.0219879150390625,
0.05023193359375,
-0.0589599609375,
0.041595458984375,
-0.046478271484375,
0.0223541259765625,
-0.018463134765625,
0.00771331787109375,
0.002864837646484375,
0.02752685546875,
0.0230255126953125,
0.0029010772705078125,
-0.004558563232421875,
-0.005893707275390625,
0.0088653564453125,
0.0233306884765625,
0.0037899017333984375,
-0.006633758544921875,
-0.034393310546875,
0.00751495361328125,
0.0140533447265625,
-0.01001739501953125,
0.03857421875,
0.01412200927734375,
0.048431396484375,
-0.0046844482421875,
0.039459228515625,
0.012969970703125,
-0.0234222412109375,
0.0819091796875,
-0.03680419921875,
-0.0304107666015625,
0.01412200927734375,
0.0251617431640625,
0.076171875,
-0.0003857612609863281,
0.028900146484375,
-0.0170440673828125,
0.01171875,
0.03802490234375,
-0.045318603515625,
0.00612640380859375,
-0.052398681640625,
-0.00807952880859375,
-0.0313720703125,
-0.0118865966796875,
0.054962158203125,
0.029144287109375,
-0.025604248046875,
0.042877197265625,
-0.032135009765625,
-0.00550079345703125,
0.0037403106689453125,
-0.0206756591796875,
0.024322509765625,
0.042938232421875,
0.00983428955078125,
-0.00272369384765625,
0.01264190673828125,
0.0012178421020507812,
-0.03900146484375,
-0.0279998779296875,
0.03912353515625,
0.013214111328125,
0.056243896484375,
0.024505615234375,
0.0255279541015625,
0.045562744140625,
-0.038726806640625,
0.037811279296875,
0.01145172119140625,
0.05340576171875,
-0.036407470703125,
0.01238250732421875,
-0.034759521484375,
0.044219970703125,
0.003864288330078125,
-0.02679443359375,
0.02362060546875,
0.038818359375,
0.009765625,
-0.0308837890625,
-0.0157318115234375,
-0.01387786865234375,
-0.0848388671875,
0.0165557861328125,
0.0782470703125,
0.0555419921875,
-0.00966644287109375,
0.016326904296875,
-0.007389068603515625,
0.0170440673828125,
-0.007671356201171875,
0.0458984375,
-0.03887939453125,
0.00921630859375,
0.040802001953125,
0.03271484375,
-0.0166168212890625,
0.005573272705078125,
-0.07440185546875,
-0.00431060791015625,
0.0257110595703125,
-0.0166473388671875,
0.02508544921875,
-0.0262451171875,
-0.0120391845703125,
-0.00388336181640625,
-0.045684814453125,
0.004451751708984375,
-0.04571533203125,
0.01971435546875,
-0.00881195068359375,
0.0181732177734375,
0.0020275115966796875,
-0.03662109375,
-0.0012941360473632812,
0.0234832763671875,
0.0172119140625,
-0.00868988037109375,
0.05194091796875,
0.0038318634033203125,
-0.0189208984375,
-0.032867431640625,
0.01348876953125,
-0.0220947265625,
0.0166778564453125,
0.0007691383361816406,
0.00835418701171875,
-0.00904083251953125,
-0.0022182464599609375,
0.007175445556640625,
-0.0085601806640625,
0.0071563720703125,
0.0023345947265625,
0.011444091796875,
-0.02069091796875,
-0.018524169921875,
0.031036376953125,
-0.01476287841796875,
0.06597900390625,
0.0135040283203125,
-0.0123748779296875,
-0.0521240234375,
-0.11041259765625,
0.070556640625,
-0.052459716796875,
0.039703369140625,
0.0897216796875,
0.0275726318359375,
0.00039696693420410156,
0.00960540771484375,
-0.027679443359375,
0.006259918212890625,
0.06390380859375,
0.025909423828125,
-0.05023193359375,
0.036224365234375,
0.040191650390625,
0.01580810546875,
0.0093994140625,
-0.000698089599609375,
-0.02337646484375,
-0.0118560791015625,
0.01509857177734375,
-0.0301055908203125,
-0.0198211669921875,
0.05889892578125,
-0.07720947265625,
-0.04827880859375,
0.029327392578125,
-0.0657958984375,
-0.006298065185546875,
0.074951171875,
-0.018463134765625,
-0.01003265380859375,
-0.0305328369140625,
-0.039093017578125,
-0.0057220458984375,
-0.02130126953125,
0.029937744140625,
-0.0091400146484375,
-0.01739501953125,
-0.01062774658203125,
0.031646728515625,
0.002742767333984375,
-0.043914794921875,
-0.02154541015625,
-0.0017547607421875,
-0.026031494140625,
-0.0294189453125,
0.0209197998046875,
-0.00681304931640625,
-0.0000546574592590332,
0.00943756103515625,
-0.0482177734375,
0.0107574462890625,
-0.0152587890625,
-0.0283050537109375,
-0.029815673828125,
0.030364990234375,
0.00738525390625,
0.03619384765625,
0.0248565673828125,
0.0104522705078125,
0.029876708984375,
-0.006275177001953125,
-0.0014505386352539062,
-0.01374053955078125,
-0.0309906005859375,
-0.0228118896484375,
-0.0062408447265625,
0.007472991943359375,
-0.02850341796875,
0.01042938232421875,
0.025115966796875,
0.02783203125,
0.016754150390625,
0.0044097900390625,
0.0028476715087890625,
0.006744384765625,
0.01558685302734375,
-0.01265716552734375,
-0.0219268798828125,
-0.03216552734375,
0.040618896484375,
-0.016845703125,
0.0152587890625,
-0.0408935546875,
0.04779052734375,
-0.057647705078125,
-0.039337158203125,
0.051483154296875,
-0.0293731689453125,
0.0007529258728027344,
-0.0218353271484375,
-0.0236053466796875,
-0.01236724853515625,
0.07391357421875,
0.0102691650390625,
-0.00304412841796875,
0.054473876953125,
0.0226898193359375,
-0.052490234375,
0.0088043212890625,
-0.08660888671875,
0.0024967193603515625,
0.0255584716796875,
-0.0265045166015625,
-0.049346923828125,
0.0039520263671875,
-0.0201416015625,
0.0241851806640625,
0.027435302734375,
-0.00800323486328125,
0.0256195068359375,
-0.0003662109375,
-0.00858306884765625,
0.03765869140625,
-0.0204925537109375,
0.015960693359375,
-0.0198974609375,
-0.0176849365234375,
-0.11065673828125,
-0.0206146240234375,
-0.0099639892578125,
0.0771484375,
-0.01151275634765625,
0.0167236328125,
-0.029022216796875,
0.0523681640625,
0.004974365234375,
0.0013284683227539062,
-0.004825592041015625,
0.004344940185546875,
0.01454925537109375,
-0.0560302734375,
-0.03021240234375,
-0.0276641845703125,
0.0147247314453125,
0.00063323974609375,
-0.0233001708984375,
0.004039764404296875,
-0.046142578125,
-0.035125732421875,
-0.002849578857421875,
-0.044097900390625,
-0.06597900390625,
-0.050079345703125,
0.001068115234375,
0.01165771484375,
0.007251739501953125,
-0.013214111328125,
-0.0511474609375,
-0.0635986328125,
0.05096435546875,
0.0126953125,
-0.0037841796875,
-0.0177154541015625,
0.103515625,
0.0241851806640625,
-0.0274658203125,
0.0246429443359375,
0.002368927001953125,
0.03839111328125,
-0.0175323486328125,
0.021392822265625,
0.04736328125,
-0.02264404296875,
0.018096923828125,
0.007598876953125,
0.0118408203125,
-0.0305328369140625,
0.04901123046875,
0.0080718994140625,
0.0108795166015625,
0.00641632080078125,
0.017120361328125,
0.0135650634765625,
-0.030609130859375,
-0.01313018798828125,
0.03533935546875,
0.005096435546875,
0.0205535888671875,
-0.01033782958984375,
0.0159454345703125,
-0.0159149169921875,
0.0193023681640625,
-0.00391387939453125,
-0.01116180419921875,
0.0287628173828125,
0.020416259765625,
0.006683349609375,
-0.029266357421875,
0.004169464111328125,
-0.006252288818359375,
-0.0206756591796875,
-0.03436279296875,
-0.0206298828125,
0.0287017822265625,
-0.039031982421875,
-0.01520538330078125,
0.0197906494140625,
0.0004954338073730469,
0.0295257568359375,
0.015899658203125,
-0.039581298828125,
-0.01010894775390625,
0.004150390625,
0.036865234375,
0.00562286376953125,
-0.0200042724609375,
-0.01361083984375,
0.0248260498046875,
0.00560760498046875,
0.0277862548828125,
0.0302886962890625,
0.0269775390625,
0.0082855224609375,
0.00460052490234375,
-0.02459716796875,
0.00762939453125,
0.0274200439453125,
0.04510498046875,
-0.0019664764404296875,
0.033843994140625,
-0.039337158203125,
0.0772705078125,
0.054412841796875,
0.0134124755859375,
0.0015840530395507812,
0.01540374755859375,
-0.0029850006103515625,
-0.008453369140625,
-0.03570556640625,
-0.00982666015625,
0.0245513916015625,
-0.0040283203125,
0.0264129638671875,
0.0245208740234375,
-0.005657196044921875,
0.01123809814453125,
-0.06158447265625,
-0.029876708984375,
0.030975341796875,
0.0185394287109375,
-0.0293121337890625,
-0.029052734375,
-0.0013217926025390625,
0.01064300537109375,
0.0055389404296875,
-0.0155487060546875,
-0.0172882080078125,
-0.032135009765625,
-0.0147247314453125,
-0.00004678964614868164,
-0.03173828125,
0.00794219970703125,
0.00481414794921875,
-0.026458740234375,
-0.0233154296875,
0.01227569580078125,
-0.0221710205078125,
0.0024776458740234375,
-0.040496826171875,
-0.0151519775390625,
0.0523681640625,
-0.0218353271484375,
0.020843505859375,
-0.048675537109375,
0.0184783935546875,
-0.010467529296875,
-0.005817413330078125,
0.06854248046875,
0.046234130859375,
-0.0765380859375,
-0.01100921630859375,
-0.031494140625,
-0.01015472412109375,
-0.053985595703125,
-0.0272064208984375,
-0.054229736328125,
0.0201568603515625,
0.01085662841796875,
0.032318115234375,
-0.032318115234375,
-0.05126953125,
-0.019866943359375,
0.0225830078125,
0.032257080078125,
0.071533203125,
-0.027435302734375,
0.049560546875,
0.032470703125,
0.0565185546875,
0.0187835693359375,
0.0372314453125,
0.0026416778564453125,
-0.043212890625,
-0.0212249755859375,
-0.0325927734375,
0.0085601806640625,
0.00794219970703125,
0.009857177734375,
0.02490234375,
0.0389404296875,
0.01543426513671875,
0.037109375,
-0.021881103515625,
-0.01276397705078125,
-0.0075836181640625,
-0.005565643310546875,
-0.0079803466796875,
0.0264129638671875,
0.0069122314453125,
-0.0082550048828125,
0.052001953125,
0.0012960433959960938,
-0.004016876220703125,
0.0182037353515625,
-0.035186767578125,
0.026947021484375,
0.021759033203125,
-0.045684814453125,
0.0302734375,
0.053985595703125,
0.03271484375,
0.052886962890625,
0.01953125,
0.036956787109375,
-0.004817962646484375,
-0.00830841064453125,
-0.01479339599609375,
-0.008087158203125,
-0.004062652587890625,
-0.0141448974609375,
0.010894775390625,
-0.007129669189453125,
-0.01371002197265625,
0.004833221435546875,
0.0281219482421875,
0.03314208984375,
-0.0545654296875,
0.00691986083984375,
-0.0093994140625,
-0.01079559326171875,
0.0338134765625,
-0.012451171875,
0.0035305023193359375,
-0.0240020751953125,
0.1229248046875,
-0.0220794677734375,
0.0264739990234375,
0.052459716796875,
-0.0433349609375,
-0.014801025390625,
-0.0386962890625,
0.036468505859375,
0.033477783203125,
-0.033111572265625,
0.06207275390625,
0.01523590087890625,
0.0241851806640625,
0.004150390625,
0.0107879638671875,
0.0023250579833984375,
-0.001129150390625,
0.014495849609375,
0.046234130859375,
-0.036712646484375,
0.01751708984375,
0.037841796875,
0.00860595703125,
0.054443359375,
0.040771484375,
0.0140380859375,
-0.0072479248046875,
0.03167724609375,
-0.026214599609375,
-0.01465606689453125,
-0.03826904296875,
0.01280975341796875,
0.05322265625,
-0.036529541015625,
0.0355224609375,
0.01324462890625,
-0.036865234375,
-0.00928497314453125,
-0.05328369140625,
0.048919677734375,
0.019378662109375,
-0.033538818359375,
0.0117645263671875,
-0.00560760498046875,
-0.019561767578125,
0.005199432373046875,
-0.00799560546875,
-0.08740234375,
-0.019073486328125,
0.0068206787109375,
0.0014324188232421875,
0.021728515625,
0.046661376953125,
-0.06707763671875,
0.0723876953125,
0.0291748046875,
0.01444244384765625,
-0.019439697265625,
0.026824951171875,
-0.02960205078125,
-0.0033855438232421875,
-0.0259857177734375,
0.046142578125,
0.0178375244140625,
0.0280303955078125,
-0.039825439453125,
-0.01551055908203125,
0.0026493072509765625,
0.049163818359375,
0.04833984375,
0.00876617431640625,
-0.01177215576171875,
-0.0219573974609375,
0.05126953125,
0.0196685791015625,
-0.0140380859375,
0.0302734375,
-0.0001150965690612793,
0.01509857177734375,
-0.00917816162109375,
0.0035228729248046875,
0.0416259765625,
-0.036346435546875,
-0.0594482421875,
0.023895263671875,
0.008331298828125,
-0.0007462501525878906,
-0.0168914794921875,
-0.04376220703125,
-0.048492431640625,
-0.00937652587890625,
0.0182952880859375,
-0.00031757354736328125,
-0.025970458984375,
0.04815673828125,
0.04620361328125,
-0.0216064453125,
-0.00569915771484375,
-0.0276336669921875,
0.063232421875,
0.032135009765625,
-0.0161895751953125,
0.01116180419921875,
0.0040435791015625,
-0.030426025390625,
0.0218353271484375,
-0.0011920928955078125,
0.039825439453125,
-0.005268096923828125,
0.04034423828125,
0.0175323486328125,
0.0310516357421875,
-0.03662109375,
0.0017681121826171875,
0.054473876953125,
0.06341552734375,
-0.01629638671875,
-0.046356201171875,
-0.01038360595703125,
0.0023479461669921875,
0.0222930908203125,
0.004413604736328125,
0.004764556884765625,
-0.003704071044921875,
0.0225677490234375,
-0.0709228515625,
0.004573822021484375,
0.0213165283203125,
0.00896453857421875,
-0.00858306884765625,
-0.0071258544921875,
-0.003940582275390625,
0.01540374755859375,
-0.0286865234375,
-0.03118896484375,
-0.004352569580078125,
0.0255584716796875,
0.06842041015625,
-0.0150909423828125,
0.04595947265625,
-0.0112457275390625,
-0.0166473388671875,
0.055816650390625,
0.030792236328125,
-0.001804351806640625,
-0.02520751953125,
-0.0308380126953125,
0.02423095703125,
0.01056671142578125,
0.01259613037109375,
-0.0175323486328125,
-0.020965576171875,
-0.003265380859375,
-0.001102447509765625,
0.0029163360595703125,
0.0323486328125,
-0.0102386474609375,
0.0252532958984375,
-0.06890869140625,
0.037567138671875,
-0.0055694580078125,
-0.0106964111328125,
0.014678955078125,
-0.005825042724609375,
0.037750244140625,
-0.007427215576171875,
0.0030651092529296875,
-0.0022792816162109375,
-0.0241546630859375,
-0.02001953125,
-0.01006317138671875,
-0.0212249755859375,
0.0105438232421875,
-0.037811279296875,
0.044097900390625,
-0.06011962890625,
-0.098388671875,
-0.0061187744140625,
0.02764892578125,
-0.03857421875,
0.01971435546875,
0.0188751220703125,
0.0017480850219726562,
-0.0035419464111328125,
-0.0097808837890625,
0.00936126708984375,
0.00399017333984375,
0.0223236083984375,
0.000522613525390625,
-0.0210113525390625,
-0.035186767578125,
-0.00557708740234375,
0.0595703125,
-0.0005993843078613281,
0.0136260986328125,
-0.0023193359375,
0.0276947021484375,
-0.0298614501953125,
0.0001875162124633789,
-0.04913330078125,
-0.0268707275390625,
0.0301055908203125,
-0.0255584716796875,
-0.0301513671875,
0.0085296630859375,
-0.05853271484375,
0.05364990234375,
0.0081787109375,
-0.0033168792724609375,
0.049774169921875,
0.018157958984375,
0.008941650390625,
-0.0269317626953125,
0.03863525390625,
-0.0190277099609375,
-0.031524658203125,
-0.0230865478515625,
0.006229400634765625,
0.0095367431640625,
0.0010080337524414062,
-0.0263214111328125,
0.04217529296875,
-0.01485443115234375,
-0.0182647705078125,
-0.015777587890625,
-0.019317626953125,
-0.05352783203125,
0.00525665283203125,
0.0255889892578125,
-0.05328369140625,
0.05230712890625,
0.007747650146484375,
0.008392333984375,
0.018096923828125,
0.040252685546875,
0.056915283203125,
-0.061279296875,
0.007061004638671875,
0.0231781005859375,
0.04083251953125,
0.015777587890625,
0.0186614990234375,
0.002719879150390625,
-0.0222625732421875,
-0.0184173583984375,
-0.01146697998046875,
-0.033416748046875,
-0.01519775390625,
0.00904083251953125,
0.0178375244140625,
0.01335906982421875,
-0.07086181640625,
-0.077880859375,
0.0027523040771484375,
0.050689697265625,
0.012176513671875,
-0.0792236328125,
0.0438232421875,
-0.0307464599609375,
0.06109619140625,
-0.01325225830078125,
-0.01611328125,
0.022247314453125,
0.048492431640625,
-0.045684814453125,
0.0013666152954101562,
-0.0179901123046875,
-0.034637451171875,
-0.036956787109375,
0.020477294921875,
0.029815673828125,
0.0003933906555175781,
0.0087738037109375,
0.052520751953125,
-0.0035190582275390625,
0.10125732421875,
-0.0670166015625,
-0.01346588134765625,
-0.005859375,
0.0095367431640625,
-0.0180206298828125,
-0.064453125,
0.0137481689453125,
-0.06805419921875,
-0.017822265625,
-0.0158233642578125,
-0.0066986083984375,
-0.0017328262329101562,
-0.028228759765625,
-0.025604248046875,
0.026947021484375,
0.0168609619140625,
-0.0311126708984375,
-0.0154266357421875,
0.0021991729736328125,
-0.015869140625,
0.026275634765625,
0.0035190582275390625,
-0.0222930908203125,
-0.0224761962890625,
0.0175323486328125,
-0.0195465087890625,
-0.0343017578125,
0.00594329833984375,
-0.03973388671875,
-0.057464599609375,
-0.0091094970703125,
0.02252197265625,
-0.0474853515625,
0.0081939697265625,
-0.00814056396484375,
0.021148681640625,
0.037078857421875,
-0.01497650146484375,
-0.0487060546875,
0.0009503364562988281,
-0.0128936767578125,
-0.0277862548828125,
-0.07330322265625,
0.0247650146484375,
-0.011566162109375,
0.0538330078125,
0.00489044189453125,
0.0094757080078125,
-0.033721923828125,
0.0095062255859375,
-0.01517486572265625,
-0.03729248046875,
-0.004848480224609375,
-0.0008077621459960938,
-0.037139892578125,
-0.00720977783203125,
-0.016143798828125,
-0.0225372314453125,
0.01149749755859375,
-0.0131378173828125,
-0.034515380859375,
0.0015420913696289062,
-0.010040283203125,
-0.01181793212890625,
-0.01430511474609375,
-0.0117950439453125,
0.033477783203125,
-0.04827880859375,
-0.0367431640625,
0.0168304443359375,
0.006031036376953125,
-0.0266265869140625,
-0.0245513916015625,
-0.01265716552734375,
-0.0095977783203125,
-0.032989501953125,
0.036956787109375,
-0.0159149169921875,
0.048370361328125,
-0.039520263671875,
-0.0102691650390625,
0.00279998779296875,
0.0396728515625,
-0.006988525390625,
0.043060302734375,
0.00838470458984375,
0.044097900390625,
0.0007901191711425781,
0.0240478515625,
-0.0498046875,
0.0467529296875,
-0.0012254714965820312,
0.00539398193359375,
-0.0186614990234375,
0.0396728515625,
0.032958984375,
0.0024013519287109375,
0.019256591796875,
0.023895263671875,
0.02813720703125,
0.01580810546875,
-0.0017337799072265625,
0.01143646240234375,
-0.0016002655029296875,
-0.00841522216796875
]
|
53a601fa9657e2ee34951b8362f2e4fad4cdc599 | Wordpress Stackexchange
Q: Display custom post type with shortcode I have made a custom post type for my WordPress Theme and a page where the custom post types are displayed.
But does anyone know how to make a shortcode that displays posts of a custom post type?
A: I think, basically your question is, how to query posts of a custom post type in a shortcode. You should have a look into the WP_Query section of WordPress:
https://codex.wordpress.org/Class_Reference/WP_Query
In my example code I create a shortcode, which shows the title of the latest published posts of the type 'my-custom-post-type':
<?php
add_shortcode( 'shortcodename', 'display_custom_post_type' );
function display_custom_post_type(){
$args = array(
'post_type' => 'my-custom-post-type',
'post_status' => 'publish'
);
$string = '';
$query = new WP_Query( $args );
if( $query->have_posts() ){
$string .= '<ul>';
while( $query->have_posts() ){
$query->the_post();
$string .= '<li>' . get_the_title() . '</li>';
}
$string .= '</ul>';
}
wp_reset_postdata();
return $string;
}
?>
Since a shortcode is executed in the loop, you should use wp_reset_postdata() after you are done with your query, so the Main Loop works again like expected. More information for this function will be found here: https://codex.wordpress.org/Function_Reference/wp_reset_postdata
I hope, this gives you a headstart.
| Q: Display custom post type with shortcode I have made a custom post type for my WordPress Theme and a page where the custom post types are displayed.
But does anyone know how to make a shortcode that displays posts of a custom post type?
A: I think, basically your question is, how to query posts of a custom post type in a shortcode. You should have a look into the WP_Query section of WordPress:
https://codex.wordpress.org/Class_Reference/WP_Query
In my example code I create a shortcode, which shows the title of the latest published posts of the type 'my-custom-post-type':
<?php
add_shortcode( 'shortcodename', 'display_custom_post_type' );
function display_custom_post_type(){
$args = array(
'post_type' => 'my-custom-post-type',
'post_status' => 'publish'
);
$string = '';
$query = new WP_Query( $args );
if( $query->have_posts() ){
$string .= '<ul>';
while( $query->have_posts() ){
$query->the_post();
$string .= '<li>' . get_the_title() . '</li>';
}
$string .= '</ul>';
}
wp_reset_postdata();
return $string;
}
?>
Since a shortcode is executed in the loop, you should use wp_reset_postdata() after you are done with your query, so the Main Loop works again like expected. More information for this function will be found here: https://codex.wordpress.org/Function_Reference/wp_reset_postdata
I hope, this gives you a headstart.
| wordpress | {
"language": "en",
"length": 194,
"provenance": "stackexchange_00019.jsonl.gz:454495",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/183538"
} | [
0.034149169921875,
0.00530242919921875,
-0.0232696533203125,
-0.013397216796875,
0.024139404296875,
-0.034637451171875,
0.0299224853515625,
-0.01947021484375,
-0.010009765625,
0.003803253173828125,
-0.00876617431640625,
-0.033966064453125,
-0.049591064453125,
-0.0479736328125,
-0.00531768798828125,
-0.058990478515625,
0.0506591796875,
-0.006145477294921875,
0.045196533203125,
-0.011627197265625,
0.0161285400390625,
0.01947021484375,
0.039398193359375,
0.05108642578125,
-0.01335906982421875,
-0.0035858154296875,
0.10174560546875,
-0.0289459228515625,
-0.01861572265625,
-0.023468017578125,
0.011962890625,
-0.00016677379608154297,
0.04241943359375,
0.0240325927734375,
-0.043548583984375,
0.07403564453125,
0.022857666015625,
-0.0121612548828125,
-0.01274871826171875,
0.05072021484375,
0.00946044921875,
-0.0006422996520996094,
0.045806884765625,
-0.019317626953125,
0.004940032958984375,
-0.01308441162109375,
0.0200347900390625,
-0.0237274169921875,
-0.0003638267517089844,
0.007740020751953125,
0.026092529296875,
-0.0081634521484375,
0.03485107421875,
-0.0269927978515625,
-0.0279693603515625,
-0.00923919677734375,
0.00971221923828125,
-0.054351806640625,
0.04296875,
-0.006591796875,
-0.02978515625,
-0.041412353515625,
0.04327392578125,
-0.029510498046875,
0.00641632080078125,
0.00887298583984375,
0.06304931640625,
0.0082550048828125,
-0.018157958984375,
0.01068115234375,
0.024627685546875,
-0.01351165771484375,
-0.0204315185546875,
0.00572967529296875,
-0.00934600830078125,
-0.00839996337890625,
-0.004421234130859375,
-0.03936767578125,
0.01030731201171875,
0.0323486328125,
0.0249176025390625,
-0.0227508544921875,
-0.04827880859375,
0.0130157470703125,
-0.0061798095703125,
0.00940704345703125,
0.0002446174621582031,
-0.007137298583984375,
-0.0015459060668945312,
-0.002559661865234375,
-0.00891876220703125,
-0.01126861572265625,
0.02349853515625,
0.01351165771484375,
-0.0189971923828125,
-0.0221099853515625,
-0.0069427490234375,
0.042816162109375,
-0.0219268798828125,
0.0291290283203125,
0.0078277587890625,
-0.0279541015625,
0.042633056640625,
-0.052703857421875,
0.0271453857421875,
0.01013946533203125,
-0.031005859375,
-0.029693603515625,
0.05035400390625,
0.046173095703125,
0.006107330322265625,
0.0210418701171875,
-0.054595947265625,
-0.01959228515625,
-0.045074462890625,
0.04217529296875,
-0.05078125,
-0.02349853515625,
-0.01172637939453125,
0.0120086669921875,
0.0230255126953125,
0.04083251953125,
0.021942138671875,
-0.03155517578125,
0.006069183349609375,
0.0120697021484375,
-0.021453857421875,
-0.05035400390625,
0.029022216796875,
0.0187225341796875,
-0.03802490234375,
0.00717926025390625,
0.06048583984375,
0.019073486328125,
0.0110321044921875,
-0.016387939453125,
0.00733184814453125,
-0.01412200927734375,
-0.0084228515625,
0.0185394287109375,
-0.00319671630859375,
-0.0284881591796875,
0.007415771484375,
-0.0109100341796875,
-0.0079803466796875,
0.0255126953125,
-0.00021922588348388672,
0.012298583984375,
0.0134429931640625,
-0.057159423828125,
0.01358795166015625,
-0.0283355712890625,
0.02215576171875,
0.01354217529296875,
-0.01422882080078125,
-0.0026264190673828125,
0.03985595703125,
-0.027496337890625,
-0.00897979736328125,
-0.04119873046875,
0.028076171875,
-0.0220947265625,
-0.0145263671875,
-0.03411865234375,
-0.05517578125,
0.03106689453125,
-0.05389404296875,
-0.0012769699096679688,
0.00873565673828125,
0.00762176513671875,
0.0189361572265625,
0.004215240478515625,
-0.0095672607421875,
0.0025615692138671875,
0.0008225440979003906,
-0.0162200927734375,
-0.0290069580078125,
-0.023895263671875,
0.048828125,
-0.0238800048828125,
-0.02984619140625,
-0.03143310546875,
0.0217132568359375,
0.01239013671875,
-0.0660400390625,
0.04315185546875,
0.02850341796875,
0.093505859375,
-0.00518035888671875,
0.031341552734375,
0.0562744140625,
0.00514984130859375,
-0.056243896484375,
0.033203125,
0.0302581787109375,
-0.00128936767578125,
-0.07281494140625,
-0.046234130859375,
-0.006473541259765625,
0.0177154541015625,
-0.05914306640625,
0.01165008544921875,
-0.0239715576171875,
0.011810302734375,
-0.06646728515625,
0.0241851806640625,
-0.032257080078125,
0.06121826171875,
0.0197601318359375,
-0.01904296875,
0.02825927734375,
0.00926971435546875,
-0.052764892578125,
0.01363372802734375,
-0.0567626953125,
0.0233154296875,
-0.01403045654296875,
0.021392822265625,
-0.022186279296875,
0.00954437255859375,
-0.0284576416015625,
-0.039154052734375,
-0.02960205078125,
0.02655029296875,
0.06573486328125,
-0.0224609375,
0.0017747879028320312,
-0.03387451171875,
0.040283203125,
0.01971435546875,
-0.0655517578125,
0.013458251953125,
-0.01491546630859375,
-0.01450347900390625,
-0.045440673828125,
-0.003459930419921875,
-0.0125732421875,
-0.019775390625,
0.01293182373046875,
0.048187255859375,
0.04278564453125,
0.0267791748046875,
-0.003574371337890625,
-0.0155029296875,
0.049407958984375,
0.0165252685546875,
0.03948974609375,
-0.047607421875,
0.032623291015625,
0.0616455078125,
-0.01050567626953125,
-0.0179443359375,
0.01509857177734375,
0.0023899078369140625,
0.0173797607421875,
0.01245880126953125,
0.007648468017578125,
0.0286102294921875,
-0.00927734375,
0.006725311279296875,
-0.00792694091796875,
-0.007503509521484375,
-0.00400543212890625,
-0.0133056640625,
0.051910400390625,
0.01497650146484375,
0.053436279296875,
0.03656005859375,
-0.04595947265625,
0.023773193359375,
-0.0015506744384765625,
-0.0019359588623046875,
0.001132965087890625,
0.01444244384765625,
0.0099029541015625,
-0.00405120849609375,
-0.03460693359375,
-0.003185272216796875,
0.020660400390625,
0.007381439208984375,
0.0025482177734375,
0.034912109375,
-0.05938720703125,
-0.0117034912109375,
0.006481170654296875,
-0.04461669921875,
-0.035400390625,
0.0179595947265625,
0.023162841796875,
0.00664520263671875,
0.0013904571533203125,
0.059051513671875,
-0.0245208740234375,
0.07183837890625,
0.04193115234375,
-0.0021305084228515625,
0.034820556640625,
-0.07208251953125,
0.058074951171875,
-0.06683349609375,
0.020843505859375,
0.0635986328125,
-0.0222320556640625,
0.0157470703125,
0.00994873046875,
0.009307861328125,
-0.0163421630859375,
0.04779052734375,
0.016510009765625,
-0.033111572265625,
-0.01995849609375,
0.024169921875,
0.030792236328125,
0.055877685546875,
0.030914306640625,
-0.030487060546875,
0.029144287109375,
0.061004638671875,
-0.03424072265625,
-0.0611572265625,
0.036712646484375,
-0.029632568359375,
0.00757598876953125,
-0.0257568359375,
-0.01505279541015625,
-0.01617431640625,
-0.0164947509765625,
0.00034046173095703125,
0.00508880615234375,
-0.0251617431640625,
-0.021820068359375,
-0.0487060546875,
-0.045013427734375,
-0.03985595703125,
0.006137847900390625,
-0.0044403076171875,
0.007656097412109375,
0.07177734375,
0.03497314453125,
-0.029022216796875,
0.0216827392578125,
0.052947998046875,
-0.05419921875,
-0.01378631591796875,
0.01419830322265625,
-0.0141448974609375,
0.0060882568359375,
0.01097869873046875,
-0.018798828125,
0.0197601318359375,
0.00005704164505004883,
-0.028656005859375,
-0.005664825439453125,
0.0036468505859375,
0.030792236328125,
-0.00936126708984375,
-0.01003265380859375,
0.033233642578125,
0.03564453125,
-0.01519012451171875,
-0.0295562744140625,
0.033050537109375,
-0.0299835205078125,
-0.0323486328125,
-0.0171661376953125,
-0.01311492919921875,
-0.0283966064453125,
0.031982421875,
0.0005478858947753906,
-0.0005269050598144531,
0.04254150390625,
-0.045989990234375,
0.0458984375,
0.01983642578125,
0.0239410400390625,
-0.032073974609375,
0.015380859375,
-0.01549530029296875,
0.01369476318359375,
0.0111846923828125,
0.0283966064453125,
0.007205963134765625,
-0.00922393798828125,
-0.0255584716796875,
-0.07269287109375,
0.045806884765625,
-0.037994384765625,
0.0218658447265625,
-0.04443359375,
-0.036956787109375,
-0.0027294158935546875,
0.10345458984375,
-0.031951904296875,
0.0219573974609375,
-0.00960540771484375,
-0.02764892578125,
-0.01227569580078125,
-0.0173187255859375,
-0.11163330078125,
0.0178070068359375,
-0.09002685546875,
0.04266357421875,
0.0205841064453125,
-0.0145263671875,
-0.020355224609375,
0.02410888671875,
-0.06549072265625,
-0.023162841796875,
0.031341552734375,
-0.032928466796875,
0.042388916015625,
-0.0262451171875,
0.004573822021484375,
-0.020355224609375,
-0.035369873046875,
-0.03369140625,
-0.039794921875,
-0.019256591796875,
0.02508544921875,
0.0295257568359375,
0.0252227783203125,
-0.07354736328125,
-0.00012445449829101562,
0.03485107421875,
0.04119873046875,
0.039520263671875,
0.0031604766845703125,
-0.02655029296875,
-0.003360748291015625,
0.0038738250732421875,
0.01110076904296875,
-0.0187530517578125,
0.0020236968994140625,
0.0166168212890625,
0.012451171875,
0.0284271240234375,
-0.040924072265625,
-0.02886962890625,
-0.004604339599609375,
-0.031585693359375,
-0.015655517578125,
-0.023681640625,
-0.0170135498046875,
0.019989013671875,
-0.00469207763671875,
-0.008453369140625,
-0.016754150390625,
-0.0270843505859375,
0.03289794921875,
0.030487060546875,
-0.00565338134765625,
0.0031566619873046875,
0.034820556640625,
0.004886627197265625,
-0.04449462890625,
-0.0390625,
-0.0019273757934570312,
0.047210693359375,
0.0033283233642578125,
0.019775390625,
0.01226806640625,
-0.0396728515625,
0.060791015625,
0.0101470947265625,
-0.0217437744140625,
0.008331298828125,
0.03948974609375,
0.0288543701171875,
0.0321044921875,
-0.030487060546875,
0.01413726806640625,
0.003597259521484375,
0.022003173828125,
0.015838623046875,
-0.0287933349609375,
0.0279083251953125,
0.031341552734375,
-0.021331787109375,
0.0163116455078125,
-0.0020008087158203125,
-0.028778076171875,
0.00707244873046875,
0.03936767578125,
0.01406097412109375,
0.021881103515625,
-0.0029125213623046875,
-0.0069732666015625,
-0.01277923583984375,
0.01285552978515625,
0.028533935546875,
0.0289764404296875,
0.0015926361083984375,
0.049896240234375,
0.00485992431640625,
0.007167816162109375,
0.0010175704956054688,
0.005680084228515625,
0.01971435546875,
0.001415252685546875,
-0.0419921875,
-0.01038360595703125,
-0.00848388671875,
0.002338409423828125,
-0.020843505859375,
0.03546142578125,
0.0513916015625,
0.050048828125,
0.01543426513671875,
-0.0014715194702148438,
-0.01251220703125,
0.061798095703125,
-0.02557373046875,
0.0035419464111328125,
-0.0034637451171875,
-0.0081787109375,
-0.0218505859375,
0.055267333984375,
-0.03851318359375,
0.0297393798828125,
0.00437164306640625,
0.053802490234375,
0.0455322265625,
0.017303466796875,
0.0107574462890625,
0.020751953125,
-0.0134429931640625,
0.005901336669921875,
-0.01641845703125,
-0.03814697265625,
-0.0217437744140625,
-0.0088043212890625,
0.0474853515625,
-0.01416778564453125,
-0.0193634033203125,
0.0374755859375,
-0.0117645263671875,
-0.015869140625,
0.033721923828125,
0.0306854248046875,
-0.01407623291015625,
-0.04266357421875,
-0.0023555755615234375,
0.053436279296875,
0.01428985595703125,
-0.00812530517578125,
0.0198211669921875,
-0.023223876953125,
0.024566650390625,
-0.027008056640625,
-0.003849029541015625,
0.006496429443359375,
0.0021610260009765625,
-0.004245758056640625,
-0.03619384765625,
-0.0247955322265625,
0.006267547607421875,
0.00646209716796875,
0.004726409912109375,
-0.00806427001953125,
-0.012420654296875,
-0.0310211181640625,
0.0433349609375,
-0.061065673828125,
0.00557708740234375,
-0.0350341796875,
-0.00879669189453125,
0.06475830078125,
0.049468994140625,
-0.049102783203125,
-0.00469207763671875,
-0.0128173828125,
-0.0013370513916015625,
0.00998687744140625,
-0.04803466796875,
-0.038116455078125,
-0.029571533203125,
-0.00033664703369140625,
0.0307464599609375,
-0.0263824462890625,
-0.030914306640625,
-0.0188140869140625,
0.00746917724609375,
0.006336212158203125,
0.06292724609375,
0.0074310302734375,
0.034515380859375,
-0.01617431640625,
0.07537841796875,
0.0123748779296875,
-0.007221221923828125,
-0.01345062255859375,
-0.042938232421875,
0.0147705078125,
-0.030181884765625,
-0.044677734375,
-0.0233154296875,
-0.0228424072265625,
0.0178680419921875,
0.03729248046875,
-0.0137939453125,
0.02056884765625,
0.0006365776062011719,
-0.0013818740844726562,
-0.018280029296875,
0.027008056640625,
-0.0031719207763671875,
0.0252227783203125,
0.01904296875,
-0.021942138671875,
-0.0186309814453125,
0.0167236328125,
-0.004863739013671875,
-0.0009160041809082031,
-0.005645751953125,
-0.0035648345947265625,
-0.01947021484375,
-0.04498291015625,
0.048675537109375,
0.066650390625,
-0.0106353759765625,
0.031768798828125,
0.0301361083984375,
0.002384185791015625,
0.0205078125,
-0.0307464599609375,
0.03863525390625,
0.02203369140625,
0.08160400390625,
-0.0182647705078125,
-0.0171051025390625,
0.05047607421875,
-0.041351318359375,
0.0128326416015625,
0.051605224609375,
0.06146240234375,
-0.0721435546875,
-0.00482940673828125,
0.01861572265625,
-0.0096893310546875,
0.01690673828125,
0.0038089752197265625,
-0.0034313201904296875,
-0.00807952880859375,
0.0036067962646484375,
0.005950927734375,
-0.043548583984375,
-0.0088348388671875,
0.024871826171875,
0.011505126953125,
-0.0165557861328125,
0.06427001953125,
0.00603485107421875,
-0.005908966064453125,
-0.032623291015625,
0.003997802734375,
-0.00923919677734375,
-0.032135009765625,
0.026519775390625,
-0.025115966796875,
0.0019054412841796875,
-0.051727294921875,
0.0202789306640625,
-0.002559661865234375,
-0.01213836669921875,
0.0335693359375,
0.034271240234375,
-0.003490447998046875,
0.060272216796875,
-0.0201873779296875,
0.04315185546875,
0.0289306640625,
-0.022491455078125,
-0.0254364013671875,
-0.037384033203125,
-0.026885986328125,
0.0594482421875,
-0.057037353515625,
0.03082275390625,
-0.02032470703125,
0.0154571533203125,
-0.00751495361328125,
-0.0065765380859375,
0.0538330078125,
-0.046875,
-0.005748748779296875,
0.0130462646484375,
0.042938232421875,
0.012481689453125,
-0.0179901123046875,
0.0106048583984375,
-0.03741455078125,
0.01010894775390625,
-0.00714111328125,
-0.021514892578125,
-0.042755126953125,
-0.041656494140625,
-0.06793212890625,
0.078857421875,
-0.010406494140625,
0.0296630859375,
0.01055908203125,
0.023712158203125,
-0.0103912353515625,
0.0025463104248046875,
-0.020263671875,
0.04034423828125,
0.00872802734375,
0.048583984375,
-0.05352783203125,
-0.0275421142578125,
0.0254364013671875,
0.07293701171875,
0.037261962890625,
0.012298583984375,
-0.02911376953125,
0.005695343017578125,
0.044036865234375,
0.00897216796875,
-0.0238494873046875,
0.034637451171875,
-0.030487060546875,
0.056396484375,
0.062103271484375,
-0.0195465087890625,
0.043792724609375,
0.033477783203125,
-0.0694580078125,
0.00861358642578125,
0.01177978515625,
-0.00443267822265625,
-0.00601959228515625,
-0.002368927001953125,
-0.06671142578125,
0.0104522705078125,
0.039154052734375,
0.034149169921875,
-0.00044083595275878906,
0.058013916015625,
0.06622314453125,
-0.06561279296875,
-0.036956787109375,
-0.03436279296875,
0.053802490234375,
0.00940704345703125,
0.041259765625,
0.0207672119140625,
0.0178375244140625,
0.034576416015625,
-0.001373291015625,
0.03466796875,
0.01282501220703125,
-0.0207977294921875,
0.060546875,
0.0264739990234375,
0.01548004150390625,
-0.0290679931640625,
0.0303802490234375,
0.02886962890625,
0.06390380859375,
-0.05902099609375,
-0.057769775390625,
0.01629638671875,
0.019012451171875,
-0.00820159912109375,
-0.00826263427734375,
-0.028778076171875,
-0.0160980224609375,
0.053802490234375,
-0.0457763671875,
0.0194854736328125,
0.024810791015625,
0.0308380126953125,
-0.0230560302734375,
-0.0400390625,
-0.032958984375,
0.004474639892578125,
-0.046875,
0.01093292236328125,
0.009979248046875,
0.0867919921875,
0.0150604248046875,
0.0767822265625,
-0.04522705078125,
-0.048980712890625,
-0.0005397796630859375,
-0.0008955001831054688,
-0.0030345916748046875,
0.00017333030700683594,
-0.0157012939453125,
-0.018890380859375,
-0.028564453125,
0.0367431640625,
0.042083740234375,
-0.0130157470703125,
0.01824951171875,
0.019378662109375,
0.006427764892578125,
-0.0023632049560546875,
0.0211181640625,
0.0011444091796875,
-0.01488494873046875,
-0.01538848876953125,
-0.007450103759765625,
-0.01377105712890625,
-0.015716552734375,
-0.00699615478515625,
0.047454833984375,
-0.0279388427734375,
-0.02410888671875,
0.054046630859375,
-0.0081024169921875,
-0.01372528076171875,
0.03594970703125,
-0.0021991729736328125,
0.07928466796875,
0.0036067962646484375,
-0.075927734375,
-0.01340484619140625,
-0.024932861328125,
-0.0753173828125,
0.040924072265625,
0.050689697265625,
-0.003986358642578125,
-0.00617218017578125,
0.006023406982421875,
-0.03985595703125,
0.0240936279296875,
0.033203125,
-0.00057220458984375,
0.01335906982421875,
0.007236480712890625,
-0.0169830322265625,
-0.0833740234375,
-0.033447265625,
-0.0199127197265625,
-0.001018524169921875,
0.00797271728515625,
0.0374755859375,
0.036468505859375,
0.0184173583984375,
-0.064208984375,
0.0113525390625,
-0.049163818359375,
-0.05126953125,
0.02935791015625,
0.009613037109375,
-0.0161285400390625,
-0.00699615478515625,
0.036590576171875,
0.0249481201171875,
0.0389404296875,
-0.02691650390625,
0.006427764892578125,
-0.0216827392578125,
0.0196380615234375,
-0.03448486328125,
0.02471923828125,
-0.026214599609375,
0.0210418701171875,
0.0079193115234375,
-0.018951416015625,
0.025177001953125,
-0.0283050537109375,
-0.005046844482421875,
0.005870819091796875,
0.051605224609375,
-0.0291748046875,
0.04852294921875,
-0.020294189453125,
0.07220458984375,
0.037322998046875,
0.038604736328125,
0.0210418701171875,
-0.0008988380432128906,
-0.0264892578125,
0.01355743408203125,
0.015167236328125,
-0.021636962890625,
-0.00447845458984375,
-0.033355712890625,
0.027313232421875,
0.00902557373046875,
0.04638671875,
-0.010009765625,
0.01036834716796875,
-0.006603240966796875,
-0.0014486312866210938,
-0.010467529296875,
0.01021575927734375,
-0.0250244140625,
-0.036407470703125,
0.007076263427734375,
0.01263427734375,
-0.00347137451171875,
0.01092529296875,
-0.0207061767578125,
-0.02374267578125,
0.0243988037109375,
0.02264404296875,
-0.04315185546875,
-0.002105712890625,
0.013580322265625,
-0.00215911865234375,
0.01971435546875,
-0.03369140625,
0.01294708251953125,
0.020263671875,
0.002193450927734375,
-0.0135040283203125,
-0.043914794921875,
-0.0037212371826171875,
-0.01520538330078125,
-0.0041961669921875,
0.0095672607421875,
-0.01568603515625,
-0.051971435546875,
0.0229644775390625,
0.0004162788391113281,
0.06268310546875,
0.03143310546875,
-0.0032978057861328125,
0.0203857421875,
0.0191650390625,
-0.05169677734375,
-0.09814453125,
0.0159149169921875,
-0.062744140625,
0.003810882568359375,
0.01000213623046875,
0.00946807861328125,
0.050537109375,
-0.011474609375,
-0.032806396484375,
0.036712646484375,
-0.0053863525390625,
-0.028167724609375,
-0.035400390625,
0.0313720703125,
0.0085906982421875,
-0.00345611572265625,
0.005157470703125,
-0.050323486328125,
-0.024688720703125,
-0.011474609375,
-0.01751708984375,
0.054962158203125,
-0.0008921623229980469,
0.024993896484375,
-0.02825927734375,
-0.0037288665771484375,
-0.048614501953125,
-0.04296875,
0.032684326171875,
-0.05206298828125,
0.0384521484375,
-0.00201416015625,
-0.0665283203125,
-0.0296173095703125,
-0.0144500732421875,
0.043548583984375,
-0.004512786865234375,
-0.043121337890625,
-0.02154541015625,
-0.024993896484375,
0.0312347412109375,
0.022491455078125,
0.0078125,
-0.006237030029296875,
-0.016571044921875,
0.0206756591796875,
-0.01197052001953125,
-0.021240234375,
0.013336181640625,
-0.045562744140625,
-0.02410888671875,
-0.0230865478515625,
-0.01276397705078125,
-0.0132598876953125,
-0.034332275390625,
-0.043670654296875,
-0.0108489990234375,
-0.04327392578125,
0.00382232666015625,
-0.050048828125,
0.043609619140625,
-0.003665924072265625,
0.0063934326171875,
0.02069091796875,
-0.0203399658203125,
-0.00884246826171875,
0.012054443359375,
-0.0032711029052734375,
-0.0089874267578125,
0.040771484375,
0.004619598388671875,
0.0114898681640625,
0.0181427001953125,
-0.0299072265625,
0.0013551712036132812,
0.0303192138671875,
-0.005901336669921875,
-0.00024628639221191406,
-0.006122589111328125,
-0.0275421142578125,
-0.0036029815673828125,
0.078125,
0.0193023681640625,
0.034088134765625,
0.0012407302856445312,
0.036865234375,
0.00896453857421875,
0.044219970703125,
-0.0103759765625,
-0.0283355712890625,
0.017913818359375,
-0.05596923828125,
0.00963592529296875,
0.009857177734375,
0.017913818359375,
-0.0167999267578125,
0.004497528076171875,
0.00818634033203125,
0.01253509521484375,
0.0009250640869140625
]
|
c2c35e5bf86ca266da4ed23d003ca69a9a82f942 | Wordpress Stackexchange
Q: revert one revision of a post progmattically via code? I would have thought a simple question but I can't find a function to do this in the WordPress API.
I just want to revert to one previous revision as soon as a user updates a post. This would allow admins/editors to review the latest non live revision whilst the old one gives the appearance of staying live. The editor/admin would then switch the post to the newest revision when they are happy with it.
A: I doubt it's easy to do what you want and force editors to automatically view one revision whilst another is published (there may be a plugin), but here's some standalone code for identifying revisions and reverting to a specific one:
// get all revisions for post ID 1 in an array (keys = ID, val = full WP_Post object)
$revisions = wp_get_post_revisions(1);
// they're returned in reverse order (most recent first), so previous is 2nd array element
wp_restore_post_revision($revisions[array_keys($revisions)[1]]);
Note: there will only be one revision when a post is first published (unless the user saved a draft.)
Documentation: wp_restore_post_revision
| Q: revert one revision of a post progmattically via code? I would have thought a simple question but I can't find a function to do this in the WordPress API.
I just want to revert to one previous revision as soon as a user updates a post. This would allow admins/editors to review the latest non live revision whilst the old one gives the appearance of staying live. The editor/admin would then switch the post to the newest revision when they are happy with it.
A: I doubt it's easy to do what you want and force editors to automatically view one revision whilst another is published (there may be a plugin), but here's some standalone code for identifying revisions and reverting to a specific one:
// get all revisions for post ID 1 in an array (keys = ID, val = full WP_Post object)
$revisions = wp_get_post_revisions(1);
// they're returned in reverse order (most recent first), so previous is 2nd array element
wp_restore_post_revision($revisions[array_keys($revisions)[1]]);
Note: there will only be one revision when a post is first published (unless the user saved a draft.)
Documentation: wp_restore_post_revision
A: So via lots of head banging and experimentation I managed to get a solution to letting editors/admins review the post whilst a previous one stays live is rather convoluted but does work.
The key thing I did was to create a new post status which I call awaiting. In the admin it appears as "changes awaiting approval".
// Define new awaiting status
function my_custom_post_status(){
register_post_status( 'awaiting', array(
'label' => _x( 'Changes Awaiting Approval', 'custom-post-type' ),
'public' => true,
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
'label_count' => _n_noop( 'Changes Awaiting Approval <span class="count">(%s)</span>', 'Changes Awaiting Approval <span class="count">(%s)</span>' ),
) );
}
add_action( 'init', 'my_custom_post_status' );
Critically this is a public status type.
I then force updates by specific users to change the post status to this new status via a hook at the end of the update post process...
function published_to_pending( $post_id ) {
global $post, $current_user, $wp_meta_boxes ;
if ( !is_object( $post ) )
$post = get_post( $post_id );
if ( !current_user_can( 'edit_post', $post_id ) )
return $post_id;
// check for specific user that needs this publish to pending. otherwise exit
if (get_current_user_role()!="custom-user-role"){
return;
}
if ( $post->post_status=="publish" ) {
global $wpdb;
$result = $wpdb->update(
$wpdb->posts,
array( 'post_status' => "awaiting" ),
array( 'ID' => $post_id )
);
}
}
add_action( 'post_updated', 'published_to_pending', 13, 2 );
function get_current_user_role() {
global $wp_roles;
$current_user = wp_get_current_user();
$roles = $current_user->roles;
$role = array_shift($roles);
return $role;
}
Note that a very common way of updating the post status via the "save_post" hook was no good for me. It's because I realised using this hook doesn't save meta data correctly connected to the post and this ruined my AdvancedCustomField properties.
Finally in the front end on the single.php page for viewing my entries, I do a check for the post status and if it is =="awaiting" I then do a manual $wpdb query to obtain the previous revision of the post and its related meta properties. I hope this is useful to others.
| wordpress | {
"language": "en",
"length": 517,
"provenance": "stackexchange_00019.jsonl.gz:454499",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/183553"
} | [
0.0031032562255859375,
-0.0255126953125,
-0.0296478271484375,
-0.0006551742553710938,
-0.002925872802734375,
-0.026336669921875,
0.0423583984375,
-0.0112457275390625,
0.041229248046875,
0.025787353515625,
-0.05133056640625,
-0.033447265625,
0.0223541259765625,
-0.0089263916015625,
-0.045166015625,
-0.025909423828125,
0.053192138671875,
-0.0283355712890625,
0.00873565673828125,
0.0025043487548828125,
-0.02947998046875,
0.038543701171875,
0.02227783203125,
0.051300048828125,
-0.006366729736328125,
0.039642333984375,
0.0462646484375,
-0.032745361328125,
0.0014057159423828125,
-0.0265960693359375,
0.004299163818359375,
-0.0121307373046875,
0.0221405029296875,
-0.00868988037109375,
0.0146484375,
-0.022064208984375,
-0.0018186569213867188,
-0.0050201416015625,
-0.0157012939453125,
0.0236663818359375,
0.036376953125,
-0.0137481689453125,
-0.049163818359375,
0.0131378173828125,
-0.050262451171875,
-0.041595458984375,
0.0399169921875,
-0.0016260147094726562,
-0.0028667449951171875,
0.037445068359375,
0.01129913330078125,
-0.0439453125,
0.027252197265625,
0.004627227783203125,
-0.03179931640625,
-0.04351806640625,
-0.0137939453125,
0.016082763671875,
0.038421630859375,
-0.0229644775390625,
-0.0256195068359375,
-0.0115966796875,
0.02740478515625,
-0.01297760009765625,
-0.055084228515625,
0.010467529296875,
0.015655517578125,
-0.012847900390625,
-0.07666015625,
-0.0816650390625,
0.030670166015625,
-0.017669677734375,
0.0088653564453125,
-0.0012149810791015625,
-0.0178070068359375,
0.008819580078125,
0.0197601318359375,
0.017242431640625,
-0.007694244384765625,
0.00533294677734375,
0.034271240234375,
0.00286865234375,
-0.0159149169921875,
-0.031402587890625,
0.018646240234375,
-0.01319122314453125,
-0.00307464599609375,
-0.0134124755859375,
-0.070556640625,
-0.035919189453125,
-0.04644775390625,
-0.01364898681640625,
-0.081787109375,
-0.005462646484375,
-0.0201416015625,
-0.0015268325805664062,
0.0482177734375,
0.04266357421875,
0.020263671875,
-0.01294708251953125,
0.01320648193359375,
-0.052978515625,
-0.020721435546875,
-0.0238494873046875,
0.007144927978515625,
0.0020294189453125,
-0.0003795623779296875,
-0.040283203125,
0.0208282470703125,
0.022491455078125,
-0.0141754150390625,
0.03216552734375,
-0.03155517578125,
-0.06365966796875,
-0.0057220458984375,
0.04351806640625,
-0.0243377685546875,
0.017181396484375,
0.035552978515625,
-0.009429931640625,
0.01334381103515625,
0.026519775390625,
0.011322021484375,
-0.04754638671875,
-0.01194000244140625,
-0.0172271728515625,
-0.037078857421875,
-0.0298309326171875,
0.0268096923828125,
0.01468658447265625,
-0.04254150390625,
0.00611114501953125,
0.08087158203125,
0.01139068603515625,
0.017852783203125,
-0.01316070556640625,
0.025238037109375,
0.0160064697265625,
-0.0086212158203125,
0.036651611328125,
-0.060943603515625,
-0.011444091796875,
0.04534912109375,
-0.048065185546875,
-0.0191650390625,
0.0083160400390625,
0.0003871917724609375,
0.026824951171875,
0.0192413330078125,
-0.039031982421875,
-0.016143798828125,
0.004268646240234375,
0.0212860107421875,
-0.0293121337890625,
0.0340576171875,
-0.0765380859375,
0.01398468017578125,
-0.04852294921875,
0.06109619140625,
-0.030853271484375,
0.0279388427734375,
-0.0150146484375,
0.024993896484375,
0.005828857421875,
-0.050079345703125,
0.048858642578125,
-0.07427978515625,
-0.0179901123046875,
0.027557373046875,
0.044891357421875,
-0.006744384765625,
-0.017730712890625,
0.042938232421875,
-0.007625579833984375,
-0.0394287109375,
0.01116180419921875,
-0.00811767578125,
0.004863739013671875,
-0.0015325546264648438,
0.06610107421875,
0.0341796875,
-0.0192413330078125,
-0.0002734661102294922,
0.01763916015625,
-0.015045166015625,
0.009521484375,
0.0157012939453125,
0.0251617431640625,
-0.0110626220703125,
0.0298309326171875,
-0.005107879638671875,
0.042144775390625,
0.003704071044921875,
-0.00811767578125,
-0.004638671875,
-0.027008056640625,
-0.01192474365234375,
-0.0038928985595703125,
-0.00830841064453125,
0.019683837890625,
0.016387939453125,
-0.0188751220703125,
-0.01529693603515625,
-0.0278167724609375,
-0.09796142578125,
-0.026824951171875,
-0.0318603515625,
0.034515380859375,
-0.03369140625,
0.0294342041015625,
0.0484619140625,
0.0170440673828125,
-0.030059814453125,
-0.01206207275390625,
0.0014801025390625,
-0.0474853515625,
-0.023590087890625,
-0.005924224853515625,
-0.033721923828125,
0.00934600830078125,
-0.046173095703125,
0.0096588134765625,
-0.04913330078125,
-0.0079345703125,
0.06268310546875,
-0.039459228515625,
-0.005283355712890625,
-0.0465087890625,
0.032958984375,
-0.0185089111328125,
-0.047698974609375,
0.052398681640625,
0.020599365234375,
-0.0273895263671875,
-0.0231781005859375,
0.00025391578674316406,
-0.00428009033203125,
-0.098876953125,
0.00023424625396728516,
0.08673095703125,
0.029754638671875,
0.016326904296875,
0.0127105712890625,
0.04107666015625,
0.03759765625,
-0.0146331787109375,
0.0056915283203125,
0.0113677978515625,
0.01348876953125,
0.02215576171875,
0.002811431884765625,
0.013519287109375,
0.0157470703125,
-0.062042236328125,
0.06036376953125,
0.032012939453125,
-0.017333984375,
0.03289794921875,
-0.0240325927734375,
-0.007537841796875,
0.01348114013671875,
-0.0538330078125,
-0.0179290771484375,
-0.036529541015625,
0.0401611328125,
-0.01241302490234375,
0.0411376953125,
0.03369140625,
-0.01027679443359375,
-0.01446533203125,
0.01071929931640625,
-0.0006194114685058594,
-0.006134033203125,
0.0266571044921875,
0.0141143798828125,
0.032958984375,
-0.06842041015625,
0.0052490234375,
0.058319091796875,
0.027679443359375,
-0.0256805419921875,
0.0234222412109375,
0.040130615234375,
-0.01910400390625,
-0.01114654541015625,
-0.013031005859375,
0.0236358642578125,
-0.056732177734375,
-0.0238494873046875,
-0.0128631591796875,
0.0218505859375,
0.023162841796875,
-0.0165557861328125,
0.007648468017578125,
-0.0138397216796875,
0.004161834716796875,
0.017303466796875,
-0.0545654296875,
0.053009033203125,
-0.046875,
0.033935546875,
0.06451416015625,
-0.007648468017578125,
0.01485443115234375,
0.0030498504638671875,
0.00989532470703125,
0.0024471282958984375,
0.0026721954345703125,
-0.01666259765625,
-0.0154266357421875,
-0.04681396484375,
0.0026264190673828125,
0.0300445556640625,
0.00540924072265625,
0.01103973388671875,
-0.0110626220703125,
-0.0188446044921875,
0.00728607177734375,
-0.06610107421875,
-0.037078857421875,
-0.03955078125,
-0.060394287109375,
0.026702880859375,
0.007373809814453125,
-0.006824493408203125,
-0.020843505859375,
0.040740966796875,
0.0252227783203125,
0.049713134765625,
-0.01898193359375,
-0.062103271484375,
-0.013580322265625,
-0.06927490234375,
-0.0229949951171875,
-0.003322601318359375,
-0.022705078125,
0.025054931640625,
0.035552978515625,
0.013153076171875,
-0.033843994140625,
0.0112762451171875,
-0.01439666748046875,
-0.03912353515625,
-0.01560211181640625,
-0.0028934478759765625,
0.0016345977783203125,
-0.055511474609375,
0.01247406005859375,
-0.006649017333984375,
-0.00360870361328125,
-0.004924774169921875,
-0.0050811767578125,
-0.027923583984375,
-0.0273590087890625,
0.0036640167236328125,
0.0308074951171875,
0.01318359375,
0.028778076171875,
0.05859375,
-0.01354217529296875,
-0.031585693359375,
0.01216888427734375,
-0.029693603515625,
-0.0196685791015625,
-0.00667572021484375,
0.00841522216796875,
-0.01416015625,
0.0249176025390625,
0.0145721435546875,
0.0219879150390625,
0.03143310546875,
0.0213623046875,
-0.0309906005859375,
-0.0137786865234375,
-0.0114593505859375,
-0.0285797119140625,
0.048492431640625,
0.002777099609375,
-0.030181884765625,
0.001373291015625,
-0.0025634765625,
-0.0279998779296875,
-0.02392578125,
-0.04010009765625,
-0.03778076171875,
0.002826690673828125,
-0.0782470703125,
0.047943115234375,
-0.056884765625,
-0.001861572265625,
-0.026275634765625,
0.078857421875,
-0.05706787109375,
-0.0303192138671875,
-0.020782470703125,
0.00252532958984375,
-0.01776123046875,
-0.0064239501953125,
-0.0283203125,
-0.0008931159973144531,
-0.0906982421875,
0.016632080078125,
0.0090179443359375,
-0.015899658203125,
-0.053131103515625,
0.018310546875,
-0.06744384765625,
-0.03009033203125,
0.024932861328125,
-0.059783935546875,
0.0372314453125,
0.01177215576171875,
0.014007568359375,
-0.0118560791015625,
-0.01351165771484375,
-0.05303955078125,
-0.0777587890625,
-0.0028514862060546875,
-0.049774169921875,
0.051849365234375,
0.03863525390625,
-0.042266845703125,
-0.00913238525390625,
0.03179931640625,
0.023162841796875,
0.04547119140625,
0.003936767578125,
0.00670623779296875,
-0.0183868408203125,
-0.0192108154296875,
0.0253448486328125,
-0.038116455078125,
-0.008697509765625,
-0.03515625,
-0.016265869140625,
-0.0013971328735351562,
-0.054168701171875,
0.0002522468566894531,
-0.048095703125,
-0.005825042724609375,
-0.041107177734375,
-0.032928466796875,
0.0009164810180664062,
0.01074981689453125,
-0.01461029052734375,
-0.0004940032958984375,
-0.016998291015625,
-0.0284881591796875,
0.0198211669921875,
0.0298309326171875,
-0.01288604736328125,
0.006900787353515625,
0.040557861328125,
0.0137939453125,
-0.0281524658203125,
-0.0292205810546875,
0.034332275390625,
0.0298919677734375,
-0.01373291015625,
0.05389404296875,
-0.0025539398193359375,
-0.0006961822509765625,
0.054901123046875,
-0.019622802734375,
-0.0292510986328125,
0.005901336669921875,
0.021820068359375,
0.0088348388671875,
-0.005802154541015625,
-0.0203399658203125,
-0.00878143310546875,
0.021270751953125,
-0.0233917236328125,
-0.014984130859375,
-0.020751953125,
0.036529541015625,
0.06402587890625,
-0.01241302490234375,
0.019317626953125,
-0.040496826171875,
-0.06048583984375,
0.00992584228515625,
0.00955963134765625,
-0.0107574462890625,
0.03741455078125,
-0.0098419189453125,
0.03118896484375,
0.01983642578125,
0.0025882720947265625,
-0.01678466796875,
0.0067901611328125,
-0.00632476806640625,
0.04437255859375,
-0.0178985595703125,
0.0078277587890625,
-0.030548095703125,
-0.005161285400390625,
-0.0024166107177734375,
0.0181121826171875,
-0.0472412109375,
0.015380859375,
0.003490447998046875,
0.004863739013671875,
-0.011199951171875,
-0.0266571044921875,
0.03179931640625,
0.01922607421875,
-0.005096435546875,
-0.01256561279296875,
-0.048492431640625,
-0.003582000732421875,
-0.037200927734375,
0.0218658447265625,
0.0122222900390625,
-0.004489898681640625,
0.041046142578125,
0.0262451171875,
0.0328369140625,
0.01094818115234375,
-0.0343017578125,
0.08563232421875,
0.068603515625,
-0.0091400146484375,
0.01904296875,
0.01000213623046875,
0.01064300537109375,
-0.063232421875,
-0.0294647216796875,
-0.0269012451171875,
-0.0272979736328125,
0.0206451416015625,
0.032501220703125,
-0.0069580078125,
-0.0045623779296875,
0.02362060546875,
0.008056640625,
-0.01485443115234375,
0.04486083984375,
0.07177734375,
-0.034820556640625,
-0.00079345703125,
0.01422119140625,
0.01084136962890625,
-0.004634857177734375,
0.0216827392578125,
-0.0232391357421875,
-0.024627685546875,
-0.040802001953125,
0.0012416839599609375,
-0.03857421875,
-0.040374755859375,
-0.0180511474609375,
-0.03802490234375,
-0.055999755859375,
-0.0293121337890625,
0.0467529296875,
0.02679443359375,
-0.0167083740234375,
-0.042633056640625,
0.0262298583984375,
0.0032958984375,
0.00968170166015625,
-0.036895751953125,
-0.0084381103515625,
-0.0159759521484375,
-0.0228271484375,
0.08807373046875,
0.013214111328125,
-0.02972412109375,
-0.0023632049560546875,
-0.04876708984375,
-0.0183563232421875,
-0.01053619384765625,
-0.056121826171875,
-0.0282135009765625,
-0.00458526611328125,
0.0096282958984375,
0.01441192626953125,
0.0176544189453125,
-0.00022780895233154297,
0.005657196044921875,
0.01450347900390625,
-0.0084381103515625,
0.0283660888671875,
0.01287841796875,
0.044708251953125,
-0.0247802734375,
0.057037353515625,
0.01432037353515625,
0.02923583984375,
-0.01971435546875,
-0.0350341796875,
0.00246429443359375,
-0.036865234375,
-0.0084991455078125,
0.00521087646484375,
0.008941650390625,
-0.0033321380615234375,
0.010406494140625,
0.006683349609375,
0.002094268798828125,
-0.02105712890625,
0.01084136962890625,
-0.0227813720703125,
0.027099609375,
-0.026611328125,
-0.04278564453125,
0.050201416015625,
-0.04400634765625,
-0.0213623046875,
0.012603759765625,
0.052978515625,
0.0010986328125,
-0.030609130859375,
0.01143646240234375,
-0.0130462646484375,
0.02142333984375,
-0.037078857421875,
0.04547119140625,
0.00687408447265625,
0.05706787109375,
0.0016546249389648438,
0.035064697265625,
0.06915283203125,
-0.052276611328125,
-0.006046295166015625,
0.0295562744140625,
0.0265045166015625,
-0.0161285400390625,
0.01389312744140625,
0.040771484375,
-0.01171875,
-0.005199432373046875,
0.016632080078125,
0.0239105224609375,
-0.0516357421875,
0.026824951171875,
0.01035308837890625,
0.0184783935546875,
0.056427001953125,
0.01763916015625,
-0.02117919921875,
-0.033477783203125,
0.0115203857421875,
-0.0628662109375,
-0.0215911865234375,
-0.00228118896484375,
-0.01316070556640625,
-0.0218048095703125,
-0.035125732421875,
-0.013427734375,
0.013763427734375,
-0.0150146484375,
0.035980224609375,
0.017669677734375,
0.01519012451171875,
-0.0297698974609375,
-0.001377105712890625,
0.02557373046875,
-0.038726806640625,
-0.07135009765625,
0.013092041015625,
0.01611328125,
-0.01690673828125,
0.01113128662109375,
-0.0148162841796875,
-0.0257720947265625,
0.04058837890625,
-0.0413818359375,
0.0214385986328125,
0.007404327392578125,
-0.033111572265625,
-0.0662841796875,
-0.033782958984375,
0.046630859375,
-0.0166015625,
-0.0406494140625,
0.044158935546875,
-0.039154052734375,
-0.0621337890625,
-0.00391387939453125,
-0.00916290283203125,
0.04400634765625,
-0.019775390625,
-0.0164031982421875,
0.0367431640625,
-0.01629638671875,
-0.0294189453125,
-0.0197601318359375,
0.0007047653198242188,
-0.042572021484375,
-0.03155517578125,
-0.0203704833984375,
-0.049102783203125,
0.0178985595703125,
-0.04376220703125,
-0.060699462890625,
0.10821533203125,
0.007030487060546875,
0.04339599609375,
0.01284027099609375,
0.0369873046875,
-0.0333251953125,
0.0166168212890625,
-0.0419921875,
0.043975830078125,
-0.01275634765625,
0.00975799560546875,
-0.055908203125,
0.0016193389892578125,
-0.036529541015625,
0.0197906494140625,
0.06866455078125,
0.02447509765625,
-0.06854248046875,
-0.0025386810302734375,
0.0279541015625,
0.0208587646484375,
0.00891876220703125,
0.08807373046875,
0.0082244873046875,
0.0162811279296875,
0.0799560546875,
-0.007213592529296875,
0.035614013671875,
0.01280975341796875,
0.0027294158935546875,
0.01544189453125,
0.0237884521484375,
0.01160430908203125,
0.01551055908203125,
0.0114288330078125,
-0.07330322265625,
0.026580810546875,
0.04620361328125,
0.0386962890625,
0.026214599609375,
0.00013005733489990234,
0.0271148681640625,
0.03765869140625,
0.01092529296875,
0.00218963623046875,
0.02239990234375,
0.031005859375,
-0.01302337646484375,
0.06256103515625,
0.0236968994140625,
-0.0227508544921875,
0.0294036865234375,
0.00498199462890625,
-0.011688232421875,
0.02325439453125,
0.034149169921875,
0.059356689453125,
0.0275421142578125,
0.0228118896484375,
-0.00627899169921875,
0.0435791015625,
0.038177490234375,
-0.0258636474609375,
-0.0244903564453125,
0.0213470458984375,
0.004497528076171875,
-0.011322021484375,
-0.020599365234375,
-0.015869140625,
-0.04925537109375,
-0.0035305023193359375,
-0.00775909423828125,
-0.019500732421875,
0.006435394287109375,
0.00699615478515625,
0.0152740478515625,
0.0226593017578125,
-0.0095672607421875,
-0.011566162109375,
-0.04736328125,
0.0280914306640625,
0.0091705322265625,
0.02020263671875,
0.005565643310546875,
0.0335693359375,
0.03179931640625,
0.005695343017578125,
0.0128173828125,
0.04998779296875,
0.026397705078125,
-0.0290985107421875,
-0.01273345947265625,
-0.062286376953125,
0.0129852294921875,
0.0251007080078125,
0.0175323486328125,
-0.035980224609375,
0.074462890625,
0.056427001953125,
-0.07879638671875,
-0.034332275390625,
0.00873565673828125,
-0.0133819580078125,
-0.0163116455078125,
0.0015878677368164062,
-0.0369873046875,
-0.006122589111328125,
-0.0166778564453125,
-0.0008955001831054688,
0.03643798828125,
-0.0195770263671875,
0.005184173583984375,
0.0333251953125,
0.0047454833984375,
-0.00716400146484375,
-0.0167236328125,
0.01129913330078125,
0.0174102783203125,
0.035186767578125,
-0.0281829833984375,
0.01404571533203125,
-0.0204925537109375,
-0.0262451171875,
-0.01373291015625,
0.00799560546875,
-0.0628662109375,
0.08514404296875,
0.0186920166015625,
-0.0178070068359375,
0.02655029296875,
-0.0153045654296875,
0.021392822265625,
0.006862640380859375,
0.00458526611328125,
0.00786590576171875,
-0.080078125,
-0.043853759765625,
-0.044586181640625,
0.038299560546875,
-0.00228118896484375,
0.0576171875,
-0.0014390945434570312,
0.0242462158203125,
-0.00748443603515625,
0.0276336669921875,
-0.0633544921875,
-0.045623779296875,
0.036346435546875,
-0.06072998046875,
-0.0216522216796875,
0.036895751953125,
-0.03509521484375,
0.0103607177734375,
0.05224609375,
0.01038360595703125,
0.0341796875,
-0.0204925537109375,
0.0167083740234375,
-0.027984619140625,
-0.00855255126953125,
-0.0292205810546875,
-0.01287078857421875,
-0.02630615234375,
-0.0160980224609375,
0.0134429931640625,
0.01171875,
-0.00785064697265625,
-0.0039520263671875,
0.02801513671875,
-0.040283203125,
0.001865386962890625,
0.002552032470703125,
-0.0214996337890625,
0.0253143310546875,
0.0479736328125,
0.05206298828125,
0.02490234375,
-0.01091766357421875,
0.00850677490234375,
0.036773681640625,
-0.0355224609375,
0.0266571044921875,
0.0216522216796875,
-0.0162353515625,
-0.0219879150390625,
0.014862060546875,
-0.005268096923828125,
0.0019969940185546875,
-0.0135345458984375,
0.01264190673828125,
-0.0262451171875,
0.02587890625,
-0.0153656005859375,
-0.01329803466796875,
-0.01849365234375,
-0.0163726806640625,
0.0032939910888671875,
-0.0584716796875,
-0.0159454345703125,
0.044708251953125,
-0.0036830902099609375,
-0.01227569580078125,
-0.038421630859375,
0.05194091796875,
-0.052032470703125,
0.03607177734375,
-0.04376220703125,
0.0065765380859375,
-0.0035400390625,
0.0157012939453125,
-0.04254150390625,
-0.0299530029296875,
-0.044830322265625,
0.01448822021484375,
-0.042449951171875,
-0.023681640625,
-0.0043792724609375,
0.012237548828125,
-0.034027099609375,
-0.01287841796875,
-0.0185394287109375,
0.0078887939453125,
-0.017608642578125,
-0.0002560615539550781,
0.0120849609375,
0.032135009765625,
-0.03460693359375,
-0.07147216796875,
0.0068206787109375,
-0.01219940185546875,
0.00847625732421875,
-0.0013055801391601562,
0.00726318359375,
0.041412353515625,
-0.0176239013671875,
-0.0261688232421875,
0.0037097930908203125,
0.00792694091796875,
-0.0271453857421875,
-0.0474853515625,
-0.030242919921875,
-0.0184783935546875,
0.03271484375,
-0.010589599609375,
-0.00684356689453125,
-0.02081298828125,
0.052581787109375,
-0.002185821533203125,
0.10498046875,
-0.0289154052734375,
0.016845703125,
0.00016379356384277344,
0.0182037353515625,
-0.022003173828125,
0.0182342529296875,
-0.02020263671875,
0.0010356903076171875,
0.003948211669921875,
0.031982421875,
-0.011077880859375,
-0.0341796875,
0.0030002593994140625,
-0.015655517578125,
-0.02764892578125,
-0.02142333984375,
-0.044342041015625,
-0.031341552734375,
0.07696533203125,
0.0765380859375,
0.0235443115234375,
-0.03277587890625,
0.032318115234375,
-0.016204833984375,
-0.07647705078125,
0.0190277099609375,
0.0277557373046875,
-0.02703857421875,
0.0205078125,
0.017333984375,
-0.006908416748046875,
0.01317596435546875,
-0.0382080078125,
-0.018157958984375,
-0.010528564453125,
-0.0247802734375,
0.00659942626953125,
-0.03125,
-0.00423431396484375,
-0.0159454345703125,
-0.0003838539123535156,
-0.01508331298828125,
-0.007781982421875,
0.009979248046875,
-0.0112152099609375,
0.0203094482421875,
0.0229034423828125,
0.030029296875,
-0.0328369140625,
-0.0131072998046875,
0.013824462890625,
-0.0210113525390625,
-0.006992340087890625,
-0.015228271484375,
-0.022430419921875,
-0.00499725341796875,
0.00984954833984375,
-0.020782470703125,
0.0015478134155273438,
-0.0148468017578125,
-0.005825042724609375,
0.049346923828125,
-0.0213623046875,
0.050018310546875,
-0.01302337646484375,
0.024993896484375,
-0.040863037109375,
0.0175933837890625,
0.0139617919921875,
-0.0220947265625,
-0.0002911090850830078,
0.0265045166015625,
0.0428466796875,
-0.0291290283203125,
0.044464111328125,
0.01462554931640625,
0.036651611328125,
0.01715087890625
]
|
9e035d24b8644fef019666875ad6f6cba6a85141 | Wordpress Stackexchange
Q: Removing the redirect after changing a page's slug On one of my pages I changed the slug to form a different URL. E.g.
Old: http://example.com/old-slug
New: http://example.com/new-slug
WordPress has done it's thing of redirecting http://example.com/old-slug to http://example.com/new-slug.
I'd like to remove this behaviour as a plugin I am using makes use of the slug in question and the redirect overrides its behaviour.
I checked this question, and checked my wp_postmeta table for instances of _wp_old_slug but nothing is returned. My server is Nginx so shouldn't be affected by .htaccess files.
Is there anything else I can do to remove this redirect?
A: This (in your functions.php) will turn it off (but see also the comment I've left):
remove_action('template_redirect', 'wp_old_slug_redirect');
It seems odd that your wp_postmeta table wouldn't have any _wp_old_slug keys - the bit of code that does that is in wp-includes/query.php (wp_old_slug_redirect()) - you could add an exit or debug statement there to check if it's being called.
Also, remember that if WordPress can't find a permalink, it looks for posts with a matching beginning, e.g. if you had a post with permalink /foobar, then /foo will redirect to it.
| Q: Removing the redirect after changing a page's slug On one of my pages I changed the slug to form a different URL. E.g.
Old: http://example.com/old-slug
New: http://example.com/new-slug
WordPress has done it's thing of redirecting http://example.com/old-slug to http://example.com/new-slug.
I'd like to remove this behaviour as a plugin I am using makes use of the slug in question and the redirect overrides its behaviour.
I checked this question, and checked my wp_postmeta table for instances of _wp_old_slug but nothing is returned. My server is Nginx so shouldn't be affected by .htaccess files.
Is there anything else I can do to remove this redirect?
A: This (in your functions.php) will turn it off (but see also the comment I've left):
remove_action('template_redirect', 'wp_old_slug_redirect');
It seems odd that your wp_postmeta table wouldn't have any _wp_old_slug keys - the bit of code that does that is in wp-includes/query.php (wp_old_slug_redirect()) - you could add an exit or debug statement there to check if it's being called.
Also, remember that if WordPress can't find a permalink, it looks for posts with a matching beginning, e.g. if you had a post with permalink /foobar, then /foo will redirect to it.
A: this worked for me:
remove_filter('template_redirect', 'redirect_canonical');
source: http://biostall.com/prevent-wordpress-redirecting-to-nearest-matching-url/
A: What helped for was permalinks reset. just go to Settings -> Permalinks, pick default, hit Save Changes. Then pick your structure and hit Save Changes again.
A: To manually remove automatic redirects after slug change, just delete the corresponding rows from the "wp-redirection-items" from the database using phpMyAdmin.
This is the best and simplest way which allows you to remove redirects for specific posts. More details can be found here http://couponnexus.com/remove-wordpress-redirects-changing-slug/
A: Every WordPress post has its own slug, which is automatically generated by your post’s title. If you decide to change the post slug later, WordPress will remember the old one and redirect it to the new one. It’s possible to prevent old post slug redirection in WordPress by adding removing a couple of actions from your WordPress core with a small snippet.
Just add following code to your current theme’s functions.php file to prevent WordPress from redirecting old post slugs to new ones:
remove_action( 'template_redirect', 'wp_old_slug_redirect');
remove_action( 'post_updated', 'wp_check_for_changed_slugs', 12, 3 );
| wordpress | {
"language": "en",
"length": 366,
"provenance": "stackexchange_00019.jsonl.gz:454516",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/183598"
} | [
0.07635498046875,
0.03594970703125,
0.0150146484375,
0.0218353271484375,
0.034423828125,
-0.043426513671875,
0.06689453125,
-0.0831298828125,
0.00658416748046875,
0.015716552734375,
-0.01038360595703125,
-0.010711669921875,
0.00936126708984375,
-0.04400634765625,
-0.0057373046875,
-0.01025390625,
0.040008544921875,
0.006870269775390625,
0.04876708984375,
-0.001392364501953125,
-0.00569915771484375,
0.0267486572265625,
0.0265350341796875,
0.08148193359375,
0.017669677734375,
-0.01934814453125,
0.06829833984375,
-0.03570556640625,
0.00653839111328125,
-0.03985595703125,
0.0002796649932861328,
0.033294677734375,
0.0001837015151977539,
0.0479736328125,
-0.0238037109375,
-0.02886962890625,
-0.005886077880859375,
0.0310821533203125,
0.0211639404296875,
-0.0036220550537109375,
0.0279388427734375,
-0.0309906005859375,
-0.02520751953125,
-0.0040435791015625,
-0.01403045654296875,
-0.032257080078125,
0.02093505859375,
-0.038330078125,
0.006084442138671875,
0.004665374755859375,
-0.0118255615234375,
-0.00047707557678222656,
0.00429534912109375,
-0.00540924072265625,
-0.0093994140625,
-0.0222320556640625,
-0.0255584716796875,
0.0116729736328125,
-0.0016870498657226562,
0.018218994140625,
0.0269012451171875,
0.039154052734375,
-0.0005693435668945312,
0.0120086669921875,
-0.0142364501953125,
-0.01203155517578125,
-0.020263671875,
0.024810791015625,
-0.08123779296875,
0.001056671142578125,
0.04595947265625,
-0.055145263671875,
-0.019012451171875,
-0.01043701171875,
-0.0214080810546875,
-0.007656097412109375,
0.0213470458984375,
-0.00417327880859375,
-0.01097869873046875,
0.026031494140625,
0.012542724609375,
-0.03515625,
0.000037789344787597656,
-0.06146240234375,
0.052398681640625,
-0.020172119140625,
-0.0033092498779296875,
-0.0141448974609375,
-0.04095458984375,
-0.0200042724609375,
-0.04278564453125,
-0.023193359375,
-0.004184722900390625,
-0.03369140625,
-0.0394287109375,
-0.0189208984375,
0.0274810791015625,
0.0211181640625,
-0.00980377197265625,
-0.0126190185546875,
0.00901031494140625,
-0.036376953125,
-0.0199432373046875,
-0.0071258544921875,
-0.0106048583984375,
0.045867919921875,
0.0286712646484375,
0.005161285400390625,
0.003692626953125,
0.007289886474609375,
0.0175628662109375,
0.0302276611328125,
-0.021881103515625,
-0.0279083251953125,
-0.0240631103515625,
0.042083740234375,
-0.023468017578125,
-0.01255035400390625,
-0.0099639892578125,
0.0158538818359375,
-0.0038166046142578125,
0.0301513671875,
0.05157470703125,
-0.0287933349609375,
-0.000728607177734375,
-0.0099334716796875,
-0.02203369140625,
-0.0633544921875,
-0.0008006095886230469,
-0.0005564689636230469,
-0.020477294921875,
0.00592041015625,
0.0305938720703125,
0.03460693359375,
0.0146942138671875,
-0.01593017578125,
0.046844482421875,
-0.02069091796875,
-0.032684326171875,
0.040283203125,
-0.019744873046875,
-0.041107177734375,
-0.0277252197265625,
-0.0230560302734375,
0.0467529296875,
0.00388336181640625,
0.004314422607421875,
0.031707763671875,
0.037353515625,
-0.005847930908203125,
0.01528167724609375,
-0.0302581787109375,
0.05145263671875,
-0.0230255126953125,
-0.0113525390625,
-0.0178680419921875,
-0.003871917724609375,
-0.016998291015625,
-0.0284423828125,
-0.0169677734375,
-0.00315093994140625,
-0.006450653076171875,
0.0095062255859375,
-0.049468994140625,
-0.0872802734375,
0.0270233154296875,
-0.03216552734375,
-0.0299072265625,
0.02294921875,
0.002925872802734375,
0.02349853515625,
-0.0189208984375,
-0.03240966796875,
0.0004487037658691406,
0.005523681640625,
0.01323699951171875,
-0.005458831787109375,
-0.0009832382202148438,
0.026641845703125,
0.061431884765625,
0.02197265625,
-0.01580810546875,
0.03741455078125,
0.00760650634765625,
-0.08905029296875,
0.047760009765625,
-0.00504302978515625,
0.055877685546875,
0.01300811767578125,
-0.0008444786071777344,
0.06494140625,
0.01702880859375,
-0.0511474609375,
0.0517578125,
-0.0013685226440429688,
-0.0233154296875,
-0.0146331787109375,
0.00997161865234375,
-0.0043487548828125,
-0.030364990234375,
0.00791168212890625,
0.046234130859375,
-0.0226593017578125,
0.01372528076171875,
-0.06805419921875,
0.04718017578125,
-0.0312042236328125,
0.050140380859375,
0.0205535888671875,
0.03509521484375,
-0.0032062530517578125,
-0.01056671142578125,
-0.037567138671875,
0.05450439453125,
-0.001739501953125,
0.0243682861328125,
-0.00962066650390625,
-0.005290985107421875,
-0.0258941650390625,
0.0157928466796875,
-0.036834716796875,
-0.01174163818359375,
-0.05029296875,
-0.0127105712890625,
0.0499267578125,
-0.024810791015625,
-0.0168914794921875,
-0.0472412109375,
-0.0195770263671875,
-0.01324462890625,
-0.080322265625,
0.09344482421875,
0.018951416015625,
0.0130157470703125,
-0.05438232421875,
0.00897979736328125,
0.0013818740844726562,
-0.0053558349609375,
-0.01149749755859375,
0.03076171875,
0.039031982421875,
0.009979248046875,
-0.024810791015625,
-0.0243988037109375,
0.00024211406707763672,
-0.0791015625,
-0.004642486572265625,
0.002552032470703125,
0.006900787353515625,
-0.0029010772705078125,
0.0111083984375,
-0.0092620849609375,
0.026214599609375,
0.003391265869140625,
0.01416778564453125,
0.0240020751953125,
-0.036041259765625,
-0.01531982421875,
-0.0162353515625,
-0.00720977783203125,
0.01418304443359375,
-0.02642822265625,
-0.008697509765625,
-0.00972747802734375,
0.0025539398193359375,
-0.007167816162109375,
0.0014963150024414062,
0.01076507568359375,
-0.005359649658203125,
-0.01319122314453125,
0.00980377197265625,
-0.0389404296875,
-0.00460052490234375,
0.00557708740234375,
0.061859130859375,
-0.03717041015625,
-0.056854248046875,
0.0108489990234375,
0.02471923828125,
0.0122528076171875,
-0.0243682861328125,
0.0251007080078125,
-0.0006127357482910156,
-0.020965576171875,
-0.0218353271484375,
-0.024444580078125,
0.0154571533203125,
-0.0257720947265625,
0.043212890625,
0.0271453857421875,
0.02789306640625,
0.024322509765625,
-0.019287109375,
0.07373046875,
0.0132293701171875,
-0.019683837890625,
0.01506805419921875,
-0.007110595703125,
0.02227783203125,
0.005908966064453125,
0.050628662109375,
0.06561279296875,
0.0015392303466796875,
0.02886962890625,
0.011749267578125,
-0.00955963134765625,
0.0027923583984375,
-0.0178680419921875,
-0.035491943359375,
0.00518798828125,
-0.0894775390625,
-0.0196380615234375,
0.0277099609375,
0.00600433349609375,
0.00853729248046875,
-0.03375244140625,
-0.00437164306640625,
0.0177001953125,
-0.061614990234375,
-0.03973388671875,
-0.0243072509765625,
-0.037506103515625,
-0.0005970001220703125,
0.0103759765625,
-0.0189361572265625,
0.0031070709228515625,
0.01335906982421875,
0.01418304443359375,
0.07354736328125,
-0.0188751220703125,
-0.07928466796875,
-0.026641845703125,
-0.08551025390625,
-0.01104736328125,
0.0006155967712402344,
0.005939483642578125,
0.01357269287109375,
0.0124969482421875,
-0.0078125,
-0.034515380859375,
0.00942230224609375,
-0.003307342529296875,
-0.010894775390625,
-0.006359100341796875,
-0.00305938720703125,
-0.002994537353515625,
0.00933837890625,
0.005428314208984375,
0.06488037109375,
0.0203704833984375,
-0.0261077880859375,
-0.006847381591796875,
-0.0157470703125,
-0.0263519287109375,
-0.010528564453125,
-0.0265655517578125,
0.01502227783203125,
-0.0258941650390625,
-0.0165557861328125,
-0.052032470703125,
-0.037628173828125,
-0.0259552001953125,
-0.06671142578125,
-0.004138946533203125,
0.01319122314453125,
0.0318603515625,
-0.005260467529296875,
-0.00270843505859375,
0.061431884765625,
0.0233917236328125,
0.041046142578125,
-0.01042938232421875,
0.05096435546875,
-0.0019588470458984375,
0.0263519287109375,
-0.08349609375,
0.0472412109375,
-0.01183319091796875,
-0.016815185546875,
0.0057220458984375,
-0.0009870529174804688,
0.0165252685546875,
-0.0279693603515625,
-0.036102294921875,
-0.058197021484375,
0.032196044921875,
-0.0435791015625,
-0.024139404296875,
-0.0181121826171875,
-0.0041046142578125,
0.0028781890869140625,
0.06390380859375,
-0.0237579345703125,
-0.0204010009765625,
-0.0379638671875,
-0.001392364501953125,
0.033172607421875,
0.016510009765625,
-0.0024623870849609375,
-0.01097869873046875,
-0.0838623046875,
-0.022796630859375,
0.0109100341796875,
-0.0435791015625,
-0.02490234375,
0.03955078125,
-0.05084228515625,
-0.027374267578125,
0.04248046875,
0.006023406982421875,
-0.002613067626953125,
0.006103515625,
-0.003963470458984375,
-0.0246429443359375,
-0.02691650390625,
0.0108642578125,
-0.061370849609375,
-0.00870513916015625,
-0.007110595703125,
0.052215576171875,
0.006267547607421875,
-0.01071929931640625,
-0.01611328125,
0.0322265625,
0.01800537109375,
0.022003173828125,
-0.0007481575012207031,
-0.024871826171875,
-0.00127410888671875,
0.060211181640625,
0.03326416015625,
0.01497650146484375,
0.0132904052734375,
-0.02044677734375,
-0.044921875,
-0.01690673828125,
-0.038482666015625,
0.00432586669921875,
-0.0078582763671875,
-0.033447265625,
-0.07147216796875,
-0.015899658203125,
-0.0197906494140625,
0.002384185791015625,
-0.0081329345703125,
-0.0103912353515625,
-0.0203704833984375,
-0.06646728515625,
0.0140838623046875,
-0.005084991455078125,
-0.038665771484375,
0.00397491455078125,
0.0311279296875,
0.030181884765625,
-0.01727294921875,
0.035736083984375,
0.01934814453125,
0.0252532958984375,
0.024261474609375,
0.0182952880859375,
-0.0206298828125,
0.0018024444580078125,
0.0271759033203125,
-0.00978851318359375,
-0.003383636474609375,
-0.024261474609375,
0.0128631591796875,
0.003803253173828125,
0.00439453125,
-0.01374053955078125,
-0.0295867919921875,
0.056243896484375,
0.0672607421875,
0.002910614013671875,
-0.01381683349609375,
-0.0172119140625,
0.037628173828125,
-0.0012674331665039062,
-0.018096923828125,
-0.054901123046875,
-0.07684326171875,
0.03546142578125,
0.006839752197265625,
0.0269622802734375,
0.0139007568359375,
-0.007663726806640625,
0.05731201171875,
-0.00433349609375,
0.0016794204711914062,
-0.037841796875,
-0.0225067138671875,
-0.04559326171875,
0.04864501953125,
-0.05633544921875,
-0.013397216796875,
-0.011505126953125,
-0.017608642578125,
0.046173095703125,
-0.0080718994140625,
-0.048797607421875,
0.02593994140625,
-0.0338134765625,
-0.0170745849609375,
0.03118896484375,
-0.00646209716796875,
0.042633056640625,
0.040985107421875,
-0.0269775390625,
-0.020172119140625,
-0.0304412841796875,
-0.008758544921875,
-0.060150146484375,
0.0121307373046875,
0.0157318115234375,
-0.00519561767578125,
0.01739501953125,
0.047454833984375,
0.039093017578125,
0.01485443115234375,
-0.01873779296875,
-0.0205535888671875,
-0.0204315185546875,
0.045379638671875,
0.009521484375,
-0.0032978057861328125,
-0.004589080810546875,
0.04388427734375,
0.023712158203125,
-0.047119140625,
-0.0196685791015625,
0.032623291015625,
0.049591064453125,
-0.0312042236328125,
-0.043060302734375,
0.02020263671875,
-0.023345947265625,
0.00397491455078125,
0.0419921875,
-0.007625579833984375,
-0.03204345703125,
-0.0173187255859375,
0.0033779144287109375,
0.044586181640625,
-0.0290069580078125,
-0.0200347900390625,
0.007396697998046875,
-0.045013427734375,
0.0277252197265625,
0.0286407470703125,
-0.0023193359375,
-0.00843048095703125,
-0.00800323486328125,
0.0230865478515625,
-0.0301055908203125,
-0.016510009765625,
0.0168304443359375,
0.0280303955078125,
-0.04827880859375,
-0.01409149169921875,
0.06475830078125,
-0.0222930908203125,
0.04376220703125,
-0.02606201171875,
-0.017181396484375,
0.031951904296875,
-0.0059967041015625,
0.06707763671875,
0.03094482421875,
-0.050811767578125,
0.006023406982421875,
-0.04132080078125,
0.005435943603515625,
0.021942138671875,
-0.01421356201171875,
-0.01259613037109375,
-0.02044677734375,
0.00942230224609375,
0.0210723876953125,
0.01253509521484375,
0.01412200927734375,
-0.01009368896484375,
-0.0067138671875,
0.0062103271484375,
0.02130126953125,
-0.0126800537109375,
0.0216522216796875,
-0.0207061767578125,
0.0391845703125,
-0.0250244140625,
0.0137176513671875,
0.0261993408203125,
-0.043060302734375,
0.016845703125,
-0.033111572265625,
-0.034271240234375,
-0.00577545166015625,
-0.01202392578125,
0.0086212158203125,
0.041015625,
-0.0244598388671875,
-0.02374267578125,
-0.0028076171875,
0.0202789306640625,
-0.033905029296875,
0.01360321044921875,
-0.0238189697265625,
-0.02850341796875,
-0.002597808837890625,
0.00447845458984375,
0.02777099609375,
0.00982666015625,
0.01085662841796875,
-0.01244354248046875,
-0.0036449432373046875,
-0.0029087066650390625,
-0.0118560791015625,
-0.033294677734375,
0.02398681640625,
0.0631103515625,
0.0073089599609375,
0.03265380859375,
0.0083465576171875,
0.0093536376953125,
0.036376953125,
-0.0498046875,
0.030914306640625,
0.025421142578125,
0.06475830078125,
-0.00296783447265625,
0.0267181396484375,
0.06585693359375,
-0.0181121826171875,
-0.0007753372192382812,
0.0653076171875,
0.0455322265625,
-0.07513427734375,
-0.0124969482421875,
-0.003383636474609375,
0.0038166046142578125,
0.0302886962890625,
-0.0038909912109375,
-0.004425048828125,
0.00847625732421875,
0.014251708984375,
0.00960540771484375,
-0.017852783203125,
0.01042938232421875,
0.039947509765625,
-0.01357269287109375,
0.030487060546875,
0.01505279541015625,
0.016937255859375,
-0.040740966796875,
0.0174407958984375,
0.035491943359375,
0.02032470703125,
-0.00939178466796875,
-0.027740478515625,
-0.0015058517456054688,
-0.020477294921875,
-0.013641357421875,
0.020843505859375,
-0.061431884765625,
0.04327392578125,
0.05499267578125,
0.01739501953125,
0.033538818359375,
0.033966064453125,
0.00006020069122314453,
0.01320648193359375,
-0.0021991729736328125,
-0.0168914794921875,
0.023223876953125,
-0.0360107421875,
-0.0015392303466796875,
0.0066986083984375,
-0.02734375,
0.0075225830078125,
0.007526397705078125,
-0.0290985107421875,
0.00165557861328125,
0.0290679931640625,
0.0694580078125,
-0.06475830078125,
-0.0113983154296875,
0.0182647705078125,
0.020416259765625,
0.01727294921875,
-0.006206512451171875,
0.00794219970703125,
-0.036712646484375,
-0.00905609130859375,
-0.0226287841796875,
-0.037353515625,
0.031036376953125,
-0.0178070068359375,
-0.097900390625,
0.1378173828125,
0.0278167724609375,
0.0816650390625,
0.00197601318359375,
0.03924560546875,
-0.04180908203125,
0.00919342041015625,
-0.0229339599609375,
0.090576171875,
0.004932403564453125,
0.041259765625,
-0.0237579345703125,
-0.00836181640625,
0.03662109375,
0.0200042724609375,
0.097900390625,
0.0206451416015625,
-0.0157012939453125,
0.01558685302734375,
0.050750732421875,
-0.0252532958984375,
-0.05072021484375,
0.0540771484375,
-0.021942138671875,
0.0177001953125,
0.0204620361328125,
-0.058441162109375,
0.0140228271484375,
-0.0048828125,
-0.03094482421875,
-0.005096435546875,
0.0166473388671875,
0.01039886474609375,
0.0201416015625,
-0.015472412109375,
-0.03033447265625,
0.0157012939453125,
0.0288543701171875,
-0.01922607421875,
0.01061248779296875,
-0.005916595458984375,
0.0187530517578125,
-0.081787109375,
0.004547119140625,
-0.03955078125,
0.04864501953125,
-0.005584716796875,
-0.0081329345703125,
-0.0137939453125,
0.006687164306640625,
-0.0028858184814453125,
-0.055755615234375,
-0.0136260986328125,
0.0217132568359375,
-0.052703857421875,
0.0927734375,
0.048248291015625,
0.04156494140625,
-0.00525665283203125,
0.00960540771484375,
0.0386962890625,
0.094970703125,
-0.05078125,
-0.0202178955078125,
0.00588226318359375,
-0.0283660888671875,
0.00262451171875,
-0.01103973388671875,
0.0215911865234375,
-0.0433349609375,
-0.0391845703125,
-0.0244903564453125,
0.00994873046875,
0.02532958984375,
0.031585693359375,
-0.03167724609375,
-0.041259765625,
-0.01495361328125,
0.00798797607421875,
-0.06719970703125,
0.02325439453125,
0.033294677734375,
0.060302734375,
0.00782012939453125,
0.050140380859375,
0.028076171875,
-0.040435791015625,
-0.0143280029296875,
0.0064239501953125,
-0.035430908203125,
0.02923583984375,
-0.06964111328125,
-0.046630859375,
-0.00009936094284057617,
0.0804443359375,
0.0504150390625,
-0.016021728515625,
0.0017414093017578125,
-0.02984619140625,
-0.026214599609375,
0.01036834716796875,
0.0017538070678710938,
-0.02117919921875,
0.06640625,
-0.03857421875,
0.035003662109375,
-0.0259857177734375,
-0.019744873046875,
-0.0279541015625,
0.0142669677734375,
0.0030078887939453125,
0.00525665283203125,
0.0350341796875,
-0.0033855438232421875,
-0.01490020751953125,
0.043853759765625,
0.001346588134765625,
0.045867919921875,
0.039794921875,
-0.0219573974609375,
-0.006320953369140625,
-0.01358795166015625,
-0.034149169921875,
0.0174102783203125,
0.0306396484375,
0.01226043701171875,
-0.0006918907165527344,
-0.0008401870727539062,
-0.004116058349609375,
0.01800537109375,
-0.00656890869140625,
-0.005863189697265625,
0.00681304931640625,
0.01727294921875,
-0.0047454833984375,
-0.040924072265625,
-0.00600433349609375,
0.006927490234375,
0.00006568431854248047,
-0.004352569580078125,
0.0921630859375,
-0.0270233154296875,
-0.00797271728515625,
-0.039764404296875,
-0.007129669189453125,
-0.01477813720703125,
-0.033447265625,
0.033233642578125,
0.013336181640625,
-0.00818634033203125,
-0.00379180908203125,
-0.058685302734375,
0.01526641845703125,
0.04522705078125,
0.0025997161865234375,
0.043304443359375,
-0.019866943359375,
0.00682830810546875,
-0.043060302734375,
-0.0035991668701171875,
-0.03924560546875,
-0.053985595703125,
-0.0257568359375,
-0.00010800361633300781,
-0.01035308837890625,
0.01245880126953125,
0.003021240234375,
0.03912353515625,
-0.01220703125,
-0.04541015625,
-0.0037136077880859375,
-0.060394287109375,
-0.0019388198852539062,
0.0430908203125,
0.01385498046875,
0.029754638671875,
0.02490234375,
-0.0181884765625,
0.0236968994140625,
0.01134490966796875,
-0.0140533447265625,
0.01396942138671875,
-0.0169525146484375,
-0.0426025390625,
-0.074951171875,
-0.0301513671875,
-0.01165008544921875,
-0.0328369140625,
-0.05780029296875,
0.01180267333984375,
-0.041473388671875,
-0.00923919677734375,
-0.0181427001953125,
-0.0027065277099609375,
-0.030059814453125,
0.0242156982421875,
-0.0222930908203125,
-0.019561767578125,
-0.03912353515625,
-0.000024557113647460938,
0.040252685546875,
0.004978179931640625,
-0.055145263671875,
0.0207977294921875,
-0.02783203125,
0.040557861328125,
-0.0233917236328125,
0.0028705596923828125,
-0.00556182861328125,
0.0025177001953125,
-0.050079345703125,
-0.0190277099609375,
-0.038604736328125,
0.00243377685546875,
-0.047149658203125,
-0.00029015541076660156,
0.04461669921875,
-0.021759033203125,
-0.055816650390625,
-0.048065185546875,
-0.013763427734375,
0.00835418701171875,
-0.004367828369140625,
0.003116607666015625,
0.01317596435546875,
0.005649566650390625,
-0.046478271484375,
-0.0259246826171875,
0.01155853271484375,
-0.0153045654296875,
-0.017364501953125,
0.007358551025390625,
-0.031829833984375,
-0.038970947265625,
-0.041107177734375,
-0.0496826171875,
0.01029205322265625,
0.0247802734375,
-0.022369384765625,
-0.0447998046875,
0.03314208984375,
0.00957489013671875,
0.0097808837890625,
-0.0057373046875,
-0.019256591796875,
-0.0207672119140625,
0.008209228515625,
-0.0022678375244140625,
0.03961181640625,
-0.01007843017578125,
-0.0008687973022460938,
0.039306640625,
0.051513671875,
0.06024169921875,
0.00904083251953125,
-0.0014514923095703125,
-0.0185699462890625,
0.031463623046875,
0.055450439453125,
-0.01401519775390625,
0.007175445556640625,
-0.0017404556274414062,
-0.0091552734375,
-0.022064208984375,
-0.0103759765625,
-0.035186767578125,
-0.02044677734375,
0.0687255859375,
0.060821533203125,
0.0200653076171875,
-0.017852783203125,
-0.04998779296875,
-0.00986480712890625,
-0.01018524169921875,
-0.0195465087890625,
0.03082275390625,
-0.0771484375,
-0.002323150634765625,
-0.00864410400390625,
0.0189361572265625,
0.0191497802734375,
-0.03369140625,
-0.01239013671875,
-0.00849151611328125,
-0.002536773681640625,
-0.00787353515625,
-0.0171356201171875,
0.0089569091796875,
0.06317138671875,
-0.02667236328125,
0.02606201171875,
-0.0207977294921875,
0.026336669921875,
0.0258636474609375,
-0.051177978515625,
0.0341796875,
0.0216217041015625,
-0.00183868408203125,
0.00238037109375,
0.04010009765625,
-0.0017375946044921875,
0.00611114501953125,
-0.041015625,
-0.01137542724609375,
0.0145416259765625,
0.007099151611328125,
0.00543212890625,
-0.0196685791015625,
0.01093292236328125,
0.0111541748046875,
0.0308685302734375,
0.0159759521484375,
0.01031494140625,
-0.0007662773132324219,
0.05780029296875,
0.00514984130859375,
-0.03961181640625,
0.006542205810546875,
-0.01873779296875,
-0.003620147705078125,
0.0179901123046875,
-0.0089263916015625,
-0.052337646484375,
0.036468505859375,
-0.0033702850341796875,
0.0093841552734375,
0.0238800048828125
]
|
6bef250e81fc47f570e912d4ccf5ef241719d2e3 | Wordpress Stackexchange
Q: How can I debug the TTFB in WP? I'm developing a WP theme, based on _s default theme with WP 4.1.1.
I keep getting a TTFB(time to first byte) of 22s, consistently both on the front and back of the site, while on localhost.
Here's a print from DevTools:
I'm using the Debug Bar plugin, so I can see on the Queries and Profiler tabs that this is not a database or execution time problem(the sum of both takes 700ms). I guess it's not a rewrite problem either, since it behaves the same on the default permalink structure.
Other wordpress sites on my www don't have the same problem, so I'm discarding the server configuration. I also tried to load in incognito mode, without any difference.
Is there a way to debug this a little deeper?
A: Meanwhile, I found some plugins and tools that can help with this:
*
*Query Monitor
*Laps
*Debug Bar with some add-ons(Slow Actions, Rewrite Rules, etc.)
If you really wanna go deep, try using Webgrind.
Not the most friendly tool, but it'll do the job.
Be aware that some of this tools will also have an impact on performance.
| Q: How can I debug the TTFB in WP? I'm developing a WP theme, based on _s default theme with WP 4.1.1.
I keep getting a TTFB(time to first byte) of 22s, consistently both on the front and back of the site, while on localhost.
Here's a print from DevTools:
I'm using the Debug Bar plugin, so I can see on the Queries and Profiler tabs that this is not a database or execution time problem(the sum of both takes 700ms). I guess it's not a rewrite problem either, since it behaves the same on the default permalink structure.
Other wordpress sites on my www don't have the same problem, so I'm discarding the server configuration. I also tried to load in incognito mode, without any difference.
Is there a way to debug this a little deeper?
A: Meanwhile, I found some plugins and tools that can help with this:
*
*Query Monitor
*Laps
*Debug Bar with some add-ons(Slow Actions, Rewrite Rules, etc.)
If you really wanna go deep, try using Webgrind.
Not the most friendly tool, but it'll do the job.
Be aware that some of this tools will also have an impact on performance.
| wordpress | {
"language": "en",
"length": 196,
"provenance": "stackexchange_00019.jsonl.gz:454558",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/183747"
} | [
-0.006000518798828125,
-0.024261474609375,
0.0006361007690429688,
0.0040740966796875,
-0.026153564453125,
0.0016336441040039062,
0.008514404296875,
-0.01611328125,
0.009552001953125,
0.0205841064453125,
0.0248870849609375,
-0.0258331298828125,
-0.009002685546875,
-0.03875732421875,
-0.0304412841796875,
-0.00036215782165527344,
0.0440673828125,
-0.051177978515625,
0.001949310302734375,
0.006465911865234375,
-0.0164947509765625,
0.0310821533203125,
0.0101470947265625,
0.0169219970703125,
0.044647216796875,
-0.03521728515625,
0.1055908203125,
-0.010101318359375,
0.056793212890625,
0.0032939910888671875,
0.044342041015625,
-0.044952392578125,
-0.00836181640625,
0.0728759765625,
-0.033843994140625,
0.0165863037109375,
-0.0246124267578125,
0.038421630859375,
0.026031494140625,
0.0032176971435546875,
0.014495849609375,
-0.000762939453125,
0.050750732421875,
0.07672119140625,
0.007671356201171875,
-0.0709228515625,
0.03009033203125,
-0.06768798828125,
0.002685546875,
0.004619598388671875,
-0.01800537109375,
0.01715087890625,
-0.0021514892578125,
0.018463134765625,
-0.0283966064453125,
-0.04730224609375,
-0.0057830810546875,
0.05389404296875,
0.002803802490234375,
-0.017608642578125,
-0.0045928955078125,
0.0273284912109375,
0.0030879974365234375,
0.0103912353515625,
-0.0236968994140625,
0.0300750732421875,
0.026336669921875,
-0.003177642822265625,
0.05328369140625,
-0.0178070068359375,
-0.0394287109375,
0.01654052734375,
0.00408935546875,
-0.01532745361328125,
-0.0039825439453125,
-0.018218994140625,
0.053985595703125,
-0.0005092620849609375,
-0.0186920166015625,
0.0143890380859375,
-0.00356292724609375,
-0.072509765625,
-0.030609130859375,
0.006069183349609375,
0.0032196044921875,
0.019561767578125,
-0.0029296875,
0.002353668212890625,
-0.0196990966796875,
-0.026275634765625,
-0.032012939453125,
-0.0006237030029296875,
-0.016510009765625,
-0.0109710693359375,
-0.02447509765625,
-0.034393310546875,
0.0160675048828125,
-0.0205841064453125,
0.00007271766662597656,
-0.0247650146484375,
0.02996826171875,
-0.05078125,
0.0099334716796875,
0.01145172119140625,
-0.0004627704620361328,
0.0101318359375,
-0.00389862060546875,
0.032501220703125,
0.054229736328125,
0.02398681640625,
-0.0008935928344726562,
0.043487548828125,
0.01078033447265625,
-0.0194854736328125,
-0.039825439453125,
0.0228729248046875,
0.012786865234375,
-0.0176239013671875,
0.006389617919921875,
-0.0186614990234375,
0.00896453857421875,
0.037139892578125,
-0.007434844970703125,
-0.0174407958984375,
0.00019991397857666016,
0.00457763671875,
0.0016498565673828125,
-0.0312347412109375,
0.0003325939178466797,
-0.0029659271240234375,
-0.0135498046875,
0.034027099609375,
0.0109405517578125,
0.022125244140625,
-0.00963592529296875,
0.0004715919494628906,
0.0253753662109375,
-0.0401611328125,
-0.00324249267578125,
0.032928466796875,
-0.0236968994140625,
-0.040924072265625,
0.016082763671875,
-0.019805908203125,
-0.04443359375,
0.0271759033203125,
0.019195556640625,
0.0176544189453125,
-0.0174102783203125,
-0.061920166015625,
0.00650787353515625,
-0.02825927734375,
0.0540771484375,
-0.01080322265625,
-0.0032482147216796875,
-0.054779052734375,
0.043121337890625,
-0.05133056640625,
0.011871337890625,
-0.0433349609375,
0.006008148193359375,
-0.0299835205078125,
-0.016143798828125,
-0.00432586669921875,
-0.0230255126953125,
0.036041259765625,
-0.0016107559204101562,
0.008941650390625,
0.0305023193359375,
-0.00858306884765625,
0.04327392578125,
-0.010345458984375,
0.02001953125,
-0.007656097412109375,
-0.016693115234375,
0.00785064697265625,
-0.0116729736328125,
0.0214385986328125,
0.020660400390625,
0.01195526123046875,
-0.0037994384765625,
-0.036376953125,
0.07110595703125,
-0.0244598388671875,
0.01097869873046875,
0.0277252197265625,
0.0279388427734375,
0.0809326171875,
-0.021209716796875,
0.0389404296875,
-0.07421875,
0.0188751220703125,
-0.0148162841796875,
0.052825927734375,
0.0004343986511230469,
-0.041839599609375,
-0.05181884765625,
-0.014984130859375,
-0.040252685546875,
-0.0037326812744140625,
0.022918701171875,
0.0180816650390625,
-0.039642333984375,
-0.0201263427734375,
-0.0775146484375,
-0.03497314453125,
-0.00351715087890625,
0.01995849609375,
0.033782958984375,
-0.0240478515625,
-0.0057220458984375,
-0.0196685791015625,
0.002597808837890625,
-0.01149749755859375,
-0.04022216796875,
0.052764892578125,
-0.023284912109375,
0.019134521484375,
0.00299072265625,
-0.006114959716796875,
0.00102996826171875,
0.0032176971435546875,
0.00714874267578125,
0.00228118896484375,
0.0189666748046875,
0.02099609375,
-0.0163726806640625,
0.01116943359375,
0.06988525390625,
0.0259552001953125,
0.025115966796875,
-0.016387939453125,
-0.040740966796875,
-0.0010080337524414062,
-0.034942626953125,
-0.024200439453125,
-0.039398193359375,
-0.035400390625,
0.0215301513671875,
0.047821044921875,
0.04339599609375,
0.03570556640625,
0.006732940673828125,
-0.0203094482421875,
0.04010009765625,
-0.09100341796875,
-0.01239776611328125,
-0.0105133056640625,
0.037139892578125,
0.0192718505859375,
-0.0430908203125,
-0.054229736328125,
0.0340576171875,
-0.0513916015625,
-0.0030689239501953125,
0.041168212890625,
-0.004108428955078125,
-0.0090789794921875,
-0.003353118896484375,
0.003963470458984375,
0.0180511474609375,
0.003978729248046875,
-0.018890380859375,
0.006175994873046875,
0.06671142578125,
-0.014312744140625,
0.0228424072265625,
-0.002338409423828125,
-0.0308074951171875,
0.035491943359375,
0.0195770263671875,
-0.052825927734375,
-0.007732391357421875,
-0.032562255859375,
0.0259246826171875,
0.004726409912109375,
-0.042022705078125,
0.0211639404296875,
0.01444244384765625,
-0.01369476318359375,
-0.0239715576171875,
0.050994873046875,
0.0243988037109375,
-0.01690673828125,
-0.0248565673828125,
-0.042327880859375,
0.01739501953125,
-0.029144287109375,
0.0158843994140625,
-0.053131103515625,
-0.0271148681640625,
0.035675048828125,
-0.0133056640625,
0.0704345703125,
-0.01010894775390625,
-0.033660888671875,
0.0599365234375,
-0.0085296630859375,
0.0212860107421875,
-0.00736236572265625,
0.040191650390625,
0.042510986328125,
-0.0168609619140625,
0.017913818359375,
0.0043182373046875,
0.01099395751953125,
0.0176239013671875,
0.001399993896484375,
-0.0154571533203125,
-0.01114654541015625,
-0.012359619140625,
-0.0021228790283203125,
0.0186767578125,
0.03607177734375,
-0.01137542724609375,
-0.04034423828125,
-0.0316162109375,
0.006008148193359375,
-0.0931396484375,
-0.0867919921875,
-0.0791015625,
-0.09423828125,
-0.00823974609375,
-0.0037403106689453125,
-0.0501708984375,
0.01399993896484375,
0.029083251953125,
0.023712158203125,
-0.007442474365234375,
-0.03131103515625,
-0.024444580078125,
-0.052520751953125,
-0.043426513671875,
-0.021484375,
0.00579071044921875,
-0.006435394287109375,
0.0049591064453125,
0.046234130859375,
0.00324249267578125,
-0.00832366943359375,
0.00565338134765625,
0.02069091796875,
-0.006710052490234375,
-0.037017822265625,
-0.016021728515625,
0.0161590576171875,
0.02069091796875,
0.015380859375,
-0.07403564453125,
-0.01377105712890625,
0.0263824462890625,
-0.053070068359375,
-0.00171661376953125,
-0.0293121337890625,
-0.005535125732421875,
0.004161834716796875,
-0.00018227100372314453,
-0.006511688232421875,
0.02117919921875,
-0.04296875,
-0.007228851318359375,
0.006683349609375,
-0.00868988037109375,
-0.00606536865234375,
0.00194549560546875,
-0.0260772705078125,
-0.01110076904296875,
0.009490966796875,
0.02191162109375,
-0.00286102294921875,
0.04205322265625,
-0.01082611083984375,
0.0628662109375,
-0.0235443115234375,
-0.0211334228515625,
-0.0673828125,
0.035186767578125,
-0.0254058837890625,
0.021331787109375,
0.01334381103515625,
0.0157470703125,
0.00440216064453125,
-0.01031494140625,
-0.01416778564453125,
-0.00714111328125,
0.021148681640625,
0.0081939697265625,
0.039154052734375,
-0.00627899169921875,
-0.018218994140625,
-0.004245758056640625,
0.056060791015625,
-0.031585693359375,
0.01091766357421875,
-0.024993896484375,
0.0037975311279296875,
-0.0104827880859375,
-0.05975341796875,
-0.04693603515625,
0.005123138427734375,
-0.0531005859375,
-0.00113677978515625,
0.001556396484375,
-0.0447998046875,
-0.017730712890625,
0.002513885498046875,
-0.0521240234375,
-0.0274200439453125,
0.00725555419921875,
-0.044189453125,
0.006595611572265625,
-0.0020618438720703125,
0.00420379638671875,
-0.037567138671875,
0.004642486572265625,
-0.06658935546875,
-0.0426025390625,
-0.022979736328125,
0.004314422607421875,
0.0482177734375,
0.006290435791015625,
-0.02496337890625,
-0.0034580230712890625,
0.03167724609375,
-0.01433563232421875,
0.0012731552124023438,
0.03228759765625,
0.01204681396484375,
0.0268096923828125,
0.024627685546875,
0.004512786865234375,
-0.004055023193359375,
-0.01398468017578125,
-0.01360321044921875,
-0.048370361328125,
0.02813720703125,
0.00518798828125,
0.034698486328125,
0.0270233154296875,
-0.01265716552734375,
-0.01488494873046875,
-0.04608154296875,
-0.0248565673828125,
0.0298614501953125,
-0.0175018310546875,
0.009246826171875,
-0.061065673828125,
-0.0045928955078125,
0.017913818359375,
-0.049530029296875,
-0.00835418701171875,
0.00315093994140625,
0.0714111328125,
0.015777587890625,
-0.0014829635620117188,
0.0266876220703125,
-0.0206298828125,
0.033050537109375,
0.02294921875,
0.0106964111328125,
-0.0004856586456298828,
-0.029937744140625,
0.033935546875,
0.02069091796875,
0.0287322998046875,
-0.0020389556884765625,
0.01415252685546875,
-0.00048732757568359375,
-0.01528167724609375,
0.0103912353515625,
0.0204010009765625,
-0.01229095458984375,
0.0268402099609375,
-0.02716064453125,
0.017791748046875,
-0.035797119140625,
0.009033203125,
0.0032901763916015625,
0.0007724761962890625,
-0.0283355712890625,
-0.05859375,
0.0244598388671875,
-0.00043463706970214844,
0.08856201171875,
-0.00897979736328125,
0.02197265625,
0.07537841796875,
0.051788330078125,
-0.0139617919921875,
0.019134521484375,
0.014129638671875,
0.038055419921875,
0.0121307373046875,
0.0439453125,
0.0038700103759765625,
-0.02203369140625,
-0.02154541015625,
0.067626953125,
-0.00682830810546875,
-0.04583740234375,
0.00020492076873779297,
0.004039764404296875,
0.044403076171875,
0.017120361328125,
0.01276397705078125,
0.03143310546875,
-0.00559234619140625,
-0.002277374267578125,
0.024139404296875,
0.034423828125,
-0.04144287109375,
-0.00911712646484375,
0.064453125,
-0.008026123046875,
-0.001041412353515625,
0.0277862548828125,
0.00588226318359375,
-0.01088714599609375,
0.009674072265625,
-0.00292205810546875,
0.018585205078125,
0.022308349609375,
0.022613525390625,
0.021697998046875,
-0.03668212890625,
0.008392333984375,
-0.00969696044921875,
0.039154052734375,
-0.040435791015625,
0.020111083984375,
-0.0142822265625,
0.05426025390625,
-0.026763916015625,
-0.04571533203125,
0.0479736328125,
-0.047393798828125,
-0.01309967041015625,
0.0018758773803710938,
-0.0068511962890625,
-0.0276031494140625,
0.00016295909881591797,
-0.035369873046875,
-0.0240020751953125,
-0.01209259033203125,
0.02752685546875,
0.0235137939453125,
0.049468994140625,
0.055877685546875,
-0.0386962890625,
0.033966064453125,
-0.02294921875,
-0.0162200927734375,
0.003612518310546875,
-0.051177978515625,
-0.021728515625,
0.049957275390625,
0.033203125,
-0.00923919677734375,
-0.031341552734375,
0.01241302490234375,
-0.01837158203125,
-0.006717681884765625,
-0.0255279541015625,
0.0012655258178710938,
-0.01311492919921875,
-0.003253936767578125,
0.070556640625,
0.036956787109375,
-0.00305938720703125,
-0.020111083984375,
-0.03875732421875,
-0.043853759765625,
-0.02642822265625,
-0.004596710205078125,
-0.030548095703125,
0.002399444580078125,
-0.02825927734375,
-0.004619598388671875,
0.0219268798828125,
0.04376220703125,
0.0176849365234375,
0.020721435546875,
-0.039215087890625,
-0.0246429443359375,
-0.0126495361328125,
0.01154327392578125,
0.0018014907836914062,
-0.040924072265625,
-0.00019073486328125,
0.0171051025390625,
0.034759521484375,
-0.009063720703125,
0.040863037109375,
0.035064697265625,
-0.049591064453125,
-0.06427001953125,
-0.00928497314453125,
-0.024993896484375,
0.08245849609375,
-0.041656494140625,
0.0038776397705078125,
-0.0064544677734375,
0.0038700103759765625,
-0.01357269287109375,
0.040771484375,
0.00693511962890625,
0.031707763671875,
0.01435089111328125,
-0.00021517276763916016,
-0.032440185546875,
-0.017059326171875,
-0.0300750732421875,
0.004871368408203125,
0.022491455078125,
-0.0302581787109375,
-0.007785797119140625,
-0.00225830078125,
0.0189666748046875,
0.059326171875,
-0.02093505859375,
0.0335693359375,
0.027374267578125,
0.005168914794921875,
0.022674560546875,
0.0401611328125,
-0.0238494873046875,
-0.057861328125,
0.0242767333984375,
0.0086517333984375,
0.0018138885498046875,
0.0170135498046875,
-0.0218048095703125,
-0.0215301513671875,
-0.0175323486328125,
0.0010290145874023438,
-0.007465362548828125,
0.01337432861328125,
-0.00958251953125,
-0.01479339599609375,
-0.024139404296875,
-0.01922607421875,
-0.0035552978515625,
-0.0179595947265625,
0.081787109375,
0.005764007568359375,
0.01032257080078125,
0.051300048828125,
-0.0008044242858886719,
-0.003299713134765625,
-0.01190948486328125,
0.042510986328125,
0.01611328125,
-0.045135498046875,
0.0164794921875,
0.056182861328125,
-0.00804901123046875,
-0.054412841796875,
0.0007419586181640625,
-0.00038909912109375,
-0.0269927978515625,
-0.044281005859375,
0.0234222412109375,
0.0188446044921875,
0.01346588134765625,
0.028594970703125,
0.04302978515625,
-0.005146026611328125,
0.0231475830078125,
-0.0010347366333007812,
-0.0194244384765625,
0.005352020263671875,
-0.0026378631591796875,
0.0172119140625,
-0.005496978759765625,
0.0338134765625,
0.0433349609375,
-0.0762939453125,
0.017669677734375,
-0.006961822509765625,
0.02655029296875,
-0.016876220703125,
0.002391815185546875,
0.10357666015625,
-0.02587890625,
-0.00902557373046875,
0.039642333984375,
-0.00616455078125,
-0.0297698974609375,
-0.0484619140625,
-0.0015268325805664062,
-0.04376220703125,
0.0013933181762695312,
-0.02276611328125,
0.0178070068359375,
0.01312255859375,
-0.02008056640625,
-0.0565185546875,
0.055908203125,
0.0037708282470703125,
0.0146484375,
0.0010929107666015625,
0.017425537109375,
-0.035064697265625,
-0.0115966796875,
-0.031890869140625,
0.06915283203125,
0.00959014892578125,
0.02777099609375,
-0.0628662109375,
-0.01029205322265625,
0.006744384765625,
0.03326416015625,
0.0374755859375,
0.0023784637451171875,
-0.01418304443359375,
-0.014862060546875,
0.04461669921875,
0.04150390625,
0.005859375,
0.0164337158203125,
-0.0222930908203125,
-0.004619598388671875,
-0.00991058349609375,
-0.007781982421875,
0.02972412109375,
0.0066680908203125,
-0.0675048828125,
0.0128631591796875,
0.0184173583984375,
0.0160369873046875,
0.0174560546875,
0.03936767578125,
-0.0263824462890625,
0.0083465576171875,
0.0288238525390625,
0.01486968994140625,
-0.033172607421875,
0.075439453125,
0.053070068359375,
-0.0631103515625,
-0.06658935546875,
-0.03887939453125,
0.048248291015625,
0.0141143798828125,
0.0175628662109375,
0.033782958984375,
0.033111572265625,
0.043548583984375,
-0.04864501953125,
0.01593017578125,
-0.005184173583984375,
-0.04608154296875,
0.028717041015625,
0.00034928321838378906,
0.0160675048828125,
-0.06787109375,
-0.0380859375,
0.06072998046875,
0.07025146484375,
-0.0289306640625,
-0.050537109375,
0.0006856918334960938,
-0.0275421142578125,
0.01190185546875,
-0.002307891845703125,
0.0027904510498046875,
-0.0487060546875,
-0.006488800048828125,
-0.01053619384765625,
-0.0250701904296875,
0.00963592529296875,
-0.0238800048828125,
0.01262664794921875,
0.069091796875,
0.0367431640625,
-0.0004830360412597656,
-0.01263427734375,
-0.00681304931640625,
0.0155029296875,
0.0030689239501953125,
0.00260162353515625,
0.0246734619140625,
0.0309295654296875,
0.023834228515625,
-0.01195526123046875,
0.03131103515625,
-0.0311431884765625,
-0.007091522216796875,
-0.0085906982421875,
-0.0267486572265625,
-0.018341064453125,
0.0223846435546875,
-0.0091094970703125,
-0.0022296905517578125,
0.03961181640625,
0.031890869140625,
-0.055572509765625,
-0.0237579345703125,
0.06756591796875,
-0.02789306640625,
-0.040374755859375,
-0.039093017578125,
0.0015954971313476562,
0.03619384765625,
0.01308441162109375,
0.0287017822265625,
0.039337158203125,
0.01727294921875,
0.0156402587890625,
-0.0242156982421875,
0.03216552734375,
-0.032318115234375,
0.0090484619140625,
-0.002773284912109375,
-0.040618896484375,
0.0382080078125,
-0.005908966064453125,
0.01406097412109375,
0.046173095703125,
-0.0750732421875,
-0.0283660888671875,
0.0295867919921875,
-0.0107269287109375,
-0.00836944580078125,
-0.00449371337890625,
-0.0055999755859375,
-0.04541015625,
0.023345947265625,
0.033935546875,
-0.01088714599609375,
-0.017547607421875,
0.004669189453125,
-0.0760498046875,
-0.0352783203125,
-0.0166778564453125,
0.022796630859375,
-0.02557373046875,
0.10595703125,
-0.00843048095703125,
-0.004261016845703125,
0.03167724609375,
-0.050323486328125,
0.06243896484375,
0.04150390625,
-0.033905029296875,
0.0261077880859375,
0.00887298583984375,
-0.034698486328125,
-0.09375,
-0.005706787109375,
0.0313720703125,
0.0191802978515625,
0.02447509765625,
0.007396697998046875,
0.03399658203125,
-0.0018644332885742188,
-0.0445556640625,
-0.037841796875,
-0.029815673828125,
0.039459228515625,
0.03863525390625,
-0.04193115234375,
-0.044097900390625,
-0.03204345703125,
0.01690673828125,
0.059173583984375,
0.027587890625,
0.0020198822021484375,
0.01430511474609375,
0.018768310546875,
0.03363037109375,
-0.035491943359375,
-0.01971435546875,
-0.00914764404296875,
-0.00640869140625,
-0.0008611679077148438,
0.01007843017578125,
0.0316162109375,
0.0093841552734375,
0.041290283203125,
0.0221710205078125,
0.07403564453125,
0.0374755859375,
-0.037567138671875,
0.01525115966796875,
0.058197021484375,
-0.01617431640625,
0.009979248046875,
0.035430908203125,
0.005847930908203125,
0.0145263671875,
-0.0176544189453125,
0.00016582012176513672,
0.00635528564453125,
-0.007808685302734375,
-0.0167236328125,
-0.0160980224609375,
0.0234832763671875,
-0.00370025634765625,
-0.0201568603515625,
0.04541015625,
-0.02630615234375,
-0.03271484375,
-0.01030731201171875,
0.03973388671875,
-0.0080108642578125,
0.01000213623046875,
-0.0780029296875,
-0.0714111328125,
-0.0191497802734375,
0.059295654296875,
-0.06390380859375,
0.002777099609375,
0.038665771484375,
0.0090789794921875,
-0.02313232421875,
-0.0307769775390625,
-0.00623321533203125,
0.0181884765625,
-0.06463623046875,
-0.07244873046875,
0.0247955322265625,
-0.0455322265625,
0.0347900390625,
-0.0552978515625,
-0.036041259765625,
-0.1170654296875,
0.042816162109375,
0.0291900634765625,
-0.029998779296875,
-0.0061798095703125,
-0.0279083251953125,
-0.01436614990234375,
0.0301055908203125,
0.021392822265625,
-0.023681640625,
-0.07452392578125,
0.001705169677734375,
-0.003665924072265625,
-0.0052490234375,
-0.03045654296875,
-0.016845703125,
-0.027069091796875,
0.044830322265625,
0.0096282958984375,
-0.0027484893798828125,
0.02734375,
0.0102691650390625,
-0.0229034423828125,
0.00820159912109375,
0.00716400146484375,
-0.0103759765625,
-0.0228271484375,
0.006195068359375,
0.02655029296875,
0.01496124267578125,
-0.0160675048828125,
-0.004306793212890625,
0.0217437744140625,
0.002193450927734375,
0.0022869110107421875,
-0.0037384033203125,
-0.0279388427734375,
0.00691986083984375,
0.0628662109375,
0.04693603515625,
0.02337646484375,
-0.03485107421875,
-0.0243988037109375,
-0.00734710693359375,
-0.024322509765625,
0.0135498046875,
0.015777587890625,
-0.0577392578125,
0.01082611083984375,
0.0103607177734375,
0.0246429443359375,
-0.01995849609375,
-0.0032444000244140625,
0.0022106170654296875,
-0.0110931396484375,
0.043060302734375,
0.022125244140625,
-0.007625579833984375,
-0.031524658203125,
0.0228729248046875,
-0.0177001953125,
-0.0161895751953125,
-0.0051727294921875,
0.030853271484375,
-0.00868988037109375,
-0.006427764892578125,
0.0193023681640625,
0.018157958984375,
-0.03155517578125,
0.010833740234375,
0.0186309814453125,
0.013153076171875,
-0.019775390625,
-0.0261383056640625,
0.0019016265869140625,
-0.00001537799835205078,
-0.007274627685546875,
-0.006542205810546875,
0.044219970703125,
-0.049285888671875,
-0.0309600830078125,
0.0487060546875,
-0.0235748291015625,
0.06683349609375,
-0.022918701171875,
0.044891357421875,
-0.01514434814453125,
-0.0017385482788085938,
0.038665771484375,
-0.02740478515625,
0.0124664306640625,
0.045654296875,
0.0279083251953125,
-0.0259552001953125,
-0.0011138916015625,
-0.05078125,
0.032745361328125,
-0.0038433074951171875
]
|
23a4b98f47750830751b46ba2e409f9f5d541a3b | Wordpress Stackexchange
Q: Is there a way to merge two users? I have two users and I would like to merge then into one.
All the answers I could find online to this question focus on transferring ownership of posts, but this is a network site and I need to transfer permissions and roles as well.
Is there an easy way to do this?
A: Generally speaking I agree with most of the other answers but, if for some reason you really had to merge two accounts here is how that could work.
Merging User-B into User-A
*
*Reassign all of User-B's content to User-A
*Determine the highest privilege of User-B
*If higher than the privileges of User-A elevate User-A's privileges else do nothing.
*If you have extended the WordPress's native users account you'll want to add that logic here too.
*Delete User-B and do some clean up.
| Q: Is there a way to merge two users? I have two users and I would like to merge then into one.
All the answers I could find online to this question focus on transferring ownership of posts, but this is a network site and I need to transfer permissions and roles as well.
Is there an easy way to do this?
A: Generally speaking I agree with most of the other answers but, if for some reason you really had to merge two accounts here is how that could work.
Merging User-B into User-A
*
*Reassign all of User-B's content to User-A
*Determine the highest privilege of User-B
*If higher than the privileges of User-A elevate User-A's privileges else do nothing.
*If you have extended the WordPress's native users account you'll want to add that logic here too.
*Delete User-B and do some clean up.
A: No, you cannot merge two users. What you can actually do is add the new user then transfer all the posts to him.
When you add the new user you can define his rule. In your case the new user should be an 'Admin'. Thus he will have access to all the contents as well as rights for everything. Moreover this simple process is also very easy to perform
A: What's easy to do is transferring posts of a user to another user. I think you can just simply delete it and transfer everything to an existing user. But user roles… I'm not sure why you'll have to transfer that to another user. Can't you just simple create another user with the same permiossions and merge the posts of both?
A: Check this plugin, will be beneficial for you https://wordpress.org/plugins/wp-user-merger/
| wordpress | {
"language": "en",
"length": 287,
"provenance": "stackexchange_00019.jsonl.gz:454580",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/183832"
} | [
0.0484619140625,
-0.007495880126953125,
-0.0210723876953125,
-0.0195159912109375,
0.004924774169921875,
-0.04150390625,
0.03533935546875,
-0.021270751953125,
0.00817108154296875,
0.0197296142578125,
-0.024810791015625,
0.002582550048828125,
0.0048065185546875,
-0.0177154541015625,
-0.0104827880859375,
-0.0284881591796875,
0.0167388916015625,
0.0110931396484375,
0.00799560546875,
-0.006046295166015625,
-0.01503753662109375,
-0.00717926025390625,
0.0230560302734375,
-0.002964019775390625,
0.012603759765625,
-0.002674102783203125,
-0.006153106689453125,
-0.00791168212890625,
-0.017669677734375,
-0.024658203125,
0.00807952880859375,
0.0247802734375,
-0.0201873779296875,
0.001743316650390625,
0.02197265625,
-0.031768798828125,
0.03070068359375,
0.002552032470703125,
0.03863525390625,
-0.0109100341796875,
0.0045623779296875,
0.0099639892578125,
0.0015630722045898438,
0.0390625,
-0.0261688232421875,
-0.06585693359375,
0.035980224609375,
-0.0184478759765625,
0.054046630859375,
-0.00850677490234375,
0.005649566650390625,
0.0168609619140625,
0.0089263916015625,
-0.016326904296875,
-0.010467529296875,
0.0178070068359375,
0.0203094482421875,
-0.051055908203125,
0.0543212890625,
-0.0298614501953125,
-0.044342041015625,
-0.0638427734375,
0.05010986328125,
-0.0310516357421875,
-0.00044608116149902344,
-0.00084686279296875,
-0.01058197021484375,
0.0086517333984375,
-0.0333251953125,
-0.0025482177734375,
0.03350830078125,
-0.0298004150390625,
-0.007293701171875,
0.02508544921875,
0.009521484375,
-0.00206756591796875,
-0.01360321044921875,
0.01145172119140625,
0.020416259765625,
0.04736328125,
-0.041839599609375,
0.0030269622802734375,
-0.04339599609375,
-0.0290069580078125,
-0.02716064453125,
-0.0301666259765625,
-0.0189361572265625,
0.006500244140625,
0.0006656646728515625,
-0.00899505615234375,
-0.0004029273986816406,
-0.033477783203125,
-0.034881591796875,
0.049163818359375,
0.00292205810546875,
-0.0218505859375,
0.04644775390625,
0.04095458984375,
-0.018951416015625,
0.0055389404296875,
0.00968170166015625,
-0.047393798828125,
0.0289764404296875,
-0.01776123046875,
0.01239776611328125,
0.021697998046875,
-0.01197052001953125,
-0.005218505859375,
0.023834228515625,
0.02301025390625,
-0.01155853271484375,
0.0265960693359375,
-0.033203125,
-0.05047607421875,
0.03680419921875,
0.060302734375,
-0.03497314453125,
0.06329345703125,
0.0080718994140625,
0.0484619140625,
-0.034393310546875,
0.00933837890625,
-0.0310821533203125,
0.058837890625,
-0.03497314453125,
-0.018829345703125,
0.035736083984375,
-0.007137298583984375,
-0.03021240234375,
0.00014281272888183594,
-0.01157379150390625,
0.036468505859375,
0.07171630859375,
0.0288543701171875,
-0.0170440673828125,
-0.007640838623046875,
0.04718017578125,
-0.005519866943359375,
-0.0154266357421875,
0.0180816650390625,
0.015594482421875,
-0.02294921875,
-0.03851318359375,
-0.004985809326171875,
-0.0287322998046875,
0.0325927734375,
0.0194549560546875,
0.01561737060546875,
-0.01337432861328125,
-0.0810546875,
0.021728515625,
-0.049957275390625,
-0.03009033203125,
0.022491455078125,
0.051910400390625,
-0.0155487060546875,
-0.0021533966064453125,
-0.02166748046875,
0.07330322265625,
-0.0003044605255126953,
-0.01186370849609375,
-0.0010881423950195312,
0.0631103515625,
0.054290771484375,
0.0261688232421875,
0.031036376953125,
-0.005817413330078125,
0.0033435821533203125,
0.02593994140625,
-0.09228515625,
0.01165771484375,
-0.00785064697265625,
0.03680419921875,
0.005126953125,
0.020050048828125,
0.036285400390625,
0.03082275390625,
0.0041656494140625,
-0.00457763671875,
0.062255859375,
0.0002067089080810547,
-0.032562255859375,
0.05255126953125,
-0.031494140625,
-0.022430419921875,
-0.0026683807373046875,
0.004428863525390625,
0.00034165382385253906,
0.0218658447265625,
0.0129852294921875,
0.01515960693359375,
0.04718017578125,
0.001850128173828125,
0.048095703125,
-0.0439453125,
-0.039886474609375,
-0.003765106201171875,
0.02386474609375,
-0.03582763671875,
-0.01218414306640625,
0.023223876953125,
-0.005435943603515625,
0.00333404541015625,
-0.0212249755859375,
-0.0623779296875,
0.0036220550537109375,
-0.0197601318359375,
0.025299072265625,
-0.00884246826171875,
0.01476287841796875,
0.01007080078125,
-0.00872802734375,
-0.0160064697265625,
-0.02294921875,
-0.0162811279296875,
-0.006458282470703125,
-0.010711669921875,
0.0078125,
0.0203704833984375,
0.007381439208984375,
0.02301025390625,
0.018096923828125,
-0.0010633468627929688,
-0.0227508544921875,
0.01076507568359375,
-0.0443115234375,
-0.015045166015625,
-0.03515625,
-0.033416748046875,
0.0022678375244140625,
-0.063720703125,
0.04638671875,
0.028533935546875,
0.028472900390625,
-0.01218414306640625,
0.01739501953125,
0.03515625,
-0.01236724853515625,
0.0007987022399902344,
0.0193023681640625,
0.0133514404296875,
0.0166015625,
-0.0037689208984375,
0.037811279296875,
0.03887939453125,
-0.0174102783203125,
0.00691986083984375,
0.0174407958984375,
0.015594482421875,
0.06658935546875,
-0.007770538330078125,
0.0021762847900390625,
0.002262115478515625,
-0.056915283203125,
-0.006717681884765625,
0.035919189453125,
-0.03265380859375,
-0.0294952392578125,
0.01535797119140625,
-0.040008544921875,
0.0166473388671875,
-0.1033935546875,
-0.03387451171875,
-0.0298614501953125,
0.0106201171875,
-0.021026611328125,
-0.0011568069458007812,
-0.00817108154296875,
-0.0191802978515625,
0.0051422119140625,
0.02923583984375,
-0.05682373046875,
0.0169830322265625,
0.00478363037109375,
0.004245758056640625,
0.00986480712890625,
-0.0207977294921875,
-0.0011625289916992188,
0.0245208740234375,
-0.0016927719116210938,
0.004779815673828125,
0.0099639892578125,
0.003566741943359375,
-0.00555419921875,
0.01105499267578125,
-0.006443023681640625,
0.02496337890625,
0.0174407958984375,
-0.03759765625,
-0.036468505859375,
-0.01219940185546875,
0.03729248046875,
0.0023956298828125,
0.01849365234375,
0.0018863677978515625,
-0.00695037841796875,
0.015533447265625,
-0.08416748046875,
0.0478515625,
-0.048858642578125,
0.043212890625,
0.08526611328125,
0.033233642578125,
-0.02093505859375,
-0.0035381317138671875,
0.0201873779296875,
0.0212554931640625,
-0.00047326087951660156,
0.004302978515625,
-0.039947509765625,
0.01214599609375,
0.00811767578125,
0.017791748046875,
0.0059356689453125,
-0.02197265625,
-0.005687713623046875,
-0.033172607421875,
0.01103973388671875,
-0.002819061279296875,
0.021942138671875,
-0.05291748046875,
-0.0489501953125,
0.00649261474609375,
0.0187530517578125,
-0.01297760009765625,
0.003757476806640625,
0.050994873046875,
0.018463134765625,
0.00540924072265625,
-0.039398193359375,
-0.03338623046875,
-0.025482177734375,
-0.05816650390625,
0.0147857666015625,
0.0005431175231933594,
0.014129638671875,
0.01551055908203125,
-0.03619384765625,
-0.0197296142578125,
-0.026947021484375,
-0.0137481689453125,
0.045166015625,
-0.00589752197265625,
-0.045166015625,
0.0035572052001953125,
2.980232238769531e-7,
0.016387939453125,
0.007171630859375,
0.0084075927734375,
0.028167724609375,
-0.0270538330078125,
-0.021575927734375,
0.0019588470458984375,
-0.007476806640625,
0.01396942138671875,
0.0023479461669921875,
-0.0188140869140625,
0.0225830078125,
0.0243072509765625,
-0.0262298583984375,
0.00518798828125,
0.01201629638671875,
-0.0258026123046875,
-0.04571533203125,
0.0309295654296875,
-0.0287933349609375,
-0.041046142578125,
-0.033111572265625,
-0.0254974365234375,
0.0028705596923828125,
-0.04150390625,
-0.00701904296875,
0.005313873291015625,
-0.0142822265625,
-0.01174163818359375,
0.04656982421875,
-0.003032684326171875,
-0.03375244140625,
0.030120849609375,
-0.0190277099609375,
-0.00548553466796875,
-0.0268402099609375,
0.03173828125,
-0.015838623046875,
-0.07171630859375,
0.055419921875,
-0.01461029052734375,
0.0180816650390625,
-0.04083251953125,
-0.0238800048828125,
0.0059661865234375,
0.10980224609375,
-0.0301666259765625,
-0.0142974853515625,
0.003002166748046875,
0.01064300537109375,
-0.0234527587890625,
-0.014617919921875,
-0.044921875,
-0.0215301513671875,
0.006103515625,
-0.0047760009765625,
-0.0175018310546875,
0.004398345947265625,
-0.0265350341796875,
0.0036373138427734375,
0.0235595703125,
-0.0084075927734375,
0.0374755859375,
-0.0123138427734375,
0.01535797119140625,
0.007808685302734375,
-0.00533294677734375,
-0.0086822509765625,
-0.0143585205078125,
-0.0194244384765625,
-0.0653076171875,
-0.005260467529296875,
-0.056365966796875,
0.038177490234375,
0.00922393798828125,
0.039459228515625,
-0.01192474365234375,
0.0248870849609375,
-0.043609619140625,
0.005619049072265625,
-0.00021696090698242188,
0.040679931640625,
0.003993988037109375,
0.001453399658203125,
-0.0208740234375,
-0.033355712890625,
0.011474609375,
-0.053924560546875,
-0.02655029296875,
-0.00872802734375,
-0.07489013671875,
0.040924072265625,
-0.07763671875,
0.00046753883361816406,
-0.0712890625,
-0.03759765625,
-0.01442718505859375,
0.0156707763671875,
0.0055389404296875,
-0.006916046142578125,
-0.05169677734375,
-0.0787353515625,
0.03057861328125,
-0.004375457763671875,
0.00476837158203125,
0.0198974609375,
0.0709228515625,
0.012176513671875,
-0.010406494140625,
-0.03662109375,
-0.004421234130859375,
0.00604248046875,
0.0222930908203125,
0.03143310546875,
0.01473236083984375,
0.022216796875,
-0.03961181640625,
-0.0102386474609375,
0.00597381591796875,
-0.003139495849609375,
0.0224456787109375,
-0.005588531494140625,
-0.00860595703125,
0.0002639293670654297,
0.0037708282470703125,
-0.01155853271484375,
-0.00646209716796875,
0.0023517608642578125,
-0.01297760009765625,
-0.00519561767578125,
0.04217529296875,
0.031707763671875,
-0.019805908203125,
-0.061187744140625,
-0.0687255859375,
0.022674560546875,
-0.10455322265625,
0.01030731201171875,
-0.034942626953125,
0.0211334228515625,
0.0035915374755859375,
0.00841522216796875,
-0.0187530517578125,
-0.06719970703125,
-0.051422119140625,
-0.00438690185546875,
-0.0034160614013671875,
-0.052734375,
-0.01385498046875,
-0.0252685546875,
-0.01032257080078125,
0.0809326171875,
0.009246826171875,
-0.0484619140625,
0.00728607177734375,
-0.01338958740234375,
0.019012451171875,
0.01163482666015625,
-0.0007295608520507812,
0.039520263671875,
0.022552490234375,
-0.00441741943359375,
0.018646240234375,
-0.00502777099609375,
-0.0004677772521972656,
-0.03497314453125,
-0.0005850791931152344,
-0.0025234222412109375,
-0.01165008544921875,
-0.01641845703125,
0.0645751953125,
-0.0127716064453125,
0.0181732177734375,
-0.0186309814453125,
0.051849365234375,
0.045867919921875,
0.01123809814453125,
-0.0005788803100585938,
0.020263671875,
-0.0175018310546875,
0.00104522705078125,
-0.005558013916015625,
-0.048583984375,
-0.03387451171875,
0.04705810546875,
0.065185546875,
0.042938232421875,
0.01428985595703125,
-0.0210113525390625,
-0.008544921875,
0.0095977783203125,
-0.01934814453125,
-0.037841796875,
-0.01448822021484375,
0.01065826416015625,
0.0025234222412109375,
-0.0012722015380859375,
-0.0174560546875,
0.022186279296875,
-0.0455322265625,
-0.00560760498046875,
0.005550384521484375,
-0.00919342041015625,
-0.00926971435546875,
-0.0259857177734375,
-0.0187530517578125,
0.005634307861328125,
-0.0290069580078125,
-0.00608062744140625,
-0.037567138671875,
0.0305328369140625,
-0.03363037109375,
-0.03448486328125,
0.058746337890625,
0.014404296875,
-0.0010738372802734375,
-0.041534423828125,
-0.006023406982421875,
-0.0037746429443359375,
-0.02703857421875,
0.09967041015625,
0.0257568359375,
-0.02972412109375,
-0.004253387451171875,
-0.044952392578125,
-0.01505279541015625,
-0.0190887451171875,
-0.038177490234375,
-0.06243896484375,
-0.00750732421875,
0.04473876953125,
0.029296875,
0.0027313232421875,
-0.0290069580078125,
-0.0005421638488769531,
0.0012807846069335938,
0.011444091796875,
0.0299835205078125,
-0.00586700439453125,
0.052490234375,
-0.01262664794921875,
0.0738525390625,
0.01165771484375,
0.0237579345703125,
-0.0141754150390625,
-0.0330810546875,
0.0029754638671875,
0.0028285980224609375,
-0.0016546249389648438,
0.00260162353515625,
-0.0206756591796875,
-0.0243072509765625,
0.05841064453125,
-0.01270294189453125,
-0.0222625732421875,
-0.00887298583984375,
0.01351165771484375,
-0.0281982421875,
0.0462646484375,
-0.005596160888671875,
-0.054107666015625,
0.037811279296875,
-0.01084136962890625,
0.0095062255859375,
0.007419586181640625,
-0.0254669189453125,
0.000751495361328125,
0.004459381103515625,
-0.0037212371826171875,
0.0180511474609375,
-0.0084686279296875,
-0.006389617919921875,
-0.033172607421875,
-0.01300811767578125,
-0.0003495216369628906,
-0.01213836669921875,
0.0155029296875,
-0.0081634521484375,
-0.023895263671875,
-0.033447265625,
0.01256561279296875,
-0.0176239013671875,
-0.02734375,
-0.014434814453125,
-0.017181396484375,
-0.01065826416015625,
0.033843994140625,
0.07666015625,
0.09393310546875,
-0.09698486328125,
0.00994873046875,
0.007965087890625,
-0.03265380859375,
0.0295867919921875,
0.0180206298828125,
0.0272216796875,
0.009857177734375,
0.01068115234375,
0.0001926422119140625,
0.0018663406372070312,
0.01287078857421875,
-0.0154876708984375,
-0.0150299072265625,
-0.0192108154296875,
-0.02667236328125,
0.0130615234375,
0.035919189453125,
0.0343017578125,
-0.01467132568359375,
0.061492919921875,
-0.012969970703125,
0.023040771484375,
0.027496337890625,
-0.01071929931640625,
-0.06622314453125,
0.023284912109375,
-0.0014171600341796875,
-0.02630615234375,
-0.0186309814453125,
-0.0041351318359375,
0.08551025390625,
0.04339599609375,
0.01824951171875,
-0.0325927734375,
0.034637451171875,
0.0399169921875,
-0.02069091796875,
-0.033447265625,
0.004024505615234375,
-0.029052734375,
-0.005859375,
0.01654052734375,
-0.0240936279296875,
-0.0543212890625,
-0.01227569580078125,
-0.00995635986328125,
0.034881591796875,
-0.0423583984375,
0.006984710693359375,
0.041351318359375,
0.05621337890625,
-0.0175628662109375,
0.02325439453125,
-0.006023406982421875,
-0.0673828125,
-0.08221435546875,
-0.002315521240234375,
-0.094482421875,
0.0018796920776367188,
0.012481689453125,
-0.0826416015625,
0.0810546875,
0.025787353515625,
0.05279541015625,
-0.00665283203125,
0.0203094482421875,
-0.0203399658203125,
-0.015777587890625,
-0.05511474609375,
0.0823974609375,
0.032684326171875,
0.06732177734375,
-0.049346923828125,
-0.0100860595703125,
0.03466796875,
0.0105438232421875,
0.048736572265625,
0.02764892578125,
-0.0254364013671875,
-0.033721923828125,
-0.0196380615234375,
0.00634765625,
-0.0197296142578125,
0.05279541015625,
0.00809478759765625,
0.013336181640625,
0.005031585693359375,
0.0035228729248046875,
0.0361328125,
-0.024139404296875,
-0.053619384765625,
0.00614166259765625,
-0.007434844970703125,
-0.003597259521484375,
-0.00008213520050048828,
0.01122283935546875,
-0.013031005859375,
-0.004047393798828125,
-0.0033817291259765625,
-0.0181884765625,
0.01320648193359375,
-0.01470184326171875,
-0.0184326171875,
0.041534423828125,
0.032318115234375,
-0.0155487060546875,
0.017578125,
-0.003997802734375,
-0.002544403076171875,
0.049774169921875,
0.0262451171875,
-0.0286407470703125,
0.028350830078125,
0.0043487548828125,
0.009429931640625,
-0.0059967041015625,
0.0467529296875,
0.03253173828125,
0.03765869140625,
-0.03778076171875,
-0.030426025390625,
0.0615234375,
0.08026123046875,
-0.029205322265625,
-0.05841064453125,
0.01678466796875,
-0.00226593017578125,
0.0255584716796875,
-0.0035991668701171875,
0.01131439208984375,
-0.0633544921875,
0.00720977783203125,
-0.016632080078125,
-0.0005235671997070312,
0.0003581047058105469,
0.0028285980224609375,
-0.002422332763671875,
0.0243682861328125,
0.0228271484375,
0.01580810546875,
-0.04461669921875,
0.035125732421875,
-0.006542205810546875,
-0.0244598388671875,
-0.00954437255859375,
0.00592041015625,
0.06787109375,
0.005931854248046875,
-0.0113525390625,
0.031402587890625,
0.039459228515625,
-0.0110931396484375,
-0.04339599609375,
-0.07421875,
0.051910400390625,
0.033294677734375,
0.006938934326171875,
-0.045074462890625,
0.029296875,
0.043212890625,
-0.0645751953125,
-0.041748046875,
-0.00681304931640625,
-0.021026611328125,
0.018798828125,
-0.03289794921875,
0.04010009765625,
0.0030040740966796875,
-0.01033782958984375,
-0.0175323486328125,
0.015716552734375,
0.03704833984375,
-0.01427459716796875,
-0.00800323486328125,
-0.0009236335754394531,
-0.04937744140625,
0.0029087066650390625,
0.0009150505065917969,
0.0125732421875,
-0.0017271041870117188,
-0.099365234375,
-0.01544189453125,
-0.06756591796875,
-0.0357666015625,
0.01435089111328125,
0.022705078125,
-0.0148162841796875,
0.02081298828125,
0.00855255126953125,
-0.04132080078125,
0.04254150390625,
0.0082855224609375,
0.0123291015625,
0.037139892578125,
0.007106781005859375,
-0.0039520263671875,
-0.07916259765625,
-0.0341796875,
-0.040557861328125,
0.019500732421875,
0.03863525390625,
-0.00942230224609375,
0.0484619140625,
0.0394287109375,
-0.0299072265625,
-0.004688262939453125,
-0.0361328125,
-0.02197265625,
0.0049591064453125,
-0.01776123046875,
-0.0093536376953125,
0.00995635986328125,
-0.017822265625,
0.00848388671875,
0.01255035400390625,
-0.02166748046875,
-0.01419830322265625,
-0.004608154296875,
0.019256591796875,
0.0161590576171875,
0.0047760009765625,
-0.037139892578125,
-0.031768798828125,
-0.054351806640625,
-0.006195068359375,
0.027618408203125,
0.024932861328125,
-0.025360107421875,
0.035430908203125,
0.007160186767578125,
-0.01641845703125,
-0.01203155517578125,
-0.0193634033203125,
-0.048736572265625,
0.007221221923828125,
0.047088623046875,
-0.031951904296875,
-0.006740570068359375,
-0.0199432373046875,
-0.016357421875,
0.0144805908203125,
0.00982666015625,
0.00457000732421875,
-0.06298828125,
0.003513336181640625,
-0.0115966796875,
0.0184173583984375,
-0.0028438568115234375,
-0.00830841064453125,
0.003734588623046875,
-0.0071258544921875,
-0.0286865234375,
-0.059173583984375,
-0.033538818359375,
-0.053680419921875,
0.0169219970703125,
0.05401611328125,
-0.00994873046875,
0.023345947265625,
-0.049072265625,
-0.0240936279296875,
0.00669097900390625,
-0.0003056526184082031,
-0.0114593505859375,
0.0260772705078125,
-0.005237579345703125,
-0.0305023193359375,
-0.019866943359375,
-0.062744140625,
0.01122283935546875,
0.0198822021484375,
-0.0400390625,
-0.048553466796875,
-0.045196533203125,
0.00937652587890625,
-0.0662841796875,
0.004459381103515625,
-0.0229644775390625,
0.00103759765625,
0.038909912109375,
0.0423583984375,
0.0169525146484375,
0.056060791015625,
0.01296234130859375,
-0.05224609375,
-0.035552978515625,
-0.00945281982421875,
0.032684326171875,
0.006134033203125,
0.022796630859375,
-0.056060791015625,
-0.0494384765625,
-0.040374755859375,
0.0209197998046875,
0.0236663818359375,
-0.020477294921875,
-0.043914794921875,
0.06695556640625,
-0.0226593017578125,
-0.0247039794921875,
-0.029754638671875,
0.0183563232421875,
0.0022525787353515625,
-0.03631591796875,
-0.01529693603515625,
0.006198883056640625,
-0.030242919921875,
0.00917816162109375,
-0.007274627685546875,
0.0056610107421875,
0.006473541259765625,
0.0016183853149414062,
-0.007244110107421875,
0.023406982421875,
0.0290985107421875,
-0.034759521484375,
0.0247344970703125,
0.0032482147216796875,
0.032867431640625,
0.07025146484375,
-0.00479888916015625,
0.0136260986328125,
-0.0284423828125,
-0.0645751953125,
-0.0069580078125,
0.0186767578125,
-0.038421630859375,
-0.017730712890625,
0.05047607421875,
0.048675537109375,
0.027801513671875,
-0.015655517578125,
-0.045928955078125,
-0.040252685546875,
-0.0166778564453125,
0.012115478515625,
0.0260772705078125,
-0.08282470703125,
0.016845703125,
0.038360595703125,
-0.030792236328125,
0.0286712646484375,
-0.0035228729248046875,
-0.0482177734375,
0.0183258056640625,
0.000247955322265625,
0.00737762451171875,
-0.08544921875,
0.0540771484375,
0.0311279296875,
-0.04046630859375,
-0.026947021484375,
0.00011068582534790039,
-0.01495361328125,
-0.0099334716796875,
-0.032135009765625,
0.0426025390625,
0.003955841064453125,
-0.05908203125,
0.03546142578125,
-0.0008029937744140625,
0.049072265625,
-0.06787109375,
-0.04620361328125,
-0.0162811279296875,
0.0245208740234375,
0.008026123046875,
0.0233154296875,
-0.013916015625,
0.04248046875,
0.004230499267578125,
0.06494140625,
-0.0241241455078125,
0.01177215576171875,
-0.02197265625,
0.0218353271484375,
-0.024810791015625,
0.020355224609375,
0.01085662841796875,
-0.0226287841796875,
-0.008392333984375,
0.007122039794921875,
0.035125732421875,
-0.04193115234375,
0.041473388671875,
0.026397705078125,
0.024505615234375,
0.0300140380859375
]
|
15dd2df9f7623992816c3e407652f2e4ce4f9f83 | Wordpress Stackexchange
Q: Difference between meta keys with _ and without _ In wp_postmeta table I noticed that some of the keys are with '_' (underscore) prefix and and some are without _
What is the major difference between these fields and how they can be used while theming ?
Is there any special use of fields with _ ?
Most of the plugins used this approach to create meta keys but there is not codex on wordpress regarding meta key naming, its not sure if there is any technical difference between these key names.
A: The underscore prefix are private, these meta fields will be hidden and will not be shown as custom fields in the post backend screens. Those meta fields without the underscore prefix are public fields and shows up as custom fields in the post screens
| Q: Difference between meta keys with _ and without _ In wp_postmeta table I noticed that some of the keys are with '_' (underscore) prefix and and some are without _
What is the major difference between these fields and how they can be used while theming ?
Is there any special use of fields with _ ?
Most of the plugins used this approach to create meta keys but there is not codex on wordpress regarding meta key naming, its not sure if there is any technical difference between these key names.
A: The underscore prefix are private, these meta fields will be hidden and will not be shown as custom fields in the post backend screens. Those meta fields without the underscore prefix are public fields and shows up as custom fields in the post screens
| wordpress | {
"language": "en",
"length": 138,
"provenance": "stackexchange_00019.jsonl.gz:454584",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/183858"
} | [
-0.006549835205078125,
-0.007633209228515625,
0.0216827392578125,
0.016204833984375,
-0.04803466796875,
0.002498626708984375,
-0.017547607421875,
-0.053314208984375,
-0.0086517333984375,
0.007083892822265625,
0.0247955322265625,
-0.011627197265625,
0.0273590087890625,
-0.054840087890625,
0.0401611328125,
0.00022304058074951172,
0.021636962890625,
-0.0032978057861328125,
0.027252197265625,
-0.0274810791015625,
0.0274200439453125,
-0.01311492919921875,
0.00783538818359375,
0.0101318359375,
0.0804443359375,
-0.089111328125,
0.004695892333984375,
-0.019134521484375,
0.0511474609375,
0.00823211669921875,
0.041534423828125,
0.000017821788787841797,
0.0335693359375,
-0.0020008087158203125,
0.01445770263671875,
0.034942626953125,
-0.04595947265625,
0.0308837890625,
0.020660400390625,
-0.02093505859375,
0.0309295654296875,
-0.0217437744140625,
0.0209197998046875,
0.0244293212890625,
-0.00467681884765625,
-0.0199127197265625,
0.040496826171875,
-0.040069580078125,
0.023468017578125,
-0.0357666015625,
-0.0171356201171875,
0.021636962890625,
-0.005886077880859375,
0.007556915283203125,
-0.009918212890625,
-0.01390838623046875,
-0.056640625,
-0.00457763671875,
0.025543212890625,
0.045989990234375,
0.01412200927734375,
-0.01239776611328125,
-0.005512237548828125,
-0.021697998046875,
0.01042938232421875,
-0.008056640625,
-0.022308349609375,
0.01751708984375,
-0.0286407470703125,
0.006378173828125,
0.0244903564453125,
-0.03369140625,
0.016510009765625,
-0.0295867919921875,
-0.01275634765625,
0.007595062255859375,
0.0472412109375,
0.0111846923828125,
-0.00617218017578125,
0.0008897781372070312,
0.0207061767578125,
-0.010467529296875,
-0.040924072265625,
0.0031986236572265625,
-0.01401519775390625,
0.0011157989501953125,
-0.00568389892578125,
-0.022186279296875,
0.01052093505859375,
0.02496337890625,
0.002307891845703125,
-0.0440673828125,
-0.009063720703125,
0.09930419921875,
0.036834716796875,
-0.0246734619140625,
0.04351806640625,
0.048492431640625,
0.0005974769592285156,
-0.0095672607421875,
0.0038909912109375,
-0.050445556640625,
0.019561767578125,
-0.03070068359375,
0.0003056526184082031,
0.0076141357421875,
-0.034637451171875,
0.0104827880859375,
0.040557861328125,
0.04547119140625,
-0.0084381103515625,
-0.0233612060546875,
0.04150390625,
-0.0188751220703125,
-0.018829345703125,
0.00844573974609375,
0.0126190185546875,
0.0300445556640625,
0.007030487060546875,
0.0211944580078125,
0.005687713623046875,
0.0287017822265625,
0.03668212890625,
-0.04803466796875,
0.0223388671875,
0.01953125,
-0.0258331298828125,
-0.05902099609375,
-0.0684814453125,
0.08380126953125,
-0.0251617431640625,
-0.0184478759765625,
0.06719970703125,
0.032379150390625,
-0.007366180419921875,
-0.048675537109375,
-0.02569580078125,
-0.02093505859375,
-0.0203704833984375,
0.056060791015625,
-0.10528564453125,
-0.07080078125,
0.037933349609375,
-0.05718994140625,
-0.0254974365234375,
0.025390625,
0.017059326171875,
0.0180206298828125,
-0.0271453857421875,
-0.074951171875,
0.00736236572265625,
-0.0196990966796875,
0.029266357421875,
0.006927490234375,
-0.0494384765625,
0.00461578369140625,
0.009033203125,
-0.0152130126953125,
-0.036590576171875,
-0.040802001953125,
-0.0088653564453125,
-0.024993896484375,
-0.0013275146484375,
-0.04827880859375,
-0.07122802734375,
0.055694580078125,
-0.033905029296875,
-0.022003173828125,
0.03369140625,
-0.013031005859375,
0.080322265625,
-0.02166748046875,
0.03240966796875,
-0.004016876220703125,
0.0037517547607421875,
0.0006794929504394531,
-0.007381439208984375,
-0.0004153251647949219,
0.0223541259765625,
0.01031494140625,
-0.0283355712890625,
-0.035003662109375,
-0.0011930465698242188,
-0.007289886474609375,
-0.05804443359375,
0.008453369140625,
0.0242156982421875,
0.0484619140625,
0.0131378173828125,
0.010711669921875,
0.0565185546875,
-0.005237579345703125,
-0.01088714599609375,
-0.002681732177734375,
0.0367431640625,
-0.020599365234375,
0.005645751953125,
-0.019195556640625,
0.02337646484375,
-0.031158447265625,
0.0146484375,
0.016326904296875,
0.006195068359375,
-0.006916046142578125,
-0.041015625,
0.00943756103515625,
-0.01953125,
0.030548095703125,
-0.07000732421875,
0.0196075439453125,
0.036956787109375,
-0.04327392578125,
-0.0036983489990234375,
-0.0118408203125,
0.0183868408203125,
-0.04718017578125,
-0.034759521484375,
-0.011993408203125,
0.0167694091796875,
0.00508880615234375,
0.0294952392578125,
0.00023174285888671875,
-0.0002244710922241211,
-0.0159149169921875,
0.0244598388671875,
0.007091522216796875,
-0.01148223876953125,
-0.00376129150390625,
0.05023193359375,
0.00490570068359375,
0.014373779296875,
0.00803375244140625,
-0.002735137939453125,
-0.0032024383544921875,
-0.020477294921875,
0.01442718505859375,
-0.01087188720703125,
-0.057525634765625,
-0.002338409423828125,
0.05108642578125,
0.031402587890625,
0.0033969879150390625,
-0.0242767333984375,
0.0021514892578125,
0.046661376953125,
0.03521728515625,
0.0257568359375,
-0.02294921875,
-0.0118865966796875,
0.032806396484375,
-0.04083251953125,
0.0036869049072265625,
0.013946533203125,
-0.03179931640625,
-0.038116455078125,
0.03570556640625,
-0.07598876953125,
-0.04718017578125,
0.050506591796875,
-0.0146636962890625,
-0.00359344482421875,
0.004810333251953125,
0.04278564453125,
-0.01284027099609375,
0.0233917236328125,
0.021026611328125,
0.032989501953125,
0.028961181640625,
-0.032073974609375,
0.03228759765625,
0.0269622802734375,
0.00698089599609375,
0.0030155181884765625,
0.005710601806640625,
0.057525634765625,
0.035675048828125,
-0.03961181640625,
-0.0194854736328125,
0.062469482421875,
0.01403045654296875,
-0.023712158203125,
0.005786895751953125,
-0.0251007080078125,
-0.01137542724609375,
0.0306396484375,
-0.01236724853515625,
-0.005207061767578125,
-0.033721923828125,
-0.0176849365234375,
-0.016082763671875,
0.01523590087890625,
0.012603759765625,
-0.0098724365234375,
-0.0006990432739257812,
0.0004825592041015625,
-0.026519775390625,
-0.032501220703125,
0.0090484619140625,
0.009368896484375,
-0.0258331298828125,
-0.00733184814453125,
0.0291290283203125,
-0.03350830078125,
0.003978729248046875,
-0.0036754608154296875,
-0.00458526611328125,
-0.02484130859375,
0.0034275054931640625,
-0.0277099609375,
-0.036468505859375,
-0.0770263671875,
-0.01256561279296875,
0.00202178955078125,
0.0290985107421875,
0.006481170654296875,
-0.0251312255859375,
0.00395965576171875,
0.0254974365234375,
-0.035888671875,
-0.0104827880859375,
0.0176849365234375,
-0.0287628173828125,
-0.0214691162109375,
-0.0168304443359375,
-0.0236968994140625,
-0.000835418701171875,
-0.0100860595703125,
-0.0003609657287597656,
-0.0244140625,
-0.0132904052734375,
-0.044281005859375,
-0.0250396728515625,
-0.021514892578125,
0.0274810791015625,
-0.01239013671875,
-0.0120391845703125,
-0.021514892578125,
0.038055419921875,
-0.0016908645629882812,
0.02032470703125,
-0.0015611648559570312,
0.0304412841796875,
0.005840301513671875,
-0.0458984375,
-0.00829315185546875,
-0.001750946044921875,
0.00022661685943603516,
0.0018978118896484375,
0.005462646484375,
0.019622802734375,
-0.01073455810546875,
-0.0230560302734375,
0.046905517578125,
-0.0216827392578125,
0.041961669921875,
0.0036163330078125,
-0.048004150390625,
0.032318115234375,
0.045654296875,
-0.04132080078125,
-0.045928955078125,
-0.00882720947265625,
-0.06512451171875,
0.0227203369140625,
0.060821533203125,
0.00080108642578125,
-0.0246124267578125,
0.032196044921875,
0.02215576171875,
0.008331298828125,
-0.039947509765625,
-0.0182342529296875,
0.0102386474609375,
0.0146331787109375,
0.059051513671875,
0.0230255126953125,
-0.024566650390625,
-0.05865478515625,
0.01302337646484375,
-0.01708984375,
-0.0230560302734375,
-0.0011234283447265625,
0.0214080810546875,
0.032623291015625,
-0.034698486328125,
0.03173828125,
-0.05487060546875,
0.0237579345703125,
-0.048095703125,
-0.00811767578125,
-0.03778076171875,
0.05194091796875,
0.012847900390625,
-0.0171051025390625,
0.00970458984375,
0.01739501953125,
-0.050445556640625,
-0.016571044921875,
-0.016357421875,
-0.0005826950073242188,
-0.04718017578125,
-0.0132293701171875,
-0.00927734375,
-0.0225677490234375,
-0.0081787109375,
0.0496826171875,
-0.046142578125,
-0.0231781005859375,
0.020355224609375,
-0.040802001953125,
0.01355743408203125,
-0.0159912109375,
0.014434814453125,
-0.03271484375,
0.0030040740966796875,
-0.033966064453125,
-0.0244293212890625,
-0.02252197265625,
0.0186767578125,
0.047332763671875,
0.0240020751953125,
-0.0369873046875,
0.0208740234375,
0.04931640625,
-0.0089111328125,
0.0126495361328125,
-0.002666473388671875,
-0.0026378631591796875,
0.0008263587951660156,
0.0283355712890625,
0.00537109375,
-0.0015668869018554688,
0.0261383056640625,
-0.03131103515625,
-0.05584716796875,
-0.056121826171875,
-0.034942626953125,
0.0294189453125,
0.0058441162109375,
-0.040557861328125,
0.0308380126953125,
0.02740478515625,
-0.00870513916015625,
0.0265350341796875,
-0.00978851318359375,
-0.002048492431640625,
0.01026153564453125,
0.007415771484375,
0.00473785400390625,
-0.004367828369140625,
0.001544952392578125,
0.01007843017578125,
0.04595947265625,
0.01453399658203125,
-0.0034656524658203125,
-0.0244140625,
-0.0215301513671875,
0.02880859375,
-0.04473876953125,
0.022979736328125,
0.005405426025390625,
-0.01180267333984375,
0.0611572265625,
-0.03253173828125,
0.013916015625,
-0.006496429443359375,
0.043731689453125,
-0.0173797607421875,
-0.033966064453125,
0.03973388671875,
-0.0299835205078125,
-0.0002799034118652344,
0.0298004150390625,
0.004184722900390625,
-0.006389617919921875,
0.0010080337524414062,
0.0189666748046875,
-0.005481719970703125,
-0.0218048095703125,
-0.0258636474609375,
0.0125274658203125,
0.004291534423828125,
-0.0012044906616210938,
-0.01248931884765625,
-0.02099609375,
0.0012645721435546875,
-0.07281494140625,
0.0018663406372070312,
0.01277923583984375,
-0.0219879150390625,
0.007358551025390625,
-0.00860595703125,
0.009735107421875,
0.034423828125,
0.01346588134765625,
-0.06005859375,
-0.0088653564453125,
0.08367919921875,
-0.025482177734375,
-0.041412353515625,
-0.032928466796875,
-0.0238037109375,
0.056671142578125,
0.043487548828125,
0.003936767578125,
0.018646240234375,
0.0011968612670898438,
-0.030426025390625,
0.033935546875,
-0.005100250244140625,
0.0007572174072265625,
-0.03338623046875,
0.0117034912109375,
-0.009613037109375,
0.005626678466796875,
-0.047088623046875,
0.10052490234375,
-0.05889892578125,
0.048614501953125,
0.00742340087890625,
-0.01727294921875,
-0.01309967041015625,
0.068115234375,
0.0200958251953125,
-0.057647705078125,
0.0021800994873046875,
0.0579833984375,
0.013336181640625,
-0.0216827392578125,
-0.005695343017578125,
0.043701171875,
0.024627685546875,
0.01983642578125,
0.012664794921875,
-0.015716552734375,
-0.0018548965454101562,
-0.025604248046875,
0.034454345703125,
-0.013275146484375,
-0.037750244140625,
-0.045013427734375,
-0.031463623046875,
0.056671142578125,
0.00789642333984375,
-0.01453399658203125,
0.00904083251953125,
-0.013427734375,
0.05804443359375,
-0.0244293212890625,
0.024871826171875,
-0.0003650188446044922,
-0.0079803466796875,
0.038604736328125,
-0.0000030994415283203125,
-0.0254058837890625,
-0.01458740234375,
-0.040069580078125,
0.0016698837280273438,
-0.01087188720703125,
0.02886962890625,
-0.0008435249328613281,
0.041656494140625,
-0.021575927734375,
-0.0128631591796875,
0.0007519721984863281,
0.0217437744140625,
0.0288848876953125,
-0.0113525390625,
0.0009593963623046875,
-0.029449462890625,
-0.032684326171875,
-0.019317626953125,
-0.002773284912109375,
-0.0191802978515625,
-0.008544921875,
0.018707275390625,
-0.006969451904296875,
0.01195526123046875,
0.00405120849609375,
0.0241851806640625,
-0.034149169921875,
0.0276031494140625,
0.0152435302734375,
0.0181884765625,
0.00508880615234375,
0.0194091796875,
-0.01552581787109375,
0.04302978515625,
0.003452301025390625,
0.023773193359375,
0.00238800048828125,
-0.042022705078125,
-0.00034618377685546875,
-0.08489990234375,
-0.007137298583984375,
0.018768310546875,
-0.003330230712890625,
0.010345458984375,
-0.031982421875,
0.00750732421875,
0.0657958984375,
-0.01125335693359375,
-0.01317596435546875,
-0.0029850006103515625,
-0.019622802734375,
-0.032196044921875,
0.04949951171875,
0.046051025390625,
-0.0026645660400390625,
0.04150390625,
-0.025543212890625,
-0.04644775390625,
0.045806884765625,
-0.0059051513671875,
0.052947998046875,
0.040771484375,
-0.029510498046875,
0.048126220703125,
0.068115234375,
0.01385498046875,
0.028411865234375,
0.033721923828125,
-0.004253387451171875,
-0.020050048828125,
-0.0025177001953125,
-0.04168701171875,
-0.015380859375,
0.0853271484375,
0.040069580078125,
-0.023529052734375,
0.10198974609375,
-0.030975341796875,
0.0185089111328125,
0.05377197265625,
0.056396484375,
-0.0869140625,
0.01441192626953125,
0.0345458984375,
-0.01415252685546875,
-0.005702972412109375,
0.042938232421875,
-0.0236968994140625,
-0.040863037109375,
-0.005420684814453125,
-0.01465606689453125,
0.01153564453125,
0.01371002197265625,
0.00583648681640625,
-0.034393310546875,
-0.047149658203125,
-0.00788116455078125,
0.0218353271484375,
0.06353759765625,
0.0175323486328125,
-0.03948974609375,
0.0213623046875,
0.00170135498046875,
-0.0107421875,
0.005847930908203125,
-0.05963134765625,
-0.06451416015625,
-0.0213623046875,
-0.0165557861328125,
-0.0302734375,
0.0003333091735839844,
0.03875732421875,
0.0330810546875,
0.0189361572265625,
0.0089569091796875,
-0.0252532958984375,
-0.0103607177734375,
0.0290985107421875,
0.031402587890625,
-0.03875732421875,
-0.0253143310546875,
0.025665283203125,
0.007007598876953125,
0.0128936767578125,
0.026031494140625,
-0.025909423828125,
-0.0032520294189453125,
0.005435943603515625,
0.041412353515625,
-0.029022216796875,
-0.0217742919921875,
0.0111083984375,
0.0127105712890625,
0.0188751220703125,
0.040435791015625,
-0.0129547119140625,
0.00946044921875,
0.046905517578125,
0.0186920166015625,
0.007663726806640625,
0.0276031494140625,
0.044830322265625,
-0.0648193359375,
0.07135009765625,
0.006591796875,
0.032989501953125,
-0.027618408203125,
0.0178070068359375,
-0.0081939697265625,
-0.007266998291015625,
-0.04803466796875,
0.03515625,
-0.032562255859375,
0.034942626953125,
-0.059906005859375,
0.01381683349609375,
-0.01033782958984375,
-0.007442474365234375,
0.09552001953125,
0.01338958740234375,
-0.0026073455810546875,
0.01323699951171875,
0.101318359375,
0.042999267578125,
-0.007534027099609375,
0.007602691650390625,
0.0193939208984375,
0.0594482421875,
0.049163818359375,
-0.03033447265625,
0.0294036865234375,
-0.0036716461181640625,
-0.02587890625,
0.020416259765625,
0.026824951171875,
0.04302978515625,
0.00026297569274902344,
0.0278778076171875,
0.0254669189453125,
-0.0199432373046875,
-0.00511932373046875,
-0.00946807861328125,
0.0008759498596191406,
0.0278167724609375,
0.0026798248291015625,
0.0037860870361328125,
-0.021636962890625,
-0.0197906494140625,
0.035186767578125,
0.0105743408203125,
0.048614501953125,
0.0411376953125,
0.0190887451171875,
0.041717529296875,
0.0087890625,
0.02490234375,
0.0275726318359375,
-0.017486572265625,
0.047943115234375,
0.015411376953125,
0.0014781951904296875,
-0.0218048095703125,
0.043609619140625,
0.02496337890625,
0.045379638671875,
-0.0460205078125,
-0.0184478759765625,
0.0019378662109375,
-0.02386474609375,
-0.01094818115234375,
-0.044891357421875,
-0.028076171875,
-0.0125885009765625,
-0.0186004638671875,
-0.024993896484375,
0.037445068359375,
0.05096435546875,
0.00937652587890625,
0.0028781890869140625,
0.00495147705078125,
-0.06988525390625,
0.0291595458984375,
-0.0634765625,
0.01947021484375,
0.0270843505859375,
0.050048828125,
0.040374755859375,
0.00789642333984375,
0.06317138671875,
-0.0280303955078125,
-0.0167694091796875,
0.023345947265625,
-0.00905609130859375,
0.034637451171875,
-0.03753662109375,
-0.022674560546875,
0.01052093505859375,
0.045196533203125,
0.0294647216796875,
0.05322265625,
0.06072998046875,
0.00008505582809448242,
-0.01953125,
0.005733489990234375,
-0.023834228515625,
-0.0430908203125,
-0.0153656005859375,
-0.054443359375,
0.0211181640625,
-0.006549835205078125,
0.00722503662109375,
-0.0214385986328125,
0.0263824462890625,
-0.00313568115234375,
-0.0178375244140625,
0.032928466796875,
0.00614166259765625,
-0.011383056640625,
0.033111572265625,
-0.0155487060546875,
0.035247802734375,
-0.004451751708984375,
-0.036651611328125,
-0.018096923828125,
-0.0233001708984375,
-0.005283355712890625,
0.02825927734375,
0.040496826171875,
0.007602691650390625,
0.01232147216796875,
0.01055908203125,
0.0020198822021484375,
-0.006549835205078125,
-0.002712249755859375,
0.005573272705078125,
-0.001522064208984375,
0.02130126953125,
0.00916290283203125,
-0.051422119140625,
-0.021148681640625,
-0.01447296142578125,
0.004413604736328125,
0.008636474609375,
0.058502197265625,
-0.004428863525390625,
0.0158843994140625,
-0.0205078125,
0.03546142578125,
-0.031829833984375,
-0.019866943359375,
0.03814697265625,
0.01331329345703125,
0.0155487060546875,
-0.0159454345703125,
0.00281524658203125,
0.025665283203125,
0.0307769775390625,
-0.054656982421875,
0.0142669677734375,
0.0025959014892578125,
0.003490447998046875,
-0.033233642578125,
-0.00563812255859375,
-0.044342041015625,
-0.043792724609375,
-0.01485443115234375,
0.0042877197265625,
-0.0100860595703125,
-0.0079498291015625,
0.01126861572265625,
-0.036346435546875,
0.0016946792602539062,
-0.0655517578125,
0.0301513671875,
-0.00428009033203125,
0.0438232421875,
0.02783203125,
0.0239105224609375,
0.0208282470703125,
0.0130462646484375,
-0.0220794677734375,
0.0060272216796875,
-0.0055084228515625,
-0.00717926025390625,
0.01629638671875,
-0.07025146484375,
0.002025604248046875,
0.04852294921875,
0.042694091796875,
-0.03448486328125,
0.02093505859375,
0.034912109375,
-0.0189056396484375,
0.0223388671875,
0.0237884521484375,
-0.01082611083984375,
-0.040740966796875,
0.0017185211181640625,
0.0067138671875,
-0.01163482666015625,
-0.0011491775512695312,
-0.024871826171875,
-0.0117340087890625,
-0.0008120536804199219,
-0.0020389556884765625,
-0.00353240966796875,
0.0210723876953125,
-0.016510009765625,
-0.062042236328125,
0.006175994873046875,
-0.01049041748046875,
-0.021514892578125,
0.0015974044799804688,
-0.0205535888671875,
0.002666473388671875,
-0.04656982421875,
0.0007166862487792969,
-0.0081787109375,
0.0132293701171875,
0.0024166107177734375,
-0.0215911865234375,
0.00124359130859375,
0.0292816162109375,
0.03564453125,
0.05224609375,
0.036285400390625,
-0.01444244384765625,
-0.0202484130859375,
0.0179595947265625,
-0.03643798828125,
-0.056640625,
0.046600341796875,
-0.089111328125,
-0.050323486328125,
0.036346435546875,
-0.0167694091796875,
0.0158233642578125,
-0.0291900634765625,
-0.053619384765625,
0.0587158203125,
0.0162200927734375,
-0.037017822265625,
-0.0021152496337890625,
-0.0997314453125,
-0.03106689453125,
0.10064697265625,
0.00958251953125,
-0.0192108154296875,
-0.0675048828125,
0.050445556640625,
0.0308380126953125,
0.019073486328125,
0.037384033203125,
0.00970458984375,
-0.0114898681640625,
0.0238037109375,
0.01522064208984375,
0.0160064697265625,
-0.003570556640625,
0.01305389404296875,
0.01654052734375,
0.024261474609375,
-0.0379638671875,
0.042449951171875,
-0.004497528076171875,
0.00823974609375,
-0.0113525390625,
-0.0684814453125,
-0.0209503173828125,
-0.00936126708984375,
0.0821533203125,
0.0192718505859375,
0.0185089111328125,
-0.04620361328125,
0.01517486572265625,
-0.0272216796875,
0.01910400390625,
-0.049652099609375,
-0.006687164306640625,
-0.07183837890625,
-0.07122802734375,
-0.007022857666015625,
-0.01678466796875,
0.023468017578125,
-0.041259765625,
-0.01053619384765625,
0.0113372802734375,
0.03900146484375,
0.0167694091796875,
0.0026149749755859375,
0.010894775390625,
0.072021484375,
-0.058685302734375,
-0.0282440185546875,
0.013275146484375,
0.01020050048828125,
-0.0014581680297851562,
-0.0285186767578125,
-0.006542205810546875,
-0.040283203125,
0.014617919921875,
0.0250244140625,
-0.0105438232421875,
0.0168304443359375,
-0.005260467529296875,
-0.0276641845703125,
-0.0015001296997070312,
0.048126220703125,
-0.00791168212890625,
0.0438232421875,
-0.0162200927734375,
0.09161376953125,
0.0101776123046875,
0.0631103515625,
-0.01264190673828125,
0.04193115234375,
-0.048919677734375,
0.058197021484375,
-0.01215362548828125,
-0.00377655029296875,
0.018280029296875,
0.0164337158203125,
-0.003124237060546875,
-0.01506805419921875,
-0.020263671875,
-0.046875,
0.0251617431640625,
-0.03216552734375,
-0.015380859375,
0.0289306640625
]
|
b5f6c358589587e8c879510eb58e99a5bdd74ac8 | Wordpress Stackexchange
Q: Permissions to wp-content folder in Windows Server 2012 I've made some tests to solve this problem: trying to update some plugins via Wordpress backend I always receive a "Unable to create folder" error.
So I've initially added IIS_IUSRS with Read/Write/Modify permissions (not full control), but nothing changed.
Then I've tried to add IIS_IUSRS with full control, but I did not solve.
My final try was to add "Everyone" user and give him the Read/Write/Modify permissions. And it works!
But do you think it's a security hole to give this permissions to Everyone user?
And what do you think could be a solution?
I'm using:
Windows Server 2012, Wordpress 4.0.1, PHP 5.4.24, IIS 8.0
A: There are actually 3 users that IIS access files with on .NET sites: IIS_IUSRS, IUSR, and NETWORK SERVICE
Grant all 3 IIS users Read & Execute, List Folder Contents, Read permissions on the entire WP folder
For file management (e.g. plugin/theme installation & updates), grant all 3 of the IIS users Full Control on the wp_content folder.
| Q: Permissions to wp-content folder in Windows Server 2012 I've made some tests to solve this problem: trying to update some plugins via Wordpress backend I always receive a "Unable to create folder" error.
So I've initially added IIS_IUSRS with Read/Write/Modify permissions (not full control), but nothing changed.
Then I've tried to add IIS_IUSRS with full control, but I did not solve.
My final try was to add "Everyone" user and give him the Read/Write/Modify permissions. And it works!
But do you think it's a security hole to give this permissions to Everyone user?
And what do you think could be a solution?
I'm using:
Windows Server 2012, Wordpress 4.0.1, PHP 5.4.24, IIS 8.0
A: There are actually 3 users that IIS access files with on .NET sites: IIS_IUSRS, IUSR, and NETWORK SERVICE
Grant all 3 IIS users Read & Execute, List Folder Contents, Read permissions on the entire WP folder
For file management (e.g. plugin/theme installation & updates), grant all 3 of the IIS users Full Control on the wp_content folder.
A: I'm not positive if you need to grant Everyone Full control access to the WordPress root folder. Likewise, you don't need to grant IIS_IUSRS, IUSR and NETWORK SERVICE all permission to the entire Wordpress root folder either.
I was able to accomplish an upgrade recently where I only gave IUSR the Modify, Read & Execute, List folder contents and Read permissions to the root folder. I then revoked them after the update.
Environment:
*
*Windows Server 2012 R2
*WordPress 4.6.1
*PHP 5.5.38
Sources:
*
*WordPress 3.9 upgrade fails
*[Resolved] 500 Internal Server Error on wp-admin Dashboard
A: I found the the solution was to modify the location and permissions of the WordPress uploads folder. The problem is explained and the solution has screen shorts https://www.urtech.ca/2018/04/solved-500-error-on-downloads-in-wordpress-running-on-iis/
I hope this helps.
| wordpress | {
"language": "en",
"length": 302,
"provenance": "stackexchange_00019.jsonl.gz:454633",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/184035"
} | [
0.050048828125,
-0.0210113525390625,
-0.01824951171875,
-0.038543701171875,
0.006561279296875,
-0.037872314453125,
0.0521240234375,
0.00916290283203125,
0.037109375,
0.02301025390625,
-0.057098388671875,
-0.0083770751953125,
0.0100860595703125,
0.006107330322265625,
-0.0307769775390625,
-0.03369140625,
0.0150909423828125,
0.003826141357421875,
0.0208892822265625,
-0.0169219970703125,
0.00931549072265625,
-0.0012369155883789062,
0.0251007080078125,
0.0240631103515625,
0.006748199462890625,
0.012725830078125,
0.0074920654296875,
-0.0232696533203125,
-0.00846099853515625,
-0.029541015625,
-0.0016222000122070312,
0.0236663818359375,
0.0234222412109375,
0.0122222900390625,
-0.01386260986328125,
-0.0301666259765625,
0.00304412841796875,
-0.007404327392578125,
-0.0178985595703125,
0.02099609375,
0.02862548828125,
-0.01425933837890625,
0.063232421875,
0.056060791015625,
0.0097503662109375,
-0.049957275390625,
0.056671142578125,
-0.046417236328125,
0.04766845703125,
0.00174713134765625,
-0.0261077880859375,
0.03057861328125,
-0.0296173095703125,
-0.0289154052734375,
0.0066070556640625,
-0.01447296142578125,
-0.00872802734375,
0.050750732421875,
0.0228271484375,
-0.06256103515625,
-0.043060302734375,
0.0040435791015625,
0.034637451171875,
0.0295562744140625,
0.00737762451171875,
-0.012481689453125,
0.0280609130859375,
0.03900146484375,
-0.04876708984375,
0.011383056640625,
0.0263519287109375,
-0.005184173583984375,
0.00696563720703125,
-0.0455322265625,
0.039886474609375,
0.0204315185546875,
-0.0200958251953125,
-0.002655029296875,
0.0204315185546875,
0.01959228515625,
0.01654052734375,
-0.0233917236328125,
-0.01194000244140625,
-0.0262298583984375,
0.00753021240234375,
-0.0012559890747070312,
-0.00006937980651855469,
0.005344390869140625,
-0.0024623870849609375,
-0.00482177734375,
-0.01525115966796875,
-0.0170135498046875,
0.0247344970703125,
0.023895263671875,
-0.0206451416015625,
-0.0121307373046875,
0.03546142578125,
0.02581787109375,
-0.0118865966796875,
-0.00656890869140625,
0.020233154296875,
-0.0396728515625,
0.0269317626953125,
-0.0217132568359375,
0.00426483154296875,
0.01462554931640625,
-0.0106964111328125,
-0.004810333251953125,
0.0455322265625,
0.0247344970703125,
-0.015380859375,
0.0310821533203125,
0.01336669921875,
-0.04522705078125,
-0.0107421875,
0.03936767578125,
0.0078277587890625,
0.006511688232421875,
0.026611328125,
0.016357421875,
0.0005507469177246094,
0.0221710205078125,
-0.05841064453125,
-0.021453857421875,
0.0306854248046875,
0.0015287399291992188,
-0.00360870361328125,
0.0301361083984375,
-0.0262451171875,
0.03118896484375,
-0.0206451416015625,
0.015167236328125,
0.048736572265625,
0.040496826171875,
0.006999969482421875,
-0.01152801513671875,
0.015472412109375,
0.004344940185546875,
-0.0110015869140625,
0.0180511474609375,
-0.01922607421875,
0.0054473876953125,
0.042449951171875,
-0.0413818359375,
0.004558563232421875,
0.0111846923828125,
0.040557861328125,
0.0220947265625,
-0.0133514404296875,
-0.031707763671875,
-0.009674072265625,
0.049957275390625,
0.048309326171875,
-0.0014209747314453125,
-0.020538330078125,
-0.048919677734375,
0.01358795166015625,
-0.048675537109375,
0.00019621849060058594,
-0.054534912109375,
0.035858154296875,
0.01006317138671875,
0.0146942138671875,
-0.01251983642578125,
-0.005588531494140625,
-0.04608154296875,
-0.038177490234375,
0.0010986328125,
0.01934814453125,
0.0210418701171875,
-0.00452423095703125,
-0.039276123046875,
0.0208282470703125,
0.019287109375,
-0.00797271728515625,
0.04559326171875,
0.034881591796875,
0.0096435546875,
0.020904541015625,
0.0305023193359375,
-0.006847381591796875,
-0.017730712890625,
0.062103271484375,
-0.0263214111328125,
-0.013702392578125,
-0.012969970703125,
-0.005451202392578125,
-0.015625,
0.0277557373046875,
0.0084991455078125,
0.01904296875,
-0.00823211669921875,
0.0048828125,
0.0311737060546875,
-0.03204345703125,
-0.0458984375,
0.0034923553466796875,
0.0231781005859375,
-0.0300750732421875,
-0.01309967041015625,
0.0160369873046875,
-0.0185546875,
0.0255279541015625,
-0.0019207000732421875,
0.02734375,
-0.037078857421875,
0.0154571533203125,
-0.0177459716796875,
0.0205230712890625,
0.00948333740234375,
0.00970458984375,
0.00614166259765625,
-0.0028743743896484375,
-0.07159423828125,
-0.0445556640625,
0.002140045166015625,
-0.0216827392578125,
0.0628662109375,
0.01053619384765625,
0.069580078125,
0.01904296875,
-0.03399658203125,
0.031341552734375,
0.001708984375,
0.007015228271484375,
-0.0005698204040527344,
-0.0027980804443359375,
0.00176239013671875,
0.05718994140625,
0.007602691650390625,
0.059783935546875,
-0.011322021484375,
0.0166473388671875,
0.0222930908203125,
-0.0038547515869140625,
-0.007259368896484375,
-0.0165863037109375,
-0.079345703125,
0.00756072998046875,
0.06390380859375,
0.048370361328125,
0.0244293212890625,
-0.0113677978515625,
-0.0200958251953125,
0.052978515625,
-0.06622314453125,
-0.0030002593994140625,
-0.0079803466796875,
0.00708770751953125,
0.040008544921875,
-0.0034770965576171875,
0.014434814453125,
0.0165557861328125,
-0.01053619384765625,
0.006557464599609375,
0.036895751953125,
-0.037017822265625,
0.007457733154296875,
-0.026885986328125,
0.00823974609375,
0.0081787109375,
-0.02392578125,
0.006542205810546875,
-0.03363037109375,
-0.008819580078125,
-0.0012798309326171875,
0.0063934326171875,
0.0037593841552734375,
-0.0034923553466796875,
0.0018148422241210938,
0.0124969482421875,
-0.0445556640625,
0.0119781494140625,
0.06561279296875,
0.0229034423828125,
0.00839996337890625,
-0.042755126953125,
-0.017120361328125,
0.0292510986328125,
0.045867919921875,
-0.035400390625,
-0.0140380859375,
-0.054962158203125,
-0.015045166015625,
0.01094818115234375,
-0.0284881591796875,
-0.024993896484375,
-0.04168701171875,
-0.0033016204833984375,
-0.0238800048828125,
0.0161285400390625,
-0.0066986083984375,
-0.03759765625,
0.0321044921875,
0.00975799560546875,
-0.040740966796875,
0.058990478515625,
-0.01427459716796875,
0.0148468017578125,
0.0148468017578125,
0.01416778564453125,
0.05389404296875,
0.043975830078125,
-0.041259765625,
0.004634857177734375,
0.0181732177734375,
-0.005096435546875,
0.037078857421875,
0.01018524169921875,
-0.0252685546875,
-0.014984130859375,
-0.004016876220703125,
0.0166778564453125,
-0.030029296875,
0.0167694091796875,
-0.0254974365234375,
-0.0230865478515625,
-0.01288604736328125,
-0.12371826171875,
-0.091064453125,
0.008514404296875,
-0.05596923828125,
0.0152130126953125,
-0.0099029541015625,
-0.023651123046875,
-0.0198974609375,
0.01837158203125,
0.007537841796875,
-0.0650634765625,
0.003963470458984375,
-0.0218963623046875,
-0.056427001953125,
-0.038787841796875,
-0.0151824951171875,
-0.0216064453125,
0.0146942138671875,
-0.005397796630859375,
0.017181396484375,
-0.0309295654296875,
-0.0325927734375,
-0.052581787109375,
0.029449462890625,
-0.002582550048828125,
-0.042449951171875,
-0.01337432861328125,
-0.0093231201171875,
-0.01485443115234375,
0.00025963783264160156,
0.0177001953125,
0.0124359130859375,
-0.012542724609375,
-0.00008225440979003906,
-0.00919342041015625,
-0.012969970703125,
-0.00695037841796875,
0.02960205078125,
0.0076904296875,
-0.0187530517578125,
-0.004749298095703125,
-0.06304931640625,
-0.0165863037109375,
0.0194244384765625,
-0.050628662109375,
0.029937744140625,
0.0372314453125,
-0.0312042236328125,
0.022491455078125,
-0.018035888671875,
0.003787994384765625,
0.031463623046875,
-0.00948333740234375,
0.0226898193359375,
0.032867431640625,
-0.0211029052734375,
-0.01441192626953125,
-0.00021338462829589844,
0.09222412109375,
0.0008721351623535156,
-0.04547119140625,
0.0207061767578125,
-0.020172119140625,
-0.0231781005859375,
-0.018035888671875,
-0.051116943359375,
-0.0223236083984375,
0.027191162109375,
-0.056976318359375,
-0.0028247833251953125,
-0.06048583984375,
0.00296783447265625,
-0.041107177734375,
0.031646728515625,
-0.055419921875,
-0.01190948486328125,
-0.0181427001953125,
0.0218963623046875,
-0.0182037353515625,
-0.0528564453125,
-0.0203704833984375,
-0.0218353271484375,
0.0220184326171875,
0.00960540771484375,
-0.003810882568359375,
0.0034122467041015625,
-0.0131072998046875,
-0.08001708984375,
-0.00243377685546875,
-0.01056671142578125,
0.019989013671875,
-0.0482177734375,
0.0291290283203125,
0.0009622573852539062,
0.01019287109375,
-0.039581298828125,
-0.00946044921875,
-0.03863525390625,
-0.1483154296875,
-0.03131103515625,
-0.01934814453125,
0.11993408203125,
-0.0022487640380859375,
0.032196044921875,
-0.033111572265625,
0.08856201171875,
-0.0074920654296875,
0.0257720947265625,
-0.005298614501953125,
0.00902557373046875,
-0.0101776123046875,
-0.00988006591796875,
0.016326904296875,
-0.0221099853515625,
0.0087432861328125,
-0.021392822265625,
-0.021575927734375,
-0.017822265625,
-0.03997802734375,
0.0059356689453125,
-0.01342010498046875,
-0.012603759765625,
-0.026397705078125,
-0.03466796875,
-0.06280517578125,
-0.0155029296875,
-0.029632568359375,
0.0007157325744628906,
-0.031280517578125,
-0.040771484375,
0.05902099609375,
-0.038360595703125,
0.0226593017578125,
0.01338958740234375,
0.1270751953125,
0.00342559814453125,
-0.01134490966796875,
-0.05718994140625,
-0.005336761474609375,
0.037933349609375,
0.004360198974609375,
0.029327392578125,
0.03369140625,
-0.022735595703125,
0.0287628173828125,
0.0272369384765625,
-0.028228759765625,
0.0207366943359375,
0.02423095703125,
0.022552490234375,
-0.018829345703125,
-0.01416015625,
-0.0008950233459472656,
0.0202789306640625,
0.01132965087890625,
-0.0051727294921875,
0.01342010498046875,
-0.034393310546875,
0.00807952880859375,
0.0117034912109375,
0.0034942626953125,
-0.032745361328125,
-0.06854248046875,
0.033843994140625,
-0.015594482421875,
-0.00868988037109375,
-0.0034503936767578125,
0.0027370452880859375,
0.02435302734375,
0.007099151611328125,
-0.01873779296875,
-0.03460693359375,
-0.0181427001953125,
-0.030364990234375,
-0.0037937164306640625,
-0.0089263916015625,
-0.03240966796875,
-0.0252227783203125,
-0.0032634735107421875,
0.033905029296875,
0.0083160400390625,
-0.03521728515625,
0.0182037353515625,
-0.001247406005859375,
0.00543975830078125,
0.032379150390625,
-0.042877197265625,
0.032745361328125,
0.02459716796875,
-0.004703521728515625,
0.0034503936767578125,
-0.00933074951171875,
-0.0248260498046875,
-0.03857421875,
0.019927978515625,
0.0142059326171875,
-0.029937744140625,
-0.007965087890625,
-0.006153106689453125,
0.008453369140625,
-0.04351806640625,
0.00559234619140625,
0.0022296905517578125,
0.0014553070068359375,
0.0098419189453125,
-0.0036773681640625,
0.030029296875,
0.00527191162109375,
-0.014892578125,
0.039276123046875,
-0.06634521484375,
-0.0036029815673828125,
0.0726318359375,
0.06060791015625,
0.009796142578125,
-0.034942626953125,
0.005340576171875,
-0.005603790283203125,
0.01311492919921875,
-0.013885498046875,
-0.057403564453125,
-0.029937744140625,
-0.00426483154296875,
-0.0184326171875,
0.00821685791015625,
-0.03118896484375,
-0.01617431640625,
-0.0223236083984375,
-0.030120849609375,
0.0045318603515625,
0.03729248046875,
-0.016448974609375,
-0.00567626953125,
-0.0161895751953125,
0.0006246566772460938,
-0.01271820068359375,
0.00971221923828125,
-0.048065185546875,
0.0065460205078125,
-0.037811279296875,
-0.0194549560546875,
0.06719970703125,
-0.045379638671875,
0.0064544677734375,
-0.007038116455078125,
-0.01131439208984375,
-0.0262298583984375,
0.0175323486328125,
0.04840087890625,
0.047027587890625,
-0.06097412109375,
-0.0152130126953125,
-0.0254974365234375,
-0.00731658935546875,
0.0323486328125,
-0.01806640625,
-0.0296630859375,
-0.029327392578125,
-0.004428863525390625,
-0.0007486343383789062,
-0.01447296142578125,
0.0010290145874023438,
-0.0151519775390625,
0.054656982421875,
0.0205230712890625,
0.031646728515625,
-0.0304718017578125,
0.03472900390625,
0.0115966796875,
0.070068359375,
0.00040435791015625,
0.01090240478515625,
0.00041294097900390625,
-0.0229949951171875,
0.018768310546875,
-0.05535888671875,
-0.033172607421875,
-0.037445068359375,
0.0178680419921875,
0.028411865234375,
0.02801513671875,
-0.00901031494140625,
0.0178985595703125,
-0.04351806640625,
0.005275726318359375,
-0.019927978515625,
0.0628662109375,
-0.06182861328125,
-0.0231475830078125,
0.0113067626953125,
-0.0002422332763671875,
0.073974609375,
-0.006076812744140625,
-0.0300140380859375,
0.00936126708984375,
-0.01136016845703125,
0.03900146484375,
0.01137542724609375,
-8.344650268554688e-7,
0.010650634765625,
0.0540771484375,
-0.00569915771484375,
0.031036376953125,
-0.004306793212890625,
0.00753021240234375,
0.0181427001953125,
-0.0235748291015625,
-0.0016088485717773438,
-0.00872039794921875,
0.03900146484375,
-0.0086517333984375,
-0.00806427001953125,
0.04461669921875,
-0.0228118896484375,
0.02313232421875,
0.058349609375,
0.0692138671875,
-0.08489990234375,
0.005626678466796875,
0.00811004638671875,
-0.01534271240234375,
0.019317626953125,
-0.00940704345703125,
0.00930023193359375,
0.0012369155883789062,
0.056915283203125,
-0.034088134765625,
-0.016510009765625,
0.0177459716796875,
-0.040374755859375,
-0.017730712890625,
0.04095458984375,
-0.0093536376953125,
-0.0023345947265625,
0.0054779052734375,
-0.046661376953125,
-0.0073089599609375,
0.001758575439453125,
0.0261688232421875,
0.05255126953125,
-0.0323486328125,
-0.0226898193359375,
-0.0013933181762695312,
0.0058135986328125,
0.0255584716796875,
-0.061065673828125,
0.0130462646484375,
-0.0029144287109375,
-0.0026531219482421875,
0.060577392578125,
-0.03314208984375,
0.043670654296875,
0.032745361328125,
-0.0294036865234375,
-0.049102783203125,
-0.035980224609375,
0.0249176025390625,
0.06585693359375,
-0.04254150390625,
0.038360595703125,
-0.00261688232421875,
-0.0081024169921875,
-0.0128173828125,
-0.0230712890625,
0.0305023193359375,
-0.055084228515625,
0.0032901763916015625,
0.048065185546875,
0.002925872802734375,
-0.035186767578125,
0.028350830078125,
0.028717041015625,
-0.045562744140625,
-0.024658203125,
0.035858154296875,
-0.01291656494140625,
0.0137939453125,
0.06927490234375,
-0.0567626953125,
0.0953369140625,
-0.00266265869140625,
0.02081298828125,
0.032196044921875,
0.0298919677734375,
-0.0697021484375,
-0.02203369140625,
-0.0513916015625,
0.0235137939453125,
-0.0347900390625,
0.048370361328125,
-0.09161376953125,
0.0013408660888671875,
-0.0224761962890625,
0.0322265625,
0.071533203125,
0.0267333984375,
-0.051788330078125,
-0.0379638671875,
0.01702880859375,
0.01551055908203125,
-0.006809234619140625,
0.05462646484375,
-0.00027370452880859375,
0.00003141164779663086,
0.0262451171875,
-0.020843505859375,
0.03411865234375,
-0.038330078125,
-0.0241851806640625,
0.006999969482421875,
-0.007061004638671875,
-0.03436279296875,
-0.0201263427734375,
0.03955078125,
-0.06280517578125,
-0.0004525184631347656,
0.0273895263671875,
0.01004791259765625,
-0.028472900390625,
0.04376220703125,
0.035400390625,
-0.03387451171875,
0.01457977294921875,
-0.041015625,
0.05029296875,
0.01265716552734375,
-0.0165863037109375,
0.0038166046142578125,
0.0183868408203125,
-0.046600341796875,
0.01325225830078125,
-0.00905609130859375,
0.050384521484375,
-0.01097869873046875,
-0.027496337890625,
0.01351165771484375,
0.01898193359375,
-0.007183074951171875,
-0.040771484375,
0.005645751953125,
-0.0148773193359375,
0.01009368896484375,
-0.040802001953125,
0.00888824462890625,
0.0021648406982421875,
0.0013628005981445312,
0.02130126953125,
-0.013336181640625,
0.0377197265625,
0.06549072265625,
-0.0355224609375,
0.01433563232421875,
0.0308074951171875,
-0.00011390447616577148,
0.004634857177734375,
0.01165008544921875,
-0.0230560302734375,
0.0302886962890625,
0.001827239990234375,
-0.0140838623046875,
0.0085296630859375,
-0.0196533203125,
-0.0263214111328125,
0.01505279541015625,
0.02496337890625,
0.0165863037109375,
0.02874755859375,
0.0246429443359375,
-0.04827880859375,
-0.02349853515625,
-0.0176544189453125,
-0.10223388671875,
-0.0020923614501953125,
0.032379150390625,
0.0250396728515625,
0.0634765625,
0.01239013671875,
0.00579833984375,
0.028350830078125,
0.01012420654296875,
0.01438140869140625,
-0.0240631103515625,
-0.0221405029296875,
0.005184173583984375,
-0.0027675628662109375,
0.0226287841796875,
0.0023250579833984375,
-0.03668212890625,
0.04833984375,
0.03704833984375,
-0.00772857666015625,
0.0076904296875,
0.0014753341674804688,
-0.0097198486328125,
0.0384521484375,
-0.042083740234375,
0.011871337890625,
-0.009521484375,
-0.04278564453125,
0.0014400482177734375,
-0.03228759765625,
-0.0206298828125,
0.016845703125,
0.035400390625,
0.0012598037719726562,
0.0190887451171875,
-0.00630950927734375,
-0.0083160400390625,
0.001110076904296875,
-0.00011456012725830078,
0.0177154541015625,
0.01312255859375,
0.0158233642578125,
0.01155853271484375,
-0.074462890625,
-0.047637939453125,
-0.057464599609375,
0.05828857421875,
0.01416015625,
0.11669921875,
-0.032958984375,
0.0293731689453125,
-0.0111846923828125,
0.007354736328125,
-0.015228271484375,
-0.02288818359375,
0.046234130859375,
0.01508331298828125,
-0.01666259765625,
-0.01480865478515625,
-0.0504150390625,
0.01192474365234375,
0.0233001708984375,
-0.01506805419921875,
-0.0157012939453125,
-0.01448822021484375,
0.033905029296875,
0.0228424072265625,
-0.01053619384765625,
-0.0477294921875,
-0.0029201507568359375,
-0.047210693359375,
-0.032745361328125,
0.0191192626953125,
-0.0460205078125,
-0.01351165771484375,
0.0175933837890625,
0.0121612548828125,
-0.01477813720703125,
0.0118560791015625,
0.006153106689453125,
0.0142974853515625,
0.028839111328125,
-0.01517486572265625,
-0.0259552001953125,
-0.00032401084899902344,
-0.00955963134765625,
-0.0185546875,
0.01209259033203125,
0.014862060546875,
-0.01226043701171875,
-0.01081085205078125,
-0.0177001953125,
0.0157928466796875,
0.026275634765625,
-0.01538848876953125,
0.01145172119140625,
0.00225067138671875,
-0.00009304285049438477,
-0.01293182373046875,
-0.017608642578125,
-0.01392364501953125,
-0.01788330078125,
0.01464080810546875,
0.01262664794921875,
0.01248931884765625,
-0.01027679443359375,
-0.043212890625,
0.0355224609375,
0.0153656005859375,
0.005748748779296875,
-0.0711669921875,
0.06793212890625,
-0.025421142578125,
0.01180267333984375,
-0.00910186767578125,
0.0149688720703125,
-0.01617431640625,
0.02581787109375,
-0.031768798828125,
-0.0447998046875,
-0.021026611328125,
0.0643310546875,
-0.0223846435546875,
0.03887939453125,
0.0260772705078125,
-0.03851318359375,
-0.0034198760986328125,
0.05303955078125,
0.0401611328125,
0.0841064453125,
0.044769287109375,
-0.039306640625,
-0.0082855224609375,
-0.02972412109375,
0.0230255126953125,
-0.0166778564453125,
0.00328826904296875,
-0.07318115234375,
-0.0279083251953125,
-0.031402587890625,
0.02215576171875,
0.034454345703125,
-0.028594970703125,
-0.0249786376953125,
-0.03515625,
0.004848480224609375,
-0.0285491943359375,
-0.042388916015625,
0.0270843505859375,
-0.007015228271484375,
0.0131683349609375,
-0.0227508544921875,
0.0292205810546875,
0.002758026123046875,
0.034332275390625,
0.050872802734375,
-0.00815582275390625,
0.0325927734375,
0.00478363037109375,
-0.036163330078125,
0.023223876953125,
0.0235748291015625,
0.0231475830078125,
0.0377197265625,
-0.01593017578125,
0.040771484375,
0.05804443359375,
-0.0149078369140625,
0.0095977783203125,
-0.004940032958984375,
-0.079833984375,
0.0010528564453125,
-0.031097412109375,
-0.0279693603515625,
-0.038818359375,
0.047149658203125,
0.020233154296875,
0.0141143798828125,
-0.006099700927734375,
-0.0200653076171875,
-0.08111572265625,
-0.0154266357421875,
-0.01105499267578125,
0.0210113525390625,
-0.0732421875,
0.0209197998046875,
0.054901123046875,
0.001140594482421875,
0.0290069580078125,
-0.0196075439453125,
-0.00426483154296875,
-0.0128631591796875,
-0.01934814453125,
-0.02117919921875,
-0.0284423828125,
-0.028411865234375,
0.07427978515625,
-0.034515380859375,
0.0062713623046875,
-0.013671875,
0.033050537109375,
0.016265869140625,
-0.041748046875,
-0.01049041748046875,
0.00667572021484375,
-0.016448974609375,
0.01157379150390625,
-0.00933074951171875,
0.040130615234375,
-0.0204620361328125,
-0.00472259521484375,
0.047454833984375,
0.016571044921875,
-0.04254150390625,
0.01861572265625,
0.0168914794921875,
0.05169677734375,
-0.049468994140625,
0.08587646484375,
-0.0019388198852539062,
-0.052154541015625,
-0.03729248046875,
0.04241943359375,
0.018402099609375,
-0.019256591796875,
0.037384033203125,
-0.0028896331787109375,
0.01357269287109375,
0.00495147705078125,
0.016510009765625,
-0.0272064208984375,
0.00852203369140625,
-0.01007843017578125,
-0.004878997802734375,
0.005748748779296875
]
|
1de2340f35bbe085f6a7861766ca3344e5f3a1be | Wordpress Stackexchange
Q: Get Attachment ID from URL I have the URL of an image which I know is an attachment. Now, I need to find out the attachment ID.
This is what I've got (thanks to PippinsPlugins):
// retrieves the attachment ID from the file URL
function pippin_get_image_id($image_url) {
global $wpdb;
$attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $image_url ));
return $attachment[0];
}
This works fine for an URL like this:
http://example.com/wp-content/uploads/2015/03/picture.png
My problem is, the URL is the URL of a cropped picture, so it is
http://example.com/wp-content/uploads/2015/03/picture-300x297.png
My next problem is right now, I can't simply explode the URL to remove 300x297, since I might have pictures, which are not cropped but might have a file name like 'picture2-dontexplodeme.png'
Basically, I need a fool proof solution haha. If there is anyone out there, who has an easy solution, I would be very happy :)
A: function get_attachment_id_from_src ($image_src) {
global $wpdb;
$query = "SELECT ID FROM {$wpdb->posts} WHERE guid='$image_src'";
$id = $wpdb->get_var($query);
return $id;
}
| Q: Get Attachment ID from URL I have the URL of an image which I know is an attachment. Now, I need to find out the attachment ID.
This is what I've got (thanks to PippinsPlugins):
// retrieves the attachment ID from the file URL
function pippin_get_image_id($image_url) {
global $wpdb;
$attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $image_url ));
return $attachment[0];
}
This works fine for an URL like this:
http://example.com/wp-content/uploads/2015/03/picture.png
My problem is, the URL is the URL of a cropped picture, so it is
http://example.com/wp-content/uploads/2015/03/picture-300x297.png
My next problem is right now, I can't simply explode the URL to remove 300x297, since I might have pictures, which are not cropped but might have a file name like 'picture2-dontexplodeme.png'
Basically, I need a fool proof solution haha. If there is anyone out there, who has an easy solution, I would be very happy :)
A: function get_attachment_id_from_src ($image_src) {
global $wpdb;
$query = "SELECT ID FROM {$wpdb->posts} WHERE guid='$image_src'";
$id = $wpdb->get_var($query);
return $id;
}
| wordpress | {
"language": "en",
"length": 166,
"provenance": "stackexchange_00019.jsonl.gz:454644",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/184088"
} | [
0.05865478515625,
0.002468109130859375,
0.0303955078125,
-0.01297760009765625,
0.023712158203125,
-0.0216064453125,
0.050994873046875,
-0.0469970703125,
0.0276031494140625,
0.035797119140625,
0.003314971923828125,
-0.01222991943359375,
-0.0180816650390625,
-0.0232391357421875,
-0.0501708984375,
-0.0216827392578125,
0.038726806640625,
-0.0304412841796875,
0.0307769775390625,
0.0010938644409179688,
0.02398681640625,
0.0234222412109375,
0.00569915771484375,
0.005748748779296875,
0.0249481201171875,
-0.0150909423828125,
0.057586669921875,
-0.009735107421875,
0.0221710205078125,
-0.007843017578125,
0.021881103515625,
-0.01959228515625,
0.0047454833984375,
-0.00942230224609375,
0.033905029296875,
0.01123809814453125,
0.0233917236328125,
0.004764556884765625,
0.01629638671875,
0.01439666748046875,
0.0042266845703125,
0.005756378173828125,
-0.0031757354736328125,
-0.031707763671875,
-0.03680419921875,
-0.022918701171875,
0.00832366943359375,
-0.00792694091796875,
0.01297760009765625,
0.040191650390625,
0.035003662109375,
0.04058837890625,
0.03173828125,
0.035980224609375,
-0.001621246337890625,
-0.00986480712890625,
-0.0161285400390625,
0.00848388671875,
0.0162353515625,
-0.02191162109375,
-0.032989501953125,
0.00963592529296875,
0.0259246826171875,
0.0081787109375,
-0.00849151611328125,
0.0249786376953125,
0.06268310546875,
0.002613067626953125,
-0.0234222412109375,
-0.0256805419921875,
-0.00978851318359375,
0.00574493408203125,
-0.0184478759765625,
-0.0304412841796875,
-0.0377197265625,
0.0242462158203125,
0.0102996826171875,
-0.034759521484375,
0.002544403076171875,
-0.0152740478515625,
0.0183258056640625,
-0.047821044921875,
-0.07342529296875,
0.07257080078125,
0.0086517333984375,
0.11065673828125,
-0.0021648406982421875,
-0.052734375,
-0.017822265625,
-0.0066375732421875,
-0.01438140869140625,
-0.007663726806640625,
0.0118255615234375,
-0.0264129638671875,
-0.0396728515625,
-0.041259765625,
0.0175323486328125,
0.0195159912109375,
-0.015899658203125,
0.0019702911376953125,
0.017578125,
-0.053558349609375,
0.040924072265625,
-0.040252685546875,
-0.00504302978515625,
0.0157470703125,
0.0289459228515625,
-0.0152587890625,
0.0101470947265625,
0.0025844573974609375,
-0.014434814453125,
0.027008056640625,
-0.02264404296875,
0.00021350383758544922,
-0.0343017578125,
0.017669677734375,
-0.046722412109375,
-0.006561279296875,
-0.0130462646484375,
-0.0160675048828125,
-0.033111572265625,
-0.01125335693359375,
0.004657745361328125,
0.0123138427734375,
0.0108489990234375,
-0.00914764404296875,
-0.013458251953125,
-0.00231170654296875,
0.00283050537109375,
-0.0180206298828125,
-0.05230712890625,
0.039337158203125,
0.06396484375,
-0.00960540771484375,
0.01015472412109375,
-0.0038700103759765625,
-0.0186004638671875,
0.004878997802734375,
0.0126953125,
0.0033206939697265625,
0.0164031982421875,
-0.0181121826171875,
0.01198577880859375,
0.007572174072265625,
-0.0288238525390625,
0.01800537109375,
0.0100250244140625,
0.0121917724609375,
-0.0207061767578125,
-0.05950927734375,
0.005321502685546875,
-0.034942626953125,
0.035400390625,
-0.0009145736694335938,
-0.019012451171875,
-0.0288543701171875,
0.04034423828125,
-0.036468505859375,
-0.004253387451171875,
-0.06500244140625,
0.047576904296875,
0.01308441162109375,
0.0009212493896484375,
0.01194000244140625,
-0.00620269775390625,
-0.01056671142578125,
-0.04901123046875,
-0.0177764892578125,
0.02801513671875,
0.08203125,
0.00296783447265625,
-0.018157958984375,
0.006237030029296875,
0.022674560546875,
-0.0225982666015625,
-0.00390625,
0.00286102294921875,
-0.00396728515625,
0.0205535888671875,
0.045654296875,
0.004459381103515625,
-0.019866943359375,
0.026947021484375,
0.00557708740234375,
-0.037628173828125,
0.059417724609375,
-0.0018720626831054688,
0.06060791015625,
0.02130126953125,
0.00748443603515625,
0.0090484619140625,
0.0243682861328125,
-0.04705810546875,
0.01096343994140625,
-0.04534912109375,
0.00812530517578125,
-0.0126953125,
0.032135009765625,
-0.033203125,
0.0088348388671875,
0.019866943359375,
-0.005344390869140625,
0.034912109375,
0.01366424560546875,
0.0123748779296875,
0.00856781005859375,
-0.00435638427734375,
0.005352020263671875,
-0.0249176025390625,
0.038055419921875,
0.0245361328125,
0.0060882568359375,
-0.034210205078125,
0.002658843994140625,
0.01494598388671875,
-0.0055389404296875,
-0.00864410400390625,
0.0036869049072265625,
-0.0467529296875,
0.042633056640625,
-0.07989501953125,
-0.015472412109375,
-0.0692138671875,
0.0034465789794921875,
0.02825927734375,
0.003322601318359375,
-0.007701873779296875,
-0.00914764404296875,
0.035614013671875,
0.00122833251953125,
-0.0118255615234375,
0.01275634765625,
-0.0330810546875,
0.0056304931640625,
-0.009521484375,
-0.00862884521484375,
-0.01070404052734375,
-0.0821533203125,
0.0175933837890625,
0.05426025390625,
0.05462646484375,
0.007320404052734375,
-0.0035648345947265625,
-0.0191192626953125,
0.07305908203125,
0.004703521728515625,
0.0233917236328125,
-0.0230865478515625,
-0.02838134765625,
-0.017730712890625,
0.01611328125,
-0.0070343017578125,
0.030029296875,
-0.0017604827880859375,
0.00835418701171875,
0.028594970703125,
-0.0100555419921875,
0.005741119384765625,
0.006412506103515625,
0.0345458984375,
-0.0212554931640625,
0.0469970703125,
0.034149169921875,
0.0014476776123046875,
-0.0027942657470703125,
0.01439666748046875,
0.047607421875,
0.044708251953125,
-0.0021457672119140625,
-0.016937255859375,
0.004611968994140625,
0.03204345703125,
-0.014129638671875,
0.03460693359375,
0.0557861328125,
-0.0107269287109375,
0.0034923553466796875,
-0.0230865478515625,
-0.00231170654296875,
0.00865936279296875,
-0.011444091796875,
0.04827880859375,
-0.025909423828125,
-0.01727294921875,
-0.038848876953125,
-0.058990478515625,
0.00521087646484375,
0.002323150634765625,
-0.03216552734375,
-0.007617950439453125,
-0.00890350341796875,
0.0921630859375,
0.014984130859375,
0.05047607421875,
-0.0260162353515625,
0.0343017578125,
0.045562744140625,
-0.043914794921875,
0.05242919921875,
-0.024169921875,
0.0643310546875,
0.08001708984375,
-0.01422882080078125,
0.037994384765625,
-0.00884246826171875,
-0.036224365234375,
-0.00473785400390625,
0.0067901611328125,
-0.0027751922607421875,
-0.0172271728515625,
-0.04473876953125,
0.044097900390625,
-0.0022640228271484375,
0.06488037109375,
-0.0665283203125,
-0.07464599609375,
-0.015228271484375,
-0.0146942138671875,
-0.119140625,
-0.0880126953125,
0.0009069442749023438,
-0.061370849609375,
-0.0161895751953125,
-0.0036602020263671875,
-0.031097412109375,
0.005893707275390625,
0.0179290771484375,
0.0019893646240234375,
-0.01541900634765625,
-0.0037021636962890625,
-0.07501220703125,
-0.036041259765625,
-0.06573486328125,
0.00920867919921875,
-0.0145111083984375,
0.043365478515625,
0.012725830078125,
-0.040924072265625,
-0.002994537353515625,
-0.0128936767578125,
0.01788330078125,
0.060516357421875,
0.01390838623046875,
-0.0287933349609375,
-0.0185546875,
0.0008792877197265625,
-0.0399169921875,
-0.005451202392578125,
0.027618408203125,
-0.002071380615234375,
0.0017175674438476562,
0.00568389892578125,
-0.0171966552734375,
0.00567626953125,
0.0242919921875,
0.00461578369140625,
0.0018157958984375,
-0.005931854248046875,
0.04022216796875,
-0.0496826171875,
0.0024318695068359375,
-0.048248291015625,
-0.0299835205078125,
0.03350830078125,
0.0108795166015625,
0.00812530517578125,
0.004314422607421875,
0.017608642578125,
0.03717041015625,
-0.01519012451171875,
0.0008020401000976562,
-0.02044677734375,
0.06158447265625,
0.006488800048828125,
0.053253173828125,
-0.028594970703125,
0.05792236328125,
0.004566192626953125,
-0.009033203125,
0.018646240234375,
0.01364898681640625,
-0.00646209716796875,
-0.00865936279296875,
-0.03204345703125,
-0.021759033203125,
0.054595947265625,
0.004383087158203125,
0.0171051025390625,
-0.0290069580078125,
-0.03558349609375,
-0.024200439453125,
0.07330322265625,
-0.0084381103515625,
-0.029327392578125,
-0.033172607421875,
0.0178375244140625,
-0.0164337158203125,
-0.06439208984375,
0.01373291015625,
-0.004100799560546875,
-0.057708740234375,
0.0032978057861328125,
0.00640106201171875,
-0.034515380859375,
-0.009124755859375,
0.0233001708984375,
-0.0323486328125,
-0.033599853515625,
0.023651123046875,
0.0006556510925292969,
0.03594970703125,
0.049468994140625,
0.0104827880859375,
0.0736083984375,
-0.0338134765625,
-0.01546478271484375,
-0.05908203125,
-0.0078277587890625,
0.0205841064453125,
0.0389404296875,
-0.0303955078125,
0.00992584228515625,
-0.04180908203125,
0.0270843505859375,
-0.0214691162109375,
0.01210784912109375,
-0.01383209228515625,
0.024017333984375,
-0.03948974609375,
0.01337432861328125,
0.005970001220703125,
-0.0189056396484375,
-0.03131103515625,
-0.076171875,
-0.07952880859375,
-0.07373046875,
-0.01523590087890625,
0.035736083984375,
0.0111541748046875,
0.00420379638671875,
-0.0004394054412841797,
-0.022674560546875,
-0.023101806640625,
0.03045654296875,
-0.010589599609375,
-0.00421905517578125,
-0.038970947265625,
-0.0279693603515625,
0.0309295654296875,
-0.002803802490234375,
-0.005405426025390625,
-0.0040435791015625,
0.054473876953125,
0.013763427734375,
-0.01457977294921875,
-0.0258636474609375,
-0.01236724853515625,
0.046417236328125,
0.0137176513671875,
0.012481689453125,
0.0170440673828125,
-0.024078369140625,
0.033172607421875,
0.02294921875,
0.040863037109375,
-0.039337158203125,
0.0245513916015625,
-0.0066375732421875,
-0.00429534912109375,
0.022918701171875,
0.007476806640625,
0.01184844970703125,
0.0269317626953125,
-0.025421142578125,
-0.01348114013671875,
0.007129669189453125,
0.0282440185546875,
-0.05084228515625,
0.051055908203125,
-0.002979278564453125,
-0.050750732421875,
0.0201416015625,
-0.03607177734375,
0.04412841796875,
-0.00614166259765625,
-0.0007143020629882812,
0.0226287841796875,
0.037689208984375,
0.005157470703125,
0.00795745849609375,
0.0179901123046875,
0.0179443359375,
0.05889892578125,
-0.01467132568359375,
-0.002002716064453125,
-0.01459503173828125,
-0.00011408329010009766,
0.0181427001953125,
0.00666046142578125,
0.005596160888671875,
-0.044830322265625,
-0.0273284912109375,
-0.025390625,
-0.01088714599609375,
-0.036590576171875,
0.034149169921875,
0.0225982666015625,
-0.028533935546875,
0.0001838207244873047,
-0.058837890625,
-0.0187225341796875,
-0.05841064453125,
0.03094482421875,
0.0266876220703125,
-0.0194549560546875,
0.046600341796875,
0.013916015625,
-0.0254669189453125,
0.032257080078125,
-0.0035572052001953125,
0.023345947265625,
0.04205322265625,
0.0253448486328125,
0.00988006591796875,
0.00848388671875,
-0.03472900390625,
0.0301513671875,
0.0033016204833984375,
-0.060882568359375,
0.007110595703125,
0.041473388671875,
0.09295654296875,
-0.04425048828125,
-0.07489013671875,
0.0169830322265625,
-0.07196044921875,
-0.011474609375,
0.0423583984375,
0.01385498046875,
-0.00495147705078125,
-0.036163330078125,
-0.0176849365234375,
0.04791259765625,
0.0025310516357421875,
-0.0182342529296875,
-0.0200958251953125,
-0.02459716796875,
-0.0080718994140625,
0.032684326171875,
-0.0450439453125,
0.0295257568359375,
0.0267333984375,
0.0123443603515625,
-0.026519775390625,
-0.0689697265625,
0.062225341796875,
0.0196533203125,
-0.0182342529296875,
-0.026702880859375,
0.060150146484375,
0.01348114013671875,
0.04840087890625,
-0.032684326171875,
-0.0379638671875,
-0.060028076171875,
-0.00806427001953125,
0.053131103515625,
0.0184326171875,
-0.010894775390625,
-0.027130126953125,
-0.037811279296875,
-0.00298309326171875,
0.09295654296875,
0.0105438232421875,
0.0117340087890625,
-0.0182952880859375,
-0.027587890625,
0.034881591796875,
-0.01128387451171875,
0.039337158203125,
0.04046630859375,
0.01457977294921875,
-0.03912353515625,
0.05816650390625,
0.019683837890625,
0.0011873245239257812,
-0.007015228271484375,
0.0170135498046875,
0.014068603515625,
0.01019287109375,
-0.0164947509765625,
-0.0277862548828125,
-0.0243988037109375,
-0.0273895263671875,
0.046478271484375,
0.0078277587890625,
0.04254150390625,
-0.0228118896484375,
-0.0311126708984375,
0.015899658203125,
0.01409912109375,
-0.033843994140625,
-0.017791748046875,
-0.027801513671875,
0.037872314453125,
-0.02996826171875,
0.01149749755859375,
0.0003571510314941406,
-0.04913330078125,
-0.009765625,
-0.006534576416015625,
0.0447998046875,
-0.01300048828125,
-0.044677734375,
-0.0214385986328125,
0.0543212890625,
0.011444091796875,
0.016326904296875,
0.07342529296875,
0.017913818359375,
0.05328369140625,
0.0279693603515625,
0.0171966552734375,
0.0229339599609375,
0.062042236328125,
-0.0241851806640625,
-0.019989013671875,
0.0648193359375,
0.032623291015625,
-0.0139007568359375,
0.036285400390625,
-0.0230560302734375,
0.0325927734375,
-0.041229248046875,
0.02496337890625,
0.033843994140625,
0.017486572265625,
-0.0006337165832519531,
-0.0252532958984375,
0.042572021484375,
0.01171112060546875,
-0.017608642578125,
-0.0245513916015625,
0.0345458984375,
-0.043853759765625,
-0.015472412109375,
-0.001804351806640625,
-0.006103515625,
0.006805419921875,
0.00209808349609375,
0.022796630859375,
0.00045418739318847656,
-0.03466796875,
-0.035430908203125,
0.034454345703125,
-0.016632080078125,
-0.0309295654296875,
0.011474609375,
0.00258636474609375,
0.019683837890625,
-0.038909912109375,
0.0296783447265625,
-0.032684326171875,
0.0286712646484375,
-0.013153076171875,
0.000008702278137207031,
0.0433349609375,
0.03485107421875,
0.01523590087890625,
-0.035675048828125,
0.01336669921875,
-0.00012409687042236328,
0.04144287109375,
-0.01215362548828125,
-0.0117034912109375,
0.0455322265625,
-0.04510498046875,
-0.00421142578125,
-0.0020427703857421875,
0.0455322265625,
-0.00418853759765625,
0.0164794921875,
0.057373046875,
-0.0738525390625,
0.0124969482421875,
0.048828125,
0.06024169921875,
-0.0100555419921875,
0.0115203857421875,
0.034271240234375,
-0.041534423828125,
-0.0271453857421875,
0.00439453125,
-0.04559326171875,
-0.004436492919921875,
-0.0190887451171875,
-0.06524658203125,
0.043243408203125,
0.017120361328125,
0.048736572265625,
0.0111846923828125,
-0.0142364501953125,
-0.005191802978515625,
-0.01922607421875,
-0.03900146484375,
0.0212249755859375,
-0.0118408203125,
0.0154266357421875,
-0.0203399658203125,
0.0194091796875,
-0.003536224365234375,
0.005489349365234375,
0.1134033203125,
0.033905029296875,
-0.0469970703125,
-0.0220947265625,
0.046051025390625,
0.051116943359375,
-0.0034503936767578125,
0.034576416015625,
0.02056884765625,
0.013763427734375,
0.052642822265625,
-0.035980224609375,
0.0238189697265625,
-0.039276123046875,
0.031982421875,
0.031768798828125,
0.03289794921875,
0.033843994140625,
0.007633209228515625,
0.026641845703125,
-0.03857421875,
0.0097808837890625,
0.045196533203125,
-0.021881103515625,
0.0279998779296875,
0.02349853515625,
0.041473388671875,
-0.0195465087890625,
-0.01207733154296875,
-0.0035228729248046875,
0.0506591796875,
0.00591278076171875,
0.02215576171875,
0.041046142578125,
0.01690673828125,
0.0296173095703125,
0.0124359130859375,
0.00977325439453125,
0.021484375,
-0.0115966796875,
0.02520751953125,
0.014068603515625,
0.00978851318359375,
-0.057464599609375,
-0.0162811279296875,
0.07708740234375,
0.052886962890625,
-0.0302276611328125,
-0.041717529296875,
0.0119171142578125,
-0.004268646240234375,
0.0142669677734375,
0.00963592529296875,
0.0294189453125,
-0.051422119140625,
-0.0254669189453125,
-0.0248260498046875,
0.0216064453125,
0.0287628173828125,
0.051544189453125,
0.003692626953125,
0.0010099411010742188,
-0.0986328125,
-0.021728515625,
-0.010650634765625,
-0.0079345703125,
0.0173187255859375,
0.0182037353515625,
0.003849029541015625,
0.0235443115234375,
0.01111602783203125,
-0.007068634033203125,
-0.00548553466796875,
0.051910400390625,
-0.0016918182373046875,
0.004730224609375,
-0.002964019775390625,
-0.040008544921875,
-0.021636962890625,
0.0268096923828125,
-0.000926971435546875,
-0.0244903564453125,
0.017181396484375,
-0.01617431640625,
-0.06494140625,
-0.022674560546875,
-0.032257080078125,
-0.041351318359375,
0.045166015625,
-0.044036865234375,
0.046417236328125,
0.01291656494140625,
0.00775146484375,
-0.01343536376953125,
-0.019287109375,
0.064697265625,
-0.0129547119140625,
0.06231689453125,
-0.006900787353515625,
0.004611968994140625,
0.0177764892578125,
-0.0228729248046875,
0.01538848876953125,
-0.002536773681640625,
-0.10845947265625,
-0.022674560546875,
-0.038848876953125,
-0.036773681640625,
0.023590087890625,
0.03363037109375,
-0.01763916015625,
0.0217132568359375,
-0.049835205078125,
0.0028629302978515625,
-0.00760650634765625,
-0.01593017578125,
-0.003253936767578125,
-0.016204833984375,
0.007049560546875,
-0.020538330078125,
-0.043426513671875,
-0.0250244140625,
-0.00832366943359375,
0.0216064453125,
0.0191497802734375,
0.01959228515625,
0.0146331787109375,
0.0245819091796875,
0.002872467041015625,
0.01488494873046875,
-0.033111572265625,
-0.00814056396484375,
0.02764892578125,
-0.0260009765625,
0.00027251243591308594,
0.00274658203125,
-0.0045318603515625,
0.026611328125,
0.00229644775390625,
-0.0115814208984375,
-0.01293182373046875,
-0.017181396484375,
0.01666259765625,
0.048248291015625,
0.02728271484375,
-0.0183868408203125,
-0.00530242919921875,
-0.024322509765625,
-0.0199127197265625,
0.0496826171875,
0.0269317626953125,
-0.01366424560546875,
0.021820068359375,
0.0202789306640625,
0.0243682861328125,
0.03240966796875,
0.007633209228515625,
0.048492431640625,
0.029571533203125,
-0.0701904296875,
-0.040191650390625,
0.000904083251953125,
-0.01080322265625,
-0.0108795166015625,
-0.0008502006530761719,
0.060577392578125,
-0.00824737548828125,
0.0136566162109375,
0.01119232177734375,
-0.001800537109375,
0.024871826171875,
-0.01029205322265625,
-0.00604248046875,
0.02728271484375,
0.0033416748046875,
-0.03271484375,
-0.020355224609375,
0.0049896240234375,
-0.016937255859375,
-0.0175323486328125,
0.014373779296875,
0.004581451416015625,
0.00962066650390625,
0.02008056640625,
-0.0145416259765625,
-0.010894775390625,
0.0297393798828125,
-0.07952880859375,
0.053924560546875,
0.021484375,
-0.00707244873046875,
-0.03125,
0.01316070556640625,
-0.02496337890625,
-0.003215789794921875,
-0.0165252685546875,
-0.06072998046875,
-0.051300048828125,
0.069091796875,
-0.03521728515625,
0.0310821533203125,
0.03643798828125,
-0.02667236328125,
0.007747650146484375,
0.01200103759765625,
0.0175933837890625,
0.06231689453125,
-0.025634765625,
-0.0270233154296875,
-0.027313232421875,
0.00473785400390625,
-0.00803375244140625,
-0.0215606689453125,
0.0203094482421875,
-0.057220458984375,
-0.01666259765625,
-0.06634521484375,
0.028106689453125,
0.006343841552734375,
-0.043182373046875,
-0.06097412109375,
0.035888671875,
-0.036346435546875,
-0.0280303955078125,
-0.01381683349609375,
0.034271240234375,
0.01751708984375,
-0.01377105712890625,
-0.00518798828125,
-0.0191192626953125,
-0.003368377685546875,
0.0018377304077148438,
0.017425537109375,
-0.01236724853515625,
0.040435791015625,
0.0019512176513671875,
-0.0692138671875,
0.00440216064453125,
-0.0032024383544921875,
0.0224761962890625,
0.009368896484375,
-0.026641845703125,
0.059051513671875,
0.033172607421875,
-0.0141143798828125,
0.0245513916015625,
0.03692626953125,
-0.0273895263671875,
-0.0187530517578125,
0.01091766357421875,
-0.00856781005859375,
0.052978515625,
0.0361328125,
0.09716796875,
0.00414276123046875,
-0.06732177734375,
0.0236663818359375,
0.0033054351806640625,
-0.039276123046875,
-0.01265716552734375,
0.015869140625,
-0.035675048828125,
-0.0184478759765625,
-0.010650634765625,
-0.00974273681640625,
-0.0170745849609375,
0.007472991943359375,
-0.05389404296875,
-0.01318359375,
-0.0201416015625,
-0.01322174072265625,
-0.055755615234375,
0.0261383056640625,
0.0413818359375,
-0.037139892578125,
0.01788330078125,
-0.025177001953125,
0.00832366943359375,
0.0296478271484375,
-0.034576416015625,
0.003971099853515625,
0.02484130859375,
0.0028438568115234375,
0.016510009765625,
0.02362060546875,
-0.0107879638671875,
0.0066070556640625,
-0.006168365478515625,
-0.0261688232421875,
0.00449371337890625,
0.0014858245849609375,
-0.000499725341796875,
0.01482391357421875,
-0.01320648193359375,
0.007381439208984375,
0.017852783203125,
-0.0145416259765625,
0.0210418701171875,
-0.0033168792724609375,
0.017791748046875,
-0.00432586669921875,
-0.008087158203125,
0.036895751953125,
-0.04803466796875,
0.0004279613494873047,
0.007648468017578125,
-0.01052093505859375,
-0.0263671875,
-0.0088043212890625,
0.0239105224609375,
0.0012636184692382812,
-0.0014629364013671875
]
|
09a5eb81a341277f6068d5e9c3d8f4c1d43eaca2 | Wordpress Stackexchange
Q: Page editor missing Templates drop down Update: As with so many mysteries, the cause turned out to be extremely stupid. I had the file saved in a different theme's directory. Thanks to @a4jp.com
I'm building a theme using underscores. I've created a template file and added a template header at the top.
<?php
/**
* Template Name: Featured
**/
get_header(); ?>
I'm not getting a Template drop down under Page Attributes in the page editor, so I'm not sure if there's a problem with my formatting or something else.
I did try switching themes. The drop down appears in the other theme, but when I switch back to my custom theme, it's still missing.
A: Maybe this will help.
<?php
/*
Template Name: Featured
*/
get_header(); ?>
Regular code here...
<?php get_footer(); ?>
If one theme works you could try replacing the files in the broken theme and test which file or files are broken. But first save the old files in a separate folder as a backup. Then you would know which file or files are broken pretty quickly.
| Q: Page editor missing Templates drop down Update: As with so many mysteries, the cause turned out to be extremely stupid. I had the file saved in a different theme's directory. Thanks to @a4jp.com
I'm building a theme using underscores. I've created a template file and added a template header at the top.
<?php
/**
* Template Name: Featured
**/
get_header(); ?>
I'm not getting a Template drop down under Page Attributes in the page editor, so I'm not sure if there's a problem with my formatting or something else.
I did try switching themes. The drop down appears in the other theme, but when I switch back to my custom theme, it's still missing.
A: Maybe this will help.
<?php
/*
Template Name: Featured
*/
get_header(); ?>
Regular code here...
<?php get_footer(); ?>
If one theme works you could try replacing the files in the broken theme and test which file or files are broken. But first save the old files in a separate folder as a backup. Then you would know which file or files are broken pretty quickly.
A: By default Wordpress theme directory have not any template page then template page dropdown is invisible so follow the below instruction.
For display template page dropdown in wordpress admin page you need to create one template page in your theme directory code is below
<?php
/*
Template Name: template home
*/
?>
By creating this template file in your theme directory you can see template dropdonw is visible in admin page.
A: If you're not seeing the dropdown at all you might need to reload your theme. Try switching to another theme and then switching back.
A: This has happened two times for me. At the first time I changed the encoding of the file (header.php I think) to UTF-8 without BOM and all templates disappeared. Changed it back to regular utf-8.
At the second time I somehow edited/renamed the index.php (/themes/theme_name/index.php). Just had to create an empty index.php and now everything seems to be ok.
I hope this helps someone else.
[WP 4.4.2]
A: I had this same issue today, not sure if its relevant but for me the fix was, go to the edit page section, expand screen options, page attributes was not ticked, ticked it and the template dropdown came back.
| wordpress | {
"language": "en",
"length": 386,
"provenance": "stackexchange_00019.jsonl.gz:454649",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/184104"
} | [
-0.031951904296875,
-0.00128173828125,
0.0201873779296875,
0.0224761962890625,
-0.0238037109375,
-0.0001773834228515625,
0.00872039794921875,
-0.04705810546875,
0.00467681884765625,
0.0142822265625,
-0.0311126708984375,
-0.004543304443359375,
0.032623291015625,
-0.021087646484375,
0.0207977294921875,
-0.0218353271484375,
0.034423828125,
-0.05059814453125,
0.012542724609375,
-0.00777435302734375,
0.002887725830078125,
0.019683837890625,
-0.0004413127899169922,
0.027679443359375,
0.011444091796875,
0.0091094970703125,
0.051422119140625,
-0.01239776611328125,
0.0069122314453125,
-0.00746917724609375,
0.018707275390625,
-0.001789093017578125,
0.0220489501953125,
0.01154327392578125,
-0.0193939208984375,
0.032684326171875,
-0.0203857421875,
0.0098724365234375,
0.003299713134765625,
0.00052642822265625,
-0.004230499267578125,
0.0181427001953125,
0.04205322265625,
0.0252532958984375,
-0.004940032958984375,
-0.046844482421875,
0.005519866943359375,
-0.051849365234375,
-0.00046634674072265625,
-0.0295867919921875,
-0.0242767333984375,
0.020294189453125,
0.005283355712890625,
-0.07781982421875,
-0.0037403106689453125,
-0.03729248046875,
0.0112457275390625,
0.031463623046875,
0.042510986328125,
-0.0181427001953125,
-0.045867919921875,
0.0059051513671875,
0.0154266357421875,
-0.035400390625,
-0.0041351318359375,
0.009490966796875,
-0.0024318695068359375,
0.00980377197265625,
0.003330230712890625,
-0.00507354736328125,
-0.0011196136474609375,
-0.019012451171875,
0.006011962890625,
-0.005466461181640625,
0.005733489990234375,
-0.034027099609375,
-0.0007357597351074219,
-0.0235443115234375,
0.01470947265625,
0.0323486328125,
0.0250701904296875,
0.03204345703125,
-0.0246734619140625,
-0.0123443603515625,
0.0157318115234375,
0.0062408447265625,
-0.00466156005859375,
-0.0253753662109375,
-0.04046630859375,
0.0218658447265625,
-0.024993896484375,
-0.039093017578125,
-0.0181427001953125,
0.049835205078125,
0.0098419189453125,
0.007320404052734375,
0.034332275390625,
0.07550048828125,
-0.02081298828125,
0.0302276611328125,
-0.038726806640625,
-0.0303955078125,
0.064208984375,
-0.0560302734375,
-0.00850677490234375,
-0.0060272216796875,
-0.0157012939453125,
0.00836944580078125,
0.029815673828125,
0.054351806640625,
-0.021820068359375,
-0.0013608932495117188,
0.01397705078125,
-0.016998291015625,
-0.0263214111328125,
0.0025634765625,
-0.006862640380859375,
-0.00716400146484375,
0.0192108154296875,
-0.02252197265625,
0.039794921875,
0.055389404296875,
-0.0247802734375,
-0.070556640625,
-0.00946807861328125,
-0.035247802734375,
-0.0214996337890625,
-0.037750244140625,
0.03485107421875,
0.0182952880859375,
-0.04290771484375,
0.01061248779296875,
0.04742431640625,
-0.01482391357421875,
-0.00437164306640625,
-0.0291595458984375,
-0.0335693359375,
0.00450897216796875,
0.006439208984375,
0.0032958984375,
-0.0167236328125,
-0.0274658203125,
0.0184783935546875,
-0.0069580078125,
-0.019256591796875,
0.01334381103515625,
0.0298004150390625,
0.018585205078125,
-0.01364898681640625,
-0.049652099609375,
0.01331329345703125,
-0.011505126953125,
0.04022216796875,
-0.00980377197265625,
0.00968170166015625,
-0.059722900390625,
0.022216796875,
-0.0496826171875,
0.010040283203125,
-0.039306640625,
-0.037200927734375,
0.0008039474487304688,
0.028656005859375,
-0.06781005859375,
-0.044342041015625,
-0.0106964111328125,
-0.01441192626953125,
-0.0036487579345703125,
0.018035888671875,
0.0036373138427734375,
0.0195465087890625,
-0.0268707275390625,
0.035675048828125,
-0.00141143798828125,
-0.01085662841796875,
0.0252227783203125,
-0.0007104873657226562,
0.01297760009765625,
0.0065765380859375,
-0.014312744140625,
-0.016143798828125,
-0.0271148681640625,
0.0230865478515625,
-0.007541656494140625,
-0.07427978515625,
0.0726318359375,
-0.0110321044921875,
0.08258056640625,
0.0224609375,
0.003284454345703125,
0.034820556640625,
-0.004306793212890625,
-0.04718017578125,
0.0291595458984375,
0.0186309814453125,
-0.008819580078125,
-0.05523681640625,
-0.01611328125,
-0.00641632080078125,
-0.00820159912109375,
-0.033905029296875,
0.019927978515625,
-0.007495880126953125,
0.0251312255859375,
-0.01558685302734375,
0.0174560546875,
-0.008575439453125,
0.02862548828125,
-0.02447509765625,
0.0157623291015625,
0.009124755859375,
-0.0281829833984375,
-0.015869140625,
-0.002765655517578125,
-0.010772705078125,
-0.00966644287109375,
-0.0279083251953125,
0.015289306640625,
0.0170745849609375,
0.0279998779296875,
0.0186004638671875,
0.0186614990234375,
0.01513671875,
0.02081298828125,
0.01280975341796875,
0.03387451171875,
-0.05462646484375,
0.001010894775390625,
-0.0280609130859375,
0.035247802734375,
-0.0479736328125,
0.0309906005859375,
-0.0258636474609375,
-0.00994873046875,
-0.057861328125,
-0.022796630859375,
-0.03009033203125,
-0.0189971923828125,
0.01233673095703125,
0.04296875,
0.00850677490234375,
0.06414794921875,
0.007236480712890625,
0.038482666015625,
0.0853271484375,
-0.01885986328125,
-0.0014581680297851562,
0.018310546875,
-0.011566162109375,
-0.0033092498779296875,
0.070556640625,
-0.0119781494140625,
0.003875732421875,
-0.03619384765625,
0.0069122314453125,
0.00792694091796875,
-0.0285797119140625,
-0.0019435882568359375,
-0.01267242431640625,
0.02777099609375,
-0.012298583984375,
-0.017181396484375,
0.0162506103515625,
-0.0222015380859375,
0.0712890625,
0.0186767578125,
0.047149658203125,
0.0230712890625,
-0.043182373046875,
0.0203857421875,
0.0015554428100585938,
-0.019256591796875,
0.01226806640625,
0.04302978515625,
-0.00786590576171875,
0.01361846923828125,
-0.01006317138671875,
-0.0175628662109375,
-0.0083465576171875,
0.0206756591796875,
-0.002712249755859375,
0.050994873046875,
-0.03326416015625,
-0.014434814453125,
0.0034580230712890625,
-0.0711669921875,
-0.023345947265625,
0.004383087158203125,
0.037384033203125,
0.051300048828125,
0.03570556640625,
0.0306854248046875,
-0.020660400390625,
0.0618896484375,
0.000499725341796875,
0.00027489662170410156,
0.0377197265625,
-0.0005578994750976562,
0.006221771240234375,
0.020843505859375,
0.039031982421875,
0.049530029296875,
0.0010347366333007812,
0.017608642578125,
0.00568389892578125,
-0.00557708740234375,
0.025360107421875,
-0.00531005859375,
-0.005451202392578125,
0.005237579345703125,
-0.04315185546875,
0.0175628662109375,
0.0280609130859375,
0.025848388671875,
0.0011053085327148438,
-0.00975799560546875,
-0.0160064697265625,
0.0325927734375,
-0.038543701171875,
-0.0292816162109375,
0.006786346435546875,
-0.0154876708984375,
0.0026378631591796875,
-0.007785797119140625,
-0.005283355712890625,
-0.01372528076171875,
-0.0126190185546875,
0.0011463165283203125,
0.0215911865234375,
-0.03228759765625,
-0.058685302734375,
-0.044097900390625,
-0.0723876953125,
-0.052154541015625,
-0.002437591552734375,
0.0020904541015625,
-0.0029468536376953125,
0.050933837890625,
-0.024200439453125,
-0.07275390625,
-0.0400390625,
-0.0372314453125,
-0.00873565673828125,
0.0218505859375,
0.0236663818359375,
-0.0236358642578125,
0.005138397216796875,
0.0112762451171875,
-0.06561279296875,
0.022003173828125,
-0.019378662109375,
-0.022491455078125,
-0.04779052734375,
-0.07342529296875,
-0.041473388671875,
0.040252685546875,
0.07574462890625,
-0.026458740234375,
0.03314208984375,
-0.048797607421875,
-0.0810546875,
-0.0132904052734375,
-0.0709228515625,
0.061004638671875,
0.054351806640625,
0.0201416015625,
-0.007251739501953125,
0.06292724609375,
-0.01165771484375,
-0.01092529296875,
0.0127105712890625,
-0.0273895263671875,
-0.006267547607421875,
-0.006439208984375,
0.0036334991455078125,
0.005565643310546875,
0.0205230712890625,
-0.01398468017578125,
0.01175689697265625,
0.0185394287109375,
0.0171966552734375,
0.00890350341796875,
0.022613525390625,
0.01419830322265625,
-0.046600341796875,
0.060943603515625,
-0.019561767578125,
-0.005496978759765625,
-0.0238800048828125,
-0.045806884765625,
0.022857666015625,
0.1021728515625,
-0.004467010498046875,
-0.01049041748046875,
0.005298614501953125,
0.0012054443359375,
-0.015716552734375,
0.0157623291015625,
-0.038909912109375,
0.0038967132568359375,
-0.073486328125,
0.0114593505859375,
0.00788116455078125,
-0.03643798828125,
-0.021392822265625,
0.02606201171875,
-0.0594482421875,
-0.028564453125,
0.0144500732421875,
-0.01509857177734375,
-0.0017547607421875,
0.049468994140625,
-0.040740966796875,
0.032958984375,
-0.0166473388671875,
-0.041412353515625,
-0.051788330078125,
-0.00888824462890625,
-0.024658203125,
0.03900146484375,
0.0252685546875,
-0.00974273681640625,
-0.04193115234375,
0.0118560791015625,
0.0163116455078125,
0.00801849365234375,
0.00679779052734375,
-0.00457000732421875,
0.01340484619140625,
-0.031402587890625,
0.01386260986328125,
-0.039093017578125,
-0.0042266845703125,
-0.01132965087890625,
-0.04302978515625,
0.01078033447265625,
-0.0030155181884765625,
0.031646728515625,
0.01922607421875,
-0.0301666259765625,
-0.012725830078125,
-0.0127410888671875,
-0.018890380859375,
0.01071929931640625,
0.01554107666015625,
-0.0255889892578125,
-0.01062774658203125,
-0.021270751953125,
0.049713134765625,
0.004024505615234375,
-0.0211181640625,
0.00975799560546875,
0.046142578125,
0.0207672119140625,
-0.043426513671875,
-0.00809478759765625,
0.0303802490234375,
0.0406494140625,
0.0306854248046875,
0.0283203125,
-0.004093170166015625,
-0.03594970703125,
0.0643310546875,
0.0235137939453125,
-0.002765655517578125,
-0.05120849609375,
0.051910400390625,
-0.0096588134765625,
-0.031707763671875,
0.0283355712890625,
-0.0249481201171875,
0.03521728515625,
0.0258941650390625,
-0.00628662109375,
-0.01160430908203125,
-0.0203857421875,
0.025421142578125,
-0.00568389892578125,
0.01486968994140625,
-0.0226287841796875,
0.00855255126953125,
-0.034271240234375,
0.014617919921875,
0.05523681640625,
0.02227783203125,
0.0096588134765625,
-0.001689910888671875,
0.045166015625,
-0.01291656494140625,
-0.0214080810546875,
0.0052642822265625,
-0.00609588623046875,
0.0302581787109375,
-0.0360107421875,
-0.004878997802734375,
-0.0288848876953125,
-0.02130126953125,
0.10040283203125,
0.01983642578125,
-0.03411865234375,
0.02130126953125,
-0.0306854248046875,
-0.0244598388671875,
0.01369476318359375,
-0.01445770263671875,
-0.019683837890625,
0.01641845703125,
0.00002580881118774414,
0.0201568603515625,
0.0028285980224609375,
0.0162506103515625,
-0.0100555419921875,
-0.006526947021484375,
0.0008459091186523438,
-0.0157470703125,
-0.018310546875,
0.036773681640625,
0.0018701553344726562,
-0.018951416015625,
-0.00476837158203125,
-0.0283203125,
-0.035369873046875,
0.0249176025390625,
0.018310546875,
-0.0088348388671875,
0.0112152099609375,
0.005680084228515625,
0.040283203125,
-0.05047607421875,
-0.03668212890625,
0.0042266845703125,
0.06512451171875,
-0.0355224609375,
-0.035369873046875,
0.0304107666015625,
-0.021331787109375,
0.00701904296875,
0.02655029296875,
-0.02496337890625,
-0.07513427734375,
0.00551605224609375,
0.033477783203125,
0.002384185791015625,
-0.035980224609375,
-0.031097412109375,
-0.01540374755859375,
-0.04290771484375,
-0.0285491943359375,
0.0266571044921875,
-0.063232421875,
0.006465911865234375,
-0.0011587142944335938,
-0.0158538818359375,
0.009552001953125,
0.01641845703125,
-0.06396484375,
-0.0477294921875,
-0.025634765625,
-0.012359619140625,
0.07159423828125,
-0.03814697265625,
-0.00737762451171875,
-0.005527496337890625,
0.016876220703125,
-0.04986572265625,
0.027130126953125,
0.0135345458984375,
0.0232086181640625,
-0.06634521484375,
0.0261383056640625,
-0.04937744140625,
-0.0104522705078125,
-0.052825927734375,
-0.05401611328125,
-0.0732421875,
-0.0208282470703125,
0.01238250732421875,
0.0219268798828125,
0.006900787353515625,
-0.021697998046875,
0.01328277587890625,
0.015533447265625,
0.006195068359375,
0.07415771484375,
-0.0086517333984375,
0.05364990234375,
0.004451751708984375,
0.028656005859375,
0.0015506744384765625,
0.018402099609375,
-0.005344390869140625,
-0.0131683349609375,
0.007778167724609375,
0.0007233619689941406,
0.00017464160919189453,
-0.044891357421875,
0.00948333740234375,
0.037567138671875,
0.09710693359375,
0.01157379150390625,
0.006786346435546875,
-0.029327392578125,
0.0106658935546875,
-0.027130126953125,
0.045257568359375,
-0.04852294921875,
-0.06903076171875,
0.050811767578125,
-0.038330078125,
-0.033721923828125,
0.0213470458984375,
-0.0175018310546875,
0.0285797119140625,
-0.00229644775390625,
-0.0078887939453125,
0.01161956787109375,
-0.041046142578125,
0.06256103515625,
0.06494140625,
0.0264892578125,
0.0310516357421875,
0.01070404052734375,
0.0097503662109375,
-0.04925537109375,
0.03955078125,
-0.045440673828125,
-0.0711669921875,
0.037139892578125,
0.02117919921875,
-0.0242462158203125,
0.0428466796875,
-0.0201263427734375,
0.01983642578125,
0.052886962890625,
0.07025146484375,
-0.0640869140625,
-0.0098724365234375,
0.031494140625,
-0.0169677734375,
0.0169525146484375,
-0.01157379150390625,
0.0014200210571289062,
-0.03271484375,
0.03515625,
0.0230865478515625,
-0.01123809814453125,
0.0038623809814453125,
0.00589752197265625,
-0.034423828125,
-0.031341552734375,
0.039642333984375,
0.0248565673828125,
-0.0008416175842285156,
0.039215087890625,
-0.01357269287109375,
0.037994384765625,
-0.030029296875,
0.0305328369140625,
-0.025390625,
-0.00962066650390625,
-0.035552978515625,
0.0033321380615234375,
0.0228118896484375,
-0.019256591796875,
-0.0087432861328125,
-0.0019159317016601562,
0.0030879974365234375,
0.028900146484375,
-0.022125244140625,
-0.00446319580078125,
-0.00350189208984375,
0.0006628036499023438,
0.04132080078125,
-0.0193328857421875,
0.019287109375,
-0.030181884765625,
-0.003139495849609375,
0.0028171539306640625,
-0.002513885498046875,
-0.054412841796875,
0.002124786376953125,
0.03851318359375,
0.0767822265625,
0.0018415451049804688,
-0.052642822265625,
0.030670166015625,
0.01580810546875,
-0.0187530517578125,
0.0024280548095703125,
0.0191650390625,
-0.01171875,
0.032928466796875,
-0.0006146430969238281,
0.01396942138671875,
0.006137847900390625,
0.005023956298828125,
-0.049102783203125,
0.08355712890625,
0.001132965087890625,
0.01103973388671875,
0.0291748046875,
0.035980224609375,
-0.0733642578125,
-0.00823974609375,
-0.0201568603515625,
0.04632568359375,
-0.019561767578125,
0.07769775390625,
-0.033050537109375,
0.0008592605590820312,
0.0352783203125,
0.053924560546875,
0.04144287109375,
-0.011077880859375,
0.030364990234375,
0.018157958984375,
0.1038818359375,
0.03717041015625,
-0.017333984375,
0.0005955696105957031,
-0.016326904296875,
0.001811981201171875,
-0.0047149658203125,
-0.032135009765625,
0.015594482421875,
-0.063720703125,
-0.03369140625,
-0.00904083251953125,
-0.006591796875,
0.0036754608154296875,
0.025115966796875,
-0.047943115234375,
-0.0362548828125,
0.0032596588134765625,
0.0105438232421875,
-0.026092529296875,
-0.01751708984375,
0.028961181640625,
0.0235595703125,
-0.034088134765625,
-0.01111602783203125,
-0.0307769775390625,
0.033935546875,
0.0223236083984375,
-0.0178375244140625,
-0.0180511474609375,
-0.003444671630859375,
-0.0016164779663085938,
-0.04962158203125,
-0.03302001953125,
0.0199432373046875,
-0.0017251968383789062,
0.057525634765625,
0.0267486572265625,
0.0323486328125,
-0.0230255126953125,
-0.003948211669921875,
0.0225067138671875,
0.055755615234375,
-0.034820556640625,
-0.023651123046875,
0.01000213623046875,
0.0179443359375,
-0.01447296142578125,
-0.0134429931640625,
-0.0187835693359375,
0.03240966796875,
0.06475830078125,
-0.007106781005859375,
-0.045654296875,
-0.005767822265625,
-0.0040283203125,
-0.01268768310546875,
-0.0325927734375,
0.072509765625,
-0.0186920166015625,
-0.037628173828125,
0.034759521484375,
0.0068817138671875,
0.035003662109375,
0.001300811767578125,
0.055145263671875,
-0.00954437255859375,
-0.0079498291015625,
-0.00794219970703125,
0.0006165504455566406,
-0.01015472412109375,
0.0253753662109375,
-0.03662109375,
-0.00231170654296875,
-0.0247039794921875,
0.035552978515625,
0.005764007568359375,
-0.003376007080078125,
0.0116119384765625,
-0.01548004150390625,
-0.048980712890625,
-0.005260467529296875,
-0.038360595703125,
-0.05694580078125,
-0.020965576171875,
-0.0254364013671875,
0.00421905517578125,
0.041473388671875,
-0.022064208984375,
0.017181396484375,
-0.0259246826171875,
0.072509765625,
-0.00670623779296875,
-0.0293731689453125,
-0.0035877227783203125,
-0.0252838134765625,
0.005519866943359375,
-0.0328369140625,
-0.005397796630859375,
-0.01178741455078125,
-0.06298828125,
-0.006526947021484375,
-0.03448486328125,
-0.054840087890625,
0.034088134765625,
0.05084228515625,
-0.0106201171875,
0.0047607421875,
-0.01192474365234375,
0.006771087646484375,
0.0025310516357421875,
-0.01445770263671875,
-0.005138397216796875,
0.02264404296875,
0.044525146484375,
0.00020587444305419922,
-0.0300445556640625,
-0.040802001953125,
-0.00568389892578125,
0.06427001953125,
0.00325775146484375,
0.0609130859375,
-0.0212554931640625,
0.0169525146484375,
-0.0148162841796875,
0.0245208740234375,
-0.03564453125,
-0.022186279296875,
0.049468994140625,
-0.0020961761474609375,
-0.004505157470703125,
-0.0156402587890625,
-0.052154541015625,
0.05792236328125,
-0.0018339157104492188,
-0.025848388671875,
0.015716552734375,
0.03070068359375,
-0.0162353515625,
0.00817108154296875,
0.01143646240234375,
-0.0158538818359375,
-0.0457763671875,
-0.0209808349609375,
-0.0014181137084960938,
-0.0012664794921875,
0.035247802734375,
0.01409149169921875,
0.0047149658203125,
-0.0012359619140625,
-0.006954193115234375,
0.0152435302734375,
0.000476837158203125,
0.0271148681640625,
0.01464080810546875,
-0.0154266357421875,
-0.01751708984375,
0.0313720703125,
-0.0083770751953125,
0.03338623046875,
-0.0028285980224609375,
0.039947509765625,
0.01139068603515625,
-0.0061492919921875,
0.027374267578125,
0.01209259033203125,
0.0291900634765625,
-0.03948974609375,
0.00269317626953125,
0.05706787109375,
-0.0021915435791015625,
0.0018072128295898438,
-0.016082763671875,
-0.0003859996795654297,
-0.01006317138671875,
-0.025970458984375,
0.0205841064453125,
-0.012451171875,
-0.00246429443359375,
-0.04425048828125,
-0.027191162109375,
0.0037975311279296875,
0.004543304443359375,
-0.04193115234375,
0.0002651214599609375,
0.015411376953125,
0.03118896484375,
-0.0318603515625,
-0.0279083251953125,
0.0154571533203125,
0.03704833984375,
-0.0235137939453125,
0.035552978515625,
-0.00586700439453125,
-0.06414794921875,
0.01397705078125,
0.0007100105285644531,
0.044403076171875,
0.0093231201171875,
-0.0211334228515625,
0.036376953125,
-0.03131103515625,
0.093017578125,
-0.052032470703125,
-0.0189361572265625,
0.018035888671875,
-0.01520538330078125,
-0.0091705322265625,
-0.0321044921875,
0.01232147216796875,
-0.05194091796875,
-0.0170745849609375,
-0.006549835205078125,
-0.0034351348876953125,
0.00826263427734375,
-0.055389404296875,
-0.093017578125,
0.040740966796875,
0.000530242919921875,
-0.0399169921875,
-0.0360107421875,
0.012237548828125,
-0.015777587890625,
0.0237579345703125,
-0.00870513916015625,
-0.01312255859375,
0.017547607421875,
0.050537109375,
0.034576416015625,
0.01052093505859375,
0.07293701171875,
-0.0089111328125,
-0.0557861328125,
-0.03253173828125,
-0.04351806640625,
0.0239715576171875,
0.01560211181640625,
-0.04071044921875,
0.036468505859375,
0.0280303955078125,
-0.041259765625,
-0.0986328125,
-0.0036067962646484375,
-0.022064208984375,
0.031494140625,
0.0035724639892578125,
-0.07061767578125,
-0.031494140625,
0.057464599609375,
0.0225677490234375,
0.03192138671875,
-0.006381988525390625,
0.014373779296875,
-0.037872314453125,
-0.0634765625,
-0.01071929931640625,
0.027191162109375,
-0.0543212890625,
0.01763916015625,
0.00910186767578125,
-0.043060302734375,
0.0213623046875,
-0.01605224609375,
-0.051177978515625,
0.025177001953125,
-0.026885986328125,
-0.0014410018920898438,
-0.048370361328125,
-0.03167724609375,
0.02960205078125,
-0.021820068359375,
-0.0062713623046875,
-0.005706787109375,
0.0203399658203125,
0.0044708251953125,
0.0142364501953125,
0.0275115966796875,
0.054351806640625,
-0.08758544921875,
0.0058441162109375,
0.0021419525146484375,
0.022064208984375,
-0.07562255859375,
-0.00396728515625,
0.0154876708984375,
0.03424072265625,
-0.0297393798828125,
0.021484375,
0.0030384063720703125,
0.06988525390625,
-0.022552490234375,
0.0823974609375,
-0.02130126953125,
0.04248046875,
-0.018768310546875,
0.047393798828125,
0.00849151611328125,
-0.004009246826171875,
0.003055572509765625,
-0.00991058349609375,
0.012969970703125,
0.0313720703125,
0.031463623046875,
-0.01201629638671875,
0.024169921875,
0.0298614501953125,
0.01113128662109375,
0.016326904296875
]
|
42799aa4478471bc30c9758c1cacabb9dfe9705e | Wordpress Stackexchange
Q: Destroy user sessions based on user ID I want to programatically log a specific user out of our WordPress system based on their user ID much like the 'Log Out of All Sessions' button in the WordPress user editor section.
How am I able to do this?
A: OK, simple solution after digging in the WordPress code.
// get all sessions for user with ID $user_id
$sessions = WP_Session_Tokens::get_instance($user_id);
// we have got the sessions, destroy them all!
$sessions->destroy_all();
This will log the user with ID $user_id out of WordPress.
Use case: My use case for this is when a user is approved moderation, but then the situation changes and they are declined, they will be 'kicked' from the system if they have any active login sessions.
| Q: Destroy user sessions based on user ID I want to programatically log a specific user out of our WordPress system based on their user ID much like the 'Log Out of All Sessions' button in the WordPress user editor section.
How am I able to do this?
A: OK, simple solution after digging in the WordPress code.
// get all sessions for user with ID $user_id
$sessions = WP_Session_Tokens::get_instance($user_id);
// we have got the sessions, destroy them all!
$sessions->destroy_all();
This will log the user with ID $user_id out of WordPress.
Use case: My use case for this is when a user is approved moderation, but then the situation changes and they are declined, they will be 'kicked' from the system if they have any active login sessions.
| wordpress | {
"language": "en",
"length": 128,
"provenance": "stackexchange_00019.jsonl.gz:454662",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/184161"
} | [
0.054351806640625,
0.013458251953125,
0.0009031295776367188,
-0.0021648406982421875,
0.03875732421875,
-0.052001953125,
0.0731201171875,
-0.0372314453125,
0.004772186279296875,
0.02142333984375,
-0.000012278556823730469,
-0.0164794921875,
0.0095367431640625,
-0.0272216796875,
-0.01165771484375,
-0.0252838134765625,
0.003940582275390625,
0.00441741943359375,
-0.0015802383422851562,
-0.028106689453125,
-0.006671905517578125,
-0.0291290283203125,
0.0186614990234375,
0.0006895065307617188,
0.0196075439453125,
0.003711700439453125,
0.0233917236328125,
-0.00928497314453125,
-0.00043892860412597656,
-0.01519012451171875,
0.01165008544921875,
0.00623321533203125,
-0.03179931640625,
0.047607421875,
0.0158538818359375,
0.0171661376953125,
0.00777435302734375,
0.038543701171875,
0.0662841796875,
-0.01806640625,
0.023284912109375,
-0.00009191036224365234,
-0.0259857177734375,
-0.0158843994140625,
-0.045501708984375,
-0.034149169921875,
0.021209716796875,
-0.004245758056640625,
0.0236968994140625,
0.00524139404296875,
0.00804901123046875,
0.045989990234375,
0.029998779296875,
-0.00905609130859375,
-0.01160430908203125,
0.01280975341796875,
0.008087158203125,
0.0018606185913085938,
0.04742431640625,
0.00015938282012939453,
-0.0295562744140625,
-0.01506805419921875,
0.01202392578125,
-0.0352783203125,
-0.0208587646484375,
0.005290985107421875,
-0.0394287109375,
0.0181427001953125,
-0.011199951171875,
-0.031829833984375,
0.000025391578674316406,
-0.0152740478515625,
-0.007537841796875,
0.038818359375,
-0.02838134765625,
-0.04071044921875,
0.041595458984375,
-0.0069427490234375,
0.0072784423828125,
0.04229736328125,
0.000972747802734375,
-0.0193939208984375,
-0.076904296875,
0.04827880859375,
-0.00341796875,
0.07470703125,
-0.0145721435546875,
-0.038330078125,
-0.0205535888671875,
-0.01200103759765625,
-0.0243072509765625,
-0.013641357421875,
-0.0082244873046875,
-0.0123748779296875,
-0.0268707275390625,
-0.0239715576171875,
0.0189971923828125,
0.027435302734375,
0.00417327880859375,
-0.041015625,
0.0032901763916015625,
-0.017974853515625,
-0.06787109375,
0.01123809814453125,
-0.007289886474609375,
0.07440185546875,
0.035888671875,
0.0352783203125,
-0.023101806640625,
-0.0081634521484375,
0.002048492431640625,
-0.0771484375,
-0.031707763671875,
-0.0224151611328125,
-0.01070404052734375,
0.05548095703125,
-0.033599853515625,
0.0128021240234375,
-0.02056884765625,
0.051727294921875,
-0.034393310546875,
-0.0251007080078125,
-0.027618408203125,
0.047607421875,
0.0022907257080078125,
-0.01824951171875,
-0.01043701171875,
0.05364990234375,
-0.0209197998046875,
0.01113128662109375,
-0.0243377685546875,
0.025299072265625,
0.06256103515625,
-0.001354217529296875,
-0.0122833251953125,
-0.00849151611328125,
0.042510986328125,
-0.036834716796875,
-0.017913818359375,
0.034576416015625,
0.006683349609375,
-0.059295654296875,
-0.038299560546875,
0.01438140869140625,
0.031646728515625,
0.0293731689453125,
0.032745361328125,
0.0025539398193359375,
-0.0005288124084472656,
-0.05767822265625,
-0.0002124309539794922,
0.019195556640625,
-0.0001804828643798828,
0.02716064453125,
0.0582275390625,
0.0019855499267578125,
0.08154296875,
-0.037200927734375,
-0.0086822509765625,
-0.024932861328125,
0.036102294921875,
0.0038242340087890625,
0.015716552734375,
0.0240478515625,
-0.0170745849609375,
-0.0254974365234375,
-0.0355224609375,
-0.0201873779296875,
0.042755126953125,
0.028472900390625,
0.0264739990234375,
-0.04290771484375,
0.043487548828125,
0.02386474609375,
-0.0013761520385742188,
0.04559326171875,
-0.032867431640625,
0.0247650146484375,
0.016326904296875,
-0.0023021697998046875,
-0.011932373046875,
-0.044525146484375,
0.002685546875,
0.01314544677734375,
-0.02215576171875,
0.0355224609375,
0.019195556640625,
0.025421142578125,
-0.0102081298828125,
0.00205230712890625,
0.04571533203125,
0.06500244140625,
0.01947021484375,
0.005523681640625,
0.0189056396484375,
-0.06842041015625,
0.0174407958984375,
-0.01983642578125,
0.0007581710815429688,
0.0128631591796875,
0.07391357421875,
0.0111846923828125,
0.01294708251953125,
-0.052215576171875,
-0.10968017578125,
0.021942138671875,
-0.0469970703125,
0.0455322265625,
0.01306915283203125,
0.0187225341796875,
0.0179290771484375,
0.01123809814453125,
-0.03497314453125,
-0.0072174072265625,
-0.0287017822265625,
0.0213470458984375,
-0.0147857666015625,
0.058349609375,
-0.0027637481689453125,
0.047271728515625,
-0.0189208984375,
-0.0267181396484375,
0.00914764404296875,
-0.0230712890625,
0.054229736328125,
-0.028900146484375,
0.0024471282958984375,
-0.03338623046875,
0.052978515625,
-0.004726409912109375,
-0.0083770751953125,
0.034515380859375,
0.04449462890625,
0.0496826171875,
-0.03680419921875,
-0.0003750324249267578,
-0.03143310546875,
-0.0223541259765625,
-0.0224761962890625,
0.04364013671875,
0.0396728515625,
0.0272064208984375,
-0.007602691650390625,
-0.004093170166015625,
0.019256591796875,
-0.049652099609375,
0.01317596435546875,
-0.011627197265625,
0.01084136962890625,
0.037628173828125,
-0.021148681640625,
0.00865936279296875,
0.0293426513671875,
-0.0290374755859375,
-0.0027294158935546875,
0.0545654296875,
0.0111846923828125,
-0.006870269775390625,
0.0156402587890625,
0.00650787353515625,
-0.0154571533203125,
-0.0389404296875,
-0.007495880126953125,
-0.0221099853515625,
0.01727294921875,
-0.030181884765625,
0.01316070556640625,
-0.011688232421875,
-0.006580352783203125,
-0.01068115234375,
0.01360321044921875,
-0.06549072265625,
0.0004286766052246094,
0.0162353515625,
0.038116455078125,
-0.00495147705078125,
-0.04425048828125,
-0.004093170166015625,
0.022216796875,
0.012664794921875,
0.00244903564453125,
0.015045166015625,
0.03363037109375,
-0.005237579345703125,
0.027374267578125,
-0.033233642578125,
0.01418304443359375,
-0.0117340087890625,
-0.020904541015625,
-0.02490234375,
-0.00444793701171875,
0.058258056640625,
-0.004734039306640625,
0.0291748046875,
0.02252197265625,
-0.00835418701171875,
0.035125732421875,
-0.024017333984375,
0.01299285888671875,
0.0002353191375732422,
0.031890869140625,
0.0562744140625,
0.02142333984375,
-0.01541900634765625,
0.00640869140625,
0.0285186767578125,
0.0260009765625,
-0.0006747245788574219,
0.006702423095703125,
0.0001036524772644043,
-0.006893157958984375,
0.03546142578125,
0.0072479248046875,
0.085205078125,
-0.025177001953125,
-0.0498046875,
-0.001251220703125,
0.0162506103515625,
-0.035400390625,
-0.0574951171875,
-0.004894256591796875,
-0.0748291015625,
0.020172119140625,
-0.044891357421875,
-0.038909912109375,
0.006832122802734375,
-0.01201629638671875,
0.0236053466796875,
0.006053924560546875,
0.0030918121337890625,
0.00038695335388183594,
0.0043182373046875,
-0.00966644287109375,
0.033050537109375,
0.0032939910888671875,
0.004085540771484375,
0.007480621337890625,
0.042938232421875,
-0.00307464599609375,
-0.047515869140625,
-0.0208282470703125,
0.025115966796875,
-0.00921630859375,
-0.012603759765625,
-0.037506103515625,
-0.0024700164794921875,
0.0033664703369140625,
-0.002124786376953125,
0.01666259765625,
-0.0175933837890625,
0.02569580078125,
-0.00788116455078125,
0.00902557373046875,
-0.01016998291015625,
0.03192138671875,
-0.06292724609375,
-0.038330078125,
0.0228729248046875,
-0.002323150634765625,
-0.031890869140625,
0.011962890625,
-0.0024471282958984375,
-0.031982421875,
-0.0087890625,
0.018829345703125,
-0.0194549560546875,
0.00695037841796875,
-0.0279998779296875,
0.031341552734375,
0.0440673828125,
-0.0264892578125,
0.03729248046875,
-0.00489044189453125,
-0.006191253662109375,
0.018951416015625,
0.0010728836059570312,
0.06494140625,
-0.0018815994262695312,
-0.03253173828125,
0.00798797607421875,
0.00717926025390625,
-0.020263671875,
-0.038421630859375,
-0.06829833984375,
-0.0209503173828125,
0.049163818359375,
0.0186920166015625,
0.009796142578125,
-0.01788330078125,
-0.02935791015625,
-0.0195770263671875,
0.057647705078125,
-0.042083740234375,
-0.035308837890625,
-0.00171661376953125,
0.00035190582275390625,
0.0160369873046875,
0.03216552734375,
-0.032806396484375,
-0.018310546875,
-0.055419921875,
0.01010894775390625,
0.004749298095703125,
-0.01108551025390625,
-0.03125,
-0.01361083984375,
-0.045928955078125,
-0.03076171875,
0.0225372314453125,
-0.00859832763671875,
0.0458984375,
-0.0275726318359375,
0.0275726318359375,
-0.0163421630859375,
0.016845703125,
-0.04742431640625,
-0.0251617431640625,
0.003284454345703125,
-0.07489013671875,
0.037017822265625,
0.052581787109375,
-0.025634765625,
-0.0240020751953125,
-0.00547027587890625,
-0.019134521484375,
-0.01320648193359375,
-0.0024738311767578125,
0.020751953125,
0.00261688232421875,
0.00881195068359375,
-0.017181396484375,
-0.0224151611328125,
0.0092010498046875,
-0.02105712890625,
-0.0187225341796875,
-0.010040283203125,
-0.057403564453125,
0.007373809814453125,
-0.0228729248046875,
-0.022674560546875,
-0.04180908203125,
-0.03125,
-0.0421142578125,
0.008148193359375,
-0.0221710205078125,
-0.0175018310546875,
-0.041748046875,
-0.049591064453125,
0.0654296875,
0.03759765625,
0.0027618408203125,
-0.003326416015625,
0.0621337890625,
0.002727508544921875,
-0.041961669921875,
-0.031463623046875,
-0.00727081298828125,
0.032379150390625,
-0.04315185546875,
0.0638427734375,
0.0254364013671875,
-0.0222930908203125,
0.0772705078125,
0.00014209747314453125,
-0.038604736328125,
-0.05084228515625,
0.0855712890625,
-0.031280517578125,
-0.034271240234375,
0.0143585205078125,
-0.0828857421875,
0.05157470703125,
0.007965087890625,
0.004894256591796875,
0.00786590576171875,
0.019134521484375,
0.01261138916015625,
0.0107879638671875,
-0.0251922607421875,
-0.026336669921875,
-0.0589599609375,
0.022552490234375,
-0.04901123046875,
-0.010223388671875,
-0.013916015625,
0.0076446533203125,
0.0011844635009765625,
-0.0083160400390625,
-0.00262451171875,
-0.0088958740234375,
-0.01557159423828125,
-0.02392578125,
0.0188140869140625,
-0.012451171875,
-0.0216522216796875,
-0.0037021636962890625,
-0.016448974609375,
0.067626953125,
-0.0031986236572265625,
-0.06982421875,
0.00855255126953125,
-0.0135955810546875,
0.02764892578125,
0.0294189453125,
-0.018524169921875,
0.044281005859375,
0.0137176513671875,
-0.0112152099609375,
-0.0127716064453125,
-0.0276947021484375,
-0.014617919921875,
-0.049285888671875,
-0.0289306640625,
-0.041351318359375,
0.004962921142578125,
0.01189422607421875,
0.0572509765625,
-0.0182952880859375,
0.038787841796875,
-0.0218658447265625,
0.06536865234375,
0.02337646484375,
0.0347900390625,
0.005260467529296875,
0.016387939453125,
-0.0201568603515625,
0.019775390625,
-0.032806396484375,
-0.0190887451171875,
-0.00418853759765625,
0.064453125,
0.022705078125,
0.0174560546875,
-0.004161834716796875,
-0.0261077880859375,
-0.0234832763671875,
0.0037517547607421875,
0.0506591796875,
-0.039886474609375,
-0.08685302734375,
-0.0286102294921875,
0.0142669677734375,
0.032958984375,
-0.052276611328125,
0.006153106689453125,
-0.03643798828125,
-0.035430908203125,
-0.02435302734375,
0.0277252197265625,
-0.043701171875,
-0.0172271728515625,
-0.0140228271484375,
-0.060455322265625,
-0.02679443359375,
0.0206756591796875,
-0.0125274658203125,
-0.007022857666015625,
-0.0123138427734375,
-0.041107177734375,
0.0191802978515625,
-0.00007134675979614258,
-0.0018491744995117188,
-0.01190948486328125,
-0.000579833984375,
0.0107879638671875,
0.00788116455078125,
0.0207366943359375,
-0.01131439208984375,
-0.0487060546875,
0.0162506103515625,
-0.04974365234375,
-0.0007410049438476562,
-0.01800537109375,
-0.05535888671875,
-0.033721923828125,
-0.0311737060546875,
0.00797271728515625,
0.0172271728515625,
-0.00362396240234375,
-0.00872802734375,
-0.0156402587890625,
0.0167388916015625,
0.01488494873046875,
0.02606201171875,
-0.005931854248046875,
0.06494140625,
-0.0284576416015625,
0.0380859375,
0.015594482421875,
0.0399169921875,
-0.0082855224609375,
-0.0235595703125,
0.0219879150390625,
0.05615234375,
-0.0176849365234375,
-0.0276031494140625,
0.015716552734375,
-0.07025146484375,
0.042999267578125,
-0.03302001953125,
-0.0113372802734375,
-0.0028285980224609375,
0.0132293701171875,
-0.026580810546875,
-0.019927978515625,
0.037322998046875,
-0.003997802734375,
-0.01983642578125,
-0.0131378173828125,
0.0019969940185546875,
0.00963592529296875,
0.03466796875,
-0.019927978515625,
-0.0190887451171875,
-0.00855255126953125,
-0.0164947509765625,
-0.0230865478515625,
0.01458740234375,
-0.01218414306640625,
-0.00518798828125,
0.01320648193359375,
-0.0125274658203125,
0.0217742919921875,
0.0232086181640625,
-0.0084381103515625,
-0.00507354736328125,
0.01422882080078125,
0.056549072265625,
-0.00994873046875,
-0.030853271484375,
0.01509857177734375,
-0.036895751953125,
0.00348663330078125,
0.06463623046875,
0.053863525390625,
-0.11370849609375,
0.0276947021484375,
0.0003991127014160156,
0.02752685546875,
0.031646728515625,
-0.0276947021484375,
0.025787353515625,
-0.0005197525024414062,
0.033538818359375,
0.01080322265625,
-0.0330810546875,
-0.01068115234375,
-0.01209259033203125,
0.00026726722717285156,
-0.0228729248046875,
0.00933074951171875,
0.004924774169921875,
-0.03558349609375,
0.03350830078125,
0.006046295166015625,
0.0260467529296875,
-0.04656982421875,
-0.01007080078125,
0.043243408203125,
-0.006427764892578125,
-0.05242919921875,
0.058319091796875,
-0.0115814208984375,
0.0165863037109375,
-0.0017843246459960938,
-0.0186920166015625,
0.06884765625,
0.02398681640625,
0.003826141357421875,
-0.023681640625,
-0.00922393798828125,
0.008453369140625,
-0.042694091796875,
-0.021026611328125,
0.00433349609375,
0.021484375,
-0.033966064453125,
0.03302001953125,
-0.0362548828125,
-0.007045745849609375,
-0.0025615692138671875,
-0.04071044921875,
0.06024169921875,
-0.06646728515625,
0.027496337890625,
0.0211639404296875,
0.0626220703125,
0.007228851318359375,
-0.01276397705078125,
-0.0214080810546875,
-0.07049560546875,
-0.034423828125,
-0.0139923095703125,
-0.038299560546875,
0.03668212890625,
0.006580352783203125,
-0.0775146484375,
0.05816650390625,
0.032012939453125,
0.030364990234375,
-0.045440673828125,
0.0174407958984375,
0.0026454925537109375,
0.018463134765625,
-0.038818359375,
0.053436279296875,
-0.00362396240234375,
0.02178955078125,
-0.041259765625,
-0.00616455078125,
0.0025386810302734375,
0.0205230712890625,
0.07086181640625,
0.02227783203125,
-0.04217529296875,
-0.059173583984375,
-0.04833984375,
0.029693603515625,
-0.0106658935546875,
0.03411865234375,
-0.0013704299926757812,
-0.0176544189453125,
0.0163421630859375,
-0.00946807861328125,
0.01139068603515625,
0.0011844635009765625,
-0.0246734619140625,
0.0185394287109375,
0.00652313232421875,
0.00630950927734375,
-0.005126953125,
0.01004791259765625,
-0.055938720703125,
0.005962371826171875,
0.0186309814453125,
0.017608642578125,
0.009124755859375,
0.0188140869140625,
0.04083251953125,
-0.030853271484375,
0.020172119140625,
-0.0274505615234375,
0.056396484375,
0.024078369140625,
-0.0282440185546875,
0.031829833984375,
0.0152435302734375,
-0.047210693359375,
-0.0248870849609375,
-0.0246124267578125,
0.000614166259765625,
-0.015716552734375,
0.032470703125,
0.042144775390625,
0.029998779296875,
-0.007076263427734375,
0.01433563232421875,
0.02728271484375,
0.04144287109375,
-0.03387451171875,
-0.052032470703125,
-0.0018291473388671875,
0.00930023193359375,
0.063232421875,
0.05096435546875,
0.12139892578125,
-0.0224761962890625,
0.0007338523864746094,
-0.034149169921875,
0.0259552001953125,
0.0164031982421875,
0.01375579833984375,
0.006870269775390625,
0.047149658203125,
-0.07745361328125,
0.0310821533203125,
-0.0208892822265625,
0.01324462890625,
0.00308990478515625,
-0.0452880859375,
-0.0045013427734375,
0.002124786376953125,
0.0830078125,
0.0250701904296875,
-0.0102691650390625,
0.0306549072265625,
-0.006946563720703125,
0.00875091552734375,
-0.041259765625,
-0.045928955078125,
0.02325439453125,
0.045745849609375,
-0.01177215576171875,
-0.018707275390625,
0.0173187255859375,
-0.00040531158447265625,
-0.0643310546875,
-0.0230560302734375,
0.02032470703125,
-0.04296875,
-0.001522064208984375,
0.00807952880859375,
-0.016876220703125,
0.0259857177734375,
-0.0232696533203125,
-0.00954437255859375,
0.03326416015625,
0.030426025390625,
-0.00894927978515625,
0.0745849609375,
-0.0068206787109375,
0.0147705078125,
0.021728515625,
-0.01085662841796875,
0.04132080078125,
0.01702880859375,
-0.054443359375,
-0.00746917724609375,
-0.047698974609375,
0.01537322998046875,
-0.002002716064453125,
0.011871337890625,
-0.0059967041015625,
0.03778076171875,
0.0275115966796875,
-0.0013561248779296875,
0.0146636962890625,
-0.0086669921875,
0.0171661376953125,
-0.016632080078125,
0.01049041748046875,
-0.01493072509765625,
-0.06866455078125,
-0.02349853515625,
-0.010009765625,
0.0004050731658935547,
-0.0036411285400390625,
0.008819580078125,
0.034271240234375,
0.00801849365234375,
-0.03179931640625,
0.0246734619140625,
-0.0511474609375,
-0.031494140625,
0.037841796875,
-0.0169830322265625,
-0.0264892578125,
0.0029449462890625,
-0.07794189453125,
0.05169677734375,
-0.0010023117065429688,
0.06536865234375,
0.0477294921875,
-0.0374755859375,
0.00873565673828125,
0.0247955322265625,
-0.0160064697265625,
-0.019378662109375,
-0.0234527587890625,
0.00952911376953125,
0.01380157470703125,
0.019622802734375,
0.029144287109375,
-0.009185791015625,
0.047821044921875,
-0.024505615234375,
-0.004856109619140625,
0.00679779052734375,
-0.032470703125,
0.007793426513671875,
0.01389312744140625,
-0.0024166107177734375,
-0.0033550262451171875,
-0.00974273681640625,
-0.0191650390625,
0.000028192996978759766,
0.0165557861328125,
-0.01314544677734375,
0.006855010986328125,
-0.012908935546875,
0.031280517578125,
0.0170440673828125,
0.04437255859375,
0.005767822265625,
0.01209259033203125,
-0.0004546642303466797,
0.01361846923828125,
-0.0027866363525390625,
-0.05560302734375,
-0.047760009765625,
-0.021392822265625,
0.025665283203125,
0.0301971435546875,
0.00753021240234375,
-0.0262298583984375,
-0.0723876953125,
-0.03594970703125,
0.013397216796875,
0.0113983154296875,
-0.038238525390625,
0.014617919921875,
-0.0005207061767578125,
-0.006561279296875,
-0.0196533203125,
-0.0077362060546875,
-0.01018524169921875,
-0.0248870849609375,
-0.04217529296875,
-0.0305328369140625,
-0.032470703125,
0.04052734375,
-0.0038890838623046875,
-0.0306549072265625,
-0.01003265380859375,
0.022705078125,
0.0003590583801269531,
-0.01494598388671875,
-0.0254974365234375,
0.0222015380859375,
-0.042816162109375,
-0.0300445556640625,
0.00301361083984375,
0.0152587890625,
0.019317626953125,
-0.039459228515625,
-0.0259246826171875,
0.01837158203125,
0.005039215087890625,
0.0181121826171875,
-0.0186614990234375,
0.0199737548828125,
-0.028564453125,
-0.04510498046875,
0.06463623046875,
-0.006420135498046875,
-0.02813720703125,
-0.029510498046875,
0.0254364013671875,
0.0211639404296875,
-0.0604248046875,
-0.0122833251953125,
-0.0310516357421875,
-0.0149383544921875,
0.003955841064453125,
0.0237274169921875,
-0.038543701171875,
0.044403076171875,
0.0259246826171875,
-0.05950927734375,
0.028594970703125,
0.0188446044921875,
-0.0033969879150390625,
-0.02215576171875,
0.00927734375,
0.0233001708984375,
0.033355712890625,
0.0015172958374023438,
0.0732421875,
0.0164031982421875,
-0.00986480712890625,
-0.043975830078125,
-0.01187896728515625,
-0.007740020751953125,
0.003932952880859375,
0.0653076171875,
0.059967041015625,
0.010589599609375,
-0.033294677734375,
-0.06475830078125,
-0.057769775390625,
0.021270751953125,
-0.0254974365234375,
0.004608154296875,
-0.068359375,
0.00933837890625,
0.00039887428283691406,
-0.038360595703125,
0.01377105712890625,
-0.00403594970703125,
-0.05267333984375,
0.02484130859375,
0.0166473388671875,
-0.0037078857421875,
-0.0147247314453125,
0.03289794921875,
0.006389617919921875,
-0.023040771484375,
-0.0269622802734375,
-0.03668212890625,
0.005401611328125,
-0.01739501953125,
-0.06622314453125,
0.01314544677734375,
0.025726318359375,
-0.047271728515625,
0.0230865478515625,
0.011932373046875,
0.03509521484375,
-0.045623779296875,
-0.0177154541015625,
-0.021331787109375,
0.011474609375,
0.0171661376953125,
0.007038116455078125,
-0.0023040771484375,
-0.00856781005859375,
0.01528167724609375,
0.02099609375,
-0.002582550048828125,
-0.03436279296875,
-0.032806396484375,
0.03240966796875,
0.043853759765625,
-0.0352783203125,
0.0767822265625,
-0.0399169921875,
-0.01357269287109375,
-0.0065765380859375,
0.0295562744140625,
-0.08856201171875,
0.08428955078125,
0.0171661376953125,
0.032196044921875,
0.045745849609375
]
|
acf376995ebd06c9872cb362ebe381926d4e3fd9 | Wordpress Stackexchange
Q: Best way of passing PHP variable between partials? I have a variable in header.php, such as:
$page_extra_title = get_post_meta($this_page->ID, "_theme_extra_title", true);
Once I do:
var_dump($page_extra_title);
I always get NULL outside of header.php (var_dump works properly in header.php only). I've been pasting the same variable everywhere I need it (page.php, post.php, footer.php etc.), but it's madness and makes everything almost impossible to maintain.
I'm wondering what's the best way of passing a variable through all the files in my theme? I guess using functions.php along with "get_post_meta" might not be the best idea? :)
A: Simple answer, don't pass variables anywhere as it stinks of using global variables which is evil.
From your example it seems like you are trying to do an early optimization, yet another evil ;)
Use the wordpress API to get data which is stored in the DB and don't try to outsmart and optimize its usage as the API do more then just retrieving values and it activates filters and actions. By removing the API call you remove the ability of other developers to change the behavior of your code without modifying it.
| Q: Best way of passing PHP variable between partials? I have a variable in header.php, such as:
$page_extra_title = get_post_meta($this_page->ID, "_theme_extra_title", true);
Once I do:
var_dump($page_extra_title);
I always get NULL outside of header.php (var_dump works properly in header.php only). I've been pasting the same variable everywhere I need it (page.php, post.php, footer.php etc.), but it's madness and makes everything almost impossible to maintain.
I'm wondering what's the best way of passing a variable through all the files in my theme? I guess using functions.php along with "get_post_meta" might not be the best idea? :)
A: Simple answer, don't pass variables anywhere as it stinks of using global variables which is evil.
From your example it seems like you are trying to do an early optimization, yet another evil ;)
Use the wordpress API to get data which is stored in the DB and don't try to outsmart and optimize its usage as the API do more then just retrieving values and it activates filters and actions. By removing the API call you remove the ability of other developers to change the behavior of your code without modifying it.
A: Although kaiser's answer is technically right, I doubt it's the best answer for you.
If you're creating your own theme, then I think it is indeed the best way to set up some sort of framework using classes (and maybe namespaces and interfaces too, although that might be a little too much for a WP theme).
On the other hand, if you are just extending / adjusting an existing theme and only need to pass one or a few variables, I think you should stick with global. Because header.php is included within a function, the variables you declare in that file are usable in that file only. With global you make them accessible in the whole WP project:
In header.php:
global $page_extra_title;
$page_extra_title = get_post_meta($this_page->ID, "_theme_extra_title", true);
In single.php (for example):
global $page_extra_title;
var_dump( $page_extra_title );
A: This is an alternative approach to @kaiser answer, that I found pretty fine (+1 from me) but requires additional work to be used with core WP functions and it's per-se low integrated with template hierarchy.
The approach I want to share is based on a single class (it's a stripped-down version from something I'm working on) that takes care of render data for templates.
It has some (IMO) interesting features:
*
*templates are standard WordPress template files (single.php, page.php) they get a bit of more power
*existing templates just work, so you can integrate template from existent themes with no effort
*unlike @kaiser approach, in templates you access variables using $this keyword: this gives you the possibility to avoid notices in production in case of undefined variables
The Engine Class
namespace GM\Template;
class Engine
{
private $data;
private $template;
private $debug = false;
/**
* Bootstrap rendering process. Should be called on 'template_redirect'.
*/
public static function init()
{
add_filter('template_include', new static(), 99, 1);
}
/**
* Constructor. Sets debug properties.
*/
public function __construct()
{
$this->debug =
(! defined('WP_DEBUG') || WP_DEBUG)
&& (! defined('WP_DEBUG_DISPLAY') || WP_DEBUG_DISPLAY);
}
/**
* Render a template.
* Data is set via filters (for main template) or passed to method for partials.
* @param string $template template file path
* @param array $data template data
* @param bool $partial is the template a partial?
* @return mixed|void
*/
public function __invoke($template, array $data = array(), $partial = false)
{
if ($partial || $template) {
$this->data = $partial
? $data
: $this->provide(substr(basename($template), 0, -4));
require $template;
$partial or exit;
}
return $template;
}
/**
* Render a partial.
* Partial-specific data can be passed to method.
* @param string $template template file path
* @param array $data template data
* @param bool $isolated when true partial has no access on parent template context
*/
public function partial($partial, array $data = array(), $isolated = false)
{
do_action("get_template_part_{$partial}", $partial, null);
$file = locate_template("{$partial}.php");
if ($file) {
$class = __CLASS__;
$template = new $class();
$template_data = $isolated ? $data : array_merge($this->data, $data);
$template($file, $template_data, true);
} elseif ($this->debug) {
throw new \RuntimeException("{$partial} is not a valid partial.");
}
}
/**
* Used in templates to access data.
* @param string $name
* @return string
*/
public function __get($name)
{
if (array_key_exists($name, $this->data)) {
return $this->data[$name];
}
if ($this->debug) {
throw new \RuntimeException("{$name} is undefined.");
}
return '';
}
/**
* Provide data to templates using two filters hooks:
* one generic and another query type specific.
* @param string $type Template file name (without extension, e.g. "single")
* @return array
*/
private function provide($type)
{
$generic = apply_filters('gm_template_data', array(), $type);
$specific = apply_filters("gm_template_data_{$type}", array());
return array_merge(
is_array($generic) ? $generic : array(),
is_array($specific) ? $specific : array()
);
}
}
(Available as Gist here.)
How to use
Only thing needed is to call the Engine::init() method, probably on 'template_redirect' hook. That can be done in theme functions.php or from a plugin.
require_once '/path/to/the/file/Engine.php';
add_action('template_redirect', array('GM\Template\Engine', 'init'), 99);
That's all.
Your existing templates will work as expcted. But now you have the possibility to access custom template data.
Custom Template Data
To pass custom data to templates there are two filters:
*
*'gm_template_data'
*'gm_template_data_{$type}'
The first one is fired for all templates, the second is template specific, in fact, the dymamic part {$type} is the basename of the template file without file extension.
E.g. the filter 'gm_template_data_single' can be used to pass data to the single.php template.
The callbacks attached to these hooks have to return an array, where the keys are the variable names.
For example, you can pass meta data as template data likes so:
add_filter('gm_template_data', function($data) {
if (is_singular()) {
$id = get_queried_object_id();
$data['extra_title'] = get_post_meta($id, "_theme_extra_title", true);
}
return $data;
};
And then, inside the template you can just use:
<?= $this->extra_title ?>
Debug Mode
When both the constants WP_DEBUG and WP_DEBUG_DISPLAY are true, the class worksin debug mode. It means that if a variable is not defined an exception is thrown.
When the class is not in debug mode (probably in production) accessing an undefined variable will output an empty string.
Data Models
A nice and maintenable way to organize your data is to use model classes.
They can be very simple classes, that return data using same filters described above.
There is no particular interface to follow, they can be organized accordi to your preference.
Belowe, there is just an example, but you are free to do in your own way.
class SeoModel
{
public function __invoke(array $data, $type = '')
{
switch ($type) {
case 'front-page':
case 'home':
$data['seo_title'] = 'Welcome to my site';
break;
default:
$data['seo_title'] = wp_title(' - ', false, 'right');
break;
}
return $data;
}
}
add_filter('gm_template_data', new SeoModel(), 10, 2);
The __invoke() method (that runs when a class is used like a callback) returns a string to be used for the <title> tag of the template.
Thanks to the fact that the second argument passed by 'gm_template_data' is the template name, the method returns a custom title for home page.
Having the code above, is then possible to use something like
<title><?= $this->seo_title ?></title>
in the <head> section of the page.
Partials
WordPress has functions like get_header() or get_template_part() that can be used to load partials into main template.
These functions, just like all the other WordPress functions, can be used in templates when using the Engine class.
The only problem is that inside the partials loaded using the core WordPress functions is not possible to use the advanced feature of getting custom template data using $this.
For this reason, the Engine class has a method partial() that allows to load a partial (in a fully child-theme compatible way) and still be able to use in partials the custom template data.
The usage is pretty simple.
Assuming there is a file named partials/content.php inside theme (or child theme) folder, it can be included using:
<?php $this->partial('partials/content') ?>
Inside that partial will be possible to access all parent theme data is the same way.
Unlike WordPress functions, Engine::partial() method allows to pass specific data to partials, simply passing an array of data as second argument.
<?php $this->partial('partials/content', array('greeting' => 'Welcome!')) ?>
By default, partials have access to data available in parent theme and to data explicilty passed .
If some variable explicitly passed to partial has the same name of a parent theme variable, then the variable explicitly passed wins.
However, is also possible to include a partial in isolated mode, i.e. the partial has no access to parent theme data. To do that, just pass true as third argument to partial():
<?php $this->partial('partials/content', array('greeting' => 'Welcome!'), true) ?>
Conclusion
Even if pretty simple, Engine class is pretty complete, but surely can be further improved. E.g. there is no way to check if a variable is defined or not.
Thanks to its 100% compatibility with WordPress features and template hierarchy you can integrate it with existing and third party code with no issue.
However, note that is only partially tested, so is possible there are issues I have not discovered yet.
The five points under "What did we gain?" in @kaiser answer:
*
*Easily exchange templates without changing the data structure
*Have easy to read tempaltes
*Avoid global scope
*Can Unit-Test
*Can exchange the Model/the data without harming other components
are all valid for my class as well.
A: Basic separated data structures
To pass around data, you normally utilize a Model (that's the "M" in "MVC"). Let's look at a very simple interface for data. Interfaces are just used as "Recipes" for our building blocks:
namespace WeCodeMore\Package\Models;
interface ArgsInterface
{
public function getID();
public function getLabel();
}
Above is what we pass around: A common ID and a "Label".
Displaying data by combining atomic pieces
Next we need some View that negotiates between our Model and ... our template.
namespace WeCodeMore\Package;
interface PackageViewInterface
{
/**
* @param Models\ArgsInterface $args
* @return int|void
*/
public function render( Models\ArgsInterface $args );
}
Basically that Interface says
"We can render something and a Model is mandatory for that task"
Finally we need to implement above and build the actual View. As you can see, the constructor tells that the mandatory thing for our view is a Template and that we can render it. For the sake of easy development we even check if the template file actually is present so we can make other developers lives (and ours as well) much easier and note that.
In a second step in the render function we use a Closure to build the actual template wrapper and bindTo() the Model to the template.
namespace WeCodeMore\Package;
use WeCodeMore\Package\Models\ArgsInterface;
/** @noinspection PhpInconsistentReturnPointsInspection */
class PackageView implements PackageViewInterface
{
/** @var string|\WP_Error */
private $template;
/**
* @param string $template
*/
public function __construct( $template )
{
$this->template = ! file_exists( $template )
? new \WP_Error( 'wcm-package', 'A package view needs a template' )
: $template;
}
/**
* @param Models\ArgsInterface $args
* @return int|void
*/
public function render( Models\ArgsInterface $args )
{
if ( is_wp_error( $this->template ) )
return print $this->template->get_error_message();
/** @var $callback \Closure */
$callback = function( $template )
{
extract( get_object_vars( $this ) );
require $template;
};
call_user_func(
$callback->bindTo( $args ),
$this->template
);
}
}
Separating the View and Rendering
This means that we can use a very simple template like the following
<!--suppress HtmlFormInputWithoutLabel -->
<p><?= $label ?></p>
to render our content. Putting the pieces together we would get something around the following lines (in our Controller, Mediator, etc.):
namespace WeCodeMore\Package;
$view = new PackageView( plugin_dir_path( __FILE__ ).'tmpl/label.tmpl.php' );
$view->render( new Models\Args );
What did we gain?
This way we can
*
*Easily exchange templates without changing the data structure
*Have easy to read tempaltes
*Avoid global scope
*Can Unit-Test
*Can exchange the Model/the data without harming other components
Combining OOP PHP with the WP API
Of course this is hardly possible by using basic theming functionality like get_header(), get_footer(), etc., right? Wrong. Just call your classes in whatever template or template part you would like. Render it, transform the data, do whatever you want. If you are really nice you even just add your own bunch of custom filters and have some negotiator to take care of what gets rendered by which controller on which route/conditional template load.
Conclusion?
You can work with stuff like above in WP without a problem and still stick to the basic API and reuse code and data without calling a single global or messing up and polluting the global name space.
A: An easy solution is to write a function to get the extra title. I use a static variable to keep the database calls to one only. Put this in your functions.php.
function get_extra_title($post_id) {
static $title = null;
if ($title === null) {
$title = get_post_meta($post_id, "_theme_extra_title", true)
}
return $title;
}
Outside header.php, call the function to get the value:
var_dump(get_extra_title($post->ID));
| wordpress | {
"language": "en",
"length": 2144,
"provenance": "stackexchange_00019.jsonl.gz:454686",
"question_score": "17",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/184235"
} | [
0.032745361328125,
-0.043304443359375,
0.0278167724609375,
-0.0176849365234375,
-0.03399658203125,
-0.0064239501953125,
0.015960693359375,
-0.01153564453125,
0.0176544189453125,
0.00885772705078125,
-0.016510009765625,
-0.018096923828125,
-0.035552978515625,
-0.0160980224609375,
-0.029266357421875,
-0.029632568359375,
0.0208892822265625,
-0.02716064453125,
0.034881591796875,
-0.006473541259765625,
0.006580352783203125,
0.00521087646484375,
0.072265625,
-0.0318603515625,
0.0253753662109375,
-0.056365966796875,
0.021575927734375,
-0.0185089111328125,
0.0033969879150390625,
-0.0303802490234375,
0.01204681396484375,
0.0338134765625,
-0.0098724365234375,
0.0279388427734375,
0.036102294921875,
-0.00855255126953125,
0.0247802734375,
0.017181396484375,
0.0513916015625,
0.003772735595703125,
0.014923095703125,
0.0091552734375,
0.001590728759765625,
0.063720703125,
-0.021087646484375,
-0.058685302734375,
0.0118560791015625,
-0.0291595458984375,
-0.039703369140625,
0.0258331298828125,
0.036590576171875,
-0.0013723373413085938,
0.039093017578125,
0.055755615234375,
0.0086822509765625,
-0.00931549072265625,
0.0235748291015625,
-0.05169677734375,
0.0374755859375,
0.0007791519165039062,
-0.039520263671875,
-0.0266265869140625,
0.036712646484375,
-0.050384521484375,
0.0496826171875,
-0.0182342529296875,
-0.031097412109375,
0.05401611328125,
-0.0596923828125,
0.037811279296875,
0.0391845703125,
-0.04925537109375,
-0.024078369140625,
-0.0219573974609375,
-0.0110626220703125,
-0.0142974853515625,
0.050567626953125,
-0.0183563232421875,
-0.0167236328125,
0.01059722900390625,
-0.052581787109375,
-0.00937652587890625,
-0.057098388671875,
-0.0240020751953125,
0.0067596435546875,
0.01702880859375,
-0.0256805419921875,
0.0065460205078125,
-0.0081787109375,
-0.040985107421875,
-0.0214080810546875,
-0.0225830078125,
-0.0465087890625,
0.0225372314453125,
-0.000858306884765625,
-0.0139923095703125,
-0.01088714599609375,
0.007526397705078125,
0.0033721923828125,
0.03179931640625,
-0.00807952880859375,
-0.0222625732421875,
0.0236968994140625,
-0.0201873779296875,
-0.0070343017578125,
0.0173492431640625,
-0.004512786865234375,
-0.0001825094223022461,
0.0124053955078125,
0.0308074951171875,
-0.009857177734375,
-0.01490020751953125,
-0.0026950836181640625,
0.0131378173828125,
-0.01474761962890625,
0.0237884521484375,
-0.017669677734375,
0.01468658447265625,
-0.017608642578125,
0.033355712890625,
0.0004315376281738281,
0.004322052001953125,
0.005702972412109375,
-0.02386474609375,
0.00007396936416625977,
-0.0196380615234375,
-0.040130615234375,
-0.0045623779296875,
-0.018951416015625,
0.04510498046875,
-0.015106201171875,
-0.00655364990234375,
0.032745361328125,
0.031585693359375,
-0.01161956787109375,
-0.032135009765625,
0.01189422607421875,
0.0067901611328125,
-0.0018463134765625,
0.0144805908203125,
-0.0305328369140625,
-0.0273284912109375,
0.032470703125,
-0.034423828125,
-0.0157012939453125,
0.0131988525390625,
0.014068603515625,
0.022979736328125,
-0.007358551025390625,
-0.034912109375,
0.01093292236328125,
-0.0196380615234375,
0.0030364990234375,
0.01385498046875,
0.0000017285346984863281,
0.0120391845703125,
-0.0214080810546875,
-0.0021533966064453125,
0.0271148681640625,
0.0166473388671875,
-0.02337646484375,
-0.016510009765625,
0.01898193359375,
-0.01485443115234375,
-0.02740478515625,
0.004520416259765625,
0.00821685791015625,
-0.005222320556640625,
0.006458282470703125,
0.0098419189453125,
0.03424072265625,
-0.006229400634765625,
-0.03839111328125,
-0.01239776611328125,
-0.0013866424560546875,
-0.00823211669921875,
-0.012847900390625,
0.031585693359375,
0.02996826171875,
-0.043182373046875,
-0.04925537109375,
-0.054901123046875,
0.055023193359375,
-0.040130615234375,
-0.042938232421875,
0.03875732421875,
-0.019683837890625,
0.0220489501953125,
0.0298614501953125,
-0.0066986083984375,
0.061370849609375,
0.012420654296875,
-0.045745849609375,
-0.001224517822265625,
-0.0157012939453125,
0.024139404296875,
0.001415252685546875,
0.0276641845703125,
-0.007236480712890625,
-0.003429412841796875,
0.006862640380859375,
0.0161285400390625,
0.00321197509765625,
-0.004360198974609375,
-0.0011730194091796875,
-0.0213775634765625,
0.0084686279296875,
0.022064208984375,
-0.0305938720703125,
0.045013427734375,
0.021026611328125,
0.00418853759765625,
-0.03533935546875,
0.012908935546875,
-0.001262664794921875,
-0.01318359375,
0.0008845329284667969,
0.04705810546875,
0.003997802734375,
0.0297393798828125,
0.03924560546875,
-0.0294036865234375,
0.0181427001953125,
0.003192901611328125,
0.0301513671875,
0.018310546875,
-0.0268707275390625,
-0.019073486328125,
0.0207061767578125,
-0.0029048919677734375,
0.00875091552734375,
0.025054931640625,
-0.01229095458984375,
0.01186370849609375,
0.00909423828125,
0.0029926300048828125,
0.027679443359375,
-0.07684326171875,
0.014678955078125,
0.0343017578125,
0.0239105224609375,
0.0634765625,
-0.0174407958984375,
-0.00691986083984375,
0.0226898193359375,
-0.069091796875,
-0.0184478759765625,
-0.0109100341796875,
0.0270233154296875,
0.02618408203125,
-0.01261138916015625,
-0.0240936279296875,
0.02252197265625,
-0.040863037109375,
-0.0145263671875,
0.034820556640625,
-0.0217742919921875,
-0.0157623291015625,
-0.0165557861328125,
0.005962371826171875,
0.0035572052001953125,
-0.038665771484375,
-0.020263671875,
-0.01522064208984375,
0.0546875,
-0.0223846435546875,
0.002735137939453125,
0.0012969970703125,
-0.01947021484375,
-0.003452301025390625,
0.023223876953125,
-0.0482177734375,
-0.00807952880859375,
-0.0065460205078125,
0.00901031494140625,
-0.00853729248046875,
-0.0026092529296875,
0.002323150634765625,
-0.013427734375,
-0.0183868408203125,
0.0003459453582763672,
0.0526123046875,
0.03460693359375,
-0.021240234375,
0.004261016845703125,
-0.0029239654541015625,
0.00392913818359375,
-0.0277862548828125,
0.036468505859375,
0.010650634765625,
0.042083740234375,
0.0175628662109375,
-0.006244659423828125,
0.053955078125,
-0.01446533203125,
-0.0196990966796875,
0.055328369140625,
-0.00878143310546875,
0.0205841064453125,
0.0013904571533203125,
0.036041259765625,
0.037445068359375,
-0.00966644287109375,
-0.00992584228515625,
-0.01517486572265625,
0.005245208740234375,
-0.0260772705078125,
-0.0022029876708984375,
-0.01247406005859375,
-0.043426513671875,
-0.047515869140625,
-0.01094818115234375,
0.0209197998046875,
0.02581787109375,
0.0215911865234375,
-0.028533935546875,
0.0036716461181640625,
0.0273590087890625,
-0.07171630859375,
-0.066162109375,
0.0352783203125,
-0.0267486572265625,
-0.01280975341796875,
0.0108795166015625,
-0.032073974609375,
-0.0213775634765625,
0.0219573974609375,
-0.009674072265625,
0.0540771484375,
-0.053497314453125,
-0.0694580078125,
-0.0517578125,
-0.07208251953125,
-0.0291900634765625,
0.005016326904296875,
-0.01305389404296875,
-0.0166778564453125,
0.052215576171875,
-0.006259918212890625,
-0.03216552734375,
-0.01459503173828125,
0.0032176971435546875,
0.02264404296875,
-0.0097808837890625,
0.03790283203125,
-0.0399169921875,
0.01242828369140625,
-0.003963470458984375,
0.02178955078125,
0.0270233154296875,
-0.01425933837890625,
-0.026824951171875,
-0.03826904296875,
0.01197052001953125,
-0.0049896240234375,
0.0251007080078125,
0.04376220703125,
0.012237548828125,
0.01837158203125,
-0.038726806640625,
-0.038482666015625,
-0.0124664306640625,
-0.06451416015625,
0.027862548828125,
0.042449951171875,
0.01361846923828125,
0.003704071044921875,
0.0015707015991210938,
-0.01212310791015625,
-0.019012451171875,
-0.0306396484375,
-0.036712646484375,
0.04736328125,
0.00222015380859375,
0.044464111328125,
0.016510009765625,
0.0230255126953125,
-0.01039886474609375,
0.0013284683227539062,
0.017791748046875,
0.01412200927734375,
0.003902435302734375,
0.01470184326171875,
-0.01531982421875,
-0.0019054412841796875,
0.04388427734375,
0.0325927734375,
0.067138671875,
-0.02801513671875,
-0.043670654296875,
-0.04638671875,
0.0703125,
-0.024261474609375,
-0.036163330078125,
0.013824462890625,
0.016845703125,
-0.03619384765625,
0.0007724761962890625,
-0.01546478271484375,
-0.004734039306640625,
-0.028472900390625,
0.007297515869140625,
-0.00725555419921875,
0.0260009765625,
-0.050689697265625,
0.0946044921875,
-0.030731201171875,
-0.005847930908203125,
0.017578125,
-0.054107666015625,
0.0014524459838867188,
0.044403076171875,
-0.0268096923828125,
0.005840301513671875,
-0.03253173828125,
-0.041595458984375,
-0.01178741455078125,
-0.01119232177734375,
-0.019683837890625,
0.051239013671875,
0.0341796875,
-0.047393798828125,
-0.006435394287109375,
0.0056610107421875,
-0.030029296875,
0.00841522216796875,
-0.0175628662109375,
0.005649566650390625,
0.017852783203125,
0.0225830078125,
-0.018798828125,
0.01178741455078125,
-0.0061798095703125,
-0.0003638267517089844,
-0.0386962890625,
-0.036651611328125,
-0.0199432373046875,
-0.0521240234375,
0.021881103515625,
-0.03692626953125,
-0.0655517578125,
-0.0280914306640625,
0.01021575927734375,
-0.03350830078125,
-0.01331329345703125,
0.0124359130859375,
0.01122283935546875,
-0.0333251953125,
0.05621337890625,
0.06524658203125,
-0.01422882080078125,
-0.0212860107421875,
0.0280609130859375,
0.0192413330078125,
-0.06683349609375,
-0.0182952880859375,
0.0228424072265625,
0.046844482421875,
-0.05029296875,
0.0222015380859375,
-0.02105712890625,
-0.03472900390625,
0.09197998046875,
-0.0203399658203125,
0.00013446807861328125,
0.006244659423828125,
0.0303955078125,
0.0037136077880859375,
-0.029541015625,
0.0286712646484375,
0.0128631591796875,
-0.0022144317626953125,
0.01169586181640625,
-0.0228271484375,
-0.0321044921875,
-0.029205322265625,
0.037261962890625,
-0.02911376953125,
0.061920166015625,
-0.0343017578125,
-0.0216522216796875,
-0.0007786750793457031,
0.02044677734375,
0.034149169921875,
0.00927734375,
0.00640869140625,
0.0031566619873046875,
0.0207977294921875,
0.010894775390625,
0.0088653564453125,
0.0279083251953125,
-0.037322998046875,
0.02301025390625,
0.0151824951171875,
-0.0161895751953125,
-0.0097503662109375,
-0.0025081634521484375,
0.017822265625,
0.0186767578125,
-0.00870513916015625,
-0.0635986328125,
0.0222930908203125,
0.05865478515625,
-0.04095458984375,
0.00875091552734375,
0.0203857421875,
-0.00542449951171875,
-0.00933074951171875,
0.021209716796875,
-0.0189208984375,
-0.01464080810546875,
-0.01904296875,
0.0202178955078125,
-0.00598907470703125,
-0.0112152099609375,
-0.0299072265625,
0.08026123046875,
-0.04376220703125,
0.033843994140625,
-0.005825042724609375,
0.01507568359375,
0.003131866455078125,
0.0269775390625,
0.015777587890625,
-0.037689208984375,
0.02239990234375,
-0.0077667236328125,
0.01416015625,
-0.0306243896484375,
-0.00461578369140625,
0.02691650390625,
0.056396484375,
-0.00746917724609375,
-0.032379150390625,
-0.00010591745376586914,
-0.03790283203125,
-0.01529693603515625,
0.017059326171875,
-0.0157928466796875,
-0.037628173828125,
-0.0183868408203125,
0.0022678375244140625,
0.0367431640625,
-0.01079559326171875,
0.0035686492919921875,
0.0017757415771484375,
0.0034160614013671875,
0.047027587890625,
-0.03729248046875,
0.0245361328125,
-0.0107574462890625,
-0.01490020751953125,
0.032257080078125,
-0.0021266937255859375,
-0.0181884765625,
-0.0312347412109375,
-0.0193328857421875,
-0.0205841064453125,
-0.00817108154296875,
0.045379638671875,
-0.0260467529296875,
0.02960205078125,
-0.01219940185546875,
-0.003643035888671875,
0.025421142578125,
0.0060577392578125,
0.046142578125,
0.026214599609375,
-0.0411376953125,
0.0281524658203125,
-0.05718994140625,
0.0025691986083984375,
-0.021026611328125,
-0.049224853515625,
-0.038787841796875,
-0.015716552734375,
0.016845703125,
0.038665771484375,
-0.002567291259765625,
-0.032470703125,
0.02142333984375,
0.012664794921875,
-0.0024871826171875,
0.0755615234375,
-0.0129241943359375,
0.061767578125,
-0.025604248046875,
0.050018310546875,
-0.01290130615234375,
0.0091705322265625,
-0.0197906494140625,
-0.00669097900390625,
0.0264434814453125,
-0.01497650146484375,
-0.052642822265625,
-0.024871826171875,
0.00391387939453125,
-0.0013208389282226562,
0.03668212890625,
-0.0216522216796875,
0.025543212890625,
0.010406494140625,
0.01329803466796875,
-0.00659942626953125,
-0.0132598876953125,
0.019317626953125,
-0.02618408203125,
0.052398681640625,
0.0120697021484375,
-0.033447265625,
0.0027866363525390625,
-0.033447265625,
0.025146484375,
0.04107666015625,
0.00882720947265625,
-0.045806884765625,
-0.07257080078125,
0.056793212890625,
0.12005615234375,
0.026153564453125,
0.10101318359375,
-0.0029315948486328125,
0.024932861328125,
0.062255859375,
0.0166168212890625,
0.0281982421875,
-0.0477294921875,
0.02294921875,
-0.00359344482421875,
0.010406494140625,
0.016754150390625,
-0.0166778564453125,
0.006786346435546875,
0.06646728515625,
0.06256103515625,
-0.070068359375,
-0.01378631591796875,
0.0258941650390625,
-0.0115966796875,
-0.017913818359375,
-0.0013952255249023438,
-0.018096923828125,
-0.053619384765625,
0.03997802734375,
-0.007053375244140625,
-0.00925445556640625,
0.029266357421875,
0.0112152099609375,
0.0062408447265625,
-0.0166015625,
0.030487060546875,
0.01006317138671875,
-0.035186767578125,
0.048858642578125,
0.0180816650390625,
0.040008544921875,
-0.00583648681640625,
0.002773284912109375,
0.054534912109375,
-0.056365966796875,
-0.0906982421875,
-0.0043487548828125,
-0.00528717041015625,
-0.06494140625,
-0.042572021484375,
0.031463623046875,
0.0247955322265625,
0.0208892822265625,
0.009918212890625,
-0.0386962890625,
0.0172119140625,
-0.01210784912109375,
-0.046417236328125,
-0.037200927734375,
0.011627197265625,
0.00794219970703125,
-0.0278472900390625,
0.0294036865234375,
-0.017242431640625,
-0.046905517578125,
-0.00787353515625,
0.004062652587890625,
0.0933837890625,
-0.015350341796875,
-0.0380859375,
0.0262298583984375,
0.01025390625,
-0.0181121826171875,
0.00075531005859375,
0.03326416015625,
-0.051971435546875,
-0.024017333984375,
0.024566650390625,
-0.025726318359375,
-0.037139892578125,
-0.0006451606750488281,
-0.042724609375,
0.10235595703125,
0.016571044921875,
-0.01009368896484375,
0.02020263671875,
0.044158935546875,
-0.06512451171875,
0.00962066650390625,
-0.05029296875,
0.056732177734375,
0.005588531494140625,
0.068115234375,
-0.07208251953125,
-0.016021728515625,
0.01456451416015625,
0.03619384765625,
0.059295654296875,
0.01218414306640625,
0.01262664794921875,
-0.0053863525390625,
0.06304931640625,
0.05419921875,
-0.00963592529296875,
-0.01474761962890625,
0.05242919921875,
0.032745361328125,
0.0357666015625,
-0.021148681640625,
0.034912109375,
-0.056365966796875,
0.0280609130859375,
0.072998046875,
0.023529052734375,
0.0002818107604980469,
0.01312255859375,
-0.007709503173828125,
-0.0297698974609375,
0.00797271728515625,
0.017974853515625,
0.00766754150390625,
0.0133209228515625,
-0.0138092041015625,
-0.000018894672393798828,
0.00644683837890625,
-0.01194000244140625,
0.014068603515625,
0.0299072265625,
0.03497314453125,
0.00862884521484375,
0.0457763671875,
0.0013751983642578125,
0.0660400390625,
-0.0188446044921875,
-0.009307861328125,
-0.01776123046875,
0.046875,
0.0667724609375,
0.020263671875,
0.013824462890625,
-0.057647705078125,
0.0087432861328125,
0.07476806640625,
0.0888671875,
-0.059967041015625,
-0.01439666748046875,
-0.00571441650390625,
0.0022182464599609375,
0.01282501220703125,
-0.0282745361328125,
0.0239410400390625,
0.0174560546875,
0.022186279296875,
-0.02947998046875,
0.024169921875,
0.03424072265625,
0.035980224609375,
0.0013532638549804688,
0.0174713134765625,
-0.0697021484375,
-0.01403045654296875,
-0.049072265625,
-0.0006079673767089844,
0.007068634033203125,
0.0777587890625,
0.04364013671875,
0.034698486328125,
-0.035003662109375,
-0.045867919921875,
-0.0190582275390625,
0.04620361328125,
-0.00595855712890625,
0.022735595703125,
-0.045684814453125,
-0.0399169921875,
-0.006805419921875,
0.033477783203125,
0.01015472412109375,
0.058868408203125,
0.04541015625,
-0.0015020370483398438,
-0.02191162109375,
-0.00020754337310791016,
-0.0262908935546875,
-0.04803466796875,
0.0260162353515625,
-0.024383544921875,
-0.0190582275390625,
-0.04119873046875,
-0.044036865234375,
-0.031829833984375,
-0.00853729248046875,
0.001041412353515625,
-0.0013666152954101562,
-0.006694793701171875,
0.01140594482421875,
-0.03533935546875,
-0.003009796142578125,
-0.0070953369140625,
0.041412353515625,
0.0179901123046875,
-0.0034942626953125,
0.0227508544921875,
-0.0145721435546875,
-0.053131103515625,
-0.0209503173828125,
0.0140533447265625,
-0.007373809814453125,
0.035308837890625,
-0.047393798828125,
-0.01123809814453125,
0.039947509765625,
-0.01540374755859375,
-0.0154876708984375,
0.01287078857421875,
0.010467529296875,
-0.01294708251953125,
-0.03961181640625,
-0.027313232421875,
-0.0211029052734375,
0.043060302734375,
0.030731201171875,
-0.0016431808471679688,
0.01041412353515625,
0.04052734375,
-0.018463134765625,
0.0185089111328125,
-0.0399169921875,
-0.00860595703125,
0.005893707275390625,
0.0012426376342773438,
0.0028362274169921875,
-0.0032062530517578125,
-0.0411376953125,
0.0322265625,
0.0272369384765625,
-0.021392822265625,
0.03363037109375,
-0.0185089111328125,
0.00778961181640625,
-0.0163421630859375,
0.00799560546875,
-0.0019588470458984375,
-0.00012093782424926758,
-0.0279541015625,
-0.0074462890625,
0.047332763671875,
0.0611572265625,
-0.0003421306610107422,
-0.0140228271484375,
0.050018310546875,
0.0052337646484375,
0.0164794921875,
0.042083740234375,
0.0240325927734375,
0.0254364013671875,
-0.034576416015625,
-0.03350830078125,
-0.0033550262451171875,
-0.0158538818359375,
-0.00313568115234375,
0.0113983154296875,
0.0300445556640625,
-0.004535675048828125,
-0.0433349609375,
-0.0187225341796875,
0.0290985107421875,
0.04315185546875,
0.0258331298828125,
0.0117645263671875,
0.0008730888366699219,
-0.01546478271484375,
-0.0258331298828125,
-0.038909912109375,
-0.007114410400390625,
-0.025543212890625,
-0.01110076904296875,
0.03729248046875,
-0.01282501220703125,
0.003314971923828125,
-0.03753662109375,
-0.034515380859375,
0.020965576171875,
-0.0022678375244140625,
-0.028564453125,
-0.0270538330078125,
-0.007137298583984375,
0.0193023681640625,
-0.01015472412109375,
0.014404296875,
-0.00366973876953125,
0.054534912109375,
-0.022064208984375,
-0.0223846435546875,
-0.019134521484375,
0.00884246826171875,
-0.03289794921875,
0.0278778076171875,
0.054962158203125,
-0.006500244140625,
-0.01235198974609375,
0.0157470703125,
0.00025653839111328125,
0.0574951171875,
-0.06329345703125,
-0.0279388427734375,
-0.0086212158203125,
0.0286407470703125,
-0.0088958740234375,
-0.06842041015625,
0.0038852691650390625,
-0.04241943359375,
0.0126953125,
-0.0121307373046875,
-0.014892578125,
-0.006259918212890625,
-0.041259765625,
-0.039398193359375,
0.08404541015625,
-0.00785064697265625,
-0.0260009765625,
-0.031219482421875,
-0.024627685546875,
0.0062408447265625,
0.043212890625,
0.004474639892578125,
-0.06927490234375,
-0.0694580078125,
0.016937255859375,
0.03216552734375,
0.01837158203125,
0.0307159423828125,
0.0109710693359375,
-0.047821044921875,
0.0223236083984375,
0.0008435249328613281,
0.0161590576171875,
-0.05694580078125,
0.0209808349609375,
0.0165252685546875,
0.028289794921875,
0.01039886474609375,
0.0204010009765625,
0.04461669921875,
0.01363372802734375,
-0.032928466796875,
-0.024566650390625,
-0.039520263671875,
0.0000864267349243164,
0.10223388671875,
0.06903076171875,
0.0288543701171875,
-0.040313720703125,
0.00678253173828125,
0.02130126953125,
0.00489044189453125,
0.00894927978515625,
0.021240234375,
-0.08612060546875,
-0.042022705078125,
0.03778076171875,
0.005687713623046875,
0.029632568359375,
-0.02630615234375,
-0.01486968994140625,
-0.017425537109375,
-0.01104736328125,
0.00665283203125,
-0.032989501953125,
-0.08001708984375,
0.0297393798828125,
-0.0274658203125,
-0.0255126953125,
0.0225372314453125,
0.03997802734375,
-0.0165557861328125,
0.039337158203125,
0.02960205078125,
0.03253173828125,
-0.054931640625,
0.01558685302734375,
-0.0011692047119140625,
0.0504150390625,
-0.068603515625,
-0.052734375,
-0.01271820068359375,
0.01325225830078125,
-0.015899658203125,
0.0189361572265625,
0.0100860595703125,
0.00823211669921875,
0.0016717910766601562,
0.04339599609375,
-0.040802001953125,
0.03228759765625,
-0.0202178955078125,
0.004695892333984375,
0.0070953369140625,
0.0054779052734375,
0.07305908203125,
-0.03594970703125,
-0.006610870361328125,
-0.0193023681640625,
0.007732391357421875,
-0.0704345703125,
0.04095458984375,
-0.0241241455078125,
0.0024623870849609375,
0.042724609375
]
|
a15462573d9019f360f8c37c29f17676ab4bdcbc | Wordpress Stackexchange
Q: How to check if a rewrite rule exists A common problem with rewrite rules added in a theme is that there is no obvious hook on which you can flush the rewrite rules. The problem is getting harder when you update a theme with new code that includes new rewrite rules.
It seems like a good solution to the problem might be to detect if the rewrite rule exists and if it doesn't to flush the rules. So how can I check if a rule already exists?
A: If I understand correctly then you can hook into the rewrite api/process and flush or manipulate the rules that way?
Read: Plugin Hooks on this page
http://codex.wordpress.org/Function_Reference/WP_Rewrite
Maybe something like:
// flush_rules() if our rules are not yet included
function my_flush_rules()
{
$rules = get_option( 'rewrite_rules' );
if ( ! isset( $rules['(project)/(\d*)$'] ) ) {
global $wp_rewrite; $wp_rewrite->flush_rules();
}
}
add_action( 'wp_loaded','my_flush_rules' );
| Q: How to check if a rewrite rule exists A common problem with rewrite rules added in a theme is that there is no obvious hook on which you can flush the rewrite rules. The problem is getting harder when you update a theme with new code that includes new rewrite rules.
It seems like a good solution to the problem might be to detect if the rewrite rule exists and if it doesn't to flush the rules. So how can I check if a rule already exists?
A: If I understand correctly then you can hook into the rewrite api/process and flush or manipulate the rules that way?
Read: Plugin Hooks on this page
http://codex.wordpress.org/Function_Reference/WP_Rewrite
Maybe something like:
// flush_rules() if our rules are not yet included
function my_flush_rules()
{
$rules = get_option( 'rewrite_rules' );
if ( ! isset( $rules['(project)/(\d*)$'] ) ) {
global $wp_rewrite; $wp_rewrite->flush_rules();
}
}
add_action( 'wp_loaded','my_flush_rules' );
| wordpress | {
"language": "en",
"length": 152,
"provenance": "stackexchange_00019.jsonl.gz:454688",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/184256"
} | [
0.020904541015625,
-0.01068878173828125,
-0.0204620361328125,
-0.049072265625,
-0.01560211181640625,
-0.01163482666015625,
-0.0220947265625,
-0.00628662109375,
-0.0423583984375,
0.0127716064453125,
-0.039276123046875,
0.0182952880859375,
0.01338958740234375,
-0.0156402587890625,
0.0229949951171875,
-0.038787841796875,
0.035247802734375,
-0.04254150390625,
0.00209808349609375,
-0.01654052734375,
0.0380859375,
0.01268768310546875,
-0.0111846923828125,
0.08001708984375,
0.0095977783203125,
-0.04742431640625,
0.10162353515625,
-0.0013942718505859375,
0.00594329833984375,
-0.0287322998046875,
0.026397705078125,
-0.00856781005859375,
0.03125,
0.02154541015625,
-0.0311279296875,
0.0267791748046875,
-0.01140594482421875,
0.001140594482421875,
-0.0020656585693359375,
0.0355224609375,
0.041015625,
-0.0277252197265625,
0.034881591796875,
0.005184173583984375,
-0.005374908447265625,
-0.01947021484375,
0.042755126953125,
-0.026519775390625,
-0.0029659271240234375,
0.03448486328125,
0.01136016845703125,
0.000023186206817626953,
0.005825042724609375,
0.0531005859375,
-0.01174163818359375,
-0.0308837890625,
-0.0052490234375,
0.0233306884765625,
0.0200042724609375,
-0.0310211181640625,
-0.0193023681640625,
0.0111083984375,
0.0130767822265625,
0.02081298828125,
-0.024993896484375,
0.01154327392578125,
-0.0038127899169921875,
0.01020050048828125,
-0.01187896728515625,
-0.03387451171875,
0.003566741943359375,
0.007537841796875,
-0.02288818359375,
0.02484130859375,
0.0014667510986328125,
-0.038665771484375,
0.023101806640625,
-0.007293701171875,
-0.0015468597412109375,
0.057403564453125,
-0.00479888916015625,
-0.047607421875,
-0.0167236328125,
0.01739501953125,
0.0079498291015625,
0.04541015625,
-0.01288604736328125,
-0.005573272705078125,
-0.050262451171875,
-0.02471923828125,
-0.034881591796875,
-0.01335906982421875,
-0.06768798828125,
-0.006649017333984375,
0.003936767578125,
-0.02716064453125,
0.051116943359375,
0.07659912109375,
-0.040771484375,
0.01010894775390625,
-0.00240325927734375,
-0.048736572265625,
0.05804443359375,
-0.046600341796875,
0.03289794921875,
0.0251007080078125,
-0.002681732177734375,
0.00031876564025878906,
0.0433349609375,
-0.0020771026611328125,
-0.018768310546875,
0.055084228515625,
0.0161590576171875,
0.0244293212890625,
-0.04962158203125,
-0.043426513671875,
-0.045013427734375,
-0.029083251953125,
-0.0273284912109375,
-0.0261383056640625,
0.0146636962890625,
0.0400390625,
-0.0400390625,
-0.00971221923828125,
0.00353240966796875,
-0.006317138671875,
0.00012290477752685547,
-0.007415771484375,
0.0211639404296875,
0.03338623046875,
-0.0058441162109375,
0.0143890380859375,
-0.004962921142578125,
-0.0206756591796875,
-0.037841796875,
-0.0158843994140625,
0.058563232421875,
0.00811004638671875,
-0.0159912109375,
0.03594970703125,
0.004886627197265625,
-0.048675537109375,
-0.03887939453125,
-0.0113525390625,
0.00753021240234375,
0.03826904296875,
0.0240325927734375,
-0.01424407958984375,
-0.0255889892578125,
-0.050384521484375,
0.0025348663330078125,
-0.03900146484375,
0.061126708984375,
-0.02020263671875,
-0.034759521484375,
-0.03558349609375,
-0.01000213623046875,
-0.019866943359375,
-0.024017333984375,
-0.03302001953125,
0.03472900390625,
-0.016754150390625,
-0.01611328125,
-0.003116607666015625,
-0.0241546630859375,
0.00408935546875,
-0.046478271484375,
0.00530242919921875,
0.0166473388671875,
0.013031005859375,
0.0117645263671875,
0.00351715087890625,
0.024383544921875,
0.003597259521484375,
-0.00844573974609375,
-0.001811981201171875,
0.033782958984375,
-0.004421234130859375,
-0.021697998046875,
0.07098388671875,
-0.001194000244140625,
-0.0321044921875,
0.00196075439453125,
-0.0265655517578125,
-0.07025146484375,
0.09039306640625,
-0.00661468505859375,
0.07122802734375,
0.015594482421875,
-0.01198577880859375,
0.0260467529296875,
0.033233642578125,
0.035614013671875,
-0.020599365234375,
-0.0247650146484375,
-0.0347900390625,
0.036956787109375,
0.0247650146484375,
-0.024078369140625,
0.0169525146484375,
-0.0230560302734375,
0.003894805908203125,
-0.0129241943359375,
-0.017822265625,
-0.093994140625,
0.019622802734375,
-0.04669189453125,
0.06024169921875,
0.0212860107421875,
0.02642822265625,
0.01551055908203125,
0.0229034423828125,
-0.039703369140625,
0.0014743804931640625,
-0.004169464111328125,
0.046905517578125,
-0.0188751220703125,
0.0201416015625,
0.00481414794921875,
0.0208892822265625,
0.0221099853515625,
-0.01396942138671875,
0.003116607666015625,
-0.01525115966796875,
-0.0307769775390625,
0.0243072509765625,
-0.040863037109375,
0.02056884765625,
-0.06494140625,
0.039794921875,
-0.007305145263671875,
0.0084686279296875,
0.0205841064453125,
0.05548095703125,
-0.006988525390625,
-0.019134521484375,
-0.038177490234375,
-0.07720947265625,
0.0116424560546875,
0.0570068359375,
0.034088134765625,
0.0689697265625,
-0.01380157470703125,
-0.011474609375,
0.005802154541015625,
-0.09625244140625,
-0.0004360675811767578,
-0.00743865966796875,
-0.0015926361083984375,
0.0506591796875,
0.0287933349609375,
0.0010881423950195312,
-0.0122528076171875,
-0.0002551078796386719,
-0.0303497314453125,
0.019744873046875,
-0.034149169921875,
-0.0030078887939453125,
-0.01549530029296875,
0.01180267333984375,
-0.00522613525390625,
-0.0239715576171875,
0.00637054443359375,
-0.034759521484375,
0.0201568603515625,
-0.0136566162109375,
-0.00861358642578125,
-0.0149993896484375,
-0.0058441162109375,
0.0282440185546875,
0.0188446044921875,
-0.07220458984375,
0.001003265380859375,
0.043731689453125,
0.0230255126953125,
0.042144775390625,
-0.0296783447265625,
-0.0213775634765625,
0.04443359375,
0.046356201171875,
-0.050537109375,
0.00940704345703125,
-0.02508544921875,
-0.0119781494140625,
-0.030517578125,
-0.01509857177734375,
0.0203704833984375,
-0.029052734375,
0.0750732421875,
0.020263671875,
0.041595458984375,
0.0104522705078125,
-0.01459503173828125,
0.053619384765625,
0.005878448486328125,
-0.043670654296875,
-0.0176239013671875,
-0.031646728515625,
0.051177978515625,
-0.0203857421875,
-0.029937744140625,
0.06109619140625,
0.0027179718017578125,
-0.007305145263671875,
0.0124359130859375,
-0.0048828125,
-0.01395416259765625,
0.0130462646484375,
-0.016387939453125,
0.01215362548828125,
-0.0950927734375,
-0.004425048828125,
0.0274505615234375,
0.0037994384765625,
0.0335693359375,
0.0007762908935546875,
0.01369476318359375,
0.0272216796875,
-0.00240325927734375,
-0.016937255859375,
-0.039764404296875,
-0.032440185546875,
-0.0157012939453125,
0.0247039794921875,
0.0023708343505859375,
0.0028133392333984375,
0.0283355712890625,
0.000827789306640625,
-0.050018310546875,
-0.0292510986328125,
-0.05950927734375,
-0.11334228515625,
-0.072265625,
-0.007259368896484375,
-0.00347900390625,
0.042388916015625,
-0.0013570785522460938,
0.0665283203125,
-0.00020575523376464844,
-0.07940673828125,
-0.006664276123046875,
-0.0159912109375,
-0.0212554931640625,
0.01168060302734375,
-0.04742431640625,
0.00970458984375,
0.004913330078125,
-0.016357421875,
0.034393310546875,
0.0178375244140625,
-0.01123809814453125,
0.0249176025390625,
0.00664520263671875,
-0.01294708251953125,
-0.00479888916015625,
0.045745849609375,
0.00888824462890625,
-0.037322998046875,
0.025482177734375,
-0.052764892578125,
-0.03375244140625,
0.0163421630859375,
-0.024200439453125,
0.026611328125,
0.00746917724609375,
-0.0237579345703125,
0.02239990234375,
0.0112762451171875,
-0.0113677978515625,
0.006134033203125,
0.03460693359375,
-0.043548583984375,
0.033447265625,
-0.006671905517578125,
-0.0165557861328125,
-0.0273590087890625,
0.050933837890625,
-0.011383056640625,
0.004001617431640625,
0.010528564453125,
-0.0166015625,
-0.03399658203125,
0.001384735107421875,
-0.06866455078125,
-0.041839599609375,
0.01325225830078125,
-0.0577392578125,
0.0293121337890625,
-0.061004638671875,
0.0031223297119140625,
-0.051971435546875,
0.0517578125,
0.037872314453125,
-0.0301361083984375,
-0.036163330078125,
-0.009857177734375,
0.00262451171875,
-0.02630615234375,
0.0260772705078125,
-0.0107879638671875,
-0.1009521484375,
0.0018863677978515625,
-0.0017080307006835938,
-0.050048828125,
0.00656890869140625,
-0.050872802734375,
-0.029876708984375,
-0.04327392578125,
0.038970947265625,
-0.07183837890625,
0.0172576904296875,
0.038421630859375,
0.002185821533203125,
-0.0070648193359375,
-0.019989013671875,
-0.033660888671875,
-0.0753173828125,
-0.00910186767578125,
-0.05474853515625,
0.062469482421875,
0.046478271484375,
-0.06353759765625,
-0.0099639892578125,
0.0274658203125,
0.005069732666015625,
-0.0147705078125,
0.00424957275390625,
0.004215240478515625,
0.0012645721435546875,
0.0232086181640625,
0.00365447998046875,
-0.00998687744140625,
0.00733184814453125,
0.0127105712890625,
-0.035736083984375,
0.0240020751953125,
-0.0203857421875,
-0.00952911376953125,
0.02691650390625,
-0.0576171875,
-0.0007977485656738281,
-0.005527496337890625,
-0.0364990234375,
-0.0027217864990234375,
-0.01120758056640625,
-0.0199127197265625,
0.002994537353515625,
-0.0153961181640625,
0.01317596435546875,
-0.042510986328125,
-0.005405426025390625,
0.0278167724609375,
0.08416748046875,
0.01432037353515625,
0.002437591552734375,
-0.01554107666015625,
0.01885986328125,
0.02685546875,
0.0206298828125,
0.003597259521484375,
-0.0117034912109375,
-0.00666046142578125,
-0.0069122314453125,
-0.0007424354553222656,
-0.0130767822265625,
0.007457733154296875,
-0.034637451171875,
0.008087158203125,
-0.010345458984375,
-0.0199432373046875,
0.0028839111328125,
0.050506591796875,
0.04205322265625,
0.0005817413330078125,
-0.0181732177734375,
0.0278778076171875,
0.0469970703125,
-0.01520538330078125,
0.0026302337646484375,
-0.03289794921875,
-0.037384033203125,
0.01203155517578125,
0.0043792724609375,
0.06884765625,
0.0203857421875,
0.0031642913818359375,
0.06365966796875,
0.042877197265625,
0.007328033447265625,
0.023529052734375,
0.0526123046875,
-0.02752685546875,
0.0523681640625,
-0.0007653236389160156,
-0.01044464111328125,
-0.029022216796875,
-0.00968170166015625,
0.07379150390625,
0.0100555419921875,
-0.045166015625,
0.0141754150390625,
-0.0237884521484375,
-0.0222015380859375,
0.0267791748046875,
0.0075531005859375,
0.019744873046875,
0.023345947265625,
-0.0244903564453125,
0.0239105224609375,
0.01329803466796875,
0.00461578369140625,
-0.0237274169921875,
-0.037567138671875,
-0.0309906005859375,
-0.0174102783203125,
0.017974853515625,
0.0218658447265625,
-0.027496337890625,
0.018096923828125,
0.00638580322265625,
0.0175628662109375,
0.0092926025390625,
0.032318115234375,
0.02960205078125,
-0.011688232421875,
-0.004337310791015625,
0.0161590576171875,
-0.00926971435546875,
-0.02642822265625,
-0.045318603515625,
0.033477783203125,
0.04302978515625,
-0.039306640625,
-0.0006122589111328125,
0.007808685302734375,
-0.0005335807800292969,
-0.036529541015625,
0.004184722900390625,
0.0276336669921875,
-0.00827789306640625,
-0.02105712890625,
0.001956939697265625,
0.0203704833984375,
0.0207061767578125,
-0.037445068359375,
0.0235595703125,
-0.039794921875,
0.01166534423828125,
0.0552978515625,
-0.047607421875,
0.0236663818359375,
0.019012451171875,
-0.038482666015625,
-0.04351806640625,
0.04638671875,
-0.0246429443359375,
0.023651123046875,
-0.052093505859375,
-0.0345458984375,
0.036773681640625,
0.00634765625,
0.009429931640625,
0.01253509521484375,
-0.0298309326171875,
0.02960205078125,
0.001506805419921875,
0.04595947265625,
0.00286102294921875,
-0.01526641845703125,
-0.023284912109375,
-0.051605224609375,
-0.0071868896484375,
-0.0165252685546875,
-0.037078857421875,
-0.00598907470703125,
-0.0037937164306640625,
0.00263214111328125,
0.035614013671875,
-0.0240936279296875,
0.0203857421875,
0.003002166748046875,
0.03094482421875,
-0.0106964111328125,
0.062042236328125,
-0.003803253173828125,
0.056732177734375,
-0.0175323486328125,
0.01776123046875,
0.016448974609375,
0.03546142578125,
-0.01092529296875,
-0.02130126953125,
0.01215362548828125,
-0.009307861328125,
-0.02423095703125,
-0.0253143310546875,
0.030242919921875,
0.00017642974853515625,
0.021636962890625,
-0.0106048583984375,
0.01239013671875,
-0.01485443115234375,
0.00829315185546875,
-0.010528564453125,
0.01178741455078125,
-0.027496337890625,
-0.01305389404296875,
0.043365478515625,
-0.004886627197265625,
0.048095703125,
-0.016632080078125,
-0.0037097930908203125,
0.0154571533203125,
-0.0117034912109375,
0.0205841064453125,
0.0116729736328125,
-0.0687255859375,
0.057037353515625,
0.024566650390625,
0.0159759521484375,
0.046905517578125,
0.0020351409912109375,
0.034088134765625,
0.0396728515625,
-0.023590087890625,
-0.0116424560546875,
0.020172119140625,
0.035125732421875,
0.01153564453125,
0.0271759033203125,
0.048370361328125,
0.01505279541015625,
0.0030651092529296875,
0.0545654296875,
0.032440185546875,
-0.05841064453125,
-0.0097503662109375,
-0.0216064453125,
-0.02532958984375,
0.018890380859375,
-0.0005712509155273438,
-0.0064544677734375,
0.0172882080078125,
0.038299560546875,
-0.038848876953125,
-0.0156402587890625,
0.0279083251953125,
0.006988525390625,
-0.0253143310546875,
-0.032928466796875,
0.02105712890625,
0.006435394287109375,
0.0013742446899414062,
0.0164947509765625,
-0.004383087158203125,
-0.00675201416015625,
-0.0087738037109375,
0.01194000244140625,
-0.013641357421875,
0.006336212158203125,
-0.00846099853515625,
0.0269927978515625,
-0.056427001953125,
0.016326904296875,
0.0293731689453125,
-0.01076507568359375,
0.008270263671875,
0.048492431640625,
-0.023406982421875,
-0.0011587142944335938,
0.02911376953125,
-0.034423828125,
-0.0382080078125,
-0.00868988037109375,
0.03485107421875,
0.01068878173828125,
-0.0193939208984375,
0.02825927734375,
-0.031646728515625,
-0.046051025390625,
-0.01340484619140625,
-0.0806884765625,
0.042572021484375,
-0.03973388671875,
0.01113128662109375,
-0.0012044906616210938,
0.037750244140625,
0.023345947265625,
-0.006237030029296875,
0.028045654296875,
-0.024200439453125,
-0.0216064453125,
-0.0051422119140625,
-0.04669189453125,
0.0007767677307128906,
-0.01018524169921875,
-0.06488037109375,
0.07318115234375,
-0.001422882080078125,
0.04766845703125,
0.0178680419921875,
0.0077667236328125,
-0.017181396484375,
-0.003025054931640625,
-0.0222625732421875,
0.044403076171875,
-0.003742218017578125,
0.03863525390625,
-0.04779052734375,
-0.0113067626953125,
0.0005855560302734375,
0.056732177734375,
0.035064697265625,
0.00839996337890625,
0.0178375244140625,
-0.01015472412109375,
0.02294921875,
0.00818634033203125,
-0.03338623046875,
0.0152435302734375,
-0.0110015869140625,
-0.001689910888671875,
0.01140594482421875,
-0.00922393798828125,
0.0259552001953125,
-0.04278564453125,
-0.0224761962890625,
0.0230255126953125,
-0.01010894775390625,
-0.0254364013671875,
-0.025665283203125,
0.039794921875,
-0.038665771484375,
-0.00960540771484375,
0.018890380859375,
-0.012847900390625,
0.022979736328125,
-0.0138702392578125,
0.01177978515625,
-0.036529541015625,
-0.0268096923828125,
0.0006380081176757812,
0.033477783203125,
-0.005767822265625,
0.044647216796875,
0.0170745849609375,
0.01141357421875,
0.0672607421875,
-0.0133514404296875,
0.01194000244140625,
0.0233154296875,
-0.035858154296875,
0.0241241455078125,
0.0521240234375,
0.030242919921875,
0.041351318359375,
0.020233154296875,
-0.0172576904296875,
0.01983642578125,
-0.0148773193359375,
-0.03448486328125,
0.0012750625610351562,
-0.0134124755859375,
-0.00775146484375,
-0.00812530517578125,
-0.01453399658203125,
-0.005611419677734375,
0.00826263427734375,
-0.0202178955078125,
-0.0157318115234375,
0.0013751983642578125,
0.0189666748046875,
-0.008575439453125,
-0.0074005126953125,
-0.00615692138671875,
-0.0033779144287109375,
-0.041717529296875,
0.00799560546875,
-0.0048980712890625,
0.08990478515625,
0.0340576171875,
0.067138671875,
-0.044525146484375,
-0.04644775390625,
0.0014123916625976562,
0.054107666015625,
-0.022125244140625,
0.008697509765625,
-0.04351806640625,
-0.06451416015625,
0.022552490234375,
0.047515869140625,
0.0297698974609375,
0.016571044921875,
0.02728271484375,
0.0158843994140625,
-0.0014963150024414062,
0.00940704345703125,
0.01580810546875,
-0.023773193359375,
0.046600341796875,
-0.04388427734375,
0.05145263671875,
-0.017791748046875,
-0.0006594657897949219,
-0.0517578125,
0.0428466796875,
0.0014715194702148438,
-0.007488250732421875,
0.0160064697265625,
0.0041046142578125,
-0.0234222412109375,
0.0222625732421875,
0.006805419921875,
0.0494384765625,
0.033294677734375,
-0.021026611328125,
-0.006908416748046875,
-0.00876617431640625,
-0.034637451171875,
-0.0038852691650390625,
0.0438232421875,
0.00986480712890625,
-0.0037384033203125,
0.033966064453125,
0.031768798828125,
0.0205230712890625,
-0.0252685546875,
-0.029144287109375,
-0.0194091796875,
0.0546875,
0.01099395751953125,
-0.02313232421875,
-0.01296234130859375,
-0.01013946533203125,
0.032623291015625,
-0.0008144378662109375,
0.10467529296875,
-0.049407958984375,
0.007793426513671875,
0.02032470703125,
-0.015625,
0.001068115234375,
0.0013751983642578125,
0.00893402099609375,
-0.04620361328125,
-0.01129913330078125,
0.01462554931640625,
-0.0706787109375,
-0.0103912353515625,
0.0257568359375,
-0.028839111328125,
0.038238525390625,
-0.038818359375,
0.0247650146484375,
-0.04205322265625,
0.032928466796875,
-0.035308837890625,
-0.09234619140625,
-0.004673004150390625,
0.06707763671875,
-0.041534423828125,
0.0013761520385742188,
-0.0162506103515625,
0.033782958984375,
0.00016367435455322266,
-0.017730712890625,
0.0010623931884765625,
-0.0214080810546875,
-0.0167083740234375,
0.0310821533203125,
-0.00843048095703125,
-0.007389068603515625,
-0.0148468017578125,
-0.0178680419921875,
0.0122833251953125,
0.01175689697265625,
-0.0012426376342773438,
-0.0028171539306640625,
0.01229095458984375,
-0.03204345703125,
-0.0085906982421875,
0.0078277587890625,
-0.033599853515625,
0.001132965087890625,
-0.0030307769775390625,
0.00444793701171875,
0.0129547119140625,
-0.01401519775390625,
-0.004032135009765625,
-0.029144287109375,
-0.008544921875,
0.01043701171875,
0.004833221435546875,
0.0195159912109375,
0.04052734375,
0.022064208984375,
0.0251617431640625,
0.007343292236328125,
-0.07586669921875,
0.051849365234375,
-0.0160064697265625,
0.06976318359375,
-0.030517578125,
0.0020656585693359375,
0.004520416259765625,
-0.006504058837890625,
-0.055450439453125,
-0.000675201416015625,
-0.0211181640625,
-0.004840850830078125,
-0.01016998291015625,
-0.005321502685546875,
0.02081298828125,
-0.020416259765625,
-0.0232391357421875,
-0.02392578125,
0.0012197494506835938,
0.02197265625,
0.01031494140625,
-0.01007843017578125,
0.037750244140625,
-0.0082244873046875,
-0.041290283203125,
-0.05816650390625,
0.0181121826171875,
-0.06689453125,
-0.01200103759765625,
-0.06134033203125,
0.046295166015625,
0.054046630859375,
-0.0161895751953125,
-0.056640625,
0.00848388671875,
-0.0174102783203125,
-0.0136260986328125,
-0.07220458984375,
-0.0267333984375,
-0.0194091796875,
0.032745361328125,
-0.021148681640625,
0.0189361572265625,
-0.032958984375,
0.053863525390625,
-0.00482940673828125,
0.04852294921875,
-0.0037288665771484375,
0.007251739501953125,
-0.037078857421875,
-0.0013093948364257812,
-0.020050048828125,
-0.005279541015625,
0.02874755859375,
-0.025238037109375,
0.06005859375,
0.09576416015625,
0.01103973388671875,
-0.0185699462890625,
-0.02423095703125,
-0.10137939453125,
0.0117034912109375,
-0.04376220703125,
-0.023956298828125,
-0.0404052734375,
0.05810546875,
0.003314971923828125,
0.01036834716796875,
-0.0027332305908203125,
-0.006160736083984375,
0.0019626617431640625,
-0.05810546875,
0.010986328125,
0.045928955078125,
-0.034423828125,
0.01422119140625,
-0.034912109375,
-0.007320404052734375,
-0.0269012451171875,
-0.0072174072265625,
-0.024169921875,
-0.005741119384765625,
-0.0152130126953125,
-0.0016775131225585938,
-0.0134429931640625,
0.002490997314453125,
0.04339599609375,
-0.0282440185546875,
-0.0008893013000488281,
0.0011796951293945312,
0.0122222900390625,
0.012481689453125,
-0.00864410400390625,
0.0285186767578125,
0.06646728515625,
-0.06170654296875,
-0.0030727386474609375,
0.01593017578125,
0.005397796630859375,
-0.03948974609375,
-0.01253509521484375,
0.00942230224609375,
-0.0038204193115234375,
-0.03289794921875,
-0.03863525390625,
-0.01004791259765625,
0.0784912109375,
-0.01641845703125,
0.11669921875,
-0.00891876220703125,
0.017791748046875,
-0.0019512176513671875,
0.0287017822265625,
-0.0190277099609375,
0.01373291015625,
-0.0060577392578125,
-0.0272979736328125,
-0.003414154052734375,
0.0222320556640625,
0.0009889602661132812,
-0.0682373046875,
0.032745361328125,
-0.0171966552734375,
0.029052734375,
0.0162506103515625
]
|
b931054289178ab5e920b4b6cf43257871541119 | Wordpress Stackexchange
Q: Parent child relationship in custom post type How can I maintain the parent child relationship in custom post types, so that I have a uniform URL structure? I want to make a URL structure up to 4 levels, e.g.
example.com/sponsor-child/disadvantaged-community/gita-magar
Is it possible without a plugin? When I go to a single page URL, it ends in 3 levels.
A: In your register_post_type call, make sure you have these arguments:
register_post_type(
'my_post_type',
array(
'hierarchical' => true,
'public' => true,
'rewrite' => array(
'slug' => 'my_post_type',
'with_front' => false,
),
'supports' => array(
'page-attributes' /* This will show the post parent field */,
'title',
'editor',
'something-else',
),
// Other arguments
)
);
Make sure your permalinks are flushed (just visit the Settings > Permalinks page).
Now when you create a new my_post_type, just set it's parent to another and it's permalink will look something like:
http://example.com/parent-post-type/my-post-type/
You can go as many levels as you need.
| Q: Parent child relationship in custom post type How can I maintain the parent child relationship in custom post types, so that I have a uniform URL structure? I want to make a URL structure up to 4 levels, e.g.
example.com/sponsor-child/disadvantaged-community/gita-magar
Is it possible without a plugin? When I go to a single page URL, it ends in 3 levels.
A: In your register_post_type call, make sure you have these arguments:
register_post_type(
'my_post_type',
array(
'hierarchical' => true,
'public' => true,
'rewrite' => array(
'slug' => 'my_post_type',
'with_front' => false,
),
'supports' => array(
'page-attributes' /* This will show the post parent field */,
'title',
'editor',
'something-else',
),
// Other arguments
)
);
Make sure your permalinks are flushed (just visit the Settings > Permalinks page).
Now when you create a new my_post_type, just set it's parent to another and it's permalink will look something like:
http://example.com/parent-post-type/my-post-type/
You can go as many levels as you need.
| wordpress | {
"language": "en",
"length": 155,
"provenance": "stackexchange_00019.jsonl.gz:454721",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/184385"
} | [
0.07550048828125,
-0.0087127685546875,
0.0006284713745117188,
-0.0650634765625,
-0.0011692047119140625,
0.000050961971282958984,
0.020172119140625,
0.0033054351806640625,
-0.041961669921875,
-0.002353668212890625,
0.0462646484375,
-0.01412200927734375,
-0.0518798828125,
-0.0760498046875,
0.01959228515625,
-0.027679443359375,
0.0263519287109375,
-0.020111083984375,
0.0219268798828125,
-0.0283660888671875,
0.00428009033203125,
-0.035552978515625,
0.06494140625,
0.0264434814453125,
0.0435791015625,
-0.0081634521484375,
0.042877197265625,
-0.042022705078125,
0.025054931640625,
-0.0258026123046875,
0.0242156982421875,
-0.0033779144287109375,
0.019256591796875,
-0.02276611328125,
0.056640625,
0.001316070556640625,
0.019378662109375,
-0.0034885406494140625,
0.022979736328125,
0.01242828369140625,
-0.00412750244140625,
0.0145111083984375,
0.03326416015625,
0.01453399658203125,
-0.0064849853515625,
-0.0260162353515625,
-0.00644683837890625,
-0.04302978515625,
0.017791748046875,
-0.0262908935546875,
0.01120758056640625,
-0.0119781494140625,
0.02630615234375,
-0.01456451416015625,
-0.0157318115234375,
-0.0061492919921875,
0.029449462890625,
-0.05340576171875,
0.025115966796875,
-0.0294952392578125,
-0.01849365234375,
-0.0098419189453125,
0.03302001953125,
0.0291595458984375,
-0.00817108154296875,
0.003204345703125,
-0.041107177734375,
0.004291534423828125,
-0.0260009765625,
-0.0116119384765625,
0.022064208984375,
-0.03863525390625,
0.002597808837890625,
-0.0285186767578125,
-0.0167236328125,
-0.0113067626953125,
0.0076751708984375,
-0.038726806640625,
-0.0031528472900390625,
0.00408172607421875,
-0.0117645263671875,
-0.004840850830078125,
-0.05364990234375,
-0.036376953125,
0.01001739501953125,
-0.0261993408203125,
-0.0064849853515625,
0.00152587890625,
-0.036346435546875,
0.0098114013671875,
-0.0243377685546875,
-0.040313720703125,
0.00797271728515625,
0.035430908203125,
-0.00650787353515625,
-0.0007028579711914062,
0.048828125,
0.012298583984375,
-0.0219268798828125,
-0.01019287109375,
0.0107421875,
-0.05169677734375,
0.061309814453125,
-0.017608642578125,
0.01059722900390625,
-0.00731658935546875,
-0.0129241943359375,
0.00563812255859375,
0.07720947265625,
0.046630859375,
0.007396697998046875,
0.0902099609375,
-0.001674652099609375,
0.01496124267578125,
-0.051239013671875,
0.0095977783203125,
-0.029998779296875,
-0.012725830078125,
-0.02264404296875,
0.049163818359375,
-0.0206298828125,
0.016326904296875,
0.0008831024169921875,
-0.01239776611328125,
-0.0006127357482910156,
-0.0035762786865234375,
0.00772857666015625,
-0.04248046875,
0.0165557861328125,
0.00295257568359375,
-0.0308685302734375,
0.01044464111328125,
0.09344482421875,
0.0638427734375,
0.03546142578125,
-0.00994873046875,
0.004970550537109375,
-0.032440185546875,
-0.00601959228515625,
-0.00131988525390625,
0.015228271484375,
-0.043792724609375,
0.006732940673828125,
0.0176544189453125,
0.01324462890625,
0.042205810546875,
0.027984619140625,
-0.009002685546875,
-0.0247955322265625,
-0.02593994140625,
-0.018768310546875,
-0.020660400390625,
0.06915283203125,
-0.0123291015625,
-0.050323486328125,
-0.054107666015625,
-0.0030078887939453125,
-0.040008544921875,
0.00008004903793334961,
-0.0693359375,
0.01302337646484375,
0.004245758056640625,
0.051971435546875,
-0.017547607421875,
-0.0616455078125,
0.0192108154296875,
-0.08319091796875,
-0.0345458984375,
0.01430511474609375,
-0.04876708984375,
0.05230712890625,
0.006191253662109375,
-0.036468505859375,
-0.01323699951171875,
0.0228424072265625,
-0.0155029296875,
-0.0345458984375,
-0.007213592529296875,
0.032379150390625,
0.02655029296875,
0.0173492431640625,
-0.0230255126953125,
-0.0040740966796875,
0.032623291015625,
-0.05401611328125,
0.05438232421875,
0.01308441162109375,
0.0557861328125,
-0.0037593841552734375,
0.0185089111328125,
0.00439453125,
0.043487548828125,
-0.050262451171875,
0.0257720947265625,
-0.0035686492919921875,
-0.01361846923828125,
0.01354217529296875,
0.0001004338264465332,
-0.00917816162109375,
-0.005359649658203125,
-0.056854248046875,
-0.005558013916015625,
0.0022754669189453125,
0.0291900634765625,
0.032135009765625,
0.002216339111328125,
-0.0044097900390625,
0.0174560546875,
0.0225982666015625,
0.032745361328125,
0.01107025146484375,
0.0218048095703125,
-0.0188446044921875,
-0.046142578125,
-0.0151519775390625,
0.037353515625,
0.00994873046875,
0.0031414031982421875,
-0.00914764404296875,
-0.0144195556640625,
0.003078460693359375,
-0.004955291748046875,
-0.0168304443359375,
0.02703857421875,
0.0645751953125,
-0.0013399124145507812,
-0.01468658447265625,
-0.0178375244140625,
0.0084075927734375,
0.0180511474609375,
-0.09271240234375,
0.046112060546875,
0.046539306640625,
-0.0025272369384765625,
-0.03411865234375,
0.004222869873046875,
0.00881195068359375,
-0.06170654296875,
-0.01212310791015625,
0.0592041015625,
0.0206451416015625,
0.02978515625,
-0.0288848876953125,
-0.01197052001953125,
-0.002361297607421875,
-0.0987548828125,
-0.028472900390625,
0.00885009765625,
-0.0205841064453125,
0.0322265625,
-0.01068115234375,
0.021453857421875,
0.0090789794921875,
-0.0284271240234375,
0.004302978515625,
0.039947509765625,
-0.00460052490234375,
-0.0163726806640625,
-0.0220184326171875,
0.003681182861328125,
0.021392822265625,
-0.037841796875,
-0.04791259765625,
-0.0097198486328125,
0.00829315185546875,
0.019256591796875,
0.0347900390625,
0.03460693359375,
-0.0321044921875,
0.006046295166015625,
0.01454925537109375,
0.03741455078125,
-0.003635406494140625,
0.005992889404296875,
-0.0045013427734375,
-0.0294342041015625,
-0.0084381103515625,
0.0115509033203125,
-0.0137176513671875,
-0.02581787109375,
-0.022125244140625,
0.0063323974609375,
-0.04766845703125,
-0.004730224609375,
-0.017059326171875,
-0.0305328369140625,
0.007175445556640625,
0.0379638671875,
0.003963470458984375,
-0.0090789794921875,
0.024261474609375,
-0.002899169921875,
-0.0218048095703125,
0.0253753662109375,
0.01270294189453125,
-0.028533935546875,
-0.00023496150970458984,
-0.051971435546875,
0.06427001953125,
-0.06097412109375,
0.032318115234375,
0.047821044921875,
-0.034271240234375,
0.01532745361328125,
-0.004611968994140625,
0.01715087890625,
-0.01012420654296875,
0.01389312744140625,
-0.00586700439453125,
-0.05145263671875,
0.002628326416015625,
0.01092529296875,
0.03778076171875,
0.0347900390625,
0.0246124267578125,
-0.01522064208984375,
0.00970458984375,
0.0662841796875,
-0.0037479400634765625,
-0.00528717041015625,
0.00629425048828125,
-0.0299224853515625,
-0.0254669189453125,
0.0006518363952636719,
-0.01248931884765625,
-0.01322174072265625,
0.010589599609375,
-0.009979248046875,
-0.01117706298828125,
-0.032470703125,
-0.07086181640625,
-0.06610107421875,
-0.08453369140625,
0.0236358642578125,
0.01381683349609375,
0.029876708984375,
0.0119171142578125,
0.01605224609375,
0.0091094970703125,
-0.06829833984375,
0.004535675048828125,
0.054901123046875,
-0.029693603515625,
-0.0039825439453125,
-0.020294189453125,
-0.01166534423828125,
0.05126953125,
-0.01503753662109375,
0.01306915283203125,
0.027130126953125,
-0.009613037109375,
-0.0134124755859375,
0.00476837158203125,
-0.0033550262451171875,
0.040435791015625,
0.002094268798828125,
-0.0267333984375,
0.045257568359375,
0.04791259765625,
-0.02960205078125,
-0.0533447265625,
-0.0179290771484375,
-0.0546875,
-0.00276947021484375,
0.0253143310546875,
0.0283050537109375,
-0.06597900390625,
0.046112060546875,
-0.007720947265625,
0.0019102096557617188,
0.023651123046875,
-0.03741455078125,
0.057525634765625,
-0.005619049072265625,
-0.005710601806640625,
-0.0306854248046875,
0.0302581787109375,
-0.0178680419921875,
-0.0193328857421875,
-0.00629425048828125,
0.0097198486328125,
0.0016889572143554688,
-0.0156402587890625,
-0.039276123046875,
-0.08868408203125,
0.0516357421875,
-0.052886962890625,
0.00113677978515625,
-0.06781005859375,
-0.0173797607421875,
-0.0171356201171875,
0.10784912109375,
-0.032379150390625,
0.004505157470703125,
-0.03387451171875,
-0.0013332366943359375,
-0.0283203125,
-0.054962158203125,
-0.051300048828125,
0.00679779052734375,
0.001445770263671875,
-0.00815582275390625,
0.004566192626953125,
-0.0236968994140625,
-0.0013837814331054688,
-0.01203155517578125,
0.000171661376953125,
-0.00356292724609375,
0.035400390625,
-0.0017690658569335938,
-0.034210205078125,
0.03802490234375,
-0.0249481201171875,
0.0097198486328125,
-0.03936767578125,
0.0207977294921875,
-0.07598876953125,
-0.03131103515625,
0.02349853515625,
0.058868408203125,
-0.01165008544921875,
-0.03753662109375,
-0.0238189697265625,
0.054962158203125,
0.01387786865234375,
0.049530029296875,
0.0034332275390625,
0.0037975311279296875,
-0.029998779296875,
0.007320404052734375,
0.021514892578125,
-0.0145721435546875,
-0.0316162109375,
-0.042755126953125,
-0.0235748291015625,
-0.0015048980712890625,
-0.01554107666015625,
-0.0038928985595703125,
-0.0038890838623046875,
0.0026397705078125,
-0.0316162109375,
-0.0281219482421875,
-0.0662841796875,
0.0047607421875,
0.00023806095123291016,
-0.038848876953125,
-0.060699462890625,
-0.08197021484375,
-0.00799560546875,
0.006744384765625,
0.0006241798400878906,
0.0187530517578125,
0.04193115234375,
0.018585205078125,
-0.00678253173828125,
-0.033203125,
-0.0021305084228515625,
0.005687713623046875,
-0.006683349609375,
0.037384033203125,
0.016845703125,
0.027252197265625,
-0.005428314208984375,
-0.021026611328125,
0.01007080078125,
0.022430419921875,
0.01605224609375,
0.00769805908203125,
-0.021759033203125,
0.01763916015625,
-0.000537872314453125,
-0.018585205078125,
0.023468017578125,
-0.0202484130859375,
-0.0269775390625,
-0.042877197265625,
0.054534912109375,
-0.01251983642578125,
0.038665771484375,
-0.05450439453125,
-0.029571533203125,
0.0269622802734375,
-0.032989501953125,
0.0029354095458984375,
0.0091705322265625,
-0.00997161865234375,
-0.005611419677734375,
-0.056243896484375,
0.01036834716796875,
-0.01113128662109375,
0.0130767822265625,
0.01031494140625,
0.037139892578125,
-0.00458526611328125,
0.0137176513671875,
-0.026702880859375,
0.0092010498046875,
0.037567138671875,
0.0263214111328125,
-0.0175323486328125,
0.01042938232421875,
-0.01129150390625,
-0.0252227783203125,
-0.0245513916015625,
0.0106048583984375,
0.0157470703125,
0.0230255126953125,
-0.0013275146484375,
0.0024013519287109375,
0.0166778564453125,
0.0193939208984375,
-0.02142333984375,
-0.00754547119140625,
0.0016736984252929688,
-0.0084991455078125,
-0.046783447265625,
0.0704345703125,
0.0247955322265625,
-0.007442474365234375,
-0.0172271728515625,
0.02337646484375,
0.039947509765625,
0.03253173828125,
0.0228118896484375,
-0.00531768798828125,
-0.0019102096557617188,
-0.0006890296936035156,
0.0019073486328125,
-0.052642822265625,
-0.036102294921875,
0.048248291015625,
0.09100341796875,
-0.004611968994140625,
-0.0177764892578125,
-0.01340484619140625,
-0.026092529296875,
-0.00620269775390625,
-0.0162506103515625,
-0.003108978271484375,
-0.006977081298828125,
0.0059967041015625,
0.007442474365234375,
0.0165863037109375,
0.0020618438720703125,
-0.0272979736328125,
-0.00446319580078125,
-0.059661865234375,
-0.0010652542114257812,
-0.021820068359375,
-0.026153564453125,
0.0232391357421875,
0.025054931640625,
-0.0289764404296875,
-0.02325439453125,
0.004993438720703125,
-0.060516357421875,
-0.020751953125,
-0.002063751220703125,
-0.01479339599609375,
0.014892578125,
-0.01763916015625,
0.034942626953125,
-0.0194549560546875,
-0.00818634033203125,
0.01194000244140625,
0.005519866943359375,
0.052947998046875,
0.0120849609375,
-0.03509521484375,
0.002742767333984375,
-0.0458984375,
-0.0091400146484375,
-0.0416259765625,
-0.02532958984375,
-0.036529541015625,
0.01428985595703125,
-0.007030487060546875,
0.01320648193359375,
0.004123687744140625,
0.0298004150390625,
-0.01190185546875,
0.026580810546875,
-0.01171875,
0.0220947265625,
0.006191253662109375,
0.07452392578125,
-0.055267333984375,
0.0438232421875,
0.0019588470458984375,
0.02886962890625,
-0.020233154296875,
-0.0026340484619140625,
0.022308349609375,
-0.0496826171875,
-0.048553466796875,
-0.0272216796875,
-0.0214691162109375,
0.0237884521484375,
0.0302734375,
-0.01064300537109375,
0.006916046142578125,
-0.0135345458984375,
0.0007238388061523438,
-0.02447509765625,
0.0301666259765625,
-0.02923583984375,
0.0101165771484375,
0.010650634765625,
0.0149383544921875,
0.035491943359375,
0.0013370513916015625,
-0.019561767578125,
0.014801025390625,
0.0080108642578125,
0.02471923828125,
-0.0216522216796875,
-0.041259765625,
0.017730712890625,
0.0291900634765625,
0.01062774658203125,
0.049835205078125,
-0.0031223297119140625,
0.02703857421875,
0.059906005859375,
-0.0011987686157226562,
0.0226898193359375,
0.0237274169921875,
0.0260467529296875,
-0.00959014892578125,
-0.003021240234375,
-0.006114959716796875,
-0.0266571044921875,
-0.01885986328125,
-0.0016994476318359375,
0.01345062255859375,
-0.042388916015625,
0.0218048095703125,
-0.01062774658203125,
0.02508544921875,
0.038848876953125,
0.0111083984375,
0.01528167724609375,
0.0237579345703125,
-0.053985595703125,
0.0006976127624511719,
-0.0309295654296875,
-0.028717041015625,
-0.004123687744140625,
0.00201416015625,
0.005096435546875,
0.040802001953125,
-0.0010385513305664062,
0.03997802734375,
-0.056732177734375,
-0.01061248779296875,
-0.00860595703125,
-0.0037097930908203125,
-0.0030612945556640625,
-0.0052490234375,
-0.01494598388671875,
-0.030364990234375,
0.01861572265625,
-0.06378173828125,
0.0182647705078125,
0.00635528564453125,
0.00032830238342285156,
0.005954742431640625,
0.0200958251953125,
-0.017303466796875,
-0.01551055908203125,
0.0009722709655761719,
-0.0478515625,
-0.02734375,
-0.00632476806640625,
0.0156402587890625,
0.0016298294067382812,
-0.040863037109375,
0.0127716064453125,
-0.05303955078125,
-0.0018157958984375,
-0.01190185546875,
-0.00945281982421875,
0.07275390625,
-0.0145111083984375,
-0.0214996337890625,
0.041046142578125,
0.00513458251953125,
-0.0259552001953125,
0.006107330322265625,
-0.005893707275390625,
-0.032440185546875,
-0.04071044921875,
-0.0084381103515625,
-0.047821044921875,
0.0189208984375,
-0.0185394287109375,
-0.06756591796875,
0.1175537109375,
0.0036144256591796875,
0.043304443359375,
0.0143585205078125,
0.04461669921875,
-0.0259246826171875,
0.005157470703125,
-0.0139312744140625,
0.0195770263671875,
0.0195159912109375,
0.0108642578125,
-0.02789306640625,
-0.0173797607421875,
-0.0053253173828125,
0.05780029296875,
0.064697265625,
0.021514892578125,
-0.075439453125,
-0.0125732421875,
0.032928466796875,
0.00853729248046875,
-0.003177642822265625,
0.07220458984375,
0.00548553466796875,
0.01348114013671875,
0.04058837890625,
0.0256195068359375,
0.04119873046875,
0.01151275634765625,
-0.0462646484375,
0.031768798828125,
0.0178070068359375,
0.0105438232421875,
-0.002796173095703125,
-0.01397705078125,
-0.018890380859375,
-0.005611419677734375,
0.019866943359375,
-0.006351470947265625,
0.035247802734375,
-0.0035991668701171875,
0.035919189453125,
-0.039031982421875,
0.02734375,
-0.0239410400390625,
0.0546875,
-0.00405120849609375,
0.005924224853515625,
0.00875091552734375,
0.0172271728515625,
0.0168609619140625,
-0.0240478515625,
-0.00031685829162597656,
0.008148193359375,
-0.02056884765625,
0.055206298828125,
0.030609130859375,
0.026702880859375,
-0.039337158203125,
0.01418304443359375,
0.06036376953125,
0.08880615234375,
-0.060150146484375,
-0.072021484375,
0.0092620849609375,
-0.01131439208984375,
0.00839996337890625,
0.007488250732421875,
0.00638580322265625,
-0.0018281936645507812,
0.0478515625,
-0.03326416015625,
-0.0289306640625,
0.008056640625,
0.05670166015625,
-0.00909423828125,
-0.02496337890625,
-0.0311279296875,
-0.042755126953125,
-0.026092529296875,
-0.03466796875,
0.0182952880859375,
0.0482177734375,
0.051239013671875,
0.01308441162109375,
-0.0192108154296875,
-0.0274200439453125,
0.0321044921875,
-0.0286407470703125,
-0.017242431640625,
-0.0286407470703125,
0.024658203125,
-0.0172576904296875,
0.004688262939453125,
0.0159149169921875,
0.041839599609375,
0.033721923828125,
0.0355224609375,
0.024169921875,
0.01088714599609375,
0.002227783203125,
0.0114898681640625,
-0.0037937164306640625,
0.01338958740234375,
-0.04425048828125,
-0.0014896392822265625,
0.002735137939453125,
-0.008758544921875,
-0.00006669759750366211,
-0.0247955322265625,
0.0343017578125,
0.02655029296875,
0.0225677490234375,
0.0199432373046875,
0.0182037353515625,
0.056060791015625,
0.0249786376953125,
0.0277557373046875,
0.051422119140625,
-0.0589599609375,
-0.03173828125,
0.00592041015625,
-0.05242919921875,
0.042999267578125,
0.058929443359375,
0.0035762786865234375,
-0.031280517578125,
0.01084136962890625,
-0.02081298828125,
-0.0020389556884765625,
0.0228118896484375,
0.009521484375,
0.0302886962890625,
0.0156402587890625,
0.0220794677734375,
-0.0267486572265625,
0.005031585693359375,
-0.003650665283203125,
0.01064300537109375,
0.00537872314453125,
0.09283447265625,
-0.0236663818359375,
0.01276397705078125,
0.005126953125,
0.043182373046875,
-0.018768310546875,
-0.00232696533203125,
0.01245880126953125,
-0.005584716796875,
0.0245208740234375,
-0.00717926025390625,
-0.0170745849609375,
0.01849365234375,
0.038116455078125,
-0.0210723876953125,
0.0177764892578125,
-0.007610321044921875,
0.0160369873046875,
-0.035369873046875,
0.0594482421875,
-0.0236663818359375,
-0.04345703125,
-0.0755615234375,
-0.0190277099609375,
0.042022705078125,
0.031768798828125,
-0.034423828125,
0.05010986328125,
0.0457763671875,
-0.0010223388671875,
0.0333251953125,
-0.0391845703125,
0.061370849609375,
0.0266876220703125,
0.005146026611328125,
-0.05133056640625,
0.055328369140625,
0.0004127025604248047,
0.02301025390625,
0.0198211669921875,
0.06884765625,
0.055816650390625,
-0.0787353515625,
0.00881195068359375,
0.039703369140625,
0.009246826171875,
-0.049591064453125,
-0.003726959228515625,
0.052825927734375,
-0.039581298828125,
0.011810302734375,
-0.0249786376953125,
-0.0228729248046875,
-0.0313720703125,
0.001575469970703125,
-0.000045239925384521484,
0.0009870529174804688,
-0.044158935546875,
-0.001049041748046875,
0.032989501953125,
0.045928955078125,
0.01422882080078125,
-0.0670166015625,
0.03704833984375,
-0.033203125,
0.0537109375,
-0.0015993118286132812,
0.01448822021484375,
0.021270751953125,
0.02032470703125,
-0.058441162109375,
0.0202484130859375,
-0.00916290283203125,
-0.039215087890625,
-0.01163482666015625,
0.0299072265625,
0.0252685546875,
-0.031341552734375,
-0.009033203125,
0.014129638671875,
0.01418304443359375,
0.06842041015625,
0.023590087890625,
-0.0321044921875,
-0.0248565673828125,
0.0221099853515625,
-0.00691986083984375,
-0.02685546875,
0.02093505859375,
-0.036468505859375,
-0.028289794921875,
-0.0178680419921875,
0.0323486328125,
0.058868408203125,
-0.016143798828125,
-0.054656982421875,
0.12384033203125,
-0.0272369384765625,
-0.01105499267578125,
-0.04132080078125,
-0.00733184814453125,
-0.01346588134765625,
0.0596923828125,
0.01317596435546875,
-0.01148223876953125,
-0.030181884765625,
0.02325439453125,
-0.0177764892578125,
0.04736328125,
-0.01959228515625,
-0.0006432533264160156,
-0.01273345947265625,
0.01403045654296875,
0.03118896484375,
-0.0268096923828125,
0.0279693603515625,
0.01396942138671875,
0.020660400390625,
0.055816650390625,
-0.0147247314453125,
0.0288238525390625,
-0.0181121826171875,
-0.032440185546875,
0.0031719207763671875,
-0.054443359375,
-0.005199432373046875,
-0.030731201171875,
0.03375244140625,
-0.00771331787109375,
-0.0021343231201171875,
-0.00727081298828125,
0.01123809814453125,
-0.0625,
-0.05474853515625,
0.0028896331787109375,
0.02392578125,
-0.045166015625,
0.00945281982421875,
0.0263214111328125,
0.035430908203125,
-0.026885986328125,
-0.0173797607421875,
0.012969970703125,
-0.0394287109375,
0.060760498046875,
0.026092529296875,
0.002658843994140625,
0.0408935546875,
-0.01526641845703125,
-0.007610321044921875,
-0.003509521484375,
-0.013031005859375,
-0.01514434814453125,
-0.0281829833984375,
0.01354217529296875,
-0.0238494873046875,
0.039764404296875,
-0.035308837890625,
0.0009102821350097656,
-0.00754547119140625,
0.042999267578125,
-0.0308074951171875,
0.0267791748046875,
-0.04864501953125,
0.0171661376953125,
0.0274200439453125,
0.00025725364685058594,
-0.059112548828125,
0.07037353515625,
0.05303955078125,
0.04571533203125,
0.0104522705078125,
0.030029296875,
0.0008559226989746094,
0.049468994140625,
-0.027740478515625,
-0.01369476318359375,
-0.0231781005859375,
-0.027435302734375,
0.0014982223510742188,
-0.0126190185546875,
0.004238128662109375,
-0.03643798828125,
0.0157470703125,
0.02569580078125,
-0.01502227783203125,
0.028472900390625
]
|
24e0a39439b70282a68871db6c6dd07d1f63de77 | Wordpress Stackexchange
Q: Why do you need to wrap a function inside array($this, function) I'm a newbie at PHP and WordPress, so please be gentle!
I'm building a plugin - following a few tutorials, getting it all working.
My question is why is the function I want to call wrapped up in the array($this, function)? For example I have this constructor code inside my class
function __construct() {
add_action( 'admin_init',array( $this, 'getStuffDone' ) );
}
The getStuffDone function gets fired OK - but why does it have to be in the format it is in?
Any insight is much appreciated.
A: It's a PHP callback. You need the syntax to keep a reference to the class instance.
Put it this way - if you didn't have $this, how does the caller know that getStuffDone is a method of your class, and not just a regular PHP function? It doesn't.
Using array( $this, 'getStuffDone' ) says to PHP:
Hey bro, you need to call the method getStuffDone on this instance of my class
| Q: Why do you need to wrap a function inside array($this, function) I'm a newbie at PHP and WordPress, so please be gentle!
I'm building a plugin - following a few tutorials, getting it all working.
My question is why is the function I want to call wrapped up in the array($this, function)? For example I have this constructor code inside my class
function __construct() {
add_action( 'admin_init',array( $this, 'getStuffDone' ) );
}
The getStuffDone function gets fired OK - but why does it have to be in the format it is in?
Any insight is much appreciated.
A: It's a PHP callback. You need the syntax to keep a reference to the class instance.
Put it this way - if you didn't have $this, how does the caller know that getStuffDone is a method of your class, and not just a regular PHP function? It doesn't.
Using array( $this, 'getStuffDone' ) says to PHP:
Hey bro, you need to call the method getStuffDone on this instance of my class
A: the add_action() function definition looks like:
function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1) {
return add_filter($tag, $function_to_add, $priority, $accepted_args);
}
so according to that it looks like it expects (string,string,int,int)
In a traditional php file the second parameter would simply be one of your function names.
so you would have add_action('admin_init','my_init_function')
It looks like you're using a class to encapsulate your plugin. Other classes could have functions in them with the same name (getStuffDone).
So your function is only known with reference to your class, that's why you have to specify your class $this as well as the function name.
If you're trying to reference a function inside a class you have to use
array callable syntax
See also codex.wordpress.org
A: See the documentation, under the "User Contributed Notes":
"To use add_action() when your plugin or theme is built using
classes, you need to use the array callable syntax. You would pass
the function to add_action() as an array, with $this as the first
element, then the name of the class method ..."
A: For future readers this example demonstrates the reason for the syntax. Although possibly a bad practice since the class method is called inside the add_test function without initializing the referenced class.
function add_test( $reference ){
$object_instance = $reference[0];
$object_method = $reference[1];
$to_return = $object_instance->$object_method();
return $to_return;
}
class test{
public function add(){
$a = $this->get_first();
$b = add_test(array($this,'get_second'));
return $a+$b;
}
public function get_first(){
return 1;
}
public function get_second(){
return 2;
}
}
$test_instance = new test();
echo $test_instance->add();
We're simply storing the reference of the object where the method resides so the function add_action can successfully execute the method in question.
| wordpress | {
"language": "en",
"length": 450,
"provenance": "stackexchange_00019.jsonl.gz:454734",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/184446"
} | [
0.0723876953125,
0.012939453125,
-0.017822265625,
-0.060516357421875,
0.01134490966796875,
-0.036865234375,
0.0242919921875,
0.0092315673828125,
-0.00020122528076171875,
0.00569915771484375,
-0.04449462890625,
0.037353515625,
-0.05072021484375,
-0.003711700439453125,
-0.007778167724609375,
-0.02679443359375,
0.0401611328125,
0.0023975372314453125,
0.05438232421875,
0.005466461181640625,
0.00826263427734375,
0.039031982421875,
0.0306243896484375,
0.076171875,
0.043792724609375,
-0.057281494140625,
0.06610107421875,
0.021331787109375,
0.018798828125,
-0.01532745361328125,
0.026763916015625,
-0.02020263671875,
-0.005695343017578125,
0.072021484375,
-0.06829833984375,
-0.08038330078125,
-0.003997802734375,
0.017364501953125,
-0.0015516281127929688,
0.03411865234375,
-0.0018167495727539062,
0.0211639404296875,
-0.00897979736328125,
0.055145263671875,
-0.05462646484375,
-0.044342041015625,
0.034515380859375,
0.03753662109375,
-0.0051727294921875,
-0.01142120361328125,
0.013458251953125,
0.033416748046875,
0.01172637939453125,
0.044219970703125,
0.00386810302734375,
0.0297393798828125,
-0.0195465087890625,
-0.01482391357421875,
0.01727294921875,
0.0386962890625,
-0.019073486328125,
0.025634765625,
0.0023746490478515625,
-0.0238800048828125,
0.00005346536636352539,
-0.01947021484375,
0.001544952392578125,
0.00870513916015625,
-0.043975830078125,
0.0200347900390625,
0.059906005859375,
-0.031280517578125,
-0.0208282470703125,
-0.00955963134765625,
-0.00220489501953125,
-0.01474761962890625,
-0.00395965576171875,
-0.044281005859375,
-0.00732421875,
0.03411865234375,
-0.0268707275390625,
-0.0221710205078125,
0.0261688232421875,
-0.0192718505859375,
0.0274810791015625,
0.0489501953125,
-0.0197601318359375,
-0.01448822021484375,
-0.0021152496337890625,
0.0002789497375488281,
-0.0227813720703125,
-0.0037631988525390625,
0.0218505859375,
0.008026123046875,
-0.01265716552734375,
-0.0251007080078125,
0.005184173583984375,
-0.0079193115234375,
0.007434844970703125,
-0.006069183349609375,
0.0252685546875,
-0.054840087890625,
0.017822265625,
-0.0232696533203125,
-0.00539398193359375,
0.006786346435546875,
-0.04107666015625,
0.0096588134765625,
0.0295867919921875,
0.04486083984375,
-0.006801605224609375,
-0.05450439453125,
0.0106048583984375,
-0.09881591796875,
0.033172607421875,
0.000019311904907226562,
-0.03515625,
0.0733642578125,
0.07098388671875,
-0.0278167724609375,
0.00037217140197753906,
0.02728271484375,
-0.0018281936645507812,
0.005126953125,
0.0229034423828125,
0.02081298828125,
-0.0087738037109375,
-0.029571533203125,
0.0230560302734375,
0.00897216796875,
-0.0285491943359375,
0.0187225341796875,
0.0640869140625,
0.005626678466796875,
-0.0003268718719482422,
-0.018951416015625,
0.0187530517578125,
0.03387451171875,
0.0017747879028320312,
0.00022649765014648438,
0.01105499267578125,
-0.04132080078125,
-0.006622314453125,
0.027374267578125,
-0.0222015380859375,
-0.01629638671875,
0.0168609619140625,
0.031524658203125,
-0.00911712646484375,
-0.057464599609375,
0.0406494140625,
-0.0098876953125,
0.01171112060546875,
0.01404571533203125,
-0.005626678466796875,
0.0301971435546875,
-0.0020236968994140625,
0.018829345703125,
-0.02630615234375,
0.0279083251953125,
-0.006984710693359375,
-0.001178741455078125,
0.0086517333984375,
-0.009918212890625,
-0.0292510986328125,
0.00940704345703125,
-0.003810882568359375,
0.004398345947265625,
0.03570556640625,
-0.008453369140625,
0.007740020751953125,
-0.004741668701171875,
0.0550537109375,
0.032318115234375,
0.00643157958984375,
0.0192108154296875,
0.021820068359375,
0.01103973388671875,
0.0289306640625,
-0.0058135986328125,
-0.04205322265625,
-0.04766845703125,
0.024749755859375,
-0.045379638671875,
-0.040435791015625,
0.0313720703125,
0.0036163330078125,
0.05767822265625,
0.0107574462890625,
0.03277587890625,
-0.0254974365234375,
0.038848876953125,
-0.0090179443359375,
-0.0009784698486328125,
-0.0173187255859375,
-0.0174713134765625,
0.0179443359375,
0.0204010009765625,
-0.0123291015625,
-0.0281524658203125,
-0.0213623046875,
-0.009796142578125,
-0.0002732276916503906,
0.0010175704956054688,
-0.021759033203125,
0.00795745849609375,
-0.01153564453125,
0.039642333984375,
-0.0026302337646484375,
0.0166015625,
0.006114959716796875,
0.0106964111328125,
-0.03607177734375,
0.03033447265625,
-0.0007948875427246094,
0.0012941360473632812,
-0.0179901123046875,
0.0247039794921875,
-0.0180206298828125,
-0.0012645721435546875,
0.003536224365234375,
-0.047149658203125,
-0.0138092041015625,
0.01000213623046875,
0.039215087890625,
-0.0333251953125,
-0.01739501953125,
-0.04315185546875,
-0.01544189453125,
-0.005451202392578125,
-0.06622314453125,
0.061187744140625,
0.048980712890625,
0.0276336669921875,
-0.04058837890625,
-0.01360321044921875,
-0.026763916015625,
-0.052642822265625,
-0.033935546875,
0.05364990234375,
0.01071929931640625,
0.040313720703125,
0.018524169921875,
0.05731201171875,
0.0487060546875,
-0.01806640625,
-0.004150390625,
0.0212860107421875,
-0.0279083251953125,
-0.01486968994140625,
0.0219879150390625,
-0.015625,
0.03033447265625,
-0.0028133392333984375,
0.0068511962890625,
0.0377197265625,
-0.028839111328125,
-0.05047607421875,
0.00429534912109375,
-0.0037250518798828125,
0.031524658203125,
-0.05889892578125,
-0.0443115234375,
-0.0098114013671875,
-0.00969696044921875,
-0.005626678466796875,
0.00986480712890625,
0.01448822021484375,
-0.0291900634765625,
-0.0026836395263671875,
0.0194549560546875,
0.037841796875,
-0.00887298583984375,
0.041839599609375,
-0.0020618438720703125,
-0.0518798828125,
-0.01477813720703125,
0.016265869140625,
-0.053863525390625,
-0.006198883056640625,
0.01342010498046875,
0.07958984375,
0.02056884765625,
-0.01361083984375,
0.01141357421875,
0.00030541419982910156,
-0.0234375,
-0.01398468017578125,
0.06494140625,
0.0194549560546875,
0.0157623291015625,
0.0307159423828125,
-0.0355224609375,
0.070068359375,
0.045745849609375,
-0.036468505859375,
-0.00893402099609375,
0.032318115234375,
-0.0139617919921875,
0.0177764892578125,
0.01103973388671875,
0.030853271484375,
0.0129547119140625,
-0.0311126708984375,
0.00725555419921875,
-0.0143280029296875,
0.0133056640625,
0.0229949951171875,
0.0038166046142578125,
-0.00945281982421875,
-0.043060302734375,
-0.00739288330078125,
0.0294036865234375,
0.0989990234375,
-0.033843994140625,
-0.056365966796875,
-0.01824951171875,
0.055938720703125,
-0.048004150390625,
-0.03485107421875,
0.0094451904296875,
-0.0400390625,
-0.00395965576171875,
-0.0169219970703125,
-0.0210723876953125,
-0.0137939453125,
-0.00801849365234375,
-0.00199127197265625,
-0.0234222412109375,
-0.0095672607421875,
-0.00759124755859375,
-0.03826904296875,
-0.035308837890625,
-0.0038509368896484375,
0.0062713623046875,
-0.0036716461181640625,
0.01123046875,
0.053955078125,
0.004039764404296875,
-0.061279296875,
-0.0013303756713867188,
0.060699462890625,
-0.00771331787109375,
0.037689208984375,
-0.007320404052734375,
-0.031280517578125,
-0.002048492431640625,
-0.001392364501953125,
-0.0181732177734375,
-0.0220947265625,
0.0273284912109375,
-0.0218353271484375,
-0.0037899017333984375,
0.0031585693359375,
0.034820556640625,
0.073974609375,
-0.00482177734375,
0.0024318695068359375,
0.05560302734375,
-0.050323486328125,
0.0180511474609375,
-0.0111541748046875,
-0.039947509765625,
-0.01540374755859375,
0.046630859375,
-0.0379638671875,
-0.00925445556640625,
-0.033477783203125,
-0.01488494873046875,
0.00786590576171875,
-0.037994384765625,
-0.015838623046875,
0.04241943359375,
0.0068359375,
0.009063720703125,
0.02484130859375,
0.07861328125,
-0.00600433349609375,
-0.062469482421875,
0.01383209228515625,
-0.012664794921875,
-0.003265380859375,
-0.0303802490234375,
-0.03131103515625,
-0.016448974609375,
0.0281982421875,
-0.0755615234375,
0.01488494873046875,
-0.05731201171875,
-0.00246429443359375,
-0.0012874603271484375,
0.09466552734375,
0.01165771484375,
0.00763702392578125,
0.01551055908203125,
-0.003170013427734375,
-0.03643798828125,
-0.01708984375,
-0.07232666015625,
-0.004024505615234375,
0.029998779296875,
-0.0308990478515625,
-0.0197296142578125,
0.022064208984375,
-0.01122283935546875,
0.080078125,
-0.0009446144104003906,
-0.0143890380859375,
-0.01136016845703125,
-0.0224151611328125,
-0.0279998779296875,
-0.01165008544921875,
-0.00775146484375,
-0.051605224609375,
0.049346923828125,
-0.06011962890625,
-0.05975341796875,
-0.01546478271484375,
-0.0258026123046875,
0.06353759765625,
0.023101806640625,
-0.004741668701171875,
0.01727294921875,
0.061492919921875,
-0.0235443115234375,
0.01497650146484375,
0.004962921142578125,
0.021392822265625,
0.01800537109375,
0.0256805419921875,
-0.0018968582153320312,
-0.00617218017578125,
-0.00891876220703125,
0.01092529296875,
-0.005710601806640625,
0.033355712890625,
-0.010833740234375,
-0.007495880126953125,
0.004489898681640625,
-0.0230865478515625,
-0.03143310546875,
-0.02294921875,
0.011627197265625,
0.017181396484375,
-0.0187225341796875,
0.031036376953125,
-0.026458740234375,
-0.0170440673828125,
0.02716064453125,
-0.0169219970703125,
-0.0216522216796875,
0.006870269775390625,
0.0938720703125,
0.0234222412109375,
-0.00403594970703125,
-0.040069580078125,
0.01174163818359375,
0.044097900390625,
-0.0021915435791015625,
0.00098419189453125,
-0.00958251953125,
-0.035064697265625,
0.039520263671875,
0.006832122802734375,
0.02337646484375,
-0.0174713134765625,
0.054656982421875,
0.00684356689453125,
-0.018310546875,
0.019622802734375,
-0.0080108642578125,
-0.0228271484375,
-0.01186370849609375,
-0.027984619140625,
0.0059814453125,
0.0008072853088378906,
0.025146484375,
-0.0105133056640625,
0.03924560546875,
-0.024017333984375,
-0.0435791015625,
0.0169219970703125,
-0.032745361328125,
0.0291595458984375,
0.0227813720703125,
0.0020313262939453125,
0.0255584716796875,
0.0003426074981689453,
0.045867919921875,
0.05462646484375,
0.0523681640625,
-0.0295867919921875,
0.05462646484375,
0.054473876953125,
0.0175323486328125,
0.01617431640625,
0.01641845703125,
0.0026416778564453125,
-0.01212310791015625,
-0.037811279296875,
-0.037841796875,
0.022705078125,
-0.02276611328125,
0.01381683349609375,
-0.003650665283203125,
0.051971435546875,
-0.02386474609375,
-0.0125274658203125,
-0.024078369140625,
-0.07562255859375,
0.004039764404296875,
-0.049346923828125,
0.06549072265625,
0.041351318359375,
-0.0213775634765625,
0.01035308837890625,
0.031036376953125,
0.0162506103515625,
0.0194549560546875,
-0.0235595703125,
0.04150390625,
0.003108978271484375,
0.0447998046875,
-0.0015325546264648438,
-0.034149169921875,
0.036712646484375,
0.0071258544921875,
-0.0009832382202148438,
-0.01555633544921875,
0.035614013671875,
0.003971099853515625,
0.01201629638671875,
0.0177459716796875,
-0.027801513671875,
0.034820556640625,
-0.0033397674560546875,
-0.0251617431640625,
0.026641845703125,
0.053131103515625,
-0.00896453857421875,
-0.0011844635009765625,
0.018096923828125,
0.031890869140625,
0.040618896484375,
-0.0175323486328125,
0.015594482421875,
-0.036468505859375,
0.01361846923828125,
-0.058868408203125,
-0.0010290145874023438,
-0.0232696533203125,
-0.0120391845703125,
-0.050811767578125,
-0.01103973388671875,
-0.0280303955078125,
-0.006145477294921875,
-0.044830322265625,
0.01291656494140625,
-0.030670166015625,
0.043548583984375,
-0.040374755859375,
0.005268096923828125,
-0.038848876953125,
0.01354217529296875,
-0.04638671875,
0.033233642578125,
0.033447265625,
0.0284423828125,
-0.09478759765625,
0.0036182403564453125,
-0.044403076171875,
0.0258026123046875,
-0.038543701171875,
-0.03955078125,
-0.0220947265625,
0.0067596435546875,
-0.05047607421875,
-0.0029468536376953125,
-0.01244354248046875,
0.046356201171875,
-0.01082611083984375,
0.030853271484375,
-0.02752685546875,
-0.0036525726318359375,
-0.01354217529296875,
0.02935791015625,
0.047088623046875,
0.0340576171875,
0.02606201171875,
0.03045654296875,
-0.01424407958984375,
-0.0191650390625,
0.00812530517578125,
-0.040130615234375,
-0.0008683204650878906,
-0.004276275634765625,
-0.01155853271484375,
-0.01392364501953125,
0.03472900390625,
-0.01041412353515625,
-0.0292205810546875,
-0.016143798828125,
-0.01198577880859375,
-0.032623291015625,
0.063720703125,
-0.00791168212890625,
0.013916015625,
-0.05218505859375,
-0.02325439453125,
-0.0107879638671875,
0.0005164146423339844,
0.040771484375,
-0.0072784423828125,
-0.0232391357421875,
0.00812530517578125,
-0.004638671875,
0.0180511474609375,
-0.0027942657470703125,
0.0230865478515625,
-0.0077667236328125,
0.0005192756652832031,
0.010894775390625,
-0.0063323974609375,
-0.040435791015625,
0.0294342041015625,
-0.01303863525390625,
-0.045867919921875,
0.048919677734375,
0.00966644287109375,
-0.0101776123046875,
0.0390625,
-0.0206146240234375,
0.00977325439453125,
0.0216827392578125,
0.0648193359375,
-0.053802490234375,
0.036956787109375,
0.0099639892578125,
-0.0023345947265625,
0.0518798828125,
0.018585205078125,
-0.0280303955078125,
-0.05853271484375,
0.032989501953125,
-0.00666046142578125,
-0.005950927734375,
0.01032257080078125,
0.01554107666015625,
0.01483917236328125,
-0.00682830810546875,
0.03240966796875,
0.0301513671875,
-0.042266845703125,
0.039794921875,
0.0252227783203125,
0.01995849609375,
0.0216522216796875,
0.025146484375,
-0.0191497802734375,
-0.02740478515625,
-0.01155853271484375,
-0.0190887451171875,
-0.01055908203125,
-0.07012939453125,
-0.004055023193359375,
-0.02239990234375,
0.061614990234375,
0.046844482421875,
-0.004955291748046875,
-0.01033782958984375,
0.02996826171875,
-0.0004248619079589844,
-0.0237884521484375,
-0.028411865234375,
0.018310546875,
0.025390625,
-0.0338134765625,
0.0252532958984375,
-0.025238037109375,
-0.01274871826171875,
-0.00807952880859375,
0.020294189453125,
0.00820159912109375,
0.0225982666015625,
-0.041015625,
0.0182037353515625,
0.006549835205078125,
0.00148773193359375,
-0.0186920166015625,
0.008453369140625,
-0.024658203125,
0.00109100341796875,
-0.01428985595703125,
0.0027561187744140625,
0.01036834716796875,
-0.048797607421875,
-0.012603759765625,
0.08843994140625,
0.013580322265625,
-0.009735107421875,
0.0164642333984375,
0.045135498046875,
-0.01418304443359375,
0.034576416015625,
-0.0012569427490234375,
0.01270294189453125,
0.003902435302734375,
0.02166748046875,
-0.045745849609375,
-0.022918701171875,
-0.011932373046875,
0.06298828125,
0.035858154296875,
0.0024585723876953125,
-0.0202178955078125,
0.0019683837890625,
0.026641845703125,
0.06390380859375,
0.00948333740234375,
0.00669097900390625,
0.021942138671875,
0.04388427734375,
0.03375244140625,
0.0001767873764038086,
0.032470703125,
0.0103607177734375,
-0.0166778564453125,
0.0582275390625,
-0.00421905517578125,
-0.0122833251953125,
0.027435302734375,
-0.002742767333984375,
-0.047943115234375,
0.00876617431640625,
0.0258636474609375,
-0.035308837890625,
-0.046844482421875,
0.06640625,
-0.004405975341796875,
0.01140594482421875,
-0.033538818359375,
-0.026214599609375,
0.034576416015625,
0.0018720626831054688,
0.02606201171875,
0.033203125,
0.0136871337890625,
-0.0139617919921875,
-0.003814697265625,
0.00658416748046875,
0.02081298828125,
-0.0210113525390625,
0.0030975341796875,
0.0249786376953125,
0.01375579833984375,
-0.0322265625,
-0.0231475830078125,
0.0545654296875,
0.042388916015625,
-0.026336669921875,
-0.006374359130859375,
-0.01474761962890625,
-0.0021572113037109375,
0.034698486328125,
-0.0247802734375,
0.04510498046875,
0.035308837890625,
0.0227813720703125,
-0.01055145263671875,
-0.01279449462890625,
0.003932952880859375,
0.00682830810546875,
0.0109100341796875,
0.005336761474609375,
-0.0107269287109375,
-0.000972747802734375,
-0.0238494873046875,
-0.01422119140625,
-0.00923919677734375,
0.06268310546875,
0.03607177734375,
0.042327880859375,
-0.0305023193359375,
-0.03009033203125,
0.0182647705078125,
-0.00540924072265625,
0.001796722412109375,
-0.035797119140625,
0.046173095703125,
0.023895263671875,
0.0218658447265625,
-0.0211029052734375,
0.05426025390625,
0.00896453857421875,
0.0141754150390625,
0.005413055419921875,
0.01178741455078125,
0.0298919677734375,
0.057861328125,
-0.0020351409912109375,
-0.0203399658203125,
-0.0535888671875,
0.01824951171875,
-0.0007495880126953125,
0.0010595321655273438,
-0.009765625,
0.0237884521484375,
0.0208892822265625,
-0.0187530517578125,
0.0167236328125,
-0.0018100738525390625,
-0.035858154296875,
-0.01529693603515625,
-0.0279998779296875,
0.044891357421875,
0.0008373260498046875,
0.043792724609375,
0.012054443359375,
0.0109405517578125,
-0.05389404296875,
-0.005542755126953125,
0.03753662109375,
-0.01153564453125,
0.00527191162109375,
0.0125732421875,
-0.03594970703125,
0.0007886886596679688,
0.03668212890625,
0.0087738037109375,
0.01535797119140625,
0.0193023681640625,
-0.009124755859375,
-0.01468658447265625,
-0.0284271240234375,
-0.00948333740234375,
0.071533203125,
0.0251007080078125,
0.05194091796875,
-0.0181732177734375,
0.0184326171875,
0.0218353271484375,
0.00948333740234375,
-0.01776123046875,
-0.015960693359375,
0.01226806640625,
-0.017791748046875,
0.02569580078125,
-0.0001442432403564453,
-0.0340576171875,
-0.0247650146484375,
0.056732177734375,
-0.055267333984375,
-0.036773681640625,
0.0252227783203125,
0.040374755859375,
-0.015869140625,
0.08355712890625,
0.0040435791015625,
0.0056304931640625,
0.0211944580078125,
-0.011505126953125,
0.049163818359375,
0.0511474609375,
0.0228729248046875,
-0.0094451904296875,
0.01538848876953125,
-0.038055419921875,
-0.0006680488586425781,
-0.021209716796875,
-0.01548004150390625,
0.0186920166015625,
0.0299835205078125,
-0.037811279296875,
-0.04669189453125,
-0.0293426513671875,
0.00946807861328125,
-0.0310821533203125,
0.045745849609375,
-0.0274810791015625,
0.01312255859375,
-0.0008068084716796875,
0.035491943359375,
0.060516357421875,
-0.01316070556640625,
0.0232696533203125,
0.01439666748046875,
-0.00730133056640625,
0.0007162094116210938,
-0.045867919921875,
-0.0281982421875,
-0.047943115234375,
0.00415802001953125,
0.023895263671875,
-0.0267333984375,
-0.048248291015625,
-0.088134765625,
-0.0223846435546875,
0.048187255859375,
0.0205078125,
-0.05718994140625,
-0.019775390625,
0.00653839111328125,
0.0582275390625,
0.0153045654296875,
0.0235595703125,
0.01496124267578125,
0.058868408203125,
-0.053131103515625,
-0.040496826171875,
0.005115509033203125,
0.0247039794921875,
-0.01123046875,
0.06646728515625,
0.046539306640625,
-0.06353759765625,
0.007389068603515625,
0.0762939453125,
0.08038330078125,
0.09771728515625,
0.030029296875,
-0.021484375,
0.0504150390625,
-0.00942230224609375,
-0.0187225341796875,
-0.02679443359375,
0.01506805419921875,
-0.0175933837890625,
-0.00811767578125,
0.052093505859375,
-0.010589599609375,
0.05206298828125,
-0.00974273681640625,
-0.07098388671875,
0.0633544921875,
-0.003627777099609375,
-0.03521728515625,
-0.0604248046875,
0.0023784637451171875,
0.0016155242919921875,
0.035675048828125,
-0.0273590087890625,
0.0062103271484375,
-0.0261383056640625,
0.0386962890625,
0.0256500244140625,
-0.0138702392578125,
0.029876708984375,
-0.005191802978515625,
-0.038848876953125,
0.0296478271484375,
0.0294342041015625,
0.0416259765625,
-0.0006384849548339844,
-0.0107269287109375,
0.043243408203125,
0.040740966796875,
-0.0197906494140625,
0.0309295654296875,
0.01543426513671875,
0.0094757080078125,
-0.0278778076171875,
-0.037750244140625,
0.0005397796630859375,
0.0092010498046875,
0.06097412109375,
0.027374267578125,
0.0221710205078125,
-0.052734375,
-0.01477813720703125,
0.0008716583251953125,
-0.006359100341796875,
-0.001705169677734375,
0.04107666015625,
-0.0928955078125,
-0.0279693603515625,
0.0372314453125,
0.0166168212890625,
-0.00757598876953125,
-0.007537841796875,
-0.003795623779296875,
-0.031463623046875,
0.00499725341796875,
0.018035888671875,
-0.016845703125,
-0.0457763671875,
0.045745849609375,
-0.02197265625,
-0.00412750244140625,
0.032135009765625,
0.0264434814453125,
0.00943756103515625,
0.051849365234375,
0.01763916015625,
0.03302001953125,
-0.06805419921875,
-0.0016622543334960938,
-0.007648468017578125,
0.030914306640625,
-0.040802001953125,
-0.02362060546875,
-0.01500701904296875,
0.036651611328125,
0.00991058349609375,
0.050201416015625,
-0.0007843971252441406,
0.037933349609375,
0.0142669677734375,
0.036590576171875,
-0.0286865234375,
0.07440185546875,
-0.042755126953125,
0.0660400390625,
0.021697998046875,
-0.0032024383544921875,
0.0784912109375,
-0.035552978515625,
0.01514434814453125,
0.0110931396484375,
0.01239776611328125,
-0.01197052001953125,
-0.0012235641479492188,
0.028045654296875,
-0.004100799560546875,
0.007724761962890625
]
|
f41f2c3613bc35dc0f99c4801ca4a85a33e00469 | Wordpress Stackexchange
Q: Is there a limit on making calls to WordPress.org API's? I am writing a plugin which makes calls to https://api.wordpress.org/plugins/info/1.0/{slug}.json
Is there a limit on making calls to WordPress.org API's? For example once per hour or every 10 minutes etc.
Read more - https://codex.wordpress.org/WordPress.org_API#Plugins
A: I have no idea if WP API has limits, but, you should always cache your requests every time you deal with a third party API access. it is a good practice to cache the response for an hour or whatever, it will help optimizing the site which will use your plugin, thus it loads faster due to cached responses.
I suggest you use Transients API « WordPress Codex
| Q: Is there a limit on making calls to WordPress.org API's? I am writing a plugin which makes calls to https://api.wordpress.org/plugins/info/1.0/{slug}.json
Is there a limit on making calls to WordPress.org API's? For example once per hour or every 10 minutes etc.
Read more - https://codex.wordpress.org/WordPress.org_API#Plugins
A: I have no idea if WP API has limits, but, you should always cache your requests every time you deal with a third party API access. it is a good practice to cache the response for an hour or whatever, it will help optimizing the site which will use your plugin, thus it loads faster due to cached responses.
I suggest you use Transients API « WordPress Codex
| wordpress | {
"language": "en",
"length": 114,
"provenance": "stackexchange_00019.jsonl.gz:454781",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/184616"
} | [
0.0628662109375,
0.01186370849609375,
0.01200103759765625,
-0.033538818359375,
0.025299072265625,
-0.01084136962890625,
0.0238800048828125,
-0.0286712646484375,
-0.0096435546875,
0.026824951171875,
-0.047332763671875,
0.00829315185546875,
0.00063323974609375,
-0.0098724365234375,
-0.00909423828125,
-0.046783447265625,
0.044342041015625,
-0.00046372413635253906,
0.045928955078125,
-0.01007843017578125,
0.016754150390625,
0.01953125,
0.021453857421875,
0.1031494140625,
0.0196990966796875,
-0.0247955322265625,
0.04339599609375,
-0.053558349609375,
0.00666046142578125,
-0.04327392578125,
0.0105438232421875,
0.01297760009765625,
0.009429931640625,
0.061737060546875,
-0.06719970703125,
-0.00611114501953125,
0.0276336669921875,
0.01261138916015625,
-0.00205230712890625,
0.06097412109375,
0.058685302734375,
-0.03338623046875,
-0.05230712890625,
0.0294036865234375,
-0.01313018798828125,
-0.035430908203125,
0.049957275390625,
-0.03558349609375,
0.0065460205078125,
-0.01953125,
0.0272979736328125,
-0.0289306640625,
0.026519775390625,
0.0152130126953125,
-0.0180206298828125,
0.004711151123046875,
0.0232696533203125,
-0.0095367431640625,
0.02734375,
-0.082275390625,
-0.0445556640625,
-0.009307861328125,
0.0533447265625,
0.04913330078125,
0.0133514404296875,
-0.03424072265625,
-0.04718017578125,
0.03912353515625,
0.050567626953125,
0.033355712890625,
0.0025653839111328125,
0.005970001220703125,
0.0021877288818359375,
0.0109100341796875,
-0.027740478515625,
-0.05364990234375,
0.035552978515625,
-0.0252532958984375,
0.0218353271484375,
0.006908416748046875,
0.010498046875,
-0.0484619140625,
-0.0117034912109375,
0.00021016597747802734,
-0.0093841552734375,
0.016632080078125,
-0.0051727294921875,
0.004917144775390625,
-0.01337432861328125,
0.01123809814453125,
-0.0213775634765625,
-0.05438232421875,
0.037017822265625,
0.0268096923828125,
-0.01654052734375,
-0.0029850006103515625,
0.007526397705078125,
-0.033966064453125,
-0.006900787353515625,
0.0032024383544921875,
0.023895263671875,
-0.034271240234375,
0.02667236328125,
0.00027871131896972656,
0.01531219482421875,
-0.001033782958984375,
-0.021514892578125,
-0.006748199462890625,
0.055419921875,
0.03179931640625,
0.00001621246337890625,
0.037872314453125,
0.01593017578125,
-0.0341796875,
-0.006244659423828125,
-0.051605224609375,
-0.031341552734375,
0.02642822265625,
0.0166168212890625,
-0.054931640625,
-0.0097198486328125,
0.0034389495849609375,
-0.00400543212890625,
-0.0166778564453125,
-0.0189971923828125,
-0.0299835205078125,
-0.0372314453125,
0.00838470458984375,
-0.00537872314453125,
0.037506103515625,
-0.004299163818359375,
0.0030975341796875,
-0.0247955322265625,
0.01258087158203125,
-0.0283050537109375,
-0.00701904296875,
0.0261383056640625,
0.0214691162109375,
-0.004245758056640625,
0.00030231475830078125,
-0.01448822021484375,
-0.003124237060546875,
0.00984954833984375,
-0.04736328125,
0.0338134765625,
-0.006748199462890625,
0.003566741943359375,
0.0225067138671875,
0.01561737060546875,
0.0023899078369140625,
0.006534576416015625,
-0.005718231201171875,
0.0278472900390625,
0.00371551513671875,
0.00911712646484375,
-0.03729248046875,
0.043548583984375,
-0.047332763671875,
0.0164337158203125,
-0.038055419921875,
-0.0574951171875,
-0.044097900390625,
-0.0019283294677734375,
-0.05218505859375,
-0.03253173828125,
0.04840087890625,
0.0240631103515625,
0.0171051025390625,
0.0206146240234375,
0.06634521484375,
0.044830322265625,
0.0020923614501953125,
0.003108978271484375,
0.005771636962890625,
-0.023406982421875,
-0.024078369140625,
-0.007595062255859375,
0.045074462890625,
0.038726806640625,
-0.02728271484375,
-0.034088134765625,
-0.0533447265625,
0.0950927734375,
-0.0401611328125,
-0.033660888671875,
0.0198211669921875,
-0.0021419525146484375,
0.0177459716796875,
0.016693115234375,
-0.01010894775390625,
0.0305023193359375,
0.0171661376953125,
0.017242431640625,
-0.005367279052734375,
-0.03167724609375,
-0.049102783203125,
0.00681304931640625,
0.008697509765625,
-0.041748046875,
0.0193939208984375,
-0.01158905029296875,
-0.00516510009765625,
0.00811004638671875,
-0.01036834716796875,
-0.038299560546875,
0.006984710693359375,
-0.021697998046875,
0.039520263671875,
-0.0206756591796875,
0.017791748046875,
-0.0089111328125,
-0.0273895263671875,
-0.00714111328125,
0.029083251953125,
0.0296478271484375,
0.0240020751953125,
0.01140594482421875,
0.059783935546875,
0.0110015869140625,
0.055877685546875,
0.005626678466796875,
-0.0216064453125,
-0.0038700103759765625,
-0.00787353515625,
0.029052734375,
-0.0255584716796875,
0.01445770263671875,
-0.0274658203125,
0.025787353515625,
0.0155181884765625,
-0.0255889892578125,
-0.001739501953125,
0.050872802734375,
0.09405517578125,
0.037506103515625,
-0.01395416259765625,
0.0197601318359375,
-0.08184814453125,
0.037628173828125,
0.0249176025390625,
0.017303466796875,
0.008758544921875,
-0.011688232421875,
0.0189666748046875,
-0.0068359375,
-0.05047607421875,
0.01026153564453125,
-0.0083160400390625,
0.01392364501953125,
-0.002132415771484375,
0.01291656494140625,
-0.025787353515625,
0.03515625,
-0.0111846923828125,
0.0139312744140625,
0.01751708984375,
-0.00754547119140625,
-0.03424072265625,
-0.007724761962890625,
-0.0149383544921875,
0.038360595703125,
-0.025115966796875,
-0.05303955078125,
0.007610321044921875,
-0.044219970703125,
-0.005916595458984375,
0.0144195556640625,
0.021392822265625,
0.0019989013671875,
-0.034820556640625,
0.021759033203125,
0.05303955078125,
-0.0100860595703125,
0.02337646484375,
0.033477783203125,
-0.028564453125,
-0.01491546630859375,
0.0019989013671875,
-0.005115509033203125,
-0.01165008544921875,
-0.00975799560546875,
0.0196990966796875,
-0.0217742919921875,
-0.0099334716796875,
-0.022552490234375,
-0.005702972412109375,
0.00959014892578125,
0.023681640625,
0.0134124755859375,
0.0303802490234375,
0.05548095703125,
0.01032257080078125,
-0.01255035400390625,
0.0289459228515625,
-0.00630950927734375,
-0.0077667236328125,
0.011688232421875,
-0.04302978515625,
0.03857421875,
-0.0287322998046875,
0.05206298828125,
0.0655517578125,
-0.015594482421875,
0.026458740234375,
-0.0016241073608398438,
-0.036376953125,
-0.04083251953125,
0.019500732421875,
-0.00047135353088378906,
-0.01535797119140625,
-0.032501220703125,
0.064697265625,
0.00835418701171875,
0.049957275390625,
-0.02691650390625,
-0.0626220703125,
-0.0164947509765625,
0.0232696533203125,
-0.08831787109375,
-0.061309814453125,
0.06695556640625,
-0.0394287109375,
0.0117645263671875,
-0.03125,
-0.024627685546875,
-0.0226593017578125,
-0.01776123046875,
-0.0137176513671875,
0.0031147003173828125,
-0.031524658203125,
-0.0257720947265625,
-0.054718017578125,
-0.06219482421875,
-0.0452880859375,
0.005886077880859375,
-0.00246429443359375,
-0.0021724700927734375,
0.07830810546875,
-0.004711151123046875,
-0.0869140625,
-0.046875,
0.0288848876953125,
-0.0201416015625,
-0.00975799560546875,
0.00399017333984375,
-0.01380157470703125,
0.026031494140625,
0.0028438568115234375,
0.0261077880859375,
0.059112548828125,
-0.031829833984375,
0.00013244152069091797,
-0.005474090576171875,
-0.019317626953125,
-0.0010929107666015625,
0.05230712890625,
0.007152557373046875,
-0.009735107421875,
0.031829833984375,
-0.041412353515625,
-0.03564453125,
0.035919189453125,
-0.04046630859375,
-0.024169921875,
0.012603759765625,
-0.01537322998046875,
-0.002498626708984375,
-0.0029392242431640625,
-0.039947509765625,
0.006992340087890625,
0.00421905517578125,
-0.0494384765625,
0.05419921875,
-0.021453857421875,
-0.031707763671875,
0.00263214111328125,
0.053314208984375,
-0.0092315673828125,
-0.05377197265625,
-0.000006079673767089844,
-0.006801605224609375,
-0.00620269775390625,
-0.032745361328125,
-0.041748046875,
-0.01047515869140625,
0.02508544921875,
0.0231781005859375,
0.039276123046875,
-0.0076141357421875,
-0.0259552001953125,
-0.011138916015625,
0.0499267578125,
0.0286407470703125,
-0.018157958984375,
-0.024871826171875,
0.0067138671875,
-0.043548583984375,
-0.0282135009765625,
-0.0233306884765625,
0.006488800048828125,
-0.022918701171875,
0.01201629638671875,
-0.00977325439453125,
-0.001262664794921875,
0.01238250732421875,
0.013946533203125,
0.034942626953125,
-0.0250396728515625,
0.0228424072265625,
-0.05572509765625,
0.004608154296875,
-0.0244293212890625,
0.00826263427734375,
-0.0654296875,
-0.0010194778442382812,
-0.0245361328125,
-0.05975341796875,
-0.0218963623046875,
-0.0178070068359375,
0.07000732421875,
0.045013427734375,
-0.07281494140625,
0.006488800048828125,
0.038848876953125,
-0.00537109375,
0.07659912109375,
0.005847930908203125,
0.0025043487548828125,
0.0038967132568359375,
0.0248260498046875,
0.055023193359375,
-0.01273345947265625,
-0.02239990234375,
-0.019927978515625,
-0.00473785400390625,
-0.00061798095703125,
-0.01148223876953125,
-0.0214996337890625,
-0.0026798248291015625,
-0.0167083740234375,
-0.059356689453125,
-0.06842041015625,
-0.0281219482421875,
-0.023040771484375,
-0.029022216796875,
0.016754150390625,
-0.044647216796875,
-0.018157958984375,
0.00582122802734375,
0.016998291015625,
-0.00528717041015625,
0.0233612060546875,
0.056304931640625,
0.0199432373046875,
-0.01462554931640625,
-0.06964111328125,
0.002857208251953125,
0.0092926025390625,
0.006805419921875,
0.0372314453125,
-0.031005859375,
-0.041717529296875,
0.1185302734375,
-0.0194244384765625,
0.0307159423828125,
0.002201080322265625,
-0.007183074951171875,
0.0303192138671875,
0.000054895877838134766,
0.0095977783203125,
0.07086181640625,
-0.03460693359375,
0.0026798248291015625,
-0.02880859375,
-0.015899658203125,
-0.027191162109375,
0.037322998046875,
-0.041046142578125,
0.07550048828125,
-0.006565093994140625,
-0.050506591796875,
0.0275726318359375,
-0.0289154052734375,
0.012237548828125,
0.031463623046875,
-0.0043487548828125,
0.039215087890625,
0.00438690185546875,
0.0003998279571533203,
-0.006595611572265625,
0.043212890625,
-0.034088134765625,
0.02447509765625,
0.0187530517578125,
-0.01416015625,
-0.0309906005859375,
-0.0178375244140625,
0.074462890625,
-0.010589599609375,
-0.050079345703125,
-0.0038547515869140625,
-0.0198211669921875,
0.0148773193359375,
0.01641845703125,
-0.021759033203125,
0.050994873046875,
0.006908416748046875,
-0.004791259765625,
-0.0198974609375,
-0.07025146484375,
-0.01800537109375,
-0.0506591796875,
0.0164031982421875,
-0.0177154541015625,
-0.00946807861328125,
-0.0260772705078125,
0.036376953125,
-0.01416778564453125,
0.01318359375,
0.00885772705078125,
0.040252685546875,
0.037994384765625,
0.017059326171875,
-0.0041351318359375,
0.0014362335205078125,
-0.0206451416015625,
0.01776123046875,
0.006252288818359375,
-0.007659912109375,
-0.020538330078125,
0.021209716796875,
0.0010213851928710938,
-0.00983428955078125,
-0.00504302978515625,
0.02783203125,
0.01560211181640625,
-0.0406494140625,
-0.01380157470703125,
0.007808685302734375,
0.028472900390625,
-0.0193634033203125,
-0.0154266357421875,
0.01486968994140625,
0.06256103515625,
-0.0027713775634765625,
0.0322265625,
0.018890380859375,
0.03302001953125,
-0.030914306640625,
-0.0027008056640625,
-0.0020160675048828125,
0.0139007568359375,
-0.0179901123046875,
-0.057037353515625,
-0.034881591796875,
-0.011932373046875,
0.044189453125,
-0.026824951171875,
-0.033721923828125,
0.016448974609375,
-0.0018167495727539062,
0.03851318359375,
-0.010589599609375,
-0.03472900390625,
-0.002147674560546875,
0.0202789306640625,
0.01068878173828125,
-0.0016813278198242188,
-0.045440673828125,
-0.005340576171875,
-0.0287017822265625,
-0.00717926025390625,
0.0440673828125,
0.01241302490234375,
-0.0312347412109375,
-0.0194549560546875,
-0.000286102294921875,
0.025726318359375,
0.0018796920776367188,
0.0135955810546875,
0.0024204254150390625,
0.0145416259765625,
-0.0135650634765625,
0.021240234375,
-0.03656005859375,
0.02972412109375,
0.0242156982421875,
-0.0021533966064453125,
0.004383087158203125,
0.0238494873046875,
0.04388427734375,
-0.0149688720703125,
0.012786865234375,
-0.03271484375,
-0.0309906005859375,
0.00003975629806518555,
-0.047027587890625,
0.002803802490234375,
0.024078369140625,
-0.00872039794921875,
0.0311279296875,
-0.04290771484375,
0.0008039474487304688,
-0.026519775390625,
0.04901123046875,
-0.052490234375,
-0.00763702392578125,
0.00711822509765625,
-0.016815185546875,
0.0179443359375,
-0.0083465576171875,
-0.0133514404296875,
0.0499267578125,
-0.009368896484375,
0.041229248046875,
-0.00487518310546875,
0.01004791259765625,
0.034576416015625,
0.0546875,
0.0028057098388671875,
0.059600830078125,
0.037445068359375,
0.043182373046875,
0.0187225341796875,
0.046966552734375,
0.016754150390625,
-0.047943115234375,
0.002353668212890625,
-0.00772857666015625,
-0.02294921875,
-0.0272674560546875,
-0.029296875,
0.0166473388671875,
-0.0276336669921875,
0.031829833984375,
-0.01071929931640625,
0.0252838134765625,
0.0159454345703125,
-0.0094757080078125,
0.04058837890625,
-0.01357269287109375,
0.005542755126953125,
-0.0207977294921875,
0.05401611328125,
-0.0236968994140625,
-0.008270263671875,
0.01404571533203125,
-0.01025390625,
-0.01580810546875,
-0.0145721435546875,
0.029510498046875,
0.02276611328125,
0.00879669189453125,
0.018798828125,
-0.006580352783203125,
0.010528564453125,
0.01148223876953125,
0.0282135009765625,
0.016265869140625,
-0.03460693359375,
-0.027069091796875,
0.03271484375,
-0.00588226318359375,
-0.029876708984375,
0.007785797119140625,
0.008148193359375,
0.01338958740234375,
0.05523681640625,
-0.03472900390625,
0.02239990234375,
0.0257568359375,
0.0004105567932128906,
0.0170135498046875,
-0.049285888671875,
-0.00983428955078125,
0.07928466796875,
-0.0606689453125,
0.020111083984375,
0.0281982421875,
-0.00682830810546875,
0.0028095245361328125,
0.0127410888671875,
0.044342041015625,
-0.0161285400390625,
-0.010650634765625,
0.05145263671875,
-0.00885009765625,
-0.04876708984375,
-0.0254669189453125,
0.0012722015380859375,
-0.04986572265625,
0.0009398460388183594,
0.00238800048828125,
0.016754150390625,
0.01383209228515625,
0.005950927734375,
-0.03375244140625,
0.09600830078125,
0.0185394287109375,
-0.01108551025390625,
0.00363922119140625,
0.04833984375,
-0.037628173828125,
0.03570556640625,
-0.0032138824462890625,
0.04180908203125,
-0.011322021484375,
-0.0291748046875,
-0.01265716552734375,
0.0106658935546875,
-0.0241851806640625,
-0.005893707275390625,
0.00675201416015625,
0.01129150390625,
-0.0176849365234375,
-0.01207733154296875,
-0.0355224609375,
-0.031768798828125,
-0.046173095703125,
0.061676025390625,
0.0161895751953125,
0.0030059814453125,
0.07769775390625,
-0.00960540771484375,
0.035919189453125,
-0.006832122802734375,
0.051361083984375,
0.0308074951171875,
-0.0032501220703125,
-0.0074005126953125,
-0.0068359375,
0.040496826171875,
0.0027370452880859375,
-0.0117034912109375,
0.002239227294921875,
-0.0085296630859375,
0.01611328125,
0.0205078125,
0.0216522216796875,
0.02227783203125,
0.004779815673828125,
-0.01345062255859375,
0.032440185546875,
0.00982666015625,
0.01861572265625,
0.034423828125,
0.01421356201171875,
0.0670166015625,
-0.0196685791015625,
0.00732421875,
0.00860595703125,
-0.01171112060546875,
0.06634521484375,
0.035675048828125,
0.033233642578125,
-0.04058837890625,
-0.03143310546875,
0.030914306640625,
0.0860595703125,
-0.045806884765625,
-0.03570556640625,
-0.00438690185546875,
0.0221099853515625,
0.055419921875,
0.0132904052734375,
0.0755615234375,
0.036224365234375,
0.039398193359375,
-0.0201568603515625,
0.0255584716796875,
0.043121337890625,
0.0184173583984375,
0.017486572265625,
0.04364013671875,
-0.09039306640625,
0.01259613037109375,
0.0083160400390625,
-0.0271148681640625,
-0.03509521484375,
0.03948974609375,
0.042572021484375,
0.00305938720703125,
-0.0499267578125,
-0.013641357421875,
0.021820068359375,
0.023681640625,
-0.00333404541015625,
-0.043609619140625,
0.0185394287109375,
-0.055419921875,
0.02374267578125,
0.00919342041015625,
0.0096435546875,
0.01041412353515625,
0.020355224609375,
-0.015045166015625,
-0.051025390625,
-0.0012187957763671875,
0.041290283203125,
-0.026947021484375,
-0.0172576904296875,
-0.0229949951171875,
-0.04437255859375,
-0.01314544677734375,
-0.03826904296875,
0.01303863525390625,
-0.0182952880859375,
0.00608062744140625,
-0.01285552978515625,
-0.006023406982421875,
-0.001789093017578125,
-0.0261383056640625,
0.06451416015625,
-0.0078277587890625,
0.03448486328125,
-0.005275726318359375,
-0.0589599609375,
-0.006618499755859375,
-0.0264739990234375,
0.01013946533203125,
0.01161956787109375,
0.024169921875,
-0.0099639892578125,
0.0543212890625,
0.0140228271484375,
-0.044830322265625,
0.037261962890625,
0.0117340087890625,
0.000385284423828125,
-0.00772857666015625,
0.016510009765625,
-0.0194854736328125,
-0.062286376953125,
-0.045684814453125,
-0.040557861328125,
0.047943115234375,
0.0140380859375,
0.082763671875,
-0.01885986328125,
0.01224517822265625,
0.016693115234375,
-0.06951904296875,
0.06842041015625,
0.034698486328125,
-0.0192108154296875,
0.0298614501953125,
-0.0169830322265625,
-0.0203857421875,
-0.06280517578125,
0.022003173828125,
0.034942626953125,
0.0109710693359375,
0.059051513671875,
-0.031829833984375,
0.014129638671875,
-0.031494140625,
0.0216217041015625,
-0.041717529296875,
-0.0440673828125,
-0.038482666015625,
0.00426483154296875,
-0.0098876953125,
-0.01015472412109375,
-0.0175933837890625,
0.03790283203125,
-0.036407470703125,
0.01439666748046875,
-0.0253448486328125,
-0.01212310791015625,
-0.05780029296875,
0.0176239013671875,
-0.0304718017578125,
0.02142333984375,
-0.032501220703125,
-0.03607177734375,
0.0055084228515625,
-0.016998291015625,
-0.00772857666015625,
-0.032501220703125,
0.013458251953125,
-0.040252685546875,
-0.02728271484375,
-0.013916015625,
-0.0098724365234375,
-0.01287078857421875,
-0.016845703125,
-0.007442474365234375,
-0.0164947509765625,
-0.00453948974609375,
-0.018310546875,
-0.06658935546875,
0.0146331787109375,
0.003940582275390625,
-0.0150604248046875,
-0.0003981590270996094,
0.004535675048828125,
0.00220489501953125,
0.0089111328125,
0.004253387451171875,
-0.0389404296875,
0.0343017578125,
-0.0235443115234375,
0.002971649169921875,
-0.01174163818359375,
-0.00438690185546875,
-0.01522064208984375,
-0.0014200210571289062,
-0.0101470947265625,
-0.03173828125,
-0.037261962890625,
0.052459716796875,
-0.01025390625,
0.01910400390625,
0.04937744140625,
-0.020721435546875,
-0.0312042236328125,
0.009429931640625,
0.012451171875,
0.0618896484375,
-0.032318115234375,
0.0290374755859375,
0.0413818359375,
0.0177001953125,
-0.06304931640625,
-0.0826416015625,
0.011749267578125,
-0.034027099609375,
0.0171661376953125,
-0.005680084228515625,
0.00838470458984375,
0.024749755859375,
-0.0255279541015625,
-0.046112060546875,
0.0611572265625,
-0.0066070556640625,
-0.020477294921875,
-0.09124755859375,
-0.03729248046875,
0.0164794921875,
0.01302337646484375,
-0.042449951171875,
0.0089263916015625,
-0.08984375,
0.03790283203125,
0.01282501220703125,
0.00431060791015625,
-0.00914764404296875,
-0.0097503662109375,
-0.0305328369140625,
0.050628662109375,
0.050384521484375,
0.0236053466796875,
-0.032562255859375,
0.0142059326171875,
0.0221710205078125,
0.04754638671875,
-0.0015745162963867188,
0.057952880859375,
0.03253173828125,
-0.007061004638671875,
-0.022216796875,
-0.03350830078125,
-0.017669677734375,
0.029296875,
0.096923828125,
0.0711669921875,
0.0214080810546875,
-0.07513427734375,
0.0225372314453125,
0.0208282470703125,
-0.0145111083984375,
-0.0175933837890625,
0.018951416015625,
-0.046478271484375,
-0.0325927734375,
-0.0214691162109375,
0.0290374755859375,
0.03472900390625,
-0.049224853515625,
0.0281219482421875,
-0.0164337158203125,
0.0249176025390625,
-0.003391265869140625,
0.00200653076171875,
0.041046142578125,
-0.0130157470703125,
-0.0258941650390625,
-0.0374755859375,
-0.0006251335144042969,
-0.00899505615234375,
-0.035003662109375,
-0.0322265625,
-0.015716552734375,
0.0028705596923828125,
-0.0274505615234375,
0.017578125,
-0.01059722900390625,
0.030914306640625,
-0.033447265625,
-0.0131072998046875,
-0.00778961181640625,
0.01238250732421875,
0.01375579833984375,
0.019744873046875,
0.001346588134765625,
-0.0100250244140625,
0.0041961669921875,
-0.0154876708984375,
-0.021209716796875,
0.012969970703125,
0.0134124755859375,
-0.01081085205078125,
-0.047637939453125,
0.0196075439453125,
-0.0024394989013671875,
-0.02325439453125,
0.017303466796875,
0.0031452178955078125,
0.0250701904296875,
-0.0099945068359375,
0.0293731689453125,
-0.0088653564453125,
-0.00809478759765625,
0.01325225830078125
]
|
ad1cfad8ce3c9deae6fc8947353dc0eed5eba51f | Wordpress Stackexchange
Q: How to trigger WooCommerce order complete email? I want to be able to trigger the WooCommerce order complete email at a different stage in the WooCommerce checkout process. So I've disabled WooCommerce order complete email from the backend and am now looking for a line of code that will trigger the email at the point that I want. I've done a bit of research and I've found how to remove the order complete email but not how to trigger it manually. Any tips?
Thanks!
A: Rather than looping or reusing the same object as suggested by @Sumit.
You can initiate a new object and then call the trigger.
$email_oc = new WC_Email_Customer_Completed_Order();
$email_oc->trigger($order_id);
| Q: How to trigger WooCommerce order complete email? I want to be able to trigger the WooCommerce order complete email at a different stage in the WooCommerce checkout process. So I've disabled WooCommerce order complete email from the backend and am now looking for a line of code that will trigger the email at the point that I want. I've done a bit of research and I've found how to remove the order complete email but not how to trigger it manually. Any tips?
Thanks!
A: Rather than looping or reusing the same object as suggested by @Sumit.
You can initiate a new object and then call the trigger.
$email_oc = new WC_Email_Customer_Completed_Order();
$email_oc->trigger($order_id);
A: You can try this
$mailer = WC()->mailer();
$mails = $mailer->get_emails();
if ( ! empty( $mails ) ) {
foreach ( $mails as $mail ) {
if ( $mail->id == 'customer_completed_order' ) {
$mail->trigger( $order->id );
}
}
}
A: It can also be used like that;
WC()->mailer()->emails['WC_Email_Customer_Completed_Order']->trigger( $order_id );
| wordpress | {
"language": "en",
"length": 164,
"provenance": "stackexchange_00019.jsonl.gz:454786",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/184637"
} | [
0.06915283203125,
-0.0171661376953125,
0.00606536865234375,
-0.06640625,
0.01107025146484375,
-0.01334381103515625,
0.0083770751953125,
-0.00846099853515625,
0.008270263671875,
0.034576416015625,
-0.0084075927734375,
-0.010986328125,
0.05889892578125,
-0.0255126953125,
0.0077972412109375,
0.0005459785461425781,
0.04046630859375,
-0.01338958740234375,
0.028564453125,
0.009368896484375,
-0.0175018310546875,
0.04730224609375,
0.0128936767578125,
0.05755615234375,
-0.0276947021484375,
0.06671142578125,
0.11669921875,
-0.04052734375,
0.0155792236328125,
-0.0028057098388671875,
0.01496124267578125,
-0.057098388671875,
0.0272216796875,
0.037078857421875,
-0.0589599609375,
0.00206756591796875,
-0.036407470703125,
0.0147705078125,
-0.01221466064453125,
0.01332855224609375,
0.0400390625,
-0.03302001953125,
-0.00330352783203125,
0.008087158203125,
-0.005031585693359375,
-0.0321044921875,
0.030609130859375,
-0.038299560546875,
0.03936767578125,
0.039581298828125,
-0.0222625732421875,
0.05853271484375,
-0.033660888671875,
-0.0421142578125,
0.0123138427734375,
-0.011077880859375,
-0.06494140625,
0.044769287109375,
0.00821685791015625,
0.0384521484375,
0.018768310546875,
0.024505615234375,
-0.00792694091796875,
-0.0231781005859375,
0.013702392578125,
-0.002452850341796875,
-0.029937744140625,
0.030517578125,
-0.0052947998046875,
0.0033855438232421875,
0.003849029541015625,
-0.02203369140625,
-0.0134124755859375,
0.00020551681518554688,
0.00318145751953125,
-0.00908660888671875,
0.006328582763671875,
-0.01163482666015625,
0.0204925537109375,
0.038330078125,
0.043304443359375,
0.0289306640625,
-0.04901123046875,
-0.00940704345703125,
0.02178955078125,
-0.00350189208984375,
0.006450653076171875,
-0.0271759033203125,
-0.0390625,
-0.0330810546875,
-0.039703369140625,
0.02423095703125,
-0.05352783203125,
-0.0288238525390625,
-0.0352783203125,
-0.01593017578125,
0.0206146240234375,
0.0012454986572265625,
-0.0014486312866210938,
-0.0284271240234375,
0.0225677490234375,
-0.030364990234375,
-0.015106201171875,
0.0006780624389648438,
-0.026275634765625,
-0.0036411285400390625,
0.00323486328125,
0.033843994140625,
0.017120361328125,
0.034515380859375,
-0.01053619384765625,
-0.0188446044921875,
-0.01873779296875,
-0.0096282958984375,
-0.0031795501708984375,
-0.007030487060546875,
-0.06561279296875,
0.051116943359375,
-0.0004432201385498047,
0.0181121826171875,
0.01506805419921875,
0.026153564453125,
0.0259552001953125,
-0.0269012451171875,
-0.0291900634765625,
-0.0236358642578125,
-0.0173187255859375,
-0.05535888671875,
0.0113067626953125,
-0.0160064697265625,
-0.05401611328125,
0.024688720703125,
0.0867919921875,
0.04559326171875,
0.027099609375,
-0.004032135009765625,
0.004383087158203125,
0.06976318359375,
0.035400390625,
-0.062255859375,
0.061981201171875,
-0.0007600784301757812,
-0.02679443359375,
0.056854248046875,
0.007442474365234375,
0.00728607177734375,
0.0020008087158203125,
0.0155487060546875,
0.025146484375,
0.048614501953125,
-0.05084228515625,
0.0024242401123046875,
0.03497314453125,
0.00205230712890625,
-0.016937255859375,
0.01702880859375,
-0.003864288330078125,
-0.0019292831420898438,
-0.0263519287109375,
-0.0232086181640625,
-0.0227813720703125,
-0.029083251953125,
-0.004566192626953125,
-0.02984619140625,
-0.0498046875,
0.04522705078125,
-0.00783538818359375,
-0.0041046142578125,
0.0408935546875,
0.0023555755615234375,
0.021148681640625,
-0.00000852346420288086,
0.041778564453125,
0.035552978515625,
0.01715087890625,
0.024688720703125,
0.03515625,
-0.0203399658203125,
0.0195770263671875,
0.020782470703125,
-0.048004150390625,
-0.039276123046875,
0.051971435546875,
-0.04583740234375,
-0.020416259765625,
0.0036830902099609375,
0.017547607421875,
0.020782470703125,
-0.0057525634765625,
0.0156707763671875,
0.025360107421875,
0.0251617431640625,
-0.0129241943359375,
0.007282257080078125,
-0.031585693359375,
-0.014617919921875,
-0.008148193359375,
0.009857177734375,
-0.0155487060546875,
0.015838623046875,
0.024658203125,
-0.0135345458984375,
0.0193634033203125,
-0.016571044921875,
-0.01290130615234375,
-0.00640869140625,
-0.0114288330078125,
0.015655517578125,
-0.04290771484375,
-0.02490234375,
0.039093017578125,
-0.0107269287109375,
-0.01529693603515625,
-0.03680419921875,
-0.016754150390625,
-0.0009055137634277344,
-0.0469970703125,
0.10845947265625,
-0.0228271484375,
0.0899658203125,
-0.05474853515625,
-0.07781982421875,
-0.006252288818359375,
-0.0182952880859375,
0.028961181640625,
0.00908660888671875,
-0.0078125,
-0.0028533935546875,
0.034698486328125,
0.0164642333984375,
-0.0081024169921875,
-0.0035400390625,
0.037200927734375,
-0.0037326812744140625,
-0.04779052734375,
0.0008234977722167969,
-0.00872802734375,
-0.060272216796875,
-0.01071929931640625,
0.05841064453125,
0.028778076171875,
0.0017337799072265625,
-0.006397247314453125,
0.01363372802734375,
0.036285400390625,
-0.00792694091796875,
0.0175323486328125,
-0.0125579833984375,
0.00852203369140625,
0.033172607421875,
-0.0435791015625,
0.00908660888671875,
0.028228759765625,
0.01219940185546875,
-0.02459716796875,
0.0672607421875,
0.0231781005859375,
-0.0248260498046875,
-0.02056884765625,
0.0283355712890625,
0.0032558441162109375,
-0.03631591796875,
-0.041229248046875,
-0.006450653076171875,
0.01540374755859375,
0.03314208984375,
0.032073974609375,
0.0204010009765625,
-0.0208892822265625,
0.016998291015625,
0.0024509429931640625,
-0.039276123046875,
0.01236724853515625,
0.055755615234375,
-0.024566650390625,
-0.0030803680419921875,
-0.0118255615234375,
-0.011627197265625,
0.0066680908203125,
0.01885986328125,
-0.0302734375,
-0.037261962890625,
-0.00634002685546875,
-0.007137298583984375,
0.040740966796875,
-0.0242462158203125,
0.0192413330078125,
-0.03082275390625,
-0.0095672607421875,
-0.00826263427734375,
0.005523681640625,
0.03131103515625,
-0.023681640625,
0.035369873046875,
-0.038543701171875,
-0.01166534423828125,
0.00016176700592041016,
0.00811767578125,
0.028289794921875,
-0.035064697265625,
0.01522064208984375,
0.0399169921875,
-0.0189361572265625,
0.0031280517578125,
0.0204925537109375,
-0.0396728515625,
0.02239990234375,
0.0020904541015625,
0.00632476806640625,
0.0053558349609375,
-0.0312042236328125,
0.05401611328125,
0.0260009765625,
0.08258056640625,
-0.01148223876953125,
-0.0465087890625,
0.0206298828125,
0.03472900390625,
-0.007167816162109375,
-0.0557861328125,
0.006679534912109375,
-0.01030731201171875,
0.001476287841796875,
-0.01446533203125,
0.012176513671875,
-0.0171051025390625,
-0.0172271728515625,
0.0036525726318359375,
-0.004547119140625,
-0.0295257568359375,
-0.023895263671875,
-0.040496826171875,
-0.0253753662109375,
0.006893157958984375,
0.0014123916625976562,
-0.00801849365234375,
0.0004696846008300781,
0.07489013671875,
-0.01253509521484375,
-0.04437255859375,
-0.0290679931640625,
-0.01171112060546875,
-0.000614166259765625,
0.00345611572265625,
-0.024139404296875,
-0.00948333740234375,
0.024932861328125,
-0.00638580322265625,
-0.01412200927734375,
-0.0033893585205078125,
0.0247955322265625,
-0.0261688232421875,
0.0253448486328125,
0.0248870849609375,
0.0246734619140625,
-0.00768280029296875,
-0.02752685546875,
-0.003875732421875,
-0.01016998291015625,
-0.05291748046875,
0.0038604736328125,
-0.01004791259765625,
-0.01971435546875,
-0.0198516845703125,
-0.0016736984252929688,
0.001316070556640625,
-0.022125244140625,
0.026947021484375,
0.0300750732421875,
-0.0059051513671875,
0.01013946533203125,
-0.02850341796875,
-0.0076446533203125,
0.011199951171875,
0.03564453125,
-0.019012451171875,
0.06689453125,
0.00530242919921875,
-0.0394287109375,
0.006305694580078125,
0.0091705322265625,
-0.032135009765625,
0.00714111328125,
-0.09375,
-0.039581298828125,
0.040130615234375,
-0.0289764404296875,
0.0038604736328125,
-0.019989013671875,
-0.0237579345703125,
0.01399993896484375,
0.09600830078125,
0.031280517578125,
-0.0253448486328125,
0.0016832351684570312,
-0.0008039474487304688,
-0.0245513916015625,
0.00672149658203125,
-0.014862060546875,
-0.004150390625,
-0.047454833984375,
0.03240966796875,
0.0007710456848144531,
-0.00765228271484375,
0.005512237548828125,
-0.067138671875,
-0.007068634033203125,
-0.05133056640625,
0.023406982421875,
-0.0225067138671875,
0.00844573974609375,
0.054901123046875,
-0.0311279296875,
0.03839111328125,
-0.028289794921875,
-0.037139892578125,
-0.0110321044921875,
0.001422882080078125,
-0.0142974853515625,
-0.0106658935546875,
-0.0091400146484375,
0.03265380859375,
-0.04815673828125,
-0.017425537109375,
-0.016845703125,
0.036956787109375,
-0.01076507568359375,
0.0169830322265625,
0.00585174560546875,
-0.0013332366943359375,
0.01018524169921875,
-0.01318359375,
-0.0087890625,
0.01464080810546875,
-0.0382080078125,
0.034393310546875,
-0.005710601806640625,
0.01012420654296875,
0.0421142578125,
-0.05194091796875,
-0.09423828125,
-0.05303955078125,
-0.06512451171875,
-0.02386474609375,
-0.01107025146484375,
-0.03564453125,
-0.042327880859375,
-0.09136962890625,
0.032318115234375,
-0.038848876953125,
-0.01560211181640625,
0.0008931159973144531,
0.0194854736328125,
0.022552490234375,
-0.01467132568359375,
0.0244903564453125,
0.02947998046875,
0.0526123046875,
0.05230712890625,
-0.03314208984375,
-0.0183258056640625,
-0.0286407470703125,
-0.0143280029296875,
0.0357666015625,
-0.00870513916015625,
-0.00750732421875,
0.0657958984375,
-0.00453948974609375,
-0.020263671875,
0.01235198974609375,
-0.03143310546875,
-0.005340576171875,
0.024261474609375,
-0.01085662841796875,
-0.032135009765625,
0.0193939208984375,
0.05059814453125,
-0.042144775390625,
0.032135009765625,
-0.0194091796875,
-0.047760009765625,
0.0083465576171875,
0.044952392578125,
-0.0032939910888671875,
0.01096343994140625,
0.00553131103515625,
0.0106201171875,
-0.0012645721435546875,
0.0196685791015625,
-0.00827789306640625,
-0.0215301513671875,
-0.0182952880859375,
0.018310546875,
0.0261993408203125,
0.007320404052734375,
0.0109100341796875,
0.0009918212890625,
0.00926971435546875,
0.01202392578125,
-0.01131439208984375,
-0.048583984375,
-0.01018524169921875,
-0.0189208984375,
-0.02301025390625,
-0.09820556640625,
0.05810546875,
0.08477783203125,
-0.0015745162963867188,
0.0288543701171875,
-0.105224609375,
0.021148681640625,
-0.06549072265625,
-0.00024247169494628906,
0.0039215087890625,
-0.004047393798828125,
0.01421356201171875,
0.06622314453125,
0.035736083984375,
0.0294189453125,
-0.024139404296875,
0.03131103515625,
0.0223846435546875,
0.0252532958984375,
0.02239990234375,
-0.0007343292236328125,
-0.0209808349609375,
0.00028967857360839844,
-0.01213836669921875,
-0.02740478515625,
-0.01131439208984375,
0.015533447265625,
0.017822265625,
-0.0006384849548339844,
-0.005138397216796875,
0.0196685791015625,
-0.005161285400390625,
-0.025634765625,
0.0288848876953125,
0.0294647216796875,
0.00890350341796875,
-0.0435791015625,
-0.032928466796875,
0.02001953125,
0.0278778076171875,
-0.032135009765625,
0.06475830078125,
-0.037933349609375,
0.031005859375,
0.02313232421875,
0.0043182373046875,
-0.017059326171875,
-0.0135040283203125,
-0.0008306503295898438,
-0.027069091796875,
0.00982666015625,
-0.052734375,
0.014556884765625,
-0.0212249755859375,
-0.001255035400390625,
0.0347900390625,
-0.01219940185546875,
0.0238189697265625,
-0.0185089111328125,
-0.0009627342224121094,
-0.046234130859375,
-0.0004088878631591797,
0.044403076171875,
0.030548095703125,
-0.028411865234375,
0.00510406494140625,
-0.055145263671875,
-0.0292816162109375,
-0.027862548828125,
-0.0312042236328125,
-0.0294036865234375,
0.00922393798828125,
0.0198211669921875,
0.0287017822265625,
-0.022430419921875,
-0.056671142578125,
-0.0252838134765625,
-0.007354736328125,
0.0465087890625,
0.0227508544921875,
0.0172882080078125,
0.039886474609375,
-0.0274200439453125,
0.050506591796875,
0.00852203369140625,
-0.009674072265625,
-0.057281494140625,
-0.005802154541015625,
-0.008056640625,
-0.00928497314453125,
0.00099945068359375,
-0.00023353099822998047,
-0.013214111328125,
-0.01517486572265625,
0.038665771484375,
-0.0162811279296875,
0.01105499267578125,
-0.026092529296875,
0.005657196044921875,
-0.0231170654296875,
0.0256805419921875,
-0.035980224609375,
-0.018646240234375,
0.01123046875,
-0.049163818359375,
0.006244659423828125,
0.041595458984375,
0.036651611328125,
0.00865936279296875,
-0.048309326171875,
0.0192413330078125,
0.0232086181640625,
-0.033477783203125,
0.03704833984375,
0.03533935546875,
-0.001674652099609375,
0.0184478759765625,
-0.018829345703125,
-0.00006663799285888672,
0.0017805099487304688,
0.062744140625,
-0.0062103271484375,
-0.07000732421875,
0.04437255859375,
0.0190887451171875,
-0.0195770263671875,
0.0300140380859375,
-0.024444580078125,
0.06927490234375,
0.05755615234375,
0.103271484375,
-0.10406494140625,
0.030487060546875,
0.0352783203125,
-0.0255126953125,
0.041595458984375,
-0.0129852294921875,
-0.0032825469970703125,
-0.04718017578125,
0.059722900390625,
-0.006031036376953125,
-0.004100799560546875,
0.02197265625,
-0.0190582275390625,
-0.006256103515625,
0.0006690025329589844,
0.01050567626953125,
0.00669097900390625,
-0.057952880859375,
-0.0062255859375,
0.047119140625,
-0.042510986328125,
-0.034881591796875,
0.04608154296875,
-0.0088958740234375,
0.0218963623046875,
0.00997161865234375,
0.07012939453125,
0.00655364990234375,
0.0224151611328125,
0.02923583984375,
-0.0234527587890625,
-0.00835418701171875,
0.0357666015625,
-0.0198822021484375,
-0.01525115966796875,
0.008758544921875,
-0.04638671875,
-0.0496826171875,
-0.0266265869140625,
0.0185699462890625,
0.060821533203125,
-0.06842041015625,
0.0298614501953125,
-0.037078857421875,
0.0233917236328125,
0.0193023681640625,
0.046173095703125,
0.017608642578125,
-0.00469207763671875,
-0.02978515625,
0.040008544921875,
0.0156402587890625,
-0.00977325439453125,
-0.0148468017578125,
0.025238037109375,
-0.0029010772705078125,
0.044769287109375,
-0.01377105712890625,
0.0169525146484375,
-0.04779052734375,
-0.041046142578125,
-0.06939697265625,
0.09539794921875,
0.002346038818359375,
0.0236358642578125,
0.006317138671875,
0.032379150390625,
-0.0287628173828125,
-0.0003418922424316406,
-0.053192138671875,
0.047943115234375,
-0.033599853515625,
0.0750732421875,
-0.05999755859375,
0.004543304443359375,
0.01715087890625,
0.010101318359375,
0.01849365234375,
0.0017042160034179688,
-0.011444091796875,
-0.01399993896484375,
0.036285400390625,
0.0311737060546875,
0.006866455078125,
0.01194000244140625,
0.004425048828125,
-0.0028533935546875,
0.04248046875,
-0.03338623046875,
0.0137786865234375,
-0.01421356201171875,
0.005313873291015625,
0.010467529296875,
-0.015472412109375,
-0.032928466796875,
-0.0005497932434082031,
0.0208282470703125,
0.00177001953125,
-0.01169586181640625,
-0.0007739067077636719,
-0.048187255859375,
0.032440185546875,
0.0079345703125,
0.030731201171875,
0.011383056640625,
0.04522705078125,
-0.01525115966796875,
0.060943603515625,
0.01287841796875,
0.002239227294921875,
0.0140380859375,
0.0039043426513671875,
0.05145263671875,
-0.0302581787109375,
-0.00681304931640625,
-0.00861358642578125,
-0.0016775131225585938,
0.0004968643188476562,
-0.024200439453125,
-0.00582122802734375,
-0.050201416015625,
0.006160736083984375,
0.01126861572265625,
-0.0113983154296875,
-0.007541656494140625,
0.043609619140625,
0.01256561279296875,
-0.0011930465698242188,
0.0062255859375,
-0.08428955078125,
0.007389068603515625,
-0.0909423828125,
-0.0936279296875,
-0.0117034912109375,
0.0009369850158691406,
0.02374267578125,
0.0281524658203125,
0.0089111328125,
0.042266845703125,
-0.07080078125,
-0.024505615234375,
0.004398345947265625,
0.038177490234375,
0.02294921875,
-0.0036945343017578125,
-0.0579833984375,
0.053802490234375,
-0.0251007080078125,
0.0280914306640625,
0.0109710693359375,
0.0211944580078125,
0.020263671875,
-0.037322998046875,
0.0240325927734375,
0.0038204193115234375,
0.01018524169921875,
0.0109100341796875,
0.016693115234375,
0.0141448974609375,
0.03466796875,
0.030487060546875,
-0.011962890625,
-0.006305694580078125,
0.0251007080078125,
-0.021759033203125,
-0.019256591796875,
-0.014251708984375,
-0.0192108154296875,
0.01556396484375,
-0.004787445068359375,
0.00972747802734375,
0.0177764892578125,
0.006229400634765625,
-0.01332855224609375,
0.01953125,
0.0012617111206054688,
-0.0295867919921875,
0.037200927734375,
0.0037784576416015625,
0.0714111328125,
0.0161895751953125,
-0.0665283203125,
-0.0423583984375,
-0.0084991455078125,
0.049468994140625,
-0.0009899139404296875,
0.0236663818359375,
0.01457977294921875,
0.034820556640625,
0.007099151611328125,
-0.0257720947265625,
0.0214691162109375,
0.0107269287109375,
-0.0166473388671875,
-0.032867431640625,
0.01128387451171875,
-0.032196044921875,
-0.057220458984375,
-0.03131103515625,
-0.00777435302734375,
0.021240234375,
0.032684326171875,
0.00685882568359375,
0.034759521484375,
0.027618408203125,
0.003543853759765625,
0.00856781005859375,
-0.01224517822265625,
-0.01800537109375,
0.015625,
-0.040618896484375,
-0.029998779296875,
0.0163421630859375,
-0.034576416015625,
0.00498199462890625,
0.04425048828125,
-0.0227203369140625,
0.018402099609375,
-0.0209808349609375,
0.0193634033203125,
-0.0120697021484375,
0.0411376953125,
-0.029632568359375,
-0.035888671875,
-0.0181884765625,
-0.01363372802734375,
-0.0068359375,
-0.0034332275390625,
0.0169219970703125,
0.0013513565063476562,
-0.0080413818359375,
-0.0306549072265625,
0.034423828125,
-0.016326904296875,
0.05340576171875,
0.0347900390625,
-0.0231781005859375,
0.008026123046875,
-0.0026950836181640625,
-0.018829345703125,
0.01068115234375,
0.004184722900390625,
-0.01511383056640625,
0.0214996337890625,
-0.0843505859375,
0.02545166015625,
0.0369873046875,
0.041168212890625,
-0.0151824951171875,
0.0061187744140625,
0.0281219482421875,
-0.0124359130859375,
0.01348876953125,
-0.018402099609375,
-0.027252197265625,
-0.018768310546875,
0.008819580078125,
-0.00565338134765625,
0.0418701171875,
-0.0171051025390625,
0.06707763671875,
0.0019817352294921875,
0.0129547119140625,
0.004230499267578125,
-0.0391845703125,
0.017974853515625,
-0.01030731201171875,
0.01934814453125,
-0.0069427490234375,
-0.01132965087890625,
0.0114593505859375,
0.0295867919921875,
-0.0245819091796875,
-0.034088134765625,
-0.04278564453125,
0.0183563232421875,
-0.04693603515625,
-0.006633758544921875,
0.057861328125,
-0.01413726806640625,
-0.088623046875,
-0.03900146484375,
-0.0100250244140625,
0.00678253173828125,
-0.0059356689453125,
-0.04913330078125,
-0.0302581787109375,
0.0102386474609375,
0.025787353515625,
-0.05267333984375,
0.01149749755859375,
-0.08294677734375,
-0.002910614013671875,
-0.02520751953125,
0.00890350341796875,
0.030303955078125,
-0.0435791015625,
-0.08001708984375,
0.007366180419921875,
-0.002025604248046875,
-0.0255126953125,
-0.03369140625,
-0.010223388671875,
0.005466461181640625,
0.0017375946044921875,
-0.0219879150390625,
-0.0027904510498046875,
-0.039764404296875,
0.0226593017578125,
0.02008056640625,
0.027374267578125,
0.0089569091796875,
0.01812744140625,
-0.0036716461181640625,
0.038665771484375,
0.026031494140625,
0.01224517822265625,
-0.004962921142578125,
-0.00940704345703125,
0.0235443115234375,
0.03314208984375,
-0.021026611328125,
-0.058074951171875,
0.019317626953125,
-0.0150909423828125,
-0.03143310546875,
-0.018524169921875,
0.025146484375,
0.0333251953125,
0.043609619140625,
0.0487060546875,
-0.00669097900390625,
-0.054168701171875,
-0.004543304443359375,
0.0227508544921875,
0.01271820068359375,
-0.01010894775390625,
-0.005374908447265625,
-0.034027099609375,
-0.0157012939453125,
-0.00942230224609375,
-0.025482177734375,
0.007160186767578125,
-0.0250396728515625,
-0.059478759765625,
0.01554107666015625,
-0.0169219970703125,
0.01447296142578125,
-0.0528564453125,
0.0064239501953125,
0.018341064453125,
-0.0276641845703125,
-0.028564453125,
-0.0093994140625,
0.00885009765625,
-0.032440185546875,
-0.035675048828125,
0.03076171875,
0.0280303955078125,
-0.03350830078125,
0.004245758056640625,
0.0164642333984375,
-0.01513671875,
-0.01288604736328125,
-0.00928497314453125,
-0.00812530517578125,
0.0246734619140625,
-0.005069732666015625,
-0.0099639892578125,
0.00067901611328125,
0.044708251953125,
0.0102386474609375,
0.0777587890625,
-0.002513885498046875,
-0.0286865234375,
-0.03460693359375,
0.06719970703125,
0.0269012451171875,
-0.02728271484375,
0.043304443359375,
-0.01036834716796875,
0.01424407958984375,
0.028533935546875,
0.067626953125,
-0.018280029296875,
0.01143646240234375,
0.020904541015625,
0.033660888671875,
0.016754150390625
]
|
42f90047abf655062647b8ec166371ec40da7226 | Wordpress Stackexchange
Q: How can I delete all inactive widgets? I want to cleanup all inactive widgets. I tried following snippet as suggested by this answer Script to remove all inactive widgets?.
$sidebars_widgets = get_option( 'sidebars_widgets' );
$sidebars_widgets['wp_inactive_widgets'] = array();
update_option( 'sidebars_widgets', $sidebars_widgets );
I also tried deleting option sidebars_widgets directly from the options table.
But after page is refreshed, old value is restored with all inactive widgets. How can I remove all those inactive widgets at once? Thanks in advance.
A: You should do it with after_setup_theme action:
function remove_inactive_widgets() {
$sidebars_widgets = get_option( 'sidebars_widgets' );
$sidebars_widgets['wp_inactive_widgets'] = array();
update_option( 'sidebars_widgets', $sidebars_widgets );
}
add_action( 'after_setup_theme', 'remove_inactive_widgets' );
| Q: How can I delete all inactive widgets? I want to cleanup all inactive widgets. I tried following snippet as suggested by this answer Script to remove all inactive widgets?.
$sidebars_widgets = get_option( 'sidebars_widgets' );
$sidebars_widgets['wp_inactive_widgets'] = array();
update_option( 'sidebars_widgets', $sidebars_widgets );
I also tried deleting option sidebars_widgets directly from the options table.
But after page is refreshed, old value is restored with all inactive widgets. How can I remove all those inactive widgets at once? Thanks in advance.
A: You should do it with after_setup_theme action:
function remove_inactive_widgets() {
$sidebars_widgets = get_option( 'sidebars_widgets' );
$sidebars_widgets['wp_inactive_widgets'] = array();
update_option( 'sidebars_widgets', $sidebars_widgets );
}
add_action( 'after_setup_theme', 'remove_inactive_widgets' );
A: Widget customizations are saved in the widget itself. So in addition to deleting the sidebars_widgets, you have to delete the custom data in the widget as well.
$sidebars_widgets = get_option('sidebars_widgets');
foreach ($sidebars_widgets as $key => $value) {
foreach ($value as $widget_id) {
$pieces = explode('-', $widget_id);
$multi_number = array_pop($pieces);
$id_base = implode('-', $pieces);
$widget = get_option('widget_' . $id_base);
//Here it deletes the widget customizations that are linked to an id
unset($widget[$multi_number]);
update_option('widget_' . $id_base, $widget);
}
//Here it erases all the page's widget. Set ampty array.
$sidebars_widgets[$key] = array();
}
update_option('sidebars_widgets', $sidebars_widgets);
| wordpress | {
"language": "en",
"length": 200,
"provenance": "stackexchange_00019.jsonl.gz:454820",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/184761"
} | [
0.036285400390625,
-0.006877899169921875,
0.01410675048828125,
-0.00585174560546875,
0.0277557373046875,
-0.040679931640625,
0.07666015625,
-0.0253448486328125,
0.03900146484375,
0.061065673828125,
0.0034923553466796875,
-0.027984619140625,
0.0200347900390625,
-0.0160675048828125,
-0.07427978515625,
-0.000476837158203125,
0.036895751953125,
0.0013942718505859375,
0.035736083984375,
0.0037860870361328125,
-0.0022754669189453125,
0.034027099609375,
0.00826263427734375,
0.052154541015625,
-0.0158233642578125,
-0.025909423828125,
0.07257080078125,
-0.021270751953125,
-0.017791748046875,
-0.059539794921875,
0.00885009765625,
0.061614990234375,
0.0013875961303710938,
0.004146575927734375,
0.035980224609375,
0.060028076171875,
-0.0226287841796875,
0.029144287109375,
0.046722412109375,
-0.0161285400390625,
0.01983642578125,
-0.010711669921875,
-0.005496978759765625,
-0.028167724609375,
-0.0173492431640625,
0.005458831787109375,
-0.009674072265625,
-0.02752685546875,
0.0311279296875,
-0.023040771484375,
0.01434326171875,
-0.0213165283203125,
0.051788330078125,
-0.07763671875,
-0.04571533203125,
-0.0482177734375,
0.0386962890625,
-0.01258087158203125,
0.052093505859375,
0.004024505615234375,
-0.05755615234375,
-0.006011962890625,
0.0176239013671875,
-0.0694580078125,
-0.007293701171875,
-0.009613037109375,
-0.0006146430969238281,
0.0181121826171875,
-0.044891357421875,
-0.00370025634765625,
0.055999755859375,
-0.035308837890625,
-0.016082763671875,
-0.007503509521484375,
0.007541656494140625,
-0.00366973876953125,
0.020904541015625,
0.021514892578125,
-0.00284576416015625,
0.0170745849609375,
0.06298828125,
0.04779052734375,
-0.026275634765625,
0.00934600830078125,
0.014373779296875,
0.0165252685546875,
0.00919342041015625,
-0.04931640625,
-0.03387451171875,
-0.01097869873046875,
-0.01126861572265625,
-0.059112548828125,
-0.0018482208251953125,
-0.022491455078125,
-0.00927734375,
-0.03955078125,
0.040374755859375,
0.044586181640625,
-0.007617950439453125,
0.00955963134765625,
0.006267547607421875,
-0.056549072265625,
0.04119873046875,
-0.05267333984375,
-0.0020751953125,
0.0201263427734375,
-0.0228118896484375,
-0.0106048583984375,
0.019805908203125,
0.05462646484375,
0.0235748291015625,
-0.05291748046875,
0.0166778564453125,
-0.004665374755859375,
-0.054901123046875,
0.0111846923828125,
0.00262451171875,
-0.0101470947265625,
0.00960540771484375,
0.021392822265625,
0.0024871826171875,
0.006237030029296875,
0.00656890869140625,
0.0063323974609375,
0.00862884521484375,
-0.005245208740234375,
-0.037628173828125,
-0.004486083984375,
0.03350830078125,
-0.037994384765625,
-0.055419921875,
0.0281829833984375,
0.06640625,
0.0179443359375,
0.0233154296875,
-0.00882720947265625,
0.049468994140625,
-0.0045166015625,
0.0193023681640625,
0.010101318359375,
0.062255859375,
-0.04254150390625,
-0.051666259765625,
0.05029296875,
0.03765869140625,
0.0269317626953125,
0.022918701171875,
-0.0268402099609375,
0.01184844970703125,
-0.0009622573852539062,
-0.00817108154296875,
-0.023101806640625,
0.0179901123046875,
0.037750244140625,
0.01690673828125,
-0.0012483596801757812,
0.08026123046875,
-0.05828857421875,
-0.01654052734375,
-0.0684814453125,
-0.005889892578125,
-0.01763916015625,
-0.0182647705078125,
-0.01953125,
-0.03125,
0.01107025146484375,
0.016510009765625,
0.0135498046875,
0.01177215576171875,
-0.0072784423828125,
-0.03759765625,
-0.045440673828125,
-0.024139404296875,
0.028411865234375,
0.00933074951171875,
0.08087158203125,
-0.0263519287109375,
-0.0010900497436523438,
0.0234222412109375,
-0.04278564453125,
-0.054168701171875,
-0.0416259765625,
-0.0032901763916015625,
0.0242156982421875,
-0.06927490234375,
0.010040283203125,
0.0029048919677734375,
0.048370361328125,
0.039794921875,
0.0028553009033203125,
0.0311431884765625,
-0.0305938720703125,
-0.01158905029296875,
-0.004962921142578125,
0.039031982421875,
-0.01506805419921875,
-0.07257080078125,
-0.0340576171875,
-0.0015478134155273438,
-0.00836181640625,
0.04400634765625,
-0.01158905029296875,
0.013427734375,
-0.0276336669921875,
-0.09039306640625,
0.01006317138671875,
-0.0309295654296875,
0.035430908203125,
-0.018829345703125,
0.023345947265625,
0.0237274169921875,
-0.00746917724609375,
-0.040008544921875,
0.0308990478515625,
-0.0023632049560546875,
-0.0178680419921875,
0.043182373046875,
0.055389404296875,
0.017730712890625,
0.0011272430419921875,
0.024017333984375,
-0.0274810791015625,
0.027008056640625,
0.04840087890625,
0.0511474609375,
-0.042694091796875,
-0.0004069805145263672,
-0.06036376953125,
0.0106353759765625,
-0.0115203857421875,
-0.0946044921875,
0.075439453125,
-0.0289459228515625,
-0.01263427734375,
-0.02655029296875,
-0.00949859619140625,
-0.00681304931640625,
-0.0164642333984375,
0.0013484954833984375,
0.035736083984375,
0.032867431640625,
0.044647216796875,
-0.0129547119140625,
0.0127716064453125,
0.032501220703125,
-0.0909423828125,
-0.00452423095703125,
0.01224517822265625,
-0.023529052734375,
0.015899658203125,
-0.005237579345703125,
0.01496124267578125,
0.0177764892578125,
-0.0014982223510742188,
-0.01081085205078125,
0.037017822265625,
-0.0113677978515625,
-0.032867431640625,
-0.0241851806640625,
0.01508331298828125,
0.00494384765625,
-0.07562255859375,
-0.050140380859375,
-0.0280914306640625,
0.04583740234375,
0.01092529296875,
0.036102294921875,
0.031524658203125,
-0.01067352294921875,
0.0096588134765625,
0.0010747909545898438,
-0.04913330078125,
-0.007045745849609375,
0.036590576171875,
0.0263824462890625,
-0.01206207275390625,
-0.004795074462890625,
-0.0278167724609375,
0.010955810546875,
0.0033721923828125,
-0.0171051025390625,
0.01033782958984375,
0.03192138671875,
-0.01136016845703125,
-0.001979827880859375,
-0.046234130859375,
0.03631591796875,
-0.0003650188446044922,
-0.0063018798828125,
-0.03912353515625,
-0.007602691650390625,
0.035980224609375,
-0.005615234375,
0.01012420654296875,
0.047821044921875,
-0.020050048828125,
0.0294647216796875,
-0.01206207275390625,
0.011444091796875,
-0.00914764404296875,
0.04412841796875,
0.047454833984375,
-0.0030345916748046875,
-0.00307464599609375,
0.00983428955078125,
0.0238189697265625,
0.03759765625,
-0.00586700439453125,
0.0014066696166992188,
0.01898193359375,
-0.046295166015625,
0.01104736328125,
0.00975799560546875,
0.07208251953125,
-0.0239410400390625,
-0.06097412109375,
-0.004756927490234375,
0.0048675537109375,
-0.0309906005859375,
-0.02685546875,
0.0220794677734375,
-0.010986328125,
-0.015716552734375,
0.0096893310546875,
-0.01763916015625,
-0.01493072509765625,
0.0275421142578125,
-0.01132965087890625,
0.009857177734375,
0.01485443115234375,
-0.0286712646484375,
0.0234527587890625,
-0.04766845703125,
-0.0018186569213867188,
-0.0157470703125,
0.02587890625,
0.009735107421875,
0.0306549072265625,
-0.005619049072265625,
-0.04351806640625,
0.01345062255859375,
-0.041168212890625,
-0.0120849609375,
0.0220794677734375,
0.0016574859619140625,
-0.017822265625,
-0.01030731201171875,
0.0020751953125,
0.035247802734375,
0.008941650390625,
-0.025299072265625,
0.0013675689697265625,
0.0247344970703125,
0.008087158203125,
0.0316162109375,
-0.00304412841796875,
-0.033782958984375,
-0.0286712646484375,
-0.02459716796875,
-0.0731201171875,
0.0025577545166015625,
0.0032711029052734375,
-0.005977630615234375,
-0.00257110595703125,
-0.020416259765625,
-0.005977630615234375,
0.01556396484375,
0.0118560791015625,
0.00714111328125,
0.005218505859375,
-0.001705169677734375,
-0.0098724365234375,
0.0248870849609375,
0.01396942138671875,
0.01245880126953125,
0.0021038055419921875,
0.004611968994140625,
-0.03192138671875,
0.015228271484375,
-0.005153656005859375,
-0.008331298828125,
-0.023529052734375,
0.0345458984375,
-0.024017333984375,
0.01224517822265625,
0.02447509765625,
-0.00616455078125,
-0.00299072265625,
0.0240631103515625,
-0.005443572998046875,
0.0192413330078125,
0.03955078125,
-0.0626220703125,
-0.040008544921875,
-0.0197296142578125,
0.036590576171875,
-0.0273284912109375,
-0.06304931640625,
0.0087432861328125,
-0.01155853271484375,
-0.148681640625,
0.06549072265625,
0.0102691650390625,
-0.0275726318359375,
-0.034271240234375,
-0.0290985107421875,
-0.07537841796875,
-0.044464111328125,
0.037933349609375,
-0.064208984375,
0.039794921875,
-0.01357269287109375,
0.005657196044921875,
-0.0195465087890625,
-0.007633209228515625,
-0.06573486328125,
-0.00608062744140625,
0.01076507568359375,
-0.050537109375,
0.0013675689697265625,
0.025238037109375,
0.0049591064453125,
0.0012807846069335938,
0.0003857612609863281,
0.0076141357421875,
-0.0308685302734375,
0.01175689697265625,
0.0088653564453125,
-0.0027408599853515625,
0.0125579833984375,
0.0005273818969726562,
-0.009002685546875,
-0.00505828857421875,
-0.0216827392578125,
-0.052734375,
-0.045562744140625,
-0.01041412353515625,
0.006282806396484375,
0.041595458984375,
-0.046234130859375,
-0.003040313720703125,
-0.02618408203125,
-0.004375457763671875,
0.043731689453125,
-0.0299072265625,
0.043670654296875,
-0.044189453125,
-0.0139617919921875,
0.04205322265625,
-0.002391815185546875,
-0.0050506591796875,
0.01068878173828125,
0.04949951171875,
0.0074615478515625,
-0.02825927734375,
-0.0206298828125,
-0.033721923828125,
0.029449462890625,
-0.006832122802734375,
0.002655029296875,
0.0192718505859375,
-0.0245819091796875,
0.019866943359375,
0.0013170242309570312,
-0.0231170654296875,
0.0013971328735351562,
0.07574462890625,
0.0197296142578125,
0.01331329345703125,
-0.027130126953125,
-0.0025539398193359375,
-0.0093231201171875,
0.028076171875,
-0.006824493408203125,
0.005523681640625,
0.0174713134765625,
0.0125579833984375,
0.0014734268188476562,
-0.04296875,
-0.040771484375,
-0.0007615089416503906,
-0.004878997802734375,
0.00799560546875,
0.0496826171875,
0.0126953125,
0.01470184326171875,
0.00970458984375,
0.0289459228515625,
0.003032684326171875,
-0.016937255859375,
0.00876617431640625,
-0.032012939453125,
0.0116729736328125,
-0.006664276123046875,
-0.0218658447265625,
0.005126953125,
-0.01021575927734375,
0.0697021484375,
0.0289459228515625,
-0.030517578125,
0.02056884765625,
0.00353240966796875,
0.01381683349609375,
0.00875091552734375,
0.0338134765625,
0.03759765625,
0.024932861328125,
-0.0017805099487304688,
-0.0216522216796875,
-0.0008177757263183594,
0.03216552734375,
-0.050872802734375,
-0.056854248046875,
0.0008425712585449219,
-0.0144500732421875,
-0.004238128662109375,
0.02655029296875,
0.019287109375,
0.012176513671875,
-0.02294921875,
0.01038360595703125,
0.020263671875,
0.038116455078125,
0.02764892578125,
-0.0185089111328125,
-0.006946563720703125,
0.0036106109619140625,
-0.0007839202880859375,
-0.046417236328125,
-0.00311279296875,
0.0296173095703125,
0.033966064453125,
0.039520263671875,
-0.01953125,
0.00600433349609375,
0.0016765594482421875,
-0.0007996559143066406,
0.08843994140625,
0.03497314453125,
-0.04327392578125,
-0.03350830078125,
-0.008087158203125,
0.043182373046875,
-0.04150390625,
-0.024810791015625,
-0.0031948089599609375,
-0.0584716796875,
-0.006855010986328125,
0.059814453125,
-0.03094482421875,
0.0019626617431640625,
-0.0216217041015625,
-0.041290283203125,
-0.022491455078125,
0.0190277099609375,
-0.11431884765625,
-0.0489501953125,
0.016571044921875,
0.0007576942443847656,
-0.0059051513671875,
0.010101318359375,
0.042816162109375,
-0.037353515625,
-0.0172882080078125,
-0.0055389404296875,
-0.005859375,
0.01184844970703125,
-0.021575927734375,
-0.05877685546875,
0.0221099853515625,
-0.055419921875,
-0.0048065185546875,
-0.07342529296875,
-0.07293701171875,
-0.0555419921875,
-0.0095062255859375,
0.04095458984375,
0.034149169921875,
0.00943756103515625,
-0.0237579345703125,
-0.0031261444091796875,
-0.007480621337890625,
0.01678466796875,
0.03759765625,
-0.01306915283203125,
0.0300750732421875,
-0.01055145263671875,
0.0445556640625,
-0.0029430389404296875,
-0.016448974609375,
-0.03643798828125,
-0.00429534912109375,
0.042938232421875,
0.003673553466796875,
-0.045562744140625,
-0.034271240234375,
-0.04437255859375,
-0.0643310546875,
0.0291595458984375,
-0.03790283203125,
0.0208587646484375,
-0.029052734375,
0.0011768341064453125,
-0.016204833984375,
0.03125,
-0.00980377197265625,
0.0499267578125,
0.0012645721435546875,
-0.05401611328125,
-0.052215576171875,
0.006984710693359375,
-0.018096923828125,
0.0237579345703125,
-0.0002713203430175781,
-0.030120849609375,
0.01861572265625,
-0.06378173828125,
0.07257080078125,
0.04693603515625,
0.0012426376342773438,
0.036834716796875,
0.0020885467529296875,
0.018829345703125,
0.0117645263671875,
-0.0061798095703125,
0.0194244384765625,
0.007099151611328125,
0.06512451171875,
0.00624847412109375,
-0.0142059326171875,
0.046356201171875,
-0.032928466796875,
0.0034770965576171875,
0.041351318359375,
0.04034423828125,
-0.068603515625,
0.0020503997802734375,
0.01328277587890625,
0.01446533203125,
0.0189971923828125,
-0.0162353515625,
-0.004779815673828125,
-0.052215576171875,
0.06378173828125,
0.029754638671875,
-0.00782012939453125,
0.017547607421875,
-0.0042266845703125,
0.00429534912109375,
-0.005535125732421875,
0.00482940673828125,
-0.00017690658569335938,
-0.036529541015625,
-0.003353118896484375,
0.048675537109375,
-0.006870269775390625,
0.006504058837890625,
0.0013971328735351562,
0.0079345703125,
-0.0247039794921875,
-0.07366943359375,
-0.024993896484375,
-0.0242156982421875,
-0.037353515625,
0.0249481201171875,
-0.047210693359375,
0.048492431640625,
0.0345458984375,
-0.0170440673828125,
0.007904052734375,
0.0016689300537109375,
-0.01509857177734375,
-0.06304931640625,
-0.021331787109375,
0.0043182373046875,
-0.0024700164794921875,
-0.0192108154296875,
0.03497314453125,
-0.034637451171875,
-0.0338134765625,
-0.0082855224609375,
0.00693511962890625,
0.09942626953125,
-0.06646728515625,
-0.009246826171875,
0.0229034423828125,
0.025634765625,
-0.00954437255859375,
-0.0242462158203125,
0.0250701904296875,
-0.06842041015625,
-0.02606201171875,
-0.00727081298828125,
-0.0148773193359375,
-0.015716552734375,
-0.03173828125,
-0.045684814453125,
0.09539794921875,
-0.0201568603515625,
0.01091766357421875,
0.032318115234375,
0.041748046875,
-0.042022705078125,
0.03173828125,
-0.016021728515625,
0.01540374755859375,
-0.032623291015625,
0.01192474365234375,
0.01029205322265625,
0.04022216796875,
-0.00335693359375,
-0.0269775390625,
0.035247802734375,
-0.00933074951171875,
0.043609619140625,
-0.03179931640625,
0.01507568359375,
0.02410888671875,
-0.019287109375,
-0.01238250732421875,
-0.01320648193359375,
-0.0187530517578125,
0.01300048828125,
-0.007732391357421875,
0.040313720703125,
-0.050750732421875,
-0.0207366943359375,
-0.0024585723876953125,
0.0181427001953125,
0.0278472900390625,
-0.0316162109375,
0.01546478271484375,
0.05523681640625,
-0.049652099609375,
-0.038360595703125,
0.01259613037109375,
0.0005078315734863281,
0.0304718017578125,
-0.006336212158203125,
0.037139892578125,
0.005237579345703125,
-0.0145263671875,
0.034515380859375,
0.001590728759765625,
0.0193939208984375,
0.021270751953125,
0.018829345703125,
0.0161285400390625,
-0.0005741119384765625,
0.01201629638671875,
0.0214996337890625,
-0.02099609375,
0.039459228515625,
0.029388427734375,
0.048370361328125,
-0.005523681640625,
0.018402099609375,
-0.016571044921875,
0.0222320556640625,
-0.02423095703125,
-0.07830810546875,
0.01393890380859375,
-0.0025348663330078125,
0.020294189453125,
0.03643798828125,
0.04736328125,
-0.07965087890625,
-0.004913330078125,
-0.0350341796875,
-0.005390167236328125,
0.01279449462890625,
0.029937744140625,
-0.0097198486328125,
-0.01200103759765625,
-0.0210418701171875,
-0.01561737060546875,
-0.0163116455078125,
-0.032745361328125,
0.022216796875,
0.0328369140625,
0.02203369140625,
0.00616455078125,
0.003204345703125,
-0.02154541015625,
-0.00630950927734375,
0.01209259033203125,
-0.01611328125,
0.00983428955078125,
-0.044891357421875,
-0.047393798828125,
-0.001743316650390625,
0.0498046875,
0.054779052734375,
0.02545166015625,
0.052337646484375,
0.0210418701171875,
-0.0254974365234375,
0.01123809814453125,
0.031982421875,
-0.0226287841796875,
0.0179443359375,
-0.0033435821533203125,
0.008697509765625,
0.0194854736328125,
-0.01177978515625,
-0.03497314453125,
0.0316162109375,
0.022979736328125,
0.0176849365234375,
0.0280303955078125,
0.0100250244140625,
0.027099609375,
0.057159423828125,
-0.01511383056640625,
0.0111236572265625,
0.0200653076171875,
-0.061553955078125,
-0.0195770263671875,
0.01099395751953125,
0.00795745849609375,
-0.0039215087890625,
0.0263671875,
-0.0379638671875,
0.048370361328125,
0.00948333740234375,
-0.00449371337890625,
-0.01255035400390625,
0.0022296905517578125,
0.0226898193359375,
0.028717041015625,
0.01120758056640625,
0.0267486572265625,
-0.026702880859375,
-0.0004456043243408203,
-0.0035533905029296875,
0.00994873046875,
0.0455322265625,
0.011932373046875,
0.01328277587890625,
0.0226287841796875,
0.0026531219482421875,
0.011566162109375,
-0.01000213623046875,
0.01174163818359375,
-0.016998291015625,
-0.00131988525390625,
0.00800323486328125,
-0.01554107666015625,
0.0035877227783203125,
0.052154541015625,
0.00917816162109375,
-0.01537322998046875,
0.02313232421875,
-0.0282135009765625,
0.0154876708984375,
0.01377105712890625,
-0.041259765625,
-0.0285491943359375,
-0.015350341796875,
0.022918701171875,
0.01055145263671875,
0.011627197265625,
0.0038738250732421875,
-0.0122833251953125,
-0.00008314847946166992,
-0.0016965866088867188,
-0.01971435546875,
0.012359619140625,
0.0030498504638671875,
-0.023712158203125,
0.009185791015625,
0.0093994140625,
-0.00946807861328125,
0.0234222412109375,
-0.00989532470703125,
0.01314544677734375,
0.01297760009765625,
0.03265380859375,
0.0120086669921875,
-0.002735137939453125,
-0.032806396484375,
-0.00847625732421875,
-0.0009627342224121094,
-0.0297393798828125,
0.00620269775390625,
-0.0011959075927734375,
0.0029048919677734375,
0.027587890625,
-0.0143585205078125,
-0.003662109375,
-0.02337646484375,
-0.02862548828125,
0.0209503173828125,
-0.035369873046875,
-0.03460693359375,
-0.03155517578125,
0.018585205078125,
0.0186767578125,
0.021575927734375,
-0.056671142578125,
0.07537841796875,
-0.02996826171875,
-0.0306854248046875,
-0.00384521484375,
0.0290374755859375,
0.0008592605590820312,
0.01297760009765625,
-0.0168609619140625,
-0.0280609130859375,
-0.0089569091796875,
0.05621337890625,
0.0065765380859375,
-0.0156402587890625,
-0.0162811279296875,
-0.0030345916748046875,
0.033721923828125,
-0.0241851806640625,
-0.0014429092407226562,
0.018707275390625,
0.0182037353515625,
-0.01470947265625,
0.0203704833984375,
0.014617919921875,
-0.015716552734375,
-0.05657958984375,
-0.0097198486328125,
-0.019775390625,
0.0277099609375,
-0.0419921875,
-0.004573822021484375,
-0.007465362548828125,
-0.0384521484375,
-0.05047607421875,
0.046905517578125,
-0.01436614990234375,
-0.02001953125,
-0.051422119140625,
0.05853271484375,
-0.0029735565185546875,
-0.021270751953125,
-0.01093292236328125,
-0.010467529296875,
0.01294708251953125,
0.0213470458984375,
0.01334381103515625,
0.06768798828125,
-0.004062652587890625,
0.038848876953125,
-0.0288238525390625,
0.00612640380859375,
-0.03289794921875,
0.01558685302734375,
-0.0252685546875,
-0.026519775390625,
0.00650787353515625,
0.0287628173828125,
-0.0306854248046875,
-0.048126220703125,
0.014404296875,
0.002574920654296875,
0.00432586669921875,
-0.0555419921875,
-0.04461669921875,
-0.0238189697265625,
0.0718994140625,
0.062225341796875,
0.0289764404296875,
-0.03619384765625,
-0.0257568359375,
0.01727294921875,
-0.02154541015625,
0.0029964447021484375,
0.0095672607421875,
-0.0361328125,
-0.0006670951843261719,
-0.0065460205078125,
-0.002834320068359375,
0.01166534423828125,
-0.02838134765625,
-0.01026153564453125,
0.01389312744140625,
0.03240966796875,
0.027679443359375,
-0.0295867919921875,
0.0272979736328125,
-0.03125,
0.004016876220703125,
0.0182037353515625,
-0.049835205078125,
0.005458831787109375,
-0.007488250732421875,
-0.01690673828125,
-0.01181793212890625,
-0.0226898193359375,
-0.0221099853515625,
0.0272369384765625,
-0.0189666748046875,
0.0352783203125,
-0.0230712890625,
-0.0234832763671875,
-0.039031982421875,
0.0031719207763671875,
0.006168365478515625,
-0.005947113037109375,
-0.00875091552734375,
0.03662109375,
0.026092529296875,
0.047698974609375,
-0.007404327392578125,
0.08612060546875,
-0.01325225830078125,
0.0601806640625,
0.01751708984375,
-0.03070068359375,
0.06610107421875,
-0.056396484375,
-0.018096923828125,
-0.00689697265625,
0.004398345947265625,
-0.1328125,
0.07763671875,
0.0283966064453125,
0.033966064453125,
0.058746337890625
]
|
c205e980315a7bc19944625e5bb904fcc81b5baf | Wordpress Stackexchange
Q: get_posts with multiple categories If I do a get_posts() with category set to 1,2 I will get all posts in category 1 OR 2.
If i want all posts whit both categories, that is 1 AND 2, how do I make that request?
A: The Codex says:
Note: The category parameter needs to be the ID of the category, and not the category name.
Note: The category parameter can be a comma separated list of categories, as the get_posts() function passes the 'category' parameter directly into WP_Query as 'cat'.
So it'd be same as WP_Query()'s Category parameter - cat.
| Q: get_posts with multiple categories If I do a get_posts() with category set to 1,2 I will get all posts in category 1 OR 2.
If i want all posts whit both categories, that is 1 AND 2, how do I make that request?
A: The Codex says:
Note: The category parameter needs to be the ID of the category, and not the category name.
Note: The category parameter can be a comma separated list of categories, as the get_posts() function passes the 'category' parameter directly into WP_Query as 'cat'.
So it'd be same as WP_Query()'s Category parameter - cat.
A: You can use the WP_QUERY class to search for the posts in some specific categories, here is an example:
$query = new WP_Query( 'cat=2,6,17,38' );
Here is a link to the documentation where they explain how to use the results to build a loop and display the posts in the results.
A: There is a much easier way that just involves the get_posts() function.
<?php $args1 = array( 'posts_per_page' => 6, 'offset'=> 0, 'category' => array(2,3,25,30));
$myposts1 = get_posts( $args1 );
foreach ( $myposts1 as $post ) : setup_postdata( $post ); ?>
<div class="each-post col-lg-aynk col-md-aynk col-sm-aynk col-xs-aynk">
<a href="<?php the_permalink(); ?>">
<h2><?php the_title(); ?></h2>
</a>
<a href="<?php the_permalink(); ?>">
<div class="news-story-img">
<?php if (class_exists('MultiPostThumbnails')) : MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'secondary-image'); endif; ?>
<?php the_post_thumbnail( get_permalink() ); ?>
</div>
</a>
</div>
<?php endforeach;
wp_reset_postdata();?>
A: Actually you can use category__and with get_posts() directly:
$posts = get_posts(array( 'category__and' => array(1,2) ));
A: As documented in the codex you could use the following
$query = new WP_Query( array( 'category__and' => array( 2, 6 ) ) ); //post has to be in category with ID 2 AND 6
A: If you want to use category_name as search parameter, you can use WP_Query( array("category_name" => "cat_1+cat_2+...+cat_n") ), where cat_1, cat_2, ... , cat_n are all the categories that the post must have to be returned from the query
Documentation here Codex Wordpress
| wordpress | {
"language": "en",
"length": 326,
"provenance": "stackexchange_00019.jsonl.gz:454866",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/184899"
} | [
0.0384521484375,
0.00513458251953125,
-0.0140228271484375,
-0.015655517578125,
0.028167724609375,
-0.0214691162109375,
0.03875732421875,
-0.012451171875,
-0.03582763671875,
0.00838470458984375,
-0.022735595703125,
0.006549835205078125,
-0.018890380859375,
-0.03125,
0.0168914794921875,
-0.054290771484375,
0.026763916015625,
-0.01335906982421875,
-0.00469207763671875,
-0.021820068359375,
0.024139404296875,
-0.007411956787109375,
-0.00433349609375,
0.1207275390625,
0.02606201171875,
-0.0221710205078125,
0.005863189697265625,
-0.0219268798828125,
-0.003925323486328125,
-0.03167724609375,
0.02105712890625,
0.0308990478515625,
0.0029621124267578125,
0.00887298583984375,
0.015869140625,
-0.0259552001953125,
0.0011129379272460938,
0.007747650146484375,
0.019256591796875,
0.01788330078125,
0.04376220703125,
-0.035125732421875,
0.041229248046875,
0.0234222412109375,
0.017547607421875,
-0.0018358230590820312,
0.029327392578125,
-0.06903076171875,
0.023284912109375,
-0.07684326171875,
0.007236480712890625,
-0.0026836395263671875,
0.033050537109375,
-0.050018310546875,
-0.0325927734375,
0.005420684814453125,
0.03961181640625,
-0.044830322265625,
0.05352783203125,
-0.055450439453125,
-0.07366943359375,
-0.044586181640625,
0.052490234375,
-0.0232086181640625,
-0.0110321044921875,
0.026153564453125,
0.04693603515625,
0.01088714599609375,
-0.06146240234375,
-0.030853271484375,
0.03192138671875,
-0.050445556640625,
0.007007598876953125,
-0.0223388671875,
-0.0193939208984375,
-0.0266876220703125,
-0.0110626220703125,
-0.050811767578125,
0.01076507568359375,
-0.0009350776672363281,
-0.0219573974609375,
-0.006420135498046875,
-0.055450439453125,
-0.0005064010620117188,
0.007595062255859375,
0.02593994140625,
-0.01727294921875,
-0.01303863525390625,
-0.01800537109375,
-0.0310516357421875,
-0.01165008544921875,
-0.03564453125,
-0.06903076171875,
0.02642822265625,
0.02392578125,
-0.040924072265625,
0.01326751708984375,
0.04449462890625,
-0.0197906494140625,
0.00737762451171875,
-0.032470703125,
-0.011810302734375,
-0.02117919921875,
-0.0171356201171875,
0.03485107421875,
0.00380706787109375,
-0.01715087890625,
0.039886474609375,
0.08306884765625,
0.048248291015625,
0.0018491744995117188,
0.09515380859375,
0.0263824462890625,
0.00481414794921875,
-0.020660400390625,
-0.0159759521484375,
-0.032684326171875,
0.0260162353515625,
-0.01134490966796875,
-0.00563812255859375,
0.0033359527587890625,
0.05487060546875,
-0.004795074462890625,
-0.028900146484375,
0.006481170654296875,
0.0214996337890625,
0.0208740234375,
-0.05718994140625,
0.0012187957763671875,
0.00934600830078125,
-0.0263824462890625,
0.0302886962890625,
0.03741455078125,
0.0019054412841796875,
-0.0159912109375,
-0.00502777099609375,
-0.00849151611328125,
-0.00806427001953125,
-0.002887725830078125,
0.0093536376953125,
0.0004124641418457031,
-0.02880859375,
0.0222625732421875,
0.003978729248046875,
-0.0017156600952148438,
0.01380157470703125,
0.01042938232421875,
0.0064239501953125,
0.0020904541015625,
-0.0367431640625,
0.0210418701171875,
-0.0247039794921875,
0.00809478759765625,
-0.00287628173828125,
0.00557708740234375,
-0.003993988037109375,
-0.020233154296875,
0.0014982223510742188,
-0.0006299018859863281,
0.00551605224609375,
0.0249786376953125,
0.016815185546875,
0.055450439453125,
-0.0073699951171875,
-0.0259857177734375,
-0.0111083984375,
-0.0738525390625,
-0.0243072509765625,
0.01151275634765625,
0.008056640625,
0.006000518798828125,
0.00435638427734375,
0.01061248779296875,
-0.00897979736328125,
-0.0024662017822265625,
-0.008453369140625,
-0.017852783203125,
-0.0293731689453125,
0.025634765625,
0.035919189453125,
-0.017333984375,
-0.0275115966796875,
-0.027557373046875,
0.0216522216796875,
-0.059906005859375,
0.0506591796875,
0.01446533203125,
0.08721923828125,
-0.0084991455078125,
0.024658203125,
0.02392578125,
0.027252197265625,
-0.043548583984375,
-0.005702972412109375,
-0.0028133392333984375,
-0.01306915283203125,
-0.024200439453125,
-0.0088348388671875,
0.0013637542724609375,
0.0011768341064453125,
0.0275726318359375,
-0.00970458984375,
-0.00946044921875,
0.02069091796875,
-0.042572021484375,
-0.010284423828125,
-0.002655029296875,
0.00724029541015625,
-0.0117340087890625,
0.030853271484375,
0.01212310791015625,
-0.007701873779296875,
-0.0054168701171875,
-0.03759765625,
-0.004177093505859375,
0.007099151611328125,
-0.040252685546875,
0.002635955810546875,
-0.037109375,
-0.0137786865234375,
-0.048004150390625,
-0.039215087890625,
-0.04052734375,
0.03643798828125,
0.0882568359375,
0.005397796630859375,
0.0005974769592285156,
-0.0309600830078125,
0.060455322265625,
0.045135498046875,
-0.10162353515625,
-0.004344940185546875,
0.05865478515625,
0.095703125,
-0.0118255615234375,
0.01404571533203125,
0.045135498046875,
0.01155853271484375,
0.0031452178955078125,
0.00197601318359375,
0.008514404296875,
-0.0019445419311523438,
-0.0413818359375,
-0.00550079345703125,
0.0203094482421875,
-0.057220458984375,
-0.016693115234375,
0.013092041015625,
0.022705078125,
0.059051513671875,
0.0364990234375,
-0.00797271728515625,
-0.0011415481567382812,
-0.0262451171875,
0.0295562744140625,
0.00025463104248046875,
0.01169586181640625,
0.00640106201171875,
0.0140838623046875,
-0.0167694091796875,
0.007801055908203125,
-0.037750244140625,
-0.04315185546875,
-0.0034732818603515625,
0.0172882080078125,
0.00914764404296875,
0.0197601318359375,
0.0175628662109375,
-0.01129913330078125,
-0.006381988525390625,
0.004852294921875,
-0.01474761962890625,
0.005451202392578125,
0.045166015625,
-0.0251007080078125,
-0.01067352294921875,
0.000002682209014892578,
0.00063323974609375,
-0.01520538330078125,
0.0019502639770507812,
0.0010204315185546875,
0.042388916015625,
-0.016998291015625,
-0.009674072265625,
-0.031280517578125,
-0.03338623046875,
0.009552001953125,
0.0311126708984375,
-0.008819580078125,
0.0034046173095703125,
0.02764892578125,
0.0335693359375,
-0.0236663818359375,
0.0389404296875,
-0.04248046875,
0.002155303955078125,
0.026397705078125,
-0.048248291015625,
0.0251617431640625,
-0.027130126953125,
0.01357269287109375,
0.056427001953125,
0.01654052734375,
-0.01132965087890625,
-0.0005736351013183594,
0.031402587890625,
0.048919677734375,
-0.00450897216796875,
-0.01059722900390625,
-0.0155029296875,
-0.0182952880859375,
0.0016155242919921875,
0.02386474609375,
0.056610107421875,
0.01184844970703125,
-0.04266357421875,
0.00595855712890625,
0.038604736328125,
-0.07080078125,
-0.066162109375,
0.0229034423828125,
-0.0194549560546875,
0.0005931854248046875,
-0.0005807876586914062,
-0.004848480224609375,
-0.019805908203125,
-0.01232147216796875,
-0.0074920654296875,
0.010345458984375,
-0.0012292861938476562,
-0.045654296875,
-0.0124664306640625,
-0.061553955078125,
0.01012420654296875,
-0.00113677978515625,
0.01641845703125,
0.0077667236328125,
0.087158203125,
0.00604248046875,
-0.059661865234375,
-0.0172271728515625,
0.0099334716796875,
-0.02337646484375,
0.00185394287109375,
-0.01166534423828125,
0.010345458984375,
0.0034942626953125,
0.00006824731826782227,
0.033721923828125,
0.0298309326171875,
-0.030609130859375,
0.01082611083984375,
-0.0157470703125,
0.0199432373046875,
0.0189056396484375,
-0.01222991943359375,
-0.0088958740234375,
0.0526123046875,
0.021514892578125,
-0.000652313232421875,
0.0068511962890625,
-0.03265380859375,
-0.029754638671875,
-0.04058837890625,
0.031097412109375,
0.0012664794921875,
-0.04345703125,
-0.0161895751953125,
-0.0121917724609375,
-0.0276031494140625,
-0.01236724853515625,
-0.061737060546875,
0.06512451171875,
0.01293182373046875,
0.03302001953125,
0.005130767822265625,
-0.06524658203125,
-0.045989990234375,
0.01270294189453125,
-0.0535888671875,
0.005970001220703125,
-0.0242919921875,
0.0301666259765625,
-0.00641632080078125,
-0.038238525390625,
0.0357666015625,
0.005176544189453125,
0.005832672119140625,
-0.0210723876953125,
-0.0241546630859375,
-0.0177001953125,
0.0665283203125,
-0.03582763671875,
-0.0298004150390625,
-0.0247344970703125,
0.0276031494140625,
-0.0469970703125,
-0.09271240234375,
0.00250244140625,
-0.020843505859375,
-0.0208892822265625,
-0.0100250244140625,
-0.0137939453125,
-0.0199432373046875,
-0.0185546875,
0.00322723388671875,
-0.0243377685546875,
-0.0174560546875,
0.041900634765625,
-0.037139892578125,
0.006282806396484375,
-0.0140228271484375,
0.019073486328125,
-0.047637939453125,
-0.033050537109375,
0.0081787109375,
-0.0260467529296875,
-0.02081298828125,
0.026336669921875,
0.01445770263671875,
-0.0028533935546875,
-0.03704833984375,
0.00664520263671875,
0.055999755859375,
0.01491546630859375,
0.03692626953125,
0.0166015625,
0.0070037841796875,
-0.006855010986328125,
-0.00815582275390625,
0.0196075439453125,
-0.0306396484375,
-0.034088134765625,
-0.05072021484375,
0.007030487060546875,
0.0168914794921875,
-0.03887939453125,
0.024627685546875,
-0.0679931640625,
0.01373291015625,
-0.08294677734375,
-0.0183563232421875,
0.018890380859375,
-0.022247314453125,
-0.0062255859375,
0.0062408447265625,
0.00234222412109375,
-0.05462646484375,
0.05206298828125,
0.035491943359375,
-0.01531982421875,
-0.0112762451171875,
0.072509765625,
0.00974273681640625,
-0.034332275390625,
-0.065673828125,
-0.02679443359375,
0.029144287109375,
-0.028961181640625,
0.042266845703125,
0.0316162109375,
-0.022796630859375,
0.058319091796875,
0.0035610198974609375,
-0.006206512451171875,
-0.03973388671875,
0.08197021484375,
-0.01430511474609375,
-0.0009241104125976562,
0.01279449462890625,
-0.0443115234375,
0.0330810546875,
0.03045654296875,
-0.02801513671875,
0.0081024169921875,
-0.018646240234375,
0.0303497314453125,
-0.0188751220703125,
-0.0005974769592285156,
-0.048065185546875,
0.00620269775390625,
-0.004852294921875,
0.0325927734375,
0.022796630859375,
0.04351806640625,
-0.00003826618194580078,
-0.005886077880859375,
0.0193023681640625,
0.005237579345703125,
0.01012420654296875,
0.01363372802734375,
-0.007740020751953125,
0.0257568359375,
0.0011043548583984375,
-0.00865936279296875,
-0.010986328125,
0.00925445556640625,
-0.0285797119140625,
-0.0286865234375,
-0.045379638671875,
-0.0255889892578125,
-0.00046253204345703125,
0.02496337890625,
0.028717041015625,
-0.018157958984375,
0.01250457763671875,
0.00984954833984375,
-0.00750732421875,
0.01284027099609375,
-0.02197265625,
-0.01947021484375,
-0.01424407958984375,
0.02471923828125,
0.0256500244140625,
-0.006038665771484375,
0.03668212890625,
0.05035400390625,
0.01209259033203125,
0.0439453125,
-0.0246429443359375,
0.0262298583984375,
0.0037670135498046875,
0.023468017578125,
0.0121917724609375,
0.002826690673828125,
0.00952911376953125,
-0.0154571533203125,
0.0038547515869140625,
-0.054840087890625,
0.00029659271240234375,
0.04290771484375,
0.0291595458984375,
0.020538330078125,
-0.0188140869140625,
-0.00463104248046875,
0.00922393798828125,
-0.01195526123046875,
-0.01041412353515625,
0.01528167724609375,
0.00757598876953125,
-0.00665283203125,
-0.0012416839599609375,
-0.003002166748046875,
0.0287322998046875,
-0.007625579833984375,
0.01030731201171875,
-0.013916015625,
0.0288238525390625,
-0.0097503662109375,
-0.0070953369140625,
0.0036220550537109375,
0.012603759765625,
-0.038116455078125,
-0.00943756103515625,
0.0186614990234375,
-0.01146697998046875,
-0.017303466796875,
-0.0167388916015625,
-0.045440673828125,
0.045745849609375,
-0.01195526123046875,
0.04449462890625,
-0.0190887451171875,
-0.037689208984375,
0.000014424324035644531,
-0.00445556640625,
0.09332275390625,
0.06610107421875,
-0.0237884521484375,
-0.0139312744140625,
-0.05157470703125,
-0.0206298828125,
-0.00411224365234375,
-0.045013427734375,
-0.020782470703125,
-0.0096588134765625,
0.006877899169921875,
0.0226593017578125,
0.002460479736328125,
-0.0230255126953125,
-0.0386962890625,
-0.0082244873046875,
0.0211944580078125,
0.007015228271484375,
-0.018341064453125,
0.0487060546875,
-0.006801605224609375,
0.0218505859375,
-0.0133209228515625,
0.01224517822265625,
-0.01526641845703125,
0.00007659196853637695,
0.0012979507446289062,
-0.09478759765625,
-0.0169525146484375,
0.0294647216796875,
-0.041656494140625,
-0.00608062744140625,
-0.0250244140625,
0.01239013671875,
-0.006206512451171875,
-0.0238189697265625,
-0.004161834716796875,
-0.01201629638671875,
0.0217437744140625,
-0.006023406982421875,
-0.02740478515625,
0.051239013671875,
-0.01297760009765625,
0.04595947265625,
-0.009857177734375,
-0.026885986328125,
0.035736083984375,
-0.034515380859375,
0.045562744140625,
0.0345458984375,
-0.0224609375,
0.005680084228515625,
0.0262451171875,
0.02020263671875,
0.017364501953125,
-0.0045623779296875,
0.0189666748046875,
-0.0029926300048828125,
-0.0237579345703125,
0.035003662109375,
0.02667236328125,
0.02587890625,
-0.0304718017578125,
0.0141143798828125,
0.0081329345703125,
-0.0290985107421875,
-0.005580902099609375,
0.0028228759765625,
0.0526123046875,
-0.0101470947265625,
0.01291656494140625,
0.03973388671875,
-0.033416748046875,
-0.0204620361328125,
0.022216796875,
-0.02020263671875,
-0.0204620361328125,
0.006175994873046875,
-0.01093292236328125,
-0.01029205322265625,
-0.00020503997802734375,
0.0014667510986328125,
-0.0006661415100097656,
-0.01461029052734375,
0.01157379150390625,
0.0159912109375,
-0.042236328125,
0.024139404296875,
0.0467529296875,
0.031402587890625,
-0.00849151611328125,
-0.02099609375,
0.045654296875,
-0.03936767578125,
-0.07659912109375,
0.0287933349609375,
-0.01300811767578125,
-0.01508331298828125,
0.00534820556640625,
-0.0101165771484375,
0.005313873291015625,
0.025543212890625,
-0.006866455078125,
-0.0038166046142578125,
0.00418853759765625,
-0.055694580078125,
-0.0386962890625,
0.0159149169921875,
0.0258026123046875,
0.055572509765625,
-0.0498046875,
0.02435302734375,
-0.037139892578125,
0.023895263671875,
-0.0181732177734375,
-0.052032470703125,
0.054931640625,
-0.030181884765625,
-0.0004189014434814453,
0.0220794677734375,
0.03765869140625,
0.004184722900390625,
0.0201416015625,
-0.00118255615234375,
-0.0006704330444335938,
0.0204315185546875,
0.007717132568359375,
0.01120758056640625,
0.01300048828125,
0.01058197021484375,
-0.07940673828125,
0.049896240234375,
-0.00995635986328125,
0.051605224609375,
0.0167388916015625,
-0.002239227294921875,
-0.0006818771362304688,
-0.021087646484375,
-0.06341552734375,
0.052703857421875,
0.021087646484375,
0.050384521484375,
-0.061370849609375,
-0.011199951171875,
-0.0011348724365234375,
0.0184326171875,
0.058349609375,
0.0017271041870117188,
-0.0118560791015625,
0.0016632080078125,
0.0533447265625,
0.06011962890625,
0.0006165504455566406,
0.00855255126953125,
0.03692626953125,
0.0011148452758789062,
0.051239013671875,
0.01580810546875,
0.04278564453125,
0.0093231201171875,
0.01287841796875,
0.06500244140625,
0.01456451416015625,
0.00730133056640625,
-0.025848388671875,
0.005054473876953125,
-0.0357666015625,
-0.017822265625,
0.01300811767578125,
-0.0291900634765625,
0.006717681884765625,
0.033599853515625,
0.039215087890625,
-0.027130126953125,
0.0430908203125,
-0.03094482421875,
0.061859130859375,
0.0005397796630859375,
0.0305328369140625,
0.06524658203125,
0.020751953125,
0.06439208984375,
0.0252532958984375,
0.031585693359375,
-0.00539398193359375,
0.0189208984375,
0.0889892578125,
0.02899169921875,
0.029388427734375,
-0.039764404296875,
0.02777099609375,
0.0274505615234375,
0.08685302734375,
-0.063232421875,
-0.050323486328125,
0.01287078857421875,
-0.00634002685546875,
0.0088043212890625,
0.01192474365234375,
0.020599365234375,
0.03558349609375,
0.07171630859375,
-0.044891357421875,
0.0024700164794921875,
0.0248565673828125,
0.0204620361328125,
-0.006626129150390625,
-0.020355224609375,
-0.004901885986328125,
0.0022296905517578125,
-0.0712890625,
0.0309906005859375,
0.01554107666015625,
0.0677490234375,
0.017822265625,
0.07000732421875,
-0.04852294921875,
-0.037017822265625,
0.0286102294921875,
0.03466796875,
0.0044097900390625,
-0.033599853515625,
-0.00974273681640625,
-0.07647705078125,
0.005725860595703125,
0.0219573974609375,
0.035980224609375,
0.00023186206817626953,
0.050750732421875,
0.069580078125,
-0.00853729248046875,
-0.0112762451171875,
0.056182861328125,
0.007015228271484375,
0.0200958251953125,
-0.048095703125,
-0.017242431640625,
-0.005229949951171875,
-0.033111572265625,
0.0128326416015625,
-0.038116455078125,
0.044219970703125,
0.0196990966796875,
0.0243682861328125,
0.01154327392578125,
0.0006933212280273438,
0.055633544921875,
0.00043463706970214844,
0.0287322998046875,
0.0283660888671875,
-0.09228515625,
-0.0025653839111328125,
-0.052398681640625,
-0.060150146484375,
0.0394287109375,
0.045562744140625,
-0.01026153564453125,
-0.0013837814331054688,
-0.00980377197265625,
-0.06195068359375,
0.025299072265625,
0.0235748291015625,
0.029327392578125,
0.0158843994140625,
-0.0204315185546875,
-0.0035381317138671875,
-0.06103515625,
-0.023162841796875,
-0.0154876708984375,
0.006069183349609375,
0.0244293212890625,
-0.0062103271484375,
0.048980712890625,
0.0240631103515625,
-0.026123046875,
0.0736083984375,
-0.079833984375,
-0.0364990234375,
0.037139892578125,
-0.013458251953125,
-0.0020046234130859375,
0.00946044921875,
0.04376220703125,
0.0212249755859375,
0.0516357421875,
-0.04022216796875,
0.01140594482421875,
-0.0372314453125,
0.002140045166015625,
-0.033233642578125,
0.035400390625,
-0.0177154541015625,
-0.00812530517578125,
-0.06884765625,
-0.043121337890625,
0.06475830078125,
0.04827880859375,
-0.00620269775390625,
-0.01702880859375,
0.01514434814453125,
-0.005462646484375,
0.0211181640625,
0.037353515625,
0.0416259765625,
0.038909912109375,
-0.062347412109375,
0.044097900390625,
-0.0141754150390625,
-0.020111083984375,
0.033233642578125,
0.0168609619140625,
-0.023773193359375,
0.009765625,
0.037322998046875,
-0.01348876953125,
0.031463623046875,
0.025299072265625,
-0.03076171875,
0.01406097412109375,
0.02191162109375,
-0.0159759521484375,
0.005550384521484375,
-0.0086822509765625,
-0.0279693603515625,
-0.02490234375,
-0.0184783935546875,
-0.003070831298828125,
-0.0204010009765625,
-0.042388916015625,
-0.0244598388671875,
-0.00015878677368164062,
0.0215911865234375,
-0.0238494873046875,
0.0120849609375,
0.0031490325927734375,
-0.047821044921875,
0.01959228515625,
-0.03466796875,
-0.058563232421875,
0.0265655517578125,
0.0268402099609375,
-0.042510986328125,
0.027557373046875,
-0.027130126953125,
-0.0550537109375,
-0.016510009765625,
0.0228271484375,
0.02362060546875,
-0.0190582275390625,
-0.033905029296875,
0.0643310546875,
0.0235748291015625,
0.08990478515625,
0.01293182373046875,
-0.00010192394256591797,
0.00563812255859375,
0.03173828125,
-0.053009033203125,
-0.06341552734375,
0.032745361328125,
-0.023590087890625,
-0.016937255859375,
0.003032684326171875,
0.00022673606872558594,
0.0172119140625,
-0.025604248046875,
-0.04107666015625,
0.07958984375,
-0.0167083740234375,
-0.0169830322265625,
-0.042022705078125,
-0.034759521484375,
-0.00429534912109375,
0.0091094970703125,
-0.0078582763671875,
-0.041656494140625,
-0.055328369140625,
0.0306854248046875,
0.00864410400390625,
0.0186920166015625,
0.013824462890625,
0.02496337890625,
-0.06524658203125,
0.015777587890625,
-0.0229339599609375,
0.01068115234375,
0.003711700439453125,
0.000141143798828125,
0.00971221923828125,
0.05108642578125,
-0.040374755859375,
-0.01103973388671875,
-0.01508331298828125,
-0.004955291748046875,
0.01171112060546875,
-0.028411865234375,
-0.027862548828125,
-0.027557373046875,
0.020416259765625,
0.00936126708984375,
0.01078033447265625,
-0.0019588470458984375,
-0.052093505859375,
-0.042816162109375,
-0.00974273681640625,
-0.01003265380859375,
0.01702880859375,
-0.045654296875,
0.025238037109375,
-0.01155853271484375,
-0.0007967948913574219,
0.0041351318359375,
-0.025390625,
-0.036956787109375,
-0.028228759765625,
-0.0540771484375,
0.00589752197265625,
-0.03375244140625,
0.035858154296875,
-0.0204010009765625,
-0.01050567626953125,
-0.03436279296875,
-0.01456451416015625,
-0.015350341796875,
-0.0491943359375,
0.0025501251220703125,
0.0025730133056640625,
0.0252685546875,
-0.0153045654296875,
-0.00914764404296875,
0.020477294921875,
-0.007228851318359375,
0.010772705078125,
0.01201629638671875,
-0.0294189453125,
0.017547607421875,
0.0203704833984375,
0.0196533203125,
-0.0037841796875,
0.0301513671875,
0.041656494140625,
0.005527496337890625,
0.027923583984375,
0.027618408203125,
-0.01055908203125,
0.06951904296875,
-0.0041656494140625,
-0.0458984375,
0.0035572052001953125,
-0.0474853515625,
-0.0123138427734375,
0.024017333984375,
-0.0261383056640625,
-0.0291900634765625,
0.0205078125,
0.0225372314453125,
0.00335693359375,
0.0138397216796875
]
|
b079c9265ac61df05b4e7f3bedabffb51f39e653 | Wordpress Stackexchange
Q: pre_user_query meta_query admin user list I'm attempting to use pre_user_query' to change the query to include somemeta_query` variables.
My goal is to only display users in the user list if they share a common meta_value with the current logged in user...
function modify_user_list($query){
$user = wp_get_current_user();
if( ! current_user_can( 'edit_user' ) ) return $query;
$user_id = $user->ID;
$user_branch_number = get_user_meta($user_id, 'user_branch_number', true);
$query->query_vars['meta_key'] = 'user_branch_number';
$query->query_vars['meta_value'] = $user_branch_number;
$query->query_vars['meta_compare'] = '=';
}
add_action('pre_user_query', 'modify_user_list');
If I print_r the query it will show that the query_vars have been updated appropriately, but the user list in the admin panel is unaffected - same old list of every single user.
A: You are using pre_user_query according to WordPress documentation
Fires after the WP_User_Query has been parsed, and before the query is
executed
Then you should use pre_get_users just like pre_get_posts when your arguments have some meaning to WordPress.
pre_get_users Fires before the WP_User_Query has been parsed
Replace your hook with
add_action('pre_get_users', 'modify_user_list');
| Q: pre_user_query meta_query admin user list I'm attempting to use pre_user_query' to change the query to include somemeta_query` variables.
My goal is to only display users in the user list if they share a common meta_value with the current logged in user...
function modify_user_list($query){
$user = wp_get_current_user();
if( ! current_user_can( 'edit_user' ) ) return $query;
$user_id = $user->ID;
$user_branch_number = get_user_meta($user_id, 'user_branch_number', true);
$query->query_vars['meta_key'] = 'user_branch_number';
$query->query_vars['meta_value'] = $user_branch_number;
$query->query_vars['meta_compare'] = '=';
}
add_action('pre_user_query', 'modify_user_list');
If I print_r the query it will show that the query_vars have been updated appropriately, but the user list in the admin panel is unaffected - same old list of every single user.
A: You are using pre_user_query according to WordPress documentation
Fires after the WP_User_Query has been parsed, and before the query is
executed
Then you should use pre_get_users just like pre_get_posts when your arguments have some meaning to WordPress.
pre_get_users Fires before the WP_User_Query has been parsed
Replace your hook with
add_action('pre_get_users', 'modify_user_list');
| wordpress | {
"language": "en",
"length": 160,
"provenance": "stackexchange_00019.jsonl.gz:454876",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/184936"
} | [
0.09783935546875,
0.013275146484375,
0.0004317760467529297,
-0.07183837890625,
0.047943115234375,
-0.0213165283203125,
0.0167236328125,
-0.02532958984375,
-0.01190948486328125,
0.03900146484375,
-0.01169586181640625,
-0.020172119140625,
0.013885498046875,
-0.0167999267578125,
-0.01483917236328125,
-0.02764892578125,
0.03985595703125,
-0.00710296630859375,
0.004543304443359375,
-0.009307861328125,
-0.00392913818359375,
0.01148223876953125,
0.031707763671875,
0.040924072265625,
0.01239013671875,
-0.026824951171875,
0.01378631591796875,
0.0006837844848632812,
0.0130767822265625,
0.0026569366455078125,
0.00402069091796875,
-0.01059722900390625,
0.001956939697265625,
0.01885986328125,
0.004428863525390625,
0.0190582275390625,
0.0196685791015625,
0.0081939697265625,
0.033538818359375,
-0.00832366943359375,
0.0286865234375,
-0.01403045654296875,
-0.0716552734375,
0.031890869140625,
-0.050811767578125,
-0.06427001953125,
0.028900146484375,
0.00630950927734375,
0.0218963623046875,
0.01126861572265625,
0.0030155181884765625,
0.0419921875,
0.01145172119140625,
-0.00328826904296875,
0.01971435546875,
0.041717529296875,
-0.0234375,
-0.0312042236328125,
0.0545654296875,
0.01134490966796875,
-0.0197296142578125,
-0.0665283203125,
0.033111572265625,
-0.057037353515625,
0.01340484619140625,
-0.0305938720703125,
0.016265869140625,
0.0270538330078125,
-0.022308349609375,
-0.0035915374755859375,
0.02325439453125,
0.0204315185546875,
-0.000732421875,
0.0247039794921875,
-0.002231597900390625,
-0.0052642822265625,
0.00897216796875,
0.021209716796875,
0.02520751953125,
0.032257080078125,
0.00948333740234375,
-0.00811767578125,
-0.049072265625,
0.033966064453125,
-0.0246124267578125,
0.0260467529296875,
-0.017730712890625,
-0.0191650390625,
-0.0322265625,
-0.04534912109375,
-0.0211181640625,
-0.025634765625,
-0.0279693603515625,
-0.038909912109375,
-0.028167724609375,
-0.03863525390625,
0.00921630859375,
0.03717041015625,
-0.0286407470703125,
-0.0217437744140625,
-0.0234375,
0.003444671630859375,
-0.063232421875,
0.00612640380859375,
-0.0017347335815429688,
0.03814697265625,
-0.0112152099609375,
0.06494140625,
0.030914306640625,
0.0413818359375,
0.01551055908203125,
-0.021881103515625,
-0.038543701171875,
-0.00957489013671875,
-0.034942626953125,
0.024078369140625,
-0.051513671875,
-0.02093505859375,
-0.0117340087890625,
-0.0004189014434814453,
0.0129852294921875,
0.018157958984375,
0.0196380615234375,
-0.0204315185546875,
-0.0013475418090820312,
-0.01934814453125,
-0.01605224609375,
-0.0253753662109375,
-0.0350341796875,
0.06610107421875,
-0.011505126953125,
-0.0186614990234375,
0.052734375,
0.043426513671875,
-0.0033626556396484375,
-0.037689208984375,
-0.0020999908447265625,
-0.0350341796875,
-0.012725830078125,
0.048492431640625,
-0.025177001953125,
-0.0750732421875,
-0.002536773681640625,
-0.006870269775390625,
0.0214996337890625,
0.04742431640625,
0.031005859375,
-0.01763916015625,
-0.020904541015625,
-0.044464111328125,
-0.0301666259765625,
0.000629425048828125,
-0.01204681396484375,
0.037445068359375,
0.00862884521484375,
0.039398193359375,
0.018463134765625,
-0.0029354095458984375,
-0.0193939208984375,
-0.0006127357482910156,
-0.0147247314453125,
0.0021495819091796875,
0.03326416015625,
-0.00275421142578125,
-0.040496826171875,
0.0020961761474609375,
-0.0175018310546875,
-0.0146942138671875,
0.025421142578125,
0.024932861328125,
0.06634521484375,
0.0019207000732421875,
0.07763671875,
0.00037169456481933594,
-0.012786865234375,
-0.0287017822265625,
-0.01763916015625,
0.0308380126953125,
0.047119140625,
-0.01666259765625,
-0.0224761962890625,
-0.0259552001953125,
0.0780029296875,
-0.0192718505859375,
-0.05865478515625,
0.04583740234375,
-0.0003037452697753906,
0.050689697265625,
0.0283966064453125,
-0.001911163330078125,
0.036285400390625,
0.038055419921875,
-0.010498046875,
0.00772857666015625,
-0.004360198974609375,
-0.032012939453125,
0.036529541015625,
-0.0032634735107421875,
0.004352569580078125,
0.010406494140625,
0.030975341796875,
-0.013763427734375,
0.0021038055419921875,
-0.01287078857421875,
-0.1220703125,
0.0164031982421875,
-0.04730224609375,
0.026214599609375,
0.020233154296875,
0.0204315185546875,
-0.0034275054931640625,
-0.005687713623046875,
-0.00836181640625,
0.01360321044921875,
-0.01413726806640625,
0.031768798828125,
-0.0188751220703125,
0.04449462890625,
0.032135009765625,
0.0310516357421875,
0.048431396484375,
-0.0262298583984375,
0.0416259765625,
-0.0251312255859375,
0.051849365234375,
-0.006000518798828125,
-0.0154876708984375,
-0.0208740234375,
0.040618896484375,
-0.0247650146484375,
0.0101776123046875,
0.04840087890625,
0.05487060546875,
0.062347412109375,
-0.0290985107421875,
-0.003734588623046875,
0.0107879638671875,
-0.01377105712890625,
-0.00409698486328125,
0.02716064453125,
0.026275634765625,
0.0096435546875,
-0.0093994140625,
-0.00838470458984375,
0.043243408203125,
0.0022258758544921875,
0.02471923828125,
-0.01116943359375,
-0.0098876953125,
0.035797119140625,
-0.0020732879638671875,
0.002124786376953125,
0.006397247314453125,
-0.03021240234375,
0.0023651123046875,
0.021881103515625,
0.01142120361328125,
0.0084075927734375,
-0.0113067626953125,
-0.0158233642578125,
-0.00571441650390625,
-0.040679931640625,
-0.0286712646484375,
-0.0085906982421875,
0.0027942657470703125,
-0.022674560546875,
-0.0032901763916015625,
-0.0037784576416015625,
0.005168914794921875,
-0.0246429443359375,
0.01305389404296875,
-0.032318115234375,
0.00658416748046875,
-0.006862640380859375,
-0.032867431640625,
0.0034275054931640625,
-0.027313232421875,
0.01763916015625,
0.0163116455078125,
-0.0217132568359375,
0.0082855224609375,
0.0198516845703125,
0.005161285400390625,
0.005542755126953125,
-0.00677490234375,
-0.004863739013671875,
0.0260467529296875,
0.042144775390625,
0.0006203651428222656,
-0.005298614501953125,
0.029632568359375,
-0.01471710205078125,
-0.03668212890625,
0.041748046875,
-0.05126953125,
-0.02423095703125,
-0.003810882568359375,
-0.0270843505859375,
0.021697998046875,
-0.00841522216796875,
0.06646728515625,
0.072998046875,
0.034332275390625,
-0.0089111328125,
0.000667572021484375,
-0.0208892822265625,
-0.0285491943359375,
0.052001953125,
0.01078033447265625,
-0.05950927734375,
0.0154876708984375,
0.039794921875,
0.0181732177734375,
0.0517578125,
0.00910186767578125,
-0.0245208740234375,
0.0167083740234375,
0.0285797119140625,
0.00811767578125,
-0.018524169921875,
-0.0328369140625,
-0.05474853515625,
-0.0090484619140625,
-0.026397705078125,
-0.015045166015625,
0.03045654296875,
-0.02703857421875,
0.0166473388671875,
-0.005748748779296875,
-0.039306640625,
-0.036865234375,
-0.04693603515625,
-0.0255126953125,
0.045928955078125,
-0.0034923553466796875,
-0.00519561767578125,
0.0009450912475585938,
0.046051025390625,
-0.005916595458984375,
-0.06610107421875,
-0.027587890625,
0.03192138671875,
-0.0145111083984375,
-0.01300048828125,
0.007843017578125,
-0.007293701171875,
0.034271240234375,
0.004787445068359375,
0.0518798828125,
0.026885986328125,
-0.038848876953125,
-0.016754150390625,
0.043243408203125,
-0.00008302927017211914,
0.07513427734375,
-0.05499267578125,
-0.0849609375,
0.042510986328125,
0.0560302734375,
-0.01959228515625,
0.00885772705078125,
-0.00955963134765625,
-0.0247039794921875,
0.01140594482421875,
0.0094451904296875,
-0.00937652587890625,
0.013397216796875,
-0.006744384765625,
0.02630615234375,
0.02099609375,
-0.0030689239501953125,
0.003520965576171875,
-0.0220947265625,
0.0012769699096679688,
0.02392578125,
0.006153106689453125,
0.004856109619140625,
-0.01412200927734375,
0.01464080810546875,
-0.00921630859375,
0.03009033203125,
0.010955810546875,
0.012115478515625,
-0.0026988983154296875,
-0.0009002685546875,
0.051513671875,
-0.007160186767578125,
0.026519775390625,
-0.06561279296875,
-0.0291595458984375,
-0.06854248046875,
0.061004638671875,
0.0111236572265625,
-0.023162841796875,
0.0204315185546875,
0.0113372802734375,
-0.054412841796875,
-0.012969970703125,
-0.040771484375,
-0.0051422119140625,
-0.059661865234375,
-0.0253753662109375,
-0.0083465576171875,
-0.029754638671875,
-0.039276123046875,
0.0184783935546875,
-0.0723876953125,
-0.028533935546875,
0.0206756591796875,
-0.008026123046875,
0.004486083984375,
-0.0105743408203125,
-0.0203857421875,
-0.0204620361328125,
-0.0007076263427734375,
-0.013092041015625,
-0.08349609375,
-0.01611328125,
-0.01078033447265625,
0.053466796875,
0.01983642578125,
-0.0301666259765625,
-0.04144287109375,
0.02716064453125,
0.0170440673828125,
0.006824493408203125,
0.004795074462890625,
-0.01192474365234375,
-0.0013799667358398438,
-0.0164337158203125,
-0.0086822509765625,
-0.0251922607421875,
0.006618499755859375,
-0.0124969482421875,
0.0011529922485351562,
-0.0270843505859375,
-0.055938720703125,
-0.04852294921875,
-0.0316162109375,
-0.022308349609375,
-0.0634765625,
-0.043609619140625,
-0.0162353515625,
0.012969970703125,
-0.0237274169921875,
0.01140594482421875,
-0.047576904296875,
-0.06597900390625,
0.0034999847412109375,
-0.0107421875,
0.0022220611572265625,
-0.00186920166015625,
0.03228759765625,
0.0247344970703125,
-0.01139068603515625,
0.0362548828125,
-0.00452423095703125,
0.032745361328125,
-0.01812744140625,
0.0077362060546875,
0.01151275634765625,
-0.0228271484375,
0.01806640625,
-0.00765228271484375,
0.016021728515625,
-0.006359100341796875,
0.0198822021484375,
-0.001483917236328125,
-0.0262908935546875,
0.009521484375,
0.00399017333984375,
-0.0120697021484375,
0.00258636474609375,
0.003993988037109375,
-0.028900146484375,
0.0228424072265625,
0.022064208984375,
0.0151519775390625,
-0.0021419525146484375,
-0.020050048828125,
-0.03729248046875,
0.0201263427734375,
-0.0037136077880859375,
0.0058746337890625,
-0.014617919921875,
0.019683837890625,
-0.0150146484375,
-0.00791168212890625,
-0.0269317626953125,
-0.00563812255859375,
0.00616455078125,
-0.016265869140625,
0.0114288330078125,
-0.04400634765625,
-0.052032470703125,
-0.01031494140625,
-0.0014257431030273438,
0.082763671875,
-0.00360107421875,
-0.03448486328125,
0.00046253204345703125,
-0.008819580078125,
0.03533935546875,
0.017822265625,
0.0270233154296875,
0.07421875,
0.0350341796875,
0.004177093505859375,
-0.044342041015625,
-0.00803375244140625,
-0.0052490234375,
-0.0648193359375,
0.0364990234375,
0.0156402587890625,
0.004001617431640625,
0.01538848876953125,
0.058837890625,
-0.0014314651489257812,
0.04248046875,
-0.0286102294921875,
0.0362548828125,
0.034423828125,
-0.0114898681640625,
0.004878997802734375,
0.04571533203125,
-0.004894256591796875,
-0.023284912109375,
0.006969451904296875,
-0.0032939910888671875,
0.018280029296875,
0.0272979736328125,
0.00547027587890625,
0.031402587890625,
0.0028743743896484375,
-0.0231475830078125,
-0.034210205078125,
0.0003819465637207031,
0.0252532958984375,
-0.0091400146484375,
-0.028076171875,
-0.03912353515625,
-0.046630859375,
0.0178985595703125,
-0.039642333984375,
-0.00731658935546875,
0.013671875,
-0.01555633544921875,
0.04449462890625,
-0.041961669921875,
0.031768798828125,
-0.034423828125,
-0.0259246826171875,
0.01203155517578125,
-0.012298583984375,
-0.0182037353515625,
0.039947509765625,
0.01611328125,
-0.0259246826171875,
-0.02325439453125,
0.059967041015625,
-0.0011072158813476562,
0.0272369384765625,
-0.07373046875,
0.024383544921875,
-0.0914306640625,
-0.0167236328125,
0.0673828125,
0.0293121337890625,
-0.0653076171875,
-0.004085540771484375,
-0.060516357421875,
-0.0142974853515625,
-0.0017251968383789062,
-0.0157470703125,
-0.0443115234375,
-0.0016660690307617188,
0.002017974853515625,
0.0296630859375,
-0.02020263671875,
-0.0242767333984375,
-0.0083770751953125,
0.01003265380859375,
0.01861572265625,
0.074462890625,
-0.0218505859375,
0.043609619140625,
-0.0275421142578125,
0.04864501953125,
-0.005840301513671875,
0.01323699951171875,
-0.00665283203125,
-0.0183258056640625,
-0.013885498046875,
-0.01546478271484375,
-0.0068359375,
0.004364013671875,
0.0071868896484375,
-0.0033435821533203125,
0.0248870849609375,
-0.004520416259765625,
0.0138397216796875,
0.01702880859375,
0.0189056396484375,
-0.0088348388671875,
-0.032501220703125,
0.012237548828125,
-0.0335693359375,
0.07061767578125,
0.0138397216796875,
-0.001087188720703125,
-0.01837158203125,
-0.004993438720703125,
-0.016448974609375,
0.01215362548828125,
-0.028961181640625,
-0.018798828125,
-0.054779052734375,
0.0340576171875,
0.021453857421875,
-0.0071868896484375,
0.006069183349609375,
-0.012115478515625,
0.004634857177734375,
0.0004639625549316406,
-0.0192718505859375,
-0.001667022705078125,
0.031951904296875,
0.044586181640625,
-0.005313873291015625,
0.0017023086547851562,
0.053314208984375,
-0.0209197998046875,
0.0071868896484375,
0.058135986328125,
0.05902099609375,
-0.09075927734375,
-0.003082275390625,
-0.0017910003662109375,
-0.00738525390625,
0.03009033203125,
0.01457977294921875,
-0.01201629638671875,
-0.038787841796875,
0.051300048828125,
-0.00029277801513671875,
0.012054443359375,
0.03436279296875,
0.0090484619140625,
-0.0199432373046875,
-0.01328277587890625,
0.0095062255859375,
-0.002094268798828125,
0.057403564453125,
0.0178985595703125,
-0.06341552734375,
0.036773681640625,
-0.032073974609375,
0.021209716796875,
0.010162353515625,
-0.01568603515625,
-0.09368896484375,
-0.00341796875,
0.01250457763671875,
-0.0307769775390625,
-0.010284423828125,
0.053070068359375,
0.03216552734375,
0.0240631103515625,
0.0299530029296875,
-0.031829833984375,
0.005252838134765625,
-0.036529541015625,
-0.047454833984375,
-0.04168701171875,
0.007129669189453125,
0.036651611328125,
-0.02850341796875,
0.035308837890625,
-0.0077056884765625,
-0.0229949951171875,
-0.00705718994140625,
-0.013153076171875,
0.055389404296875,
-0.047332763671875,
-0.0009593963623046875,
0.0101776123046875,
0.00433349609375,
0.01248931884765625,
0.026336669921875,
-0.0245361328125,
-0.02398681640625,
-0.0419921875,
-0.017578125,
-0.10260009765625,
-0.0035114288330078125,
-0.0234527587890625,
-0.06707763671875,
0.0394287109375,
0.0013494491577148438,
0.04486083984375,
0.0146026611328125,
-0.0019483566284179688,
-0.00740814208984375,
-0.0182952880859375,
-0.06500244140625,
0.0859375,
0.0182647705078125,
0.1085205078125,
-0.09881591796875,
-0.030242919921875,
0.04620361328125,
0.04571533203125,
0.05621337890625,
0.027252197265625,
-0.077392578125,
-0.031585693359375,
0.01030731201171875,
0.030181884765625,
0.005306243896484375,
0.057830810546875,
0.005252838134765625,
0.038330078125,
0.022796630859375,
-0.0253753662109375,
0.0328369140625,
-0.03399658203125,
-0.050262451171875,
0.0281524658203125,
-0.0014476776123046875,
0.003204345703125,
-0.01904296875,
0.050384521484375,
-0.020660400390625,
-0.01555633544921875,
0.01357269287109375,
-0.037872314453125,
0.0102691650390625,
0.0279388427734375,
0.00742340087890625,
0.0323486328125,
-0.001140594482421875,
-0.016876220703125,
0.030029296875,
0.01250457763671875,
0.01129150390625,
0.0318603515625,
0.00042891502380371094,
0.0360107421875,
0.03277587890625,
0.0024318695068359375,
0.0328369140625,
0.02880859375,
0.057647705078125,
0.027313232421875,
0.027618408203125,
-0.049407958984375,
-0.00872802734375,
0.046661376953125,
0.08441162109375,
-0.0430908203125,
-0.048797607421875,
0.01074981689453125,
-0.00016546249389648438,
-0.008148193359375,
0.033355712890625,
-0.0075225830078125,
0.030059814453125,
0.07220458984375,
-0.047393798828125,
-0.00839996337890625,
-0.020172119140625,
0.006626129150390625,
-0.0255584716796875,
-0.0028972625732421875,
0.02130126953125,
-0.01605224609375,
-0.0218353271484375,
-0.0278472900390625,
0.0189208984375,
0.0121917724609375,
0.0306243896484375,
-0.01428985595703125,
0.053192138671875,
-0.002536773681640625,
-0.0201568603515625,
0.0175933837890625,
-0.0178680419921875,
0.022705078125,
-0.0180206298828125,
-0.01331329345703125,
-0.011474609375,
0.0177459716796875,
0.0357666015625,
0.0112152099609375,
0.025390625,
-0.014404296875,
-0.04083251953125,
0.0133819580078125,
0.0251617431640625,
-0.0377197265625,
0.0377197265625,
0.01275634765625,
0.05780029296875,
0.0215301513671875,
0.0017995834350585938,
-0.047698974609375,
0.08221435546875,
0.0198974609375,
0.0021228790283203125,
0.04290771484375,
0.000698089599609375,
-0.007373809814453125,
0.00975799560546875,
-0.037139892578125,
0.0565185546875,
0.01070404052734375,
-0.0323486328125,
0.01226043701171875,
-0.049346923828125,
-0.019989013671875,
-0.0013942718505859375,
0.022552490234375,
-0.00460052490234375,
0.00974273681640625,
-0.014892578125,
-0.02777099609375,
0.0183563232421875,
0.0018548965454101562,
-0.01361083984375,
0.0078582763671875,
0.01364898681640625,
-0.0271453857421875,
-0.0187225341796875,
-0.00798797607421875,
-0.003261566162109375,
0.00787353515625,
0.01837158203125,
0.02685546875,
0.01099395751953125,
0.01178741455078125,
0.006183624267578125,
0.0007991790771484375,
-0.007732391357421875,
-0.0257415771484375,
0.06524658203125,
-0.048431396484375,
-0.0305633544921875,
0.01439666748046875,
-0.027496337890625,
0.025146484375,
0.0308685302734375,
-0.01148223876953125,
0.037139892578125,
-0.018890380859375,
0.005985260009765625,
-0.033782958984375,
-0.006778717041015625,
-0.0220489501953125,
-0.0008635520935058594,
-0.0208282470703125,
-0.01284027099609375,
0.0458984375,
0.002696990966796875,
-0.035003662109375,
0.010406494140625,
-0.00016868114471435547,
-0.036102294921875,
0.00983428955078125,
-0.005035400390625,
0.0211944580078125,
0.0293121337890625,
-0.0016965866088867188,
0.048492431640625,
-0.03692626953125,
-0.031036376953125,
0.013519287109375,
0.0179290771484375,
-0.040740966796875,
-0.006137847900390625,
0.048095703125,
0.006214141845703125,
-0.01029205322265625,
0.04949951171875,
0.007366180419921875,
0.0017290115356445312,
-0.0278167724609375,
0.0153961181640625,
-0.0274200439453125,
-0.04229736328125,
-0.04608154296875,
-0.0258941650390625,
-0.0009889602661132812,
0.019317626953125,
-0.01213836669921875,
-0.052520751953125,
-0.083984375,
-0.0027408599853515625,
0.035430908203125,
0.016937255859375,
-0.09222412109375,
0.0582275390625,
-0.012908935546875,
0.0252685546875,
-0.0190887451171875,
-0.057586669921875,
0.0169219970703125,
0.044219970703125,
0.0076141357421875,
0.004253387451171875,
-0.01251220703125,
-0.00984954833984375,
0.01074981689453125,
0.00024700164794921875,
0.0269012451171875,
0.01043701171875,
-0.0208740234375,
0.009307861328125,
-0.03192138671875,
0.039703369140625,
-0.0521240234375,
-0.0291595458984375,
-0.005947113037109375,
0.01142120361328125,
0.005115509033203125,
-0.05230712890625,
-0.006622314453125,
-0.03619384765625,
0.008453369140625,
0.00959014892578125,
0.0185699462890625,
0.06146240234375,
-0.01313018798828125,
-0.08050537109375,
0.051910400390625,
-0.0254974365234375,
-0.037841796875,
-0.026031494140625,
0.042449951171875,
0.0031261444091796875,
-0.0199127197265625,
-0.009735107421875,
-0.005115509033203125,
-0.01404571533203125,
-0.01015472412109375,
0.01470947265625,
-0.00830841064453125,
0.046600341796875,
-0.00547027587890625,
-0.0863037109375,
-0.0219268798828125,
-0.03173828125,
0.0207672119140625,
-0.0153961181640625,
0.01206207275390625,
0.032318115234375,
0.032745361328125,
-0.004131317138671875,
0.051910400390625,
0.034210205078125,
-0.01413726806640625,
-0.043914794921875,
0.0011453628540039062,
-0.0154266357421875,
-0.0195159912109375,
0.09588623046875,
0.03448486328125,
0.022369384765625,
-0.0156402587890625,
-0.001007080078125,
-0.0201416015625,
0.00524139404296875,
-0.025299072265625,
0.01331329345703125,
-0.055206298828125,
-0.0221710205078125,
0.0083770751953125,
-0.051239013671875,
0.00020694732666015625,
-0.02490234375,
-0.06524658203125,
0.0222015380859375,
-0.012725830078125,
-0.002696990966796875,
-0.0188446044921875,
-0.0220947265625,
0.01751708984375,
-0.035491943359375,
-0.0821533203125,
0.00959014892578125,
0.0194549560546875,
-0.06585693359375,
-0.040283203125,
0.0306854248046875,
-0.01541900634765625,
-0.0200653076171875,
0.0101318359375,
0.020355224609375,
0.0286102294921875,
0.003387451171875,
-0.04351806640625,
-0.00865936279296875,
0.0096282958984375,
-0.01751708984375,
-0.004299163818359375,
0.027984619140625,
0.0555419921875,
0.007671356201171875,
0.06353759765625,
-0.029144287109375,
0.0328369140625,
-0.01474761962890625,
0.0311126708984375,
0.0154876708984375,
0.01074981689453125,
0.0545654296875,
-0.0009503364562988281,
-0.017059326171875,
-0.0024623870849609375,
-0.05975341796875,
-0.048919677734375,
-0.00691986083984375,
0.019012451171875,
-0.019500732421875,
0.01557159423828125
]
|
9df9f6e2f6a3e0d4a1f827daf1e4f5a49fa467b6 | Wordpress Stackexchange
Q: How do you access the Product Short Description in a WooCommerce email template? I would like to output the Product Short Description beneath the product name inside the order items table inside WooCommerce emails. I think I know where to place code inside the email template file, but I don't know how to access the description of an item. I don't see any mechanism to retrieve it. What do I need to do to echo out the field?
Thanks in advance!
A: I finally tried using var_dump() on $item and $_product, which are both used in the email-order-items.php template. $_product revealed a post object, which itself has a post_excerpt property, which looks like it holds the contents of the "Product Short Description" from the WooCommerce product form.
So, to add the description beneath the item name, I added this to my code:
echo '<br/>' . $_product->post->post_excerpt;
Voilà! The short description appears in the email!
Hope this helps someone else! Took me a couple hours of frustration to get it.
| Q: How do you access the Product Short Description in a WooCommerce email template? I would like to output the Product Short Description beneath the product name inside the order items table inside WooCommerce emails. I think I know where to place code inside the email template file, but I don't know how to access the description of an item. I don't see any mechanism to retrieve it. What do I need to do to echo out the field?
Thanks in advance!
A: I finally tried using var_dump() on $item and $_product, which are both used in the email-order-items.php template. $_product revealed a post object, which itself has a post_excerpt property, which looks like it holds the contents of the "Product Short Description" from the WooCommerce product form.
So, to add the description beneath the item name, I added this to my code:
echo '<br/>' . $_product->post->post_excerpt;
Voilà! The short description appears in the email!
Hope this helps someone else! Took me a couple hours of frustration to get it.
| wordpress | {
"language": "en",
"length": 170,
"provenance": "stackexchange_00019.jsonl.gz:454880",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/184952"
} | [
-0.0219879150390625,
-0.031951904296875,
-0.0149688720703125,
0.012237548828125,
-0.0455322265625,
-0.0166778564453125,
0.004634857177734375,
-0.01093292236328125,
0.01287841796875,
0.0626220703125,
-0.0457763671875,
-0.0186920166015625,
0.0269927978515625,
0.00894927978515625,
-0.045684814453125,
-0.02044677734375,
0.034149169921875,
0.0133819580078125,
0.04840087890625,
0.023834228515625,
-0.0148162841796875,
0.061920166015625,
-0.006938934326171875,
0.0077056884765625,
-0.01224517822265625,
-0.01035308837890625,
0.152099609375,
-0.0347900390625,
0.035888671875,
-0.007335662841796875,
0.03643798828125,
-0.0533447265625,
0.04583740234375,
-0.0182342529296875,
-0.0137176513671875,
0.02581787109375,
-0.00902557373046875,
-0.01287078857421875,
-0.009033203125,
0.01450347900390625,
0.048065185546875,
-0.04205322265625,
0.0217742919921875,
-0.015716552734375,
0.01392364501953125,
0.01529693603515625,
0.004894256591796875,
-0.035400390625,
0.0029354095458984375,
0.0221405029296875,
0.0183258056640625,
0.032257080078125,
0.0117645263671875,
-0.0325927734375,
-0.006999969482421875,
-0.004680633544921875,
-0.05743408203125,
0.043914794921875,
0.01007080078125,
0.006755828857421875,
0.0062713623046875,
0.0005588531494140625,
0.0046539306640625,
-0.0016775131225585938,
0.020233154296875,
0.01403045654296875,
0.0472412109375,
0.03533935546875,
-0.01277923583984375,
-0.005382537841796875,
0.01001739501953125,
-0.01285552978515625,
0.023345947265625,
-0.0031909942626953125,
-0.0050201416015625,
-0.0034236907958984375,
0.01285552978515625,
0.0030956268310546875,
0.02093505859375,
-0.0080718994140625,
-0.0133056640625,
-0.00498199462890625,
-0.0377197265625,
-0.0184478759765625,
0.0112457275390625,
0.00913238525390625,
-0.01812744140625,
-0.00893402099609375,
-0.0048828125,
-0.02020263671875,
-0.019744873046875,
-0.003147125244140625,
-0.004489898681640625,
0.00792694091796875,
-0.04095458984375,
-0.0189208984375,
-0.004852294921875,
0.032196044921875,
-0.007236480712890625,
0.028045654296875,
-0.01617431640625,
-0.0239715576171875,
0.04119873046875,
-0.034912109375,
-0.0109405517578125,
-0.020538330078125,
0.01152801513671875,
-0.0052032470703125,
0.0181121826171875,
0.0240631103515625,
-0.035247802734375,
0.01020050048828125,
-0.03240966796875,
-0.0491943359375,
0.0200958251953125,
0.034149169921875,
-0.051605224609375,
0.029876708984375,
0.02227783203125,
0.0086822509765625,
0.0256500244140625,
0.0477294921875,
0.0301971435546875,
-0.03045654296875,
-0.034332275390625,
-0.023956298828125,
-0.00469207763671875,
-0.06768798828125,
0.024261474609375,
-0.00408172607421875,
-0.00365447998046875,
0.0200042724609375,
-0.00907135009765625,
0.005764007568359375,
-0.023895263671875,
-0.0008678436279296875,
-0.015625,
0.040008544921875,
0.02398681640625,
-0.0255279541015625,
0.02728271484375,
0.004039764404296875,
0.0305633544921875,
0.0091094970703125,
-0.0244293212890625,
0.0211944580078125,
0.0198211669921875,
0.01371002197265625,
-0.00611114501953125,
-0.029052734375,
-0.025360107421875,
0.0164794921875,
0.0054473876953125,
0.034210205078125,
0.016357421875,
0.01025390625,
0.0223846435546875,
-0.007572174072265625,
-0.0016660690307617188,
-0.023712158203125,
-0.0260162353515625,
-0.00322723388671875,
0.03253173828125,
-0.049285888671875,
-0.0657958984375,
0.0136871337890625,
-0.038604736328125,
-0.0135498046875,
0.02740478515625,
0.03192138671875,
0.0086212158203125,
-0.02294921875,
-0.00839996337890625,
0.007335662841796875,
-0.009368896484375,
-0.00006020069122314453,
-0.018341064453125,
-0.01285552978515625,
0.05615234375,
-0.035736083984375,
-0.05126953125,
-0.03656005859375,
0.06768798828125,
-0.0260162353515625,
-0.034576416015625,
0.030853271484375,
0.0166473388671875,
0.030670166015625,
-0.005901336669921875,
0.01152801513671875,
0.0290069580078125,
0.035369873046875,
-0.015106201171875,
0.0282440185546875,
-0.005279541015625,
-0.03143310546875,
0.0005970001220703125,
0.01044464111328125,
-0.0155792236328125,
-0.0191802978515625,
0.00872039794921875,
-0.0007524490356445312,
0.034332275390625,
-0.0163421630859375,
0.0188751220703125,
0.0095977783203125,
-0.009033203125,
0.0394287109375,
-0.045501708984375,
0.0005402565002441406,
0.0265350341796875,
-0.015380859375,
-0.007965087890625,
-0.042510986328125,
-0.0010213851928710938,
-0.01175689697265625,
-0.03759765625,
0.09283447265625,
0.00585174560546875,
0.07208251953125,
0.0164947509765625,
-0.0595703125,
0.03204345703125,
0.01256561279296875,
0.018951416015625,
0.03558349609375,
-0.0005140304565429688,
0.020843505859375,
0.0794677734375,
0.044525146484375,
0.0291900634765625,
-0.07379150390625,
0.0214080810546875,
-0.01177215576171875,
-0.036407470703125,
0.023162841796875,
0.0244293212890625,
-0.015960693359375,
-0.0075836181640625,
0.02166748046875,
0.0244903564453125,
0.06439208984375,
0.0234527587890625,
0.037353515625,
0.10455322265625,
-0.0035762786865234375,
0.0003285408020019531,
-0.005458831787109375,
0.0023365020751953125,
0.0533447265625,
-0.0081939697265625,
0.02508544921875,
0.00775146484375,
-0.0040283203125,
-0.01153564453125,
0.048187255859375,
0.00800323486328125,
-0.0155792236328125,
-0.029754638671875,
0.05792236328125,
-0.01348876953125,
0.00559234619140625,
0.00316619873046875,
-0.0099639892578125,
0.0347900390625,
0.051422119140625,
0.05291748046875,
0.04052734375,
-0.052398681640625,
0.0285186767578125,
0.01090240478515625,
0.032623291015625,
0.00672149658203125,
0.02423095703125,
-0.02740478515625,
-0.031219482421875,
-0.0131072998046875,
-0.0020160675048828125,
-0.00937652587890625,
-0.0184478759765625,
0.00818634033203125,
0.0061492919921875,
0.0254974365234375,
0.002178192138671875,
0.0084381103515625,
-0.051910400390625,
0.026947021484375,
0.0360107421875,
0.025115966796875,
0.0230255126953125,
0.01548004150390625,
0.052734375,
-0.0146026611328125,
0.053314208984375,
-0.02178955078125,
-0.0026798248291015625,
0.0091094970703125,
-0.02093505859375,
0.05450439453125,
-0.0308074951171875,
0.01413726806640625,
0.05865478515625,
-0.03619384765625,
0.03289794921875,
0.0196533203125,
-0.04168701171875,
0.0142822265625,
0.0034275054931640625,
-0.0025997161865234375,
0.026580810546875,
-0.055419921875,
0.0701904296875,
0.0179290771484375,
0.04583740234375,
-0.0164031982421875,
-0.03216552734375,
0.009521484375,
0.0221099853515625,
-0.053131103515625,
-0.07537841796875,
0.0189971923828125,
-0.05767822265625,
-0.00691986083984375,
-0.0212554931640625,
-0.034942626953125,
-0.0206146240234375,
0.00971221923828125,
-0.0173797607421875,
-0.0157012939453125,
-0.046234130859375,
-0.05316162109375,
-0.064453125,
-0.06646728515625,
-0.0036945343017578125,
-0.00025081634521484375,
0.017974853515625,
0.0007534027099609375,
0.0011539459228515625,
-0.00872802734375,
-0.03485107421875,
-0.0044403076171875,
-0.00701904296875,
-0.0015163421630859375,
0.0178070068359375,
0.0114593505859375,
-0.042266845703125,
-0.037139892578125,
0.014739990234375,
-0.03424072265625,
-0.0177764892578125,
0.01241302490234375,
-0.01020050048828125,
0.0170440673828125,
-0.0031833648681640625,
0.033203125,
-0.0093841552734375,
-0.02325439453125,
0.0312042236328125,
0.0251922607421875,
-0.031036376953125,
-0.04559326171875,
-0.031890869140625,
-0.08447265625,
-0.003322601318359375,
0.05499267578125,
0.0181884765625,
-0.033355712890625,
0.00634002685546875,
0.006839752197265625,
-0.0032138824462890625,
0.039886474609375,
-0.02191162109375,
-0.01055908203125,
-0.0034694671630859375,
-0.0121002197265625,
-0.0287017822265625,
0.049560546875,
-0.0123291015625,
-0.004985809326171875,
0.0174102783203125,
0.01300048828125,
0.0009226799011230469,
-0.0028285980224609375,
-0.0325927734375,
-0.049835205078125,
0.034393310546875,
-0.03961181640625,
0.0167236328125,
-0.0312042236328125,
-0.03265380859375,
0.0012378692626953125,
0.0999755859375,
0.017547607421875,
-0.032440185546875,
0.005924224853515625,
0.0006036758422851562,
-0.006549835205078125,
-0.00019741058349609375,
-0.0114593505859375,
-0.00760650634765625,
-0.053955078125,
0.025054931640625,
-0.00786590576171875,
-0.0060882568359375,
-0.003269195556640625,
-0.0015077590942382812,
-0.02313232421875,
-0.037384033203125,
0.024322509765625,
0.037109375,
0.046173095703125,
0.0089569091796875,
-0.006103515625,
0.0292510986328125,
-0.03204345703125,
-0.02099609375,
-0.0052337646484375,
-0.02117919921875,
0.06805419921875,
0.00527191162109375,
-0.015625,
-0.0068817138671875,
-0.01242828369140625,
0.03961181640625,
0.011138916015625,
0.052520751953125,
-0.007564544677734375,
0.01861572265625,
-0.01297760009765625,
-0.034393310546875,
0.00965118408203125,
-0.040496826171875,
0.0233917236328125,
0.01166534423828125,
-0.02105712890625,
0.0277557373046875,
-0.0150909423828125,
0.01068878173828125,
0.02978515625,
-0.046539306640625,
-0.07684326171875,
-0.0242462158203125,
0.038421630859375,
0.02642822265625,
-0.0112152099609375,
0.037200927734375,
-0.0250244140625,
-0.0386962890625,
0.035736083984375,
0.0231475830078125,
-0.02435302734375,
-0.00531768798828125,
0.017822265625,
0.0252532958984375,
-0.032745361328125,
0.014434814453125,
0.0251617431640625,
0.060150146484375,
0.046173095703125,
0.00444793701171875,
0.013031005859375,
-0.040313720703125,
0.018768310546875,
0.055877685546875,
-0.0218963623046875,
0.016265869140625,
0.04620361328125,
0.01251220703125,
-0.012725830078125,
-0.01020050048828125,
-0.0280609130859375,
0.0008549690246582031,
-0.0064544677734375,
-0.042633056640625,
-0.007244110107421875,
-0.00666046142578125,
0.03594970703125,
-0.045806884765625,
0.08642578125,
-0.0201263427734375,
-0.059326171875,
0.0136871337890625,
-0.01348876953125,
0.006420135498046875,
0.01276397705078125,
0.0004992485046386719,
0.021728515625,
-0.0165557861328125,
0.0015010833740234375,
-0.02117919921875,
-0.0640869140625,
-0.0069427490234375,
0.0026226043701171875,
-0.01477813720703125,
-0.00975799560546875,
0.030914306640625,
-0.0008187294006347656,
0.019866943359375,
-0.0251007080078125,
-0.04486083984375,
-0.029205322265625,
-0.0157928466796875,
0.00572967529296875,
0.0285186767578125,
-0.0103912353515625,
0.0080718994140625,
0.051544189453125,
0.0280303955078125,
0.036376953125,
-0.0190887451171875,
0.05303955078125,
-0.0102996826171875,
0.0258636474609375,
-0.012298583984375,
-0.0007801055908203125,
0.01259613037109375,
0.06280517578125,
-0.038238525390625,
0.044830322265625,
-0.004917144775390625,
0.02813720703125,
0.005077362060546875,
0.05255126953125,
0.01119232177734375,
-0.035308837890625,
0.01458740234375,
0.01126861572265625,
-0.00330352783203125,
-0.047637939453125,
-0.01505279541015625,
0.020172119140625,
0.05047607421875,
-0.047088623046875,
-0.057769775390625,
0.03375244140625,
-0.045867919921875,
-0.005748748779296875,
0.0069580078125,
0.0015850067138671875,
-0.016265869140625,
-0.020660400390625,
-0.00238800048828125,
0.035919189453125,
0.0078582763671875,
-0.004787445068359375,
-0.0127716064453125,
-0.0255126953125,
-0.0025730133056640625,
-0.02130126953125,
-0.00577545166015625,
-0.0140228271484375,
-0.011199951171875,
-0.029022216796875,
0.0147857666015625,
0.027587890625,
-0.041046142578125,
-0.0478515625,
0.0025882720947265625,
-0.0167236328125,
0.036102294921875,
-0.04541015625,
0.020294189453125,
-0.03643798828125,
0.0229949951171875,
-0.07147216796875,
0.0139312744140625,
0.039276123046875,
0.0545654296875,
-0.032318115234375,
-0.00836944580078125,
-0.0153656005859375,
-0.0231170654296875,
0.006282806396484375,
-0.0286407470703125,
-0.032196044921875,
-0.0022754669189453125,
-0.035125732421875,
0.0192718505859375,
-0.0143585205078125,
0.024139404296875,
-0.018951416015625,
0.00005161762237548828,
-0.0263519287109375,
0.005893707275390625,
0.01561737060546875,
0.01922607421875,
-0.004970550537109375,
0.03582763671875,
0.01007080078125,
-0.0251617431640625,
-0.0491943359375,
-0.0131378173828125,
0.01331329345703125,
-0.023223876953125,
-0.02325439453125,
-0.038787841796875,
-0.0173797607421875,
0.006031036376953125,
0.029571533203125,
-0.009246826171875,
-0.006969451904296875,
-0.0244140625,
0.003993988037109375,
-0.033599853515625,
0.059600830078125,
-0.043243408203125,
-0.0362548828125,
0.007617950439453125,
-0.047576904296875,
0.0019054412841796875,
0.0261383056640625,
0.0116119384765625,
0.038238525390625,
-0.032501220703125,
0.0287628173828125,
0.0328369140625,
-0.036224365234375,
0.07568359375,
0.06201171875,
-0.0197296142578125,
0.0161895751953125,
0.0004067420959472656,
-0.0190277099609375,
-0.0239105224609375,
0.061248779296875,
-0.0222625732421875,
-0.03076171875,
0.0751953125,
0.0184326171875,
-0.036590576171875,
0.035552978515625,
-0.0345458984375,
0.031463623046875,
0.023712158203125,
0.0679931640625,
-0.051055908203125,
0.0081024169921875,
0.015777587890625,
-0.031707763671875,
0.00809478759765625,
-0.0067596435546875,
0.007671356201171875,
-0.050628662109375,
0.024383544921875,
0.00661468505859375,
-0.01277923583984375,
-0.0109100341796875,
-0.0372314453125,
0.0206298828125,
0.016387939453125,
0.053680419921875,
-0.006275177001953125,
-0.10772705078125,
-0.040771484375,
0.07073974609375,
-0.0443115234375,
-0.04791259765625,
-0.01264190673828125,
0.016082763671875,
-0.0007476806640625,
-0.056610107421875,
0.043609619140625,
-0.0237884521484375,
0.05462646484375,
0.0162811279296875,
0.00015974044799804688,
0.01187896728515625,
0.0406494140625,
-0.0218353271484375,
0.030792236328125,
-0.00540924072265625,
-0.00302886962890625,
0.01739501953125,
-0.0056610107421875,
-0.0026874542236328125,
0.033447265625,
-0.046539306640625,
0.00020372867584228516,
-0.039947509765625,
0.039093017578125,
-0.00887298583984375,
0.029327392578125,
0.049224853515625,
0.002971649169921875,
-0.03717041015625,
0.04730224609375,
0.0258026123046875,
-0.0258941650390625,
-0.01091766357421875,
0.04229736328125,
-0.00841522216796875,
0.06072998046875,
0.00887298583984375,
0.049530029296875,
-0.059326171875,
-0.00872802734375,
-0.10028076171875,
0.04351806640625,
0.006023406982421875,
0.041778564453125,
-0.00861358642578125,
-0.009124755859375,
-0.02178955078125,
-0.03466796875,
-0.0259552001953125,
0.022247314453125,
-0.01169586181640625,
0.08746337890625,
-0.0413818359375,
-0.03277587890625,
0.0400390625,
0.07244873046875,
0.044219970703125,
-0.0020599365234375,
0.01108551025390625,
0.0014324188232421875,
0.0521240234375,
-0.003978729248046875,
-0.040283203125,
0.0265655517578125,
0.037322998046875,
-0.0225830078125,
0.07891845703125,
0.01035308837890625,
0.046844482421875,
-0.01519012451171875,
0.05267333984375,
0.04132080078125,
0.0002658367156982422,
-0.00908660888671875,
0.0094451904296875,
0.009674072265625,
0.02423095703125,
-0.004451751708984375,
-0.00879669189453125,
-0.07305908203125,
-0.0054931640625,
0.04254150390625,
0.0022869110107421875,
-0.0153045654296875,
0.006763458251953125,
-0.036651611328125,
0.03472900390625,
-0.0133514404296875,
0.057525634765625,
0.036865234375,
0.01995849609375,
0.079833984375,
-0.0005764961242675781,
0.036224365234375,
0.0059661865234375,
-0.0272979736328125,
-0.006786346435546875,
-0.05316162109375,
-0.0059051513671875,
-0.070556640625,
0.0211639404296875,
0.0277099609375,
-0.01178741455078125,
-0.0157318115234375,
0.005619049072265625,
0.01474761962890625,
-0.00981903076171875,
-0.00841522216796875,
-0.041259765625,
-0.01422882080078125,
0.005771636962890625,
-0.00864410400390625,
-0.01039886474609375,
-0.028564453125,
0.0233917236328125,
0.057952880859375,
0.0187530517578125,
0.00852203369140625,
-0.045654296875,
-0.0833740234375,
-0.046539306640625,
0.04876708984375,
0.0037631988525390625,
0.0440673828125,
-0.004657745361328125,
0.056304931640625,
-0.0208282470703125,
-0.022369384765625,
-0.0019207000732421875,
0.02239990234375,
0.01009368896484375,
-0.01030731201171875,
-0.002872467041015625,
0.0024852752685546875,
0.002277374267578125,
0.016510009765625,
0.0174560546875,
0.0267181396484375,
0.025115966796875,
0.0164337158203125,
-0.01404571533203125,
-0.005321502685546875,
0.0382080078125,
-0.017059326171875,
0.05133056640625,
-0.0252532958984375,
0.034332275390625,
-0.01678466796875,
-0.0228271484375,
-0.058441162109375,
0.054107666015625,
-0.0061187744140625,
-0.04998779296875,
0.05877685546875,
-0.020355224609375,
-0.00843048095703125,
0.031463623046875,
-0.0309906005859375,
0.04730224609375,
-0.0263519287109375,
-0.031036376953125,
0.001953125,
-0.04644775390625,
-0.0091552734375,
-0.01971435546875,
0.018280029296875,
-0.0011873245239257812,
0.0340576171875,
0.013580322265625,
-0.0011625289916992188,
0.00537872314453125,
0.00351715087890625,
0.0234222412109375,
-0.0242767333984375,
0.006153106689453125,
-0.0088348388671875,
-0.04071044921875,
-0.01953125,
-0.0214080810546875,
0.0274810791015625,
0.03387451171875,
0.034088134765625,
0.0125885009765625,
0.035308837890625,
-0.06085205078125,
0.02520751953125,
-0.0592041015625,
-0.07696533203125,
0.07867431640625,
-0.0033779144287109375,
-0.0242462158203125,
0.0036640167236328125,
-0.014923095703125,
0.003940582275390625,
0.057037353515625,
-0.0029354095458984375,
0.01245880126953125,
-0.02691650390625,
0.03485107421875,
-0.027252197265625,
0.033660888671875,
-0.0191650390625,
-0.031097412109375,
-0.00887298583984375,
0.00855255126953125,
-0.0008635520935058594,
0.014434814453125,
0.01247406005859375,
0.0112762451171875,
0.023895263671875,
-0.029205322265625,
0.046112060546875,
-0.036407470703125,
0.073974609375,
0.0364990234375,
0.0133209228515625,
-0.01557159423828125,
0.0003788471221923828,
-0.0238800048828125,
0.031341552734375,
-0.02142333984375,
0.04095458984375,
0.0089569091796875,
-0.038360595703125,
-0.007503509521484375,
0.004001617431640625,
0.007232666015625,
-0.01495361328125,
0.0026760101318359375,
0.030670166015625,
-0.0264129638671875,
-0.01434326171875,
-0.00982666015625,
-0.031585693359375,
-0.0316162109375,
0.002048492431640625,
-0.0036983489990234375,
0.013458251953125,
-0.047637939453125,
-0.0049591064453125,
-0.042938232421875,
-0.0008482933044433594,
-0.0011568069458007812,
-0.0100860595703125,
-0.036376953125,
0.033966064453125,
0.0052642822265625,
-0.00946044921875,
-0.039703369140625,
0.0291290283203125,
0.04632568359375,
-0.023468017578125,
-0.0202178955078125,
-0.035400390625,
-0.0231170654296875,
-0.043609619140625,
0.0234222412109375,
0.03692626953125,
-0.0184478759765625,
-0.02410888671875,
0.024993896484375,
0.01163482666015625,
0.07666015625,
0.004486083984375,
-0.023040771484375,
0.0243988037109375,
0.027008056640625,
-0.005191802978515625,
-0.061737060546875,
-0.0096282958984375,
-0.034210205078125,
0.036651611328125,
-0.0099639892578125,
0.0196380615234375,
0.042083740234375,
-0.032012939453125,
-0.0662841796875,
0.03472900390625,
-0.00238800048828125,
-0.02691650390625,
-0.01233673095703125,
-0.005962371826171875,
-0.0372314453125,
0.09295654296875,
0.00841522216796875,
-0.0360107421875,
-0.023681640625,
0.021240234375,
0.0029811859130859375,
0.0204620361328125,
0.02484130859375,
-0.0222625732421875,
-0.0186004638671875,
-0.00787353515625,
-0.01849365234375,
-0.00885009765625,
0.01239776611328125,
-0.005680084228515625,
-0.00930023193359375,
0.0128021240234375,
-0.044921875,
-0.040069580078125,
-0.0102691650390625,
0.005859375,
-0.0034809112548828125,
-0.00208282470703125,
-0.02606201171875,
-0.024749755859375,
0.005657196044921875,
0.0673828125,
0.0112152099609375,
-0.004688262939453125,
0.00605010986328125,
0.034027099609375,
-0.039581298828125,
0.004329681396484375,
0.0212554931640625,
-0.0301666259765625,
0.0002579689025878906,
-0.0176544189453125,
-0.006572723388671875,
0.0224609375,
0.01511383056640625,
-0.036407470703125,
-0.0003638267517089844,
-0.00974273681640625,
-0.004802703857421875,
-0.082763671875,
-0.053741455078125,
0.0364990234375,
-0.029510498046875,
-0.0198516845703125,
0.0000629425048828125,
0.0290374755859375,
0.0012445449829101562,
-0.0230255126953125,
-0.034820556640625,
0.01093292236328125,
-0.00768280029296875,
0.004779815673828125,
-0.004367828369140625,
0.01189422607421875,
-0.003505706787109375,
0.04046630859375,
-0.01031494140625,
0.01143646240234375,
-0.0170440673828125,
-0.02130126953125,
-0.0206298828125,
0.053863525390625,
-0.00768280029296875,
0.09808349609375,
-0.002048492431640625,
0.020111083984375,
-0.00878143310546875,
0.053436279296875,
0.005558013916015625,
-0.019744873046875,
0.026397705078125,
-0.044281005859375,
0.0268096923828125,
0.046478271484375,
0.036376953125,
0.036407470703125,
-0.01522064208984375,
0.005214691162109375,
0.005641937255859375,
-0.0184478759765625
]
|
9b7c1e51c89d4de4441670e305d5403730afafed | Wordpress Stackexchange
Q: How to disable a Custom Post Type Feed? I have been experiencing 404 errors in my Google webmaster tools reports, caused by Custom Post Type (CPT) feed URLs.
I would like to completely deactivate the CPT feed URLs, so that the 404 errors don't appear anymore in my Google webmaster tools reports. In other words, I'd like to fix all these errors at once by deactivating the functionality that causes them.
A: I'm also getting an error similar to that. The feed links get generated and put into the and that is where your 404 error is coming from.
Here's some code to disable feeds for a custom post type. https://gist.github.com/jaredatch/8610187#file-gistfile1-php
<?php
/**
* Disable the "foo" custom post type feed
*
* @since 1.0.0
* @param object $query
*/
function ja_disable_cpt_feed( $query ) {
if ( $query->is_feed() && in_array( 'foo', (array) $query->get( 'post_type' ) ) ) {
die( 'Feed disabled' );
}
}
add_action( 'pre_get_posts', 'ja_disable_cpt_feed' );
| Q: How to disable a Custom Post Type Feed? I have been experiencing 404 errors in my Google webmaster tools reports, caused by Custom Post Type (CPT) feed URLs.
I would like to completely deactivate the CPT feed URLs, so that the 404 errors don't appear anymore in my Google webmaster tools reports. In other words, I'd like to fix all these errors at once by deactivating the functionality that causes them.
A: I'm also getting an error similar to that. The feed links get generated and put into the and that is where your 404 error is coming from.
Here's some code to disable feeds for a custom post type. https://gist.github.com/jaredatch/8610187#file-gistfile1-php
<?php
/**
* Disable the "foo" custom post type feed
*
* @since 1.0.0
* @param object $query
*/
function ja_disable_cpt_feed( $query ) {
if ( $query->is_feed() && in_array( 'foo', (array) $query->get( 'post_type' ) ) ) {
die( 'Feed disabled' );
}
}
add_action( 'pre_get_posts', 'ja_disable_cpt_feed' );
A: After some digging, we have noticed that a CPT must enable archives
'has_archive' => true
Must be set for the feed to function - otherwise you get a 404 error
| wordpress | {
"language": "en",
"length": 190,
"provenance": "stackexchange_00019.jsonl.gz:454898",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/185015"
} | [
0.09027099609375,
0.0064849853515625,
0.0193023681640625,
-0.045806884765625,
0.026092529296875,
-0.024871826171875,
0.054412841796875,
-0.0290069580078125,
-0.00873565673828125,
0.02392578125,
0.0030078887939453125,
-0.0193634033203125,
0.01125335693359375,
-0.0287628173828125,
-0.010772705078125,
-0.02020263671875,
-0.0003974437713623047,
0.024169921875,
0.024261474609375,
-0.031524658203125,
0.0235137939453125,
-0.037017822265625,
0.027069091796875,
0.0081787109375,
-0.00841522216796875,
0.0318603515625,
0.01605224609375,
-0.013397216796875,
-0.0165557861328125,
-0.0187530517578125,
0.00994110107421875,
0.00890350341796875,
0.01438140869140625,
0.0443115234375,
-0.0482177734375,
-0.036773681640625,
-0.01947021484375,
0.030364990234375,
0.00001329183578491211,
-0.006221771240234375,
0.01300048828125,
-0.00870513916015625,
0.050048828125,
-0.0080718994140625,
-0.00998687744140625,
0.0208587646484375,
-0.003917694091796875,
-0.0294189453125,
0.0229644775390625,
0.0120697021484375,
-0.007335662841796875,
0.00897216796875,
0.0181884765625,
-0.011474609375,
-0.03924560546875,
-0.047821044921875,
0.00679779052734375,
-0.0496826171875,
-0.005855560302734375,
0.0189971923828125,
0.024627685546875,
0.028839111328125,
-0.0001989603042602539,
0.0178375244140625,
0.0168914794921875,
0.00004100799560546875,
0.02099609375,
0.01727294921875,
-0.041900634765625,
0.0093231201171875,
0.0416259765625,
-0.033294677734375,
0.018096923828125,
0.01366424560546875,
0.026123046875,
-0.0290374755859375,
-0.0121307373046875,
0.00738525390625,
0.01250457763671875,
0.03143310546875,
0.0121612548828125,
-0.00010460615158081055,
-0.0626220703125,
0.0361328125,
-0.01389312744140625,
0.051605224609375,
-0.01434326171875,
-0.0261993408203125,
-0.0137786865234375,
-0.0205535888671875,
-0.02398681640625,
-0.0164337158203125,
-0.0086517333984375,
-0.0006737709045410156,
-0.004024505615234375,
-0.034454345703125,
0.038360595703125,
0.023956298828125,
-0.036102294921875,
-0.0513916015625,
0.00911712646484375,
-0.032684326171875,
-0.0275115966796875,
-0.0113067626953125,
0.0418701171875,
0.00472259521484375,
-0.033538818359375,
-0.008392333984375,
0.07196044921875,
0.0305938720703125,
-0.004291534423828125,
0.0289154052734375,
-0.035064697265625,
-0.005855560302734375,
-0.0268707275390625,
0.02313232421875,
-0.05328369140625,
-0.00582122802734375,
-0.02862548828125,
0.021453857421875,
0.00455474853515625,
0.032928466796875,
-0.0251617431640625,
-0.006622314453125,
-0.003391265869140625,
-0.01178741455078125,
-0.00751495361328125,
-0.00931549072265625,
0.0034198760986328125,
-0.00542449951171875,
-0.03466796875,
0.01358795166015625,
0.08056640625,
0.055694580078125,
0.0328369140625,
-0.0176239013671875,
0.0252838134765625,
-0.034698486328125,
-0.037567138671875,
0.0193634033203125,
0.023895263671875,
-0.0258636474609375,
-0.00374603271484375,
-0.01432037353515625,
-0.00876617431640625,
0.0201568603515625,
0.005954742431640625,
0.01458740234375,
0.0028514862060546875,
-0.0215301513671875,
-0.0308837890625,
0.0001512765884399414,
0.0728759765625,
-0.00942230224609375,
-0.05987548828125,
-0.06695556640625,
0.051788330078125,
-0.05535888671875,
-0.014404296875,
-0.096435546875,
0.0194549560546875,
-0.002338409423828125,
-0.006916046142578125,
-0.0242919921875,
-0.05523681640625,
0.00661468505859375,
-0.00748443603515625,
0.0010051727294921875,
0.0160980224609375,
0.033050537109375,
-0.01404571533203125,
-0.032623291015625,
-0.007274627685546875,
-0.0008878707885742188,
-0.00710296630859375,
0.0198211669921875,
0.0166473388671875,
0.01519775390625,
0.0283050537109375,
0.006744384765625,
-0.0201568603515625,
-0.0318603515625,
0.048736572265625,
-0.02923583984375,
-0.056121826171875,
0.056304931640625,
0.01155853271484375,
0.06365966796875,
0.0033512115478515625,
0.013092041015625,
0.043212890625,
0.0253143310546875,
0.0219879150390625,
0.04364013671875,
-0.01172637939453125,
-0.0760498046875,
-0.03546142578125,
-0.0268096923828125,
-0.033294677734375,
0.034088134765625,
-0.01264190673828125,
0.0391845703125,
-0.049560546875,
0.007404327392578125,
-0.080078125,
0.00943756103515625,
-0.01433563232421875,
0.043975830078125,
-0.0606689453125,
0.0090789794921875,
0.038330078125,
0.0029544830322265625,
-0.051361083984375,
0.023590087890625,
0.0287933349609375,
0.01012420654296875,
0.01528167724609375,
0.02276611328125,
-0.0180206298828125,
0.0450439453125,
-0.0260009765625,
-0.01316070556640625,
-0.03472900390625,
0.02325439453125,
0.078369140625,
0.0013074874877929688,
-0.00897216796875,
-0.01505279541015625,
0.08477783203125,
0.0186920166015625,
-0.028533935546875,
0.007320404052734375,
0.009246826171875,
-0.006671905517578125,
-0.0216217041015625,
0.016021728515625,
0.036651611328125,
-0.0418701171875,
-0.0022106170654296875,
0.03570556640625,
0.02252197265625,
0.0199432373046875,
-0.038360595703125,
-0.00885009765625,
0.05462646484375,
-0.0099029541015625,
0.0018253326416015625,
0.006359100341796875,
0.04638671875,
0.0298309326171875,
-0.0303955078125,
-0.027801513671875,
0.047760009765625,
0.0181121826171875,
0.04248046875,
0.032470703125,
0.0051422119140625,
-0.0253753662109375,
0.0452880859375,
-0.0009393692016601562,
0.006175994873046875,
0.07635498046875,
-0.0004949569702148438,
0.02655029296875,
0.044769287109375,
0.00969696044921875,
0.06378173828125,
0.06988525390625,
-0.01271820068359375,
-0.002819061279296875,
-0.0032558441162109375,
0.0169677734375,
0.004558563232421875,
0.01953125,
0.06591796875,
-0.0050201416015625,
-0.016357421875,
-0.0181427001953125,
0.005512237548828125,
0.0169219970703125,
-0.021240234375,
0.0093231201171875,
-0.041839599609375,
-0.0065460205078125,
-0.00931549072265625,
-0.0457763671875,
-0.0012760162353515625,
0.006839752197265625,
-0.0130767822265625,
0.0185699462890625,
0.014190673828125,
0.0244140625,
0.01154327392578125,
-0.006214141845703125,
0.0302734375,
0.00057220458984375,
0.0223236083984375,
-0.06732177734375,
0.046112060546875,
-0.024169921875,
0.03436279296875,
0.071044921875,
0.0168914794921875,
0.004970550537109375,
0.0182037353515625,
-0.025848388671875,
0.016448974609375,
0.047515869140625,
0.0168304443359375,
-0.0141754150390625,
-0.0254669189453125,
0.01383209228515625,
0.0150909423828125,
0.0413818359375,
0.006488800048828125,
-0.0168609619140625,
0.0147552490234375,
0.049468994140625,
-0.0182952880859375,
-0.007144927978515625,
0.02496337890625,
-0.007228851318359375,
-0.0012912750244140625,
0.01027679443359375,
0.004150390625,
-0.014862060546875,
0.020050048828125,
-0.0025653839111328125,
-0.0106201171875,
0.023406982421875,
-0.0245513916015625,
0.0169677734375,
-0.013916015625,
0.0309906005859375,
-0.0120391845703125,
0.00868988037109375,
0.0262298583984375,
-0.009429931640625,
0.02001953125,
0.006072998046875,
0.08026123046875,
0.00023221969604492188,
-0.0305938720703125,
0.0017194747924804688,
0.0163116455078125,
-0.0080718994140625,
0.055145263671875,
0.0057830810546875,
0.00809478759765625,
0.043731689453125,
-0.026123046875,
-0.03955078125,
0.01702880859375,
0.027557373046875,
0.005092620849609375,
0.027587890625,
0.004238128662109375,
-0.0250244140625,
-0.0250244140625,
-0.064208984375,
-0.039093017578125,
-0.041229248046875,
-0.052734375,
0.01256561279296875,
0.03704833984375,
0.036041259765625,
-0.06597900390625,
0.0511474609375,
0.00525665283203125,
-0.006732940673828125,
0.056884765625,
-0.0203399658203125,
-0.0033588409423828125,
-0.004665374755859375,
0.010772705078125,
-0.048797607421875,
0.045440673828125,
0.0113983154296875,
0.0185699462890625,
0.0238037109375,
0.03131103515625,
-0.005474090576171875,
0.0007543563842773438,
-0.06610107421875,
-0.036773681640625,
0.00429534912109375,
-0.0985107421875,
-0.01873779296875,
-0.01540374755859375,
0.0312042236328125,
0.01910400390625,
0.041717529296875,
-0.0511474609375,
-0.00864410400390625,
-0.06060791015625,
-0.0031871795654296875,
-0.00787353515625,
-0.0665283203125,
-0.01174163818359375,
0.01044464111328125,
-0.06439208984375,
-0.00897216796875,
-0.013916015625,
-0.044097900390625,
-0.0012044906616210938,
-0.0273590087890625,
-0.048095703125,
-0.0316162109375,
0.0399169921875,
0.01300048828125,
-0.0264129638671875,
0.021697998046875,
-0.0238189697265625,
-0.01654052734375,
-0.0489501953125,
0.0230865478515625,
-0.0838623046875,
-0.00724029541015625,
-0.019317626953125,
0.0372314453125,
0.0269927978515625,
-0.03228759765625,
-0.0115509033203125,
0.03924560546875,
0.0306854248046875,
-0.03472900390625,
0.0211334228515625,
-0.03802490234375,
0.044769287109375,
0.0328369140625,
-0.01056671142578125,
0.01026153564453125,
-0.0024566650390625,
0.031768798828125,
-0.04010009765625,
0.01346588134765625,
0.01001739501953125,
-0.0242919921875,
0.06915283203125,
-0.0654296875,
-0.08624267578125,
-0.065673828125,
-0.048370361328125,
0.026947021484375,
0.005908966064453125,
-0.024200439453125,
-0.07781982421875,
-0.10174560546875,
0.01500701904296875,
-0.032501220703125,
-0.005828857421875,
0.0103912353515625,
0.038299560546875,
0.01415252685546875,
0.0033969879150390625,
0.0362548828125,
-0.01523590087890625,
0.0289764404296875,
0.0035247802734375,
0.05426025390625,
0.02960205078125,
-0.0004734992980957031,
0.029266357421875,
-0.00745391845703125,
-0.038299560546875,
-0.007419586181640625,
0.08447265625,
0.0156402587890625,
0.00826263427734375,
-0.007305145263671875,
-0.02484130859375,
0.03192138671875,
0.0238800048828125,
-0.00609588623046875,
-0.00933837890625,
0.038421630859375,
0.026702880859375,
-0.0604248046875,
0.041229248046875,
-0.004528045654296875,
-0.01355743408203125,
0.04840087890625,
0.025787353515625,
-0.02142333984375,
0.0084228515625,
0.00395965576171875,
-0.032989501953125,
-0.07867431640625,
0.0008363723754882812,
-0.007061004638671875,
0.03582763671875,
-0.0226898193359375,
0.0183563232421875,
0.019866943359375,
-0.0198822021484375,
-0.044677734375,
0.0013723373413085938,
-0.0252227783203125,
-0.0242767333984375,
-0.052734375,
-0.0384521484375,
0.00997161865234375,
0.012786865234375,
0.0273284912109375,
0.024810791015625,
0.06378173828125,
0.02679443359375,
-0.003589630126953125,
-0.00292205810546875,
-0.023101806640625,
0.02789306640625,
-0.050750732421875,
-0.0207061767578125,
0.0190582275390625,
-0.016754150390625,
-0.016998291015625,
0.06781005859375,
0.0360107421875,
0.01326751708984375,
-0.028076171875,
0.01227569580078125,
0.03106689453125,
0.02655029296875,
0.019500732421875,
-0.00897979736328125,
-0.04241943359375,
0.03521728515625,
-0.001369476318359375,
-0.046722412109375,
-0.06512451171875,
0.0230560302734375,
0.047515869140625,
-0.01384735107421875,
0.006282806396484375,
0.002315521240234375,
0.014923095703125,
-0.02880859375,
0.036529541015625,
0.0281219482421875,
-0.0281829833984375,
-0.0224151611328125,
-0.041778564453125,
-0.01131439208984375,
-0.0009722709655761719,
-0.031951904296875,
0.029815673828125,
-0.037872314453125,
0.0009059906005859375,
0.0142364501953125,
-0.055755615234375,
0.00664520263671875,
0.035919189453125,
-0.0474853515625,
-0.041351318359375,
0.0105438232421875,
-0.035736083984375,
0.00966644287109375,
-0.004711151123046875,
-0.01137542724609375,
-0.02020263671875,
-0.0504150390625,
-0.024932861328125,
-0.01395416259765625,
0.043548583984375,
0.0191192626953125,
0.027069091796875,
0.032196044921875,
0.0116729736328125,
-0.04132080078125,
0.01531982421875,
-0.0233001708984375,
-0.0214996337890625,
-0.0657958984375,
-0.060516357421875,
-0.061065673828125,
-0.0134429931640625,
-0.004840850830078125,
0.0189056396484375,
0.009979248046875,
0.0165252685546875,
0.030181884765625,
0.0224609375,
-0.01035308837890625,
0.06195068359375,
-0.0195465087890625,
0.034820556640625,
0.0174407958984375,
0.049957275390625,
-0.004367828369140625,
0.01129913330078125,
0.0156402587890625,
-0.02899169921875,
-0.0037384033203125,
-0.054656982421875,
-0.01096343994140625,
0.00440216064453125,
-0.00411224365234375,
0.061065673828125,
0.052490234375,
0.00977325439453125,
0.0009260177612304688,
-0.022705078125,
0.007259368896484375,
-0.033966064453125,
0.05120849609375,
-0.0380859375,
0.007213592529296875,
0.01219940185546875,
-0.01290130615234375,
-0.008453369140625,
0.021820068359375,
-0.004703521728515625,
0.018341064453125,
0.01157379150390625,
0.01361846923828125,
-0.051727294921875,
-0.063720703125,
0.05108642578125,
0.09051513671875,
0.0250701904296875,
0.05535888671875,
-0.005657196044921875,
0.018157958984375,
-0.005847930908203125,
0.017181396484375,
-0.006805419921875,
-0.0487060546875,
0.010650634765625,
-0.004764556884765625,
-0.031768798828125,
-0.0020847320556640625,
-0.02032470703125,
0.0082855224609375,
0.03582763671875,
0.03497314453125,
-0.06622314453125,
-0.0172271728515625,
-0.01247406005859375,
-0.0174713134765625,
0.0207672119140625,
-0.006702423095703125,
0.014373779296875,
-0.005558013916015625,
-0.0158843994140625,
0.0185394287109375,
-0.031280517578125,
-0.023529052734375,
0.003971099853515625,
-0.0081329345703125,
0.00560760498046875,
0.033447265625,
0.0038547515869140625,
-0.0170745849609375,
-0.044677734375,
0.00835418701171875,
-0.0223236083984375,
-0.01195526123046875,
-0.00824737548828125,
-0.0093536376953125,
-0.01474761962890625,
-0.07568359375,
-0.01454925537109375,
-0.04998779296875,
-0.0023593902587890625,
-0.00010311603546142578,
0.00823974609375,
0.041229248046875,
0.0421142578125,
0.00484466552734375,
-0.0238494873046875,
0.0168304443359375,
-0.0214996337890625,
0.0251922607421875,
-0.040740966796875,
-0.023193359375,
0.0272064208984375,
0.016265869140625,
0.008636474609375,
0.0302734375,
-0.044097900390625,
0.01015472412109375,
0.0238189697265625,
0.061614990234375,
0.005115509033203125,
-0.051605224609375,
0.01340484619140625,
-0.01535797119140625,
0.003826141357421875,
-0.0082244873046875,
-0.002712249755859375,
-0.0555419921875,
-0.01380157470703125,
-0.0108184814453125,
-0.0249176025390625,
0.00722503662109375,
-0.00910186767578125,
-0.046356201171875,
0.10028076171875,
-0.0264892578125,
0.03118896484375,
0.030364990234375,
0.03985595703125,
-0.015838623046875,
0.0198211669921875,
-0.01065826416015625,
0.05426025390625,
-0.039215087890625,
0.03265380859375,
-0.06396484375,
-0.0172271728515625,
0.01194000244140625,
0.040008544921875,
0.077880859375,
0.018768310546875,
-0.0261993408203125,
-0.02813720703125,
0.01424407958984375,
0.046142578125,
-0.01380157470703125,
0.0115966796875,
-0.0609130859375,
0.056732177734375,
-0.0207061767578125,
-0.0660400390625,
0.0018596649169921875,
0.01251983642578125,
-0.08062744140625,
-0.00275421142578125,
0.0042877197265625,
-0.00777435302734375,
0.0105133056640625,
-0.03363037109375,
0.00899505615234375,
0.0021820068359375,
-0.0162506103515625,
0.02587890625,
-0.0288238525390625,
0.061676025390625,
0.0379638671875,
-0.060638427734375,
-0.016754150390625,
-0.045867919921875,
0.0458984375,
0.00643157958984375,
0.041717529296875,
0.033538818359375,
0.0204925537109375,
-0.0001780986785888672,
-0.0229949951171875,
0.0300750732421875,
-0.004039764404296875,
-0.04150390625,
0.0147705078125,
0.002368927001953125,
0.01084136962890625,
-0.01715087890625,
0.0231781005859375,
0.010772705078125,
0.008056640625,
-0.03582763671875,
-0.07489013671875,
0.0092926025390625,
-0.00789642333984375,
0.02069091796875,
0.03436279296875,
0.044281005859375,
-0.0028324127197265625,
0.0236663818359375,
-0.016357421875,
-0.004955291748046875,
-0.01131439208984375,
0.0179443359375,
-0.0191497802734375,
-0.01334381103515625,
0.0078887939453125,
-0.01262664794921875,
-0.0526123046875,
-0.0133209228515625,
0.00420379638671875,
0.07818603515625,
0.0609130859375,
0.019989013671875,
-0.0132904052734375,
-0.046417236328125,
-0.0014123916625976562,
-0.0010557174682617188,
-0.020965576171875,
0.007793426513671875,
-0.046173095703125,
-0.0517578125,
0.01319122314453125,
0.04443359375,
0.00708770751953125,
0.0167236328125,
0.0258941650390625,
0.01849365234375,
-0.0005474090576171875,
0.007686614990234375,
0.048126220703125,
-0.0074005126953125,
-0.03143310546875,
-0.0406494140625,
-0.0008935928344726562,
-0.00962066650390625,
0.0064544677734375,
0.01751708984375,
0.0250244140625,
-0.0161895751953125,
-0.00045108795166015625,
0.02081298828125,
0.005645751953125,
-0.007450103759765625,
0.023590087890625,
0.0165863037109375,
0.0255889892578125,
0.0355224609375,
-0.060791015625,
-0.0181884765625,
-0.0291748046875,
-0.05792236328125,
0.026336669921875,
0.03662109375,
-0.017974853515625,
0.0015468597412109375,
0.017669677734375,
0.016082763671875,
0.002513885498046875,
-0.045013427734375,
0.0157012939453125,
0.003871917724609375,
0.006031036376953125,
0.018218994140625,
-0.0303802490234375,
-0.00860595703125,
-0.005901336669921875,
0.0093536376953125,
-0.003070831298828125,
0.0921630859375,
-0.01456451416015625,
0.0082244873046875,
0.0291595458984375,
-0.0029468536376953125,
0.0438232421875,
0.036529541015625,
-0.039093017578125,
0.03131103515625,
0.040008544921875,
-0.0243377685546875,
-0.0267181396484375,
0.01261138916015625,
0.048004150390625,
-0.02569580078125,
0.00881195068359375,
0.0162353515625,
0.0226898193359375,
-0.028717041015625,
-0.034454345703125,
-0.05328369140625,
-0.0394287109375,
-0.0201263427734375,
-0.0001220703125,
-0.0162811279296875,
-0.0208587646484375,
0.00373077392578125,
0.021453857421875,
0.0177459716796875,
0.01021575927734375,
0.0192108154296875,
-0.005405426025390625,
0.046112060546875,
0.032989501953125,
-0.04150390625,
-0.00794219970703125,
-0.013275146484375,
-0.0193634033203125,
0.0195159912109375,
0.0012073516845703125,
0.01776123046875,
-0.007663726806640625,
0.02294921875,
-0.0489501953125,
-0.020477294921875,
-0.01299285888671875,
-0.023773193359375,
-0.01226043701171875,
-0.00981903076171875,
-0.0238189697265625,
-0.0037136077880859375,
-0.0213623046875,
0.0049285888671875,
0.0159149169921875,
-0.021270751953125,
0.02008056640625,
0.0009059906005859375,
0.006229400634765625,
-0.0244293212890625,
-0.00873565673828125,
0.054962158203125,
0.01372528076171875,
-0.05718994140625,
0.039398193359375,
-0.04437255859375,
0.025299072265625,
0.009429931640625,
-0.0325927734375,
0.01259613037109375,
0.04620361328125,
0.01448822021484375,
-0.0031261444091796875,
-0.0212554931640625,
0.007183074951171875,
-0.00409698486328125,
0.00039577484130859375,
0.00971221923828125,
-0.0042877197265625,
0.0139312744140625,
-0.023345947265625,
-0.0104827880859375,
0.0209808349609375,
-0.0232696533203125,
0.0005345344543457031,
0.00249481201171875,
0.01715087890625,
-0.02642822265625,
-0.07952880859375,
0.0140533447265625,
-0.08953857421875,
-0.017425537109375,
-0.0074462890625,
0.00719451904296875,
0.027679443359375,
-0.0042877197265625,
-0.0286865234375,
0.0240325927734375,
0.003536224365234375,
-0.014739990234375,
-0.035980224609375,
0.00867462158203125,
0.010223388671875,
-0.0223236083984375,
-0.004978179931640625,
-0.025177001953125,
-0.037506103515625,
-0.0011148452758789062,
0.0004146099090576172,
0.050537109375,
0.0195465087890625,
-0.00980377197265625,
0.0287628173828125,
0.0226593017578125,
0.017730712890625,
0.0017566680908203125,
-0.00559234619140625,
0.00799560546875,
0.00743865966796875,
0.0005817413330078125,
-0.050811767578125,
0.058746337890625,
-0.00626373291015625,
0.042633056640625,
-0.01276397705078125,
-0.043426513671875,
-0.0517578125,
-0.0260009765625,
0.1064453125,
0.062042236328125,
0.03643798828125,
-0.040008544921875,
-0.01561737060546875,
-0.04498291015625,
-0.01898193359375,
-0.02996826171875,
0.01258087158203125,
-0.058685302734375,
-0.0097808837890625,
0.01160430908203125,
0.0113372802734375,
0.01396942138671875,
-0.0338134765625,
-0.007724761962890625,
-0.013824462890625,
-0.019622802734375,
-0.0177459716796875,
-0.01215362548828125,
0.07568359375,
-0.0460205078125,
0.0005993843078613281,
0.03216552734375,
-0.04296875,
-0.0233001708984375,
-0.004566192626953125,
-0.0229034423828125,
-0.039764404296875,
-0.024383544921875,
-0.0164337158203125,
0.036376953125,
-0.039215087890625,
0.05859375,
-0.030853271484375,
0.0093994140625,
-0.0000768899917602539,
-0.0136566162109375,
-0.00968170166015625,
-0.01319122314453125,
0.022216796875,
-0.005626678466796875,
-0.01055145263671875,
0.006984710693359375,
0.0196075439453125,
0.042083740234375,
-0.00521087646484375,
0.0232391357421875,
0.011993408203125,
-0.016876220703125,
0.0244903564453125,
-0.02960205078125,
0.01415252685546875,
0.01230621337890625,
-0.004566192626953125,
-0.0259246826171875,
0.0090789794921875,
-0.01152801513671875,
-0.01212310791015625,
0.01096343994140625
]
|
662c5e9090809169c965594874b024cbc35ae914 | Wordpress Stackexchange
Q: Get the number of posts in a named category, outside the loop I've managed to do this from a single.php file, inside the loop, but now I need to do it from another page.
I need to find out how many live posts are in category named every story (slug is everystory). I am not inside the loop.
I just need the number, I don't need to output anything except the number. E.g 8
I have tried searching for a way to gather category data just via the category_name (could be name, or could be slug, could even be by category ID) but everything I've found so far refers to using a specific $post var and finding it's category which isn't what I want to do.
Here is the example of what I used on the single post page:
$category = get_the_category();
$counter = $category[0]->category_count;
A: I'm a bit unsure of you are actually asking, so apologies if I understood it wrong.
You can use get_category() to get the category object and then just simply echo the $count property value
$cat_count = get_category( 'ID OR ROW OBJECT' );
echo $cat_count->count;
| Q: Get the number of posts in a named category, outside the loop I've managed to do this from a single.php file, inside the loop, but now I need to do it from another page.
I need to find out how many live posts are in category named every story (slug is everystory). I am not inside the loop.
I just need the number, I don't need to output anything except the number. E.g 8
I have tried searching for a way to gather category data just via the category_name (could be name, or could be slug, could even be by category ID) but everything I've found so far refers to using a specific $post var and finding it's category which isn't what I want to do.
Here is the example of what I used on the single post page:
$category = get_the_category();
$counter = $category[0]->category_count;
A: I'm a bit unsure of you are actually asking, so apologies if I understood it wrong.
You can use get_category() to get the category object and then just simply echo the $count property value
$cat_count = get_category( 'ID OR ROW OBJECT' );
echo $cat_count->count;
| wordpress | {
"language": "en",
"length": 191,
"provenance": "stackexchange_00019.jsonl.gz:454916",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/185093"
} | [
0.025787353515625,
-0.00304412841796875,
-0.0189971923828125,
-0.0239105224609375,
0.036376953125,
-0.040069580078125,
0.054473876953125,
-0.0033435821533203125,
-0.01427459716796875,
0.004192352294921875,
-0.049774169921875,
0.0194854736328125,
-0.045257568359375,
-0.01483917236328125,
0.01233673095703125,
-0.049652099609375,
0.03204345703125,
0.00008469820022583008,
0.053619384765625,
0.0013513565063476562,
-0.0141754150390625,
0.0208892822265625,
0.05364990234375,
0.0343017578125,
0.009490966796875,
-0.038482666015625,
0.047515869140625,
-0.05322265625,
0.0086669921875,
-0.0552978515625,
0.0212860107421875,
0.044921875,
0.010711669921875,
0.00734710693359375,
0.003749847412109375,
0.0000807642936706543,
0.02978515625,
-0.00945281982421875,
0.0134735107421875,
0.030670166015625,
0.050079345703125,
-0.039947509765625,
0.0687255859375,
-0.00933837890625,
0.03875732421875,
-0.021240234375,
0.038665771484375,
-0.07476806640625,
0.01873779296875,
-0.05596923828125,
0.006465911865234375,
0.0249176025390625,
0.03204345703125,
-0.019195556640625,
-0.0171356201171875,
0.0202789306640625,
0.0153045654296875,
-0.0283966064453125,
0.07135009765625,
-0.043304443359375,
-0.062744140625,
-0.072509765625,
0.06146240234375,
-0.041778564453125,
-0.01279449462890625,
0.0012063980102539062,
0.01338958740234375,
0.0263214111328125,
0.0013704299926757812,
-0.0279693603515625,
0.004001617431640625,
0.002925872802734375,
-0.0156402587890625,
-0.00911712646484375,
-0.0246429443359375,
-0.00897216796875,
0.0230865478515625,
-0.0149383544921875,
-0.00609588623046875,
0.0164642333984375,
-0.0047149658203125,
-0.00412750244140625,
-0.0225982666015625,
0.00479888916015625,
-0.016143798828125,
0.006908416748046875,
-0.01267242431640625,
-0.0036945343017578125,
-0.0304107666015625,
-0.044403076171875,
-0.01058197021484375,
0.01520538330078125,
-0.030364990234375,
0.01361846923828125,
-0.00959014892578125,
-0.0286407470703125,
0.0167236328125,
0.04620361328125,
-0.0296173095703125,
-0.044677734375,
0.0108184814453125,
-0.0280609130859375,
-0.061309814453125,
-0.018280029296875,
0.047271728515625,
0.03521728515625,
-0.038055419921875,
0.00029349327087402344,
0.09075927734375,
0.0272674560546875,
0.01922607421875,
0.05169677734375,
-0.01214599609375,
-0.020416259765625,
-0.01261138916015625,
0.05047607421875,
-0.0256805419921875,
0.032745361328125,
0.01116180419921875,
0.0242767333984375,
-0.005313873291015625,
0.03009033203125,
-0.0085906982421875,
-0.002216339111328125,
0.01326751708984375,
0.0174713134765625,
-0.003696441650390625,
-0.03253173828125,
0.05828857421875,
0.019134521484375,
-0.03912353515625,
-0.002567291259765625,
0.0266876220703125,
0.01186370849609375,
0.01129150390625,
-0.0109710693359375,
0.0222930908203125,
-0.0127716064453125,
-0.0159912109375,
0.0094146728515625,
-0.0199432373046875,
-0.0119781494140625,
0.022796630859375,
-0.044036865234375,
0.02783203125,
0.0012674331665039062,
0.00919342041015625,
0.02667236328125,
0.034515380859375,
-0.007282257080078125,
0.032379150390625,
-0.0164337158203125,
0.038055419921875,
-0.0090789794921875,
-0.006542205810546875,
-0.027191162109375,
-0.0093231201171875,
-0.01534271240234375,
-0.00815582275390625,
-0.02288818359375,
0.05718994140625,
0.00812530517578125,
0.0129547119140625,
-0.0212249755859375,
-0.055938720703125,
-0.003971099853515625,
-0.07427978515625,
-0.0220489501953125,
0.0193023681640625,
0.03729248046875,
-0.01055145263671875,
-0.009613037109375,
0.0127410888671875,
-0.01407623291015625,
-0.0230255126953125,
0.013275146484375,
-0.049774169921875,
0.0006618499755859375,
0.0352783203125,
-0.004779815673828125,
-0.01079559326171875,
-0.04071044921875,
-0.017486572265625,
0.024200439453125,
-0.0367431640625,
0.0401611328125,
0.0042572021484375,
0.026580810546875,
0.01517486572265625,
0.00014281272888183594,
-0.01165771484375,
0.033538818359375,
-0.015350341796875,
0.0106353759765625,
0.01336669921875,
0.0016584396362304688,
-0.0005145072937011719,
0.01055145263671875,
0.01629638671875,
-0.04541015625,
0.03466796875,
0.0040435791015625,
0.00841522216796875,
-0.0240325927734375,
-0.00878143310546875,
-0.006542205810546875,
0.00905609130859375,
0.0301666259765625,
-0.018829345703125,
0.0310516357421875,
0.0290374755859375,
0.0011625289916992188,
-0.0190277099609375,
-0.06494140625,
-0.0316162109375,
-0.01342010498046875,
-0.0075531005859375,
-0.036163330078125,
-0.0206756591796875,
0.00616455078125,
-0.0267181396484375,
0.017242431640625,
-0.052032470703125,
0.017669677734375,
0.07012939453125,
-0.0027065277099609375,
-0.031890869140625,
-0.03802490234375,
-0.005359649658203125,
0.0187835693359375,
-0.11334228515625,
0.040313720703125,
0.0300140380859375,
0.0182952880859375,
-0.036651611328125,
-0.0017147064208984375,
0.01116943359375,
-0.0132598876953125,
-0.012847900390625,
0.045989990234375,
0.03411865234375,
-0.0223846435546875,
-0.02593994140625,
-0.01528167724609375,
0.0073089599609375,
-0.045989990234375,
-0.006023406982421875,
-0.0174407958984375,
-0.01163482666015625,
0.0258941650390625,
0.0240325927734375,
0.042724609375,
0.01180267333984375,
-0.00577545166015625,
0.007091522216796875,
0.048309326171875,
0.0265655517578125,
-0.0036563873291015625,
-0.020965576171875,
0.0260772705078125,
0.0270233154296875,
0.022735595703125,
-0.057708740234375,
0.0241546630859375,
0.003719329833984375,
0.006134033203125,
-0.004711151123046875,
0.0034198760986328125,
-0.0162353515625,
-0.007366180419921875,
0.0165863037109375,
-0.021514892578125,
-0.00647735595703125,
0.005970001220703125,
-0.06884765625,
0.0008668899536132812,
-0.0517578125,
0.034271240234375,
-0.00617218017578125,
-0.01708984375,
-0.03253173828125,
0.058990478515625,
0.01361846923828125,
-0.03094482421875,
-0.05218505859375,
-0.07501220703125,
-0.0077667236328125,
-0.05010986328125,
-0.03228759765625,
0.033294677734375,
0.02423095703125,
0.045562744140625,
-0.0094451904296875,
0.024261474609375,
-0.022216796875,
0.0340576171875,
0.04754638671875,
-0.03839111328125,
0.048919677734375,
-0.0209197998046875,
0.040924072265625,
0.0594482421875,
-0.01416778564453125,
0.0167694091796875,
-0.00749969482421875,
-0.0231475830078125,
-0.006916046142578125,
-0.004199981689453125,
-0.0005078315734863281,
-0.01015472412109375,
-0.045684814453125,
0.0474853515625,
0.0208892822265625,
0.044830322265625,
0.015869140625,
-0.03802490234375,
0.016754150390625,
0.02008056640625,
-0.06103515625,
-0.0743408203125,
0.048736572265625,
-0.051605224609375,
0.01568603515625,
0.010040283203125,
-0.03472900390625,
-0.047515869140625,
0.038055419921875,
0.0030155181884765625,
0.015716552734375,
-0.02020263671875,
-0.0538330078125,
-0.051116943359375,
-0.06695556640625,
-0.0185394287109375,
0.0109100341796875,
-0.005977630615234375,
0.0152587890625,
0.053680419921875,
0.016571044921875,
-0.033905029296875,
0.0161590576171875,
0.001373291015625,
-0.038787841796875,
0.01102447509765625,
-0.01178741455078125,
0.0248260498046875,
-0.0447998046875,
0.0132904052734375,
-0.0198211669921875,
0.00904083251953125,
-0.0079803466796875,
0.0030460357666015625,
-0.009918212890625,
0.008697509765625,
0.01409149169921875,
0.05303955078125,
0.021697998046875,
0.03167724609375,
0.04266357421875,
-0.0202178955078125,
-0.057159423828125,
-0.00789642333984375,
-0.055419921875,
-0.0233612060546875,
0.0303802490234375,
0.0178680419921875,
-0.0197296142578125,
0.001567840576171875,
-0.027130126953125,
0.0048065185546875,
-0.0168914794921875,
-0.02166748046875,
0.05194091796875,
-0.004207611083984375,
-0.005031585693359375,
0.01294708251953125,
-0.0228118896484375,
-0.0311279296875,
-0.00460052490234375,
-0.0335693359375,
0.0005173683166503906,
-0.02197265625,
0.03521728515625,
0.0018529891967773438,
-0.037139892578125,
0.0574951171875,
0.01468658447265625,
-0.01177215576171875,
-0.00949859619140625,
-0.033660888671875,
0.01006317138671875,
0.06561279296875,
-0.030242919921875,
-0.040985107421875,
-0.0252532958984375,
-0.005901336669921875,
0.0309906005859375,
-0.008087158203125,
0.020172119140625,
-0.0304718017578125,
-0.06549072265625,
-0.01036834716796875,
-0.0200653076171875,
-0.01335906982421875,
-0.015655517578125,
0.053497314453125,
-0.02728271484375,
-0.033416748046875,
0.0209808349609375,
-0.046234130859375,
0.00649261474609375,
-0.059112548828125,
-0.0033779144287109375,
-0.06842041015625,
-0.0170745849609375,
-0.0322265625,
-0.015777587890625,
-0.0005345344543457031,
-0.0217437744140625,
0.0303802490234375,
0.011962890625,
0.0032482147216796875,
0.01100921630859375,
0.04437255859375,
0.00826263427734375,
0.03314208984375,
-0.004322052001953125,
0.01544952392578125,
-0.01012420654296875,
-0.0088348388671875,
0.005336761474609375,
-0.02752685546875,
-0.028228759765625,
-0.04498291015625,
-0.0100250244140625,
0.0214996337890625,
-0.039794921875,
-0.00424957275390625,
-0.04693603515625,
-0.005260467529296875,
-0.02398681640625,
-0.0194244384765625,
0.031707763671875,
0.0068817138671875,
-0.00958251953125,
0.018341064453125,
0.0076446533203125,
-0.00870513916015625,
0.047515869140625,
0.0312042236328125,
-0.0235443115234375,
0.0019426345825195312,
0.07110595703125,
0.01044464111328125,
-0.03631591796875,
-0.08203125,
-0.004703521728515625,
0.04656982421875,
-0.0085601806640625,
0.037872314453125,
0.0247039794921875,
-0.033111572265625,
0.053131103515625,
0.0244903564453125,
0.00027871131896972656,
-0.0012369155883789062,
0.01105499267578125,
0.01291656494140625,
-0.016357421875,
-0.00667572021484375,
-0.00673675537109375,
0.0262908935546875,
0.0098724365234375,
-0.0162506103515625,
0.0113677978515625,
0.0224761962890625,
0.0146484375,
-0.0240631103515625,
0.0116424560546875,
0.0070037841796875,
-0.005115509033203125,
-0.0033817291259765625,
0.019500732421875,
0.06732177734375,
0.0411376953125,
-0.006732940673828125,
0.039306640625,
0.0355224609375,
0.004520416259765625,
0.0135040283203125,
0.024566650390625,
-0.01071929931640625,
0.015960693359375,
0.00585174560546875,
-0.006824493408203125,
0.00305938720703125,
0.001705169677734375,
-0.02679443359375,
-0.032806396484375,
-0.050994873046875,
-0.01169586181640625,
0.0005488395690917969,
0.005519866943359375,
0.027618408203125,
-0.0209808349609375,
0.00629425048828125,
0.0225067138671875,
-0.002628326416015625,
0.0242156982421875,
-0.00957489013671875,
-0.013458251953125,
-0.00897979736328125,
0.0187530517578125,
-0.0158538818359375,
0.00445556640625,
0.024566650390625,
0.073486328125,
-0.03411865234375,
0.0743408203125,
-0.0043182373046875,
0.041656494140625,
0.0105133056640625,
0.037567138671875,
0.023193359375,
-0.043548583984375,
0.021942138671875,
-0.0237579345703125,
-0.01143646240234375,
-0.0278472900390625,
-0.01473236083984375,
0.01326751708984375,
0.0570068359375,
0.0005497932434082031,
-0.006839752197265625,
0.011474609375,
-0.0087432861328125,
-0.01506805419921875,
0.0182647705078125,
0.024627685546875,
0.0161895751953125,
-0.02801513671875,
-0.017822265625,
0.01209259033203125,
0.03936767578125,
-0.00983428955078125,
-0.0166473388671875,
0.0035037994384765625,
0.0128326416015625,
0.0017728805541992188,
-0.01153564453125,
0.0010051727294921875,
0.0204620361328125,
-0.06939697265625,
-0.0296173095703125,
-0.0024967193603515625,
0.03851318359375,
-0.002819061279296875,
-0.006603240966796875,
-0.056243896484375,
0.006862640380859375,
-0.01560211181640625,
0.08819580078125,
-0.01074981689453125,
-0.07171630859375,
0.0340576171875,
0.00016045570373535156,
0.0694580078125,
0.0526123046875,
-0.006870269775390625,
0.02215576171875,
-0.07275390625,
-0.0193023681640625,
0.07904052734375,
0.00788116455078125,
-0.017578125,
-0.040496826171875,
0.0253448486328125,
0.031829833984375,
0.0196685791015625,
-0.003879547119140625,
-0.030548095703125,
-0.0134429931640625,
0.01538848876953125,
0.03363037109375,
-0.005298614501953125,
0.021484375,
0.0272979736328125,
0.01776123046875,
0.0122222900390625,
-0.002410888671875,
-0.028564453125,
-0.00975799560546875,
0.0184326171875,
-0.00945281982421875,
-0.0173187255859375,
-0.001522064208984375,
-0.00943756103515625,
-0.05987548828125,
-0.0103302001953125,
-0.015899658203125,
-0.0223541259765625,
-0.01514434814453125,
0.0117950439453125,
-0.003204345703125,
-0.017852783203125,
0.029541015625,
-0.03448486328125,
0.03924560546875,
-0.006622314453125,
-0.01039886474609375,
-0.0013360977172851562,
-0.0007448196411132812,
-0.0016193389892578125,
0.00011676549911499023,
-0.01117706298828125,
0.0164947509765625,
-0.058258056640625,
0.08441162109375,
0.084716796875,
0.01023101806640625,
0.02001953125,
0.0400390625,
0.0022830963134765625,
-0.0272674560546875,
0.0117645263671875,
0.0693359375,
-0.01158905029296875,
0.0802001953125,
-0.0032958984375,
-0.006557464599609375,
0.032196044921875,
-0.05950927734375,
-0.0281524658203125,
0.0159149169921875,
-0.001132965087890625,
-0.0247344970703125,
0.0013113021850585938,
0.015716552734375,
-0.0018463134765625,
-0.01374053955078125,
-0.005146026611328125,
-0.01253509521484375,
-0.0242767333984375,
0.041595458984375,
-0.0220794677734375,
-0.0258941650390625,
0.0087127685546875,
-0.0190277099609375,
0.005859375,
0.01053619384765625,
0.04522705078125,
0.0276641845703125,
0.0098724365234375,
-0.0222015380859375,
-0.0068359375,
0.03857421875,
-0.041046142578125,
-0.01145172119140625,
0.015960693359375,
-0.0011110305786132812,
-0.03704833984375,
0.0645751953125,
-0.0207672119140625,
0.037445068359375,
-0.0176849365234375,
0.00022327899932861328,
-0.0005526542663574219,
0.0487060546875,
-0.0210113525390625,
0.0004410743713378906,
0.028228759765625,
-0.047393798828125,
-0.004718780517578125,
0.01800537109375,
-0.003185272216796875,
0.02593994140625,
-0.0308837890625,
0.0029773712158203125,
-0.04376220703125,
0.04473876953125,
-0.01473236083984375,
-0.000013530254364013672,
0.0665283203125,
-0.0186767578125,
-0.0263824462890625,
0.041412353515625,
0.044036865234375,
-0.0161590576171875,
0.0200958251953125,
0.05267333984375,
-0.0200958251953125,
0.0117950439453125,
0.06121826171875,
0.049163818359375,
-0.024505615234375,
0.047576904296875,
-0.0384521484375,
0.0693359375,
-0.04754638671875,
0.0290374755859375,
0.0390625,
0.0168914794921875,
0.000009238719940185547,
0.008056640625,
-0.0780029296875,
0.05914306640625,
0.036285400390625,
0.05548095703125,
-0.06744384765625,
-0.0210723876953125,
-0.0020198822021484375,
0.0243072509765625,
0.053497314453125,
-0.0128173828125,
0.03143310546875,
-0.0352783203125,
0.016387939453125,
0.042144775390625,
-0.01885986328125,
-0.01018524169921875,
0.023284912109375,
0.00246429443359375,
0.05987548828125,
-0.0246124267578125,
0.02203369140625,
0.0001474618911743164,
0.01348876953125,
0.023895263671875,
0.031280517578125,
0.04364013671875,
-0.01165008544921875,
-0.003955841064453125,
-0.056243896484375,
-0.0013713836669921875,
0.037200927734375,
0.032958984375,
-0.0221099853515625,
0.10467529296875,
0.054351806640625,
-0.040924072265625,
-0.0154571533203125,
-0.04681396484375,
0.05767822265625,
-0.00971221923828125,
0.005870819091796875,
0.006855010986328125,
0.006076812744140625,
0.08880615234375,
-0.028350830078125,
-0.011688232421875,
0.0082244873046875,
0.00731658935546875,
0.07257080078125,
0.0298004150390625,
0.0284576416015625,
-0.0169677734375,
0.0177154541015625,
0.032318115234375,
0.06878662109375,
-0.052886962890625,
-0.02197265625,
0.01273345947265625,
0.029937744140625,
0.00479888916015625,
-0.00513458251953125,
0.002079010009765625,
0.05596923828125,
0.091064453125,
-0.056304931640625,
-0.041900634765625,
0.0161895751953125,
0.069091796875,
-0.0026149749755859375,
-0.030487060546875,
-0.0288238525390625,
-0.08294677734375,
-0.032623291015625,
0.01413726806640625,
0.01396942138671875,
0.07861328125,
0.01016998291015625,
0.0413818359375,
-0.061553955078125,
-0.0260162353515625,
0.0201416015625,
0.013702392578125,
0.00872039794921875,
-0.0115509033203125,
0.006061553955078125,
-0.01092529296875,
0.033843994140625,
0.01337432861328125,
0.01235198974609375,
-0.006793975830078125,
0.055450439453125,
0.05780029296875,
0.003894805908203125,
-0.02728271484375,
0.00811004638671875,
-0.0002448558807373047,
-0.033355712890625,
-0.027496337890625,
-0.016448974609375,
0.0033931732177734375,
0.0010461807250976562,
0.015899658203125,
0.0263671875,
0.01073455810546875,
0.0125885009765625,
-0.004238128662109375,
0.0108184814453125,
-0.03912353515625,
0.037139892578125,
-0.0260772705078125,
0.07330322265625,
0.026763916015625,
-0.0743408203125,
-0.004131317138671875,
-0.02459716796875,
-0.03192138671875,
0.0170135498046875,
0.02960205078125,
-0.031494140625,
0.031890869140625,
-0.0010623931884765625,
-0.0158233642578125,
0.038116455078125,
-0.0136260986328125,
0.0042724609375,
0.02020263671875,
0.0132598876953125,
0.004230499267578125,
-0.016876220703125,
-0.033660888671875,
0.0345458984375,
0.035675048828125,
0.022674560546875,
0.0011615753173828125,
0.006900787353515625,
0.000743865966796875,
-0.00323486328125,
0.033782958984375,
-0.034332275390625,
-0.035400390625,
0.068115234375,
0.0134124755859375,
0.010406494140625,
-0.021148681640625,
-0.0274810791015625,
-0.006587982177734375,
0.035675048828125,
-0.049713134765625,
0.002429962158203125,
-0.031951904296875,
0.01111602783203125,
-0.018402099609375,
0.0076446533203125,
-0.0298004150390625,
0.003528594970703125,
0.00864410400390625,
-0.043975830078125,
0.016265869140625,
0.027618408203125,
0.043701171875,
0.03399658203125,
-0.043243408203125,
0.00974273681640625,
-0.01351165771484375,
0.0116119384765625,
-0.053070068359375,
0.0189361572265625,
-0.032318115234375,
0.01209259033203125,
0.03521728515625,
-0.005817413330078125,
0.018524169921875,
0.0202178955078125,
0.005462646484375,
0.026641845703125,
-0.0136260986328125,
-0.021636962890625,
0.024383544921875,
0.041595458984375,
-0.0135040283203125,
0.039703369140625,
-0.01244354248046875,
-0.0013265609741210938,
0.037353515625,
-0.01248931884765625,
-0.025634765625,
-0.06793212890625,
-0.0037403106689453125,
0.024566650390625,
-0.03558349609375,
0.0269775390625,
-0.02008056640625,
-0.00878143310546875,
0.03125,
-0.01137542724609375,
-0.002277374267578125,
-0.00188446044921875,
-0.039825439453125,
0.0318603515625,
-0.024078369140625,
-0.0162811279296875,
0.014892578125,
0.03619384765625,
-0.0555419921875,
0.0215301513671875,
-0.0188446044921875,
-0.046173095703125,
-0.0181427001953125,
0.025665283203125,
0.0282440185546875,
-0.0294036865234375,
-0.01018524169921875,
0.0069580078125,
0.0246124267578125,
0.050506591796875,
0.0135650634765625,
0.016632080078125,
0.0170745849609375,
0.0251007080078125,
-0.058349609375,
-0.041351318359375,
0.04962158203125,
-0.01052093505859375,
-0.04180908203125,
-0.0162811279296875,
0.0029239654541015625,
0.0224609375,
-0.02923583984375,
-0.0443115234375,
0.0266265869140625,
-0.01049041748046875,
-0.039398193359375,
-0.062164306640625,
-0.00201416015625,
0.0159912109375,
-0.022552490234375,
-0.037384033203125,
-0.003635406494140625,
-0.04595947265625,
0.0350341796875,
0.038726806640625,
-0.00452423095703125,
0.024444580078125,
-0.014862060546875,
-0.09423828125,
0.0236358642578125,
0.0115814208984375,
0.039093017578125,
-0.0007624626159667969,
0.02197265625,
0.01995849609375,
0.039642333984375,
-0.046234130859375,
0.01220703125,
-0.0142364501953125,
0.0203704833984375,
-0.01052093505859375,
-0.04608154296875,
-0.04327392578125,
-0.0305633544921875,
0.0504150390625,
0.040435791015625,
0.020538330078125,
-0.032867431640625,
-0.03558349609375,
-0.0286102294921875,
-0.0194549560546875,
-0.01403045654296875,
0.020843505859375,
-0.0697021484375,
0.0174713134765625,
0.0059661865234375,
-0.01123046875,
-0.0015583038330078125,
-0.0198974609375,
-0.049102783203125,
-0.011505126953125,
-0.042938232421875,
0.006763458251953125,
-0.0248565673828125,
0.0024623870849609375,
-0.0088653564453125,
-0.0170440673828125,
-0.04010009765625,
-0.0007014274597167969,
-0.0008139610290527344,
-0.054290771484375,
0.00984954833984375,
-0.0294036865234375,
-0.0004906654357910156,
-0.0161590576171875,
0.0205535888671875,
-0.0207366943359375,
-0.000843048095703125,
-0.01465606689453125,
0.02960205078125,
-0.0188751220703125,
0.00534820556640625,
0.0099945068359375,
-0.01007080078125,
-0.014251708984375,
0.01058197021484375,
0.01451873779296875,
0.022216796875,
0.0195770263671875,
-0.004138946533203125,
-0.005374908447265625,
0.073486328125,
-0.00560760498046875,
-0.051971435546875,
0.0060272216796875,
-0.06622314453125,
-0.00955963134765625,
0.0014133453369140625,
-0.042144775390625,
-0.04876708984375,
0.0211639404296875,
0.039398193359375,
0.007495880126953125,
0.017486572265625
]
|
747c666682d2c5a1eb819e7af1e63067db2edf10 | Wordpress Stackexchange
Q: get_current_blog_id returns 1 in multisite setting I am encountering rather a weirdo situation here.
I am currently on a multisite and created a site. This site has a blog id of 3. However, whenever I call get_current_blog_id() it returns 1 (which is obviously a network id).
I do not know why but there was definitely a change with the domain.
example)
used to be
random.com/the_mania
now it is
random.com/community/the_mania
I am running IIS by the way. What would be the cause for this?
A: get_current_blog_id() uses the global variable $blog_id as noted at https://codex.wordpress.org/Function_Reference/get_current_blog_id. When I've seen this problem before it's because I'm declaring $blog_id in my PHP code which is overwriting the WordPress global variable that provides the ID of the subsite.
Change the variable name of $blog_id and hopefully the function will start returning the correct site ID.
| Q: get_current_blog_id returns 1 in multisite setting I am encountering rather a weirdo situation here.
I am currently on a multisite and created a site. This site has a blog id of 3. However, whenever I call get_current_blog_id() it returns 1 (which is obviously a network id).
I do not know why but there was definitely a change with the domain.
example)
used to be
random.com/the_mania
now it is
random.com/community/the_mania
I am running IIS by the way. What would be the cause for this?
A: get_current_blog_id() uses the global variable $blog_id as noted at https://codex.wordpress.org/Function_Reference/get_current_blog_id. When I've seen this problem before it's because I'm declaring $blog_id in my PHP code which is overwriting the WordPress global variable that provides the ID of the subsite.
Change the variable name of $blog_id and hopefully the function will start returning the correct site ID.
| wordpress | {
"language": "en",
"length": 141,
"provenance": "stackexchange_00019.jsonl.gz:454921",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/185111"
} | [
0.0214996337890625,
-0.02239990234375,
-0.0007195472717285156,
0.042083740234375,
-0.01165771484375,
-0.032379150390625,
0.045318603515625,
-0.0291290283203125,
0.039581298828125,
0.004505157470703125,
-0.057220458984375,
0.0151824951171875,
-0.03253173828125,
-0.0022296905517578125,
-0.0015087127685546875,
-0.02899169921875,
0.057769775390625,
-0.035400390625,
0.01678466796875,
0.0075531005859375,
-0.03778076171875,
0.04107666015625,
0.03216552734375,
0.0286712646484375,
0.0421142578125,
-0.0699462890625,
0.031341552734375,
-0.0161285400390625,
0.033843994140625,
-0.018707275390625,
0.0250701904296875,
0.0211944580078125,
0.0205230712890625,
-0.007061004638671875,
0.005283355712890625,
-0.0220794677734375,
0.0228729248046875,
-0.0130462646484375,
0.0122528076171875,
0.0196685791015625,
0.0279693603515625,
-0.032806396484375,
-0.007366180419921875,
-0.010101318359375,
-0.01276397705078125,
-0.04571533203125,
0.01230621337890625,
-0.04498291015625,
0.00405120849609375,
0.016387939453125,
0.01117706298828125,
0.031463623046875,
0.0189056396484375,
0.0017681121826171875,
-0.016387939453125,
-0.0278472900390625,
0.05078125,
-0.057037353515625,
0.026824951171875,
-0.036773681640625,
-0.0257110595703125,
0.0001633167266845703,
0.051116943359375,
0.006412506103515625,
-0.0022716522216796875,
0.0164794921875,
0.033966064453125,
0.0269927978515625,
-0.03143310546875,
-0.050811767578125,
-0.0135498046875,
-0.01552581787109375,
0.014801025390625,
-0.0015888214111328125,
-0.0628662109375,
-0.046478271484375,
0.0321044921875,
-0.04522705078125,
-0.0020008087158203125,
-0.016876220703125,
-0.0282135009765625,
-0.0300445556640625,
-0.083251953125,
0.0244903564453125,
-0.0294036865234375,
0.049102783203125,
-0.01568603515625,
-0.00885009765625,
-0.02838134765625,
0.00872039794921875,
-0.018035888671875,
-0.028228759765625,
-0.016571044921875,
0.0083465576171875,
-0.00220489501953125,
-0.0309295654296875,
0.05670166015625,
0.111572265625,
-0.05401611328125,
-0.047882080078125,
-0.0174102783203125,
-0.005168914794921875,
-0.076416015625,
-0.0183563232421875,
0.0019512176513671875,
0.0273590087890625,
0.042633056640625,
0.00495147705078125,
0.02117919921875,
0.0034961700439453125,
-0.0150299072265625,
0.039031982421875,
-0.0178985595703125,
-0.00855255126953125,
-0.04864501953125,
0.00180816650390625,
-0.04718017578125,
-0.0301055908203125,
-0.00411224365234375,
-0.0266571044921875,
0.0206451416015625,
0.054718017578125,
-0.020599365234375,
0.006641387939453125,
-0.0002872943878173828,
0.0199737548828125,
-0.0006890296936035156,
-0.0406494140625,
-0.03704833984375,
0.04931640625,
-0.056610107421875,
-0.0025501251220703125,
0.080322265625,
0.026397705078125,
0.0022335052490234375,
-0.0400390625,
0.0316162109375,
-0.0206451416015625,
0.005268096923828125,
0.008331298828125,
0.0045623779296875,
-0.03204345703125,
-0.026458740234375,
-0.016143798828125,
-0.006683349609375,
0.03790283203125,
0.0263824462890625,
0.011962890625,
-0.022491455078125,
-0.044677734375,
0.0076141357421875,
-0.0177764892578125,
0.033935546875,
-0.01134490966796875,
0.03826904296875,
-0.046051025390625,
0.039947509765625,
-0.049774169921875,
0.00931549072265625,
-0.034088134765625,
0.06781005859375,
-0.006378173828125,
-0.0099334716796875,
0.004436492919921875,
-0.04302978515625,
-0.006927490234375,
-0.056640625,
-0.01412200927734375,
0.027587890625,
0.055755615234375,
-0.0167388916015625,
-0.02008056640625,
0.050262451171875,
0.0227813720703125,
-0.022369384765625,
0.018707275390625,
0.007534027099609375,
-0.0075531005859375,
0.022308349609375,
0.060791015625,
0.0013551712036132812,
-0.035064697265625,
0.01543426513671875,
0.0027751922607421875,
-0.046844482421875,
0.041778564453125,
-0.002994537353515625,
0.058685302734375,
0.0183563232421875,
0.0140228271484375,
0.030242919921875,
0.0108489990234375,
-0.057220458984375,
0.01151275634765625,
0.0264434814453125,
0.022308349609375,
-0.04046630859375,
0.0074615478515625,
0.0005297660827636719,
-0.040313720703125,
-0.00818634033203125,
-0.0219268798828125,
0.02374267578125,
-0.00838470458984375,
-0.034149169921875,
-0.002506256103515625,
-0.016937255859375,
0.037506103515625,
0.0061187744140625,
-0.00995635986328125,
0.005260467529296875,
-0.015899658203125,
0.0031719207763671875,
-0.0155487060546875,
-0.00545501708984375,
0.0518798828125,
-0.033905029296875,
0.0125885009765625,
-0.0240936279296875,
0.0124664306640625,
-0.07122802734375,
0.0124359130859375,
-0.0762939453125,
-0.01158905029296875,
0.06231689453125,
-0.023223876953125,
-0.0234222412109375,
-0.043121337890625,
0.030487060546875,
-0.0030002593994140625,
-0.0653076171875,
0.049774169921875,
0.013916015625,
0.038116455078125,
-0.02362060546875,
-0.0228271484375,
0.01314544677734375,
-0.039794921875,
0.02960205078125,
0.032257080078125,
0.04461669921875,
0.0218658447265625,
0.033935546875,
0.01389312744140625,
0.0007476806640625,
-0.061981201171875,
0.0262298583984375,
-0.033447265625,
0.020538330078125,
0.0748291015625,
-0.005035400390625,
0.0088653564453125,
0.004665374755859375,
-0.00299072265625,
-0.003238677978515625,
0.053466796875,
-0.019622802734375,
-0.01175689697265625,
0.024200439453125,
-0.01239013671875,
-0.003124237060546875,
-0.0123443603515625,
-0.01244354248046875,
-0.00713348388671875,
0.003894805908203125,
0.04241943359375,
0.0225372314453125,
0.0308990478515625,
-0.017181396484375,
0.015655517578125,
-0.0038585662841796875,
0.0002353191375732422,
0.014068603515625,
0.043731689453125,
0.01352691650390625,
-0.0079803466796875,
-0.017242431640625,
-0.01097869873046875,
-0.0034580230712890625,
0.00684356689453125,
-0.0183563232421875,
0.0302886962890625,
-0.055084228515625,
-0.01953125,
0.0016832351684570312,
-0.0261077880859375,
-0.0323486328125,
-0.0179901123046875,
-0.005992889404296875,
-0.035980224609375,
-0.009002685546875,
0.0291900634765625,
-0.04315185546875,
0.07373046875,
-0.0166778564453125,
-0.017608642578125,
0.0379638671875,
-0.0511474609375,
0.04779052734375,
-0.040985107421875,
0.0809326171875,
0.06927490234375,
-0.041351318359375,
0.051177978515625,
-0.01238250732421875,
0.012725830078125,
-0.01910400390625,
-0.0010786056518554688,
-0.0006136894226074219,
0.01190185546875,
-0.061676025390625,
0.04071044921875,
0.0155487060546875,
0.0282745361328125,
-0.0220489501953125,
-0.032073974609375,
-0.0151824951171875,
-0.00971221923828125,
-0.0782470703125,
-0.06951904296875,
0.0213165283203125,
-0.006999969482421875,
-0.0123291015625,
-0.042083740234375,
0.0062713623046875,
-0.005260467529296875,
-0.054931640625,
-0.006153106689453125,
0.026885986328125,
-0.051300048828125,
-0.09442138671875,
-0.06781005859375,
-0.10284423828125,
0.0034046173095703125,
-0.01117706298828125,
0.0057373046875,
0.0005879402160644531,
0.0234222412109375,
0.00579833984375,
-0.0242156982421875,
0.020416259765625,
0.0008358955383300781,
-0.014739990234375,
-0.0175018310546875,
-0.00984954833984375,
-0.02459716796875,
-0.0203399658203125,
0.005329132080078125,
-0.0229034423828125,
-0.0012302398681640625,
0.0270233154296875,
-0.0015707015991210938,
-0.007358551025390625,
-0.01434326171875,
0.0226287841796875,
-0.033905029296875,
-0.0103302001953125,
0.03271484375,
0.0249786376953125,
-0.024749755859375,
-0.004886627197265625,
-0.056182861328125,
-0.033966064453125,
0.0689697265625,
0.03436279296875,
-0.01580810546875,
-0.03216552734375,
0.0289459228515625,
-0.009185791015625,
-0.00843048095703125,
-0.020538330078125,
-0.0462646484375,
0.06158447265625,
0.0218505859375,
0.015106201171875,
0.0005679130554199219,
0.04473876953125,
-0.003269195556640625,
-0.0215301513671875,
0.003978729248046875,
0.0087890625,
-0.028411865234375,
0.0122222900390625,
-0.05609130859375,
0.00609588623046875,
0.028045654296875,
-0.008514404296875,
0.0158233642578125,
-0.005451202392578125,
-0.0232696533203125,
-0.0011119842529296875,
0.065673828125,
-0.03741455078125,
-0.02142333984375,
-0.0026607513427734375,
0.0225067138671875,
-0.023040771484375,
-0.042205810546875,
-0.03057861328125,
-0.0260467529296875,
-0.025390625,
0.0010576248168945312,
-0.03265380859375,
0.017822265625,
-0.005710601806640625,
0.0391845703125,
0.00449371337890625,
-0.04083251953125,
0.0230255126953125,
-0.0186309814453125,
0.01107025146484375,
0.0300750732421875,
0.016082763671875,
-0.00641632080078125,
-0.012725830078125,
-0.0245361328125,
-0.03045654296875,
-0.01523590087890625,
0.024322509765625,
0.0242767333984375,
-0.00836181640625,
-0.0150909423828125,
0.0078582763671875,
0.0457763671875,
-0.034210205078125,
-0.0003371238708496094,
-0.021270751953125,
0.0262908935546875,
-0.01364898681640625,
0.01983642578125,
-0.02349853515625,
0.001049041748046875,
-0.03582763671875,
-0.04071044921875,
-0.02557373046875,
-0.03265380859375,
-0.01470947265625,
-0.028472900390625,
0.019012451171875,
-0.01413726806640625,
-0.07525634765625,
-0.04254150390625,
0.0266571044921875,
0.0232391357421875,
-0.0205841064453125,
0.031890869140625,
-0.0172271728515625,
-0.034759521484375,
0.03448486328125,
-0.001979827880859375,
-0.0306396484375,
-0.006381988525390625,
0.06756591796875,
0.039459228515625,
-0.0305328369140625,
0.0017652511596679688,
-0.0117950439453125,
0.01898193359375,
-0.0248565673828125,
0.060821533203125,
0.0225372314453125,
-0.01290130615234375,
0.03350830078125,
-0.005657196044921875,
-0.0078277587890625,
0.023223876953125,
0.037933349609375,
0.005565643310546875,
-0.0222930908203125,
0.0127410888671875,
-0.005397796630859375,
-0.0243682861328125,
-0.01137542724609375,
-0.035400390625,
-0.0361328125,
-0.0193328857421875,
0.071533203125,
-0.03509521484375,
0.0662841796875,
-0.0562744140625,
-0.06353759765625,
0.0245513916015625,
-0.00970458984375,
-0.01369476318359375,
0.005504608154296875,
0.0090484619140625,
0.0196380615234375,
0.027313232421875,
-0.001865386962890625,
0.03973388671875,
0.0009188652038574219,
0.0304412841796875,
0.01241302490234375,
0.0151519775390625,
-0.000682830810546875,
0.01052093505859375,
-0.02685546875,
0.10150146484375,
-0.0116729736328125,
-0.06378173828125,
0.04058837890625,
-0.0147247314453125,
-0.0180816650390625,
0.0276947021484375,
-0.04669189453125,
0.0275726318359375,
0.01277923583984375,
-0.04766845703125,
-0.0016727447509765625,
-0.062286376953125,
-0.02783203125,
-0.06732177734375,
-0.01197052001953125,
-0.00152587890625,
-0.005313873291015625,
0.0167388916015625,
0.056304931640625,
0.0169677734375,
0.043853759765625,
-0.026123046875,
0.007568359375,
0.024200439453125,
0.023223876953125,
0.0300445556640625,
-0.025482177734375,
0.00396728515625,
0.0011892318725585938,
0.0014171600341796875,
-0.0265960693359375,
0.020721435546875,
0.025909423828125,
0.026336669921875,
0.01474761962890625,
-0.0275421142578125,
0.0062255859375,
-0.01009368896484375,
-0.0170440673828125,
0.052154541015625,
-0.00859832763671875,
-0.05963134765625,
-0.034515380859375,
-0.022064208984375,
0.0301513671875,
-0.0125579833984375,
-0.01220703125,
-0.01027679443359375,
-0.049072265625,
-0.013702392578125,
0.00640869140625,
0.00704193115234375,
-0.0303955078125,
-0.032135009765625,
-0.0364990234375,
-0.00846099853515625,
0.01123809814453125,
0.0019969940185546875,
-0.03753662109375,
-0.012725830078125,
-0.03369140625,
0.0567626953125,
0.007701873779296875,
0.0474853515625,
-0.0523681640625,
-0.035614013671875,
-0.0166168212890625,
-0.0007562637329101562,
0.03594970703125,
0.021453857421875,
-0.02154541015625,
0.005054473876953125,
-0.031982421875,
0.0014543533325195312,
0.06365966796875,
-0.019744873046875,
-0.00821685791015625,
-0.042083740234375,
-0.00202178955078125,
0.029754638671875,
0.0005702972412109375,
0.0036563873291015625,
-0.0098876953125,
-0.0194549560546875,
-0.0187835693359375,
0.025390625,
-0.0152740478515625,
-0.015625,
0.04571533203125,
0.0075225830078125,
0.01800537109375,
0.01309967041015625,
0.0163116455078125,
-0.04071044921875,
0.021575927734375,
-0.020904541015625,
-0.022186279296875,
-0.0068206787109375,
-0.024627685546875,
-0.041900634765625,
-0.00122833251953125,
-0.012420654296875,
0.00983428955078125,
0.0253753662109375,
0.02142333984375,
-0.01163482666015625,
-0.09246826171875,
0.05517578125,
0.007175445556640625,
0.0195770263671875,
-0.0390625,
-0.0011243820190429688,
0.02001953125,
0.032379150390625,
-0.052703857421875,
-0.01291656494140625,
-0.04705810546875,
0.034942626953125,
-0.0238189697265625,
0.054473876953125,
0.0771484375,
-0.0006003379821777344,
0.041748046875,
0.01494598388671875,
0.00234222412109375,
0.0087432861328125,
0.01410675048828125,
-0.0030975341796875,
-0.0236358642578125,
0.0241546630859375,
-0.0015544891357421875,
-0.0164031982421875,
0.00800323486328125,
-0.03363037109375,
-0.0002332925796508789,
0.00812530517578125,
0.031341552734375,
-0.0306854248046875,
0.014312744140625,
0.00365447998046875,
-0.01517486572265625,
0.007659912109375,
0.00745391845703125,
-0.005313873291015625,
-0.0214385986328125,
0.0299530029296875,
-0.0195159912109375,
-0.0296783447265625,
0.007106781005859375,
-0.007282257080078125,
-0.00928497314453125,
-0.0220794677734375,
0.0264129638671875,
0.006275177001953125,
-0.007320404052734375,
-0.005657196044921875,
0.001789093017578125,
-0.00489044189453125,
0.01934814453125,
-0.0148162841796875,
0.0216217041015625,
-0.032135009765625,
-0.0531005859375,
0.01053619384765625,
-0.0262451171875,
-0.022186279296875,
-0.01824951171875,
-0.0073089599609375,
-0.01102447509765625,
0.043853759765625,
-0.036407470703125,
-0.0006499290466308594,
0.036407470703125,
-0.047454833984375,
-0.01483154296875,
-0.03619384765625,
0.036590576171875,
0.038055419921875,
-0.042236328125,
0.02825927734375,
-0.0017004013061523438,
-0.03326416015625,
-0.005863189697265625,
-0.00975799560546875,
0.07330322265625,
-0.052154541015625,
0.004241943359375,
0.04852294921875,
0.017852783203125,
-0.0287628173828125,
-0.00490570068359375,
-0.00586700439453125,
-0.050872802734375,
-0.026458740234375,
0.00598907470703125,
-0.0037136077880859375,
0.007404327392578125,
0.0233917236328125,
-0.0555419921875,
0.056732177734375,
-0.02972412109375,
0.035430908203125,
0.0263519287109375,
0.009490966796875,
0.0092926025390625,
-0.0004572868347167969,
-0.0325927734375,
-0.00884246826171875,
-0.0533447265625,
0.03076171875,
-0.050994873046875,
0.005741119384765625,
-0.012420654296875,
0.0247802734375,
0.06488037109375,
0.02197265625,
-0.0030536651611328125,
-0.0056304931640625,
0.023101806640625,
0.0109100341796875,
-0.035308837890625,
0.0237274169921875,
0.017120361328125,
0.032135009765625,
0.015655517578125,
-0.0233306884765625,
0.01174163818359375,
-0.0006532669067382812,
-0.03887939453125,
0.040252685546875,
-0.0009222030639648438,
-0.01496124267578125,
-0.004364013671875,
-0.004547119140625,
-0.05322265625,
0.01432037353515625,
0.028717041015625,
0.0008115768432617188,
0.0110015869140625,
0.047943115234375,
0.055511474609375,
-0.041412353515625,
0.0595703125,
-0.050506591796875,
0.0823974609375,
-0.00713348388671875,
-0.0186614990234375,
0.04425048828125,
0.015289306640625,
0.01435089111328125,
0.0243988037109375,
0.00699615478515625,
0.0135040283203125,
0.0103912353515625,
0.0308380126953125,
0.044525146484375,
0.030975341796875,
-0.0126190185546875,
-0.0015716552734375,
0.052825927734375,
0.047882080078125,
-0.0180511474609375,
-0.016265869140625,
0.0178070068359375,
0.00545501708984375,
0.007190704345703125,
0.01074981689453125,
0.0343017578125,
0.025970458984375,
0.01331329345703125,
-0.0184783935546875,
0.0010852813720703125,
0.0124664306640625,
0.034210205078125,
0.02020263671875,
0.031707763671875,
-0.0537109375,
-0.032196044921875,
-0.06329345703125,
0.01934814453125,
0.012176513671875,
0.0872802734375,
0.0224609375,
0.07354736328125,
-0.0491943359375,
-0.045196533203125,
0.0048065185546875,
0.0567626953125,
-0.02398681640625,
-0.0193328857421875,
-0.03326416015625,
-0.0816650390625,
0.020538330078125,
0.038116455078125,
0.0225982666015625,
0.0267791748046875,
0.04022216796875,
0.00909423828125,
-0.036407470703125,
-0.0028018951416015625,
0.00917816162109375,
-0.0210723876953125,
0.0014619827270507812,
-0.0472412109375,
-0.01739501953125,
-0.022308349609375,
-0.0218963623046875,
0.01302337646484375,
-0.018798828125,
0.013092041015625,
-0.0008034706115722656,
0.033843994140625,
0.006977081298828125,
0.021820068359375,
0.0035152435302734375,
0.003269195556640625,
-0.024871826171875,
0.0172576904296875,
-0.0694580078125,
-0.0027256011962890625,
-0.0594482421875,
-0.0204925537109375,
0.0251312255859375,
0.039093017578125,
0.020782470703125,
-0.01494598388671875,
-0.022796630859375,
-0.00440216064453125,
0.0022983551025390625,
0.005496978759765625,
0.00335693359375,
0.0303497314453125,
0.035003662109375,
0.0125732421875,
-0.08319091796875,
-0.03704833984375,
0.01169586181640625,
-0.01012420654296875,
-0.0034809112548828125,
0.03387451171875,
0.025360107421875,
-0.0104217529296875,
0.004604339599609375,
0.02655029296875,
-0.054962158203125,
0.00039649009704589844,
-0.013214111328125,
-0.039764404296875,
0.0047607421875,
0.0208282470703125,
-0.0716552734375,
0.021392822265625,
0.0411376953125,
0.0028076171875,
0.03369140625,
-0.008514404296875,
0.0163726806640625,
-0.01378631591796875,
0.0030002593994140625,
-0.02716064453125,
-0.045684814453125,
-0.061004638671875,
-0.01342010498046875,
0.043182373046875,
0.0258636474609375,
-0.035675048828125,
0.039794921875,
0.006511688232421875,
-0.040924072265625,
0.0118408203125,
-0.038330078125,
0.022705078125,
0.028594970703125,
0.006458282470703125,
-0.00879669189453125,
0.0052032470703125,
-0.0136871337890625,
0.01236724853515625,
-0.0024662017822265625,
0.0243988037109375,
0.002185821533203125,
0.00830078125,
0.0655517578125,
0.02215576171875,
0.05126953125,
-0.0323486328125,
0.01149749755859375,
0.060821533203125,
0.004192352294921875,
0.00881195068359375,
-0.043792724609375,
-0.018524169921875,
-0.01468658447265625,
-0.022857666015625,
0.01134490966796875,
-0.0162200927734375,
-0.00800323486328125,
-0.001537322998046875,
-0.01654052734375,
0.00933074951171875,
-0.0211181640625,
0.006866455078125,
0.0145263671875,
-0.04266357421875,
-0.006778717041015625,
-0.0196380615234375,
-0.0196533203125,
-0.006366729736328125,
0.01514434814453125,
-0.010498046875,
-0.01555633544921875,
-0.020477294921875,
0.004711151123046875,
-0.002227783203125,
0.0162200927734375,
0.00328826904296875,
-0.0035572052001953125,
-0.0083770751953125,
0.0305938720703125,
-0.00510406494140625,
0.0682373046875,
-0.031219482421875,
-0.019561767578125,
0.00937652587890625,
-0.0210723876953125,
-0.0202484130859375,
-0.042510986328125,
0.037078857421875,
-0.11114501953125,
-0.0295867919921875,
-0.0469970703125,
0.0230712890625,
0.03131103515625,
-0.0179901123046875,
0.009002685546875,
0.0039043426513671875,
0.0091705322265625,
-0.0273590087890625,
-0.042999267578125,
-0.0022602081298828125,
0.00007194280624389648,
0.0037860870361328125,
-0.014373779296875,
-0.04296875,
-0.03436279296875,
0.035491943359375,
0.02081298828125,
0.011505126953125,
0.0193023681640625,
-0.0021457672119140625,
-0.04290771484375,
0.01448822021484375,
0.01406097412109375,
0.010955810546875,
0.00994873046875,
-0.01523590087890625,
0.0192413330078125,
0.0333251953125,
-0.04620361328125,
-0.0096588134765625,
0.0020294189453125,
0.0303802490234375,
-0.02008056640625,
-0.0347900390625,
-0.0168304443359375,
0.004230499267578125,
0.06793212890625,
0.03936767578125,
0.0129852294921875,
-0.0491943359375,
-0.03558349609375,
0.00579071044921875,
-0.08612060546875,
-0.019287109375,
0.06707763671875,
-0.1094970703125,
-0.002399444580078125,
0.0189666748046875,
-0.033447265625,
0.0029468536376953125,
-0.021148681640625,
-0.057159423828125,
0.02459716796875,
-0.02056884765625,
-0.0021495819091796875,
-0.0146331787109375,
0.0183563232421875,
0.0046844482421875,
-0.01111602783203125,
-0.00421142578125,
0.00250244140625,
-0.01496124267578125,
0.0005517005920410156,
0.0193939208984375,
0.0131988525390625,
0.0296783447265625,
-0.033203125,
-0.0007219314575195312,
0.0190277099609375,
-0.0035533905029296875,
0.0219573974609375,
-0.01503753662109375,
0.005889892578125,
-0.0005660057067871094,
-0.01351165771484375,
-0.00820159912109375,
0.076416015625,
-0.03607177734375,
-0.0262603759765625,
0.01296234130859375,
-0.01087188720703125,
0.043914794921875,
-0.01067352294921875,
0.059783935546875,
-0.052520751953125,
-0.0004849433898925781,
-0.018310546875,
-0.0272979736328125,
-0.0220184326171875,
0.041778564453125,
0.0179901123046875,
-0.056884765625,
0.0433349609375,
0.0246124267578125,
0.053619384765625,
0.0286407470703125
]
|
c7ec9c0c37a51e3f6239b2b68b849901b4f43939 | Wordpress Stackexchange
Q: RequireJS in custom theme. Working Example I try to add to my custom wordpress Theme requirejs because I do not want to use wp_enqueue over and over to inject used plugins and on the other side I do not want to mess the DOM from the beginning.
I followed a lot of tutorials what I got from google but none of theme is working. Is there a good working example how to use requirejs in a wrodpress theme properly?
| Q: RequireJS in custom theme. Working Example I try to add to my custom wordpress Theme requirejs because I do not want to use wp_enqueue over and over to inject used plugins and on the other side I do not want to mess the DOM from the beginning.
I followed a lot of tutorials what I got from google but none of theme is working. Is there a good working example how to use requirejs in a wrodpress theme properly?
| wordpress | {
"language": "en",
"length": 80,
"provenance": "stackexchange_00019.jsonl.gz:454932",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/185165"
} | [
0.044036865234375,
-0.02313232421875,
-0.00380706787109375,
-0.08013916015625,
-0.0017299652099609375,
0.0041656494140625,
-0.025115966796875,
0.003326416015625,
-0.05804443359375,
0.0119171142578125,
-0.041534423828125,
0.0259246826171875,
-0.0305328369140625,
-0.00400543212890625,
0.0171356201171875,
-0.06011962890625,
0.0401611328125,
-0.00921630859375,
0.0187530517578125,
-0.0210723876953125,
0.004650115966796875,
0.009368896484375,
0.007232666015625,
0.104736328125,
0.035125732421875,
0.01122283935546875,
0.064697265625,
0.00814056396484375,
0.0084686279296875,
-0.0027027130126953125,
0.0345458984375,
-0.047760009765625,
0.01177215576171875,
0.039947509765625,
-0.034027099609375,
-0.028350830078125,
-0.0207061767578125,
0.0240478515625,
0.00472259521484375,
0.00200653076171875,
0.0224609375,
-0.012237548828125,
0.0372314453125,
0.026519775390625,
-0.00800323486328125,
-0.04345703125,
0.0206298828125,
-0.04852294921875,
0.011871337890625,
-0.021881103515625,
0.01201629638671875,
0.0207061767578125,
0.02734375,
-0.03509521484375,
-0.006755828857421875,
0.01430511474609375,
0.0102996826171875,
0.0254058837890625,
0.029388427734375,
0.0262603759765625,
-0.033599853515625,
0.0190277099609375,
0.00010395050048828125,
-0.045196533203125,
-0.0016241073608398438,
-0.0212249755859375,
-0.05938720703125,
0.02239990234375,
-0.0628662109375,
0.00939178466796875,
0.051239013671875,
-0.05999755859375,
-0.0177001953125,
0.01280975341796875,
-0.0187835693359375,
-0.07415771484375,
0.049072265625,
-0.05145263671875,
-0.01580810546875,
0.046783447265625,
-0.01490020751953125,
-0.050628662109375,
-0.025360107421875,
-0.0033626556396484375,
-0.0131072998046875,
0.0098724365234375,
-0.0182342529296875,
0.01477813720703125,
-0.03900146484375,
-0.042510986328125,
-0.031402587890625,
-0.00130462646484375,
-0.0811767578125,
-0.0020542144775390625,
-0.008697509765625,
0.011688232421875,
0.0386962890625,
0.041961669921875,
0.0061492919921875,
0.0266265869140625,
0.0322265625,
-0.06292724609375,
0.0797119140625,
-0.043243408203125,
-0.006870269775390625,
0.052398681640625,
-0.0084686279296875,
-0.0032520294189453125,
0.0248565673828125,
0.03546142578125,
0.01210784912109375,
0.00484466552734375,
0.0670166015625,
-0.0113525390625,
-0.006847381591796875,
-0.0247955322265625,
0.0261993408203125,
0.0123138427734375,
0.0175628662109375,
-0.020416259765625,
0.010650634765625,
0.0101318359375,
0.00554656982421875,
-0.0133819580078125,
0.013885498046875,
-0.001312255859375,
-0.032928466796875,
-0.016082763671875,
-0.011474609375,
0.011871337890625,
-0.051666259765625,
0.004650115966796875,
0.109130859375,
0.058837890625,
0.031890869140625,
-0.024139404296875,
0.07891845703125,
0.05401611328125,
0.040924072265625,
0.0011720657348632812,
0.004119873046875,
-0.022369384765625,
-0.0204010009765625,
0.01100921630859375,
0.02764892578125,
0.00673675537109375,
0.007221221923828125,
0.023773193359375,
0.028594970703125,
-0.043853759765625,
0.056915283203125,
-0.046661376953125,
0.0196380615234375,
0.023834228515625,
0.0274658203125,
-0.01323699951171875,
0.04144287109375,
-0.0274658203125,
0.0096588134765625,
-0.0204620361328125,
-0.0013408660888671875,
0.002506256103515625,
0.004230499267578125,
-0.024017333984375,
-0.030120849609375,
-0.018707275390625,
0.0100250244140625,
0.0182647705078125,
0.0240020751953125,
0.035491943359375,
-0.027557373046875,
-0.019561767578125,
0.02557373046875,
0.025177001953125,
-0.0109710693359375,
0.03228759765625,
0.01042938232421875,
0.0139007568359375,
0.033782958984375,
0.01132965087890625,
-0.007709503173828125,
-0.037689208984375,
0.08465576171875,
-0.026763916015625,
-0.05096435546875,
-0.01947021484375,
0.0308074951171875,
0.060791015625,
0.0172882080078125,
0.033477783203125,
0.036468505859375,
-0.016387939453125,
0.0238037109375,
0.0232086181640625,
0.002079010009765625,
-0.059417724609375,
-0.0021648406982421875,
-0.01464080810546875,
-0.014129638671875,
-0.0017633438110351562,
-0.0325927734375,
-0.006443023681640625,
0.00959014892578125,
-0.0139617919921875,
-0.03033447265625,
0.0086669921875,
-0.023101806640625,
0.043853759765625,
0.0008487701416015625,
-0.0219268798828125,
0.00579833984375,
-0.00043654441833496094,
0.003612518310546875,
-0.056488037109375,
-0.053985595703125,
0.02886962890625,
-0.03326416015625,
0.06793212890625,
0.00817108154296875,
0.0195465087890625,
0.0223846435546875,
-0.0579833984375,
0.033294677734375,
0.0027484893798828125,
-0.01238250732421875,
0.0065460205078125,
-0.0299530029296875,
-0.00682830810546875,
-0.051055908203125,
0.00798797607421875,
-0.0225067138671875,
0.051849365234375,
0.0361328125,
0.0966796875,
-0.0011425018310546875,
-0.030364990234375,
-0.01189422607421875,
-0.022064208984375,
0.01291656494140625,
0.0245208740234375,
0.0194244384765625,
0.0628662109375,
-0.01500701904296875,
-0.0005421638488769531,
0.0830078125,
-0.0213165283203125,
-0.01113128662109375,
0.0166168212890625,
0.00865936279296875,
-0.0009160041809082031,
0.020599365234375,
-0.03173828125,
0.0257568359375,
-0.050994873046875,
0.030059814453125,
0.0213470458984375,
0.01708984375,
0.052215576171875,
-0.00901031494140625,
0.0013513565063476562,
-0.004913330078125,
0.02960205078125,
-0.0007448196411132812,
0.01050567626953125,
0.0240020751953125,
-0.0092315673828125,
0.0191802978515625,
-0.0007228851318359375,
0.01678466796875,
-0.00954437255859375,
0.004596710205078125,
-0.048370361328125,
0.00008100271224975586,
0.037689208984375,
0.02734375,
0.0347900390625,
-0.048736572265625,
-0.00794219970703125,
0.03106689453125,
0.03265380859375,
-0.0035800933837890625,
0.01424407958984375,
0.00212860107421875,
-0.007476806640625,
0.01180267333984375,
-0.0401611328125,
0.0088653564453125,
0.015838623046875,
0.026214599609375,
0.03839111328125,
0.0430908203125,
0.0185394287109375,
-0.00849151611328125,
0.01140594482421875,
0.0272979736328125,
-0.01364898681640625,
0.00804901123046875,
-0.0223541259765625,
0.037384033203125,
-0.0513916015625,
0.0027370452880859375,
0.04095458984375,
-0.03106689453125,
0.0162200927734375,
0.0306549072265625,
0.0136566162109375,
0.0306396484375,
0.0257110595703125,
0.016754150390625,
0.034576416015625,
-0.10113525390625,
-0.0157318115234375,
0.020904541015625,
0.006870269775390625,
0.040130615234375,
-0.01434326171875,
0.0030193328857421875,
0.00655364990234375,
-0.0313720703125,
-0.054534912109375,
-0.0004096031188964844,
-0.053070068359375,
0.017486572265625,
-0.0213165283203125,
-0.024444580078125,
0.00015878677368164062,
-0.00971221923828125,
0.01454925537109375,
-0.0284423828125,
-0.0528564453125,
-0.039276123046875,
-0.1136474609375,
-0.0762939453125,
-0.0380859375,
0.01142120361328125,
0.004489898681640625,
-0.003803253173828125,
0.0587158203125,
0.01366424560546875,
-0.0306854248046875,
0.00826263427734375,
0.012939453125,
-0.01422119140625,
-0.0009431838989257812,
0.049346923828125,
-0.04730224609375,
-0.038116455078125,
0.0110931396484375,
0.0006566047668457031,
0.00582122802734375,
-0.0221099853515625,
-0.011962890625,
-0.0242767333984375,
-0.00856781005859375,
-0.0103607177734375,
0.0306854248046875,
0.034149169921875,
0.00397491455078125,
0.0290679931640625,
-0.029205322265625,
-0.036651611328125,
0.040985107421875,
-0.03167724609375,
-0.00839996337890625,
-0.013397216796875,
-0.026458740234375,
0.01186370849609375,
0.00580596923828125,
0.027008056640625,
0.03668212890625,
-0.0174102783203125,
0.0067596435546875,
0.07122802734375,
-0.001953125,
0.031890869140625,
-0.0256195068359375,
0.035858154296875,
-0.0218505859375,
0.0172882080078125,
0.011962890625,
-0.0147705078125,
-0.0169677734375,
-0.00421905517578125,
-0.0298614501953125,
-0.0271453857421875,
0.00687408447265625,
-0.024810791015625,
0.0267333984375,
0.01172637939453125,
-0.0000374913215637207,
0.039276123046875,
0.0811767578125,
-0.01502227783203125,
-0.0180511474609375,
0.0229339599609375,
-0.00518035888671875,
0.019195556640625,
0.04705810546875,
-0.043609619140625,
-0.0279388427734375,
-0.00958251953125,
-0.0206298828125,
-0.033294677734375,
-0.00980377197265625,
-0.00360870361328125,
-0.046783447265625,
0.004253387451171875,
-0.048919677734375,
0.037078857421875,
-0.09979248046875,
0.0249176025390625,
-0.0146331787109375,
0.005397796630859375,
-0.05133056640625,
-0.01031494140625,
-0.0596923828125,
-0.087158203125,
-0.01520538330078125,
-0.06646728515625,
0.0927734375,
0.0262451171875,
0.01500701904296875,
-0.02569580078125,
0.03265380859375,
0.028228759765625,
0.03472900390625,
0.012847900390625,
0.00482940673828125,
0.00415802001953125,
-0.0005035400390625,
0.018585205078125,
-0.0273590087890625,
-0.025238037109375,
-0.005451202392578125,
-0.05255126953125,
0.0411376953125,
0.02069091796875,
0.0156707763671875,
0.039276123046875,
-0.028167724609375,
0.009613037109375,
-0.0141754150390625,
-0.048797607421875,
0.0009675025939941406,
-0.022369384765625,
-0.025909423828125,
-0.0203857421875,
-0.00252532958984375,
0.01922607421875,
-0.0031147003173828125,
0.00815582275390625,
0.006946563720703125,
0.025604248046875,
0.015869140625,
-0.021728515625,
-0.035888671875,
-0.00457763671875,
0.0341796875,
-0.002307891845703125,
0.037994384765625,
0.003208160400390625,
-0.0325927734375,
0.09222412109375,
0.01073455810546875,
-0.00391387939453125,
0.024993896484375,
0.0113983154296875,
0.019073486328125,
0.002285003662109375,
-0.0086212158203125,
0.022552490234375,
-0.0019626617431640625,
0.004734039306640625,
-0.0268707275390625,
0.006229400634765625,
0.00432586669921875,
0.0162200927734375,
-0.05755615234375,
0.039215087890625,
-0.00789642333984375,
-0.007518768310546875,
-0.006977081298828125,
-0.03265380859375,
0.050628662109375,
0.03729248046875,
-0.0167083740234375,
0.020538330078125,
0.0242919921875,
0.013031005859375,
0.003688812255859375,
0.012420654296875,
-0.03985595703125,
0.00817108154296875,
0.06103515625,
0.006862640380859375,
0.000972747802734375,
-0.0097198486328125,
0.05389404296875,
0.00539398193359375,
-0.044342041015625,
-0.01116943359375,
-0.00022423267364501953,
0.061920166015625,
0.0291290283203125,
0.005954742431640625,
-0.0021953582763671875,
0.0016775131225585938,
-0.0205230712890625,
0.0089874267578125,
0.0165252685546875,
-0.01953125,
-0.0148468017578125,
0.0042572021484375,
0.021636962890625,
-0.031829833984375,
-0.0238800048828125,
0.041961669921875,
0.006191253662109375,
-0.00691986083984375,
0.004726409912109375,
0.04608154296875,
0.042449951171875,
0.0364990234375,
0.01047515869140625,
-0.0129241943359375,
-0.012664794921875,
0.01505279541015625,
-0.01029205322265625,
-0.0274200439453125,
-0.02239990234375,
0.0052490234375,
0.0263214111328125,
-0.044189453125,
-0.01438140869140625,
0.045135498046875,
0.00954437255859375,
0.0029449462890625,
-0.009521484375,
-0.052276611328125,
-0.0229034423828125,
-0.00852203369140625,
-0.0408935546875,
0.0238189697265625,
-0.0015382766723632812,
-0.004486083984375,
0.0184478759765625,
-0.01468658447265625,
0.038177490234375,
-0.03790283203125,
0.01369476318359375,
-0.002300262451171875,
0.000789642333984375,
-0.03564453125,
0.01274871826171875,
0.01947021484375,
-0.015167236328125,
-0.060577392578125,
-0.007358551025390625,
-0.0018529891967773438,
0.041656494140625,
-0.0222930908203125,
0.01503753662109375,
-0.0181427001953125,
-0.014923095703125,
-0.0413818359375,
0.0182952880859375,
0.039642333984375,
0.0238189697265625,
-0.09234619140625,
-0.01275634765625,
-0.0615234375,
0.00537872314453125,
-0.00989532470703125,
-0.057373046875,
-0.0256195068359375,
0.0003886222839355469,
-0.0234832763671875,
0.01074981689453125,
-0.041961669921875,
-0.007904052734375,
0.0031890869140625,
0.02716064453125,
0.005939483642578125,
0.0233917236328125,
-0.020172119140625,
0.04345703125,
0.0166473388671875,
0.05126953125,
0.01232147216796875,
0.0212860107421875,
0.036224365234375,
-0.04351806640625,
-0.001689910888671875,
-0.022735595703125,
-0.02215576171875,
-0.0095672607421875,
-0.0105133056640625,
0.01580810546875,
0.0634765625,
-0.0113372802734375,
0.0282135009765625,
-0.026092529296875,
-0.0005879402160644531,
-0.00922393798828125,
0.0198516845703125,
-0.029327392578125,
-0.01116180419921875,
0.050537109375,
0.01105499267578125,
0.0150604248046875,
-0.0284423828125,
-0.03179931640625,
0.0294647216796875,
0.014007568359375,
0.0123748779296875,
-0.03167724609375,
-0.01751708984375,
0.028472900390625,
0.0421142578125,
-0.00484466552734375,
0.019012451171875,
0.01357269287109375,
0.003986358642578125,
-0.01483917236328125,
0.0295257568359375,
-0.041839599609375,
-0.0205230712890625,
0.027984619140625,
0.01470184326171875,
-0.0191802978515625,
0.0276031494140625,
-0.015411376953125,
0.01080322265625,
0.048248291015625,
0.050872802734375,
-0.093017578125,
0.0197906494140625,
-0.003559112548828125,
-0.0027484893798828125,
0.00550079345703125,
-0.0035152435302734375,
0.01953125,
0.014068603515625,
0.005382537841796875,
0.00635528564453125,
-0.0308074951171875,
0.0039825439453125,
-0.010589599609375,
0.00815582275390625,
-0.0225677490234375,
0.00904083251953125,
0.0114898681640625,
-0.0145721435546875,
0.013885498046875,
0.01398468017578125,
0.01446533203125,
0.0057830810546875,
0.016754150390625,
-0.0013608932495117188,
-0.038055419921875,
-0.01556396484375,
0.0289764404296875,
-0.03277587890625,
-0.0135955810546875,
0.02392578125,
-0.0060882568359375,
0.039154052734375,
0.035888671875,
-0.0010089874267578125,
0.0179290771484375,
-0.0035419464111328125,
0.00957489013671875,
0.0128021240234375,
-0.0364990234375,
0.0106964111328125,
-0.007144927978515625,
-0.035064697265625,
0.0084686279296875,
-0.004177093505859375,
-0.04620361328125,
-0.0095977783203125,
0.0018177032470703125,
0.07318115234375,
-0.01093292236328125,
-0.019500732421875,
0.0169525146484375,
0.039642333984375,
-0.0033664703369140625,
-0.0134124755859375,
0.02191162109375,
-0.021148681640625,
-0.0020008087158203125,
-0.01776123046875,
-0.022491455078125,
-0.000046193599700927734,
-0.0241851806640625,
-0.0787353515625,
0.1405029296875,
0.010406494140625,
0.033721923828125,
-0.019317626953125,
0.06365966796875,
-0.0276336669921875,
0.036285400390625,
-0.015045166015625,
0.00907135009765625,
-0.04815673828125,
-0.01007080078125,
-0.0261383056640625,
0.01494598388671875,
-0.03369140625,
0.0063323974609375,
-0.00641632080078125,
-0.0015325546264648438,
0.012481689453125,
-0.0206756591796875,
0.00701904296875,
0.031707763671875,
0.0038089752197265625,
0.0018663406372070312,
-0.03271484375,
0.005352020263671875,
0.0062713623046875,
-0.0259246826171875,
0.00917816162109375,
0.004032135009765625,
-0.05560302734375,
-0.006679534912109375,
0.0034732818603515625,
0.00154876708984375,
0.010772705078125,
-0.0198974609375,
-0.06317138671875,
0.02569580078125,
0.02899169921875,
-0.001453399658203125,
-0.01373291015625,
0.05157470703125,
0.0162200927734375,
-0.0419921875,
-0.0027370452880859375,
-0.03790283203125,
0.042510986328125,
-0.0234527587890625,
0.020904541015625,
-0.0211944580078125,
0.010589599609375,
-0.02203369140625,
-0.034637451171875,
-0.0030422210693359375,
0.045074462890625,
-0.05731201171875,
0.00557708740234375,
0.0266571044921875,
0.041259765625,
-0.0204315185546875,
-0.060791015625,
0.032196044921875,
0.03472900390625,
0.00913238525390625,
-0.0225067138671875,
0.00962066650390625,
-0.0127410888671875,
0.013153076171875,
-0.021514892578125,
0.011749267578125,
-0.050323486328125,
-0.042236328125,
0.01763916015625,
0.0025539398193359375,
-0.020477294921875,
0.00946044921875,
-0.01096343994140625,
-0.0226898193359375,
0.0183258056640625,
0.041900634765625,
-0.032806396484375,
0.00501251220703125,
0.00366973876953125,
0.04827880859375,
0.032440185546875,
0.029144287109375,
-0.01236724853515625,
-0.0275421142578125,
-0.005847930908203125,
0.04901123046875,
0.007602691650390625,
-0.0021228790283203125,
0.005474090576171875,
-0.019775390625,
-0.00591278076171875,
0.01297760009765625,
-0.0005855560302734375,
-0.0100555419921875,
0.01532745361328125,
-0.00048732757568359375,
-0.041015625,
-0.019195556640625,
0.01360321044921875,
-0.0196533203125,
0.0079193115234375,
-0.01235198974609375,
0.0330810546875,
0.030914306640625,
-0.00926971435546875,
0.0011310577392578125,
0.0135650634765625,
0.051239013671875,
-0.0171051025390625,
0.06402587890625,
-0.0082244873046875,
-0.0251312255859375,
0.0272064208984375,
-0.00412750244140625,
0.1033935546875,
0.01526641845703125,
-0.058868408203125,
-0.01296234130859375,
-0.018798828125,
-0.045745849609375,
0.027740478515625,
0.050201416015625,
-0.01251983642578125,
0.0059051513671875,
0.0291595458984375,
0.0140838623046875,
-0.0179595947265625,
0.0277557373046875,
-0.017913818359375,
-0.053070068359375,
0.04534912109375,
-0.003566741943359375,
-0.06085205078125,
-0.031524658203125,
0.0035228729248046875,
0.0126800537109375,
0.0013103485107421875,
0.0467529296875,
-0.004894256591796875,
0.007778167724609375,
-0.00545501708984375,
-0.0369873046875,
0.033538818359375,
0.006244659423828125,
-0.00951385498046875,
0.0241851806640625,
0.005298614501953125,
-0.0267181396484375,
-0.081787109375,
-0.0024261474609375,
-0.0011386871337890625,
-0.004650115966796875,
-0.0028591156005859375,
-0.0279388427734375,
0.037017822265625,
0.0173797607421875,
0.0036563873291015625,
-0.048248291015625,
-0.04364013671875,
-0.03314208984375,
0.002933502197265625,
-0.0186767578125,
-0.041107177734375,
-0.0151519775390625,
-0.00860595703125,
0.0198211669921875,
-0.040313720703125,
0.01204681396484375,
0.002593994140625,
-0.01276397705078125,
0.005645751953125,
0.053924560546875,
-0.04827880859375,
0.017791748046875,
-0.01161956787109375,
0.0005855560302734375,
-0.0084686279296875,
0.0682373046875,
-0.0030155181884765625,
-0.038909912109375,
0.022430419921875,
0.03619384765625,
0.059783935546875,
-0.0006985664367675781,
0.0240478515625,
-0.0031185150146484375,
-0.002132415771484375,
0.003185272216796875,
-0.00450897216796875,
-0.0121002197265625,
-0.00850677490234375,
-0.019622802734375,
0.03363037109375,
-0.0235595703125,
-0.0031890869140625,
-0.09271240234375,
0.028656005859375,
0.040924072265625,
0.0021648406982421875,
-0.058013916015625,
0.042938232421875,
-0.04669189453125,
0.04241943359375,
-0.007053375244140625,
-0.01317596435546875,
-0.00445556640625,
0.0273590087890625,
-0.02337646484375,
-0.0401611328125,
-0.031402587890625,
0.0188751220703125,
-0.04248046875,
0.0241851806640625,
0.045440673828125,
-0.033782958984375,
0.033233642578125,
0.032806396484375,
0.038238525390625,
0.08612060546875,
-0.00385284423828125,
-0.0204010009765625,
-0.00801849365234375,
0.007045745849609375,
-0.01042938232421875,
-0.043304443359375,
0.0235748291015625,
-0.058013916015625,
-0.024139404296875,
-0.057342529296875,
0.006855010986328125,
0.0083465576171875,
-0.06732177734375,
-0.11334228515625,
0.07373046875,
-0.03271484375,
-0.033172607421875,
-0.07171630859375,
-0.0002218484878540039,
0.016845703125,
-0.014404296875,
-0.038055419921875,
-0.005336761474609375,
-0.055145263671875,
0.043975830078125,
0.010833740234375,
-0.0005288124084472656,
0.038909912109375,
0.001964569091796875,
-0.0537109375,
-0.0191802978515625,
-0.0271759033203125,
-0.0066070556640625,
0.01611328125,
0.000012040138244628906,
0.0283660888671875,
0.05181884765625,
-0.027618408203125,
-0.018463134765625,
-0.03204345703125,
-0.0149688720703125,
-0.0177764892578125,
-0.0125732421875,
0.0023212432861328125,
-0.0029850006103515625,
0.045562744140625,
0.0258941650390625,
0.002414703369140625,
-0.01806640625,
0.01287078857421875,
-0.0244598388671875,
0.0172119140625,
-0.0026302337646484375,
-0.012420654296875,
-0.0295257568359375,
-0.00968170166015625,
-0.0011014938354492188,
0.0013885498046875,
-0.01511383056640625,
-0.04620361328125,
-0.044097900390625,
-0.0203704833984375,
-0.06060791015625,
-0.009857177734375,
-0.019561767578125,
0.005771636962890625,
0.05035400390625,
-0.02008056640625,
0.0548095703125,
0.0025691986083984375,
0.0030803680419921875,
0.054473876953125,
0.033843994140625,
0.027557373046875,
0.0118408203125,
-0.05718994140625,
0.00608062744140625,
-0.0021495819091796875,
0.049102783203125,
-0.034912109375,
-0.05059814453125,
0.0007481575012207031,
0.0245361328125,
-0.0116729736328125,
0.041839599609375,
0.0029582977294921875,
0.0300750732421875,
-0.01314544677734375,
0.038299560546875,
-0.046844482421875,
-0.0275115966796875,
-0.041900634765625,
0.00778961181640625,
0.001094818115234375,
0.0222930908203125,
0.06201171875,
-0.0149688720703125,
0.007396697998046875,
0.00600433349609375,
-0.035736083984375,
-0.004352569580078125,
-0.00984954833984375,
-0.01934814453125,
-0.02203369140625,
0.0016717910766601562
]
|
e4b16dd722358404358d45f1c43f42a12f8628b2 | Wordpress Stackexchange
Q: Save/update widget outside admin panel Is there some way to update/save widget from page - not from admin ?
I create widget with charts and do not know how to update it from sidebar. I found of course form in admin:
<form action="" method="post">
<input type="submit" name="savewidget" id="widget-chart_widget-2-savewidget"
class="button button-primary widget-control-save right" value="Save">
But what is this ID = widget-chart_widget-2-savewidget ... how this ID is created?
| Q: Save/update widget outside admin panel Is there some way to update/save widget from page - not from admin ?
I create widget with charts and do not know how to update it from sidebar. I found of course form in admin:
<form action="" method="post">
<input type="submit" name="savewidget" id="widget-chart_widget-2-savewidget"
class="button button-primary widget-control-save right" value="Save">
But what is this ID = widget-chart_widget-2-savewidget ... how this ID is created?
| wordpress | {
"language": "en",
"length": 67,
"provenance": "stackexchange_00019.jsonl.gz:454968",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/185279"
} | [
0.02593994140625,
-0.04180908203125,
0.0256805419921875,
-0.0204315185546875,
-0.0091552734375,
-0.0199432373046875,
0.05169677734375,
-0.00551605224609375,
0.03363037109375,
0.00566864013671875,
-0.01189422607421875,
-0.054046630859375,
-0.0084991455078125,
-0.034820556640625,
-0.04266357421875,
-0.0428466796875,
0.046356201171875,
0.0152587890625,
0.05133056640625,
-0.00021851062774658203,
-0.015960693359375,
0.040863037109375,
0.005279541015625,
0.0701904296875,
0.00492095947265625,
0.0111236572265625,
0.00406646728515625,
0.002429962158203125,
-0.009521484375,
-0.0128631591796875,
0.026092529296875,
-0.0005974769592285156,
0.0292816162109375,
-0.012115478515625,
0.024444580078125,
0.01435089111328125,
-0.00954437255859375,
-0.007785797119140625,
0.012664794921875,
0.0036983489990234375,
0.032379150390625,
-0.0154876708984375,
0.032440185546875,
-0.006744384765625,
-0.019927978515625,
0.01445770263671875,
-0.00643157958984375,
-0.0316162109375,
-0.010498046875,
0.029876708984375,
0.00927734375,
-0.0200042724609375,
0.0181427001953125,
0.0158843994140625,
-0.0029239654541015625,
-0.003643035888671875,
0.038665771484375,
-0.055816650390625,
0.0513916015625,
-0.00897216796875,
-0.051544189453125,
-0.057647705078125,
0.044921875,
-0.039703369140625,
0.004669189453125,
-0.0286712646484375,
-0.0002727508544921875,
0.0079193115234375,
-0.00003784894943237305,
0.01910400390625,
0.035980224609375,
-0.00922393798828125,
0.006214141845703125,
-0.02154541015625,
0.0343017578125,
-0.01001739501953125,
0.01021575927734375,
0.005840301513671875,
-0.0079498291015625,
0.0284423828125,
0.0286712646484375,
0.0291748046875,
0.0087890625,
0.00724029541015625,
0.0064697265625,
0.0219268798828125,
-0.0222930908203125,
-0.0252685546875,
-0.00507354736328125,
-0.0016069412231445312,
-0.00424957275390625,
-0.055450439453125,
0.020965576171875,
0.01062774658203125,
-0.0056304931640625,
-0.0390625,
-0.01183319091796875,
0.01849365234375,
-0.025848388671875,
0.040985107421875,
-0.018829345703125,
-0.0271453857421875,
0.050750732421875,
-0.055755615234375,
0.0094146728515625,
0.037353515625,
-0.00638580322265625,
-0.0169219970703125,
0.019744873046875,
0.00927734375,
0.0010852813720703125,
-0.011016845703125,
0.01617431640625,
-0.0238494873046875,
-0.01641845703125,
-0.0005679130554199219,
-0.0136260986328125,
0.041046142578125,
0.03887939453125,
0.01971435546875,
-0.005741119384765625,
0.0077362060546875,
0.01023101806640625,
0.00897979736328125,
0.045440673828125,
0.042327880859375,
-0.022125244140625,
-0.0128021240234375,
-0.01238250732421875,
-0.02935791015625,
-0.0643310546875,
0.018524169921875,
0.10723876953125,
0.06640625,
0.050506591796875,
-0.003753662109375,
0.0223236083984375,
-0.01074981689453125,
0.01103973388671875,
0.025970458984375,
0.0021419525146484375,
-0.047576904296875,
-0.0089111328125,
0.000041544437408447266,
0.006977081298828125,
0.0011386871337890625,
-0.006500244140625,
0.00930023193359375,
0.0242462158203125,
0.00206756591796875,
0.0069732666015625,
-0.0294342041015625,
0.023956298828125,
0.0248565673828125,
0.0264892578125,
-0.01462554931640625,
0.0814208984375,
-0.04266357421875,
-0.0301361083984375,
-0.04949951171875,
-0.0179901123046875,
-0.0218963623046875,
0.034637451171875,
-0.018218994140625,
-0.040924072265625,
0.03009033203125,
-0.0193023681640625,
-0.008544921875,
0.031951904296875,
0.032928466796875,
0.00806427001953125,
-0.0271759033203125,
0.008819580078125,
0.045135498046875,
0.00727081298828125,
0.044891357421875,
-0.0159759521484375,
-0.0556640625,
0.0215606689453125,
0.0155181884765625,
-0.032196044921875,
-0.038818359375,
-0.019989013671875,
0.0133209228515625,
-0.0188140869140625,
-0.002010345458984375,
0.02227783203125,
0.0655517578125,
-0.0008211135864257812,
0.03228759765625,
-0.01422882080078125,
-0.004970550537109375,
-0.01386260986328125,
0.017791748046875,
-0.007732391357421875,
-0.01132965087890625,
-0.016143798828125,
0.013671875,
-0.025146484375,
-0.024566650390625,
-0.03692626953125,
0.004734039306640625,
-0.01385498046875,
0.039031982421875,
0.01074981689453125,
-0.017364501953125,
0.00008827447891235352,
0.0018024444580078125,
0.033355712890625,
0.042266845703125,
0.0037212371826171875,
0.0361328125,
-0.0240020751953125,
-0.029541015625,
-0.04608154296875,
-0.0215606689453125,
-0.0032558441162109375,
0.055450439453125,
0.023773193359375,
0.025726318359375,
0.0271759033203125,
-0.034423828125,
0.032928466796875,
0.0005669593811035156,
0.01439666748046875,
-0.01515960693359375,
-0.0231170654296875,
-0.025634765625,
0.01331329345703125,
-0.0208892822265625,
-0.00812530517578125,
0.06640625,
0.0150146484375,
-0.004825592041015625,
-0.03045654296875,
-0.007289886474609375,
-0.03118896484375,
-0.06427001953125,
-0.0025920867919921875,
0.05596923828125,
0.015411376953125,
0.00794219970703125,
0.0009055137634277344,
0.065185546875,
-0.01105499267578125,
-0.055023193359375,
0.00274658203125,
0.021636962890625,
-0.02569580078125,
0.00971221923828125,
0.0193328857421875,
0.01056671142578125,
0.01377105712890625,
-0.0584716796875,
-0.004852294921875,
0.0272064208984375,
-0.00830078125,
0.037322998046875,
-0.0374755859375,
-0.0141143798828125,
-0.00704193115234375,
-0.0496826171875,
-0.020599365234375,
-0.037109375,
0.0330810546875,
0.0017213821411132812,
0.049041748046875,
0.046722412109375,
0.0068817138671875,
-0.0261383056640625,
0.0027065277099609375,
-0.00891876220703125,
0.012603759765625,
0.03863525390625,
0.051483154296875,
0.02191162109375,
-0.02294921875,
-0.044403076171875,
0.042755126953125,
0.031097412109375,
-0.01251983642578125,
-0.0011472702026367188,
-0.005191802978515625,
-0.01513671875,
0.0199127197265625,
-0.0518798828125,
0.013275146484375,
-0.0182647705078125,
0.0191802978515625,
0.021636962890625,
0.0300140380859375,
-0.00045490264892578125,
-0.0025844573974609375,
0.010284423828125,
0.0059661865234375,
-0.02838134765625,
-0.000499725341796875,
0.00983428955078125,
-0.00775909423828125,
0.0155487060546875,
0.06329345703125,
0.0662841796875,
0.016571044921875,
0.00408935546875,
0.00901031494140625,
0.004955291748046875,
0.0213165283203125,
0.00823974609375,
0.0129241943359375,
-0.01251983642578125,
-0.015655517578125,
0.028533935546875,
0.01300048828125,
0.0565185546875,
-0.033050537109375,
-0.06256103515625,
-0.002834320068359375,
0.005702972412109375,
-0.051727294921875,
-0.0711669921875,
-0.024566650390625,
-0.0201416015625,
-0.0360107421875,
0.00189971923828125,
-0.01227569580078125,
0.035369873046875,
0.00653076171875,
0.004261016845703125,
-0.0303802490234375,
-0.029388427734375,
-0.03656005859375,
-0.048858642578125,
-0.026702880859375,
-0.00899505615234375,
-0.008453369140625,
0.01360321044921875,
0.01023101806640625,
-0.00732421875,
-0.0213775634765625,
-0.044677734375,
-0.005832672119140625,
-0.0100555419921875,
0.0024929046630859375,
-0.00978851318359375,
-0.019866943359375,
-0.0557861328125,
-0.002674102783203125,
-0.01203155517578125,
0.049652099609375,
-0.00928497314453125,
0.0113677978515625,
0.0123443603515625,
-0.01100921630859375,
-0.050018310546875,
0.008270263671875,
0.0024738311767578125,
0.0073089599609375,
-0.0186614990234375,
0.019927978515625,
-0.04541015625,
-0.029571533203125,
-0.00655364990234375,
-0.037139892578125,
0.00617218017578125,
0.0068359375,
-0.00579833984375,
-0.0024662017822265625,
0.027191162109375,
0.011322021484375,
0.01349639892578125,
-0.0089569091796875,
0.00017690658569335938,
0.004302978515625,
-0.0029201507568359375,
0.01021575927734375,
0.014617919921875,
-0.024932861328125,
-0.037628173828125,
0.05426025390625,
-0.00359344482421875,
0.01203155517578125,
-0.0005903244018554688,
0.0640869140625,
0.0140380859375,
-0.016571044921875,
0.019439697265625,
-0.0513916015625,
0.048065185546875,
-0.048431396484375,
0.0002925395965576172,
-0.023895263671875,
0.06475830078125,
-0.0300750732421875,
0.002223968505859375,
0.0032329559326171875,
0.02825927734375,
-0.051483154296875,
-0.0634765625,
-0.043426513671875,
-0.0017385482788085938,
-0.08172607421875,
0.00545501708984375,
-0.00461578369140625,
-0.03656005859375,
-0.0016164779663085938,
0.0137786865234375,
-0.018829345703125,
-0.041748046875,
0.048858642578125,
-0.053558349609375,
0.01837158203125,
0.012237548828125,
0.007007598876953125,
-0.028656005859375,
-0.0114288330078125,
-0.028839111328125,
-0.08526611328125,
-0.001689910888671875,
-0.047271728515625,
0.058868408203125,
0.024932861328125,
-0.01464080810546875,
0.0022373199462890625,
0.0401611328125,
0.00850677490234375,
-0.0012054443359375,
-0.005931854248046875,
0.0285491943359375,
-0.05206298828125,
-0.04949951171875,
-0.00616455078125,
-0.048248291015625,
0.00428009033203125,
0.0018930435180664062,
-0.03729248046875,
0.0029735565185546875,
-0.02679443359375,
-0.0305938720703125,
0.01922607421875,
-0.047393798828125,
-0.075439453125,
-0.05841064453125,
-0.0244903564453125,
0.03314208984375,
-0.051788330078125,
0.040679931640625,
-0.06695556640625,
-0.09808349609375,
0.0723876953125,
0.0033016204833984375,
-0.0004291534423828125,
0.01629638671875,
0.10693359375,
-0.000006496906280517578,
-0.034759521484375,
-0.08453369140625,
-0.0240020751953125,
0.044158935546875,
0.021942138671875,
-0.01169586181640625,
0.0277557373046875,
-0.036529541015625,
-0.003627777099609375,
0.050140380859375,
-0.03363037109375,
-0.0173492431640625,
0.08685302734375,
0.029632568359375,
0.003864288330078125,
-0.0183258056640625,
-0.01953125,
0.00980377197265625,
0.01233673095703125,
-0.0287628173828125,
0.0269012451171875,
-0.0187530517578125,
0.01227569580078125,
-0.01259613037109375,
0.00039577484130859375,
-0.0413818359375,
0.007732391357421875,
-0.00339508056640625,
-0.0146026611328125,
0.0247650146484375,
-0.0058135986328125,
0.0164337158203125,
-0.0352783203125,
-0.0073394775390625,
-0.028076171875,
0.01244354248046875,
-0.03265380859375,
0.004421234130859375,
-0.0186004638671875,
-0.011444091796875,
-0.035369873046875,
0.035430908203125,
-0.0007376670837402344,
0.044952392578125,
0.0183258056640625,
-0.025665283203125,
0.0016841888427734375,
-0.006893157958984375,
-0.0075531005859375,
-0.007549285888671875,
0.046478271484375,
-0.0174407958984375,
0.01268768310546875,
0.00469970703125,
-0.0116119384765625,
0.0601806640625,
0.0341796875,
-0.01146697998046875,
-0.02642822265625,
0.0079193115234375,
-0.0295257568359375,
-0.007747650146484375,
0.0156402587890625,
-0.00980377197265625,
-0.01061248779296875,
-0.00423431396484375,
0.06890869140625,
0.0655517578125,
0.001972198486328125,
0.00604248046875,
0.00342559814453125,
0.03607177734375,
-0.0645751953125,
-0.0163726806640625,
-0.0253143310546875,
0.04034423828125,
0.0201416015625,
0.0092315673828125,
0.0562744140625,
-0.0263519287109375,
0.012603759765625,
-0.02862548828125,
-0.0099945068359375,
0.00379180908203125,
0.0005307197570800781,
0.0007734298706054688,
0.004364013671875,
-0.007137298583984375,
-0.0034389495849609375,
-0.0015659332275390625,
0.02972412109375,
-0.03314208984375,
-0.01873779296875,
-0.021392822265625,
-0.01284027099609375,
0.003490447998046875,
-0.0303802490234375,
-0.0279998779296875,
-0.00420379638671875,
0.0047607421875,
-0.0253753662109375,
-0.0184173583984375,
-0.03857421875,
0.008941650390625,
-0.0108642578125,
0.01904296875,
-0.036407470703125,
0.0178375244140625,
-0.03924560546875,
0.029388427734375,
-0.036224365234375,
0.003265380859375,
0.035980224609375,
0.01395416259765625,
0.0008249282836914062,
-0.03985595703125,
-0.04913330078125,
-0.029083251953125,
-0.047393798828125,
-0.0260009765625,
-0.0133514404296875,
0.011810302734375,
0.0178375244140625,
0.0302734375,
-0.0015697479248046875,
-0.031524658203125,
0.0082244873046875,
-0.01404571533203125,
0.002437591552734375,
0.0184173583984375,
-0.022613525390625,
0.0802001953125,
-0.0290679931640625,
0.07666015625,
-0.0163116455078125,
-0.019287109375,
-0.08392333984375,
0.01181793212890625,
0.029205322265625,
0.0265960693359375,
-0.003986358642578125,
-0.03857421875,
0.0029010772705078125,
-0.0867919921875,
0.0103607177734375,
-0.02716064453125,
0.0301361083984375,
-0.025665283203125,
-0.0009236335754394531,
0.00823211669921875,
0.004058837890625,
-0.0288238525390625,
-0.005084991455078125,
0.04376220703125,
-0.044921875,
-0.044647216796875,
0.02947998046875,
0.019256591796875,
0.0018520355224609375,
-0.007129669189453125,
-0.022491455078125,
-0.0005211830139160156,
-0.0609130859375,
0.046875,
0.0230865478515625,
0.02337646484375,
0.0478515625,
-0.01398468017578125,
0.03228759765625,
0.0203094482421875,
-0.0180816650390625,
-0.013916015625,
0.042266845703125,
0.06591796875,
-0.01129913330078125,
-0.0250701904296875,
0.0237884521484375,
-0.033905029296875,
0.036346435546875,
0.04656982421875,
0.06640625,
-0.0797119140625,
0.026092529296875,
0.0061492919921875,
-0.0260162353515625,
0.0268707275390625,
-0.0191192626953125,
-0.0209503173828125,
-0.05560302734375,
0.08221435546875,
0.012664794921875,
-0.0176544189453125,
0.0162506103515625,
-0.002437591552734375,
0.01100921630859375,
-0.01555633544921875,
0.043548583984375,
0.002979278564453125,
-0.0213623046875,
-0.027191162109375,
0.0233612060546875,
-0.033843994140625,
-0.00106048583984375,
-0.0003414154052734375,
0.04638671875,
-0.03533935546875,
-0.0655517578125,
0.0435791015625,
-0.0115203857421875,
-0.00678253173828125,
0.0032291412353515625,
0.01483917236328125,
0.10797119140625,
0.04656982421875,
0.02056884765625,
-0.00777435302734375,
-0.00833892822265625,
0.0982666015625,
0.03790283203125,
-0.002094268798828125,
-0.004184722900390625,
-0.0251007080078125,
-0.0152435302734375,
-0.013580322265625,
-0.044097900390625,
-0.00949859619140625,
-0.010406494140625,
0.0226898193359375,
0.09722900390625,
-0.028778076171875,
-0.0307159423828125,
0.0288238525390625,
-0.0006585121154785156,
-0.01534271240234375,
-0.02764892578125,
-0.01526641845703125,
-0.04736328125,
-0.00988006591796875,
-0.031494140625,
-0.0440673828125,
-0.005306243896484375,
-0.04180908203125,
-0.04754638671875,
0.11614990234375,
0.0289154052734375,
0.0037441253662109375,
0.0167236328125,
0.05377197265625,
-0.054107666015625,
0.016357421875,
-0.039459228515625,
0.00821685791015625,
0.0244140625,
-0.005565643310546875,
-0.004673004150390625,
0.01012420654296875,
-0.0233917236328125,
-0.00969696044921875,
0.046478271484375,
0.0063934326171875,
-0.01538848876953125,
-0.005153656005859375,
0.04437255859375,
0.029632568359375,
0.0048980712890625,
0.0280914306640625,
0.042572021484375,
-0.031768798828125,
0.028961181640625,
0.0241241455078125,
0.0419921875,
-0.01922607421875,
0.023345947265625,
0.038970947265625,
0.01287841796875,
0.021697998046875,
-0.01479339599609375,
-0.0030765533447265625,
0.01351165771484375,
-0.0230255126953125,
-0.00836181640625,
-0.017547607421875,
-0.03961181640625,
0.049468994140625,
-0.01464080810546875,
0.0156402587890625,
-0.005706787109375,
-0.041473388671875,
0.0200958251953125,
0.01198577880859375,
-0.0183868408203125,
0.01433563232421875,
0.0141143798828125,
0.0192718505859375,
0.0214691162109375,
-0.0089263916015625,
0.05072021484375,
-0.0037174224853515625,
0.0301055908203125,
0.0159912109375,
0.031646728515625,
-0.02154541015625,
0.036041259765625,
0.0166168212890625,
0.029144287109375,
-0.03704833984375,
-0.0244293212890625,
0.00832366943359375,
0.011810302734375,
-0.00255584716796875,
0.0247955322265625,
0.050933837890625,
-0.0362548828125,
-0.00023114681243896484,
-0.04693603515625,
-0.0013866424560546875,
0.033172607421875,
0.042572021484375,
-0.00855255126953125,
0.00032258033752441406,
-0.0521240234375,
-0.05035400390625,
-0.011566162109375,
-0.0255279541015625,
0.0056915283203125,
0.043853759765625,
0.043670654296875,
-0.0253753662109375,
-0.01525115966796875,
-0.0281829833984375,
-0.020660400390625,
-0.0017728805541992188,
-0.004444122314453125,
0.0426025390625,
-0.0714111328125,
-0.03369140625,
0.046417236328125,
0.045654296875,
0.004024505615234375,
0.07366943359375,
0.05084228515625,
0.048614501953125,
0.00360870361328125,
0.004245758056640625,
0.06549072265625,
-0.00949859619140625,
0.04498291015625,
-0.040985107421875,
0.0340576171875,
0.00921630859375,
-0.01192474365234375,
-0.035064697265625,
-0.00036263465881347656,
0.06463623046875,
-0.058929443359375,
0.080810546875,
-0.0192108154296875,
0.018829345703125,
0.0780029296875,
-0.04583740234375,
0.07574462890625,
-0.035980224609375,
-0.032501220703125,
-0.003711700439453125,
0.0017576217651367188,
-0.00849151611328125,
-0.01337432861328125,
0.019744873046875,
-0.0679931640625,
0.0712890625,
-0.0180206298828125,
0.004039764404296875,
0.0261993408203125,
-0.0287628173828125,
0.0242919921875,
0.025848388671875,
0.0034503936767578125,
0.0167236328125,
-0.054168701171875,
-0.01299285888671875,
0.00921630859375,
0.011322021484375,
0.033966064453125,
0.0093994140625,
0.0307769775390625,
0.0024394989013671875,
-0.0005779266357421875,
0.0279388427734375,
-0.040130615234375,
-0.007083892822265625,
0.0039520263671875,
-0.027618408203125,
-0.006504058837890625,
-0.0027008056640625,
0.001739501953125,
0.048919677734375,
0.007266998291015625,
-0.0272674560546875,
0.0156707763671875,
-0.024749755859375,
0.0169830322265625,
0.0296478271484375,
-0.016693115234375,
-0.019012451171875,
-0.0158843994140625,
0.01381683349609375,
0.0190277099609375,
0.00554656982421875,
0.004604339599609375,
-0.0285797119140625,
0.01885986328125,
0.005077362060546875,
0.0316162109375,
0.0155181884765625,
0.00565338134765625,
0.02142333984375,
0.0190277099609375,
-0.06036376953125,
-0.01064300537109375,
-0.00469970703125,
-0.00908660888671875,
0.01097869873046875,
0.0006642341613769531,
0.045989990234375,
-0.014404296875,
0.04840087890625,
0.00571441650390625,
0.006072998046875,
0.00400543212890625,
-0.039276123046875,
0.0024013519287109375,
0.01116943359375,
-0.011199951171875,
0.01523590087890625,
0.0080413818359375,
-0.006725311279296875,
-0.057373046875,
0.0079345703125,
0.034027099609375,
-0.027008056640625,
0.035614013671875,
-0.055389404296875,
0.01406097412109375,
0.0577392578125,
0.00849151611328125,
-0.03955078125,
0.009521484375,
-0.038665771484375,
0.041900634765625,
0.0157470703125,
0.01311492919921875,
0.0157623291015625,
0.0257415771484375,
-0.0291290283203125,
0.02862548828125,
-0.0121917724609375,
-0.01776123046875,
0.025115966796875,
0.01323699951171875,
-0.00609588623046875,
-0.01314544677734375,
0.0233612060546875,
0.03179931640625,
0.02789306640625,
0.08074951171875,
0.033843994140625,
0.0006804466247558594,
0.0096588134765625,
0.0227508544921875,
-0.0014629364013671875,
-0.03662109375,
-0.0164794921875,
0.01494598388671875,
0.0152130126953125,
-0.031524658203125,
-0.0080108642578125,
-0.01119232177734375,
-0.040130615234375,
-0.033905029296875,
0.006317138671875,
0.0114898681640625,
-0.0189208984375,
-0.0010824203491210938,
0.007503509521484375,
-0.0188446044921875,
-0.0151824951171875,
-0.01190948486328125,
-0.038970947265625,
0.006107330322265625,
0.0278778076171875,
0.028472900390625,
-0.001895904541015625,
0.0198211669921875,
0.01166534423828125,
-0.10198974609375,
-0.0026607513427734375,
-0.044097900390625,
0.042236328125,
0.00618743896484375,
-0.033599853515625,
0.0178070068359375,
0.0152740478515625,
-0.052642822265625,
-0.058197021484375,
0.00833892822265625,
0.022308349609375,
-0.00350189208984375,
-0.041717529296875,
-0.022216796875,
-0.007587432861328125,
0.062408447265625,
0.048126220703125,
0.019256591796875,
-0.03973388671875,
0.00360870361328125,
-0.0094757080078125,
-0.0465087890625,
0.022552490234375,
0.02154541015625,
-0.051483154296875,
0.003826141357421875,
0.04248046875,
0.0182037353515625,
0.0242767333984375,
0.052886962890625,
0.028839111328125,
-0.0068817138671875,
0.09912109375,
-0.031341552734375,
-0.045379638671875,
0.027679443359375,
0.01198577880859375,
-0.0030460357666015625,
0.05682373046875,
-0.0313720703125,
-0.003993988037109375,
0.049346923828125,
0.033477783203125,
-0.0168304443359375,
0.030670166015625,
-0.032470703125,
-0.0030364990234375,
-0.002147674560546875,
-0.004322052001953125,
-0.0212249755859375,
0.0213165283203125,
-0.04205322265625,
0.0073699951171875,
0.0150604248046875,
0.004154205322265625,
-0.038330078125,
0.023712158203125,
0.0229644775390625,
0.044219970703125,
-0.0204010009765625,
-0.01715087890625,
-0.0234832763671875,
0.044189453125,
-0.01497650146484375,
-0.006702423095703125,
0.03204345703125,
-0.02960205078125,
0.005954742431640625,
-0.00026035308837890625,
0.007068634033203125,
-0.05010986328125,
0.0147857666015625,
-0.021331787109375,
0.0224761962890625,
0.01432037353515625
]
|
635525682c11fb84a3e38ec6ee5796e70cec3416 | Wordpress Stackexchange
Q: Get top parent category My category structure is as follows:
- Top Category
---- Sub Category 1
------- Sub Sub Category 1.1
------- Sub Sub Category 1.2
------- Sub Sub Category 1.3
---- Sub Category 2
------- Sub Sub Category 2.1
------- Sub Sub Category 2.2
------- Sub Sub Category 2.3
I'm on a post under 1.2 so it would be:
Top Category -> Sub Category 1 -> Sub Sub Category 1.2 -> Current Post
NB: In the post ONLY "Sub Category 1" and "Sub Sub Category 1.2" are selected as categories ("Top Category" is not checked).
Now, how do I get get the slug of the Top Category ("top-category"), navigating backward?
Thanks!
A: get_ancestors() returns an array containing the parents of any given object.
This example has two categories. The parent with the id of 447 and the child with a id of 448 and returns the a category hierarchy (with IDs):
get_ancestors( 448, 'category' );
returns:
Array
(
[0] => 447
)
get_ancestors Codex Page
| Q: Get top parent category My category structure is as follows:
- Top Category
---- Sub Category 1
------- Sub Sub Category 1.1
------- Sub Sub Category 1.2
------- Sub Sub Category 1.3
---- Sub Category 2
------- Sub Sub Category 2.1
------- Sub Sub Category 2.2
------- Sub Sub Category 2.3
I'm on a post under 1.2 so it would be:
Top Category -> Sub Category 1 -> Sub Sub Category 1.2 -> Current Post
NB: In the post ONLY "Sub Category 1" and "Sub Sub Category 1.2" are selected as categories ("Top Category" is not checked).
Now, how do I get get the slug of the Top Category ("top-category"), navigating backward?
Thanks!
A: get_ancestors() returns an array containing the parents of any given object.
This example has two categories. The parent with the id of 447 and the child with a id of 448 and returns the a category hierarchy (with IDs):
get_ancestors( 448, 'category' );
returns:
Array
(
[0] => 447
)
get_ancestors Codex Page
A: get_ancestors()
Is the correct way to get all the parent categories of a specific category in the hierarchical order, so to get the highest level parent you could extract the last item of the array returned like this:
// getting all the ancestors of the categories
$ancestor_cat_ids = get_ancestors( $queried_cat_id, 'category');
// getting the last item of the array of ids returned by the get_ancestors() function
$highest_ancestor = $ancestor_cat_ids[count($ancestor_cat_ids) - 1];
| wordpress | {
"language": "en",
"length": 240,
"provenance": "stackexchange_00019.jsonl.gz:454994",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/185359"
} | [
0.0230712890625,
-0.004730224609375,
-0.0141754150390625,
-0.03741455078125,
0.0035800933837890625,
-0.01187896728515625,
0.0050506591796875,
-0.0113372802734375,
0.01206207275390625,
0.0191192626953125,
-0.017333984375,
0.005390167236328125,
-0.002716064453125,
-0.040679931640625,
-0.005580902099609375,
-0.01432037353515625,
0.055419921875,
-0.046478271484375,
0.0257568359375,
-0.00052642822265625,
-0.004364013671875,
0.042449951171875,
0.043731689453125,
0.06170654296875,
0.0311279296875,
-0.0413818359375,
0.042816162109375,
-0.0301971435546875,
0.0239410400390625,
-0.036865234375,
0.013275146484375,
0.015045166015625,
-0.005878448486328125,
-0.0177154541015625,
0.08392333984375,
-0.0125579833984375,
0.0226898193359375,
-0.0102386474609375,
0.044769287109375,
0.0027065277099609375,
0.019134521484375,
-0.00421142578125,
-0.0142822265625,
0.0162811279296875,
-0.0308074951171875,
-0.028717041015625,
0.0021533966064453125,
-0.0303192138671875,
0.0276336669921875,
-0.0372314453125,
0.0189666748046875,
-0.004268646240234375,
0.03704833984375,
-0.044342041015625,
-0.0182342529296875,
0.01654052734375,
0.0130157470703125,
0.00731658935546875,
0.039154052734375,
-0.036590576171875,
-0.04229736328125,
-0.00792694091796875,
0.034515380859375,
-0.0198516845703125,
0.00899505615234375,
0.0021457672119140625,
-0.0026721954345703125,
0.0095062255859375,
-0.01299285888671875,
0.0199432373046875,
0.02569580078125,
-0.01904296875,
0.01114654541015625,
0.003681182861328125,
-0.02777099609375,
-0.046478271484375,
0.002079010009765625,
-0.0238494873046875,
0.010467529296875,
0.01666259765625,
-0.0239410400390625,
0.004215240478515625,
-0.04937744140625,
-0.005725860595703125,
0.0034770965576171875,
0.01131439208984375,
-0.028045654296875,
-0.021942138671875,
-0.043426513671875,
0.004978179931640625,
-0.0185546875,
-0.0296783447265625,
-0.0173492431640625,
0.041534423828125,
-0.0011911392211914062,
-0.014556884765625,
0.03594970703125,
0.036285400390625,
-0.032012939453125,
-0.012847900390625,
-0.02630615234375,
-0.0210418701171875,
-0.0194549560546875,
-0.01343536376953125,
0.0224456787109375,
-0.004917144775390625,
-0.0189666748046875,
-0.004886627197265625,
0.0704345703125,
0.0472412109375,
-0.005767822265625,
0.0782470703125,
0.006534576416015625,
-0.030426025390625,
0.00582122802734375,
0.040771484375,
-0.0106658935546875,
0.0300140380859375,
0.011444091796875,
0.0090484619140625,
0.01538848876953125,
0.038482666015625,
0.005550384521484375,
-0.00890350341796875,
0.00023365020751953125,
0.0177154541015625,
-0.0224609375,
-0.040252685546875,
0.034332275390625,
-0.0233154296875,
-0.0577392578125,
0.036529541015625,
0.07159423828125,
0.01806640625,
0.0150909423828125,
-0.0008573532104492188,
0.0081329345703125,
0.00004655122756958008,
0.00940704345703125,
-0.0016298294067382812,
0.00826263427734375,
0.00839996337890625,
0.052001953125,
-0.004947662353515625,
-0.015289306640625,
-0.01287078857421875,
-0.005222320556640625,
0.030181884765625,
0.0063018798828125,
-0.00092315673828125,
0.01226806640625,
-0.04437255859375,
0.048980712890625,
-0.0186309814453125,
-0.0538330078125,
-0.043670654296875,
-0.041961669921875,
-0.01102447509765625,
-0.0037174224853515625,
-0.03411865234375,
-0.009246826171875,
-0.0017728805541992188,
0.043792724609375,
-0.040008544921875,
-0.04718017578125,
0.005313873291015625,
-0.056549072265625,
-0.01898193359375,
0.02374267578125,
-0.01316070556640625,
0.04534912109375,
-0.01275634765625,
-0.0169219970703125,
-0.001880645751953125,
0.01270294189453125,
0.01331329345703125,
-0.02227783203125,
-0.0199127197265625,
0.02105712890625,
0.038330078125,
0.002696990966796875,
-0.0247344970703125,
-0.053466796875,
0.040374755859375,
-0.0133514404296875,
0.0281982421875,
0.00965118408203125,
0.0413818359375,
-0.01190948486328125,
0.0222320556640625,
-0.022186279296875,
0.033111572265625,
-0.06732177734375,
0.007541656494140625,
0.01129150390625,
0.0226593017578125,
0.027557373046875,
0.0214996337890625,
0.0267791748046875,
-0.05474853515625,
-0.0251617431640625,
0.02630615234375,
-0.0284271240234375,
0.01214599609375,
-0.016357421875,
-0.0019159317016601562,
0.0065155029296875,
0.0308380126953125,
0.041290283203125,
0.01461029052734375,
-0.0065155029296875,
0.000766754150390625,
0.001190185546875,
-0.04425048828125,
-0.035552978515625,
0.032379150390625,
0.00948333740234375,
-0.0174102783203125,
-0.010833740234375,
-0.005405426025390625,
-0.0357666015625,
0.025604248046875,
-0.053802490234375,
0.00917816162109375,
0.049835205078125,
0.019378662109375,
-0.01393890380859375,
-0.00334930419921875,
0.0117340087890625,
0.06597900390625,
-0.111328125,
-0.0239105224609375,
0.0823974609375,
0.0283203125,
-0.054901123046875,
0.006053924560546875,
0.0088958740234375,
0.0006103515625,
-0.023834228515625,
0.045379638671875,
0.00934600830078125,
0.007007598876953125,
-0.0604248046875,
-0.0196380615234375,
0.023895263671875,
-0.08441162109375,
-0.052001953125,
0.0301361083984375,
-0.01806640625,
0.00287628173828125,
-0.0074310302734375,
0.000049054622650146484,
0.035400390625,
0.034942626953125,
0.013275146484375,
0.024566650390625,
0.0162811279296875,
-0.03759765625,
-0.026214599609375,
0.039215087890625,
0.0216522216796875,
-0.048370361328125,
-0.06475830078125,
-0.007450103759765625,
0.00861358642578125,
0.00447845458984375,
0.01477813720703125,
0.005664825439453125,
-0.0254669189453125,
0.0005502700805664062,
0.0279541015625,
0.0234222412109375,
0.01055908203125,
0.0308837890625,
0.00023305416107177734,
-0.026641845703125,
-0.00893402099609375,
-0.0238189697265625,
0.01445770263671875,
0.0004286766052246094,
0.0170745849609375,
0.093994140625,
0.0565185546875,
-0.019866943359375,
-0.0474853515625,
-0.0555419921875,
0.01219940185546875,
0.0258636474609375,
-0.004913330078125,
0.0208740234375,
0.0421142578125,
0.0301971435546875,
0.01389312744140625,
-0.006031036376953125,
0.008941650390625,
0.0198822021484375,
-0.0182647705078125,
-0.0347900390625,
0.0357666015625,
-0.02496337890625,
0.040863037109375,
0.052093505859375,
-0.0019741058349609375,
0.005634307861328125,
-0.0107269287109375,
-0.02044677734375,
-0.0167694091796875,
0.002292633056640625,
-0.01413726806640625,
-0.0025234222412109375,
-0.036224365234375,
0.040374755859375,
0.0307159423828125,
0.0301971435546875,
-0.000255584716796875,
-0.03021240234375,
0.007061004638671875,
0.0206146240234375,
-0.05322265625,
-0.060089111328125,
-0.0119781494140625,
-0.06719970703125,
0.01044464111328125,
0.000030994415283203125,
-0.02947998046875,
-0.0160064697265625,
0.026275634765625,
0.0069427490234375,
0.0226593017578125,
-0.0198822021484375,
-0.041107177734375,
-0.02032470703125,
-0.07177734375,
-0.032989501953125,
-0.004825592041015625,
-0.016265869140625,
0.0103759765625,
0.030242919921875,
-0.0029315948486328125,
-0.060211181640625,
-0.00264739990234375,
0.08026123046875,
-0.00460052490234375,
0.0037631988525390625,
0.003955841064453125,
-0.00390625,
0.01519775390625,
0.01001739501953125,
-0.04229736328125,
0.0066070556640625,
-0.0012483596801757812,
-0.0187225341796875,
-0.025665283203125,
0.03070068359375,
0.038543701171875,
-0.00860595703125,
0.00032639503479003906,
0.0517578125,
0.0565185546875,
0.000476837158203125,
-0.00914764404296875,
-0.04107666015625,
-0.045196533203125,
0.0155487060546875,
0.022705078125,
0.0242919921875,
-0.03619384765625,
0.018707275390625,
-0.0157318115234375,
-0.02386474609375,
-0.0174407958984375,
-0.027740478515625,
0.0041961669921875,
-0.00557708740234375,
0.0007257461547851562,
0.022003173828125,
0.0283050537109375,
-0.016387939453125,
0.00542449951171875,
0.0028228759765625,
0.0008330345153808594,
-0.0107421875,
0.0197906494140625,
0.005779266357421875,
-0.04425048828125,
0.033416748046875,
-0.0128936767578125,
0.0022525787353515625,
-0.02117919921875,
-0.0080413818359375,
-0.0016336441040039062,
0.056488037109375,
0.010223388671875,
-0.00782012939453125,
-0.042083740234375,
-0.00222015380859375,
-0.0225830078125,
-0.034515380859375,
-0.03265380859375,
0.0047149658203125,
-0.0670166015625,
0.015838623046875,
0.0091552734375,
-0.032318115234375,
-0.018280029296875,
0.00960540771484375,
-0.056182861328125,
-0.01355743408203125,
0.03875732421875,
-0.0294647216796875,
-0.007080078125,
0.017242431640625,
0.0014743804931640625,
-0.003658294677734375,
-0.02581787109375,
-0.005779266357421875,
-0.033233642578125,
-0.0236358642578125,
0.0341796875,
0.004486083984375,
-0.024810791015625,
0.0077667236328125,
0.0084075927734375,
0.056610107421875,
0.00519561767578125,
0.037445068359375,
0.0010251998901367188,
0.022064208984375,
-0.0308380126953125,
-0.0242919921875,
0.0014371871948242188,
-0.03826904296875,
-0.028472900390625,
-0.0577392578125,
-0.004444122314453125,
-0.0141448974609375,
-0.02337646484375,
0.004825592041015625,
-0.031463623046875,
0.01062774658203125,
-0.0491943359375,
-0.061920166015625,
-0.041595458984375,
-0.00856781005859375,
-0.0165557861328125,
-0.000423431396484375,
-0.0689697265625,
-0.07904052734375,
0.00977325439453125,
0.024810791015625,
-0.0025615692138671875,
0.0051116943359375,
0.016693115234375,
0.0164337158203125,
-0.03436279296875,
-0.0230560302734375,
-0.01605224609375,
0.01222991943359375,
-0.0216064453125,
0.036285400390625,
0.0009055137634277344,
-0.014984130859375,
0.062225341796875,
-0.00714111328125,
0.01253509521484375,
-0.00452423095703125,
0.02374267578125,
-0.00267791748046875,
-0.036590576171875,
0.02191162109375,
-0.0174407958984375,
-0.0066986083984375,
0.020294189453125,
-0.040191650390625,
-0.01027679443359375,
-0.05975341796875,
0.054229736328125,
-0.004100799560546875,
0.034210205078125,
-0.06097412109375,
-0.031951904296875,
0.00597381591796875,
0.006855010986328125,
0.04522705078125,
0.035614013671875,
-0.00820159912109375,
0.050445556640625,
0.043792724609375,
-0.0006518363952636719,
-0.050750732421875,
-0.022003173828125,
-0.01520538330078125,
0.03155517578125,
-0.0633544921875,
0.0037631988525390625,
-0.0240478515625,
0.0059051513671875,
-0.0132293701171875,
-0.0257568359375,
-0.05474853515625,
-0.0033016204833984375,
-0.01355743408203125,
-0.0021266937255859375,
0.04486083984375,
-0.043212890625,
0.005374908447265625,
0.026611328125,
0.00860595703125,
0.0121612548828125,
-0.063232421875,
0.03515625,
-0.0029315948486328125,
0.0029735565185546875,
-0.0005841255187988281,
-0.0162811279296875,
-0.029052734375,
0.042938232421875,
0.0155029296875,
0.002056121826171875,
-0.00768280029296875,
-0.02880859375,
-0.040374755859375,
0.052825927734375,
0.0309600830078125,
-0.0189208984375,
0.006824493408203125,
0.0183258056640625,
0.035552978515625,
-0.054595947265625,
0.01259613037109375,
0.00937652587890625,
0.05169677734375,
0.033935546875,
-0.045013427734375,
0.0200347900390625,
-0.039215087890625,
-0.02313232421875,
-0.00646209716796875,
0.01500701904296875,
0.0143280029296875,
-0.004924774169921875,
-0.0033779144287109375,
-0.0051422119140625,
0.05419921875,
-0.032470703125,
0.0179901123046875,
-0.0577392578125,
0.009246826171875,
0.05029296875,
-0.0299835205078125,
0.02777099609375,
0.0189056396484375,
-0.087158203125,
-0.00699615478515625,
0.03515625,
-0.00543212890625,
-0.0110626220703125,
-0.017486572265625,
-0.0682373046875,
0.0330810546875,
0.01031494140625,
0.0223846435546875,
-0.0372314453125,
-0.0204010009765625,
-0.01018524169921875,
-0.0264739990234375,
0.08349609375,
0.03125,
-0.0435791015625,
-0.00013172626495361328,
-0.072021484375,
-0.0183563232421875,
0.00298309326171875,
-0.01727294921875,
-0.029815673828125,
0.00008505582809448242,
-0.02288818359375,
0.005245208740234375,
0.016510009765625,
0.032989501953125,
-0.03118896484375,
0.01824951171875,
0.0037631988525390625,
-0.006626129150390625,
-0.02667236328125,
0.09466552734375,
-0.044281005859375,
0.04205322265625,
-0.02105712890625,
0.0335693359375,
-0.019134521484375,
0.0166473388671875,
0.0089263916015625,
-0.01251220703125,
-0.01230621337890625,
0.004489898681640625,
-0.01381683349609375,
-0.0306243896484375,
0.036407470703125,
0.00006723403930664062,
0.011138916015625,
-0.00548553466796875,
0.015350341796875,
-0.0006999969482421875,
-0.00957489013671875,
0.006504058837890625,
-0.01739501953125,
0.050994873046875,
-0.0013360977172851562,
0.034393310546875,
-0.0219879150390625,
-0.0277252197265625,
0.0188140869140625,
-0.0125732421875,
0.044189453125,
0.0239410400390625,
0.0012807846069335938,
0.036163330078125,
0.045928955078125,
-0.00804901123046875,
0.0386962890625,
0.04290771484375,
0.035491943359375,
-0.0016613006591796875,
0.016815185546875,
0.034515380859375,
-0.010650634765625,
0.055328369140625,
-0.00391387939453125,
-0.01119232177734375,
0.02362060546875,
-0.045623779296875,
-0.024932861328125,
-0.044891357421875,
0.01036834716796875,
0.04296875,
-0.0016317367553710938,
0.0116729736328125,
-0.041351318359375,
-0.017791748046875,
0.044403076171875,
-0.0187530517578125,
-0.00856781005859375,
-0.0003218650817871094,
-0.043426513671875,
-0.003078460693359375,
0.013763427734375,
-0.01206207275390625,
-0.0107269287109375,
-0.005901336669921875,
0.024139404296875,
0.0143890380859375,
0.059173583984375,
-0.02978515625,
-0.03656005859375,
0.03546142578125,
-0.00940704345703125,
-0.00272369384765625,
-0.0016984939575195312,
0.0017881393432617188,
-0.026123046875,
0.03717041015625,
-0.038238525390625,
0.00731658935546875,
0.021209716796875,
-0.0087738037109375,
-0.000751495361328125,
0.0218963623046875,
-0.0164642333984375,
0.00646209716796875,
-0.00588226318359375,
-0.06268310546875,
0.04754638671875,
0.01049041748046875,
0.003993988037109375,
0.01522064208984375,
-0.04620361328125,
-0.005481719970703125,
-0.019073486328125,
0.0283966064453125,
-0.010345458984375,
-0.0369873046875,
0.05706787109375,
-0.0447998046875,
-0.006198883056640625,
0.019500732421875,
0.0236663818359375,
-0.0088043212890625,
0.01523590087890625,
0.05023193359375,
0.0152130126953125,
0.04486083984375,
0.02886962890625,
0.050445556640625,
-0.0034236907958984375,
0.0255126953125,
-0.04913330078125,
0.0106353759765625,
-0.02056884765625,
0.03692626953125,
0.0223541259765625,
-0.0167236328125,
0.002349853515625,
-0.039031982421875,
-0.053436279296875,
0.051513671875,
0.023529052734375,
0.0240478515625,
-0.0278472900390625,
-0.01238250732421875,
-0.00873565673828125,
0.0174560546875,
0.05108642578125,
0.0025081634521484375,
-0.026947021484375,
-0.0192108154296875,
0.02447509765625,
0.01306915283203125,
-0.005802154541015625,
0.051116943359375,
0.0016984939575195312,
-0.010498046875,
0.054168701171875,
-0.00981903076171875,
0.025482177734375,
0.0219268798828125,
-0.0003597736358642578,
0.0254364013671875,
0.011077880859375,
0.023651123046875,
0.001117706298828125,
0.0162506103515625,
-0.01461029052734375,
-0.006542205810546875,
0.021240234375,
-0.0692138671875,
0.00676727294921875,
0.044281005859375,
0.045928955078125,
-0.0239715576171875,
-0.00917816162109375,
-0.0217132568359375,
0.050384521484375,
0.017120361328125,
0.01453399658203125,
0.0005545616149902344,
0.025299072265625,
0.017913818359375,
-0.0010814666748046875,
0.0189361572265625,
0.0233001708984375,
-0.04632568359375,
0.06683349609375,
0.0280914306640625,
0.0203399658203125,
-0.03741455078125,
-0.0013580322265625,
0.06585693359375,
0.09149169921875,
-0.06195068359375,
-0.08380126953125,
0.01611328125,
-0.002971649169921875,
0.00696563720703125,
0.056488037109375,
0.02545166015625,
0.0242767333984375,
0.09478759765625,
-0.045623779296875,
-0.03790283203125,
0.035308837890625,
0.0279541015625,
0.011260986328125,
-0.032745361328125,
0.011260986328125,
-0.043304443359375,
-0.021575927734375,
-0.0223541259765625,
0.019012451171875,
0.019683837890625,
0.01534271240234375,
0.032684326171875,
-0.00849151611328125,
-0.0092010498046875,
0.0229339599609375,
-0.0217437744140625,
0.01007843017578125,
-0.03955078125,
0.04229736328125,
0.01776123046875,
-0.013885498046875,
-0.0048370361328125,
0.01549530029296875,
0.01103973388671875,
0.0540771484375,
0.041229248046875,
-0.055084228515625,
-0.0119476318359375,
0.08148193359375,
-0.0195465087890625,
0.009552001953125,
-0.04217529296875,
0.003948211669921875,
-0.002239227294921875,
-0.01392364501953125,
-0.01360321044921875,
-0.01277923583984375,
0.0467529296875,
0.0185089111328125,
0.0309600830078125,
0.0185089111328125,
0.0073699951171875,
0.0455322265625,
0.0413818359375,
0.04833984375,
0.0638427734375,
-0.045135498046875,
0.00286865234375,
-0.036163330078125,
-0.05401611328125,
0.03759765625,
0.046966552734375,
-0.00489044189453125,
-0.010406494140625,
0.00910186767578125,
-0.064208984375,
0.020751953125,
0.0455322265625,
0.02484130859375,
0.0171051025390625,
-0.0216064453125,
-0.0141448974609375,
0.01180267333984375,
0.026519775390625,
0.042083740234375,
-0.006237030029296875,
0.008087158203125,
0.0266265869140625,
0.01055145263671875,
-0.0172119140625,
-0.023162841796875,
0.05975341796875,
-0.090576171875,
-0.04864501953125,
0.06683349609375,
-0.0482177734375,
-0.02386474609375,
0.00762939453125,
-0.0219268798828125,
-0.015380859375,
0.08074951171875,
-0.04168701171875,
-0.0009765625,
0.01050567626953125,
0.0180816650390625,
-0.06292724609375,
0.01177978515625,
-0.0193328857421875,
-0.03277587890625,
-0.024566650390625,
-0.0173187255859375,
0.02484130859375,
0.07025146484375,
0.013580322265625,
0.0078277587890625,
-0.01348876953125,
-0.0240936279296875,
0.0238189697265625,
0.00047135353088378906,
0.044647216796875,
0.03826904296875,
-0.05712890625,
0.0244598388671875,
0.04730224609375,
-0.002178192138671875,
0.053955078125,
0.0067138671875,
0.01238250732421875,
0.046142578125,
-0.04632568359375,
-0.0006222724914550781,
0.036865234375,
0.039947509765625,
-0.0111541748046875,
0.01611328125,
0.01093292236328125,
-0.0181121826171875,
-0.01025390625,
-0.051116943359375,
-0.03363037109375,
-0.01184844970703125,
-0.0022525787353515625,
0.030181884765625,
0.0049591064453125,
-0.0071258544921875,
-0.038970947265625,
0.0022830963134765625,
0.040435791015625,
0.016937255859375,
-0.036163330078125,
0.0200653076171875,
-0.017059326171875,
0.0404052734375,
-0.0051727294921875,
0.0016546249389648438,
-0.00875091552734375,
-0.01288604736328125,
-0.0616455078125,
0.0291748046875,
-0.043731689453125,
-0.032684326171875,
-0.0263824462890625,
0.020904541015625,
0.01369476318359375,
-0.0248870849609375,
-0.036041259765625,
0.04058837890625,
0.0157318115234375,
0.08026123046875,
0.01042938232421875,
-0.011199951171875,
-0.0059051513671875,
0.0286865234375,
-0.04034423828125,
-0.0094146728515625,
0.045562744140625,
-0.0102386474609375,
-0.034637451171875,
-0.036468505859375,
0.011627197265625,
0.0287017822265625,
-0.0213470458984375,
0.0003769397735595703,
0.09002685546875,
-0.0165863037109375,
-0.0081329345703125,
-0.031005859375,
0.02423095703125,
-0.0008683204650878906,
0.00791168212890625,
0.002887725830078125,
-0.0229644775390625,
0.00026798248291015625,
0.0283355712890625,
0.022979736328125,
0.00910186767578125,
0.005889892578125,
0.0128631591796875,
-0.06097412109375,
0.01291656494140625,
0.003082275390625,
0.01898193359375,
-0.01605224609375,
0.03436279296875,
-0.00528717041015625,
0.034820556640625,
-0.032867431640625,
0.03564453125,
-0.0017423629760742188,
0.03619384765625,
0.027069091796875,
-0.04473876953125,
-0.031341552734375,
-0.04620361328125,
0.00405120849609375,
-0.007648468017578125,
0.0002384185791015625,
0.00887298583984375,
-0.0931396484375,
-0.038909912109375,
-0.0455322265625,
-0.00982666015625,
0.055206298828125,
-0.10760498046875,
0.0171051025390625,
0.0308990478515625,
-0.0087432861328125,
-0.01467132568359375,
-0.02691650390625,
-0.0308380126953125,
-0.0106048583984375,
-0.0206756591796875,
0.007190704345703125,
0.0227203369140625,
0.024688720703125,
-0.06304931640625,
0.0018768310546875,
-0.053253173828125,
-0.027557373046875,
0.00035119056701660156,
-0.08477783203125,
-0.007198333740234375,
-0.0005011558532714844,
0.00850677490234375,
-0.0102386474609375,
-0.00634002685546875,
0.01103973388671875,
0.011322021484375,
0.0142059326171875,
-0.0014286041259765625,
-0.0447998046875,
-0.0005235671997070312,
0.023193359375,
-0.01427459716796875,
-0.034393310546875,
0.046600341796875,
0.048309326171875,
0.06622314453125,
0.0157012939453125,
0.044158935546875,
-0.011322021484375,
0.08441162109375,
0.001972198486328125,
-0.043853759765625,
-0.004947662353515625,
-0.03704833984375,
-0.0015573501586914062,
-0.0021915435791015625,
-0.004299163818359375,
-0.03564453125,
0.023834228515625,
0.027923583984375,
0.0027675628662109375,
0.0306243896484375
]
|
ecac30acc40810bb18223c5d3f4fc13896ffd65a | Wordpress Stackexchange
Q: Add links to post categories and taxonomies in wysiwyg link modal? I want to link to post categories and taxonomies in the text editor. With the "add link" modal I only can add links to existing posts, pages and custom post types but not to their categories and taxonomies.
I found nothing about this in the codex. Is this possible?
A: Ok,
I found the plugin "Better Internal Link Search" and this does the job!
| Q: Add links to post categories and taxonomies in wysiwyg link modal? I want to link to post categories and taxonomies in the text editor. With the "add link" modal I only can add links to existing posts, pages and custom post types but not to their categories and taxonomies.
I found nothing about this in the codex. Is this possible?
A: Ok,
I found the plugin "Better Internal Link Search" and this does the job!
| wordpress | {
"language": "en",
"length": 76,
"provenance": "stackexchange_00019.jsonl.gz:455013",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/185429"
} | [
0.07159423828125,
0.002155303955078125,
-0.01123809814453125,
-0.03363037109375,
0.034210205078125,
-0.048797607421875,
0.060211181640625,
-0.0065765380859375,
-0.0272064208984375,
0.03875732421875,
0.022430419921875,
-0.0174560546875,
0.02740478515625,
-0.04705810546875,
0.0030384063720703125,
-0.00714111328125,
0.0091094970703125,
0.006191253662109375,
0.01439666748046875,
-0.0273895263671875,
0.0278472900390625,
-0.033447265625,
0.01629638671875,
-0.01129913330078125,
-0.0028228759765625,
0.0694580078125,
0.049713134765625,
-0.025421142578125,
0.01184844970703125,
-0.0006504058837890625,
0.006702423095703125,
-0.04071044921875,
0.0296173095703125,
-0.020843505859375,
-0.01264190673828125,
-0.01190185546875,
0.0138397216796875,
-0.01308441162109375,
-0.003864288330078125,
0.0151519775390625,
0.01085662841796875,
-0.00015807151794433594,
-0.0012216567993164062,
0.01375579833984375,
-0.00270843505859375,
-0.055328369140625,
0.0216522216796875,
-0.0546875,
0.012481689453125,
-0.042083740234375,
-0.01428985595703125,
0.023651123046875,
0.0210723876953125,
-0.08685302734375,
-0.0030193328857421875,
-0.0013294219970703125,
-0.0237884521484375,
-0.02239990234375,
0.035858154296875,
0.003963470458984375,
-0.0036296844482421875,
-0.034515380859375,
0.01161956787109375,
-0.011993408203125,
0.005992889404296875,
0.01439666748046875,
-0.0277862548828125,
0.0146636962890625,
-0.01263427734375,
0.00188446044921875,
-0.002422332763671875,
-0.045318603515625,
-0.0130767822265625,
-0.0016431808471679688,
0.00484466552734375,
-0.022369384765625,
0.006969451904296875,
-0.0330810546875,
0.01438140869140625,
0.03570556640625,
0.027618408203125,
0.031707763671875,
0.048065185546875,
-0.01953125,
-0.0034694671630859375,
-0.00982666015625,
-0.017364501953125,
-0.02978515625,
-0.04425048828125,
-0.0159454345703125,
-0.0284881591796875,
-0.04571533203125,
-0.037322998046875,
0.00928497314453125,
0.01052093505859375,
-0.0158538818359375,
0.01319122314453125,
0.0256805419921875,
0.01287841796875,
0.032196044921875,
-0.004779815673828125,
-0.042327880859375,
0.04052734375,
-0.049591064453125,
0.033782958984375,
0.068115234375,
-0.0005669593811035156,
0.017822265625,
0.045562744140625,
0.005008697509765625,
0.00981903076171875,
0.0247344970703125,
0.021942138671875,
-0.0017118453979492188,
0.01305389404296875,
0.0077056884765625,
-0.0015497207641601562,
0.057952880859375,
-0.0030422210693359375,
0.056182861328125,
0.01067352294921875,
0.045379638671875,
-0.033782958984375,
0.01113128662109375,
-0.005153656005859375,
-0.006679534912109375,
0.0067291259765625,
-0.016998291015625,
0.036041259765625,
-0.005718231201171875,
-0.0244293212890625,
0.022186279296875,
0.0227813720703125,
0.007396697998046875,
-0.0015163421630859375,
-0.00791168212890625,
-0.0217132568359375,
-0.041900634765625,
-0.0266265869140625,
-0.007289886474609375,
0.0022029876708984375,
-0.0088653564453125,
0.018341064453125,
-0.0214691162109375,
0.01493072509765625,
0.00922393798828125,
0.006763458251953125,
0.01806640625,
0.029052734375,
-0.01270294189453125,
-0.003467559814453125,
-0.0277862548828125,
0.044464111328125,
0.004062652587890625,
-0.0474853515625,
-0.03729248046875,
0.038116455078125,
-0.049285888671875,
-0.00202178955078125,
-0.07281494140625,
0.039154052734375,
0.0247344970703125,
0.051239013671875,
-0.02728271484375,
-0.01255035400390625,
-0.05169677734375,
-0.103515625,
0.0005373954772949219,
0.0271148681640625,
0.033599853515625,
0.00792694091796875,
-0.0297088623046875,
0.02508544921875,
-0.00203704833984375,
-0.01416778564453125,
0.005680084228515625,
0.0222015380859375,
0.00551605224609375,
0.029327392578125,
0.046905517578125,
0.0024871826171875,
-0.02099609375,
0.08514404296875,
-0.03253173828125,
-0.06097412109375,
-0.020843505859375,
0.0193939208984375,
0.06982421875,
0.046051025390625,
0.03131103515625,
0.036956787109375,
-0.042755126953125,
-0.01447296142578125,
-0.019500732421875,
0.0078125,
-0.0255584716796875,
-0.0206756591796875,
-0.0211334228515625,
0.0009760856628417969,
0.0340576171875,
-0.0430908203125,
0.0003180503845214844,
-0.0061492919921875,
0.02301025390625,
-0.014923095703125,
0.01434326171875,
-0.01064300537109375,
0.03472900390625,
-0.012115478515625,
-0.0082244873046875,
0.0179290771484375,
-0.0224609375,
-0.000492095947265625,
-0.057098388671875,
-0.025726318359375,
0.02032470703125,
-0.016357421875,
-0.033721923828125,
0.0066375732421875,
-0.02880859375,
0.00157928466796875,
0.01396942138671875,
-0.01434326171875,
0.0200347900390625,
0.00969696044921875,
0.009124755859375,
-0.0192413330078125,
0.01337432861328125,
-0.0256500244140625,
0.059906005859375,
-0.0880126953125,
-0.007415771484375,
0.03155517578125,
0.01160430908203125,
-0.023468017578125,
-0.007297515869140625,
0.01319122314453125,
-0.0941162109375,
0.0179290771484375,
0.07061767578125,
0.026947021484375,
0.025421142578125,
-0.0019435882568359375,
0.01611328125,
0.0496826171875,
0.01812744140625,
0.0254974365234375,
-0.01313018798828125,
-0.01435089111328125,
0.0361328125,
0.032867431640625,
0.0391845703125,
-0.00095367431640625,
0.037384033203125,
0.0195770263671875,
0.0265350341796875,
0.0360107421875,
0.003192901611328125,
-0.01093292236328125,
0.0124359130859375,
0.0038585662841796875,
-0.0270538330078125,
-0.053802490234375,
0.007358551025390625,
0.0222930908203125,
0.00183868408203125,
0.032958984375,
0.0308685302734375,
-0.01274871826171875,
-0.0100555419921875,
0.0091400146484375,
0.005672454833984375,
-0.0008831024169921875,
0.01641845703125,
0.05242919921875,
-0.0223541259765625,
-0.04827880859375,
-0.01490020751953125,
0.050872802734375,
0.0123443603515625,
-0.01103973388671875,
0.0048065185546875,
0.0264434814453125,
-0.005615234375,
0.01268768310546875,
-0.044586181640625,
0.0179290771484375,
-0.0032501220703125,
-0.025054931640625,
-0.05609130859375,
0.0179901123046875,
-0.046844482421875,
-0.048980712890625,
0.00879669189453125,
-0.004730224609375,
-0.061859130859375,
0.035125732421875,
-0.005641937255859375,
0.0251922607421875,
-0.002040863037109375,
0.02606201171875,
0.0440673828125,
-0.02874755859375,
0.049957275390625,
0.0060272216796875,
-0.007053375244140625,
-0.00445556640625,
0.0121002197265625,
-0.003948211669921875,
-0.025970458984375,
-0.0247344970703125,
0.0218658447265625,
-0.0059967041015625,
0.0003371238708496094,
-0.0257110595703125,
-0.058349609375,
-0.00774383544921875,
-0.026123046875,
-0.09112548828125,
-0.052734375,
0.0179290771484375,
-0.05963134765625,
0.00994873046875,
0.03564453125,
-0.04345703125,
-0.032501220703125,
0.0733642578125,
0.012115478515625,
0.0250701904296875,
-0.01515960693359375,
-0.059661865234375,
-0.046783447265625,
-0.06561279296875,
-0.04632568359375,
-0.0165557861328125,
-0.01540374755859375,
0.012481689453125,
0.0316162109375,
0.0156707763671875,
-0.0201873779296875,
0.041900634765625,
0.01329803466796875,
-0.019622802734375,
0.01043701171875,
0.034332275390625,
-0.00629425048828125,
0.0224151611328125,
0.0186309814453125,
0.04278564453125,
0.038330078125,
-0.04852294921875,
-0.02471923828125,
0.0038928985595703125,
0.03985595703125,
0.03546142578125,
-0.0682373046875,
-0.0205841064453125,
0.07257080078125,
0.0184173583984375,
0.0086669921875,
0.041259765625,
-0.023651123046875,
0.0031833648681640625,
-0.03802490234375,
-0.0233612060546875,
0.003078460693359375,
-0.031951904296875,
0.0096282958984375,
0.00457763671875,
0.03277587890625,
0.0284576416015625,
-0.0012493133544921875,
-0.0171966552734375,
-0.0249481201171875,
-0.0222930908203125,
-0.0156707763671875,
-0.0094757080078125,
-0.044586181640625,
0.053924560546875,
-0.014190673828125,
-0.0081787109375,
-0.00850677490234375,
0.032867431640625,
-0.00804901123046875,
-0.01242828369140625,
-0.00011992454528808594,
-0.058258056640625,
0.0189361572265625,
-0.034332275390625,
0.0035495758056640625,
-0.02239990234375,
0.0301971435546875,
-0.0251312255859375,
-0.0272216796875,
-0.0097808837890625,
0.0190277099609375,
-0.034820556640625,
-0.035980224609375,
0.0012712478637695312,
-0.0193023681640625,
-0.02294921875,
0.015411376953125,
0.0161895751953125,
0.006023406982421875,
-0.05426025390625,
0.0970458984375,
-0.0355224609375,
-0.00457000732421875,
0.0595703125,
-0.00637054443359375,
0.01418304443359375,
0.02020263671875,
0.002536773681640625,
0.00804901123046875,
-0.06494140625,
0.018951416015625,
-0.06976318359375,
-0.0195465087890625,
0.03253173828125,
0.0302734375,
-0.0171051025390625,
-0.0242462158203125,
0.002780914306640625,
0.055206298828125,
0.052825927734375,
-0.0039215087890625,
0.0303497314453125,
-0.0038738250732421875,
-0.01105499267578125,
-0.01548004150390625,
0.035400390625,
-0.040771484375,
-0.0291290283203125,
-0.0241546630859375,
-0.0364990234375,
0.051055908203125,
0.0006985664367675781,
0.033599853515625,
0.0010004043579101562,
-0.003849029541015625,
-0.032379150390625,
-0.0257568359375,
-0.0345458984375,
0.029693603515625,
-0.03515625,
-0.00139617919921875,
-0.03814697265625,
-0.062347412109375,
0.01357269287109375,
-0.004550933837890625,
-0.0010919570922851562,
0.0028018951416015625,
0.05950927734375,
0.01593017578125,
-0.01276397705078125,
-0.05010986328125,
0.0290679931640625,
0.037322998046875,
0.0182037353515625,
0.03900146484375,
0.0016965866088867188,
-0.021087646484375,
0.053741455078125,
0.0008068084716796875,
0.019622802734375,
-0.06158447265625,
0.063232421875,
-0.01180267333984375,
-0.0006890296936035156,
0.025665283203125,
-0.0240631103515625,
0.0494384765625,
0.02557373046875,
-0.01218414306640625,
-0.008575439453125,
-0.0157623291015625,
0.029815673828125,
-0.00629425048828125,
0.01139068603515625,
-0.0418701171875,
0.04339599609375,
-0.01476287841796875,
0.0026073455810546875,
0.03302001953125,
0.05230712890625,
-0.021942138671875,
-0.042694091796875,
-0.0149383544921875,
-0.0250091552734375,
0.0197296142578125,
-0.01146697998046875,
0.02099609375,
0.01514434814453125,
-0.006145477294921875,
-0.01273345947265625,
-0.0072479248046875,
-0.0004642009735107422,
0.0090484619140625,
-0.006824493408203125,
-0.037872314453125,
-0.053070068359375,
0.00543975830078125,
0.018646240234375,
0.0119171142578125,
0.02734375,
0.0455322265625,
-0.002635955810546875,
-0.01345062255859375,
0.0034885406494140625,
0.005435943603515625,
-0.029083251953125,
-0.035675048828125,
0.0037937164306640625,
0.00440216064453125,
-0.01178741455078125,
0.01450347900390625,
0.023895263671875,
-0.0130767822265625,
0.0196075439453125,
-0.00920867919921875,
0.0137786865234375,
0.0253448486328125,
-0.0018377304077148438,
0.0163726806640625,
0.003467559814453125,
-0.004253387451171875,
-0.0180816650390625,
0.01727294921875,
-0.0234527587890625,
0.011749267578125,
0.01116180419921875,
0.0294036865234375,
0.0008692741394042969,
-0.0266265869140625,
0.0213470458984375,
-0.0240020751953125,
-0.01134490966796875,
0.0206298828125,
0.0185394287109375,
-0.01654052734375,
-0.0271759033203125,
0.0048065185546875,
0.0182647705078125,
0.01517486572265625,
-0.00565338134765625,
0.00189208984375,
-0.017242431640625,
0.0292510986328125,
-0.0225677490234375,
0.01085662841796875,
-0.00423431396484375,
-0.0124969482421875,
-0.041778564453125,
-0.0140533447265625,
0.037139892578125,
-0.032623291015625,
-0.004726409912109375,
-0.027252197265625,
-0.03375244140625,
0.04766845703125,
0.0037059783935546875,
0.070556640625,
-0.0225982666015625,
-0.056610107421875,
0.030853271484375,
0.01377105712890625,
0.0176544189453125,
-0.0111846923828125,
-0.0372314453125,
-0.0002770423889160156,
-0.0174713134765625,
0.0038356781005859375,
-0.002246856689453125,
-0.060211181640625,
-0.0249176025390625,
-0.0290374755859375,
0.0267486572265625,
0.03350830078125,
0.0175018310546875,
-0.0145416259765625,
-0.0254364013671875,
-0.0219268798828125,
0.02435302734375,
-0.0019464492797851562,
-0.0009427070617675781,
0.04296875,
-0.0186920166015625,
0.07818603515625,
0.007556915283203125,
-0.00531768798828125,
-0.0241546630859375,
-0.0208892822265625,
0.005504608154296875,
-0.076416015625,
-0.0438232421875,
0.0158538818359375,
-0.064453125,
0.04925537109375,
0.007793426513671875,
-0.0026912689208984375,
0.0130615234375,
-0.006015777587890625,
0.0024204254150390625,
-0.006206512451171875,
-0.0205535888671875,
0.015533447265625,
-0.0046539306640625,
0.06109619140625,
-0.01001739501953125,
0.04473876953125,
0.0070648193359375,
0.031768798828125,
-0.006343841552734375,
-0.032196044921875,
0.0147552490234375,
-0.0010023117065429688,
-0.049560546875,
0.018768310546875,
0.042327880859375,
0.039886474609375,
0.044921875,
-0.0108184814453125,
0.032073974609375,
-0.00007474422454833984,
-0.0013933181762695312,
0.0242767333984375,
-0.0288848876953125,
0.05352783203125,
0.0020465850830078125,
-0.01525115966796875,
0.05145263671875,
-0.033203125,
-0.006641387939453125,
0.007472991943359375,
0.01800537109375,
-0.0484619140625,
0.0016489028930664062,
0.0091705322265625,
-0.0079803466796875,
0.00505828857421875,
0.0185699462890625,
0.00888824462890625,
0.01152801513671875,
-0.0269927978515625,
-0.00698089599609375,
-0.01617431640625,
-0.00690460205078125,
-0.0012712478637695312,
-0.0105133056640625,
0.0087738037109375,
-0.0167083740234375,
-0.014068603515625,
-0.00437164306640625,
-0.0362548828125,
-0.01436614990234375,
-0.0017518997192382812,
-0.00931549072265625,
0.00724029541015625,
-0.0207366943359375,
0.00736236572265625,
-0.01248931884765625,
0.03424072265625,
-0.05755615234375,
0.03509521484375,
0.0296173095703125,
-0.01666259765625,
0.04315185546875,
0.0283966064453125,
0.00010651350021362305,
0.003204345703125,
-0.015228271484375,
0.01329803466796875,
0.040374755859375,
-0.035888671875,
-0.022674560546875,
0.034942626953125,
-0.013031005859375,
-0.002124786376953125,
0.021881103515625,
-0.01200103759765625,
-0.01132965087890625,
-0.0036163330078125,
0.0980224609375,
-0.072021484375,
-0.01540374755859375,
0.00885772705078125,
-0.00241851806640625,
0.005084991455078125,
-0.01059722900390625,
0.0107269287109375,
-0.029052734375,
-0.0114593505859375,
-0.0161285400390625,
-0.0391845703125,
0.0123443603515625,
-0.0282745361328125,
-0.06109619140625,
0.0784912109375,
-0.00888824462890625,
0.0247650146484375,
-0.035400390625,
0.04132080078125,
0.02020263671875,
0.054534912109375,
-0.016845703125,
0.051116943359375,
0.018524169921875,
-0.00659942626953125,
-0.0241241455078125,
0.00008630752563476562,
-0.004062652587890625,
0.0029010772705078125,
0.058746337890625,
0.00804901123046875,
-0.0035400390625,
-0.0271453857421875,
0.01338958740234375,
0.0321044921875,
-0.0284576416015625,
0.00310516357421875,
0.018829345703125,
-0.01629638671875,
0.04241943359375,
0.00015532970428466797,
0.040008544921875,
-0.0307464599609375,
0.00812530517578125,
0.0176544189453125,
0.0079803466796875,
0.00928497314453125,
0.0077972412109375,
-0.00998687744140625,
-0.016082763671875,
0.0177459716796875,
0.0042724609375,
-0.00025653839111328125,
-0.006488800048828125,
0.0601806640625,
0.0226898193359375,
0.0149688720703125,
0.002079010009765625,
-0.023590087890625,
0.039825439453125,
0.003131866455078125,
0.0237274169921875,
-0.038330078125,
0.0032901763916015625,
0.0540771484375,
-0.053680419921875,
-0.0021514892578125,
0.032562255859375,
-0.033599853515625,
0.01190948486328125,
0.0230560302734375,
0.02471923828125,
-0.037750244140625,
-0.0435791015625,
0.0662841796875,
0.05084228515625,
-0.01116943359375,
-0.052337646484375,
0.01111602783203125,
0.0029582977294921875,
0.005100250244140625,
0.032958984375,
0.0260162353515625,
0.029754638671875,
0.06329345703125,
-0.055755615234375,
-0.0035343170166015625,
0.012969970703125,
0.02777099609375,
-0.0176544189453125,
-0.0240936279296875,
-0.02313232421875,
-0.012603759765625,
-0.04290771484375,
0.02484130859375,
0.0205230712890625,
0.052581787109375,
-0.00824737548828125,
0.1015625,
-0.014678955078125,
-0.00923919677734375,
0.0026035308837890625,
0.007724761962890625,
0.004421234130859375,
0.0018949508666992188,
-0.01294708251953125,
-0.0256500244140625,
0.01477813720703125,
0.0264739990234375,
0.03631591796875,
0.00954437255859375,
0.045654296875,
0.0648193359375,
0.01824951171875,
-0.005710601806640625,
0.054351806640625,
0.00084686279296875,
0.029693603515625,
-0.0509033203125,
0.0811767578125,
0.062225341796875,
0.022247314453125,
-0.0006127357482910156,
-0.0118408203125,
0.1119384765625,
-0.001476287841796875,
0.00936126708984375,
0.006103515625,
-0.01983642578125,
0.0897216796875,
-0.01503753662109375,
0.08563232421875,
0.0230560302734375,
-0.060394287109375,
-0.0262603759765625,
-0.007419586181640625,
-0.0526123046875,
0.038360595703125,
0.05108642578125,
-0.034454345703125,
0.0032939910888671875,
-0.00962066650390625,
-0.029693603515625,
0.022796630859375,
0.0092010498046875,
-0.01287841796875,
0.0170745849609375,
0.0108642578125,
-0.0129241943359375,
-0.01556396484375,
-0.01399993896484375,
0.01465606689453125,
0.0234527587890625,
-0.0098724365234375,
0.07666015625,
-0.0258636474609375,
0.013092041015625,
-0.0296478271484375,
0.045501708984375,
-0.061614990234375,
-0.016021728515625,
0.01549530029296875,
0.0175323486328125,
0.0181884765625,
-0.01171875,
-0.0208282470703125,
0.005641937255859375,
0.03668212890625,
-0.0166778564453125,
0.00949859619140625,
-0.0241241455078125,
0.01004791259765625,
-0.0299224853515625,
0.07318115234375,
-0.01194000244140625,
-0.00746917724609375,
-0.05059814453125,
-0.0484619140625,
0.04339599609375,
0.05914306640625,
0.0513916015625,
0.0079345703125,
0.0075531005859375,
0.0024471282958984375,
0.01374053955078125,
0.0082550048828125,
0.0034427642822265625,
0.0232086181640625,
-0.01439666748046875,
0.0111541748046875,
0.041107177734375,
-0.01039886474609375,
0.02972412109375,
0.00980377197265625,
-0.004009246826171875,
0.03497314453125,
-0.0716552734375,
0.036346435546875,
0.072021484375,
0.0828857421875,
-0.009124755859375,
0.023712158203125,
0.032623291015625,
-0.00958251953125,
0.0146942138671875,
0.0184326171875,
-0.033111572265625,
-0.018035888671875,
-0.0190887451171875,
0.00750732421875,
-0.0160980224609375,
-0.04931640625,
-0.08837890625,
-0.00720977783203125,
0.049774169921875,
0.0018491744995117188,
-0.0264434814453125,
0.005031585693359375,
-0.01776123046875,
0.04547119140625,
0.0158843994140625,
-0.0114593505859375,
-0.0048828125,
0.031890869140625,
-0.04754638671875,
-0.016632080078125,
-0.03515625,
0.002971649169921875,
-0.05059814453125,
0.0287322998046875,
0.00876617431640625,
-0.034027099609375,
0.01403045654296875,
0.0277252197265625,
0.0298614501953125,
0.06964111328125,
0.07012939453125,
-0.023223876953125,
0.0215606689453125,
-0.00992584228515625,
-0.01482391357421875,
-0.032196044921875,
0.00354766845703125,
-0.0211181640625,
-0.00678253173828125,
-0.005741119384765625,
-0.00494384765625,
0.01055908203125,
-0.037353515625,
-0.10772705078125,
0.061187744140625,
-0.0399169921875,
-0.036468505859375,
-0.07275390625,
-0.01430511474609375,
-0.00791168212890625,
0.04693603515625,
-0.0207977294921875,
-0.0102996826171875,
-0.0489501953125,
0.04449462890625,
-0.0035457611083984375,
0.059295654296875,
0.009918212890625,
0.0167694091796875,
0.003467559814453125,
0.017913818359375,
0.00963592529296875,
-0.0146942138671875,
0.03369140625,
-0.01444244384765625,
0.01474761962890625,
0.0305633544921875,
-0.07525634765625,
-0.032745361328125,
-0.048828125,
0.01267242431640625,
0.029022216796875,
-0.044891357421875,
-0.031097412109375,
-0.057464599609375,
0.016845703125,
-0.038360595703125,
0.005645751953125,
0.032623291015625,
0.0182952880859375,
-0.016998291015625,
-0.02215576171875,
-0.00893402099609375,
-0.00824737548828125,
-0.0308074951171875,
-0.00655364990234375,
-0.0096435546875,
0.013092041015625,
0.04010009765625,
-0.001190185546875,
0.00794219970703125,
-0.01158905029296875,
0.0194854736328125,
-0.00341796875,
-0.06964111328125,
0.0772705078125,
0.04083251953125,
-0.038970947265625,
-0.007350921630859375,
-0.0008754730224609375,
-0.03155517578125,
0.0089111328125,
-0.0234832763671875,
-0.00830078125,
-0.056732177734375,
0.018585205078125,
0.047637939453125,
-0.01448822021484375,
0.0202789306640625,
-0.0176544189453125,
-0.0200653076171875,
-0.023345947265625,
0.036651611328125,
-0.00559234619140625,
0.034698486328125,
-0.004543304443359375,
0.050689697265625,
0.01309967041015625,
0.08819580078125,
-0.0193939208984375,
0.006946563720703125,
-0.005466461181640625,
0.0229644775390625,
-0.03448486328125,
0.00241851806640625,
-0.00679779052734375,
-0.0361328125,
-0.0171661376953125,
0.01433563232421875,
-0.06475830078125,
-0.04705810546875,
0.00013375282287597656,
-0.01531982421875,
-0.00009572505950927734,
0.00952911376953125
]
|
aeee49a52cb522b756b5f06f350dfdc845e28f83 | Wordpress Stackexchange
Q: Block updates by Server I've a server and I want to block all the Wordpress Sites Updates Notification (more than 150).
I know there is a option in wp-config.php but I want to block all the updates. I put in hosts api.wordpress.org but it keeps showing the update bar.
A: Blocking the server from your hosts to prevent auto updating won't hide notifications in the back office.
You have to add some code in your functions.php file.
The answer you are looking for is perfectly explained here
You should add these 3 portions of code at the bottom of you functions.php file :
The first one will disable wordpress core update notifications :
add_action('after_setup_theme','remove_core_updates');
function remove_core_updates()
{
if(! current_user_can('update_core')){return;}
add_action('init', function(){remove_action( 'init', 'wp_version_check' )}),2); //Thanks to Pieter Goosen, don't use create_function() as described in the link above
add_filter('pre_option_update_core','__return_null');
add_filter('pre_site_transient_update_core','__return_null');
}
The second one will prevent plugins update notifications :
remove_action('load-update-core.php','wp_update_plugins');
add_filter('pre_site_transient_update_plugins','__return_null');
Finally, you still need to tell wordpress to use the "remove_core_updates" functions on several actions by adding this last piece of code :
function remove_core_updates(){
global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);
}
add_filter('pre_site_transient_update_core','remove_core_updates');
add_filter('pre_site_transient_update_plugins','remove_core_updates');
add_filter('pre_site_transient_update_themes','remove_core_updates');
| Q: Block updates by Server I've a server and I want to block all the Wordpress Sites Updates Notification (more than 150).
I know there is a option in wp-config.php but I want to block all the updates. I put in hosts api.wordpress.org but it keeps showing the update bar.
A: Blocking the server from your hosts to prevent auto updating won't hide notifications in the back office.
You have to add some code in your functions.php file.
The answer you are looking for is perfectly explained here
You should add these 3 portions of code at the bottom of you functions.php file :
The first one will disable wordpress core update notifications :
add_action('after_setup_theme','remove_core_updates');
function remove_core_updates()
{
if(! current_user_can('update_core')){return;}
add_action('init', function(){remove_action( 'init', 'wp_version_check' )}),2); //Thanks to Pieter Goosen, don't use create_function() as described in the link above
add_filter('pre_option_update_core','__return_null');
add_filter('pre_site_transient_update_core','__return_null');
}
The second one will prevent plugins update notifications :
remove_action('load-update-core.php','wp_update_plugins');
add_filter('pre_site_transient_update_plugins','__return_null');
Finally, you still need to tell wordpress to use the "remove_core_updates" functions on several actions by adding this last piece of code :
function remove_core_updates(){
global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);
}
add_filter('pre_site_transient_update_core','remove_core_updates');
add_filter('pre_site_transient_update_plugins','remove_core_updates');
add_filter('pre_site_transient_update_themes','remove_core_updates');
| wordpress | {
"language": "en",
"length": 186,
"provenance": "stackexchange_00019.jsonl.gz:455029",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/185495"
} | [
0.06256103515625,
0.0103607177734375,
0.0103759765625,
-0.03485107421875,
0.0305633544921875,
-0.0255889892578125,
0.04437255859375,
-0.02288818359375,
0.0253753662109375,
0.0250091552734375,
0.01561737060546875,
-0.04132080078125,
0.0213623046875,
-0.047088623046875,
-0.027587890625,
-0.018157958984375,
0.052215576171875,
-0.01148223876953125,
0.0224456787109375,
0.0101165771484375,
-0.005710601806640625,
0.055023193359375,
-0.0006265640258789062,
0.07135009765625,
0.0104827880859375,
-0.032379150390625,
0.107421875,
-0.04034423828125,
0.0257415771484375,
-0.0338134765625,
0.02099609375,
-0.003688812255859375,
-0.004184722900390625,
0.0887451171875,
-0.0919189453125,
-0.0238800048828125,
-0.02008056640625,
0.04351806640625,
-0.005352020263671875,
0.025421142578125,
-0.0202789306640625,
0.011627197265625,
0.060546875,
0.0185699462890625,
0.00457763671875,
-0.0132293701171875,
-0.0291290283203125,
-0.0650634765625,
0.0007033348083496094,
-0.02020263671875,
0.0106201171875,
0.022216796875,
0.040191650390625,
-0.004772186279296875,
-0.00754547119140625,
0.004413604736328125,
-0.042724609375,
0.057220458984375,
0.041778564453125,
0.0098724365234375,
-0.0195159912109375,
-0.00493621826171875,
-0.0010833740234375,
-0.043304443359375,
0.0009984970092773438,
-0.016937255859375,
0.0357666015625,
0.0175628662109375,
-0.062103271484375,
-0.0033283233642578125,
0.05438232421875,
-0.01360321044921875,
-0.006938934326171875,
-0.0018749237060546875,
-0.010711669921875,
0.020355224609375,
0.0215301513671875,
0.0175018310546875,
0.0147705078125,
-0.01279449462890625,
0.0167388916015625,
-0.0246734619140625,
0.029205322265625,
-0.0052947998046875,
0.0026645660400390625,
0.03936767578125,
-0.0012388229370117188,
-0.01007843017578125,
-0.029815673828125,
0.01523590087890625,
-0.024139404296875,
-0.00640106201171875,
-0.036529541015625,
0.0252532958984375,
0.0160369873046875,
-0.021697998046875,
0.0293121337890625,
0.0657958984375,
-0.0113983154296875,
-0.0118255615234375,
-0.01959228515625,
-0.01549530029296875,
-0.0316162109375,
-0.021820068359375,
-0.028472900390625,
0.06878662109375,
-0.0012788772583007812,
0.03228759765625,
0.0278167724609375,
0.0323486328125,
0.04644775390625,
-0.01363372802734375,
-0.01120758056640625,
0.0083770751953125,
-0.009552001953125,
-0.0162506103515625,
-0.049163818359375,
0.019195556640625,
-0.0143890380859375,
0.006702423095703125,
0.024505615234375,
0.0606689453125,
-0.058502197265625,
-0.0157928466796875,
0.01143646240234375,
-0.002017974853515625,
-0.0016698837280273438,
-0.0093536376953125,
-0.04736328125,
-0.0102386474609375,
-0.051116943359375,
0.0175933837890625,
0.09063720703125,
0.056793212890625,
0.034759521484375,
-0.0156402587890625,
0.00141143798828125,
0.0180206298828125,
-0.0120391845703125,
0.0259246826171875,
0.00795745849609375,
-0.029083251953125,
-0.0111236572265625,
-0.01378631591796875,
0.01556396484375,
-0.033599853515625,
0.0024013519287109375,
0.04620361328125,
0.027008056640625,
0.034454345703125,
-0.0012674331665039062,
0.015838623046875,
0.06689453125,
0.00409698486328125,
-0.025665283203125,
-0.0191650390625,
0.0733642578125,
-0.0504150390625,
-0.0721435546875,
-0.06463623046875,
-0.00421905517578125,
-0.0267333984375,
-0.00817108154296875,
-0.007289886474609375,
-0.03045654296875,
0.03826904296875,
-0.024566650390625,
0.00193023681640625,
0.02838134765625,
0.02239990234375,
0.0011014938354492188,
-0.01245880126953125,
0.045074462890625,
0.0311737060546875,
-0.0008387565612792969,
0.020660400390625,
0.0196533203125,
-0.023712158203125,
0.04595947265625,
-0.0160675048828125,
-0.052642822265625,
-0.031890869140625,
0.0687255859375,
-0.025054931640625,
-0.06298828125,
0.04071044921875,
-0.0012273788452148438,
0.04559326171875,
0.0239105224609375,
-0.01120758056640625,
0.058868408203125,
-0.01032257080078125,
-0.013275146484375,
0.0390625,
-0.041961669921875,
-0.043914794921875,
0.0139617919921875,
0.0335693359375,
-0.0301055908203125,
-0.011474609375,
0.0185394287109375,
-0.028839111328125,
0.00870513916015625,
-0.0347900390625,
-0.0869140625,
-0.0107574462890625,
-0.048309326171875,
0.0396728515625,
0.00982666015625,
0.017425537109375,
0.0187530517578125,
0.00859832763671875,
-0.026275634765625,
-0.01000213623046875,
-0.0227203369140625,
0.01335906982421875,
-0.0199737548828125,
0.01189422607421875,
0.00893402099609375,
0.03924560546875,
0.0036830902099609375,
0.0002846717834472656,
-0.011322021484375,
-0.06048583984375,
0.03204345703125,
-0.042724609375,
-0.0035400390625,
-0.0253753662109375,
0.004650115966796875,
-0.007472991943359375,
-0.0172271728515625,
0.034423828125,
0.020660400390625,
-0.01593017578125,
-0.0185089111328125,
-0.0013723373413085938,
-0.0139007568359375,
-0.1185302734375,
-0.00890350341796875,
0.0721435546875,
0.0261383056640625,
-0.018341064453125,
-0.027069091796875,
0.002307891845703125,
0.0005965232849121094,
-0.044708251953125,
-0.008026123046875,
0.01727294921875,
0.0213623046875,
0.0256500244140625,
-0.0089111328125,
-0.01995849609375,
0.02484130859375,
-0.07366943359375,
0.0160369873046875,
0.042327880859375,
0.01035308837890625,
0.01531219482421875,
-0.001087188720703125,
-0.0305633544921875,
0.014984130859375,
-0.046600341796875,
-0.0487060546875,
-0.00853729248046875,
0.026275634765625,
-0.0096435546875,
0.041534423828125,
0.045074462890625,
0.00734710693359375,
-0.0267333984375,
-0.004329681396484375,
-0.0308990478515625,
-0.01080322265625,
0.01332855224609375,
-0.0250244140625,
-0.0292510986328125,
-0.01148223876953125,
0.024261474609375,
-0.03326416015625,
-0.004077911376953125,
-0.05865478515625,
-0.0308990478515625,
0.0198211669921875,
-0.0019140243530273438,
0.005001068115234375,
0.00022912025451660156,
0.045623779296875,
-0.0650634765625,
-0.038116455078125,
-0.051971435546875,
-0.0119171142578125,
0.0172882080078125,
-0.0267486572265625,
0.01316070556640625,
0.0236053466796875,
-0.0224609375,
-0.0127716064453125,
-0.025970458984375,
0.01201629638671875,
-0.0204010009765625,
0.036529541015625,
0.0625,
0.030548095703125,
-0.0225677490234375,
0.012542724609375,
-0.033477783203125,
0.00240325927734375,
-0.017791748046875,
-0.0223541259765625,
0.054443359375,
-0.109130859375,
0.0262908935546875,
0.0084228515625,
0.031280517578125,
-0.019683837890625,
-0.054107666015625,
-0.0059356689453125,
0.01312255859375,
-0.04339599609375,
0.00789642333984375,
0.0241546630859375,
-0.016204833984375,
0.00612640380859375,
-0.006481170654296875,
-0.0206756591796875,
-0.01739501953125,
0.0015268325805664062,
-0.005283355712890625,
-0.076171875,
-0.0064697265625,
-0.0215301513671875,
-0.042877197265625,
-0.02569580078125,
0.052581787109375,
-0.005176544189453125,
0.0158843994140625,
0.01221466064453125,
0.09906005859375,
0.005748748779296875,
-0.10723876953125,
-0.0263671875,
0.0191497802734375,
-0.0325927734375,
0.0159149169921875,
-0.007282257080078125,
-0.0229949951171875,
0.0102386474609375,
0.009063720703125,
-0.03271484375,
0.00409698486328125,
0.017791748046875,
-0.030731201171875,
-0.00763702392578125,
-0.021636962890625,
0.0244598388671875,
-0.0268402099609375,
-0.01227569580078125,
-0.0025539398193359375,
0.00870513916015625,
-0.045257568359375,
-0.0006222724914550781,
0.00650787353515625,
-0.0172576904296875,
0.04345703125,
-0.0029850006103515625,
-0.025054931640625,
0.01314544677734375,
0.03448486328125,
0.00457000732421875,
-0.0157623291015625,
0.049072265625,
-0.0113525390625,
0.0058746337890625,
-0.021453857421875,
-0.0155792236328125,
-0.045166015625,
0.0012073516845703125,
-0.0281982421875,
0.038818359375,
-0.017303466796875,
-0.010986328125,
-0.038970947265625,
0.0158538818359375,
-0.061370849609375,
0.0089263916015625,
0.045379638671875,
-0.046722412109375,
0.015899658203125,
-0.033172607421875,
-0.0093994140625,
-0.0019350051879882812,
0.0733642578125,
-0.03985595703125,
-0.0214385986328125,
-0.0009560585021972656,
0.026611328125,
-0.025177001953125,
-0.040313720703125,
0.001659393310546875,
-0.01515960693359375,
-0.047698974609375,
0.005962371826171875,
-0.01381683349609375,
-0.0200347900390625,
-0.023040771484375,
-0.044464111328125,
-0.02288818359375,
-0.023284912109375,
0.0275726318359375,
-0.0126495361328125,
0.004573822021484375,
-0.0226287841796875,
-0.01361846923828125,
-0.0513916015625,
-0.004581451416015625,
-0.0017518997192382812,
-0.0751953125,
-0.00336456298828125,
-0.01297760009765625,
0.0372314453125,
0.016632080078125,
0.010589599609375,
-0.0303955078125,
0.03497314453125,
-0.0042877197265625,
0.007183074951171875,
-0.005855560302734375,
0.00594329833984375,
0.0303802490234375,
0.019622802734375,
0.00815582275390625,
-0.006183624267578125,
-0.0097198486328125,
-0.00894927978515625,
-0.017547607421875,
0.004974365234375,
-0.028839111328125,
-0.018218994140625,
0.0162200927734375,
-0.0251312255859375,
-0.0276947021484375,
-0.037506103515625,
-0.04852294921875,
-0.0082550048828125,
-0.01910400390625,
-0.006092071533203125,
-0.036163330078125,
-0.0215301513671875,
0.049835205078125,
-0.016387939453125,
-0.00994110107421875,
0.0017642974853515625,
0.060455322265625,
0.0162506103515625,
-0.0146331787109375,
-0.029632568359375,
0.0159454345703125,
0.0185089111328125,
0.00007939338684082031,
0.039703369140625,
0.0012063980102539062,
-0.0174713134765625,
0.04937744140625,
-0.00934600830078125,
0.017913818359375,
-0.027984619140625,
0.03692626953125,
-0.000732421875,
-0.01412200927734375,
0.0211334228515625,
-0.01023101806640625,
0.01885986328125,
-0.004154205322265625,
-0.021942138671875,
0.0171051025390625,
-0.004177093505859375,
-0.00019061565399169922,
0.007549285888671875,
0.01020050048828125,
-0.0236968994140625,
-0.05322265625,
0.033966064453125,
0.0029773712158203125,
-0.00875091552734375,
-0.004985809326171875,
0.00121307373046875,
0.01800537109375,
-0.0153656005859375,
-0.002208709716796875,
-0.061676025390625,
0.013153076171875,
-0.052978515625,
0.033935546875,
-0.0256195068359375,
-0.028045654296875,
-0.04547119140625,
-0.01114654541015625,
0.0654296875,
-0.0164031982421875,
-0.050537109375,
-0.0024204254150390625,
-0.0140838623046875,
0.04443359375,
0.04144287109375,
-0.0081329345703125,
0.0272979736328125,
0.03216552734375,
-0.0246429443359375,
-0.035980224609375,
-0.007602691650390625,
-0.01861572265625,
-0.06378173828125,
-0.0225982666015625,
0.014129638671875,
-0.0307159423828125,
0.001361846923828125,
-0.017578125,
0.0263824462890625,
-0.033111572265625,
-0.0026760101318359375,
0.062286376953125,
0.06298828125,
-0.0223846435546875,
0.0016736984252929688,
0.038360595703125,
-0.0008578300476074219,
-0.045257568359375,
0.0189208984375,
-0.038970947265625,
-0.02587890625,
0.020965576171875,
0.04315185546875,
0.053497314453125,
0.005519866943359375,
-0.0203399658203125,
-0.00466156005859375,
-0.00457763671875,
0.0556640625,
0.041595458984375,
-0.026519775390625,
-0.0299835205078125,
0.0253143310546875,
0.04052734375,
0.0011205673217773438,
0.00624847412109375,
0.0035533905029296875,
0.004131317138671875,
-0.01209259033203125,
0.0250091552734375,
-0.037811279296875,
-0.0175628662109375,
-0.0019359588623046875,
-0.035675048828125,
-0.060089111328125,
-0.006679534912109375,
-0.05108642578125,
0.00959014892578125,
-0.0279693603515625,
0.012420654296875,
0.01436614990234375,
0.0034313201904296875,
-0.00505828857421875,
-0.032745361328125,
0.0206756591796875,
0.0233306884765625,
-0.0125274658203125,
0.050384521484375,
-0.0088348388671875,
-0.0423583984375,
0.0035915374755859375,
-0.04986572265625,
-0.03375244140625,
-0.06787109375,
-0.061126708984375,
-0.052825927734375,
0.008514404296875,
0.01000213623046875,
0.01297760009765625,
-0.0193634033203125,
-0.035491943359375,
0.01751708984375,
0.0254364013671875,
-0.004505157470703125,
0.0197906494140625,
-0.0108642578125,
0.056488037109375,
0.01678466796875,
0.08917236328125,
0.033203125,
0.03302001953125,
-0.03460693359375,
-0.043914794921875,
0.0285186767578125,
-0.053375244140625,
-0.0264434814453125,
-0.029052734375,
-0.01763916015625,
-0.005222320556640625,
0.0034389495849609375,
-0.005191802978515625,
-0.021453857421875,
-0.036529541015625,
-0.0008387565612792969,
-0.045013427734375,
0.0821533203125,
-0.032257080078125,
-0.007572174072265625,
-0.019622802734375,
-0.0174713134765625,
-0.0276947021484375,
-0.0245361328125,
-0.0164642333984375,
0.013946533203125,
0.01186370849609375,
-0.003124237060546875,
-0.0003247261047363281,
-0.0162200927734375,
0.042999267578125,
0.08001708984375,
0.0010900497436523438,
0.06982421875,
0.045623779296875,
0.0252685546875,
0.032989501953125,
0.0234832763671875,
0.01861572265625,
-0.02484130859375,
0.08441162109375,
0.023193359375,
-0.0233306884765625,
0.06610107421875,
-0.034423828125,
0.01041412353515625,
0.03228759765625,
0.0474853515625,
-0.051300048828125,
0.00786590576171875,
0.013641357421875,
-0.0015325546264648438,
0.03070068359375,
-0.0101776123046875,
-0.034698486328125,
-0.083251953125,
0.07696533203125,
-0.043212890625,
-0.0022296905517578125,
0.0258941650390625,
-0.005878448486328125,
0.0006685256958007812,
-0.029937744140625,
0.03228759765625,
0.00579071044921875,
-0.007511138916015625,
-0.0112152099609375,
-0.01343536376953125,
0.0025882720947265625,
0.0010280609130859375,
0.018646240234375,
-0.0005083084106445312,
-0.03826904296875,
-0.073486328125,
-0.0162353515625,
0.0116119384765625,
-0.044342041015625,
0.0152130126953125,
-0.0167694091796875,
-0.01381683349609375,
0.035400390625,
-0.0338134765625,
0.0352783203125,
0.002307891845703125,
-0.028778076171875,
-0.0199432373046875,
-0.0311431884765625,
0.010040283203125,
0.00942230224609375,
-0.074462890625,
0.0279083251953125,
-0.031402587890625,
-0.015655517578125,
0.002529144287109375,
-0.0016460418701171875,
0.062347412109375,
-0.003040313720703125,
-0.04339599609375,
0.0205535888671875,
-0.0433349609375,
-0.00930023193359375,
-0.01177215576171875,
0.028076171875,
-0.0509033203125,
-0.01348114013671875,
0.002567291259765625,
-0.006473541259765625,
-0.004383087158203125,
0.006805419921875,
-0.039520263671875,
0.08221435546875,
0.026123046875,
0.0015382766723632812,
0.01519012451171875,
0.033721923828125,
-0.034942626953125,
0.02301025390625,
-0.01812744140625,
0.06817626953125,
0.0235137939453125,
0.016021728515625,
-0.04052734375,
-0.0015621185302734375,
-0.0011930465698242188,
0.01702880859375,
0.04595947265625,
0.024993896484375,
-0.01094818115234375,
-0.0126495361328125,
0.0161285400390625,
0.01605224609375,
-0.025177001953125,
0.037750244140625,
-0.0021114349365234375,
0.00997161865234375,
0.0195465087890625,
-0.0158233642578125,
0.037689208984375,
-0.0260467529296875,
-0.0272369384765625,
0.0027828216552734375,
0.0233001708984375,
0.01038360595703125,
-0.0162353515625,
0.04730224609375,
-0.007678985595703125,
-0.0021514892578125,
0.0075531005859375,
0.041839599609375,
0.01343536376953125,
-0.00615692138671875,
-0.015869140625,
0.0216522216796875,
0.0394287109375,
-0.00952911376953125,
0.034759521484375,
0.00351715087890625,
0.0129547119140625,
0.0703125,
0.027008056640625,
-0.028167724609375,
0.032989501953125,
0.02447509765625,
0.0192413330078125,
-0.01050567626953125,
0.0019283294677734375,
0.006763458251953125,
0.0304107666015625,
-0.030548095703125,
-0.0260772705078125,
0.031341552734375,
0.01059722900390625,
-0.0028629302978515625,
-0.037689208984375,
0.004253387451171875,
-0.004062652587890625,
0.00969696044921875,
-0.02093505859375,
0.0196533203125,
-0.0287933349609375,
-0.01374053955078125,
-0.004665374755859375,
-0.0157012939453125,
-0.0018606185913085938,
0.03033447265625,
0.01398468017578125,
0.019012451171875,
-0.018341064453125,
-0.0206298828125,
-0.044464111328125,
0.023712158203125,
0.01033782958984375,
0.0182647705078125,
-0.007572174072265625,
0.0469970703125,
0.031768798828125,
-0.005146026611328125,
-0.0174407958984375,
0.033905029296875,
0.02874755859375,
0.0010204315185546875,
-0.03204345703125,
-0.0325927734375,
0.0216064453125,
0.034912109375,
0.0271759033203125,
-0.00714874267578125,
0.036041259765625,
0.0596923828125,
-0.0033397674560546875,
0.0020351409912109375,
0.0679931640625,
0.00600433349609375,
-0.0093994140625,
-0.04681396484375,
-0.018890380859375,
-0.0036869049072265625,
-0.00270843505859375,
0.0203094482421875,
-0.01480865478515625,
0.011505126953125,
-0.0141754150390625,
-0.01410675048828125,
0.002071380615234375,
-0.047149658203125,
0.027496337890625,
-0.004241943359375,
0.01351165771484375,
-0.006908416748046875,
0.0243377685546875,
0.02734375,
-0.0447998046875,
-0.00740814208984375,
0.004451751708984375,
0.0005788803100585938,
-0.029632568359375,
0.07330322265625,
0.001544952392578125,
0.0021820068359375,
-0.0017442703247070312,
-0.03564453125,
0.0364990234375,
-0.0016994476318359375,
-0.004978179931640625,
0.01358795166015625,
-0.00624847412109375,
-0.002170562744140625,
0.0012483596801757812,
0.01593017578125,
0.00218963623046875,
0.06195068359375,
-0.0179595947265625,
0.01132965087890625,
-0.0025882720947265625,
-0.024688720703125,
-0.0087127685546875,
0.0166015625,
-0.057159423828125,
0.0130462646484375,
-0.004062652587890625,
0.0006747245788574219,
-0.0465087890625,
0.00882720947265625,
0.062744140625,
-0.0052337646484375,
0.044158935546875,
-0.0023288726806640625,
-0.001270294189453125,
-0.053192138671875,
-0.01256561279296875,
-0.0280609130859375,
-0.0130615234375,
0.01280975341796875,
0.002750396728515625,
0.00875091552734375,
0.00655364990234375,
0.0020580291748046875,
0.01251983642578125,
0.046783447265625,
0.0229644775390625,
0.0007061958312988281,
0.0352783203125,
0.004856109619140625,
0.0391845703125,
-0.0179290771484375,
0.0007319450378417969,
0.00861358642578125,
-0.0184478759765625,
0.009033203125,
0.0049896240234375,
0.0136871337890625,
-0.002429962158203125,
0.02093505859375,
-0.0181732177734375,
-0.01044464111328125,
0.01039886474609375,
-0.022491455078125,
0.006229400634765625,
-0.015716552734375,
0.007633209228515625,
-0.00894927978515625,
0.0236053466796875,
-0.007137298583984375,
-0.044921875,
-0.0267333984375,
-0.00685882568359375,
-0.0250701904296875,
-0.035919189453125,
-0.01593017578125,
0.00501251220703125,
0.032623291015625,
0.005489349365234375,
-0.071533203125,
0.0231475830078125,
-0.01409149169921875,
0.077392578125,
-0.0127105712890625,
0.039215087890625,
-0.050323486328125,
-0.01812744140625,
-0.0210723876953125,
-0.053558349609375,
-0.05712890625,
0.0985107421875,
-0.02459716796875,
-0.0350341796875,
-0.0197906494140625,
0.0173187255859375,
-0.00323486328125,
-0.07379150390625,
-0.0181121826171875,
-0.0191802978515625,
0.01396942138671875,
-0.0208282470703125,
0.0092620849609375,
-0.0214080810546875,
0.009246826171875,
-0.0400390625,
-0.0174560546875,
-0.06549072265625,
-0.021820068359375,
-0.0523681640625,
0.021148681640625,
0.0006422996520996094,
-0.0394287109375,
-0.06573486328125,
0.0191802978515625,
-0.022613525390625,
-0.031005859375,
-0.036712646484375,
0.0018787384033203125,
-0.00272369384765625,
0.0272979736328125,
-0.00534820556640625,
-0.0152740478515625,
-0.0158233642578125,
0.040740966796875,
0.0276031494140625,
0.0198974609375,
-0.006816864013671875,
0.01232147216796875,
-0.0180816650390625,
0.0557861328125,
0.047149658203125,
0.0125732421875,
-0.057769775390625,
0.021484375,
0.0226593017578125,
0.040863037109375,
0.0006442070007324219,
0.06536865234375,
0.0379638671875,
-0.021240234375,
-0.02264404296875,
-0.067626953125,
-0.050872802734375,
-0.0401611328125,
0.09417724609375,
0.0670166015625,
0.033935546875,
-0.02996826171875,
0.0120086669921875,
-0.01387786865234375,
-0.030975341796875,
-0.0291748046875,
0.013671875,
-0.05877685546875,
-0.0240020751953125,
0.0020160675048828125,
0.01045989990234375,
-0.0065765380859375,
-0.01358795166015625,
-0.0022106170654296875,
-0.0280914306640625,
-0.005401611328125,
-0.0000896453857421875,
-0.0035228729248046875,
0.00008732080459594727,
-0.028411865234375,
0.0150909423828125,
-0.002353668212890625,
-0.0027446746826171875,
-0.0022068023681640625,
-0.0159149169921875,
0.05450439453125,
-0.008209228515625,
0.0028839111328125,
-0.01010894775390625,
0.0238800048828125,
0.00807952880859375,
0.00446319580078125,
-0.0113525390625,
-0.0009984970092773438,
-0.0072784423828125,
0.00007426738739013672,
0.00728607177734375,
-0.0098724365234375,
-0.07305908203125,
0.06756591796875,
-0.0005259513854980469,
0.0625,
0.0012388229370117188,
0.011474609375,
0.0008535385131835938,
0.01248931884765625,
0.00212860107421875,
-0.01568603515625,
0.052825927734375,
-0.054595947265625,
-0.003376007080078125,
0.01499176025390625,
0.00734710693359375,
-0.0296173095703125,
-0.001995086669921875,
-0.072265625,
0.015716552734375,
0.00007075071334838867
]
|
ebb4fbb2046da900d0bd4e1b954e26cca36b51d3 | Wordpress Stackexchange
Q: How to remove the WordPress logo from login and register page? I want to remove WordPress logo from login and register page. I think I have to make some changes in .css file for this. So I want to know in which css file do I have to make the changes?
A: You can add a filter to login_head. As explained in the Codex, add this to your code:
function my_custom_login_logo() {
echo '<style type="text/css">
h1 a {background-image:url(http://example.com/your-logo.png) !important; margin:0 auto;}
</style>';
}
add_filter( 'login_head', 'my_custom_login_logo' );
| Q: How to remove the WordPress logo from login and register page? I want to remove WordPress logo from login and register page. I think I have to make some changes in .css file for this. So I want to know in which css file do I have to make the changes?
A: You can add a filter to login_head. As explained in the Codex, add this to your code:
function my_custom_login_logo() {
echo '<style type="text/css">
h1 a {background-image:url(http://example.com/your-logo.png) !important; margin:0 auto;}
</style>';
}
add_filter( 'login_head', 'my_custom_login_logo' );
A: To remove the WordPress logo, paste the below code in functions.php of the theme directory.
function remove_logo() { ?>
<style type="text/css">
.login h1 a { display: none; }
</style>
<?php }
add_action( 'login_enqueue_scripts', 'remove_logo' );
A: Go to your website Editor using > Appearance > Editor > function.php and add this before the last line "?>":
/* Remove WP logo from login page */
function custom_login_logo() {
echo '<style type ="text/css">.login h1 a { display:none!important; }</style>';
}
add_action('login_head', 'custom_login_logo');
A: You can replace the logo using built-in theme editor as explained
in this post.
Step 1:
Login to your WordPress site as admin and go to Media -> Add New to upload a new image and copy the image url.
You can also upload your new logo to the theme’s images directory or you can create a new directory to upload the logo. This can be done with the help of web hosting control panel or FTP.
Step 2:
Go to the Admin Dashboard -> Appearance -> Theme Editor.
Step 3:
When the editor opens, find and select functions.php from the right side of the page and add the following code to the end of the page.
function my_custom_logo() { ?>
<style type="text/css">
#login h1 a, .login h1 a {
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/logo.png);
height:100px;
width:100px;
background-size: 100px 100px;
background-repeat: no-repeat;
margin-bottom: 10px;
}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'my_custom_logo' );
Replace logo.png with the name of the file you have uploaded. If you have uploaded the new logo with WordPress, modify the background-image property as shown below.
background-image: url(url copied in step 1);
A: You don't need to go through the coding, use Custom Login plug-in to do that
A: It's best to run this after login_enqueue_scripts as mentioned by @ashin above
I'll post this since it relates to changing the logo.
To change the URL from wordpress.org to your own (along with the links title attr), use this:
function my_login_logo_url() {
return home_url();
}
add_filter( 'login_headerurl', 'my_login_logo_url' );
function my_login_logo_url_title() {
return 'Your Site Name and Info';
}
add_filter( 'login_headertitle', 'my_login_logo_url_title' );
If you want to get crazy with styling, here is the css used to edit the entire login page:
body.login {}
body.login div#login {}
body.login div#login h1 {}
body.login div#login h1 a {}
body.login div#login form#loginform {}
body.login div#login form#loginform p {}
body.login div#login form#loginform p label {}
body.login div#login form#loginform input {}
body.login div#login form#loginform input#user_login {}
body.login div#login form#loginform input#user_pass {}
body.login div#login form#loginform p.forgetmenot {}
body.login div#login form#loginform p.forgetmenot input#rememberme {}
body.login div#login form#loginform p.submit {}
body.login div#login form#loginform p.submit input#wp-submit {}
body.login div#login p#nav {}
body.login div#login p#nav a {}
body.login div#login p#backtoblog {}
body.login div#login p#backtoblog a {}
| wordpress | {
"language": "en",
"length": 537,
"provenance": "stackexchange_00019.jsonl.gz:455043",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/185530"
} | [
0.041595458984375,
0.02734375,
-0.0102996826171875,
0.036285400390625,
0.0302734375,
-0.057098388671875,
0.08935546875,
-0.0584716796875,
-0.03558349609375,
0.0145721435546875,
0.0083465576171875,
0.0167236328125,
-0.058990478515625,
-0.028564453125,
0.01263427734375,
-0.046722412109375,
0.018341064453125,
0.020538330078125,
0.0660400390625,
0.001987457275390625,
0.01534271240234375,
0.0079803466796875,
0.03875732421875,
-0.00531005859375,
0.02618408203125,
-0.050537109375,
0.130859375,
-0.032684326171875,
0.05926513671875,
-0.01380157470703125,
0.027740478515625,
-0.02911376953125,
-0.01050567626953125,
0.062225341796875,
-0.029296875,
-0.00946044921875,
-0.01541900634765625,
0.030731201171875,
0.020172119140625,
0.01453399658203125,
0.030487060546875,
-0.028411865234375,
0.00283050537109375,
-0.0199737548828125,
-0.022003173828125,
0.0004820823669433594,
0.0037994384765625,
-0.0211944580078125,
0.021240234375,
-0.036834716796875,
0.006687164306640625,
0.03009033203125,
0.0287628173828125,
-0.0004572868347167969,
-0.02490234375,
0.00426483154296875,
-0.04901123046875,
0.060211181640625,
0.0176849365234375,
0.031707763671875,
0.0039825439453125,
0.010467529296875,
-0.00824737548828125,
-0.021759033203125,
-0.01123809814453125,
0.0121002197265625,
-0.0265655517578125,
0.00917816162109375,
-0.0246429443359375,
-0.0221099853515625,
0.005458831787109375,
-0.02813720703125,
-0.0184478759765625,
-0.00406646728515625,
-0.0360107421875,
0.0221099853515625,
-0.0201568603515625,
-0.0279541015625,
0.033050537109375,
0.0028476715087890625,
-0.0143890380859375,
-0.0390625,
-0.05267333984375,
0.016387939453125,
0.0087890625,
0.060302734375,
-0.0179595947265625,
-0.024658203125,
-0.0022373199462890625,
-0.01251220703125,
0.0009984970092773438,
-0.01424407958984375,
-0.01175689697265625,
0.00980377197265625,
-0.020050048828125,
-0.022003173828125,
0.026702880859375,
0.0197601318359375,
0.00417327880859375,
-0.0120086669921875,
0.0261688232421875,
-0.06085205078125,
0.01399993896484375,
-0.017364501953125,
-0.007358551025390625,
0.0418701171875,
-0.0164642333984375,
0.047119140625,
0.033355712890625,
0.0248260498046875,
0.022491455078125,
-0.04046630859375,
-0.0382080078125,
-0.057037353515625,
-0.011932373046875,
0.07501220703125,
0.0030078887939453125,
-0.0241851806640625,
0.01025390625,
0.00138092041015625,
-0.00827789306640625,
0.0155029296875,
0.01910400390625,
-0.006587982177734375,
0.00006574392318725586,
0.0003657341003417969,
-0.0069732666015625,
-0.039825439453125,
-0.0190277099609375,
-0.0001519918441772461,
-0.04766845703125,
0.0209808349609375,
0.077392578125,
0.052093505859375,
0.03021240234375,
-0.035736083984375,
0.036834716796875,
0.02569580078125,
-0.002567291259765625,
0.0253143310546875,
0.01435089111328125,
-0.05255126953125,
-0.027862548828125,
0.005901336669921875,
0.01354217529296875,
0.0005083084106445312,
0.006252288818359375,
0.04388427734375,
0.017059326171875,
-0.022216796875,
0.0274658203125,
-0.034759521484375,
-0.01151275634765625,
0.0244140625,
0.06695556640625,
0.0282135009765625,
0.07611083984375,
-0.020294189453125,
-0.02374267578125,
-0.002349853515625,
0.02484130859375,
0.0077972412109375,
0.0275726318359375,
0.0279541015625,
0.01352691650390625,
-0.0095367431640625,
-0.033599853515625,
0.0021152496337890625,
0.0289306640625,
-0.0210113525390625,
0.044891357421875,
-0.036163330078125,
0.04156494140625,
0.00772857666015625,
0.001621246337890625,
0.02911376953125,
0.0077667236328125,
0.0517578125,
-0.00714874267578125,
0.05322265625,
0.033447265625,
-0.035858154296875,
0.02825927734375,
-0.00176239013671875,
-0.037750244140625,
-0.003143310546875,
0.0322265625,
0.036956787109375,
-0.01343536376953125,
0.03167724609375,
0.04833984375,
0.02008056640625,
-0.04620361328125,
-0.00417327880859375,
0.001407623291015625,
-0.00859832763671875,
-0.021087646484375,
-0.01195526123046875,
-0.005908966064453125,
0.0335693359375,
0.00481414794921875,
0.0192413330078125,
-0.0243072509765625,
-0.01031494140625,
-0.045440673828125,
-0.00930023193359375,
-0.013336181640625,
0.03778076171875,
-0.03466796875,
0.0173797607421875,
0.0229034423828125,
-0.0040130615234375,
-0.026397705078125,
-0.0089263916015625,
0.007465362548828125,
0.00033092498779296875,
-0.031036376953125,
0.031890869140625,
0.006443023681640625,
0.030364990234375,
0.002979278564453125,
-0.0220489501953125,
0.0008912086486816406,
-0.035308837890625,
0.03472900390625,
-0.0323486328125,
-0.0241851806640625,
-0.044647216796875,
0.018798828125,
-0.02117919921875,
-0.031585693359375,
0.07586669921875,
-0.0013828277587890625,
0.031097412109375,
-0.0182342529296875,
-0.01551055908203125,
-0.00394439697265625,
-0.042755126953125,
0.00994110107421875,
0.03656005859375,
0.03656005859375,
0.02691650390625,
-0.01006317138671875,
0.01702880859375,
0.0504150390625,
-0.0228271484375,
0.01097869873046875,
0.0113525390625,
0.02593994140625,
-0.007671356201171875,
0.0297393798828125,
-0.0243682861328125,
0.033477783203125,
0.0041351318359375,
0.044097900390625,
0.005512237548828125,
-0.00508880615234375,
-0.037139892578125,
0.0184783935546875,
0.0013103485107421875,
0.005619049072265625,
-0.04388427734375,
-0.039642333984375,
-0.0113067626953125,
-0.056365966796875,
0.0029582977294921875,
-0.0265045166015625,
-0.0133819580078125,
-0.027069091796875,
-0.0085601806640625,
0.043670654296875,
0.01343536376953125,
-0.018218994140625,
0.0092620849609375,
0.05157470703125,
-0.01189422607421875,
-0.038665771484375,
0.01146697998046875,
-0.01560211181640625,
-0.00775909423828125,
-0.02044677734375,
-0.0184173583984375,
0.023529052734375,
-0.010498046875,
0.0175018310546875,
-0.0343017578125,
0.0406494140625,
0.01078033447265625,
-0.00817108154296875,
-0.02740478515625,
0.01129150390625,
0.00788116455078125,
-0.0225677490234375,
0.02655029296875,
-0.0005788803100585938,
-0.031951904296875,
0.0064697265625,
-0.029876708984375,
0.0338134765625,
-0.0142822265625,
0.04205322265625,
0.072998046875,
-0.001972198486328125,
0.00853729248046875,
0.014892578125,
-0.02630615234375,
0.00638580322265625,
0.006099700927734375,
0.007564544677734375,
-0.007183074951171875,
-0.0135345458984375,
0.050323486328125,
0.0053558349609375,
-0.005096435546875,
-0.00923919677734375,
-0.0341796875,
-0.01163482666015625,
-0.005802154541015625,
-0.046783447265625,
-0.0124053955078125,
-0.0806884765625,
-0.01534271240234375,
-0.0240936279296875,
0.0195159912109375,
0.0080108642578125,
0.041595458984375,
0.0008306503295898438,
0.0243682861328125,
0.02838134765625,
-0.035888671875,
-0.0236663818359375,
-0.031158447265625,
-0.060150146484375,
-0.02276611328125,
0.00732421875,
0.00550079345703125,
0.005939483642578125,
0.055328369140625,
0.015838623046875,
-0.028839111328125,
0.01187896728515625,
0.00646209716796875,
-0.01506805419921875,
0.016571044921875,
-0.0126953125,
-0.030487060546875,
0.00862884521484375,
-0.00804901123046875,
-0.01224517822265625,
-0.01029205322265625,
0.031524658203125,
-0.01131439208984375,
-0.00615692138671875,
-0.03851318359375,
-0.0169677734375,
0.0220184326171875,
0.0016641616821289062,
-0.079833984375,
-0.02813720703125,
-0.0894775390625,
-0.0204925537109375,
-0.00408935546875,
-0.036285400390625,
0.0309906005859375,
0.0170440673828125,
-0.0255126953125,
-0.00771331787109375,
0.023529052734375,
0.0048828125,
-0.00916290283203125,
-0.01093292236328125,
-0.025299072265625,
0.05645751953125,
0.01374053955078125,
0.0259552001953125,
-0.007770538330078125,
0.0350341796875,
-0.021514892578125,
0.0091400146484375,
0.00643157958984375,
0.0179595947265625,
-0.0014019012451171875,
-0.007266998291015625,
-0.03656005859375,
-0.07696533203125,
0.07879638671875,
0.005420684814453125,
-0.0282135009765625,
0.005458831787109375,
-0.038116455078125,
0.03570556640625,
0.112548828125,
-0.013641357421875,
-0.020599365234375,
-0.004909515380859375,
0.00745391845703125,
0.0062103271484375,
-0.00739288330078125,
-0.0181427001953125,
-0.025909423828125,
-0.1417236328125,
0.005886077880859375,
-0.0188140869140625,
-0.04345703125,
0.005245208740234375,
-0.037628173828125,
-0.07879638671875,
-0.07293701171875,
0.01355743408203125,
0.043975830078125,
0.0003826618194580078,
-0.01007843017578125,
-0.023101806640625,
-0.017974853515625,
0.00905609130859375,
-0.004375457763671875,
-0.0550537109375,
0.007686614990234375,
-0.0655517578125,
0.0628662109375,
0.050628662109375,
-0.0255279541015625,
-0.005435943603515625,
0.0263824462890625,
-0.01363372802734375,
-0.0010843276977539062,
0.00464630126953125,
0.0194091796875,
-0.005462646484375,
0.00908660888671875,
-0.01409149169921875,
-0.0177459716796875,
0.0067596435546875,
-0.0168609619140625,
-0.0557861328125,
-0.01202392578125,
-0.0074310302734375,
0.02801513671875,
0.0477294921875,
-0.02838134765625,
0.0144500732421875,
-0.034210205078125,
0.0011768341064453125,
0.01015472412109375,
0.0016698837280273438,
-0.0007853507995605469,
-0.025054931640625,
0.02099609375,
0.035369873046875,
0.04962158203125,
-0.011932373046875,
0.00469970703125,
0.0298309326171875,
0.01922607421875,
-0.040679931640625,
-0.0335693359375,
0.0201568603515625,
0.01213836669921875,
-0.002780914306640625,
0.04473876953125,
-0.017486572265625,
-0.00368499755859375,
0.055755615234375,
-0.031646728515625,
-0.00228118896484375,
0.0028553009033203125,
0.055694580078125,
0.00734710693359375,
-0.0216827392578125,
0.0238189697265625,
-0.0146636962890625,
-0.018402099609375,
-0.0008215904235839844,
0.0222625732421875,
-0.00466156005859375,
0.0421142578125,
-0.0182342529296875,
0.0034275054931640625,
-0.0158538818359375,
0.024993896484375,
-0.032318115234375,
0.02105712890625,
0.0092315673828125,
0.0121917724609375,
0.0206451416015625,
-0.0012664794921875,
0.00876617431640625,
-0.007793426513671875,
-0.01953125,
-0.0285186767578125,
-0.03131103515625,
-0.0384521484375,
0.00276947021484375,
-0.03973388671875,
-0.046905517578125,
-0.0006818771362304688,
-0.010894775390625,
0.0816650390625,
0.0170440673828125,
-0.049102783203125,
0.0003814697265625,
-0.0167083740234375,
0.0161285400390625,
0.0273590087890625,
0.0211639404296875,
0.04547119140625,
-0.0279693603515625,
-0.01302337646484375,
-0.00795745849609375,
-0.031646728515625,
-0.03466796875,
-0.05584716796875,
-0.0240478515625,
-0.02520751953125,
-0.01210784912109375,
0.044403076171875,
-0.01169586181640625,
-0.045928955078125,
0.032196044921875,
0.0102996826171875,
-0.005222320556640625,
-0.01617431640625,
0.03912353515625,
0.006282806396484375,
-0.0038623809814453125,
0.0233154296875,
-0.008758544921875,
0.035186767578125,
-0.029083251953125,
0.0014581680297851562,
-0.03045654296875,
0.03680419921875,
-0.0240936279296875,
-0.0212860107421875,
0.05517578125,
-0.0269317626953125,
0.01861572265625,
0.047698974609375,
-0.038116455078125,
-0.09796142578125,
-0.00560760498046875,
0.04150390625,
0.031768798828125,
-0.08062744140625,
-0.004245758056640625,
-0.01537322998046875,
-0.0153350830078125,
-0.0133056640625,
0.025604248046875,
-0.055633544921875,
0.0068817138671875,
0.0236663818359375,
-0.01544952392578125,
-0.0238800048828125,
-0.03826904296875,
-0.031707763671875,
0.001819610595703125,
0.005847930908203125,
0.01116943359375,
-0.0164947509765625,
-0.0137939453125,
0.01885986328125,
-0.00418853759765625,
-0.02252197265625,
0.0467529296875,
0.01302337646484375,
0.058013916015625,
0.007724761962890625,
-0.022064208984375,
-0.017059326171875,
-0.00919342041015625,
-0.00037360191345214844,
0.00409698486328125,
-0.023162841796875,
-0.0112762451171875,
-0.01953125,
-0.0009684562683105469,
0.01413726806640625,
-0.0012559890747070312,
0.006298065185546875,
-0.0145111083984375,
0.041351318359375,
0.01235198974609375,
0.046539306640625,
-0.02362060546875,
0.032501220703125,
0.0252227783203125,
-0.0098419189453125,
0.01392364501953125,
0.031585693359375,
0.0164794921875,
-0.0223541259765625,
0.01983642578125,
-0.05340576171875,
-0.02825927734375,
-0.03369140625,
-0.0308990478515625,
0.03692626953125,
0.044097900390625,
-0.00689697265625,
-0.00867462158203125,
-0.00714111328125,
-0.0017404556274414062,
-0.01708984375,
0.04052734375,
0.00823974609375,
-0.019683837890625,
0.01467132568359375,
0.007022857666015625,
0.06585693359375,
0.00347137451171875,
-0.0274658203125,
0.013092041015625,
0.00006324052810668945,
0.04339599609375,
0.01360321044921875,
-0.00870513916015625,
0.0169219970703125,
0.021820068359375,
0.00010657310485839844,
0.0298004150390625,
0.00933837890625,
0.0117645263671875,
0.00594329833984375,
-0.0007009506225585938,
-0.0270233154296875,
0.0012979507446289062,
0.03082275390625,
0.00479888916015625,
-0.00821685791015625,
0.0158538818359375,
-0.01299285888671875,
0.0192413330078125,
0.048828125,
0.055206298828125,
-0.09417724609375,
0.025634765625,
-0.0067291259765625,
0.0285491943359375,
0.0977783203125,
0.0157623291015625,
-0.01262664794921875,
0.0171661376953125,
-0.00856781005859375,
-0.0175018310546875,
-0.01776123046875,
0.013336181640625,
0.02545166015625,
0.001861572265625,
-0.0025272369384765625,
0.019439697265625,
0.004215240478515625,
-0.07958984375,
-0.006786346435546875,
0.050384521484375,
-0.0252227783203125,
-0.02099609375,
0.0189361572265625,
0.0160064697265625,
-0.00942230224609375,
-0.072998046875,
0.020782470703125,
-0.016082763671875,
-0.0254364013671875,
0.060760498046875,
-0.006927490234375,
-0.006229400634765625,
0.0219879150390625,
-0.0215301513671875,
0.0145111083984375,
-0.0233917236328125,
-0.054901123046875,
0.0261688232421875,
-0.006214141845703125,
0.00865936279296875,
0.01043701171875,
-0.0537109375,
0.01194000244140625,
-0.039947509765625,
0.006378173828125,
-0.0095062255859375,
-0.061737060546875,
0.06451416015625,
-0.0311279296875,
-0.004047393798828125,
0.014862060546875,
0.0218505859375,
0.0026416778564453125,
-0.0489501953125,
0.033966064453125,
-0.0728759765625,
-0.035400390625,
-0.0068817138671875,
-0.0212249755859375,
-0.01357269287109375,
-0.0570068359375,
-0.08148193359375,
0.070556640625,
-0.0264739990234375,
0.043060302734375,
-0.00672149658203125,
0.022064208984375,
0.0035037994384765625,
0.0094146728515625,
-0.016815185546875,
0.042083740234375,
0.04486083984375,
0.0202789306640625,
0.03472900390625,
0.01129150390625,
0.03375244140625,
-0.01174163818359375,
0.0535888671875,
0.005580902099609375,
0.00533294677734375,
-0.0265350341796875,
0.05767822265625,
0.0616455078125,
0.016937255859375,
-0.01169586181640625,
-0.01158905029296875,
0.0235748291015625,
0.0034046173095703125,
-0.0269775390625,
0.0238800048828125,
0.0013685226440429688,
-0.054473876953125,
0.0197296142578125,
0.00473785400390625,
-0.0177459716796875,
0.0164794921875,
0.03411865234375,
-0.0855712890625,
0.025390625,
0.044281005859375,
0.04364013671875,
0.0012407302856445312,
0.037261962890625,
0.0084228515625,
0.0226593017578125,
0.02880859375,
-0.02880859375,
0.05029296875,
-0.010589599609375,
0.033782958984375,
0.027099609375,
0.018096923828125,
0.037261962890625,
-0.004421234130859375,
0.0225830078125,
0.0169677734375,
-0.00945281982421875,
0.0127105712890625,
0.001926422119140625,
0.0124053955078125,
-0.0293426513671875,
0.0309295654296875,
0.00850677490234375,
0.0227203369140625,
-0.030914306640625,
-0.0228424072265625,
0.0131683349609375,
0.0088348388671875,
0.0379638671875,
-0.01491546630859375,
0.062347412109375,
-0.11859130859375,
-0.07672119140625,
-0.00572967529296875,
0.02020263671875,
0.037872314453125,
-0.0007562637329101562,
0.005035400390625,
0.032196044921875,
-0.04669189453125,
0.032318115234375,
-0.01222991943359375,
-0.0031280517578125,
-0.0136260986328125,
-0.0007238388061523438,
0.037139892578125,
-0.00524139404296875,
0.023101806640625,
0.00916290283203125,
-0.02508544921875,
0.0501708984375,
-0.025787353515625,
0.0260467529296875,
-0.043853759765625,
-0.037200927734375,
-0.032501220703125,
0.0301361083984375,
0.0021533966064453125,
-0.0151214599609375,
0.0193023681640625,
0.0175933837890625,
-0.047393798828125,
-0.031646728515625,
0.011444091796875,
-0.0225830078125,
-0.00251007080078125,
-0.0027751922607421875,
0.003543853759765625,
0.0285491943359375,
-0.0017061233520507812,
-0.035980224609375,
0.0177154541015625,
0.05255126953125,
-0.02850341796875,
0.00678253173828125,
0.0082244873046875,
-0.044342041015625,
-0.0011196136474609375,
-0.01425933837890625,
0.01806640625,
-0.01148223876953125,
-0.043670654296875,
-0.01390838623046875,
-0.0292510986328125,
-0.022491455078125,
0.0276031494140625,
0.0386962890625,
-0.001903533935546875,
0.0175018310546875,
0.01470947265625,
-0.006412506103515625,
-0.0128936767578125,
-0.0013952255249023438,
0.0008244514465332031,
-0.043701171875,
0.02008056640625,
-0.01806640625,
-0.0904541015625,
-0.045989990234375,
-0.034027099609375,
0.0245819091796875,
-0.004261016845703125,
0.06964111328125,
-0.00848388671875,
0.01349639892578125,
-0.030181884765625,
-0.01068878173828125,
-0.0025157928466796875,
0.0030155181884765625,
-0.0181427001953125,
0.022705078125,
0.00142669677734375,
-0.0155792236328125,
-0.1005859375,
0.09027099609375,
-0.023040771484375,
0.032562255859375,
0.09912109375,
-0.0294342041015625,
-0.0239410400390625,
-0.012420654296875,
-0.00772857666015625,
-0.0301971435546875,
-0.04205322265625,
-0.0199127197265625,
0.0254669189453125,
-0.0030231475830078125,
-0.0230865478515625,
-0.043701171875,
0.03948974609375,
-0.0252685546875,
-0.0250396728515625,
0.034515380859375,
-0.0576171875,
0.0284576416015625,
0.02593994140625,
-0.012481689453125,
-0.03289794921875,
-0.0019969940185546875,
-0.01085662841796875,
-0.0260467529296875,
0.0156402587890625,
0.00276947021484375,
-0.0016040802001953125,
-0.0134735107421875,
0.044219970703125,
0.0540771484375,
0.043701171875,
-0.0017194747924804688,
0.01146697998046875,
0.040863037109375,
-0.0214385986328125,
0.01078033447265625,
-0.015380859375,
-0.032958984375,
-0.0218658447265625,
-0.025604248046875,
0.016998291015625,
-0.01424407958984375,
-0.06671142578125,
-0.06451416015625,
0.007320404052734375,
0.02264404296875,
-0.002277374267578125,
-0.07489013671875,
0.00988006591796875,
-0.0171966552734375,
0.06915283203125,
-0.021026611328125,
-0.0236663818359375,
-0.01035308837890625,
-0.0050201416015625,
0.0018186569213867188,
-0.0389404296875,
-0.041015625,
0.050384521484375,
-0.0244598388671875,
-0.0059356689453125,
0.0197296142578125,
-0.005924224853515625,
0.03228759765625,
-0.0211181640625,
-0.007080078125,
0.02972412109375,
-0.039306640625,
-0.0201873779296875,
-0.007297515869140625,
0.01515960693359375,
-0.008544921875,
-0.0240020751953125,
0.006496429443359375,
-0.00743865966796875,
-0.015411376953125,
-0.03057861328125,
0.0003101825714111328,
-0.004451751708984375,
-0.045745849609375,
-0.07330322265625,
0.01739501953125,
-0.00814056396484375,
-0.0384521484375,
-0.06787109375,
0.059326171875,
0.00998687744140625,
-0.027557373046875,
-0.02252197265625,
-0.0255126953125,
0.0093231201171875,
0.0201568603515625,
0.0028247833251953125,
0.0311737060546875,
-0.017974853515625,
0.0170440673828125,
-0.0017452239990234375,
0.05438232421875,
0.059478759765625,
0.0016613006591796875,
-0.012359619140625,
0.025543212890625,
0.0084228515625,
0.03778076171875,
-0.01641845703125,
0.02044677734375,
-0.011627197265625,
-0.040740966796875,
-0.0252532958984375,
-0.056549072265625,
0.056304931640625,
0.0247955322265625,
0.018280029296875,
0.0105743408203125,
-0.0210723876953125,
-0.027130126953125,
-0.0301513671875,
-0.01251220703125,
-0.00682830810546875,
-0.033172607421875,
0.0163726806640625,
-0.07940673828125,
-0.02655029296875,
0.0005211830139160156,
0.00649261474609375,
-0.004878997802734375,
-0.016693115234375,
-0.023681640625,
-0.023284912109375,
-0.004314422607421875,
0.0311737060546875,
-0.045928955078125,
0.0579833984375,
0.01177978515625,
-0.01715087890625,
0.016876220703125,
-0.015838623046875,
-0.0198516845703125,
0.0283966064453125,
-0.0042572021484375,
0.014801025390625,
0.0075836181640625,
-0.026214599609375,
0.0182342529296875,
0.0005707740783691406,
-0.0053558349609375,
-0.043212890625,
-0.02001953125,
-0.036163330078125,
0.00862884521484375,
0.019561767578125,
0.02374267578125,
-0.0308685302734375,
0.02398681640625,
0.0382080078125,
-0.01502227783203125,
0.01250457763671875,
-0.06549072265625,
-0.02020263671875,
0.0244140625,
0.0235748291015625,
-0.039093017578125,
0.0250091552734375,
-0.020477294921875,
-0.0036182403564453125,
-0.0026264190673828125,
0.026214599609375,
-0.07293701171875,
0.0438232421875,
-0.01485443115234375,
0.03759765625,
0.03778076171875
]
|
e0a0f6cfcf53de2747befe4cd1665109c928f019 | Wordpress Stackexchange
Q: Disable emojicons introduced with WP 4.2 So WP 4.2 introduced emojis (smileys) that basically adds JS and other junk all over your pages. Something some people may find shocking. How does one completely erase all instances of this?
A: Better solution if you want to disable this: use a plugin.
Same code as from Christine's comments:
https://wordpress.org/plugins/disable-emojis/
Same code that also fixes the smilies to be the older ones:
https://wordpress.org/plugins/classic-smilies/
Source: Me, since I wrote that code in the first place.
https://plugins.trac.wordpress.org/changeset/1142480/classic-smilies
| Q: Disable emojicons introduced with WP 4.2 So WP 4.2 introduced emojis (smileys) that basically adds JS and other junk all over your pages. Something some people may find shocking. How does one completely erase all instances of this?
A: Better solution if you want to disable this: use a plugin.
Same code as from Christine's comments:
https://wordpress.org/plugins/disable-emojis/
Same code that also fixes the smilies to be the older ones:
https://wordpress.org/plugins/classic-smilies/
Source: Me, since I wrote that code in the first place.
https://plugins.trac.wordpress.org/changeset/1142480/classic-smilies
A: We will hook into init and remove actions as followed:
function disable_wp_emojicons() {
// all actions related to emojis
remove_action( 'admin_print_styles', 'print_emoji_styles' );
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
// filter to remove TinyMCE emojis
add_filter( 'tiny_mce_plugins', 'disable_emojicons_tinymce' );
}
add_action( 'init', 'disable_wp_emojicons' );
We will need the following filter function to disable TinyMCE emojicons:
function disable_emojicons_tinymce( $plugins ) {
if ( is_array( $plugins ) ) {
return array_diff( $plugins, array( 'wpemoji' ) );
} else {
return array();
}
}
Now we breathe and pretend this feature was never added to core... particularly while tons of resolved bugs are yet to be implemented.
This is available as a plugin, Disable Emojis.
Alternatively, you can replace the smilies with the original versions from previous versions of WordPress using Classic Smilies.
Update
We can also remove the DNS prefetch by returning false on filter emoji_svg_url (thanks @yobddigi):
add_filter( 'emoji_svg_url', '__return_false' );
A: If you want to prevent Wordpress from automatically converting your old school ASCII smilies to Unicode emojis (like ;-) to ) in your posts altogether, you might want to remove_filter('the_content', 'convert_smilies')
(Not 100% sure this is what the question's about, but this solved my problem and I hope it might be handy for someone.)
A: This is the simple way to remove emoji. Add bellow code to your function.php
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
A: I've tried some codes above but the only codes works on my end is this one.
Don't forget to back-up your functions.php before implementing these codes.
// REMOVE WP EMOJI
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
A: Since WordPress emoji are served from s.w.org and they are not compressed, this impacts the SVG loading time depending on how many emoji you are using, and can even throw warnings on Google’s PageSpeed Insights tool.
To fix this issue, you can serve the emoji directly from your WordPress site itself and not by making external calls through js.
This can be achieved by installing the plugin Compressed Emoji which is available for free in the WordPress.org plugin repository.
When the plugin is activated, the compression offers savings in the range of 3kb ~ 1.3kb (roughly %60) per emoji.
Source: WPTavern
A: Good news, I added a feature request:
Introduce a new option to WordPress WP_EMOICONS
in here https://core.trac.wordpress.org/ticket/38252
and apparently this has been marked as duplicate
https://core.trac.wordpress.org/ticket/32102
so we may expect something like
define( 'WP_EMOICONS', false );
in the future WordPress releases.
| wordpress | {
"language": "en",
"length": 520,
"provenance": "stackexchange_00019.jsonl.gz:455059",
"question_score": "145",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/185577"
} | [
0.079345703125,
-0.038848876953125,
0.03759765625,
0.01187896728515625,
0.006061553955078125,
-0.0299224853515625,
0.09698486328125,
-0.01026153564453125,
0.03338623046875,
0.0023632049560546875,
0.006744384765625,
-0.058837890625,
0.011962890625,
-0.042694091796875,
-0.01177978515625,
-0.0223541259765625,
0.0244903564453125,
0.007598876953125,
0.031982421875,
-0.01629638671875,
0.0029754638671875,
-0.0228729248046875,
0.037933349609375,
-0.0042572021484375,
-0.00711822509765625,
-0.0391845703125,
0.136962890625,
-0.037506103515625,
0.0137481689453125,
-0.0236663818359375,
0.0259246826171875,
0.00040459632873535156,
-0.0213165283203125,
0.09844970703125,
-0.07794189453125,
-0.017425537109375,
-0.04412841796875,
0.08056640625,
0.03863525390625,
-0.0220794677734375,
0.024566650390625,
-0.0137939453125,
0.0255279541015625,
0.024566650390625,
0.00913238525390625,
-0.03765869140625,
0.0276641845703125,
-0.055145263671875,
0.016693115234375,
-0.032012939453125,
0.009368896484375,
0.02630615234375,
0.0251007080078125,
-0.032073974609375,
-0.01230621337890625,
0.013641357421875,
-0.040924072265625,
0.042999267578125,
0.0215606689453125,
0.0850830078125,
0.00540924072265625,
0.0257720947265625,
-0.050262451171875,
-0.0760498046875,
0.03472900390625,
-0.046875,
-0.033172607421875,
0.0316162109375,
-0.00957489013671875,
0.042388916015625,
0.04150390625,
-0.01410675048828125,
0.0008587837219238281,
-0.055877685546875,
0.0191497802734375,
0.093505859375,
-0.04107666015625,
0.032989501953125,
0.0207977294921875,
-0.0210113525390625,
0.00787353515625,
0.029266357421875,
-0.04541015625,
-0.024749755859375,
0.0162353515625,
0.0243988037109375,
-0.00507354736328125,
-0.028045654296875,
-0.0199432373046875,
0.01519012451171875,
-0.020843505859375,
-0.0133056640625,
-0.0197906494140625,
0.05328369140625,
0.02178955078125,
0.0021800994873046875,
0.0452880859375,
0.053863525390625,
-0.0374755859375,
-0.024688720703125,
0.0125885009765625,
-0.041412353515625,
0.01110076904296875,
-0.0277557373046875,
-0.0008411407470703125,
-0.0014085769653320312,
0.004688262939453125,
-0.01087188720703125,
0.036895751953125,
0.0253753662109375,
-0.01153564453125,
0.01081085205078125,
0.0030765533447265625,
-0.01544952392578125,
0.0064544677734375,
-0.0120849609375,
-0.036895751953125,
0.041107177734375,
-0.0013275146484375,
0.018310546875,
0.0205078125,
0.0179595947265625,
0.006046295166015625,
-0.00991058349609375,
0.01073455810546875,
0.01641845703125,
-0.0292205810546875,
-0.032867431640625,
0.043975830078125,
-0.01232147216796875,
-0.046539306640625,
0.0008635520935058594,
0.06927490234375,
0.047454833984375,
0.0345458984375,
-0.0232391357421875,
-0.017364501953125,
-0.00861358642578125,
-0.0019159317016601562,
0.04400634765625,
-0.031982421875,
-0.0833740234375,
-0.0029430389404296875,
-0.01080322265625,
0.031585693359375,
-0.0120849609375,
-0.0265045166015625,
0.0389404296875,
0.07635498046875,
0.01329803466796875,
0.020294189453125,
-0.046417236328125,
0.01496124267578125,
0.02874755859375,
-0.000545501708984375,
-0.00267791748046875,
0.051422119140625,
-0.0300750732421875,
-0.0286407470703125,
-0.0248260498046875,
-0.002819061279296875,
0.0064697265625,
0.0251312255859375,
0.037261962890625,
0.0145111083984375,
-0.00775909423828125,
0.03448486328125,
0.024261474609375,
0.0149993896484375,
0.0007891654968261719,
-0.0159912109375,
-0.0237274169921875,
0.016021728515625,
-0.01519775390625,
-0.02484130859375,
0.00524139404296875,
0.01013946533203125,
-0.00850677490234375,
0.01513671875,
0.0297088623046875,
-0.0055694580078125,
-0.026885986328125,
0.044342041015625,
-0.02020263671875,
-0.08447265625,
0.0111541748046875,
0.0086212158203125,
0.04534912109375,
0.05462646484375,
-0.00757598876953125,
0.0677490234375,
-0.01139068603515625,
0.006816864013671875,
-0.00615692138671875,
0.043243408203125,
-0.019073486328125,
-0.04864501953125,
-0.020477294921875,
0.0009217262268066406,
-0.038970947265625,
0.0228271484375,
0.01457977294921875,
-0.01207733154296875,
-0.035552978515625,
-0.12890625,
0.002811431884765625,
-0.031585693359375,
0.052947998046875,
0.00222015380859375,
0.0330810546875,
0.015838623046875,
0.006191253662109375,
-0.0372314453125,
0.054840087890625,
-0.01174163818359375,
-0.0169830322265625,
-0.03753662109375,
0.056640625,
0.033477783203125,
0.0408935546875,
0.05059814453125,
-0.0164337158203125,
0.06439208984375,
-0.040008544921875,
0.01386260986328125,
0.00579071044921875,
-0.027313232421875,
0.0061187744140625,
0.03076171875,
-0.011749267578125,
0.0263214111328125,
0.0391845703125,
-0.0450439453125,
0.0148468017578125,
0.0090789794921875,
-0.003337860107421875,
0.0097808837890625,
-0.07208251953125,
0.027496337890625,
0.0301666259765625,
0.056182861328125,
0.025787353515625,
-0.00801849365234375,
-0.03497314453125,
0.0251007080078125,
-0.03948974609375,
0.034576416015625,
-0.047027587890625,
0.004589080810546875,
0.01531982421875,
-0.00959014892578125,
-0.01995849609375,
0.024627685546875,
0.0212860107421875,
0.004367828369140625,
0.0182952880859375,
-0.01120758056640625,
0.007537841796875,
-0.01090240478515625,
0.004764556884765625,
-0.0015783309936523438,
-0.01523590087890625,
-0.00933837890625,
-0.01092529296875,
0.038116455078125,
-0.055694580078125,
0.024078369140625,
0.0036296844482421875,
0.01041412353515625,
-0.032928466796875,
0.0104827880859375,
-0.031890869140625,
0.00630950927734375,
0.0148468017578125,
-0.0018968582153320312,
-0.00563812255859375,
-0.0361328125,
0.008575439453125,
0.01019287109375,
-0.00945281982421875,
-0.0151824951171875,
-0.00586700439453125,
0.00397491455078125,
-0.002857208251953125,
0.0038013458251953125,
-0.0098419189453125,
0.0306549072265625,
0.00258636474609375,
-0.051666259765625,
-0.00806427001953125,
-0.011077880859375,
0.0823974609375,
0.044647216796875,
-0.0310211181640625,
0.0439453125,
0.0306854248046875,
-0.0271453857421875,
-0.045623779296875,
0.0289154052734375,
-0.037200927734375,
0.0335693359375,
0.0775146484375,
-0.0218963623046875,
0.0210418701171875,
0.035675048828125,
-0.043548583984375,
0.0189208984375,
0.0628662109375,
0.0401611328125,
0.02203369140625,
-0.056732177734375,
0.0254669189453125,
0.0206146240234375,
0.03741455078125,
-0.00765228271484375,
-0.0310211181640625,
0.01413726806640625,
0.00942230224609375,
-0.037994384765625,
-0.042327880859375,
-0.026824951171875,
-0.021881103515625,
-0.054473876953125,
0.051605224609375,
-0.0048370361328125,
0.0083160400390625,
0.0623779296875,
-0.00954437255859375,
-0.049957275390625,
-0.0111846923828125,
0.02508544921875,
-0.040130615234375,
0.01274871826171875,
-0.0265350341796875,
0.00704193115234375,
-0.00786590576171875,
0.0093231201171875,
0.047210693359375,
0.013763427734375,
-0.00373077392578125,
0.03961181640625,
-0.0193023681640625,
-0.01320648193359375,
0.021942138671875,
-0.02032470703125,
0.018798828125,
0.00899505615234375,
0.0033721923828125,
-0.00952911376953125,
0.02020263671875,
-0.0008373260498046875,
-0.0175628662109375,
-0.026336669921875,
0.020172119140625,
0.0054779052734375,
0.00804901123046875,
0.033416748046875,
0.0325927734375,
0.0105133056640625,
-0.0095672607421875,
-0.036895751953125,
-0.0041351318359375,
-0.03424072265625,
0.059844970703125,
-0.016265869140625,
-0.0079193115234375,
0.005157470703125,
0.0621337890625,
0.034759521484375,
0.01107025146484375,
0.0165863037109375,
0.005283355712890625,
0.034576416015625,
-0.01031494140625,
0.0151824951171875,
-0.049072265625,
0.004100799560546875,
-0.037445068359375,
0.07122802734375,
0.008209228515625,
-0.007656097412109375,
-0.044677734375,
0.0655517578125,
-0.0455322265625,
0.0271453857421875,
0.0285491943359375,
-0.0399169921875,
-0.00963592529296875,
0.0190277099609375,
-0.004291534423828125,
-0.003314971923828125,
0.031494140625,
0.01788330078125,
-0.0086669921875,
-0.00390625,
0.0081634521484375,
-0.04339599609375,
-0.031768798828125,
-0.031829833984375,
-0.01023101806640625,
-0.055511474609375,
0.0006031990051269531,
-0.01079559326171875,
-0.0196990966796875,
-0.037139892578125,
0.049224853515625,
-0.03338623046875,
-0.0187225341796875,
0.00988006591796875,
-0.039520263671875,
-0.01146697998046875,
0.0305328369140625,
-0.050140380859375,
0.0254974365234375,
-0.01273345947265625,
-0.060699462890625,
-0.0797119140625,
-0.0007047653198242188,
-0.01568603515625,
0.023406982421875,
-0.01140594482421875,
-0.0028934478759765625,
-0.02154541015625,
0.0233612060546875,
0.0012960433959960938,
-0.042449951171875,
0.0269012451171875,
0.039031982421875,
-0.04595947265625,
-0.0242919921875,
-0.0035037994384765625,
-0.054595947265625,
0.00823211669921875,
0.026397705078125,
-0.031402587890625,
0.026885986328125,
-0.01690673828125,
-0.0024738311767578125,
0.03582763671875,
-0.055206298828125,
0.0226898193359375,
-0.01428985595703125,
-0.03570556640625,
0.042388916015625,
-0.0030078887939453125,
-0.0094757080078125,
-0.052947998046875,
-0.0168304443359375,
-0.0143280029296875,
0.03887939453125,
-0.0191650390625,
0.01473236083984375,
0.0162353515625,
0.01010894775390625,
-0.03204345703125,
-0.02166748046875,
0.0251007080078125,
0.042266845703125,
-0.0087432861328125,
-0.00957489013671875,
0.005962371826171875,
-0.0270538330078125,
0.0260772705078125,
0.0091400146484375,
0.0242462158203125,
-0.0496826171875,
0.05712890625,
-0.015533447265625,
-0.009185791015625,
0.0369873046875,
-0.0111846923828125,
-0.01123046875,
0.076171875,
0.031707763671875,
-0.0338134765625,
0.0208587646484375,
0.033447265625,
0.005748748779296875,
-0.061279296875,
-0.03253173828125,
-0.0528564453125,
0.0122833251953125,
0.0034923553466796875,
-0.0152587890625,
-0.0291748046875,
0.0278167724609375,
-0.01201629638671875,
0.01181793212890625,
-0.0042266845703125,
-0.034759521484375,
-0.022491455078125,
-0.0222625732421875,
0.019439697265625,
-0.00206756591796875,
-0.014892578125,
-0.01045989990234375,
0.00986480712890625,
0.021331787109375,
0.018524169921875,
0.001216888427734375,
-0.048248291015625,
0.0036373138427734375,
0.023651123046875,
-0.01084136962890625,
0.0125885009765625,
0.031005859375,
0.021514892578125,
-0.012542724609375,
-0.01104736328125,
-0.01611328125,
0.01184844970703125,
-0.0533447265625,
0.039337158203125,
0.00885009765625,
0.00164794921875,
0.050628662109375,
0.0095672607421875,
-0.0074005126953125,
0.03729248046875,
-0.0111846923828125,
-0.006771087646484375,
0.00485992431640625,
0.0160369873046875,
0.0279388427734375,
-0.01910400390625,
-0.0004603862762451172,
-0.014984130859375,
0.0108642578125,
-0.01471710205078125,
0.0196533203125,
-0.00017583370208740234,
-0.00418853759765625,
-0.00487518310546875,
-0.0400390625,
0.06036376953125,
-0.01158905029296875,
-0.01090240478515625,
0.00978851318359375,
-0.0032291412353515625,
-0.031524658203125,
-0.00876617431640625,
0.0128021240234375,
-0.010986328125,
0.0005178451538085938,
-0.018402099609375,
-0.0049591064453125,
-0.039642333984375,
-0.0159454345703125,
0.0360107421875,
-0.043609619140625,
-0.0144500732421875,
-0.0031642913818359375,
-0.0243682861328125,
-0.020233154296875,
0.00791168212890625,
-0.09991455078125,
-0.045074462890625,
0.0106658935546875,
-0.0005841255187988281,
-0.021759033203125,
-0.0131072998046875,
-0.0011072158813476562,
0.0082244873046875,
-0.0018014907836914062,
0.035064697265625,
0.01959228515625,
0.0139617919921875,
-0.0258331298828125,
-0.0190277099609375,
-0.016204833984375,
-0.0305633544921875,
-0.035980224609375,
-0.0304107666015625,
-0.0235595703125,
-0.042755126953125,
0.00821685791015625,
-0.0007052421569824219,
0.0257720947265625,
-0.01490020751953125,
0.00626373291015625,
-0.01434326171875,
0.0399169921875,
0.00888824462890625,
0.0762939453125,
-0.0261993408203125,
0.00337982177734375,
0.0262298583984375,
0.01145172119140625,
-0.003082275390625,
0.0144805908203125,
0.060272216796875,
-0.04425048828125,
0.035430908203125,
-0.046356201171875,
-0.051605224609375,
-0.0233306884765625,
-0.034271240234375,
0.03118896484375,
0.044586181640625,
-0.0088653564453125,
0.019500732421875,
-0.015625,
0.0034694671630859375,
-0.00798797607421875,
0.00952911376953125,
-0.022979736328125,
0.0084228515625,
0.034637451171875,
-0.0289154052734375,
0.0149383544921875,
0.01067352294921875,
0.023712158203125,
0.005096435546875,
-0.021636962890625,
0.00897216796875,
-0.00069427490234375,
-0.008026123046875,
0.040252685546875,
0.0421142578125,
0.00826263427734375,
0.0304718017578125,
0.006839752197265625,
0.00946044921875,
-0.005847930908203125,
0.029022216796875,
-0.039886474609375,
-0.044097900390625,
0.0037860870361328125,
0.006313323974609375,
-0.01200103759765625,
0.001434326171875,
-0.01654052734375,
0.00943756103515625,
0.054168701171875,
0.039306640625,
-0.081787109375,
0.00019824504852294922,
-0.0032196044921875,
-0.00724029541015625,
0.018310546875,
-0.0188140869140625,
0.00940704345703125,
-0.05902099609375,
0.08172607421875,
-0.03125,
0.00156402587890625,
0.01519775390625,
-0.05963134765625,
-0.0129852294921875,
0.006011962890625,
0.034912109375,
0.0198974609375,
-0.00974273681640625,
0.0018472671508789062,
-0.00284576416015625,
0.0212554931640625,
0.02587890625,
-0.022308349609375,
0.004840850830078125,
-0.05615234375,
-0.0758056640625,
-0.04058837890625,
-0.03778076171875,
-0.052154541015625,
0.06475830078125,
0.00007796287536621094,
-0.037994384765625,
0.041351318359375,
-0.0166473388671875,
0.01107025146484375,
0.01125335693359375,
-0.09613037109375,
-0.01480865478515625,
-0.021484375,
0.00458526611328125,
0.0760498046875,
-0.061248779296875,
0.035614013671875,
-0.007595062255859375,
0.00579071044921875,
-0.0162200927734375,
-0.035736083984375,
0.07794189453125,
-0.03240966796875,
-0.01087188720703125,
-0.0053863525390625,
0.01226806640625,
0.018402099609375,
-0.0474853515625,
0.024566650390625,
-0.0645751953125,
-0.007198333740234375,
-0.023681640625,
0.0099029541015625,
0.01141357421875,
-0.0238037109375,
-0.085205078125,
0.08984375,
-0.022918701171875,
0.066650390625,
0.017547607421875,
0.019256591796875,
-0.036834716796875,
-0.0328369140625,
-0.008758544921875,
-0.0020465850830078125,
-0.0266571044921875,
0.044891357421875,
-0.0240936279296875,
0.0036907196044921875,
0.00439453125,
0.03839111328125,
0.006359100341796875,
-0.01265716552734375,
0.051971435546875,
-0.0227813720703125,
0.0194549560546875,
0.03472900390625,
-0.00484466552734375,
-0.0291595458984375,
-0.029571533203125,
-0.01995849609375,
0.0009446144104003906,
-0.0164337158203125,
0.035064697265625,
0.0011568069458007812,
-0.03631591796875,
-0.014556884765625,
0.0241851806640625,
0.0411376953125,
-0.0156402587890625,
0.028717041015625,
0.032196044921875,
-0.0304718017578125,
-0.0089874267578125,
-0.034576416015625,
0.033050537109375,
0.031890869140625,
0.0277557373046875,
-0.01470184326171875,
0.056976318359375,
-0.040496826171875,
0.055755615234375,
-0.012664794921875,
0.0267486572265625,
0.0224456787109375,
0.01314544677734375,
0.02191162109375,
-0.0033740997314453125,
0.0209503173828125,
0.026763916015625,
-0.0294342041015625,
0.0177459716796875,
-0.0159149169921875,
0.025634765625,
-0.0704345703125,
-0.045928955078125,
0.01226806640625,
0.027191162109375,
-0.004413604736328125,
-0.039459228515625,
0.019195556640625,
0.034637451171875,
0.0196990966796875,
-0.0017032623291015625,
0.04449462890625,
-0.072265625,
-0.01393890380859375,
0.0166778564453125,
-0.015228271484375,
0.00829315185546875,
-0.0233306884765625,
0.027618408203125,
0.090576171875,
-0.00247955322265625,
-0.0011262893676757812,
-0.067138671875,
0.017608642578125,
0.02508544921875,
0.029876708984375,
0.0391845703125,
0.025390625,
0.06292724609375,
-0.007228851318359375,
-0.007175445556640625,
-0.008819580078125,
0.00860595703125,
0.0004508495330810547,
0.0247650146484375,
0.034210205078125,
-0.0145721435546875,
0.005641937255859375,
0.03265380859375,
0.0264739990234375,
0.04364013671875,
0.0433349609375,
0.02069091796875,
0.0017366409301757812,
0.0280303955078125,
0.0024051666259765625,
-0.015594482421875,
-0.046417236328125,
0.033538818359375,
0.0290985107421875,
0.0195770263671875,
-0.0048370361328125,
0.0236358642578125,
0.038787841796875,
-0.0171356201171875,
0.01812744140625,
-0.0010919570922851562,
-0.0131072998046875,
0.03424072265625,
0.00885772705078125,
-0.00946044921875,
0.0000032186508178710938,
-0.09002685546875,
-0.0099029541015625,
-0.00812530517578125,
-0.036285400390625,
0.006908416748046875,
0.0292816162109375,
-0.043548583984375,
0.044677734375,
-0.0014743804931640625,
-0.030487060546875,
-0.0298919677734375,
0.027435302734375,
0.0304107666015625,
-0.0271148681640625,
-0.01300811767578125,
-0.01247406005859375,
-0.038848876953125,
-0.0047760009765625,
-0.01727294921875,
0.0042266845703125,
0.0260009765625,
0.0709228515625,
-0.002338409423828125,
0.022186279296875,
0.0007681846618652344,
-0.03106689453125,
0.0213165283203125,
0.0019140243530273438,
-0.007167816162109375,
-0.0104217529296875,
-0.0172882080078125,
0.0023956298828125,
-0.04364013671875,
0.0767822265625,
-0.0017766952514648438,
0.033111572265625,
0.057220458984375,
-0.0104217529296875,
0.0034084320068359375,
0.01206207275390625,
-0.002872467041015625,
-0.038543701171875,
-0.03131103515625,
-0.0216217041015625,
-0.0036449432373046875,
0.00856781005859375,
-0.00005811452865600586,
-0.0009169578552246094,
0.02301025390625,
0.0335693359375,
-0.01200103759765625,
0.0189056396484375,
-0.010986328125,
0.005924224853515625,
0.023590087890625,
0.027252197265625,
-0.0211944580078125,
-0.027099609375,
-0.0187835693359375,
0.0018835067749023438,
-0.0075225830078125,
0.004009246826171875,
-0.007610321044921875,
-0.048858642578125,
-0.01328277587890625,
0.0106048583984375,
0.005741119384765625,
-0.0236358642578125,
-0.004261016845703125,
0.0023746490478515625,
-0.0069580078125,
-0.0051727294921875,
0.0267181396484375,
0.0266571044921875,
0.01325225830078125,
-0.043914794921875,
0.00812530517578125,
0.004405975341796875,
0.01335906982421875,
0.0240020751953125,
-0.02740478515625,
0.0394287109375,
0.01372528076171875,
-0.07281494140625,
0.03363037109375,
-0.025604248046875,
0.010772705078125,
-0.012237548828125,
0.01042938232421875,
-0.01715087890625,
-0.004730224609375,
0.00783538818359375,
-0.0283355712890625,
-0.040924072265625,
0.0521240234375,
-0.0256195068359375,
0.00382232666015625,
0.017852783203125,
-0.0135498046875,
-0.003986358642578125,
-0.0114593505859375,
0.0078887939453125,
0.040985107421875,
-0.0290679931640625,
-0.005645751953125,
0.00801849365234375,
0.0021152496337890625,
0.0021266937255859375,
-0.054931640625,
0.004177093505859375,
-0.063720703125,
-0.02105712890625,
-0.006015777587890625,
-0.01849365234375,
-0.019317626953125,
-0.055450439453125,
-0.11456298828125,
0.032745361328125,
-0.01451873779296875,
-0.03363037109375,
0.0192718505859375,
-0.0257720947265625,
-0.0174407958984375,
-0.01971435546875,
-0.0063934326171875,
-0.006740570068359375,
-0.006916046142578125,
0.040679931640625,
0.006862640380859375,
-0.0027408599853515625,
0.0181427001953125,
0.0198516845703125,
-0.0024814605712890625,
0.031524658203125,
0.0240020751953125,
-0.042755126953125,
-0.023223876953125,
0.0069732666015625,
0.031951904296875,
0.025115966796875,
-0.01451873779296875,
0.0305938720703125,
0.0249786376953125,
-0.030426025390625,
-0.0168609619140625,
-0.01442718505859375,
0.0012493133544921875,
0.021759033203125,
0.04498291015625,
0.05804443359375,
0.006420135498046875,
-0.06121826171875,
-0.0015459060668945312,
-0.019775390625,
-0.00016248226165771484,
0.007427215576171875,
-0.0019664764404296875,
-0.021209716796875,
0.0041656494140625,
0.00888824462890625,
0.045379638671875,
0.0084381103515625,
-0.061126708984375,
0.0200958251953125,
-0.04437255859375,
0.00582122802734375,
0.013336181640625,
0.0035152435302734375,
0.040679931640625,
0.030609130859375,
-0.0252532958984375,
0.040130615234375,
-0.0225372314453125,
-0.01036834716796875,
0.039520263671875,
-0.009002685546875,
-0.01548004150390625,
-0.0256195068359375,
0.02447509765625,
0.049835205078125,
-0.0092010498046875,
0.03143310546875,
-0.02117919921875,
-0.004974365234375,
-0.002422332763671875,
0.00919342041015625,
0.003681182861328125,
0.035552978515625,
-0.040985107421875,
0.0301055908203125,
0.0099945068359375,
-0.00360107421875,
-0.006504058837890625,
-0.010498046875,
-0.032135009765625,
0.032440185546875,
0.0222015380859375,
-0.022857666015625,
0.039825439453125,
-0.007579803466796875,
-0.0014848709106445312,
0.01136016845703125,
0.0174407958984375,
-0.0247039794921875,
-0.0200958251953125,
-0.057769775390625,
0.0005393028259277344,
-0.006427764892578125
]
|
a665f9689f6f931a10a6114cd58652c3b9006d78 | Wordpress Stackexchange
Q: Notice: Use of undefined constant SCRIPT_DEBUG I'm getting this error at the top of my wordpress site:
Notice: Use of undefined constant SCRIPT_DEBUG - assumed 'SCRIPT_DEBUG' in /[wordpress path]/wp-includes/formatting.php on line 4144
No idea where it came from, any ideas what started causing this?
Using version 4.2.1
A: This is a known bug
As far as I'm concerned, you can easily fix it by replacing
if ( SCRIPT_DEBUG ) {
with
if ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) {
That should suppress the error for now.
When Wordpress is updated again, this error may be overwritten, but I believe it will be fixed in the next update.
UPDATE
Fixed at build 32482.
| Q: Notice: Use of undefined constant SCRIPT_DEBUG I'm getting this error at the top of my wordpress site:
Notice: Use of undefined constant SCRIPT_DEBUG - assumed 'SCRIPT_DEBUG' in /[wordpress path]/wp-includes/formatting.php on line 4144
No idea where it came from, any ideas what started causing this?
Using version 4.2.1
A: This is a known bug
As far as I'm concerned, you can easily fix it by replacing
if ( SCRIPT_DEBUG ) {
with
if ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) {
That should suppress the error for now.
When Wordpress is updated again, this error may be overwritten, but I believe it will be fixed in the next update.
UPDATE
Fixed at build 32482.
A: If you don't wish to modify your core wordpress files to fix the issue, you can simply add the missing definition into your wp.config.php file.
Something like:
define('SCRIPT_DEBUG', true);
Would remove the error.
There is already a WP_DEBUG definition in there already so I would suggest putting it close to that.
| wordpress | {
"language": "en",
"length": 164,
"provenance": "stackexchange_00019.jsonl.gz:455110",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/185747"
} | [
0.051239013671875,
0.01068115234375,
-0.01018524169921875,
-0.04693603515625,
-0.0071258544921875,
-0.020782470703125,
-0.0005588531494140625,
-0.020599365234375,
0.043426513671875,
-0.00431060791015625,
-0.032623291015625,
-0.0175628662109375,
-0.0105133056640625,
-0.0207672119140625,
-0.0295562744140625,
-0.02777099609375,
0.0499267578125,
-0.00043702125549316406,
0.035888671875,
-0.00005501508712768555,
-0.01430511474609375,
0.03521728515625,
-0.0225677490234375,
0.10345458984375,
-0.029205322265625,
-0.0163421630859375,
0.1051025390625,
-0.002902984619140625,
-0.018096923828125,
-0.03192138671875,
0.00550079345703125,
0.01605224609375,
0.027618408203125,
0.028289794921875,
-0.036865234375,
0.0174102783203125,
0.034820556640625,
-0.00910186767578125,
0.01427459716796875,
0.02020263671875,
-0.0187835693359375,
0.0194854736328125,
0.047332763671875,
0.016815185546875,
-0.013580322265625,
-0.004207611083984375,
-0.0240478515625,
-0.019561767578125,
-0.01189422607421875,
-0.00008279085159301758,
0.00006902217864990234,
-0.0163421630859375,
0.004520416259765625,
0.029541015625,
-0.014923095703125,
-0.0080718994140625,
0.0244293212890625,
0.041107177734375,
0.018218994140625,
0.0170440673828125,
-0.03363037109375,
0.0330810546875,
-0.0093841552734375,
-0.0538330078125,
0.00909423828125,
-0.02008056640625,
-0.01180267333984375,
0.001163482666015625,
-0.0050506591796875,
0.029083251953125,
0.04443359375,
-0.0149383544921875,
-0.0036983489990234375,
0.0084381103515625,
0.006153106689453125,
-0.01654052734375,
0.00792694091796875,
0.0027980804443359375,
0.00986480712890625,
0.031402587890625,
-0.0079498291015625,
-0.0260467529296875,
-0.0191650390625,
0.0104827880859375,
-0.0222930908203125,
0.03338623046875,
-0.00771331787109375,
-0.00600433349609375,
-0.031829833984375,
-0.01480865478515625,
-0.0220947265625,
-0.0274200439453125,
-0.06268310546875,
-0.004505157470703125,
0.0222015380859375,
-0.05255126953125,
0.047149658203125,
0.095458984375,
-0.03033447265625,
-0.00600433349609375,
-0.031341552734375,
-0.019775390625,
-0.0176544189453125,
-0.03961181640625,
-0.0057373046875,
0.032318115234375,
-0.0029506683349609375,
0.00846099853515625,
0.0272979736328125,
0.03887939453125,
0.0115509033203125,
-0.02667236328125,
-0.002216339111328125,
-0.04949951171875,
-0.017425537109375,
0.05523681640625,
0.01361083984375,
-0.0011043548583984375,
0.0102386474609375,
0.00717926025390625,
0.016571044921875,
0.034423828125,
-0.035064697265625,
-0.031494140625,
-0.021514892578125,
-0.045501708984375,
-0.0204620361328125,
0.0128631591796875,
-0.00908660888671875,
0.0200347900390625,
-0.00034999847412109375,
0.005847930908203125,
0.031829833984375,
0.0184783935546875,
-0.029083251953125,
-0.034271240234375,
0.039215087890625,
-0.00914764404296875,
-0.0313720703125,
0.035125732421875,
-0.036407470703125,
-0.03997802734375,
-0.0069122314453125,
-0.048553466796875,
-0.03265380859375,
0.01253509521484375,
0.02813720703125,
0.00630950927734375,
-0.0142974853515625,
-0.05072021484375,
-0.0025539398193359375,
0.0079498291015625,
0.03082275390625,
-0.00585174560546875,
-0.0116729736328125,
-0.0204925537109375,
0.01062774658203125,
-0.03460693359375,
-0.0203094482421875,
-0.04461669921875,
-0.0189666748046875,
-0.01244354248046875,
-0.006389617919921875,
-0.061431884765625,
-0.0567626953125,
-0.002681732177734375,
-0.004749298095703125,
-0.004047393798828125,
0.0347900390625,
-0.0003197193145751953,
0.0086669921875,
-0.0199737548828125,
0.038543701171875,
0.0140380859375,
-0.005092620849609375,
0.038604736328125,
-0.0180206298828125,
0.034942626953125,
0.02685546875,
-0.010986328125,
-0.0001176595687866211,
-0.019927978515625,
0.060577392578125,
-0.002544403076171875,
-0.04156494140625,
0.01111602783203125,
0.00496673583984375,
0.0279083251953125,
0.007465362548828125,
-0.0010662078857421875,
0.055023193359375,
0.027435302734375,
-0.00443267822265625,
0.0158843994140625,
-0.0002810955047607422,
-0.034454345703125,
-0.038909912109375,
-0.0191650390625,
-0.024566650390625,
0.008636474609375,
-0.01493072509765625,
0.019744873046875,
-0.00975799560546875,
-0.007282257080078125,
-0.049652099609375,
-0.017303466796875,
-0.0215911865234375,
0.035430908203125,
-0.0045928955078125,
-0.0408935546875,
0.00574493408203125,
-0.01488494873046875,
-0.0002791881561279297,
-0.00994873046875,
-0.05084228515625,
0.036102294921875,
-0.02191162109375,
0.086669921875,
0.02447509765625,
0.038848876953125,
0.0140380859375,
-0.047576904296875,
0.0253448486328125,
-0.0284271240234375,
0.028778076171875,
0.006687164306640625,
-0.0166015625,
-0.0114593505859375,
0.049896240234375,
0.002105712890625,
0.04510498046875,
0.031402587890625,
-0.03472900390625,
-0.00232696533203125,
-0.02191162109375,
-0.020355224609375,
-0.032867431640625,
-0.02496337890625,
0.026702880859375,
0.04742431640625,
0.0638427734375,
0.043701171875,
-0.0029697418212890625,
-0.040252685546875,
0.0283355712890625,
-0.087158203125,
0.0032176971435546875,
-0.0302734375,
-0.00040841102600097656,
0.0216522216796875,
-0.0087432861328125,
-0.02337646484375,
0.03558349609375,
-0.0263824462890625,
-0.02130126953125,
0.06182861328125,
0.01224517822265625,
0.004322052001953125,
-0.0243072509765625,
-0.01386260986328125,
0.007778167724609375,
-0.041351318359375,
-0.048126220703125,
0.00388336181640625,
0.0113067626953125,
-0.0004429817199707031,
0.024749755859375,
0.0267181396484375,
-0.0081787109375,
-0.005863189697265625,
0.01465606689453125,
0.001201629638671875,
-0.02178955078125,
-0.00789642333984375,
-0.01499176025390625,
0.053924560546875,
-0.049652099609375,
0.03314208984375,
-0.00511932373046875,
-0.00023865699768066406,
-0.0421142578125,
0.0179595947265625,
-0.0298919677734375,
-0.01904296875,
-0.0218658447265625,
-0.03375244140625,
0.005725860595703125,
-0.033111572265625,
0.046844482421875,
-0.045196533203125,
0.007686614990234375,
-0.0238800048828125,
-0.038909912109375,
0.051788330078125,
0.0006618499755859375,
-0.08477783203125,
0.039276123046875,
0.004730224609375,
-0.00750732421875,
0.015472412109375,
0.0498046875,
0.05474853515625,
-0.0118865966796875,
0.0233154296875,
0.007625579833984375,
0.070068359375,
0.0143280029296875,
0.01336669921875,
0.0189361572265625,
0.00897216796875,
-0.0294036865234375,
-0.0090789794921875,
0.024078369140625,
0.044586181640625,
-0.019134521484375,
-0.05511474609375,
-0.0237274169921875,
0.01441192626953125,
-0.1405029296875,
-0.1435546875,
-0.01678466796875,
-0.089599609375,
0.0169525146484375,
-0.0164642333984375,
-0.0428466796875,
-0.01329803466796875,
0.033966064453125,
0.016357421875,
-0.03619384765625,
0.01215362548828125,
-0.055511474609375,
-0.053985595703125,
-0.0621337890625,
-0.00928497314453125,
-0.0191192626953125,
0.0253143310546875,
-0.00665283203125,
0.00536346435546875,
-0.007518768310546875,
-0.01548004150390625,
-0.0004992485046386719,
-0.02386474609375,
-0.0077972412109375,
-0.03533935546875,
-0.0009984970092773438,
-0.006816864013671875,
-0.016998291015625,
0.0168609619140625,
-0.04217529296875,
-0.01100921630859375,
0.005031585693359375,
-0.0380859375,
-0.01554107666015625,
-0.057525634765625,
-0.025146484375,
0.035400390625,
0.01392364501953125,
-0.049041748046875,
0.0133056640625,
-0.07269287109375,
-0.0015821456909179688,
0.00998687744140625,
-0.035919189453125,
0.00852203369140625,
0.005413055419921875,
-0.042755126953125,
0.0186004638671875,
-0.019012451171875,
0.04266357421875,
0.0277557373046875,
-0.026275634765625,
0.017608642578125,
0.08477783203125,
-0.0033245086669921875,
0.0229339599609375,
-0.02996826171875,
0.03179931640625,
-0.021209716796875,
-0.0017652511596679688,
0.0034427642822265625,
0.024017333984375,
0.0283355712890625,
-0.0252838134765625,
0.0034809112548828125,
0.0234375,
0.023681640625,
-0.0236358642578125,
0.00478363037109375,
0.0045013427734375,
0.00960540771484375,
-0.02545166015625,
0.0182647705078125,
0.01459503173828125,
-0.00010991096496582031,
-0.024658203125,
-0.01197052001953125,
-0.0238494873046875,
-0.0020351409912109375,
-0.03460693359375,
0.01065826416015625,
-0.02630615234375,
-0.0081634521484375,
-0.0130615234375,
-0.018768310546875,
-0.035430908203125,
0.030303955078125,
-0.0255126953125,
-0.01605224609375,
0.040313720703125,
-0.102294921875,
0.0360107421875,
0.0299835205078125,
0.007701873779296875,
-0.01451873779296875,
-0.03485107421875,
-0.0567626953125,
-0.06085205078125,
-0.0041961669921875,
-0.072509765625,
0.0675048828125,
0.038055419921875,
-0.0173797607421875,
-0.00919342041015625,
0.0230712890625,
-0.010528564453125,
0.00786590576171875,
-0.0164947509765625,
0.004161834716796875,
-0.0199127197265625,
0.022918701171875,
0.0002416372299194336,
0.000942230224609375,
-0.006641387939453125,
0.0036468505859375,
-0.054046630859375,
0.018280029296875,
0.01271820068359375,
0.0298614501953125,
0.061614990234375,
-0.033172607421875,
-0.0115509033203125,
-0.0003981590270996094,
0.05322265625,
0.06378173828125,
0.00847625732421875,
0.0304107666015625,
-0.035858154296875,
-0.0007991790771484375,
0.0210418701171875,
-0.0235137939453125,
-0.022186279296875,
0.0183258056640625,
0.04486083984375,
0.03289794921875,
-0.0156707763671875,
0.018524169921875,
0.0140380859375,
0.03448486328125,
-0.037353515625,
0.053314208984375,
0.030914306640625,
-0.0186920166015625,
0.036895751953125,
0.0013828277587890625,
0.00623321533203125,
0.00589752197265625,
-0.01378631591796875,
-0.0014591217041015625,
-0.060028076171875,
0.03741455078125,
0.0014562606811523438,
-0.001399993896484375,
-0.004673004150390625,
-0.0107269287109375,
0.0186614990234375,
0.00603485107421875,
-0.00966644287109375,
0.007633209228515625,
-0.006855010986328125,
-0.005756378173828125,
-0.046783447265625,
0.0131072998046875,
-0.005779266357421875,
0.04119873046875,
0.0014066696166992188,
0.0161895751953125,
0.0246429443359375,
0.041961669921875,
0.00044155120849609375,
0.0297088623046875,
0.022064208984375,
0.006290435791015625,
0.059783935546875,
0.00682830810546875,
0.02435302734375,
-0.016876220703125,
-0.0205230712890625,
0.070068359375,
0.007564544677734375,
-0.07861328125,
0.050079345703125,
-0.002147674560546875,
0.0296783447265625,
-0.0024700164794921875,
0.032958984375,
0.025970458984375,
-0.01389312744140625,
-0.0011730194091796875,
0.0121307373046875,
0.00450897216796875,
-0.00406646728515625,
-0.0154266357421875,
0.042724609375,
-0.0020503997802734375,
-0.01446533203125,
0.02099609375,
-0.0036678314208984375,
0.005420684814453125,
0.01062774658203125,
-0.0105133056640625,
-0.033447265625,
-0.03546142578125,
0.07598876953125,
0.00771331787109375,
-0.061767578125,
0.002758026123046875,
0.0682373046875,
0.040069580078125,
-0.04248046875,
0.013427734375,
0.0035858154296875,
0.03155517578125,
-0.037109375,
-0.05865478515625,
0.0623779296875,
-0.0206451416015625,
-0.003200531005859375,
-0.00353240966796875,
-0.032073974609375,
-0.0249176025390625,
-0.0201416015625,
-0.025909423828125,
0.004314422607421875,
-0.00804901123046875,
0.008331298828125,
-0.004825592041015625,
0.01373291015625,
0.0384521484375,
-0.031494140625,
-0.01372528076171875,
0.01409149169921875,
0.0230255126953125,
0.0121002197265625,
-0.01055908203125,
0.0003314018249511719,
-0.03564453125,
-0.0109405517578125,
-0.0202789306640625,
-0.0211029052734375,
0.045013427734375,
-0.00814056396484375,
-0.0219879150390625,
-0.011688232421875,
-0.01029205322265625,
0.04473876953125,
0.004878997802734375,
0.056243896484375,
0.00186920166015625,
-0.0194549560546875,
-0.01904296875,
-0.0426025390625,
-0.04449462890625,
-0.038909912109375,
-0.0034656524658203125,
-0.039093017578125,
0.01235198974609375,
-0.0180816650390625,
0.0231475830078125,
-0.015777587890625,
0.0217437744140625,
-0.05657958984375,
0.034393310546875,
0.01097869873046875,
0.0689697265625,
-0.01392364501953125,
0.052947998046875,
-0.0001723766326904297,
-0.0127410888671875,
0.0081939697265625,
0.04052734375,
0.0119476318359375,
-0.0109100341796875,
0.028411865234375,
0.0026531219482421875,
-0.024383544921875,
-0.029266357421875,
0.02587890625,
-0.03228759765625,
0.025970458984375,
-0.024139404296875,
0.018463134765625,
0.0062255859375,
0.0079803466796875,
-0.017425537109375,
-0.0285491943359375,
0.0173797607421875,
0.00759124755859375,
-0.010101318359375,
-0.0201873779296875,
0.0120391845703125,
0.0018701553344726562,
-0.00563812255859375,
0.02093505859375,
-0.006561279296875,
0.0308837890625,
-0.00868988037109375,
-0.02227783203125,
0.0662841796875,
0.0692138671875,
-0.046783447265625,
0.0252532958984375,
0.040557861328125,
-0.034332275390625,
0.0138702392578125,
0.0289764404296875,
-0.029327392578125,
-0.06549072265625,
0.032684326171875,
0.01180267333984375,
0.00833892822265625,
0.026763916015625,
-0.007110595703125,
0.0123138427734375,
0.030670166015625,
0.05908203125,
-0.038787841796875,
0.004650115966796875,
0.01751708984375,
-0.025054931640625,
-0.01715087890625,
-0.019989013671875,
0.0273590087890625,
0.00618743896484375,
0.018463134765625,
-0.0188751220703125,
-0.019622802734375,
0.01308441162109375,
-0.034576416015625,
0.00284576416015625,
-0.0210113525390625,
0.033599853515625,
0.021484375,
-0.0298309326171875,
0.031829833984375,
0.0171356201171875,
0.021942138671875,
-0.0004916191101074219,
0.01708984375,
0.00626373291015625,
-0.0408935546875,
-0.049560546875,
0.00299835205078125,
-0.00411224365234375,
-0.0374755859375,
-0.0261383056640625,
0.01264190673828125,
-0.0010967254638671875,
0.034332275390625,
-0.006397247314453125,
-0.01531219482421875,
0.0137481689453125,
0.0054168701171875,
0.056549072265625,
-0.020843505859375,
0.06396484375,
0.031768798828125,
-0.1163330078125,
0.0002770423889160156,
-0.0289764404296875,
-0.007305145263671875,
-0.004253387451171875,
0.0196380615234375,
0.06988525390625,
-0.0261383056640625,
-0.0224151611328125,
0.029388427734375,
0.014923095703125,
-0.017913818359375,
-0.0269012451171875,
0.04803466796875,
-0.0770263671875,
-0.02850341796875,
0.002410888671875,
-0.0140380859375,
-0.043304443359375,
-0.024383544921875,
0.001850128173828125,
0.05548095703125,
-0.044464111328125,
-0.00894927978515625,
0.0445556640625,
0.0265960693359375,
-0.007091522216796875,
0.025390625,
0.005611419677734375,
0.06005859375,
-0.0244903564453125,
0.0556640625,
-0.0224761962890625,
-0.01042938232421875,
0.04229736328125,
0.0631103515625,
0.013397216796875,
-0.0030651092529296875,
0.018829345703125,
0.0092315673828125,
0.042083740234375,
0.014434814453125,
-0.0025272369384765625,
0.005359649658203125,
-0.01317596435546875,
-0.01043701171875,
-0.0225830078125,
-0.005657196044921875,
0.036956787109375,
-0.053253173828125,
-0.038116455078125,
0.005542755126953125,
0.005035400390625,
-0.023284912109375,
0.04486083984375,
-0.01641845703125,
-0.033782958984375,
0.04339599609375,
0.00568389892578125,
0.058746337890625,
-0.01397705078125,
0.0236358642578125,
-0.007579803466796875,
-0.037811279296875,
-0.0460205078125,
-0.0205535888671875,
0.0190887451171875,
-0.0072021484375,
-0.03936767578125,
0.0433349609375,
0.0318603515625,
-0.0026760101318359375,
-0.0228271484375,
-0.01296234130859375,
0.016357421875,
-0.016204833984375,
0.0213165283203125,
0.0294647216796875,
0.030914306640625,
0.016143798828125,
0.0460205078125,
0.00991058349609375,
0.013336181640625,
-0.03839111328125,
-0.01290130615234375,
0.00815582275390625,
-0.00539398193359375,
0.000033915042877197266,
-0.01436614990234375,
-0.0005650520324707031,
0.0031280517578125,
0.0015687942504882812,
-0.0193328857421875,
-0.0206756591796875,
0.02374267578125,
-0.0138092041015625,
0.022491455078125,
0.0467529296875,
0.01334381103515625,
-0.0098876953125,
-0.040252685546875,
-0.01287841796875,
-0.00937652587890625,
0.08673095703125,
0.07415771484375,
0.00806427001953125,
-0.05535888671875,
-0.05291748046875,
-0.0230865478515625,
0.023468017578125,
-0.0027484893798828125,
0.020599365234375,
-0.00659942626953125,
-0.007747650146484375,
-0.01190185546875,
0.01551055908203125,
-0.0095977783203125,
-0.00431060791015625,
0.01081085205078125,
-0.01178741455078125,
-0.06341552734375,
-0.00860595703125,
0.01690673828125,
-0.048095703125,
-0.021820068359375,
-0.0174713134765625,
-0.000003993511199951172,
0.02978515625,
0.0183868408203125,
0.0046844482421875,
0.05157470703125,
0.01296234130859375,
-0.00653076171875,
-0.031402587890625,
0.013336181640625,
-0.0338134765625,
0.037445068359375,
0.0229949951171875,
0.0162811279296875,
0.028533935546875,
0.010528564453125,
0.01568603515625,
-0.022430419921875,
-0.030181884765625,
-0.002132415771484375,
0.049560546875,
0.03271484375,
-0.0297088623046875,
0.01357269287109375,
0.00087738037109375,
-0.00168609619140625,
-0.0030384063720703125,
0.01508331298828125,
-0.000012874603271484375,
0.0156402587890625,
0.003147125244140625,
-0.00492095947265625,
-0.0117034912109375,
0.01232147216796875,
0.0296783447265625,
0.034515380859375,
0.0517578125,
-0.01611328125,
0.01105499267578125,
0.0203857421875,
0.0139007568359375,
-0.0092926025390625,
-0.0008411407470703125,
0.00933837890625,
-0.022186279296875,
-0.0028285980224609375,
-0.014892578125,
-0.08489990234375,
0.07623291015625,
0.0013017654418945312,
0.03363037109375,
0.05303955078125,
0.0338134765625,
-0.0080108642578125,
0.004833221435546875,
0.034576416015625,
-0.01099395751953125,
-0.024993896484375,
0.054931640625,
0.0601806640625,
-0.0115814208984375,
0.00872802734375,
-0.035552978515625,
0.0035247802734375,
0.0224456787109375,
-0.0040283203125,
0.00469207763671875,
0.0135650634765625,
-0.017608642578125,
0.00015544891357421875,
0.0250244140625,
-0.0160980224609375,
-0.02691650390625,
-0.01276397705078125,
-0.003173828125,
0.004261016845703125,
0.0308380126953125,
-0.0193328857421875,
0.06768798828125,
0.0024700164794921875,
0.041351318359375,
0.006084442138671875,
-0.03631591796875,
0.01165008544921875,
0.02325439453125,
-0.005542755126953125,
0.0019683837890625,
-0.0010328292846679688,
0.005157470703125,
0.01190948486328125,
-0.02764892578125,
0.00955963134765625,
0.0105438232421875,
0.004650115966796875,
0.012664794921875,
0.01465606689453125,
0.0474853515625,
-0.0012254714965820312,
-0.03466796875,
0.0426025390625,
-0.07073974609375,
0.01727294921875,
0.00506591796875,
0.01218414306640625,
0.010833740234375,
0.01076507568359375,
-0.033416748046875,
-0.028961181640625,
-0.002712249755859375,
0.0335693359375,
0.0036773681640625,
0.0565185546875,
0.0806884765625,
-0.02740478515625,
-0.01377105712890625,
0.04644775390625,
0.022796630859375,
0.10333251953125,
-0.064208984375,
-0.0207061767578125,
0.0077056884765625,
0.0187835693359375,
-0.0006809234619140625,
-0.058807373046875,
-0.011932373046875,
-0.050048828125,
0.004245758056640625,
0.00798797607421875,
-0.01268768310546875,
0.0021572113037109375,
-0.056243896484375,
-0.10882568359375,
0.02398681640625,
0.002712249755859375,
-0.052001953125,
-0.061676025390625,
-0.0022945404052734375,
-0.0024890899658203125,
0.037353515625,
-0.00412750244140625,
-0.044891357421875,
-0.030120849609375,
0.04315185546875,
0.006744384765625,
-0.03228759765625,
0.0635986328125,
-0.0367431640625,
-0.052825927734375,
-0.0262451171875,
-0.022003173828125,
-0.0135040283203125,
0.00917816162109375,
-0.030670166015625,
0.046539306640625,
0.0265045166015625,
-0.0129852294921875,
-0.02471923828125,
0.0231781005859375,
-0.06781005859375,
0.0037555694580078125,
0.01389312744140625,
-0.02911376953125,
0.0161895751953125,
0.0750732421875,
0.04705810546875,
0.0275726318359375,
-0.050933837890625,
-0.0113525390625,
-0.0439453125,
-0.03350830078125,
-0.0186920166015625,
0.01959228515625,
-0.05584716796875,
0.003208160400390625,
0.010009765625,
0.004482269287109375,
-0.03265380859375,
-0.0120849609375,
-0.02423095703125,
-0.0181121826171875,
-0.0019779205322265625,
0.01403045654296875,
0.02239990234375,
-0.03131103515625,
0.011138916015625,
0.005878448486328125,
0.0362548828125,
-0.00923919677734375,
0.0305633544921875,
0.031829833984375,
0.06365966796875,
0.0061492919921875,
0.01160430908203125,
-0.0322265625,
-0.005374908447265625,
0.00954437255859375,
0.07928466796875,
-0.01190948486328125,
-0.037841796875,
-0.00296783447265625,
0.020660400390625,
-0.005702972412109375,
0.0003097057342529297,
0.003925323486328125,
0.044403076171875,
-0.0022182464599609375,
0.06378173828125,
-0.01067352294921875,
0.05352783203125,
-0.024200439453125,
0.05426025390625,
0.00885772705078125,
-0.01332855224609375,
0.0201416015625,
0.01052093505859375,
0.0004987716674804688,
0.05517578125,
-0.01204681396484375,
-0.046417236328125,
0.037109375,
0.0283355712890625,
0.046112060546875,
0.00849151611328125
]
|
d53b0082524eec42194c1079ed39a706e86eb6c7 | Wordpress Stackexchange
Q: is it possible to get the hook name in add_action? given this:
<?php add_action( $hook, $function_to_add, $priority, $accepted_args ); ?>
Is there a way to get $hook value inside the function $function_to_add?
A: The name of the current hook is always current_filter(). Despite its name, this function returns the name of actions too.
Usage example: Move the textarea in a comment form.
The current priority is: key( $GLOBALS['wp_filter'][ $hook ] ).
| Q: is it possible to get the hook name in add_action? given this:
<?php add_action( $hook, $function_to_add, $priority, $accepted_args ); ?>
Is there a way to get $hook value inside the function $function_to_add?
A: The name of the current hook is always current_filter(). Despite its name, this function returns the name of actions too.
Usage example: Move the textarea in a comment form.
The current priority is: key( $GLOBALS['wp_filter'][ $hook ] ).
| wordpress | {
"language": "en",
"length": 72,
"provenance": "stackexchange_00019.jsonl.gz:455116",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/185773"
} | [
0.006000518798828125,
0.0088958740234375,
-0.0589599609375,
-0.021697998046875,
0.0159149169921875,
-0.03802490234375,
0.0330810546875,
0.0299835205078125,
0.00284576416015625,
0.01172637939453125,
0.00012695789337158203,
-0.002552032470703125,
0.002643585205078125,
-0.04730224609375,
-0.0006885528564453125,
-0.004497528076171875,
0.045867919921875,
-0.03466796875,
0.0066986083984375,
-0.004367828369140625,
0.00514984130859375,
0.022247314453125,
0.0156707763671875,
0.07879638671875,
0.035400390625,
-0.06695556640625,
0.04742431640625,
-0.00635528564453125,
0.04022216796875,
0.0112762451171875,
0.0194854736328125,
-0.022491455078125,
0.005901336669921875,
0.033416748046875,
0.0028362274169921875,
0.02740478515625,
0.046051025390625,
-0.004497528076171875,
0.02435302734375,
0.04052734375,
0.053741455078125,
-0.0224609375,
-0.043304443359375,
0.00998687744140625,
-0.033416748046875,
-0.06866455078125,
0.07305908203125,
0.01065826416015625,
0.017608642578125,
0.0068511962890625,
0.0260009765625,
0.045074462890625,
0.0279388427734375,
-0.00994110107421875,
0.00341033935546875,
0.02117919921875,
-0.043487548828125,
0.0309295654296875,
0.029632568359375,
0.0413818359375,
-0.0119781494140625,
-0.0161895751953125,
0.0048065185546875,
-0.058380126953125,
0.028289794921875,
0.00901031494140625,
0.036590576171875,
0.0137939453125,
-0.0012969970703125,
0.029876708984375,
0.0085906982421875,
-0.015655517578125,
-0.0157012939453125,
0.0225677490234375,
-0.0115203857421875,
-0.06475830078125,
0.029327392578125,
-0.0574951171875,
0.00545501708984375,
0.049591064453125,
0.004474639892578125,
-0.04315185546875,
-0.048492431640625,
0.034423828125,
-0.03216552734375,
0.026641845703125,
-0.00939178466796875,
-0.00035834312438964844,
-0.0020294189453125,
-0.03631591796875,
-0.01378631591796875,
-0.01224517822265625,
-0.019683837890625,
-0.00847625732421875,
-0.005748748779296875,
-0.03619384765625,
0.027618408203125,
0.02032470703125,
-0.01495361328125,
0.0024852752685546875,
0.021759033203125,
-0.04327392578125,
0.038543701171875,
-0.031463623046875,
-0.0148773193359375,
0.0377197265625,
0.0172882080078125,
0.017608642578125,
-0.004360198974609375,
-0.0023040771484375,
-0.0198516845703125,
-0.054718017578125,
0.01837158203125,
0.006500244140625,
-0.00933074951171875,
-0.01044464111328125,
-0.022491455078125,
0.03619384765625,
-0.0034999847412109375,
0.0267791748046875,
0.00852203369140625,
0.002475738525390625,
0.0015869140625,
-0.007328033447265625,
0.033599853515625,
0.0113372802734375,
-0.0292816162109375,
0.005275726318359375,
0.008636474609375,
0.01611328125,
0.004901885986328125,
0.0121917724609375,
0.0186920166015625,
-0.00650787353515625,
-0.032470703125,
-0.006572723388671875,
0.01922607421875,
-0.018341064453125,
0.003894805908203125,
0.01134490966796875,
-0.002410888671875,
-0.03558349609375,
-0.0149688720703125,
-0.0009312629699707031,
0.037933349609375,
-0.009735107421875,
-0.010223388671875,
0.0222625732421875,
0.029449462890625,
0.01253509521484375,
0.03875732421875,
-0.06414794921875,
-0.0036468505859375,
0.0186004638671875,
0.02374267578125,
0.033599853515625,
0.01336669921875,
-0.004894256591796875,
-0.005146026611328125,
0.01434326171875,
0.027008056640625,
-0.021484375,
-0.035186767578125,
-0.01073455810546875,
-0.050689697265625,
0.00777435302734375,
-0.0009436607360839844,
0.00612640380859375,
-0.00634002685546875,
0.0032863616943359375,
-0.0088653564453125,
0.046112060546875,
0.022186279296875,
-0.01470184326171875,
-0.00960540771484375,
-0.038970947265625,
-0.025787353515625,
0.01983642578125,
0.022918701171875,
0.0052490234375,
-0.0147552490234375,
-0.032012939453125,
0.02276611328125,
-0.007205963134765625,
-0.043548583984375,
0.0394287109375,
0.022491455078125,
0.049774169921875,
-0.003936767578125,
-0.00044035911560058594,
0.054779052734375,
0.0308837890625,
-0.040069580078125,
-0.0164642333984375,
-0.00989532470703125,
0.00788116455078125,
0.010101318359375,
0.004459381103515625,
-0.01149749755859375,
0.0128631591796875,
0.031005859375,
0.006633758544921875,
0.00801849365234375,
-0.014678955078125,
-0.050445556640625,
0.00444793701171875,
-0.0139007568359375,
0.037628173828125,
-0.0018138885498046875,
-0.0160675048828125,
0.010467529296875,
-0.02630615234375,
-0.0026302337646484375,
-0.0217437744140625,
-0.0330810546875,
0.05096435546875,
-0.055572509765625,
0.01493072509765625,
0.00627899169921875,
0.05224609375,
-0.003459930419921875,
0.0014200210571289062,
-0.0192413330078125,
-0.056610107421875,
-0.0061187744140625,
-0.002521514892578125,
-0.044342041015625,
-0.01320648193359375,
-0.042022705078125,
-0.003902435302734375,
-0.047698974609375,
0.0518798828125,
-0.0215911865234375,
0.0421142578125,
0.00797271728515625,
-0.01444244384765625,
-0.007293701171875,
-0.0859375,
0.03143310546875,
0.043212890625,
0.032928466796875,
0.058624267578125,
0.0352783203125,
0.034088134765625,
0.057891845703125,
-0.026641845703125,
0.0262603759765625,
-0.01493072509765625,
0.029815673828125,
0.0782470703125,
-0.00501251220703125,
0.0018520355224609375,
-0.01186370849609375,
-0.04034423828125,
0.0083465576171875,
0.0159454345703125,
-0.020263671875,
-0.036773681640625,
-0.015045166015625,
0.00514984130859375,
0.016571044921875,
-0.059722900390625,
-0.04547119140625,
-0.0098724365234375,
0.01788330078125,
-0.01352691650390625,
0.0214691162109375,
0.01898193359375,
0.0018672943115234375,
-0.0184326171875,
0.0225372314453125,
0.00568389892578125,
-0.01082611083984375,
0.0153350830078125,
0.044464111328125,
-0.032012939453125,
-0.00909423828125,
-0.01070404052734375,
-0.030792236328125,
-0.0063018798828125,
-0.0091094970703125,
0.0462646484375,
0.0175018310546875,
-0.02117919921875,
-0.0249786376953125,
-0.034027099609375,
0.0127105712890625,
-0.0126495361328125,
0.0204010009765625,
0.004116058349609375,
0.023529052734375,
0.01438140869140625,
-0.0281219482421875,
0.0462646484375,
0.0040435791015625,
-0.0211944580078125,
-0.007472991943359375,
0.00795745849609375,
0.01222991943359375,
-0.007534027099609375,
0.01093292236328125,
0.047149658203125,
-0.014984130859375,
0.01331329345703125,
0.004119873046875,
-0.053558349609375,
-0.004566192626953125,
-0.0179901123046875,
-0.020355224609375,
0.0162506103515625,
-0.0648193359375,
0.055908203125,
0.014984130859375,
0.0955810546875,
-0.0716552734375,
-0.07061767578125,
-0.035797119140625,
-0.002532958984375,
-0.08367919921875,
-0.05328369140625,
-0.01541900634765625,
-0.04608154296875,
0.006824493408203125,
-0.0087738037109375,
-0.02099609375,
-0.021392822265625,
0.0272216796875,
0.01226043701171875,
-0.038482666015625,
-0.01235198974609375,
-0.02569580078125,
-0.0298004150390625,
-0.03399658203125,
0.0517578125,
0.00200653076171875,
0.020233154296875,
0.00711822509765625,
0.079345703125,
0.0259552001953125,
-0.01374053955078125,
0.032623291015625,
-0.0277557373046875,
-0.0243682861328125,
0.004486083984375,
-0.01004791259765625,
-0.009521484375,
0.027099609375,
-0.005741119384765625,
-0.020355224609375,
0.0340576171875,
-0.0037021636962890625,
-0.004116058349609375,
-0.0107269287109375,
-0.0147552490234375,
0.0060882568359375,
0.08856201171875,
0.0182342529296875,
-0.0252532958984375,
0.0570068359375,
-0.048919677734375,
0.0322265625,
-0.0033416748046875,
0.0021915435791015625,
0.01328277587890625,
-0.01198577880859375,
-0.028106689453125,
0.0226287841796875,
-0.009124755859375,
-0.01027679443359375,
0.02642822265625,
-0.0051116943359375,
0.009124755859375,
0.007129669189453125,
-0.00995635986328125,
-0.0133209228515625,
0.01097869873046875,
0.0027103424072265625,
-0.0050048828125,
0.05523681640625,
0.0171051025390625,
0.041107177734375,
0.00418853759765625,
0.0256195068359375,
-0.024566650390625,
-0.036041259765625,
0.020843505859375,
-0.03485107421875,
0.0215301513671875,
-0.038787841796875,
-0.0173187255859375,
-0.022216796875,
0.07080078125,
-0.02685546875,
-0.039306640625,
-0.01119232177734375,
0.0186767578125,
-0.03741455078125,
-0.033416748046875,
0.017608642578125,
-0.0214385986328125,
-0.0997314453125,
0.012542724609375,
-0.010162353515625,
-0.029937744140625,
-0.007709503173828125,
0.028717041015625,
-0.062347412109375,
-0.0306549072265625,
0.03955078125,
-0.0712890625,
0.02435302734375,
0.056610107421875,
-0.020263671875,
0.048004150390625,
-0.04718017578125,
-0.0396728515625,
-0.033447265625,
-0.0048370361328125,
-0.033172607421875,
0.039459228515625,
0.0240478515625,
-0.019287109375,
-0.004669189453125,
0.019500732421875,
0.0166778564453125,
0.030853271484375,
0.00794219970703125,
-0.005260467529296875,
0.0302581787109375,
-0.0208587646484375,
-0.0038394927978515625,
-0.02545166015625,
-0.005855560302734375,
-0.0189971923828125,
-0.0290985107421875,
-0.0124664306640625,
-0.029083251953125,
-0.01776123046875,
-0.00162506103515625,
-0.0322265625,
-0.08795166015625,
-0.03717041015625,
0.0279693603515625,
0.03375244140625,
-0.01491546630859375,
0.041259765625,
-0.0220794677734375,
-0.07489013671875,
0.041015625,
-0.03509521484375,
-0.0220489501953125,
-0.001628875732421875,
0.1123046875,
0.0267791748046875,
0.004734039306640625,
-0.02435302734375,
-0.00528717041015625,
0.0372314453125,
-0.022216796875,
0.034088134765625,
0.007415771484375,
-0.0200958251953125,
0.047027587890625,
0.007080078125,
0.03253173828125,
-0.0347900390625,
0.035186767578125,
0.026031494140625,
0.036956787109375,
-0.01271820068359375,
0.0272369384765625,
0.0003504753112792969,
-0.032501220703125,
-0.064208984375,
-0.004039764404296875,
-0.0016469955444335938,
0.047515869140625,
-0.06500244140625,
0.1358642578125,
-0.007785797119140625,
-0.006183624267578125,
-0.004009246826171875,
0.0155487060546875,
0.0269012451171875,
0.0290374755859375,
0.004116058349609375,
-0.007251739501953125,
0.00200653076171875,
0.022308349609375,
-0.0017614364624023438,
-0.015899658203125,
0.0049591064453125,
0.049835205078125,
-0.0173492431640625,
0.0252838134765625,
0.01532745361328125,
-0.0066375732421875,
0.045318603515625,
-0.01483917236328125,
-0.04852294921875,
-0.0005121231079101562,
-0.0201263427734375,
0.005340576171875,
0.0234527587890625,
-0.0106353759765625,
-0.0010519027709960938,
0.05975341796875,
-0.009613037109375,
0.01461029052734375,
0.01116943359375,
0.03753662109375,
-0.00641632080078125,
0.0113372802734375,
0.003368377685546875,
-0.00931549072265625,
0.0263671875,
0.043304443359375,
0.0100250244140625,
0.02728271484375,
-0.028961181640625,
-0.0055389404296875,
-0.02001953125,
0.005672454833984375,
0.02239990234375,
0.01186370849609375,
-0.0026264190673828125,
-0.003204345703125,
0.0161285400390625,
-0.00980377197265625,
-0.00670623779296875,
0.0068511962890625,
0.00876617431640625,
-0.00031280517578125,
0.012420654296875,
0.0174407958984375,
-0.00556182861328125,
-0.0167694091796875,
0.0574951171875,
0.042388916015625,
-0.05474853515625,
-0.0316162109375,
0.0014696121215820312,
0.017303466796875,
-0.00951385498046875,
0.003215789794921875,
0.00023877620697021484,
0.021087646484375,
0.0120697021484375,
0.028289794921875,
-0.0277252197265625,
-0.0018320083618164062,
-0.00009685754776000977,
-0.034454345703125,
0.0113983154296875,
0.00615692138671875,
-0.06005859375,
-0.060882568359375,
0.0024261474609375,
-0.027984619140625,
0.061737060546875,
0.0150909423828125,
0.055877685546875,
-0.045318603515625,
-0.033203125,
-0.011322021484375,
-0.0133056640625,
0.04608154296875,
0.0160675048828125,
-0.03704833984375,
-0.018341064453125,
-0.0136260986328125,
-0.0131072998046875,
0.006378173828125,
-0.0189666748046875,
-0.008056640625,
-0.005153656005859375,
-0.023895263671875,
0.0229949951171875,
0.014892578125,
0.0584716796875,
0.0209197998046875,
0.01361846923828125,
-0.054229736328125,
0.0276641845703125,
0.00144195556640625,
0.05078125,
0.00634002685546875,
0.02716064453125,
0.0136260986328125,
-0.0008130073547363281,
-0.0224456787109375,
-0.00968170166015625,
0.0015020370483398438,
-0.01299285888671875,
-0.007610321044921875,
-0.005687713623046875,
-0.00940704345703125,
-0.007717132568359375,
0.042266845703125,
-0.003986358642578125,
-0.01554107666015625,
0.01268768310546875,
0.008941650390625,
0.006832122802734375,
-0.040557861328125,
0.060699462890625,
-0.0367431640625,
0.0286407470703125,
-0.040313720703125,
-0.01006317138671875,
-0.01018524169921875,
0.035186767578125,
0.03106689453125,
-0.047088623046875,
0.01137542724609375,
0.0252227783203125,
-0.0408935546875,
0.0338134765625,
0.05792236328125,
0.01285552978515625,
0.04901123046875,
0.0113372802734375,
0.034576416015625,
0.0458984375,
0.04547119140625,
-0.01117706298828125,
-0.049041748046875,
0.07537841796875,
0.03460693359375,
-0.016510009765625,
0.0660400390625,
-0.0248565673828125,
0.0241546630859375,
0.007282257080078125,
0.060028076171875,
-0.0567626953125,
0.032012939453125,
0.0190582275390625,
-0.00792694091796875,
0.01212310791015625,
-0.004863739013671875,
-0.0009059906005859375,
-0.0008907318115234375,
0.030853271484375,
0.011810302734375,
-0.021759033203125,
0.0278778076171875,
0.01074981689453125,
-0.0198822021484375,
-0.0178070068359375,
0.017852783203125,
0.004177093505859375,
0.034332275390625,
-0.0289154052734375,
-0.0222320556640625,
-0.007171630859375,
-0.022796630859375,
0.00978851318359375,
0.007205963134765625,
-0.012664794921875,
-0.04461669921875,
0.020660400390625,
-0.0245208740234375,
-0.0019502639770507812,
-0.0038127899169921875,
-0.039093017578125,
0.0276947021484375,
0.033172607421875,
-0.02069091796875,
0.0006766319274902344,
0.01861572265625,
-0.005184173583984375,
-0.0267333984375,
-0.01050567626953125,
-0.0121002197265625,
0.0210723876953125,
-0.0088653564453125,
0.01108551025390625,
-0.028778076171875,
0.01465606689453125,
0.012908935546875,
0.034820556640625,
0.033660888671875,
-0.00957489013671875,
-0.03564453125,
0.02972412109375,
-0.0233154296875,
0.0019817352294921875,
0.0328369140625,
-0.003139495849609375,
-0.0016489028930664062,
-0.01270294189453125,
0.017852783203125,
-0.04376220703125,
0.0064697265625,
0.0277099609375,
-0.05523681640625,
0.09130859375,
0.02392578125,
0.006511688232421875,
-0.000014483928680419922,
0.041290283203125,
-0.02178955078125,
0.00998687744140625,
-0.061126708984375,
0.046539306640625,
0.038726806640625,
0.04229736328125,
-0.03167724609375,
0.0017480850219726562,
0.009246826171875,
-0.010772705078125,
0.0153656005859375,
-0.004940032958984375,
0.0240020751953125,
-0.01503753662109375,
0.0204315185546875,
0.00039887428283691406,
-0.024017333984375,
0.006122589111328125,
0.0303802490234375,
0.00266265869140625,
0.038787841796875,
0.0283050537109375,
0.046905517578125,
-0.0260467529296875,
0.0008034706115722656,
0.052703857421875,
0.00975799560546875,
0.0024509429931640625,
-0.01450347900390625,
0.0294036865234375,
-0.0144805908203125,
-0.01554107666015625,
0.0204010009765625,
-0.0421142578125,
-0.032501220703125,
0.049041748046875,
0.019317626953125,
-0.01678466796875,
-0.02166748046875,
-0.0298919677734375,
0.034820556640625,
0.0200347900390625,
-0.003963470458984375,
0.0467529296875,
0.0232391357421875,
-0.01418304443359375,
0.004077911376953125,
-0.005634307861328125,
0.005340576171875,
0.002841949462890625,
0.063232421875,
0.03204345703125,
0.01910400390625,
-0.0016832351684570312,
0.0108795166015625,
0.055755615234375,
0.08258056640625,
-0.0535888671875,
-0.0301971435546875,
0.013946533203125,
-0.0159912109375,
-0.011749267578125,
0.0125579833984375,
0.017791748046875,
0.00669097900390625,
0.008758544921875,
-0.04840087890625,
-0.027557373046875,
0.033355712890625,
0.06280517578125,
-0.0019779205322265625,
-0.01384735107421875,
-0.051025390625,
-0.05194091796875,
-0.05126953125,
0.007793426513671875,
0.008270263671875,
0.061004638671875,
0.01023101806640625,
0.057861328125,
-0.019561767578125,
-0.0220794677734375,
-0.018798828125,
0.0343017578125,
-0.024810791015625,
0.04339599609375,
-0.05413818359375,
-0.0216522216796875,
-0.0083465576171875,
0.051177978515625,
0.07196044921875,
0.04071044921875,
0.0396728515625,
-0.0251617431640625,
-0.01126861572265625,
0.0303955078125,
0.0167388916015625,
-0.026702880859375,
0.03936767578125,
-0.055206298828125,
0.045654296875,
-0.00827789306640625,
-0.0095672607421875,
-0.006938934326171875,
-0.026641845703125,
0.054107666015625,
-0.045074462890625,
0.0003426074981689453,
-0.010955810546875,
-0.0458984375,
0.056182861328125,
-0.0187225341796875,
0.04193115234375,
-0.03369140625,
-0.07525634765625,
0.0003540515899658203,
-0.07666015625,
0.00589752197265625,
0.03369140625,
0.03131103515625,
-0.007434844970703125,
0.032257080078125,
0.013885498046875,
-0.0174407958984375,
-0.0006260871887207031,
0.036956787109375,
-0.00411224365234375,
0.032470703125,
0.02398681640625,
0.017791748046875,
0.00481414794921875,
0.0180511474609375,
0.006595611572265625,
0.00994110107421875,
0.05242919921875,
0.01464080810546875,
0.00228118896484375,
0.026397705078125,
0.01261138916015625,
-0.020751953125,
0.0158538818359375,
0.007038116455078125,
0.04608154296875,
0.00775909423828125,
-0.029571533203125,
-0.033538818359375,
-0.027252197265625,
0.00853729248046875,
0.046630859375,
-0.0170745849609375,
0.00058746337890625,
0.0009765625,
0.037872314453125,
-0.006317138671875,
0.09661865234375,
0.00736236572265625,
-0.029083251953125,
-0.0140533447265625,
-0.01214599609375,
0.03302001953125,
0.0667724609375,
0.054901123046875,
-0.01265716552734375,
-0.019287109375,
0.005947113037109375,
-0.01212310791015625,
0.06304931640625,
-0.040863037109375,
0.0139923095703125,
-0.04931640625,
-0.01419830322265625,
0.01053619384765625,
-0.0191802978515625,
0.0019130706787109375,
0.0201263427734375,
0.0244140625,
0.00823211669921875,
0.0055999755859375,
-0.01055145263671875,
-0.03411865234375,
0.0478515625,
0.011993408203125,
0.02569580078125,
-0.0450439453125,
0.026275634765625,
-0.0038909912109375,
-0.0679931640625,
-0.0438232421875,
-0.05828857421875,
-0.0025177001953125,
0.0225830078125,
-0.03857421875,
-0.044647216796875,
-0.04949951171875,
-0.0277099609375,
0.0265655517578125,
-0.007110595703125,
0.00936126708984375,
-0.0186614990234375,
-0.015625,
0.0015687942504882812,
0.016143798828125,
-0.038116455078125,
0.01235198974609375,
0.007419586181640625,
-0.0292816162109375,
0.0120849609375,
-0.0201568603515625,
0.0030689239501953125,
0.01041412353515625,
0.0198974609375,
0.03314208984375,
-0.013092041015625,
-0.0312347412109375,
0.0209503173828125,
0.00376129150390625,
0.0758056640625,
-0.011199951171875,
-0.02203369140625,
0.0196380615234375,
0.01457977294921875,
-0.01335906982421875,
-0.042999267578125,
0.0254058837890625,
-0.043212890625,
-0.0162200927734375,
-0.005626678466796875,
-0.0017910003662109375,
0.00748443603515625,
-0.034759521484375,
-0.06103515625,
0.0220947265625,
-0.0067291259765625,
-0.04486083984375,
-0.044158935546875,
0.02069091796875,
-0.0010156631469726562,
0.00566864013671875,
-0.01332855224609375,
-0.0237274169921875,
-0.0189056396484375,
0.025054931640625,
-0.0009307861328125,
0.013763427734375,
0.0290069580078125,
-0.005096435546875,
-0.047943115234375,
-0.0090484619140625,
-0.005558013916015625,
-0.00997161865234375,
0.049346923828125,
-0.057769775390625,
0.08087158203125,
0.04876708984375,
-0.042938232421875,
0.04058837890625,
0.00269317626953125,
-0.0270233154296875,
-0.01123046875,
-0.0758056640625,
-0.0169830322265625,
0.0001131296157836914,
0.06951904296875,
0.0142974853515625,
0.00984954833984375,
-0.0477294921875,
0.017303466796875,
0.0053863525390625,
-0.08416748046875,
-0.0153045654296875,
0.0278167724609375,
-0.0462646484375,
-0.0094757080078125,
-0.004901885986328125,
-0.00431060791015625,
-0.036651611328125,
0.0135650634765625,
-0.0276947021484375,
-0.0184478759765625,
0.026123046875,
0.0198974609375,
-0.00701141357421875,
-0.0684814453125,
0.101806640625,
-0.05780029296875,
-0.0179901123046875,
0.03851318359375,
0.0285797119140625,
0.03558349609375,
0.03692626953125,
0.00115203857421875,
0.0304412841796875,
-0.0109100341796875,
-0.014434814453125,
0.039794921875,
0.02081298828125,
0.0229339599609375,
-0.007724761962890625,
-0.004825592041015625,
0.02569580078125,
-0.0142059326171875,
0.017547607421875,
-0.00537109375,
0.05511474609375,
-0.00388336181640625,
0.10479736328125,
-0.01076507568359375,
0.07562255859375,
0.016510009765625,
0.0345458984375,
-0.0106964111328125,
-0.0215606689453125,
0.033447265625,
-0.06866455078125,
-0.00433349609375,
0.00930023193359375,
-0.006923675537109375,
-0.045318603515625,
0.048065185546875,
0.0231475830078125,
0.01251983642578125,
0.028228759765625
]
|
1fd8d9aa43d117af1f1310c446604beb7d7cc2e7 | Wordpress Stackexchange
Q: Log of Heartbeat Calls I've read that Heartbeat can slow a WP site down and I'm assuming if our admins/store managers have a lot of admin windows/tabs open, this will exacerbate the issue.
If yes, is there a condition to test and log the calls that Heartbeat makes so I can see if the site slowdown could be related to an excess of Heartbeat calls?
I had a look in the documentation and elsewhere but only found ways to deregister the script ( wp_deregister_script('heartbeat'); ) - not what I need.
Or am I barking up the wrong tree and this is something that should be monitored via server logs, by watching: /wp-admin/admin-ajax.php ?
A: From quick look at the code, there is number of hooks firing in wp_ajax_heartbeat(). Out of which heartbeat_tick action seems quite appropriate to hook some logging logic too.
For the sake of completeness, while you are interested in logged in activity, the hook would be heartbeat_nopriv_tick for logged out users.
| Q: Log of Heartbeat Calls I've read that Heartbeat can slow a WP site down and I'm assuming if our admins/store managers have a lot of admin windows/tabs open, this will exacerbate the issue.
If yes, is there a condition to test and log the calls that Heartbeat makes so I can see if the site slowdown could be related to an excess of Heartbeat calls?
I had a look in the documentation and elsewhere but only found ways to deregister the script ( wp_deregister_script('heartbeat'); ) - not what I need.
Or am I barking up the wrong tree and this is something that should be monitored via server logs, by watching: /wp-admin/admin-ajax.php ?
A: From quick look at the code, there is number of hooks firing in wp_ajax_heartbeat(). Out of which heartbeat_tick action seems quite appropriate to hook some logging logic too.
For the sake of completeness, while you are interested in logged in activity, the hook would be heartbeat_nopriv_tick for logged out users.
| wordpress | {
"language": "en",
"length": 165,
"provenance": "stackexchange_00019.jsonl.gz:455177",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/185987"
} | [
0.0670166015625,
-0.00879669189453125,
-0.00374603271484375,
-0.0377197265625,
0.020721435546875,
-0.0291595458984375,
0.0369873046875,
-0.0234832763671875,
0.0016937255859375,
0.0294036865234375,
-0.044525146484375,
-0.0019235610961914062,
0.0217437744140625,
0.0009188652038574219,
-0.03460693359375,
-0.033447265625,
0.064453125,
-0.0251922607421875,
0.041839599609375,
0.03369140625,
-0.01224517822265625,
0.07843017578125,
0.0089111328125,
0.05645751953125,
0.00991058349609375,
0.050079345703125,
0.03875732421875,
-0.004512786865234375,
0.0279541015625,
0.00699615478515625,
0.0220947265625,
-0.06268310546875,
0.016876220703125,
0.039703369140625,
-0.051727294921875,
0.0090789794921875,
-0.0028934478759765625,
0.00656890869140625,
0.0159149169921875,
0.00004607439041137695,
0.0181427001953125,
-0.026092529296875,
0.04425048828125,
-0.03485107421875,
0.01165008544921875,
0.01131439208984375,
0.01318359375,
-0.0587158203125,
-0.0071563720703125,
-0.0294952392578125,
0.0159759521484375,
0.026824951171875,
0.0257415771484375,
-0.010986328125,
0.005218505859375,
0.001590728759765625,
-0.03814697265625,
0.072021484375,
0.04119873046875,
-0.02294921875,
-0.038970947265625,
-0.003139495849609375,
0.01003265380859375,
-0.0209503173828125,
-0.037322998046875,
0.0028781890869140625,
0.00930023193359375,
0.01361846923828125,
0.01898193359375,
-0.034393310546875,
-0.0087738037109375,
0.02374267578125,
-0.01398468017578125,
0.0214385986328125,
-0.00440216064453125,
-0.03546142578125,
0.01351165771484375,
-0.029449462890625,
-0.0013914108276367188,
0.055572509765625,
-0.00864410400390625,
-0.052337646484375,
-0.026397705078125,
0.00766754150390625,
0.0188751220703125,
0.037139892578125,
-0.0052642822265625,
-0.01186370849609375,
-0.01629638671875,
-0.035491943359375,
-0.0316162109375,
0.02105712890625,
-0.01012420654296875,
-0.0023365020751953125,
-0.05853271484375,
-0.0031681060791015625,
0.034942626953125,
0.012847900390625,
-0.0063018798828125,
-0.032867431640625,
0.0103912353515625,
-0.01910400390625,
-0.056640625,
0.017333984375,
0.009765625,
0.034515380859375,
-0.02777099609375,
-0.00911712646484375,
0.037750244140625,
0.0281982421875,
0.0013484954833984375,
0.032562255859375,
0.012298583984375,
-0.03668212890625,
0.01082611083984375,
0.004703521728515625,
-0.0253448486328125,
0.04443359375,
0.00927734375,
-0.0017004013061523438,
0.018096923828125,
0.041168212890625,
-0.0287322998046875,
-0.03759765625,
0.00464630126953125,
-0.0228424072265625,
-0.0251312255859375,
0.0015897750854492188,
0.0036220550537109375,
0.01107025146484375,
0.007568359375,
0.006412506103515625,
0.0018968582153320312,
0.0259552001953125,
-0.01202392578125,
-0.0035266876220703125,
0.008880615234375,
-0.04345703125,
-0.0014982223510742188,
0.0258941650390625,
0.00899505615234375,
-0.0758056640625,
-0.04718017578125,
0.0007090568542480469,
0.06982421875,
-0.00067901611328125,
-0.0181884765625,
0.01146697998046875,
0.074462890625,
0.0325927734375,
-0.006298065185546875,
-0.0003695487976074219,
0.03204345703125,
-0.0247039794921875,
0.0240020751953125,
-0.060333251953125,
0.0038166046142578125,
-0.03118896484375,
0.02508544921875,
-0.016265869140625,
-0.04425048828125,
0.00714874267578125,
0.0596923828125,
-0.02081298828125,
-0.0231170654296875,
0.0142822265625,
-0.02447509765625,
-0.0049285888671875,
0.025726318359375,
0.0220794677734375,
0.0297698974609375,
-0.034210205078125,
0.02984619140625,
-0.00783538818359375,
-0.0178680419921875,
0.006481170654296875,
-0.01163482666015625,
0.03155517578125,
0.032989501953125,
-0.07562255859375,
-0.06689453125,
-0.059967041015625,
0.0673828125,
-0.041107177734375,
-0.005954742431640625,
0.0579833984375,
0.0159454345703125,
0.059234619140625,
-0.00872802734375,
0.0096282958984375,
-0.0277252197265625,
0.04290771484375,
-0.015533447265625,
0.032562255859375,
-0.01399993896484375,
-0.041168212890625,
-0.035400390625,
-0.0036163330078125,
-0.0215911865234375,
0.003910064697265625,
0.024505615234375,
0.0296783447265625,
-0.0255889892578125,
-0.0162353515625,
-0.096435546875,
0.02008056640625,
-0.03009033203125,
0.057830810546875,
0.034637451171875,
0.03570556640625,
-0.00316619873046875,
0.033111572265625,
-0.01568603515625,
-0.035125732421875,
-0.02545166015625,
0.01122283935546875,
-0.047027587890625,
-0.0177764892578125,
-0.04241943359375,
-0.00605010986328125,
-0.043792724609375,
-0.02362060546875,
-0.049560546875,
0.0005049705505371094,
0.0036487579345703125,
0.034271240234375,
-0.0439453125,
0.025848388671875,
-0.00681304931640625,
0.0253143310546875,
0.0166473388671875,
0.039459228515625,
0.0276031494140625,
0.05487060546875,
-0.00015246868133544922,
-0.011474609375,
-0.00093841552734375,
-0.08984375,
0.01141357421875,
0.045562744140625,
0.0148162841796875,
0.05487060546875,
0.01500701904296875,
0.041778564453125,
-0.00858306884765625,
-0.07159423828125,
0.0146331787109375,
0.016326904296875,
-0.0267181396484375,
0.0207672119140625,
-0.0308074951171875,
0.033905029296875,
0.024658203125,
0.005321502685546875,
-0.0187225341796875,
0.053314208984375,
-0.00023543834686279297,
-0.0172882080078125,
0.003902435302734375,
-0.002330780029296875,
0.00850677490234375,
0.002964019775390625,
-0.01953125,
-0.0005841255187988281,
-0.050567626953125,
-0.0091705322265625,
-0.01299285888671875,
-0.011260986328125,
0.011322021484375,
-0.0221710205078125,
0.025482177734375,
-0.0078582763671875,
-0.004039764404296875,
0.01270294189453125,
0.07562255859375,
-0.01922607421875,
-0.0404052734375,
-0.015899658203125,
0.052734375,
0.002788543701171875,
-0.029571533203125,
0.016754150390625,
-0.00301361083984375,
-0.0226593017578125,
-0.0210723876953125,
-0.022369384765625,
0.0114593505859375,
-0.036773681640625,
0.014190673828125,
-0.034912109375,
-0.0221710205078125,
0.02886962890625,
-0.01432037353515625,
0.043792724609375,
0.065673828125,
-0.041961669921875,
0.035064697265625,
-0.02703857421875,
0.0309600830078125,
-0.00885772705078125,
0.05450439453125,
0.0701904296875,
0.00031375885009765625,
0.01153564453125,
0.00884246826171875,
-0.03692626953125,
-0.0096588134765625,
0.00037097930908203125,
-0.01311492919921875,
0.00133514404296875,
-0.046356201171875,
0.0771484375,
0.035003662109375,
0.10321044921875,
-0.0125885009765625,
-0.051361083984375,
0.0159149169921875,
0.05169677734375,
-0.03631591796875,
-0.0711669921875,
-0.053009033203125,
-0.06744384765625,
0.0193939208984375,
-0.016937255859375,
-0.0217437744140625,
0.01357269287109375,
0.00661468505859375,
0.0145721435546875,
-0.07440185546875,
-0.00975799560546875,
-0.033233642578125,
-0.058319091796875,
-0.0259857177734375,
0.0233001708984375,
-0.01357269287109375,
0.0266571044921875,
0.009918212890625,
0.0201416015625,
-0.0182342529296875,
-0.04449462890625,
-0.0132598876953125,
-0.024932861328125,
-0.00952911376953125,
-0.00791168212890625,
-0.016876220703125,
-0.04681396484375,
-0.036651611328125,
-0.0196075439453125,
-0.05755615234375,
-0.02667236328125,
0.057220458984375,
0.0176849365234375,
-0.0025272369384765625,
-0.024505615234375,
0.0220184326171875,
0.04876708984375,
0.0016918182373046875,
0.01226043701171875,
0.052581787109375,
-0.0249786376953125,
-0.01517486572265625,
0.032806396484375,
-0.016357421875,
-0.06280517578125,
0.01224517822265625,
-0.03729248046875,
0.01476287841796875,
-0.048492431640625,
0.07684326171875,
0.0186767578125,
-0.0733642578125,
0.032073974609375,
0.042327880859375,
0.022735595703125,
0.08197021484375,
-0.0100250244140625,
0.0123748779296875,
-0.034393310546875,
0.0035839080810546875,
-0.01654052734375,
-0.0290985107421875,
-0.04150390625,
0.017913818359375,
-0.047637939453125,
0.04656982421875,
-0.0031280517578125,
-0.034210205078125,
0.019439697265625,
0.0015535354614257812,
0.0087738037109375,
-0.0181732177734375,
0.005344390869140625,
-0.060089111328125,
-0.0036144256591796875,
0.006481170654296875,
0.03521728515625,
-0.06396484375,
-0.07232666015625,
-0.042327880859375,
0.002506256103515625,
-0.025604248046875,
0.017486572265625,
0.006153106689453125,
-0.003570556640625,
-0.0286102294921875,
0.0433349609375,
-0.0222320556640625,
-0.0204315185546875,
0.0019254684448242188,
-0.0213165283203125,
0.01245880126953125,
0.009429931640625,
0.0092315673828125,
-0.0073699951171875,
0.0189971923828125,
-0.047882080078125,
-0.08349609375,
-0.03131103515625,
-0.019439697265625,
0.0926513671875,
0.0182952880859375,
-0.074951171875,
0.007442474365234375,
0.05389404296875,
0.0010213851928710938,
0.01435089111328125,
0.00075531005859375,
-0.0167083740234375,
0.02191162109375,
0.032928466796875,
0.003070831298828125,
0.0168304443359375,
-0.00710296630859375,
-0.0252685546875,
-0.00638580322265625,
0.0291900634765625,
-0.0311126708984375,
0.0203399658203125,
-0.009796142578125,
-0.008636474609375,
-0.075439453125,
-0.035003662109375,
-0.0189056396484375,
0.01293182373046875,
-0.01763916015625,
0.007488250732421875,
-0.03759765625,
-0.06146240234375,
0.03460693359375,
0.01030731201171875,
0.010009765625,
-0.00228118896484375,
0.057891845703125,
0.016204833984375,
-0.0184326171875,
0.0010280609130859375,
-0.00213623046875,
0.015869140625,
-0.003391265869140625,
0.006694793701171875,
-0.040740966796875,
-0.0230255126953125,
0.047821044921875,
-0.0309600830078125,
0.0211944580078125,
-0.05316162109375,
0.023101806640625,
0.0225830078125,
0.0167236328125,
0.00426483154296875,
0.0244293212890625,
0.0308074951171875,
0.0175933837890625,
-0.025909423828125,
-0.0007405281066894531,
-0.00836181640625,
0.0309295654296875,
-0.04510498046875,
0.03436279296875,
-0.035888671875,
-0.034423828125,
0.0139617919921875,
-0.03973388671875,
0.023895263671875,
0.017333984375,
-0.00411224365234375,
0.0304107666015625,
0.036041259765625,
0.0218353271484375,
-0.0310821533203125,
0.00243377685546875,
-0.043487548828125,
0.035125732421875,
-0.00629425048828125,
-0.005023956298828125,
-0.025390625,
-0.002208709716796875,
-0.0195465087890625,
-0.0035152435302734375,
-0.05987548828125,
-0.006439208984375,
-0.0011415481567382812,
0.0093231201171875,
0.01678466796875,
-0.020721435546875,
0.032135009765625,
0.03253173828125,
-0.02166748046875,
-0.0006804466247558594,
-0.0113372802734375,
-0.01166534423828125,
-0.04345703125,
0.019439697265625,
-0.006290435791015625,
-0.016693115234375,
0.03863525390625,
-0.0190277099609375,
-0.01502227783203125,
0.0017147064208984375,
-0.00011771917343139648,
0.07537841796875,
0.0161285400390625,
0.0290679931640625,
0.00470733642578125,
0.020050048828125,
-0.0116424560546875,
0.02093505859375,
-0.033416748046875,
-0.0016345977783203125,
0.03985595703125,
0.0004761219024658203,
0.0212860107421875,
0.005767822265625,
-0.0261383056640625,
0.007228851318359375,
-0.0694580078125,
-0.017303466796875,
0.0469970703125,
0.01032257080078125,
-0.046630859375,
-0.0232696533203125,
0.000014960765838623047,
0.0118255615234375,
-0.026275634765625,
0.015594482421875,
0.00807952880859375,
0.0131988525390625,
0.0245208740234375,
-0.009552001953125,
0.0162506103515625,
-0.041778564453125,
-0.0311279296875,
-0.0477294921875,
-0.03802490234375,
-0.01012420654296875,
-0.06414794921875,
-0.03204345703125,
0.004703521728515625,
0.005802154541015625,
0.0255126953125,
0.0021209716796875,
-0.021575927734375,
-0.02166748046875,
0.0034008026123046875,
-0.004566192626953125,
-0.005077362060546875,
0.0249481201171875,
-0.01338958740234375,
-0.00948333740234375,
-0.0259246826171875,
-0.057281494140625,
-0.03656005859375,
0.0079193115234375,
0.001983642578125,
-0.0221099853515625,
-0.0077056884765625,
0.01070404052734375,
-0.004730224609375,
0.01439666748046875,
-0.00447845458984375,
-0.028778076171875,
0.0171051025390625,
0.017120361328125,
-0.032684326171875,
-0.01447296142578125,
0.02056884765625,
-0.037628173828125,
-0.00725555419921875,
-0.02581787109375,
0.0012388229370117188,
-0.0021724700927734375,
0.01256561279296875,
0.059967041015625,
0.060638427734375,
-0.031951904296875,
-0.0751953125,
0.020263671875,
-0.0823974609375,
0.037841796875,
-0.049102783203125,
0.01995849609375,
-0.017425537109375,
0.000850677490234375,
-0.0318603515625,
0.021484375,
-0.018463134765625,
0.0243072509765625,
-0.008636474609375,
-0.0108795166015625,
-0.0257568359375,
-0.0210723876953125,
-0.0345458984375,
0.0244140625,
0.0183258056640625,
-7.748603820800781e-7,
-0.00600433349609375,
-0.00522613525390625,
0.00865936279296875,
0.0260162353515625,
-0.0003924369812011719,
0.0298614501953125,
0.0241851806640625,
0.039398193359375,
0.0211944580078125,
0.029449462890625,
0.0033893585205078125,
-0.059783935546875,
0.054962158203125,
0.0200653076171875,
-0.011505126953125,
0.052032470703125,
-0.029632568359375,
-0.0066680908203125,
0.04412841796875,
0.04998779296875,
-0.07489013671875,
0.00887298583984375,
0.026519775390625,
-0.004486083984375,
-0.01178741455078125,
-0.040802001953125,
-0.012359619140625,
-0.0869140625,
0.08135986328125,
0.0083160400390625,
-0.00377655029296875,
0.00591278076171875,
-0.0450439453125,
-0.008544921875,
-0.041748046875,
0.0036773681640625,
0.0131378173828125,
-0.0035076141357421875,
0.0350341796875,
0.01122283935546875,
0.030242919921875,
-0.020965576171875,
0.017242431640625,
0.00620269775390625,
-0.045013427734375,
-0.0284576416015625,
0.0200042724609375,
0.0085601806640625,
0.006198883056640625,
0.00586700439453125,
0.0233306884765625,
0.055572509765625,
0.05084228515625,
0.004520416259765625,
-0.0234527587890625,
0.0170745849609375,
0.034698486328125,
-0.018402099609375,
0.00208282470703125,
0.0206451416015625,
0.0200653076171875,
-0.0537109375,
0.00215911865234375,
-0.053192138671875,
0.01275634765625,
-0.0005016326904296875,
0.0027618408203125,
0.059783935546875,
-0.004718780517578125,
-0.0211029052734375,
0.04241943359375,
0.01031494140625,
-0.01557159423828125,
-0.010162353515625,
0.0469970703125,
-0.03326416015625,
-0.0183258056640625,
0.0114593505859375,
-0.026641845703125,
-0.025848388671875,
-0.0019893646240234375,
-0.01305389404296875,
0.0287017822265625,
0.00511932373046875,
-0.0250701904296875,
0.0203704833984375,
0.0017614364624023438,
-0.034423828125,
-0.0084381103515625,
-0.0491943359375,
0.041107177734375,
-0.026336669921875,
0.05377197265625,
-0.06866455078125,
-0.0037479400634765625,
-0.0064849853515625,
0.00754547119140625,
-0.002231597900390625,
-0.0100250244140625,
0.00012576580047607422,
-0.03277587890625,
0.0164947509765625,
0.0173187255859375,
0.0123291015625,
0.0169525146484375,
-0.01375579833984375,
0.036468505859375,
0.04425048828125,
-0.01488494873046875,
0.027496337890625,
0.0221405029296875,
-0.04656982421875,
0.023040771484375,
0.0092010498046875,
0.01177978515625,
0.0037784576416015625,
-0.013885498046875,
-0.0128173828125,
0.001972198486328125,
0.0065460205078125,
-0.01239013671875,
0.007503509521484375,
0.03118896484375,
0.01338958740234375,
-0.023681640625,
-0.0276336669921875,
-0.025634765625,
0.0406494140625,
-0.002414703369140625,
-0.0177154541015625,
0.01201629638671875,
0.0200958251953125,
-0.00003409385681152344,
-0.06146240234375,
-0.030731201171875,
0.0120391845703125,
-0.03521728515625,
-0.0061492919921875,
0.00725555419921875,
0.0252838134765625,
-0.00437164306640625,
0.0014028549194335938,
0.004055023193359375,
0.012359619140625,
-0.011260986328125,
-0.038055419921875,
-0.00225067138671875,
-0.0079345703125,
0.0294036865234375,
0.0067138671875,
0.05133056640625,
-0.03106689453125,
-0.03216552734375,
0.0143890380859375,
0.0025882720947265625,
-0.02099609375,
0.0102996826171875,
0.0090789794921875,
0.06280517578125,
-0.015960693359375,
0.021270751953125,
0.031890869140625,
-0.037567138671875,
-0.02178955078125,
-0.026123046875,
0.021728515625,
-0.0269622802734375,
0.01367950439453125,
0.0221405029296875,
0.0248565673828125,
-0.00907135009765625,
-0.03131103515625,
-0.0226287841796875,
-0.048095703125,
-0.08001708984375,
0.0112762451171875,
0.053558349609375,
0.041107177734375,
0.044189453125,
0.030731201171875,
0.020050048828125,
0.0162811279296875,
0.01172637939453125,
0.056396484375,
-0.0109710693359375,
-0.0229644775390625,
-0.04058837890625,
0.010833740234375,
0.03912353515625,
0.0102386474609375,
0.0308990478515625,
0.0070648193359375,
0.0252685546875,
-0.0022182464599609375,
-0.002124786376953125,
0.0216827392578125,
-0.0176849365234375,
-0.01343536376953125,
0.0251007080078125,
-0.0301666259765625,
0.02392578125,
-0.063720703125,
-0.0018186569213867188,
-0.019683837890625,
-0.02740478515625,
-0.0176239013671875,
0.02044677734375,
-0.003925323486328125,
0.02703857421875,
-0.00782012939453125,
0.0233306884765625,
-0.0021839141845703125,
-0.0058135986328125,
-0.029998779296875,
-0.02001953125,
0.045928955078125,
-0.0140380859375,
-0.047607421875,
-0.040252685546875,
-0.041748046875,
0.058349609375,
0.001079559326171875,
0.13037109375,
-0.0450439453125,
0.0205841064453125,
0.032958984375,
-0.01947021484375,
0.0360107421875,
0.036224365234375,
-0.00775146484375,
0.0006818771362304688,
-0.00717926025390625,
-0.0178375244140625,
-0.08746337890625,
0.061065673828125,
-0.0188140869140625,
0.034027099609375,
0.05126953125,
-0.00035262107849121094,
0.011871337890625,
0.03582763671875,
0.00801849365234375,
-0.0255889892578125,
-0.03228759765625,
-0.0287933349609375,
-0.005008697509765625,
0.01556396484375,
0.0160369873046875,
-0.00445556640625,
0.0347900390625,
-0.03143310546875,
-0.000812530517578125,
0.0029582977294921875,
-0.02459716796875,
-0.031646728515625,
0.00885772705078125,
-0.007106781005859375,
0.0029754638671875,
-0.0081329345703125,
-0.0271759033203125,
0.02874755859375,
-0.0028533935546875,
0.03399658203125,
-0.0189361572265625,
0.05816650390625,
-0.013427734375,
0.016754150390625,
0.0198974609375,
0.0006275177001953125,
-0.01268768310546875,
-0.0171356201171875,
-0.007701873779296875,
0.014190673828125,
-0.033843994140625,
-0.0272979736328125,
-0.026123046875,
0.002887725830078125,
0.0183868408203125,
0.0086517333984375,
-0.0238037109375,
-0.00618743896484375,
-0.03973388671875,
0.0450439453125,
-0.0018358230590820312,
-0.01499176025390625,
0.0098724365234375,
-0.0211334228515625,
-0.01543426513671875,
0.0045166015625,
0.044464111328125,
-0.0209808349609375,
-0.00634765625,
-0.030242919921875,
-0.05029296875,
-0.0190277099609375,
0.076904296875,
-0.003665924072265625,
-0.00962066650390625,
0.019195556640625,
-0.01529693603515625,
-0.0243988037109375,
-0.056640625,
-0.006969451904296875,
-0.01324462890625,
0.0167388916015625,
-0.03271484375,
-0.025146484375,
-0.007160186767578125,
0.01702880859375,
0.038482666015625,
0.0231170654296875,
-0.00795745849609375,
-0.0548095703125,
-0.035888671875,
0.0047454833984375,
0.00028514862060546875,
-0.0282135009765625,
-0.01015472412109375,
0.04931640625,
-0.000015974044799804688,
-0.0042877197265625,
-0.100830078125,
0.0243072509765625,
0.031341552734375,
-0.04266357421875,
-0.06243896484375,
-0.001621246337890625,
-0.051788330078125,
0.03271484375,
0.046295166015625,
-0.0653076171875,
0.054351806640625,
0.01468658447265625,
-0.04522705078125,
0.043670654296875,
0.04119873046875,
0.01316070556640625,
-0.046417236328125,
0.0263671875,
-0.0033931732177734375,
0.0311431884765625,
-0.006473541259765625,
-0.01244354248046875,
0.0311737060546875,
-0.0082550048828125,
0.008392333984375,
0.0093536376953125,
-0.024383544921875,
0.01132965087890625,
0.08587646484375,
0.0294647216796875,
0.0236053466796875,
-0.038116455078125,
-0.037322998046875,
-0.06768798828125,
0.007335662841796875,
-0.0033092498779296875,
-0.0084075927734375,
-0.048309326171875,
0.03875732421875,
0.025970458984375,
-0.00008940696716308594,
0.03472900390625,
-0.042083740234375,
0.01546478271484375,
0.00858306884765625,
0.044921875,
-0.0030612945556640625,
0.0263671875,
0.005672454833984375,
0.001651763916015625,
-0.0036869049072265625,
0.029876708984375,
-0.00311279296875,
0.006793975830078125,
0.035552978515625,
0.042266845703125,
0.007415771484375,
0.0084991455078125,
-0.0247802734375,
0.01702880859375,
-0.0016355514526367188,
0.016265869140625,
-0.0308990478515625,
-0.007572174072265625,
-0.001262664794921875,
-0.01654052734375,
0.0025691986083984375,
-0.0169525146484375,
-0.002655029296875,
-0.03875732421875,
-0.036041259765625,
0.01203155517578125,
-0.01001739501953125,
0.01503753662109375,
-0.007678985595703125,
0.0162200927734375,
0.005634307861328125,
-0.0079193115234375,
0.057159423828125,
-0.05242919921875,
-0.00815582275390625,
-0.0005583763122558594,
-0.00467681884765625,
-0.051177978515625,
0.02020263671875,
-0.07879638671875,
-0.00445556640625,
0.026397705078125
]
|
70d272917844820227d9c11a7c79c8a878d5a1dd | Wordpress Stackexchange
Q: Multisite Domain Mapping with SSL I've done some searching but couldn't find this issue elsewhere, apologies if this has already been discussed elsewhere.
I've set up a Multisite install; and am trying to set up domain mapping for sub-sites. The main site has wildcard SSL enabled and WP Admin forced to SSL.
The issue is that the mapped domains do not have SSL, links in WP Admin to the frontend show as https:// even when the home URL is defined without SSL.
e.g.
Site URL https://sub.multisite.com/
Home URL: http://sub.com/ (but shows in WP Admin as https://sub.com/ e.g. the "Visit Site" link)
I've tried using the WordPress MU Domain Mapping plugin and Mercator to achieve this, both without success.
WordPress.com has a similar setup but does appear to work (mapped domains don't need SSL and the links from WP Admin are correct); I presume this is a custom solution.
Is there a solution that addresses the issue of SSL with mapped domains?
A: You may try free WordOps - High performance WordPress stack with a few keystrokes installs WP multisite with free Letsencrypt certificates.
| Q: Multisite Domain Mapping with SSL I've done some searching but couldn't find this issue elsewhere, apologies if this has already been discussed elsewhere.
I've set up a Multisite install; and am trying to set up domain mapping for sub-sites. The main site has wildcard SSL enabled and WP Admin forced to SSL.
The issue is that the mapped domains do not have SSL, links in WP Admin to the frontend show as https:// even when the home URL is defined without SSL.
e.g.
Site URL https://sub.multisite.com/
Home URL: http://sub.com/ (but shows in WP Admin as https://sub.com/ e.g. the "Visit Site" link)
I've tried using the WordPress MU Domain Mapping plugin and Mercator to achieve this, both without success.
WordPress.com has a similar setup but does appear to work (mapped domains don't need SSL and the links from WP Admin are correct); I presume this is a custom solution.
Is there a solution that addresses the issue of SSL with mapped domains?
A: You may try free WordOps - High performance WordPress stack with a few keystrokes installs WP multisite with free Letsencrypt certificates.
A: A Multi-Domain (UCC) SSL certificate will allow your users to choose their own domain to display.
It may be important for you to know that many Certificate Authorities have a limit to the number of certificates that can be issued for a single IP address so if you are running a large network of over 100 people, another solution may be necessary.
In such cases, adding another virtual host with SNI can help you to achieve this result.
Domain mapping with SSL certificates and sub-directories.
Every site in your network can enjoy the privilege once reserved for single installs.
A Standard SSL certificate can be used for Multisite installs with subdirectory paths such as www.your-site.com/site1/ and www.your-site.com/site2.
Standard certificates typically cost less, which is also a bonus.
On the other hand, if your Multisite is set up with subdomains, then a Wildcard SSL certificate will let your customers enjoy domains such as
You can also choose an Extended Validation (EV) certificate which would work well for subdirectory installs, but with an added layer of security. It also includes visible validation for your users to see your site has gone through a more rigorous screening process to ensure your site is safe.
Once you have decided on the kind of SSL certificate you need for your Multisite, it’s time to purchase and set one up for your main network’s domain. If you would like more information on SSL certificates and how to use them in WordPress, check out our post How to Use SSL and HTTPS with WordPress.
| wordpress | {
"language": "en",
"length": 442,
"provenance": "stackexchange_00019.jsonl.gz:455187",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/186029"
} | [
0.03619384765625,
-0.01532745361328125,
0.014923095703125,
0.02862548828125,
-0.010040283203125,
-0.0516357421875,
0.0703125,
-0.032196044921875,
0.00493621826171875,
0.00958251953125,
0.0214691162109375,
-0.007354736328125,
-0.01395416259765625,
-0.054107666015625,
0.0087432861328125,
-0.0191650390625,
0.01271820068359375,
-0.020233154296875,
-0.01641845703125,
-0.0264892578125,
0.0014524459838867188,
0.0024051666259765625,
0.002532958984375,
0.03082275390625,
0.032318115234375,
-0.0172576904296875,
0.035247802734375,
0.0111236572265625,
0.01239776611328125,
0.00537109375,
0.025604248046875,
-0.01546478271484375,
0.036285400390625,
-0.0002532005310058594,
-0.031524658203125,
-0.0215606689453125,
-0.0014944076538085938,
-0.0042572021484375,
-0.004596710205078125,
0.022125244140625,
-0.02471923828125,
0.0299072265625,
0.062408447265625,
0.0159759521484375,
0.0120391845703125,
-0.0643310546875,
0.013153076171875,
-0.05108642578125,
-0.006801605224609375,
-0.0008602142333984375,
0.00846099853515625,
-0.025665283203125,
0.031219482421875,
-0.039154052734375,
-0.0293426513671875,
-0.037750244140625,
-0.015594482421875,
0.022491455078125,
0.0012559890747070312,
0.036346435546875,
0.00785064697265625,
0.05242919921875,
-0.01412200927734375,
-0.01555633544921875,
-0.0389404296875,
0.0079498291015625,
-0.0298614501953125,
-0.032684326171875,
-0.0438232421875,
-0.01139068603515625,
0.036956787109375,
-0.029876708984375,
0.0321044921875,
-0.02996826171875,
0.016448974609375,
0.00848388671875,
-0.0208282470703125,
0.007045745849609375,
0.03729248046875,
-0.0285491943359375,
0.01507568359375,
-0.0229339599609375,
-0.056640625,
0.00029277801513671875,
-0.003170013427734375,
0.016326904296875,
0.00852203369140625,
-0.012908935546875,
-0.038055419921875,
0.0290374755859375,
-0.034881591796875,
-0.0013017654418945312,
-0.011138916015625,
0.01280975341796875,
0.01654052734375,
0.0010442733764648438,
0.029754638671875,
0.047607421875,
0.01338958740234375,
0.01555633544921875,
-0.0247802734375,
-0.0252838134765625,
-0.02386474609375,
-0.024444580078125,
0.00665283203125,
0.05438232421875,
0.0179443359375,
0.0352783203125,
0.03668212890625,
0.0083465576171875,
0.00911712646484375,
0.01953125,
0.000011682510375976562,
-0.0149078369140625,
-0.0256195068359375,
-0.0124359130859375,
-0.0179901123046875,
-0.007678985595703125,
-0.00566864013671875,
-0.01270294189453125,
-0.007160186767578125,
0.03594970703125,
-0.033843994140625,
-0.00046634674072265625,
0.0215301513671875,
0.0173797607421875,
0.017791748046875,
-0.0224456787109375,
-0.01366424560546875,
0.01338958740234375,
-0.055633544921875,
0.00473785400390625,
0.0797119140625,
0.03936767578125,
0.00788116455078125,
-0.0300750732421875,
0.00399017333984375,
-0.006107330322265625,
-0.0162353515625,
0.0205078125,
0.0169677734375,
-0.032440185546875,
0.004947662353515625,
-0.01088714599609375,
0.059478759765625,
0.031402587890625,
0.0228118896484375,
0.002902984619140625,
0.022613525390625,
-0.03338623046875,
0.026885986328125,
-0.03009033203125,
0.055328369140625,
-0.0019359588623046875,
-0.02435302734375,
-0.0472412109375,
0.0099334716796875,
-0.040618896484375,
-0.0046539306640625,
-0.046905517578125,
-0.0220184326171875,
-0.004146575927734375,
0.030548095703125,
-0.02117919921875,
-0.0223541259765625,
-0.01122283935546875,
-0.004688262939453125,
-0.0065460205078125,
0.0271453857421875,
-0.0026721954345703125,
0.0303497314453125,
-0.0142974853515625,
0.0213775634765625,
0.0159759521484375,
0.0167083740234375,
0.0251617431640625,
0.017242431640625,
0.03790283203125,
0.0196380615234375,
0.0262298583984375,
-0.004299163818359375,
-0.035491943359375,
0.086669921875,
-0.0323486328125,
-0.0361328125,
0.0226898193359375,
-0.0243682861328125,
0.049072265625,
0.04443359375,
0.0125732421875,
-0.0254058837890625,
-0.0041351318359375,
-0.0033931732177734375,
0.0216827392578125,
-0.0032196044921875,
-0.04815673828125,
-0.0286865234375,
-0.01102447509765625,
-0.005542755126953125,
-0.0213165283203125,
-0.07061767578125,
-0.03240966796875,
0.00592803955078125,
0.0621337890625,
0.08026123046875,
-0.035400390625,
0.0252838134765625,
-0.0186309814453125,
0.0039825439453125,
-0.006927490234375,
0.0097808837890625,
-0.024627685546875,
0.024658203125,
-0.07080078125,
-0.041778564453125,
0.0265960693359375,
0.0032520294189453125,
0.0072174072265625,
0.0102691650390625,
-0.005435943603515625,
0.0146942138671875,
-0.01499176025390625,
-0.013275146484375,
0.004253387451171875,
0.000011861324310302734,
0.0099639892578125,
-0.024078369140625,
0.007259368896484375,
0.03216552734375,
0.02801513671875,
0.01410675048828125,
-0.00311279296875,
0.007320404052734375,
0.010528564453125,
-0.061614990234375,
-0.003997802734375,
-0.006862640380859375,
-0.007030487060546875,
-0.006717681884765625,
0.03118896484375,
0.037322998046875,
0.004276275634765625,
-0.00937652587890625,
-0.0294036865234375,
0.051025390625,
-0.0286102294921875,
0.01505279541015625,
-0.03704833984375,
-0.01404571533203125,
0.01103973388671875,
-0.01222991943359375,
0.03924560546875,
0.0195770263671875,
-0.0165863037109375,
0.003177642822265625,
0.053253173828125,
-0.0108795166015625,
-0.042449951171875,
0.0125732421875,
-0.03436279296875,
0.04119873046875,
-0.0457763671875,
-0.077392578125,
0.01378631591796875,
-0.033050537109375,
0.02850341796875,
-0.00001806020736694336,
0.0009703636169433594,
-0.00138092041015625,
0.01378631591796875,
0.018707275390625,
-0.059326171875,
-0.0056304931640625,
0.002872467041015625,
0.08544921875,
0.0093994140625,
-0.048492431640625,
-0.0107421875,
0.00690460205078125,
0.0214996337890625,
-0.0361328125,
-0.010284423828125,
-0.06072998046875,
0.00008416175842285156,
-0.03369140625,
-0.03369140625,
0.043609619140625,
0.034210205078125,
0.0038356781005859375,
0.00838470458984375,
0.02197265625,
0.00945281982421875,
-0.024566650390625,
0.03192138671875,
0.0122833251953125,
-0.0236663818359375,
0.046234130859375,
-0.0677490234375,
0.03570556640625,
-0.0249481201171875,
0.09442138671875,
0.07635498046875,
-0.020111083984375,
0.0285797119140625,
-0.01203155517578125,
-0.0093841552734375,
-0.00948333740234375,
-0.006565093994140625,
-0.0307159423828125,
-0.0164947509765625,
-0.06781005859375,
0.004055023193359375,
-0.0004570484161376953,
-0.045135498046875,
0.00794219970703125,
-0.02069091796875,
-0.0091400146484375,
-0.0297393798828125,
-0.07830810546875,
-0.043914794921875,
-0.05621337890625,
-0.026275634765625,
-0.0064849853515625,
0.04925537109375,
-0.0132598876953125,
0.003643035888671875,
0.068115234375,
0.0178070068359375,
0.0016269683837890625,
-0.047210693359375,
-0.09320068359375,
-0.08868408203125,
-0.0943603515625,
0.01401519775390625,
-0.01007080078125,
0.013153076171875,
0.01593017578125,
-0.0255279541015625,
0.00910186767578125,
0.01155853271484375,
0.037841796875,
0.08526611328125,
-0.0165557861328125,
-0.048431396484375,
-0.050506591796875,
-0.02490234375,
0.00815582275390625,
-0.00543212890625,
0.0211944580078125,
-0.00836944580078125,
0.03631591796875,
-0.0002734661102294922,
0.007904052734375,
-0.01309967041015625,
0.0264129638671875,
-0.09716796875,
-0.0192413330078125,
0.0175018310546875,
-0.0273590087890625,
-0.039154052734375,
0.03314208984375,
-0.040374755859375,
-0.0189361572265625,
-0.0253143310546875,
0.0301513671875,
-0.01203155517578125,
-0.0185699462890625,
-0.0296173095703125,
0.0184783935546875,
-0.0015325546264648438,
0.043182373046875,
-0.00302886962890625,
-0.0269012451171875,
-0.008697509765625,
-0.00791168212890625,
-0.042327880859375,
0.036224365234375,
-0.006237030029296875,
-0.05194091796875,
-0.0195465087890625,
-0.01337432861328125,
-0.046112060546875,
0.035919189453125,
-0.07769775390625,
-0.045135498046875,
0.045501708984375,
-0.00913238525390625,
0.019561767578125,
-0.056610107421875,
-0.04150390625,
-0.042144775390625,
0.08135986328125,
-0.0086212158203125,
-0.02667236328125,
0.016876220703125,
0.0250701904296875,
-0.0295257568359375,
-0.005084991455078125,
-0.005645751953125,
-0.01535797119140625,
-0.0732421875,
-0.0205230712890625,
-0.054779052734375,
-0.0168304443359375,
0.023651123046875,
-0.051116943359375,
0.0069122314453125,
-0.07501220703125,
0.03424072265625,
0.015777587890625,
-0.01068115234375,
0.006927490234375,
-0.03125,
-0.0103912353515625,
-0.03839111328125,
0.0029735565185546875,
-0.048126220703125,
-0.0249176025390625,
-0.0096435546875,
0.0660400390625,
0.0182037353515625,
-0.0085906982421875,
-0.0032901763916015625,
0.044464111328125,
-0.0034389495849609375,
0.0018453598022460938,
-0.0088653564453125,
-0.014068603515625,
0.04522705078125,
0.01413726806640625,
-0.01800537109375,
-0.00098419189453125,
-0.0187835693359375,
-0.0137481689453125,
-0.03729248046875,
-0.0009531974792480469,
-0.00948333740234375,
-0.00836944580078125,
0.0137939453125,
-0.025115966796875,
-0.0279693603515625,
-0.0048675537109375,
-0.025115966796875,
-0.00836944580078125,
-0.0198822021484375,
-0.022003173828125,
0.0013685226440429688,
-0.0251007080078125,
0.025054931640625,
0.0032596588134765625,
-0.031585693359375,
0.00434112548828125,
0.0265350341796875,
0.00894927978515625,
-0.031097412109375,
-0.024749755859375,
-0.004062652587890625,
0.0241546630859375,
-0.0035343170166015625,
0.03839111328125,
0.03790283203125,
0.0191497802734375,
-0.01788330078125,
0.00897979736328125,
0.02667236328125,
0.01497650146484375,
0.00344085693359375,
0.01045989990234375,
-0.01026153564453125,
0.00792694091796875,
0.027587890625,
-0.034332275390625,
0.03857421875,
0.0241546630859375,
-0.0188751220703125,
-0.00395965576171875,
0.007633209228515625,
0.044769287109375,
-0.06707763671875,
-0.0357666015625,
-0.00885009765625,
0.0158233642578125,
-0.04913330078125,
0.042816162109375,
0.021697998046875,
-0.0014019012451171875,
0.00524139404296875,
0.01552581787109375,
-0.002887725830078125,
-0.03643798828125,
-0.007564544677734375,
0.0086517333984375,
0.042083740234375,
-0.051483154296875,
0.0007319450378417969,
-0.007843017578125,
-0.026641845703125,
0.1357421875,
0.007495880126953125,
-0.08099365234375,
0.06732177734375,
-0.0212554931640625,
-0.004169464111328125,
0.03570556640625,
-0.01549530029296875,
0.020751953125,
-0.0009684562683105469,
-0.0364990234375,
-0.0163726806640625,
-0.005207061767578125,
-0.041046142578125,
-0.042816162109375,
-0.01424407958984375,
-0.032318115234375,
0.00160980224609375,
0.01509857177734375,
0.0653076171875,
-0.03955078125,
0.05609130859375,
-0.00827789306640625,
-0.01788330078125,
0.0081939697265625,
0.005268096923828125,
0.006282806396484375,
0.0214080810546875,
-0.007350921630859375,
0.0113525390625,
0.04132080078125,
-0.013671875,
-0.01238250732421875,
0.055145263671875,
0.041595458984375,
0.05780029296875,
0.0179595947265625,
-0.037506103515625,
0.003063201904296875,
-0.02130126953125,
0.038482666015625,
0.0134735107421875,
-0.0390625,
-0.01155853271484375,
-0.01311492919921875,
0.00931549072265625,
0.0006203651428222656,
-0.01120758056640625,
0.01177215576171875,
-0.01024627685546875,
0.03656005859375,
-0.025238037109375,
-0.01045989990234375,
-0.004222869873046875,
0.00505828857421875,
0.032623291015625,
-0.01273345947265625,
-0.00240325927734375,
0.005725860595703125,
0.0094146728515625,
-0.038970947265625,
-0.0237274169921875,
0.033935546875,
-0.04742431640625,
0.01806640625,
0.0010480880737304688,
0.0019321441650390625,
0.0259552001953125,
0.04351806640625,
-0.0039005279541015625,
0.0006546974182128906,
-0.0022525787353515625,
0.0037899017333984375,
-0.016845703125,
-0.00925445556640625,
0.06805419921875,
0.03070068359375,
-0.01422119140625,
-0.0386962890625,
0.032958984375,
0.02178955078125,
-0.017669677734375,
-0.08154296875,
-0.00511932373046875,
-0.01540374755859375,
0.0386962890625,
-0.004871368408203125,
-0.0286712646484375,
0.069091796875,
0.00601959228515625,
0.02783203125,
0.00403594970703125,
0.02923583984375,
0.002628326416015625,
-0.00743865966796875,
0.009246826171875,
-0.0533447265625,
-0.041961669921875,
-0.0084228515625,
-0.0217742919921875,
0.048126220703125,
0.056732177734375,
-0.01074981689453125,
0.0172576904296875,
-0.006145477294921875,
0.0032672882080078125,
-0.0207061767578125,
-0.01267242431640625,
-0.006511688232421875,
0.00841522216796875,
0.0255126953125,
-0.005115509033203125,
0.040374755859375,
-0.032684326171875,
-0.04193115234375,
0.0217437744140625,
-0.00667572021484375,
0.01371002197265625,
0.043487548828125,
0.046661376953125,
-0.0229949951171875,
0.03033447265625,
-0.00395965576171875,
0.040191650390625,
0.032867431640625,
0.030487060546875,
0.0294647216796875,
-0.01044464111328125,
-0.035491943359375,
-0.02484130859375,
0.00171661376953125,
-0.0059967041015625,
0.004131317138671875,
0.02032470703125,
-0.00156402587890625,
0.006313323974609375,
0.07635498046875,
0.04156494140625,
-0.09716796875,
-0.00627899169921875,
-0.004894256591796875,
-0.035797119140625,
-0.032928466796875,
0.00036835670471191406,
-0.0025653839111328125,
0.0240478515625,
-0.03704833984375,
-0.0121002197265625,
-0.058837890625,
-0.0214385986328125,
0.032012939453125,
-0.0223541259765625,
-0.0219573974609375,
0.04132080078125,
0.00830078125,
-0.020172119140625,
0.021240234375,
-0.0095062255859375,
0.017333984375,
0.006992340087890625,
0.005306243896484375,
0.01995849609375,
-0.0305633544921875,
-0.052947998046875,
-0.0191650390625,
-0.017242431640625,
-0.039794921875,
-0.0033721923828125,
0.0178375244140625,
0.0390625,
0.054412841796875,
0.0037822723388671875,
-0.006072998046875,
0.0282135009765625,
0.0262908935546875,
0.037384033203125,
-0.0166778564453125,
0.0092926025390625,
0.00888824462890625,
-0.028533935546875,
0.01410675048828125,
0.004505157470703125,
-0.02374267578125,
-0.01007080078125,
0.0149078369140625,
0.062469482421875,
-0.0033721923828125,
-0.0230712890625,
0.0290679931640625,
0.0626220703125,
-0.0027103424072265625,
0.0070037841796875,
0.04180908203125,
-0.03167724609375,
-0.0261688232421875,
0.0250396728515625,
-0.025299072265625,
-0.01244354248046875,
0.0088348388671875,
-0.0238037109375,
0.0677490234375,
-0.0088653564453125,
0.007221221923828125,
0.01143646240234375,
0.0235443115234375,
-0.0104522705078125,
0.036529541015625,
0.0022754669189453125,
0.033477783203125,
0.0157012939453125,
-0.0225677490234375,
-0.03411865234375,
-0.020660400390625,
-0.0232391357421875,
0.07196044921875,
0.02337646484375,
0.0191650390625,
-0.09173583984375,
0.004505157470703125,
0.0167999267578125,
0.0185546875,
0.018707275390625,
0.07769775390625,
-0.0267791748046875,
0.026397705078125,
0.050201416015625,
-0.04290771484375,
0.01363372802734375,
0.022674560546875,
-0.0258636474609375,
-0.0018224716186523438,
0.0021820068359375,
-0.01389312744140625,
0.04156494140625,
-0.005702972412109375,
-0.0229644775390625,
0.03387451171875,
0.00849151611328125,
0.0137786865234375,
0.0290374755859375,
-0.022613525390625,
-0.045318603515625,
0.0248870849609375,
0.083740234375,
-0.0176239013671875,
0.032501220703125,
-0.03662109375,
-0.0252685546875,
0.0280914306640625,
0.01241302490234375,
-0.00691986083984375,
0.00002849102020263672,
-0.029266357421875,
-0.00359344482421875,
0.0139312744140625,
-0.007251739501953125,
0.013946533203125,
0.01507568359375,
0.0020351409912109375,
0.0243072509765625,
0.035614013671875,
0.01468658447265625,
-0.02081298828125,
-0.052276611328125,
0.01038360595703125,
0.004108428955078125,
0.020599365234375,
0.03668212890625,
0.0435791015625,
-0.01061248779296875,
0.01537322998046875,
-0.0005788803100585938,
0.0102386474609375,
0.0114593505859375,
-0.00595855712890625,
-0.004024505615234375,
-0.0086517333984375,
0.005710601806640625,
0.043701171875,
-0.0131072998046875,
-0.0278778076171875,
-0.0018777847290039062,
0.06170654296875,
0.036865234375,
0.060333251953125,
-0.042999267578125,
-0.037017822265625,
0.00188446044921875,
0.0280303955078125,
0.00322723388671875,
-0.018829345703125,
-0.02081298828125,
-0.062347412109375,
0.032470703125,
0.031463623046875,
0.025634765625,
0.032928466796875,
0.06378173828125,
0.06878662109375,
-0.003902435302734375,
0.0009427070617675781,
0.06085205078125,
-0.0024318695068359375,
0.03533935546875,
-0.05010986328125,
0.0399169921875,
-0.011932373046875,
-0.0011730194091796875,
-0.0296478271484375,
0.0092315673828125,
0.049072265625,
0.021728515625,
0.046630859375,
-0.007465362548828125,
0.01611328125,
0.0231781005859375,
-0.000362396240234375,
0.0151519775390625,
0.01280975341796875,
-0.0335693359375,
-0.003330230712890625,
0.01123809814453125,
-0.02655029296875,
-0.0027370452880859375,
0.036163330078125,
-0.01036834716796875,
0.00995635986328125,
0.0035343170166015625,
-0.038818359375,
0.046661376953125,
0.0072479248046875,
-0.01502227783203125,
-0.00380706787109375,
0.006565093994140625,
-0.036041259765625,
-0.0274658203125,
-0.003955841064453125,
0.0166778564453125,
0.0248565673828125,
-0.0216522216796875,
0.11444091796875,
-0.045379638671875,
-0.0095062255859375,
0.00827789306640625,
-0.0289459228515625,
0.03839111328125,
-0.005191802978515625,
-0.00890350341796875,
0.0132904052734375,
0.0196533203125,
-0.014312744140625,
-0.01123046875,
0.0125579833984375,
0.032379150390625,
-0.0523681640625,
0.0020694732666015625,
0.0064239501953125,
0.00838470458984375,
-0.03033447265625,
0.01224517822265625,
-0.047515869140625,
-0.0767822265625,
-0.097900390625,
0.00872039794921875,
0.0100555419921875,
0.0169677734375,
-0.024871826171875,
0.05841064453125,
-0.050506591796875,
-0.0106048583984375,
0.007053375244140625,
-0.0726318359375,
-0.0248870849609375,
0.01528167724609375,
-0.017120361328125,
0.0018463134765625,
0.01953125,
-0.00930023193359375,
0.03131103515625,
-0.0014219284057617188,
0.01410675048828125,
0.01174163818359375,
0.004962921142578125,
-0.0145111083984375,
0.02886962890625,
0.01434326171875,
-0.01708984375,
0.0026340484619140625,
0.05419921875,
-0.0290069580078125,
-0.03546142578125,
-0.0266265869140625,
-0.0323486328125,
-0.0288543701171875,
-0.006679534912109375,
0.0035686492919921875,
-0.0157012939453125,
-0.057525634765625,
-0.0419921875,
-0.03619384765625,
0.037933349609375,
-0.01137542724609375,
0.00494384765625,
-0.01123809814453125,
-0.046661376953125,
-0.0084228515625,
0.0013875961303710938,
0.006378173828125,
-0.00547027587890625,
0.0191650390625,
-0.032470703125,
-0.0184326171875,
-0.0278472900390625,
0.016815185546875,
-0.02862548828125,
0.0143585205078125,
0.03924560546875,
-0.01381683349609375,
-0.0185394287109375,
-0.006458282470703125,
-0.0065155029296875,
0.03961181640625,
0.00885009765625,
-0.007785797119140625,
0.006427764892578125,
-0.026092529296875,
-0.030364990234375,
-0.0280609130859375,
0.0210723876953125,
-0.062255859375,
-0.033660888671875,
-0.0169525146484375,
0.007236480712890625,
0.00217437744140625,
-0.034027099609375,
-0.04803466796875,
0.07562255859375,
-0.01375579833984375,
-0.01116943359375,
-0.07080078125,
-0.02044677734375,
-0.007434844970703125,
0.034942626953125,
-0.020477294921875,
-0.015655517578125,
-0.043243408203125,
0.050140380859375,
0.02197265625,
0.016082763671875,
-0.03167724609375,
0.057037353515625,
0.0079345703125,
0.0657958984375,
0.051971435546875,
-0.02734375,
0.02838134765625,
-0.0209808349609375,
0.055419921875,
0.062469482421875,
-0.0190277099609375,
0.0003178119659423828,
0.017974853515625,
-0.057373046875,
0.005970001220703125,
0.017578125,
-0.039794921875,
-0.0164031982421875,
0.0227813720703125,
0.045318603515625,
0.0163421630859375,
-0.01076507568359375,
-0.02545166015625,
-0.033721923828125,
-0.01032257080078125,
-0.00008314847946166992,
0.0259552001953125,
-0.06109619140625,
0.0199737548828125,
0.0246734619140625,
-0.00885009765625,
0.020751953125,
0.0033702850341796875,
-0.006313323974609375,
0.01873779296875,
0.053741455078125,
-0.0206451416015625,
-0.0036182403564453125,
0.023406982421875,
0.0645751953125,
-0.052032470703125,
0.0008611679077148438,
-0.02392578125,
0.0175323486328125,
0.0114288330078125,
-0.0611572265625,
-0.00408172607421875,
0.032745361328125,
-0.0247650146484375,
0.0006718635559082031,
0.016632080078125,
-0.00977325439453125,
-0.0170440673828125,
-0.0029277801513671875,
-0.0526123046875,
0.0265655517578125,
0.0252838134765625,
0.04986572265625,
-0.0181884765625,
-0.0222015380859375,
0.042572021484375,
0.001575469970703125,
-0.01003265380859375,
0.0265655517578125,
-0.021240234375,
0.0765380859375,
-0.0079803466796875,
-0.0307159423828125,
0.012603759765625,
-0.03289794921875,
0.012908935546875,
0.01369476318359375,
-0.007221221923828125,
-0.0119171142578125,
-0.01039886474609375,
-0.09466552734375,
-0.0011272430419921875,
-0.0005903244018554688
]
|
e239c14f2407ed5a84d277101b491f0ad6abf175 | Wordpress Stackexchange
Q: Add a custom tab alongside Screen Options and Help Using the WP_Screen object, is it possible to add additional tabs to a custom admin settings page?
I already have Screen Options and Help, but I also wish to add a Import/Export tab. I've looked in to extending the WP_Screen object, but it's declared as final in the core (/wp-admin/includes/screen.php, line 194 {ver 4.2.1}).
I'd consider adding my import/export option to the Screen Options tab, but looking at WP_Screen object I can't see that even this is possible. Edit This is possible using the screen_settings filter, but I'd still like to achieve my primary goal if possible.
A: I changed my mind about "Most important: in the hook for validating updates, set-screen-option, pass the $value back if your plugin does not recognize the $option ! It's probably for another plugin!"
It's better to go with what the hook suggest and send back $status (which is false) if you don't know the $option.
To prevent conflicts with other plugins, instead I put in a $_GET['page'] check before adding the validator filter.
| Q: Add a custom tab alongside Screen Options and Help Using the WP_Screen object, is it possible to add additional tabs to a custom admin settings page?
I already have Screen Options and Help, but I also wish to add a Import/Export tab. I've looked in to extending the WP_Screen object, but it's declared as final in the core (/wp-admin/includes/screen.php, line 194 {ver 4.2.1}).
I'd consider adding my import/export option to the Screen Options tab, but looking at WP_Screen object I can't see that even this is possible. Edit This is possible using the screen_settings filter, but I'd still like to achieve my primary goal if possible.
A: I changed my mind about "Most important: in the hook for validating updates, set-screen-option, pass the $value back if your plugin does not recognize the $option ! It's probably for another plugin!"
It's better to go with what the hook suggest and send back $status (which is false) if you don't know the $option.
To prevent conflicts with other plugins, instead I put in a $_GET['page'] check before adding the validator filter.
| wordpress | {
"language": "en",
"length": 180,
"provenance": "stackexchange_00019.jsonl.gz:455242",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/186233"
} | [
0.08563232421875,
0.0012483596801757812,
0.03717041015625,
-0.044677734375,
0.016021728515625,
-0.01209259033203125,
0.037139892578125,
-0.03924560546875,
-0.031982421875,
-0.0175628662109375,
-0.00957489013671875,
0.00777435302734375,
-0.0792236328125,
-0.0474853515625,
0.0276947021484375,
-0.05804443359375,
0.04095458984375,
-0.052001953125,
0.00473785400390625,
-0.00017833709716796875,
0.0164642333984375,
0.01293182373046875,
0.00846099853515625,
0.040802001953125,
0.034942626953125,
-0.0106658935546875,
-0.032806396484375,
-0.0007491111755371094,
0.01207733154296875,
0.01702880859375,
0.005123138427734375,
-0.02825927734375,
0.01538848876953125,
0.0511474609375,
-0.0360107421875,
0.005901336669921875,
0.021636962890625,
0.0016765594482421875,
0.01007843017578125,
0.0232696533203125,
0.0232391357421875,
-0.003253936767578125,
0.038299560546875,
0.046142578125,
-0.005046844482421875,
-0.03387451171875,
0.0194854736328125,
-0.04595947265625,
0.02398681640625,
0.0205535888671875,
-0.01296234130859375,
-0.0160369873046875,
-0.0214996337890625,
-0.022430419921875,
-0.007598876953125,
-0.01062774658203125,
-0.005855560302734375,
0.0018987655639648438,
0.023529052734375,
0.0289154052734375,
-0.0246429443359375,
-0.0037403106689453125,
-0.0005712509155273438,
-0.033538818359375,
0.006481170654296875,
-0.0241241455078125,
-0.007053375244140625,
0.01500701904296875,
-0.0258636474609375,
-0.010284423828125,
0.038818359375,
-0.0267486572265625,
0.01016998291015625,
-0.0171966552734375,
-0.007404327392578125,
-0.014984130859375,
0.02532958984375,
-0.018798828125,
0.0107421875,
0.0025348663330078125,
0.0006341934204101562,
-0.02227783203125,
-0.0009908676147460938,
-0.0199127197265625,
0.0193328857421875,
0.027618408203125,
-0.00978851318359375,
-0.0127410888671875,
0.024169921875,
-0.004871368408203125,
0.0157470703125,
-0.043609619140625,
0.0002562999725341797,
0.048126220703125,
0.0142822265625,
-0.032989501953125,
0.0141143798828125,
0.026031494140625,
0.029205322265625,
0.03729248046875,
0.0120849609375,
-0.04180908203125,
0.047760009765625,
-0.03314208984375,
0.01160430908203125,
0.03399658203125,
0.01480865478515625,
-0.0111541748046875,
0.01116943359375,
-0.008331298828125,
-0.024383544921875,
-0.0159759521484375,
0.0178985595703125,
-0.002956390380859375,
-0.031982421875,
-0.0188446044921875,
-0.01727294921875,
-0.0114288330078125,
0.00812530517578125,
-0.026153564453125,
-0.0087738037109375,
0.042205810546875,
-0.0430908203125,
-0.03851318359375,
-0.022552490234375,
-0.046173095703125,
0.0095977783203125,
-0.01291656494140625,
-0.02117919921875,
-0.0251007080078125,
-0.0250091552734375,
0.0374755859375,
0.05291748046875,
0.0311126708984375,
0.0017099380493164062,
0.00637054443359375,
0.042999267578125,
-0.00754547119140625,
0.005764007568359375,
0.004253387451171875,
-0.01021575927734375,
0.006145477294921875,
-0.0154571533203125,
-0.033905029296875,
0.003902435302734375,
0.01270294189453125,
-0.0020847320556640625,
0.033660888671875,
0.024200439453125,
-0.05560302734375,
0.070556640625,
-0.035797119140625,
0.003276824951171875,
0.0177764892578125,
0.014404296875,
-0.0171966552734375,
0.00646209716796875,
-0.010101318359375,
0.01421356201171875,
-0.002445220947265625,
0.0006346702575683594,
-0.01454925537109375,
0.023345947265625,
-0.0457763671875,
-0.03070068359375,
0.008270263671875,
-0.058441162109375,
-0.0029449462890625,
0.01806640625,
0.01629638671875,
-0.033660888671875,
-0.01043701171875,
-0.00519561767578125,
0.02752685546875,
0.00815582275390625,
0.045745849609375,
0.01201629638671875,
-0.015625,
0.036773681640625,
0.01215362548828125,
-0.022552490234375,
-0.0311126708984375,
0.059234619140625,
-0.05340576171875,
-0.0445556640625,
-0.01412200927734375,
-0.006328582763671875,
0.0217437744140625,
0.042724609375,
0.01318359375,
0.00948333740234375,
-0.0269622802734375,
-0.019073486328125,
-0.0440673828125,
-0.022735595703125,
0.01483917236328125,
0.0225677490234375,
0.0182647705078125,
-0.01898193359375,
0.042938232421875,
-0.023681640625,
-0.017852783203125,
0.00624847412109375,
0.0120849609375,
-0.0180511474609375,
-0.0256805419921875,
-0.00421905517578125,
0.0311126708984375,
0.004085540771484375,
-0.0186920166015625,
0.006603240966796875,
-0.03082275390625,
-0.002864837646484375,
-0.007122039794921875,
-0.03192138671875,
0.01348876953125,
-0.0008454322814941406,
0.045074462890625,
0.0025806427001953125,
-0.005397796630859375,
0.049835205078125,
-0.051544189453125,
0.0364990234375,
0.01486968994140625,
0.009246826171875,
0.007106781005859375,
-0.033416748046875,
-0.005077362060546875,
0.0018281936645507812,
-0.0012083053588867188,
0.01525115966796875,
0.051849365234375,
0.049957275390625,
0.0238800048828125,
-0.01023101806640625,
-0.00750732421875,
0.027130126953125,
-0.082275390625,
0.004909515380859375,
0.048858642578125,
0.048126220703125,
0.032745361328125,
-0.006458282470703125,
-0.0330810546875,
0.023284912109375,
-0.042388916015625,
0.0172119140625,
-0.025238037109375,
-0.0089569091796875,
0.0218353271484375,
-0.0229034423828125,
0.012176513671875,
0.018829345703125,
-0.02752685546875,
0.0066986083984375,
0.03253173828125,
-0.06451416015625,
-0.00678253173828125,
0.00908660888671875,
-0.03271484375,
0.0014438629150390625,
-0.036773681640625,
0.007610321044921875,
-0.031402587890625,
0.036163330078125,
-0.004642486572265625,
0.02886962890625,
0.0169525146484375,
-0.0308990478515625,
-0.01033782958984375,
0.022064208984375,
0.00673675537109375,
-0.01018524169921875,
-0.0098419189453125,
0.027099609375,
0.005901336669921875,
-0.053436279296875,
0.012786865234375,
0.003635406494140625,
-0.008575439453125,
-0.0170135498046875,
-0.001377105712890625,
-0.0107574462890625,
-0.01067352294921875,
0.00217437744140625,
-0.03192138671875,
0.0231475830078125,
-0.0023632049560546875,
0.00434112548828125,
-0.045379638671875,
0.014251708984375,
-0.005428314208984375,
-0.043914794921875,
0.046539306640625,
-0.0308990478515625,
-0.048828125,
0.04473876953125,
-0.0322265625,
0.043365478515625,
-0.051483154296875,
0.05560302734375,
0.0623779296875,
-0.043975830078125,
0.035491943359375,
0.014739990234375,
-0.022613525390625,
0.0028839111328125,
0.004589080810546875,
0.01361083984375,
0.0035190582275390625,
-0.0283660888671875,
0.045166015625,
0.017974853515625,
0.060089111328125,
-0.0260009765625,
-0.049835205078125,
-0.01119232177734375,
0.00409698486328125,
-0.049560546875,
-0.05206298828125,
-0.003070831298828125,
-0.04547119140625,
-0.01458740234375,
0.023681640625,
-0.031585693359375,
0.007396697998046875,
0.054443359375,
0.007709503173828125,
0.00176239013671875,
-0.0307769775390625,
0.022857666015625,
-0.039581298828125,
-0.060211181640625,
-0.04296875,
0.024017333984375,
0.00901031494140625,
0.005496978759765625,
0.053131103515625,
0.0178985595703125,
-0.045135498046875,
0.0028018951416015625,
-0.0144195556640625,
-0.00901031494140625,
-0.000675201416015625,
0.018218994140625,
-0.04541015625,
0.034515380859375,
-0.01007843017578125,
0.0034084320068359375,
0.0244903564453125,
0.00698089599609375,
-0.021148681640625,
-0.0217742919921875,
0.00408172607421875,
-0.04632568359375,
0.00997161865234375,
0.05877685546875,
0.003971099853515625,
-0.031890869140625,
-0.03460693359375,
-0.0019550323486328125,
0.041717529296875,
0.0002579689025878906,
-0.016754150390625,
-0.05328369140625,
-0.03765869140625,
0.044097900390625,
-0.0035037994384765625,
0.0215606689453125,
0.0185394287109375,
0.0255279541015625,
0.0189208984375,
-0.037017822265625,
-0.01148223876953125,
0.0056304931640625,
-0.0251617431640625,
0.0187225341796875,
-0.01678466796875,
0.0195770263671875,
0.0171051025390625,
-0.005611419677734375,
0.003528594970703125,
0.00862884521484375,
0.009033203125,
-0.07470703125,
0.055633544921875,
-0.00045800209045410156,
0.001697540283203125,
-0.033905029296875,
-0.035247802734375,
-0.0005626678466796875,
0.10028076171875,
-0.04388427734375,
-0.03009033203125,
-0.0251922607421875,
0.041961669921875,
-0.008544921875,
-0.0706787109375,
0.04180908203125,
-0.032928466796875,
-0.041778564453125,
0.00958251953125,
-0.0060272216796875,
-0.0306549072265625,
-0.0243072509765625,
0.006725311279296875,
-0.03411865234375,
-0.0203094482421875,
0.05609130859375,
-0.005970001220703125,
0.0031452178955078125,
0.04766845703125,
-0.0037841796875,
0.0026035308837890625,
-0.032135009765625,
0.004730224609375,
-0.10552978515625,
-0.0099639892578125,
-0.0196685791015625,
0.06829833984375,
0.0263824462890625,
-0.06427001953125,
0.00914764404296875,
0.05267333984375,
0.03228759765625,
0.01995849609375,
0.0274505615234375,
-0.0005774497985839844,
0.0125579833984375,
-0.0188751220703125,
0.026123046875,
-0.04290771484375,
-0.0004382133483886719,
-0.0281219482421875,
-0.041900634765625,
0.0255126953125,
-0.0245819091796875,
0.0239715576171875,
-0.01299285888671875,
-0.0174407958984375,
-0.051971435546875,
-0.01702880859375,
-0.014739990234375,
-0.00556182861328125,
-0.0009107589721679688,
-0.031890869140625,
-0.002017974853515625,
-0.04168701171875,
-0.01091766357421875,
-0.00788116455078125,
-0.04266357421875,
0.0333251953125,
0.04620361328125,
0.036865234375,
-0.00801849365234375,
-0.079833984375,
-0.018524169921875,
0.0140838623046875,
-0.01543426513671875,
0.0012865066528320312,
-0.004299163818359375,
-0.0165252685546875,
0.014984130859375,
-0.0272979736328125,
-0.03265380859375,
-0.00928497314453125,
0.0147857666015625,
0.005706787109375,
-0.003955841064453125,
-0.0233917236328125,
-0.041107177734375,
0.07171630859375,
0.0276947021484375,
0.00030541419982910156,
-0.032928466796875,
-0.00945281982421875,
0.023223876953125,
-0.02447509765625,
0.04010009765625,
-0.00843048095703125,
0.0021572113037109375,
-0.0178680419921875,
0.02581787109375,
0.040191650390625,
0.0207061767578125,
0.003917694091796875,
0.002471923828125,
0.01355743408203125,
0.03656005859375,
0.0014400482177734375,
0.02972412109375,
-0.0212860107421875,
0.05120849609375,
0.029052734375,
0.020843505859375,
-0.0027980804443359375,
0.011077880859375,
0.014068603515625,
-0.012176513671875,
-0.037200927734375,
-0.0765380859375,
-0.006473541259765625,
-0.0208282470703125,
-0.001678466796875,
0.0061798095703125,
0.019134521484375,
-0.0007271766662597656,
-0.019805908203125,
0.008941650390625,
0.02325439453125,
-0.033447265625,
-0.03472900390625,
0.0065460205078125,
-0.0111083984375,
-0.0008559226989746094,
0.00473785400390625,
0.07147216796875,
-0.0755615234375,
0.049560546875,
0.0088653564453125,
0.0011272430419921875,
0.031768798828125,
0.00016760826110839844,
0.01177978515625,
0.01143646240234375,
0.021392822265625,
-0.030975341796875,
0.05389404296875,
-0.004230499267578125,
0.032440185546875,
0.0028285980224609375,
0.039031982421875,
-0.0185699462890625,
-0.04083251953125,
0.0207061767578125,
-0.062164306640625,
-0.035797119140625,
0.042449951171875,
-0.0067596435546875,
-0.07989501953125,
-0.03173828125,
0.01309967041015625,
0.01380157470703125,
-0.0286102294921875,
-0.0003864765167236328,
0.0400390625,
-0.007785797119140625,
0.0019855499267578125,
0.01235198974609375,
-0.013397216796875,
-0.0277099609375,
-0.005153656005859375,
-0.0207977294921875,
0.0166168212890625,
0.00939178466796875,
-0.054962158203125,
-0.06719970703125,
0.0023059844970703125,
0.006069183349609375,
0.019500732421875,
-0.026031494140625,
0.038055419921875,
-0.02508544921875,
-0.018310546875,
-0.019989013671875,
0.0174102783203125,
0.02392578125,
0.0041046142578125,
-0.03778076171875,
0.01161956787109375,
-0.050018310546875,
-0.0178680419921875,
-0.040191650390625,
-0.055816650390625,
-0.03851318359375,
-0.0247955322265625,
0.0283660888671875,
0.0303955078125,
0.002079010009765625,
-0.046295166015625,
-0.046051025390625,
0.00936126708984375,
0.04583740234375,
0.0287017822265625,
0.0123748779296875,
0.07989501953125,
-0.0286712646484375,
0.0810546875,
0.016571044921875,
0.034759521484375,
-0.0224761962890625,
-0.0159912109375,
-0.005008697509765625,
-0.0260772705078125,
-0.0168609619140625,
-0.0200042724609375,
0.036651611328125,
0.054779052734375,
0.040679931640625,
0.002658843994140625,
0.0267791748046875,
-0.01441192626953125,
-0.0094757080078125,
-0.0119171142578125,
0.003173828125,
-0.0167236328125,
0.00485992431640625,
0.0458984375,
-0.03704833984375,
0.019256591796875,
0.014495849609375,
0.025604248046875,
0.009368896484375,
-0.04718017578125,
0.034912109375,
0.004909515380859375,
-0.08404541015625,
0.06640625,
0.07244873046875,
-0.007717132568359375,
0.03363037109375,
-0.0216522216796875,
-0.0008387565612792969,
0.03717041015625,
0.0306396484375,
0.007564544677734375,
0.00003165006637573242,
0.0227508544921875,
-0.0016956329345703125,
-0.00580596923828125,
-0.0037136077880859375,
-0.0225677490234375,
0.040618896484375,
0.0650634765625,
0.0732421875,
-0.119873046875,
0.02972412109375,
0.0343017578125,
0.03387451171875,
0.060699462890625,
-0.00601959228515625,
-0.0006084442138671875,
-0.032684326171875,
0.0286407470703125,
-0.00629425048828125,
-0.007015228271484375,
0.0145721435546875,
-0.0247650146484375,
-0.015289306640625,
-0.00243377685546875,
0.0059967041015625,
0.0025997161865234375,
0.00858306884765625,
-0.0070037841796875,
-0.006786346435546875,
-0.0027790069580078125,
0.01953125,
0.04949951171875,
0.00005561113357543945,
-0.016082763671875,
-0.0482177734375,
0.00543212890625,
-0.02850341796875,
-0.055328369140625,
0.03594970703125,
0.0205841064453125,
0.010498046875,
0.043060302734375,
0.00215911865234375,
-0.0019245147705078125,
0.004695892333984375,
0.0269775390625,
0.025146484375,
0.0174560546875,
0.00823211669921875,
-0.0010213851928710938,
-0.006809234619140625,
-0.005504608154296875,
-0.0305633544921875,
-0.00363922119140625,
-0.0071868896484375,
-0.018463134765625,
0.0634765625,
0.00991058349609375,
-0.04168701171875,
-0.00008159875869750977,
-0.020599365234375,
0.00885009765625,
0.0205841064453125,
0.01218414306640625,
-0.054962158203125,
-0.050994873046875,
0.019805908203125,
-0.08892822265625,
-0.040924072265625,
-0.0034732818603515625,
-0.05035400390625,
0.1307373046875,
0.01042938232421875,
0.00946807861328125,
0.0269927978515625,
0.052703857421875,
-0.06524658203125,
0.0183563232421875,
-0.0220184326171875,
0.0166473388671875,
0.050201416015625,
0.023529052734375,
-0.036163330078125,
-0.0300140380859375,
-0.007228851318359375,
0.065673828125,
0.0025157928466796875,
0.00930023193359375,
-0.038055419921875,
0.0222015380859375,
0.04315185546875,
0.00597381591796875,
0.016204833984375,
0.055328369140625,
0.0241241455078125,
0.011383056640625,
0.039581298828125,
-0.0295257568359375,
0.0221099853515625,
-0.0094757080078125,
0.00911712646484375,
0.03607177734375,
0.0121307373046875,
0.016143798828125,
-0.0216522216796875,
0.0242919921875,
0.003192901611328125,
-0.011871337890625,
-0.00487518310546875,
-0.07122802734375,
0.03631591796875,
0.00803375244140625,
-0.0188140869140625,
0.006458282470703125,
0.005596160888671875,
-0.013946533203125,
0.0201873779296875,
-0.03192138671875,
-0.010406494140625,
0.00928497314453125,
0.0199432373046875,
-0.02197265625,
-0.03253173828125,
-0.00853729248046875,
0.0157012939453125,
-0.03289794921875,
0.005840301513671875,
0.002025604248046875,
0.016448974609375,
-0.008026123046875,
0.044403076171875,
0.006099700927734375,
0.0019969940185546875,
-0.034576416015625,
-0.08349609375,
0.00316619873046875,
0.0059967041015625,
0.0234832763671875,
0.039398193359375,
0.0235443115234375,
-0.016571044921875,
0.062286376953125,
-0.02978515625,
0.0234832763671875,
0.0209197998046875,
0.00730133056640625,
-0.002838134765625,
0.06298828125,
-0.060028076171875,
0.0233001708984375,
-0.05682373046875,
0.0028324127197265625,
0.01385498046875,
0.045074462890625,
0.02496337890625,
0.040374755859375,
0.01959228515625,
-0.017822265625,
-0.0284423828125,
0.028533935546875,
-0.00562286376953125,
0.0305938720703125,
-0.0330810546875,
-0.014739990234375,
0.00435638427734375,
0.00408935546875,
-0.032958984375,
0.01331329345703125,
0.01142120361328125,
0.0328369140625,
0.004180908203125,
-0.0177001953125,
0.0215911865234375,
-0.019744873046875,
-0.0191650390625,
-0.0513916015625,
0.04193115234375,
0.04864501953125,
0.0229034423828125,
0.0211944580078125,
-0.03216552734375,
0.090087890625,
0.005374908447265625,
0.0146636962890625,
0.003986358642578125,
-0.049224853515625,
0.01800537109375,
0.024566650390625,
0.11846923828125,
0.0467529296875,
-0.060577392578125,
-0.01209259033203125,
-0.03350830078125,
-0.01413726806640625,
0.008636474609375,
0.03704833984375,
0.022186279296875,
-0.004711151123046875,
0.0214996337890625,
-0.01397705078125,
0.01117706298828125,
-0.00798797607421875,
0.014801025390625,
-0.004878997802734375,
0.0013675689697265625,
0.005859375,
-0.05535888671875,
-0.0263214111328125,
-0.006404876708984375,
0.042877197265625,
-0.00023245811462402344,
0.02569580078125,
0.0004467964172363281,
0.02215576171875,
-0.013824462890625,
0.0262603759765625,
-0.01617431640625,
-0.025177001953125,
0.0438232421875,
0.02325439453125,
0.00443267822265625,
-0.0185089111328125,
-0.058807373046875,
-0.0070343017578125,
0.03680419921875,
-0.0288543701171875,
-0.02337646484375,
0.00756072998046875,
0.03204345703125,
-0.00540924072265625,
0.0265655517578125,
-0.017547607421875,
-0.031951904296875,
-0.0130615234375,
0.007587432861328125,
-0.001140594482421875,
-0.006015777587890625,
-0.012908935546875,
0.019989013671875,
0.0186767578125,
0.02423095703125,
-0.002292633056640625,
0.048614501953125,
-0.0118560791015625,
0.0296478271484375,
-0.0548095703125,
-0.03656005859375,
-0.01389312744140625,
-0.006099700927734375,
0.009918212890625,
0.0012998580932617188,
0.05072021484375,
0.01837158203125,
-0.0012416839599609375,
0.0479736328125,
0.03546142578125,
0.028564453125,
-0.03924560546875,
-0.00916290283203125,
0.055877685546875,
-0.01041412353515625,
0.007434844970703125,
-0.011383056640625,
-0.0316162109375,
-0.068115234375,
-0.00579833984375,
0.02227783203125,
-0.038055419921875,
-0.036834716796875,
-0.0810546875,
0.0269927978515625,
0.038665771484375,
0.015899658203125,
-0.07904052734375,
0.0543212890625,
-0.031890869140625,
0.04827880859375,
0.00959014892578125,
0.02410888671875,
-0.005123138427734375,
-0.020721435546875,
-0.035980224609375,
-0.0187835693359375,
-0.00345611572265625,
0.039276123046875,
0.00974273681640625,
0.036834716796875,
0.04803466796875,
-0.03564453125,
-0.02294921875,
0.0225067138671875,
0.016021728515625,
0.07464599609375,
0.00727081298828125,
-0.014678955078125,
0.0007171630859375,
0.0079803466796875,
-0.031646728515625,
-0.02545166015625,
0.00428009033203125,
-0.005519866943359375,
-0.0013027191162109375,
0.006603240966796875,
-0.0037555694580078125,
0.0116729736328125,
-0.042724609375,
-0.078125,
0.038848876953125,
0.0073089599609375,
-0.03009033203125,
-0.0006270408630371094,
0.0033893585205078125,
-0.03363037109375,
0.036895751953125,
0.01343536376953125,
-0.041595458984375,
0.0202789306640625,
0.0189971923828125,
0.015625,
0.00788116455078125,
0.0200347900390625,
-0.007724761962890625,
-0.041259765625,
0.0008997917175292969,
-0.01045989990234375,
0.01534271240234375,
0.007678985595703125,
-0.0219879150390625,
0.0248870849609375,
0.038421630859375,
-0.021240234375,
-0.07305908203125,
0.0019855499267578125,
-0.0255584716796875,
-0.009521484375,
-0.032073974609375,
-0.036285400390625,
-0.0067291259765625,
0.0799560546875,
0.0723876953125,
0.0264129638671875,
-0.0401611328125,
-0.0284423828125,
-0.04864501953125,
0.01047515869140625,
-0.036712646484375,
-0.0093994140625,
-0.0594482421875,
-0.0004062652587890625,
-0.007785797119140625,
0.0303192138671875,
0.0243682861328125,
-0.0032863616943359375,
0.025665283203125,
-0.0241241455078125,
0.06915283203125,
0.0208282470703125,
-0.06396484375,
0.0218963623046875,
0.0614013671875,
-0.0440673828125,
0.01031494140625,
0.005870819091796875,
-0.01006317138671875,
0.03070068359375,
0.0201873779296875,
-0.011474609375,
-0.0217742919921875,
-0.054595947265625,
0.0310211181640625,
-0.052276611328125,
0.06298828125,
-0.0709228515625,
-0.0182037353515625,
0.0273895263671875,
0.002590179443359375,
-0.0221405029296875,
-0.0164031982421875,
-0.028167724609375,
0.035980224609375,
-0.0482177734375,
0.06591796875,
-0.01666259765625,
-0.0097198486328125,
-0.0361328125,
0.0202178955078125,
0.00885772705078125,
-0.00844573974609375,
0.05303955078125,
-0.01995849609375,
-0.005191802978515625,
-0.0029296875,
-0.00827789306640625,
-0.059783935546875,
0.0191497802734375,
0.01229095458984375,
0.0103302001953125,
0.033782958984375
]
|
baf375ee8a075e957bdcb805c94e9d4ce4b909db | Wordpress Stackexchange
Q: Programatically change post author Given a user id, $user_id, and post id, $post_id, how can I programatically update a wordpress post author?
Note: these posts are already created and the author cannot be set upon creation. Another process is creating the post and defaulting to the admin as the author. I don't have access to creating the post but have access after it is created.
A: It shouldn't be any problem. Try this:
$arg = array(
'ID' => $post_id,
'post_author' => $user_id,
);
wp_update_post( $arg );
| Q: Programatically change post author Given a user id, $user_id, and post id, $post_id, how can I programatically update a wordpress post author?
Note: these posts are already created and the author cannot be set upon creation. Another process is creating the post and defaulting to the admin as the author. I don't have access to creating the post but have access after it is created.
A: It shouldn't be any problem. Try this:
$arg = array(
'ID' => $post_id,
'post_author' => $user_id,
);
wp_update_post( $arg );
A: you can also just add another admin account. delete the one that's authoring the posts and WP will ask where to assign posts. Choose preferred author, done.
| wordpress | {
"language": "en",
"length": 115,
"provenance": "stackexchange_00019.jsonl.gz:455249",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/186253"
} | [
0.051300048828125,
0.000667572021484375,
0.02960205078125,
0.002655029296875,
-0.0012302398681640625,
-0.021942138671875,
0.0296783447265625,
-0.0550537109375,
-0.03094482421875,
0.0400390625,
-0.01171112060546875,
-0.0050811767578125,
-0.0005979537963867188,
-0.0055694580078125,
-0.0242767333984375,
-0.0401611328125,
0.02703857421875,
-0.0035266876220703125,
-0.0009784698486328125,
-0.021575927734375,
0.007808685302734375,
-0.00328826904296875,
0.0202484130859375,
0.028411865234375,
0.0242767333984375,
-0.0209197998046875,
0.0460205078125,
-0.0207672119140625,
0.029266357421875,
-0.0076446533203125,
0.0306396484375,
-0.0203094482421875,
0.0006732940673828125,
0.0157928466796875,
-0.01226806640625,
0.02056884765625,
-0.00453948974609375,
0.010162353515625,
0.0250701904296875,
-0.003108978271484375,
0.022064208984375,
-0.0040740966796875,
-0.007762908935546875,
0.034088134765625,
-0.031585693359375,
-0.0531005859375,
0.013275146484375,
-0.020721435546875,
0.03228759765625,
-0.0035228729248046875,
-0.0159454345703125,
0.015655517578125,
-0.0079193115234375,
-0.0126190185546875,
-0.018402099609375,
-0.021453857421875,
0.02960205078125,
-0.00809478759765625,
0.05938720703125,
-0.0726318359375,
-0.061065673828125,
-0.0283966064453125,
0.052032470703125,
0.005504608154296875,
0.033111572265625,
0.00659942626953125,
0.040802001953125,
0.02606201171875,
-0.0361328125,
0.0193328857421875,
0.01971435546875,
-0.0287017822265625,
-0.01190185546875,
-0.0126953125,
0.010345458984375,
-0.044342041015625,
0.0267486572265625,
-0.035400390625,
-0.012298583984375,
0.052001953125,
0.055206298828125,
0.02740478515625,
0.043426513671875,
-0.016021728515625,
0.00566864013671875,
-0.0058441162109375,
-0.00027942657470703125,
-0.0232696533203125,
-0.03741455078125,
-0.0108184814453125,
-0.023681640625,
-0.022918701171875,
-0.024017333984375,
0.006671905517578125,
-0.0242156982421875,
-0.003208160400390625,
0.0234375,
0.067138671875,
-0.0246734619140625,
0.01500701904296875,
0.0115203857421875,
-0.0301971435546875,
0.03729248046875,
-0.0462646484375,
-0.03271484375,
0.037139892578125,
0.040435791015625,
0.00711822509765625,
-0.022003173828125,
0.011260986328125,
-0.02484130859375,
-0.01824951171875,
-0.01267242431640625,
0.004741668701171875,
-0.04345703125,
0.0199737548828125,
-0.040863037109375,
-0.004894256591796875,
-0.01557159423828125,
0.0176849365234375,
0.0082855224609375,
0.0169525146484375,
-0.0182647705078125,
-0.0009379386901855469,
0.028472900390625,
-0.0014200210571289062,
-0.039886474609375,
0.0170745849609375,
-0.0143585205078125,
-0.00791168212890625,
-0.068603515625,
0.022308349609375,
0.1448974609375,
0.0599365234375,
0.04034423828125,
-0.0173492431640625,
-0.006931304931640625,
-0.0469970703125,
-0.0267791748046875,
0.024200439453125,
0.01277923583984375,
-0.033050537109375,
0.0072174072265625,
-0.0048675537109375,
0.029052734375,
0.0279388427734375,
0.0087738037109375,
0.01316070556640625,
0.0033111572265625,
-0.03289794921875,
0.00875091552734375,
-0.03240966796875,
-0.0203704833984375,
0.0297698974609375,
0.097412109375,
-0.005962371826171875,
0.0838623046875,
-0.03607177734375,
0.038421630859375,
-0.00862884521484375,
0.0113067626953125,
0.0050811767578125,
0.03082275390625,
0.007598876953125,
-0.01462554931640625,
0.0100250244140625,
-0.037841796875,
-0.0125579833984375,
0.0210723876953125,
-0.0021991729736328125,
0.0226287841796875,
-0.0003483295440673828,
0.0141448974609375,
0.017333984375,
0.00786590576171875,
0.01232147216796875,
-0.037567138671875,
-0.014373779296875,
0.030426025390625,
0.0301055908203125,
0.0024871826171875,
-0.0185089111328125,
0.001888275146484375,
0.0299835205078125,
-0.026519775390625,
0.012237548828125,
0.0223541259765625,
0.068115234375,
0.01715087890625,
0.0212249755859375,
0.02288818359375,
0.002742767333984375,
-0.00739288330078125,
0.00504302978515625,
0.00603485107421875,
-0.033660888671875,
-0.0188446044921875,
-0.0193939208984375,
-0.00959014892578125,
0.0038890838623046875,
-0.0061798095703125,
0.0103912353515625,
-0.0123443603515625,
0.02032470703125,
-0.047149658203125,
0.0005631446838378906,
-0.0162811279296875,
0.0206451416015625,
0.04620361328125,
0.032135009765625,
-0.0015811920166015625,
0.0030975341796875,
0.0025177001953125,
-0.018798828125,
-0.04229736328125,
0.01067352294921875,
-0.0234375,
0.0023365020751953125,
-0.0113525390625,
0.022064208984375,
-0.027191162109375,
-0.01136016845703125,
-0.02862548828125,
0.00563812255859375,
0.04534912109375,
-0.057891845703125,
0.01678466796875,
-0.046875,
0.053680419921875,
-0.0245513916015625,
-0.006671905517578125,
0.00884246826171875,
0.03515625,
-0.0006566047668457031,
-0.03759765625,
-0.0053558349609375,
-0.03485107421875,
-0.0921630859375,
-0.003337860107421875,
0.08428955078125,
0.028900146484375,
-0.0244903564453125,
-0.00191497802734375,
0.02178955078125,
0.06243896484375,
0.0587158203125,
0.042572021484375,
-0.01087188720703125,
0.033111572265625,
0.08184814453125,
-0.01464080810546875,
0.0067291259765625,
0.00360870361328125,
-0.0960693359375,
0.014068603515625,
0.0528564453125,
-0.0172119140625,
0.025604248046875,
-0.03570556640625,
-0.00888824462890625,
0.001155853271484375,
-0.073974609375,
-0.0097503662109375,
-0.045745849609375,
0.040283203125,
0.0015888214111328125,
0.02862548828125,
0.01235198974609375,
-0.054718017578125,
0.00868988037109375,
0.0296783447265625,
0.004001617431640625,
0.022674560546875,
0.031494140625,
-0.051910400390625,
0.01511383056640625,
-0.0271148681640625,
0.0018720626831054688,
0.0252532958984375,
0.01160430908203125,
-0.021453857421875,
-0.0264739990234375,
-0.01180267333984375,
0.005100250244140625,
0.0191650390625,
-0.01959228515625,
0.0305633544921875,
0.01898193359375,
-0.01425933837890625,
-0.0261077880859375,
0.0306549072265625,
-0.00844573974609375,
-0.03424072265625,
0.01450347900390625,
-0.0168914794921875,
-0.0413818359375,
0.03289794921875,
-0.057281494140625,
0.0277557373046875,
-0.0217132568359375,
0.03656005859375,
0.05987548828125,
0.0114288330078125,
0.01241302490234375,
0.016693115234375,
0.0043182373046875,
0.005229949951171875,
0.03704833984375,
0.0230865478515625,
-0.0115814208984375,
-0.0191192626953125,
0.0310516357421875,
0.015899658203125,
0.0499267578125,
-0.006855010986328125,
-0.035797119140625,
-0.0038661956787109375,
0.0299835205078125,
-0.08599853515625,
-0.07501220703125,
-0.0066070556640625,
-0.04638671875,
-0.0258331298828125,
-0.0226287841796875,
-0.031524658203125,
0.00936126708984375,
0.002964019775390625,
-0.0023193359375,
0.001827239990234375,
-0.007137298583984375,
-0.041015625,
-0.025177001953125,
-0.05706787109375,
0.004306793212890625,
-0.01271820068359375,
0.0167388916015625,
0.00843048095703125,
0.04888916015625,
-0.00350189208984375,
-0.044281005859375,
-0.038604736328125,
0.028350830078125,
-0.018524169921875,
-0.0207672119140625,
0.0011749267578125,
-0.0030670166015625,
0.0136871337890625,
0.00933074951171875,
0.014404296875,
0.030609130859375,
-0.0240020751953125,
-0.0151519775390625,
-0.007770538330078125,
0.005115509033203125,
0.0236053466796875,
0.00687408447265625,
-0.00579071044921875,
0.0174102783203125,
0.021759033203125,
-0.03216552734375,
-0.01544189453125,
0.0001646280288696289,
-0.045257568359375,
0.00815582275390625,
-0.00203704833984375,
-0.0025234222412109375,
-0.0264739990234375,
0.031524658203125,
0.015716552734375,
0.01238250732421875,
0.0021877288818359375,
0.001972198486328125,
-0.0026950836181640625,
-0.004573822021484375,
-0.0013666152954101562,
-0.013092041015625,
-0.0063629150390625,
-0.0325927734375,
-0.01715087890625,
-0.0107269287109375,
0.004604339599609375,
-0.006656646728515625,
-0.01099395751953125,
-0.0245208740234375,
-0.046295166015625,
0.0311126708984375,
-0.039581298828125,
0.005802154541015625,
-0.037261962890625,
-0.022064208984375,
-0.00919342041015625,
0.0721435546875,
0.030517578125,
-0.022369384765625,
0.00004780292510986328,
0.00885772705078125,
-0.065673828125,
-0.009185791015625,
-0.034515380859375,
0.006984710693359375,
0.01303863525390625,
0.00827789306640625,
0.0050506591796875,
0.0038242340087890625,
-0.052734375,
0.0897216796875,
-0.0212554931640625,
0.01715087890625,
0.036224365234375,
-0.0404052734375,
0.01264190673828125,
0.0103607177734375,
-0.01251220703125,
0.00018036365509033203,
-0.0285186767578125,
-0.024322509765625,
-0.10516357421875,
-0.0208587646484375,
-0.0125732421875,
0.072265625,
-0.01345062255859375,
0.02081298828125,
-0.048095703125,
0.042388916015625,
-0.01253509521484375,
0.026397705078125,
-0.01611328125,
0.017303466796875,
-0.0292510986328125,
0.00041866302490234375,
-0.009307861328125,
-0.0169219970703125,
-0.015350341796875,
-0.0155792236328125,
0.005374908447265625,
0.0264129638671875,
-0.0382080078125,
-0.01119232177734375,
-0.0233612060546875,
-0.01380157470703125,
-0.08221435546875,
-0.054962158203125,
-0.01898193359375,
0.0321044921875,
-0.02685546875,
0.030548095703125,
-0.07623291015625,
-0.0888671875,
0.10162353515625,
-0.0310821533203125,
0.0189208984375,
-0.0272216796875,
0.1282958984375,
-0.002285003662109375,
-0.0280914306640625,
-0.005950927734375,
-0.01192474365234375,
0.025726318359375,
-0.00909423828125,
0.0286102294921875,
0.00289154052734375,
-0.00983428955078125,
0.043548583984375,
-0.01513671875,
-0.038330078125,
0.0157470703125,
0.03265380859375,
0.01849365234375,
-0.03277587890625,
0.0203704833984375,
-0.006122589111328125,
0.0227813720703125,
-0.03326416015625,
-0.0200042724609375,
0.0345458984375,
0.0142364501953125,
0.005931854248046875,
-0.004207611083984375,
-0.004638671875,
-0.01678466796875,
-0.0528564453125,
0.0301055908203125,
-0.0213775634765625,
-0.04107666015625,
-0.012420654296875,
0.01104736328125,
-0.0230865478515625,
-0.03204345703125,
0.006603240966796875,
-0.022613525390625,
-0.03948974609375,
0.0006103515625,
0.02423095703125,
-0.03076171875,
0.001773834228515625,
-0.00646209716796875,
-0.015899658203125,
0.07806396484375,
0.031982421875,
-0.0364990234375,
0.0262908935546875,
-0.001445770263671875,
0.0299530029296875,
0.002696990966796875,
-0.030364990234375,
0.063232421875,
0.037384033203125,
0.0041961669921875,
-0.00791168212890625,
-0.057891845703125,
0.008758544921875,
-0.053497314453125,
-0.01442718505859375,
0.0154571533203125,
-0.0226287841796875,
0.02325439453125,
0.047119140625,
0.04913330078125,
0.0047760009765625,
-0.051971435546875,
0.056060791015625,
0.060150146484375,
0.0168609619140625,
0.0133209228515625,
0.00681304931640625,
-0.00702667236328125,
-0.0150146484375,
-0.0151824951171875,
-0.0275115966796875,
0.015960693359375,
0.040313720703125,
0.03759765625,
0.024322509765625,
-0.01224517822265625,
-0.01288604736328125,
-0.040740966796875,
0.0088958740234375,
-0.0081634521484375,
-0.0193023681640625,
-0.028564453125,
-0.004974365234375,
0.0126495361328125,
0.0014848709106445312,
-0.0255889892578125,
-0.00795745849609375,
-0.066162109375,
-0.0638427734375,
-0.00927734375,
-0.051483154296875,
0.023406982421875,
-0.01520538330078125,
-0.0308837890625,
0.0011110305786132812,
-0.01953125,
-0.023895263671875,
0.024322509765625,
0.004817962646484375,
-0.032379150390625,
-0.0277862548828125,
0.069580078125,
-0.00016677379608154297,
0.03277587890625,
-0.0390625,
0.001953125,
0.033172607421875,
-0.0104827880859375,
0.0755615234375,
0.0230865478515625,
-0.049163818359375,
-0.004665374755859375,
-0.04296875,
-0.00727081298828125,
-0.029754638671875,
-0.039337158203125,
-0.050689697265625,
-0.00522613525390625,
0.0042877197265625,
0.01654052734375,
-0.0272216796875,
0.0030193328857421875,
-0.0015840530395507812,
0.01512908935546875,
-0.01219940185546875,
0.04339599609375,
0.00324249267578125,
0.058868408203125,
0.010406494140625,
0.057464599609375,
0.0213775634765625,
0.037750244140625,
-0.022918701171875,
-0.031463623046875,
0.0012912750244140625,
-0.015594482421875,
-0.0001214742660522461,
-0.005268096923828125,
0.01222991943359375,
-0.03656005859375,
-0.0017261505126953125,
-0.01201629638671875,
0.0228271484375,
-0.01922607421875,
0.00849151611328125,
-0.02874755859375,
-0.0103302001953125,
-0.0299072265625,
-0.0025272369384765625,
0.0013933181762695312,
-0.018646240234375,
0.01535797119140625,
-0.00945281982421875,
0.0092010498046875,
-0.0145416259765625,
-0.020904541015625,
-0.00891876220703125,
0.0252227783203125,
-0.035064697265625,
0.039093017578125,
0.056610107421875,
-0.01385498046875,
0.032470703125,
0.021026611328125,
0.0111236572265625,
0.027496337890625,
-0.02178955078125,
-0.0187530517578125,
0.044464111328125,
0.04168701171875,
-0.0026493072509765625,
0.0045013427734375,
0.038299560546875,
-0.0293121337890625,
0.0102081298828125,
0.0233306884765625,
0.07135009765625,
-0.044769287109375,
0.0205841064453125,
0.01529693603515625,
-0.01093292236328125,
0.051910400390625,
0.0003387928009033203,
-0.0135955810546875,
-0.0178985595703125,
0.063232421875,
-0.027679443359375,
-0.004390716552734375,
0.0307769775390625,
-0.00495147705078125,
0.0018301010131835938,
-0.023681640625,
0.04864501953125,
0.023345947265625,
-0.037567138671875,
0.05877685546875,
0.0089874267578125,
0.041778564453125,
-0.0362548828125,
-0.00130462646484375,
0.0369873046875,
0.0244598388671875,
-0.048248291015625,
0.08880615234375,
-0.036865234375,
0.01247406005859375,
0.0041046142578125,
0.0081329345703125,
0.03253173828125,
0.021820068359375,
0.0265960693359375,
-0.03143310546875,
0.002349853515625,
0.0080718994140625,
-0.044586181640625,
-0.048095703125,
-0.00836181640625,
0.06396484375,
-0.03814697265625,
0.035125732421875,
-0.00812530517578125,
-0.007175445556640625,
-0.0182952880859375,
-0.00893402099609375,
0.05731201171875,
-0.0283966064453125,
-0.020599365234375,
0.01313018798828125,
0.033111572265625,
0.01258087158203125,
0.005367279052734375,
-0.02020263671875,
-0.050323486328125,
-0.035186767578125,
-0.011016845703125,
-0.058074951171875,
0.0014467239379882812,
-0.0231781005859375,
-0.067626953125,
0.110107421875,
0.01522064208984375,
0.0225067138671875,
-0.0013132095336914062,
0.0343017578125,
-0.0269012451171875,
0.00861358642578125,
-0.039794921875,
0.04315185546875,
0.007213592529296875,
0.03472900390625,
-0.030426025390625,
-0.0084228515625,
-0.0002701282501220703,
0.02142333984375,
0.080078125,
0.01898193359375,
-0.0247344970703125,
0.00458526611328125,
0.032958984375,
-0.0058441162109375,
-0.037322998046875,
0.050079345703125,
0.0023345947265625,
0.016326904296875,
0.022735595703125,
-0.021331787109375,
0.036651611328125,
-0.04266357421875,
-0.02618408203125,
0.005451202392578125,
0.0302581787109375,
0.04315185546875,
0.0042724609375,
0.0029621124267578125,
-0.03961181640625,
0.0013628005981445312,
0.041717529296875,
-0.006114959716796875,
-0.005695343017578125,
0.06121826171875,
0.054718017578125,
0.00017452239990234375,
0.00814056396484375,
-0.038421630859375,
0.07073974609375,
0.0264434814453125,
0.015411376953125,
0.0149383544921875,
0.01873779296875,
0.0142364501953125,
0.014373779296875,
0.0194854736328125,
0.0443115234375,
-0.0226898193359375,
0.057037353515625,
0.0257110595703125,
-0.004703521728515625,
-0.035980224609375,
0.0231781005859375,
0.04119873046875,
0.0653076171875,
-0.07061767578125,
0.0416259765625,
0.01397705078125,
0.01267242431640625,
-0.00011593103408813477,
-0.0718994140625,
0.0148773193359375,
-0.006359100341796875,
-0.0206451416015625,
-0.06231689453125,
0.0009822845458984375,
0.0208282470703125,
0.02178955078125,
-0.0025653839111328125,
0.0033416748046875,
-0.03546142578125,
-0.0182647705078125,
-0.034423828125,
-0.014923095703125,
-0.00634765625,
0.03216552734375,
0.04296875,
0.0153961181640625,
0.0135040283203125,
-0.020721435546875,
-0.002391815185546875,
0.010467529296875,
0.0252685546875,
0.0079803466796875,
-0.0209197998046875,
-0.0184326171875,
0.0149993896484375,
0.03466796875,
0.0019969940185546875,
0.052764892578125,
0.051422119140625,
0.021453857421875,
-0.02838134765625,
-0.01560211181640625,
0.0186309814453125,
-0.0343017578125,
-0.0002970695495605469,
-0.00496673583984375,
-0.0021419525146484375,
-0.00980377197265625,
-0.019287109375,
0.001354217529296875,
0.059844970703125,
-0.0232696533203125,
0.0114288330078125,
0.0260009765625,
0.0176849365234375,
-0.023101806640625,
0.0244140625,
0.01483154296875,
0.042694091796875,
0.02935791015625,
-0.0423583984375,
0.00167083740234375,
-0.039947509765625,
-0.05364990234375,
0.0196533203125,
0.0238189697265625,
-0.019683837890625,
0.03631591796875,
-0.042083740234375,
0.007328033447265625,
0.023223876953125,
-0.035003662109375,
-0.00107574462890625,
0.028289794921875,
0.01039886474609375,
-0.0133819580078125,
-0.0667724609375,
-0.033203125,
-0.032318115234375,
0.0219879150390625,
0.0299530029296875,
0.0033168792724609375,
0.0253753662109375,
0.0268096923828125,
-0.03936767578125,
0.03656005859375,
-0.08258056640625,
-0.056976318359375,
0.059112548828125,
-0.0396728515625,
-0.0294952392578125,
0.023162841796875,
-0.0262298583984375,
0.030181884765625,
0.01885986328125,
0.01113128662109375,
0.040374755859375,
-0.04278564453125,
0.0201873779296875,
-0.016448974609375,
0.015533447265625,
-0.03594970703125,
-0.0201416015625,
-0.024932861328125,
-0.0007543563842773438,
0.0019178390502929688,
-0.033721923828125,
-0.0268096923828125,
0.0107574462890625,
0.00843048095703125,
-0.011199951171875,
0.010986328125,
0.00948333740234375,
0.0012426376342773438,
0.024627685546875,
-0.012969970703125,
-0.028961181640625,
-0.012664794921875,
-0.021636962890625,
0.00431060791015625,
-0.0059661865234375,
0.03802490234375,
0.0007543563842773438,
-0.0004515647888183594,
-0.0084991455078125,
-0.000782012939453125,
0.041717529296875,
0.01137542724609375,
0.0214996337890625,
-0.0438232421875,
0.0023479461669921875,
-0.0205841064453125,
0.0174407958984375,
-0.02069091796875,
-0.007282257080078125,
0.018341064453125,
0.012542724609375,
0.016082763671875,
-0.0027790069580078125,
-0.047821044921875,
-0.005374908447265625,
-0.027008056640625,
-0.02642822265625,
-0.0166168212890625,
0.0263824462890625,
-0.0186920166015625,
-0.020294189453125,
-0.053375244140625,
-0.0499267578125,
0.021697998046875,
0.044921875,
-0.0462646484375,
-0.0135955810546875,
-0.0438232421875,
-0.0291290283203125,
-0.043670654296875,
0.020721435546875,
0.05206298828125,
-0.020782470703125,
-0.030426025390625,
0.054656982421875,
0.0380859375,
0.09161376953125,
-0.0228729248046875,
-0.01369476318359375,
0.018218994140625,
-0.0058441162109375,
-0.024322509765625,
-0.0997314453125,
0.00855255126953125,
-0.11492919921875,
0.01042938232421875,
-0.03076171875,
0.0278167724609375,
0.048858642578125,
-0.00870513916015625,
-0.028472900390625,
-0.000002086162567138672,
-0.01190948486328125,
-0.0288238525390625,
-0.03131103515625,
0.006710052490234375,
-0.021728515625,
0.01421356201171875,
0.004512786865234375,
-0.031494140625,
0.01398468017578125,
0.04461669921875,
-0.0196380615234375,
0.045013427734375,
0.021942138671875,
-0.0290069580078125,
-0.00583648681640625,
-0.0222015380859375,
-0.0192718505859375,
-0.0056915283203125,
0.0182952880859375,
-0.0367431640625,
0.03106689453125,
0.01111602783203125,
-0.0272064208984375,
-0.00630950927734375,
0.01715087890625,
-0.00997161865234375,
-0.045196533203125,
-0.034820556640625,
-0.02191162109375,
0.0011377334594726562,
0.097412109375,
0.068115234375,
0.0283355712890625,
-0.049591064453125,
-0.00415802001953125,
-0.0305938720703125,
-0.013153076171875,
0.0032558441162109375,
-0.006359100341796875,
-0.0176849365234375,
0.0167083740234375,
0.0035533905029296875,
-0.0225372314453125,
-0.0101776123046875,
0.0017566680908203125,
-0.034271240234375,
-0.0083465576171875,
-0.006420135498046875,
-0.0234527587890625,
0.0011835098266601562,
-0.0164947509765625,
0.0200653076171875,
-0.011077880859375,
0.017120361328125,
-0.0010890960693359375,
0.0159912109375,
0.01213836669921875,
0.036956787109375,
-0.0028076171875,
0.0147552490234375,
-0.0220184326171875,
0.022674560546875,
0.0061798095703125,
0.0271453857421875,
-0.013031005859375,
0.00478363037109375,
-0.0273284912109375,
0.023223876953125,
0.01336669921875,
0.00926971435546875,
-0.005001068115234375,
0.04156494140625,
0.023529052734375,
0.044586181640625,
-0.021331787109375,
-0.038238525390625,
-0.0248260498046875,
0.0161895751953125,
-0.04510498046875,
0.0206146240234375,
-0.01708984375,
-0.01294708251953125,
0.007701873779296875,
0.01220703125,
0.03448486328125,
-0.0164794921875,
0.0164337158203125,
-0.005382537841796875,
0.00897979736328125,
0.0102386474609375
]
|
1dca3e43fd5823c33ca72a05a7a7e22e25792bcc | Wordpress Stackexchange
Q: How change wordpress password without logout ( need for plugin ) I need change WP password without logout profile.
When I use wp_set_password( $password, $user_ID ) i have problem with logout.
A: If you are changing the password for the current logged-in user, it will log you out. You have to log in again:
// Get current logged-in user.
$user = wp_get_current_user();
// Change password.
wp_set_password($new_password, $user->ID);
// Log-in again.
wp_set_auth_cookie($user->ID);
wp_set_current_user($user->ID);
do_action('wp_login', $user->user_login, $user);
Note that since you are setting a new log-in cookie (i.e. changing headers), you need to run this code before any other output (HTML or echos).
| Q: How change wordpress password without logout ( need for plugin ) I need change WP password without logout profile.
When I use wp_set_password( $password, $user_ID ) i have problem with logout.
A: If you are changing the password for the current logged-in user, it will log you out. You have to log in again:
// Get current logged-in user.
$user = wp_get_current_user();
// Change password.
wp_set_password($new_password, $user->ID);
// Log-in again.
wp_set_auth_cookie($user->ID);
wp_set_current_user($user->ID);
do_action('wp_login', $user->user_login, $user);
Note that since you are setting a new log-in cookie (i.e. changing headers), you need to run this code before any other output (HTML or echos).
A: Try below code, it won't log you out after the password change and it works with Ajax functions too. No need to reset cookies/sessions afterwards.
$userdata['ID'] = 1; //user ID
$userdata['user_pass'] = 'new_password';
wp_update_user( $userdata ); // this will handle encryption and everything
Cheers
A: I have no working example, only hints for thinking about this topic.
The function to set a new password via the function of the core is right. But if you are using this function on the user update page, then the user will be automatic get logged out as it is deleting the cache of the logged-in users.
After the logout, can you hook in wp and create a new login. You must do this before anything is sent via 'headers'.
`add_action( 'wp', 'your_login' );`
Also think about the cookie of the login - wp_set_auth_cookie! Also you can delete the current cache for the user - wp_cache_delete().
Maybe this question and his answers help you, the same topic.
A: function change_client_password() {
$current_user = $_POST['current_user'];
$current_password = $_POST['current_password'];
$new_password = $_POST['new_password'];
$confirm_password = $_POST['confirm_password'];
$user = get_user_by( 'ID', $current_user );
$result = wp_check_password( $current_password, $user->data->user_pass, $current_user );
if ( $result ) {
if ( $new_password == $confirm_password ) {
wp_set_password( $new_password, $current_user );
wp_set_auth_cookie ( $current_user );
wp_set_current_user( $current_user );
do_action('wp_login', $user->user_login, $user );
echo 'Your new password is changed.';
} else {
echo 'Your current password is correct, but the new and confirm passwords do not match.';
}
} else {
echo 'Your current password is incorrect.';
}
wp_die();
}
A: Update the user's password using wp_set_password(), and then log the user back in, using wp_signon().
wp_signon will create the authentication cookie for you, as other users have suggested, but in a much more streamlined way.
function create_new_password_for_user($new_password){
//Get the current user's details, while they're still signed in, in this scope.
$current_user = wp_get_current_user();
$current_user_id = $current_user->ID;
$users_login = $current_user->user_email;
//set their new password (this will trigger the logout)
wp_set_password($new_password, $current_user_id);
//setup the data to be passed on to wp_signon
$user_data = array(
'user_login' => $users_login,
'user_password' => $new_password,
'remember' => false
);
// Sign them back in.
$result = wp_signon( $user_data );
if(is_wp_error($result)){
//do something with an error, if there is one.
}else{
//do something with the successful change.
}
}
| wordpress | {
"language": "en",
"length": 481,
"provenance": "stackexchange_00019.jsonl.gz:455267",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/186326"
} | [
0.04766845703125,
-0.00033593177795410156,
0.01297760009765625,
-0.0029544830322265625,
0.0169219970703125,
-0.033111572265625,
0.056671142578125,
-0.039459228515625,
-0.035736083984375,
0.0328369140625,
0.01934814453125,
0.020294189453125,
-0.051910400390625,
-0.0220947265625,
-0.01406097412109375,
-0.0255279541015625,
0.02008056640625,
0.01415252685546875,
0.0209503173828125,
-0.007427215576171875,
0.0110015869140625,
0.0027065277099609375,
-0.0031681060791015625,
0.022491455078125,
0.00012165307998657227,
0.02471923828125,
0.0806884765625,
-0.03558349609375,
0.0246734619140625,
-0.01043701171875,
0.0175933837890625,
-0.034942626953125,
-0.0014781951904296875,
0.046600341796875,
-0.035614013671875,
0.00621795654296875,
-0.034881591796875,
0.04425048828125,
0.023956298828125,
0.022705078125,
0.02276611328125,
-0.0084686279296875,
-0.00482177734375,
0.02655029296875,
-0.026885986328125,
-0.0278472900390625,
0.0079498291015625,
-0.0187530517578125,
0.0140228271484375,
-0.01021575927734375,
0.029388427734375,
0.0184783935546875,
0.047821044921875,
-0.0238494873046875,
-0.0338134765625,
-0.0220794677734375,
-0.006671905517578125,
-0.00803375244140625,
0.035125732421875,
-0.0157470703125,
-0.021453857421875,
-0.030120849609375,
0.02935791015625,
-0.0215301513671875,
0.007007598876953125,
0.0101470947265625,
0.01953125,
0.027496337890625,
-0.0379638671875,
-0.011505126953125,
0.01273345947265625,
-0.01593017578125,
-0.0263824462890625,
-0.006923675537109375,
-0.021148681640625,
0.00455474853515625,
0.013275146484375,
-0.01251983642578125,
0.0001556873321533203,
0.018798828125,
0.00787353515625,
-0.001827239990234375,
-0.0306854248046875,
-0.0234222412109375,
-0.0018444061279296875,
-0.0068206787109375,
-0.006885528564453125,
0.0014505386352539062,
-0.0094757080078125,
-0.004566192626953125,
-0.024810791015625,
0.0283660888671875,
-0.0260772705078125,
-0.0041961669921875,
-0.031463623046875,
-0.00234222412109375,
-0.0020847320556640625,
0.024169921875,
0.01934814453125,
0.027740478515625,
-0.0330810546875,
-0.0206146240234375,
0.00612640380859375,
-0.0239105224609375,
-0.02825927734375,
0.0338134765625,
0.029937744140625,
0.03619384765625,
-0.01003265380859375,
0.017547607421875,
-0.01043701171875,
-0.038726806640625,
-0.0208892822265625,
-0.07470703125,
0.014862060546875,
0.042449951171875,
-0.019134521484375,
0.0179443359375,
0.0165252685546875,
-0.0106201171875,
-0.043853759765625,
-0.0384521484375,
-0.0095367431640625,
0.0242919921875,
-0.011871337890625,
-0.0295867919921875,
-0.010223388671875,
0.038970947265625,
-0.034088134765625,
0.0377197265625,
-0.06427001953125,
-0.003894805908203125,
0.1151123046875,
0.0391845703125,
0.0215911865234375,
-0.03521728515625,
0.0325927734375,
-0.00806427001953125,
-0.00511932373046875,
0.0350341796875,
-0.035186767578125,
-0.039764404296875,
0.0098876953125,
-0.0196990966796875,
0.0281829833984375,
0.0245819091796875,
0.0161285400390625,
0.0229949951171875,
0.002010345458984375,
-0.0482177734375,
0.032684326171875,
0.0022258758544921875,
-0.048095703125,
0.03277587890625,
0.06805419921875,
0.01447296142578125,
0.027587890625,
-0.004581451416015625,
0.046356201171875,
0.0253448486328125,
0.01303863525390625,
-0.011444091796875,
0.01537322998046875,
0.01922607421875,
-0.00878143310546875,
0.0184326171875,
-0.016815185546875,
-0.00797271728515625,
0.030792236328125,
-0.01155853271484375,
0.070068359375,
-0.01922607421875,
0.04229736328125,
-0.00545501708984375,
-0.00180816650390625,
-0.0027713775634765625,
-0.052734375,
0.04608154296875,
0.0140228271484375,
0.0023593902587890625,
0.0165252685546875,
-0.034912109375,
0.03076171875,
0.0234527587890625,
-0.004673004150390625,
-0.0167083740234375,
0.006961822509765625,
0.0160369873046875,
0.0161285400390625,
0.033477783203125,
-0.03204345703125,
0.006267547607421875,
-0.021087646484375,
0.0299224853515625,
-0.006862640380859375,
-0.031982421875,
0.034027099609375,
0.01032257080078125,
-0.0038928985595703125,
-0.01183319091796875,
0.061279296875,
0.0011358261108398438,
-0.0262603759765625,
-0.0309295654296875,
-0.11602783203125,
-0.025054931640625,
-0.027191162109375,
0.026947021484375,
-0.006816864013671875,
0.0168609619140625,
0.0192108154296875,
-0.005977630615234375,
0.007259368896484375,
-0.04962158203125,
-0.034759521484375,
-0.0208740234375,
-0.050994873046875,
0.065185546875,
-0.0009465217590332031,
0.077880859375,
0.0000902414321899414,
-0.04095458984375,
0.02349853515625,
-0.04736328125,
0.029205322265625,
-0.050201416015625,
-0.004108428955078125,
-0.047943115234375,
-0.00556182861328125,
-0.02874755859375,
-0.0208740234375,
0.048065185546875,
0.0056915283203125,
-0.0022029876708984375,
-0.04632568359375,
-0.020416259765625,
-0.0254669189453125,
-0.052978515625,
0.007633209228515625,
0.06304931640625,
0.03875732421875,
0.0233917236328125,
-0.00957489013671875,
0.006374359130859375,
0.0290985107421875,
-0.0187225341796875,
0.0290374755859375,
-0.0218353271484375,
0.0268402099609375,
0.0335693359375,
-0.0017614364624023438,
-0.0263214111328125,
0.0270233154296875,
-0.03204345703125,
0.0059051513671875,
0.033233642578125,
-0.027496337890625,
0.01026153564453125,
0.0212249755859375,
-0.0202484130859375,
-0.01611328125,
-0.03594970703125,
0.015716552734375,
-0.0227203369140625,
0.0002765655517578125,
-0.031707763671875,
-0.011444091796875,
-0.01248931884765625,
-0.0168304443359375,
-0.032379150390625,
0.042205810546875,
-0.00901031494140625,
0.0097503662109375,
0.0521240234375,
-0.004302978515625,
0.0111083984375,
-0.0212860107421875,
-0.0170135498046875,
0.00980377197265625,
0.0267333984375,
-0.01629638671875,
-0.006732940673828125,
-0.0005984306335449219,
-0.010589599609375,
0.019073486328125,
0.006927490234375,
0.01052093505859375,
0.0098724365234375,
-0.0210723876953125,
-0.0222320556640625,
0.033294677734375,
0.00275421142578125,
-0.0162811279296875,
0.0156402587890625,
-0.030670166015625,
-0.0192413330078125,
-0.017059326171875,
-0.032958984375,
0.025848388671875,
-0.024505615234375,
0.03826904296875,
0.0694580078125,
0.01210784912109375,
0.0084686279296875,
0.01201629638671875,
-0.0070037841796875,
0.0145263671875,
-0.01342010498046875,
-0.019744873046875,
0.0198211669921875,
-0.058380126953125,
0.0267791748046875,
0.011505126953125,
0.03948974609375,
-0.039031982421875,
-0.048828125,
-0.03277587890625,
-0.0015316009521484375,
-0.04315185546875,
-0.01477813720703125,
-0.079833984375,
-0.08184814453125,
-0.01107025146484375,
-0.0110015869140625,
-0.033111572265625,
0.036041259765625,
0.016357421875,
0.034454345703125,
0.037139892578125,
-0.028167724609375,
-0.035308837890625,
-0.039215087890625,
-0.04705810546875,
-0.02520751953125,
-0.004810333251953125,
-0.00875091552734375,
-0.01514434814453125,
0.07928466796875,
-0.01355743408203125,
-0.042724609375,
-0.060791015625,
0.03485107421875,
-0.020416259765625,
-0.05322265625,
-0.0237884521484375,
-0.025970458984375,
0.0138397216796875,
-0.010894775390625,
0.0177764892578125,
-0.01019287109375,
0.0207366943359375,
-0.01372528076171875,
-0.0054473876953125,
-0.0648193359375,
0.0096588134765625,
-0.0117645263671875,
-0.0287628173828125,
-0.0213623046875,
0.005695343017578125,
-0.050994873046875,
0.01380157470703125,
-0.0120849609375,
-0.03167724609375,
0.04571533203125,
0.01360321044921875,
-0.01007080078125,
0.0101776123046875,
0.0020771026611328125,
-0.0101165771484375,
0.0018491744995117188,
-0.018585205078125,
-0.02496337890625,
0.026519775390625,
0.0011453628540039062,
0.00841522216796875,
-0.00018787384033203125,
0.006839752197265625,
-0.0280303955078125,
-0.00603485107421875,
-0.018218994140625,
-0.01148223876953125,
-0.0277252197265625,
-0.01493072509765625,
-0.043609619140625,
-0.09698486328125,
0.056976318359375,
-0.041839599609375,
-0.0110626220703125,
-0.0406494140625,
-0.0357666015625,
0.01491546630859375,
0.130126953125,
-0.0248260498046875,
-0.016021728515625,
0.022491455078125,
0.022064208984375,
-0.04644775390625,
-0.04510498046875,
-0.035675048828125,
-0.02716064453125,
-0.0222625732421875,
-0.01103973388671875,
-0.01369476318359375,
-0.009033203125,
0.015045166015625,
-0.02630615234375,
0.01491546630859375,
-0.03192138671875,
-0.0002989768981933594,
0.0135345458984375,
0.0186614990234375,
0.002399444580078125,
-0.01244354248046875,
0.0005941390991210938,
0.014923095703125,
-0.0286865234375,
-0.050048828125,
-0.005321502685546875,
-0.0174102783203125,
0.053375244140625,
0.0241851806640625,
-0.026397705078125,
-0.0298004150390625,
0.017425537109375,
0.0040740966796875,
0.01280975341796875,
0.003421783447265625,
0.0037822723388671875,
0.0038814544677734375,
0.011749267578125,
0.00827789306640625,
-0.0006051063537597656,
-0.01169586181640625,
-0.03131103515625,
-0.0301055908203125,
-0.0030879974365234375,
-0.029449462890625,
0.0201568603515625,
-0.009857177734375,
-0.0161590576171875,
-0.042755126953125,
-0.0243682861328125,
0.00701904296875,
0.0163726806640625,
-0.006389617919921875,
0.0220489501953125,
-0.035186767578125,
-0.02850341796875,
0.0738525390625,
0.02740478515625,
-0.012420654296875,
-0.0130462646484375,
0.09661865234375,
0.01187896728515625,
-0.039642333984375,
-0.012451171875,
-0.00319671630859375,
0.0174407958984375,
0.0036373138427734375,
0.01422119140625,
-0.01474761962890625,
-0.0243682861328125,
0.069091796875,
-0.0160064697265625,
-0.009429931640625,
-0.0245208740234375,
0.042755126953125,
-0.0140838623046875,
-0.0175018310546875,
0.0203857421875,
-0.03814697265625,
0.0208892822265625,
0.0165557861328125,
0.0132904052734375,
-0.002010345458984375,
0.034149169921875,
0.0142822265625,
-0.00719451904296875,
-0.041015625,
-0.01425933837890625,
-0.054962158203125,
0.0165557861328125,
-0.002025604248046875,
-0.0106201171875,
0.007633209228515625,
0.001461029052734375,
0.003513336181640625,
0.00620269775390625,
0.0012922286987304688,
-0.054901123046875,
-0.053985595703125,
-0.0137481689453125,
0.006275177001953125,
-0.04559326171875,
0.0113067626953125,
-0.01605224609375,
-0.03936767578125,
0.1466064453125,
0.03155517578125,
-0.059844970703125,
0.046173095703125,
-0.0335693359375,
0.054779052734375,
0.0242462158203125,
-0.0183563232421875,
0.050933837890625,
-0.041107177734375,
-0.017303466796875,
-0.024322509765625,
-0.0653076171875,
-0.060760498046875,
-0.05963134765625,
0.0252227783203125,
0.007320404052734375,
-0.011444091796875,
0.032196044921875,
0.05670166015625,
0.0223541259765625,
0.03704833984375,
-0.0115509033203125,
0.01274871826171875,
0.01232147216796875,
-0.00197601318359375,
0.015350341796875,
0.03607177734375,
-0.01273345947265625,
-0.0085906982421875,
0.0305938720703125,
-0.033782958984375,
-0.033416748046875,
0.034393310546875,
0.026397705078125,
0.0022335052490234375,
0.0229339599609375,
-0.0055389404296875,
0.01496124267578125,
-0.0007309913635253906,
0.059783935546875,
-0.0124969482421875,
-0.09002685546875,
-0.01264190673828125,
0.046356201171875,
0.048583984375,
-0.06549072265625,
0.0197296142578125,
-0.0699462890625,
-0.02142333984375,
-0.035186767578125,
-0.011627197265625,
-0.002529144287109375,
-0.038299560546875,
-0.040252685546875,
-0.031463623046875,
-0.00392913818359375,
-0.00787353515625,
0.004848480224609375,
-0.00830078125,
-0.01611328125,
-0.027801513671875,
0.046539306640625,
-0.027801513671875,
0.02490234375,
-0.01092529296875,
0.0078887939453125,
0.01308441162109375,
0.003505706787109375,
0.03375244140625,
0.00640106201171875,
-0.0509033203125,
0.021697998046875,
-0.03875732421875,
0.01206207275390625,
0.01396942138671875,
-0.0430908203125,
-0.022979736328125,
-0.031280517578125,
0.032867431640625,
0.0030364990234375,
0.00760650634765625,
-0.01213836669921875,
-0.048828125,
0.0250091552734375,
0.035980224609375,
0.01505279541015625,
0.0006508827209472656,
0.0299530029296875,
0.001865386962890625,
0.014068603515625,
0.0255584716796875,
0.028472900390625,
-0.00881195068359375,
-0.0240478515625,
0.03472900390625,
0.015960693359375,
-0.027435302734375,
-0.05767822265625,
0.0152435302734375,
-0.032989501953125,
0.055450439453125,
-0.02337646484375,
-0.03375244140625,
-0.0101776123046875,
0.00006514787673950195,
-0.0231170654296875,
0.061553955078125,
0.0239410400390625,
-0.0200653076171875,
-0.0096893310546875,
-0.019989013671875,
0.037139892578125,
-0.020233154296875,
-0.005321502685546875,
0.026092529296875,
-0.04180908203125,
0.031768798828125,
0.032501220703125,
-0.0286865234375,
0.024322509765625,
0.06915283203125,
-0.00426483154296875,
0.0273590087890625,
0.01548004150390625,
-0.00716400146484375,
-0.002658843994140625,
-0.03350830078125,
-0.04302978515625,
0.026397705078125,
0.03753662109375,
0.0027866363525390625,
-0.0185089111328125,
0.0219879150390625,
-0.0268402099609375,
0.040679931640625,
0.06573486328125,
0.09747314453125,
-0.1004638671875,
0.03582763671875,
0.0147247314453125,
-0.0231781005859375,
0.056488037109375,
0.016754150390625,
0.002750396728515625,
-0.0003371238708496094,
0.0166168212890625,
-0.059051513671875,
-0.01372528076171875,
0.00382232666015625,
-0.026885986328125,
-0.00806427001953125,
-0.0189361572265625,
0.033782958984375,
0.0268707275390625,
-0.07452392578125,
0.05987548828125,
0.04473876953125,
0.0171661376953125,
-0.0218505859375,
-0.015899658203125,
0.037322998046875,
-0.04730224609375,
-0.0894775390625,
0.01506805419921875,
-0.005054473876953125,
-0.03472900390625,
-0.0089263916015625,
-0.00308990478515625,
0.0258941650390625,
0.0212860107421875,
0.00025773048400878906,
-0.0178985595703125,
-0.013641357421875,
0.0267333984375,
0.00012624263763427734,
-0.01468658447265625,
-0.00821685791015625,
0.04144287109375,
-0.046142578125,
0.017730712890625,
-0.019866943359375,
0.009429931640625,
-0.0225372314453125,
-0.041595458984375,
0.07421875,
-0.0265045166015625,
0.008697509765625,
0.02569580078125,
0.04266357421875,
-0.0066375732421875,
0.007282257080078125,
-0.00135040283203125,
-0.033172607421875,
-0.0081634521484375,
0.0119781494140625,
-0.02423095703125,
0.0179595947265625,
0.0203399658203125,
-0.048583984375,
0.1263427734375,
-0.036041259765625,
-0.0010576248168945312,
0.00661468505859375,
0.058074951171875,
0.0004849433898925781,
0.047698974609375,
-0.03778076171875,
0.03814697265625,
-0.0015020370483398438,
0.03240966796875,
-0.0163116455078125,
0.01401519775390625,
0.007015228271484375,
-0.0016994476318359375,
0.0655517578125,
0.02398681640625,
-0.04437255859375,
-0.0261077880859375,
-0.0021953582763671875,
0.04193115234375,
0.0009512901306152344,
0.0369873046875,
-0.0121917724609375,
0.024078369140625,
0.017425537109375,
-0.061370849609375,
0.0156402587890625,
-0.018890380859375,
-0.0149688720703125,
0.0174560546875,
0.01016998291015625,
-0.02178955078125,
0.0028743743896484375,
0.049957275390625,
-0.07379150390625,
0.024078369140625,
0.03125,
0.041168212890625,
0.01184844970703125,
0.051788330078125,
0.054046630859375,
-0.020751953125,
0.03857421875,
-0.04437255859375,
0.07147216796875,
-0.01800537109375,
-0.00994873046875,
0.030975341796875,
0.02105712890625,
-0.0015439987182617188,
-0.03314208984375,
-0.0110626220703125,
0.0050811767578125,
-0.02142333984375,
0.054473876953125,
0.045562744140625,
0.0248870849609375,
-0.00441741943359375,
0.055145263671875,
0.0262603759765625,
0.06475830078125,
-0.0623779296875,
-0.0245513916015625,
0.0007758140563964844,
-0.0028743743896484375,
0.025146484375,
-0.0028095245361328125,
0.05987548828125,
-0.00881195068359375,
-0.0219879150390625,
-0.015533447265625,
0.0284423828125,
0.019744873046875,
-0.01296234130859375,
-0.0019588470458984375,
0.02618408203125,
-0.0382080078125,
0.05206298828125,
-0.01294708251953125,
0.01236724853515625,
0.0150604248046875,
0.0008287429809570312,
-0.00945281982421875,
-0.0024242401123046875,
0.024169921875,
0.01953125,
0.021026611328125,
0.00982666015625,
0.0009465217590332031,
-0.0165557861328125,
0.00899505615234375,
-0.033416748046875,
0.0037937164306640625,
0.024169921875,
-0.0110931396484375,
0.0009093284606933594,
0.0178070068359375,
0.004924774169921875,
-0.042022705078125,
-0.0292510986328125,
-0.004787445068359375,
-0.0278778076171875,
0.00516510009765625,
-0.010345458984375,
0.0159454345703125,
0.013458251953125,
-0.010223388671875,
-0.0364990234375,
0.0360107421875,
0.0236358642578125,
-0.004535675048828125,
0.05914306640625,
-0.0004925727844238281,
-0.0087890625,
-0.00478363037109375,
0.03045654296875,
0.041229248046875,
0.039031982421875,
-0.021148681640625,
0.000705718994140625,
-0.01953125,
-0.02227783203125,
0.02166748046875,
0.0231475830078125,
-0.0144195556640625,
0.0238189697265625,
0.00893402099609375,
-0.00653076171875,
0.006496429443359375,
0.01348114013671875,
0.0009646415710449219,
-0.013031005859375,
0.02081298828125,
-0.015960693359375,
-0.0709228515625,
-0.055816650390625,
-0.044403076171875,
0.03900146484375,
0.03375244140625,
0.0191650390625,
0.011627197265625,
0.0290069580078125,
-0.020233154296875,
0.011688232421875,
-0.020050048828125,
-0.0225067138671875,
-0.00360870361328125,
-0.0030231475830078125,
-0.004230499267578125,
-0.01117706298828125,
-0.062744140625,
0.08514404296875,
-0.009552001953125,
0.03717041015625,
0.06829833984375,
-0.017242431640625,
-0.007488250732421875,
0.009979248046875,
-0.0006151199340820312,
-0.0299224853515625,
-0.05517578125,
-0.0190277099609375,
0.04095458984375,
-0.0180206298828125,
-0.004680633544921875,
-0.03887939453125,
0.01568603515625,
-0.03759765625,
-0.0189361572265625,
-0.0167236328125,
-0.0110321044921875,
-0.0306396484375,
0.0173797607421875,
-0.040374755859375,
-0.006702423095703125,
-0.02020263671875,
-0.0250396728515625,
-0.014007568359375,
0.01220703125,
-0.0167236328125,
-0.0064697265625,
-0.026123046875,
0.026214599609375,
0.049835205078125,
0.07086181640625,
0.01374053955078125,
0.033599853515625,
0.0076904296875,
0.004039764404296875,
0.00693511962890625,
-0.041748046875,
-0.04083251953125,
-0.07073974609375,
0.003818511962890625,
0.011688232421875,
-0.0482177734375,
-0.049407958984375,
-0.0887451171875,
0.0200042724609375,
0.017242431640625,
-0.01284027099609375,
-0.053253173828125,
0.03619384765625,
-0.03656005859375,
0.0301361083984375,
-0.024566650390625,
-0.0511474609375,
0.025390625,
0.0380859375,
-0.02777099609375,
-0.0186767578125,
-0.036376953125,
-0.0186614990234375,
-0.0518798828125,
-0.01262664794921875,
0.0296630859375,
0.01442718505859375,
-0.01251983642578125,
-0.0182342529296875,
-0.013519287109375,
0.0197601318359375,
-0.07061767578125,
-0.0302734375,
0.016143798828125,
-0.0101165771484375,
0.0242767333984375,
-0.036651611328125,
-0.01934814453125,
-0.0290069580078125,
-0.006931304931640625,
-0.0178985595703125,
-0.00911712646484375,
-0.01241302490234375,
-0.062164306640625,
-0.07177734375,
0.0004429817199707031,
0.006336212158203125,
-0.036346435546875,
-0.04486083984375,
0.005359649658203125,
-0.0108795166015625,
0.005352020263671875,
-0.00820159912109375,
-0.0147705078125,
-0.01788330078125,
0.032928466796875,
0.028533935546875,
0.005084991455078125,
0.00531005859375,
0.0394287109375,
-0.0258941650390625,
0.060943603515625,
0.04498291015625,
0.0087890625,
-0.0199737548828125,
0.020355224609375,
0.0001327991485595703,
0.0281524658203125,
-0.01885986328125,
0.0033016204833984375,
0.001010894775390625,
-0.00508880615234375,
-0.019744873046875,
0.0026378631591796875,
0.0207061767578125,
0.0247650146484375,
0.041534423828125,
0.0224609375,
-0.003765106201171875,
-0.03326416015625,
-0.041107177734375,
-0.0265045166015625,
-0.00853729248046875,
0.001544952392578125,
0.0053863525390625,
-0.054718017578125,
0.0078277587890625,
-0.0038280487060546875,
-0.01403045654296875,
-0.04736328125,
0.004367828369140625,
-0.043426513671875,
-0.00949859619140625,
-0.006744384765625,
-0.0036602020263671875,
0.029937744140625,
0.007228851318359375,
0.0606689453125,
-0.041839599609375,
-0.006900787353515625,
0.0106658935546875,
0.00925445556640625,
0.01152801513671875,
-0.003143310546875,
0.01123046875,
-0.004848480224609375,
-0.002887725830078125,
0.01995849609375,
0.019805908203125,
0.040802001953125,
-0.0139923095703125,
-0.0235748291015625,
-0.025177001953125,
-0.0005216598510742188,
0.01262664794921875,
-0.004749298095703125,
-0.02276611328125,
0.01549530029296875,
0.0226287841796875,
0.01177978515625,
-0.01409912109375,
-0.0249786376953125,
-0.038055419921875,
0.05352783203125,
0.0113525390625,
-0.022796630859375,
0.052764892578125,
-0.01419830322265625,
-0.00315093994140625,
-0.033111572265625,
0.035919189453125,
-0.06695556640625,
0.04766845703125,
-0.007465362548828125,
0.00638580322265625,
0.04022216796875
]
|
aa6af5ce29f43c2dbebbebf3a1dd39b4c8ec1be2 | Wordpress Stackexchange
Q: How to hide /wp-content/uploads/ from URL? I have a Wordpress mulitsite and I want to hide the /wp-content/uploads/ part form URL in images and files.
The url now like this:
http://localhost/wordpress/teszt3/wp-content/uploads/sites/3/2015/05/VCC.jpg
I want to this:
http://localhost/wordpress/teszt3/sites/3/2015/05/VCC.jpg
I try this in .htacces, but not working:
RewriteRule ^files$ /wp-content/uploads/sites/3/2015/05/VCC.jpg [L,QSA]
and this:
RewriteRule ^wp-content/uploads/(.+)$ http://localhost/wordpress/teszt3/$1 [R=301,L]
A: Had you considered actually moving the folder?
WordPress allows to customize location of whole content folder or parts of it either.
According to moving uploads folder in Codex, as simple as:
define( 'UPLOADS', 'blog/wp-content/uploads' );
| Q: How to hide /wp-content/uploads/ from URL? I have a Wordpress mulitsite and I want to hide the /wp-content/uploads/ part form URL in images and files.
The url now like this:
http://localhost/wordpress/teszt3/wp-content/uploads/sites/3/2015/05/VCC.jpg
I want to this:
http://localhost/wordpress/teszt3/sites/3/2015/05/VCC.jpg
I try this in .htacces, but not working:
RewriteRule ^files$ /wp-content/uploads/sites/3/2015/05/VCC.jpg [L,QSA]
and this:
RewriteRule ^wp-content/uploads/(.+)$ http://localhost/wordpress/teszt3/$1 [R=301,L]
A: Had you considered actually moving the folder?
WordPress allows to customize location of whole content folder or parts of it either.
According to moving uploads folder in Codex, as simple as:
define( 'UPLOADS', 'blog/wp-content/uploads' );
| wordpress | {
"language": "en",
"length": 91,
"provenance": "stackexchange_00019.jsonl.gz:455270",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/186332"
} | [
0.0290985107421875,
0.0031299591064453125,
0.0303955078125,
0.037017822265625,
-0.0038814544677734375,
-0.04937744140625,
0.09429931640625,
-0.05377197265625,
0.01064300537109375,
0.0303192138671875,
0.0017547607421875,
-0.043670654296875,
0.0260162353515625,
-0.038177490234375,
-0.01324462890625,
-0.0284271240234375,
0.0074920654296875,
0.017852783203125,
0.046356201171875,
-0.00640106201171875,
0.00763702392578125,
0.02001953125,
0.01155853271484375,
-0.00905609130859375,
0.0024089813232421875,
-0.016876220703125,
0.07220458984375,
0.0013742446899414062,
0.002330780029296875,
-0.034210205078125,
0.01502227783203125,
0.0227508544921875,
0.00982666015625,
0.022003173828125,
-0.016815185546875,
-0.0246429443359375,
-0.0006961822509765625,
0.0102081298828125,
0.0021152496337890625,
0.019805908203125,
0.032440185546875,
-0.0224761962890625,
0.0308380126953125,
-0.01332855224609375,
0.0128021240234375,
-0.033599853515625,
0.047027587890625,
-0.0364990234375,
0.0318603515625,
0.0119781494140625,
0.0063018798828125,
0.04779052734375,
0.01617431640625,
-0.007518768310546875,
-0.01322174072265625,
-0.004367828369140625,
-0.00994873046875,
0.048858642578125,
0.034149169921875,
-0.020172119140625,
-0.037933349609375,
-0.0006780624389648438,
0.007465362548828125,
-0.00043511390686035156,
-0.036163330078125,
0.02362060546875,
0.0018711090087890625,
0.005413055419921875,
-0.07598876953125,
-0.054718017578125,
0.0273590087890625,
-0.038726806640625,
0.01541900634765625,
-0.0462646484375,
-0.02069091796875,
0.039276123046875,
-0.0068511962890625,
-0.01293182373046875,
0.0225982666015625,
-0.044219970703125,
0.0138702392578125,
-0.021575927734375,
-0.016143798828125,
-0.036285400390625,
0.054443359375,
0.0174560546875,
0.007312774658203125,
-0.0128936767578125,
0.0102996826171875,
0.04168701171875,
-0.017608642578125,
0.054595947265625,
-0.00937652587890625,
0.044097900390625,
-0.00011301040649414062,
0.0015592575073242188,
0.0265045166015625,
0.02978515625,
-0.003726959228515625,
-0.0252685546875,
0.0243682861328125,
-0.052154541015625,
0.019317626953125,
-0.0258026123046875,
0.0203857421875,
0.05755615234375,
0.0006642341613769531,
0.0007863044738769531,
0.047271728515625,
0.004001617431640625,
0.0255584716796875,
0.0297088623046875,
-0.018218994140625,
-0.006084442138671875,
-0.023529052734375,
0.0228118896484375,
-0.0350341796875,
-0.004558563232421875,
-0.000005662441253662109,
-0.0018930435180664062,
-0.0284881591796875,
0.0187530517578125,
-0.043243408203125,
-0.00696563720703125,
0.0182037353515625,
-0.009429931640625,
-0.004970550537109375,
0.0220794677734375,
-0.0369873046875,
0.04119873046875,
-0.056549072265625,
0.011505126953125,
0.07684326171875,
0.0193023681640625,
0.0162811279296875,
-0.03704833984375,
0.050628662109375,
-0.01358795166015625,
-0.00942230224609375,
0.04254150390625,
-0.021759033203125,
-0.0304718017578125,
0.005767822265625,
-0.033905029296875,
-0.01080322265625,
0.05108642578125,
0.024078369140625,
0.01354217529296875,
-0.0308685302734375,
-0.05706787109375,
-0.00038504600524902344,
-0.022003173828125,
0.0794677734375,
-0.00882720947265625,
-0.0276031494140625,
-0.0299835205078125,
0.0574951171875,
-0.034393310546875,
-0.0517578125,
-0.05877685546875,
0.0145111083984375,
-0.011260986328125,
0.0198822021484375,
-0.00823211669921875,
-0.0234222412109375,
-0.0096893310546875,
-0.042724609375,
-0.0167694091796875,
0.024017333984375,
0.0225830078125,
0.0162200927734375,
-0.03375244140625,
0.015869140625,
-0.0016384124755859375,
-0.017486572265625,
0.0218353271484375,
0.036895751953125,
0.028778076171875,
-0.01947021484375,
0.112548828125,
0.046875,
-0.0235748291015625,
0.0341796875,
0.014984130859375,
-0.06005859375,
0.06512451171875,
-0.00006884336471557617,
0.01690673828125,
-0.0156097412109375,
-0.01256561279296875,
0.0989990234375,
0.0701904296875,
-0.0264434814453125,
-0.01142120361328125,
-0.0145263671875,
0.0010957717895507812,
-0.03399658203125,
0.0013780593872070312,
-0.0216522216796875,
0.02850341796875,
0.01336669921875,
0.0242767333984375,
-0.0064544677734375,
0.0335693359375,
0.0261993408203125,
0.008880615234375,
0.0031299591064453125,
0.007472991943359375,
-0.0220947265625,
-0.0003571510314941406,
0.02978515625,
0.031341552734375,
-0.048431396484375,
-0.047027587890625,
-0.02093505859375,
0.0061492919921875,
-0.0219268798828125,
0.037139892578125,
-0.01360321044921875,
0.0816650390625,
-0.0210113525390625,
-0.00921630859375,
-0.03216552734375,
-0.00490570068359375,
0.032379150390625,
-0.018035888671875,
-0.0265960693359375,
-0.016693115234375,
0.0251617431640625,
-0.005786895751953125,
-0.0242156982421875,
0.0216064453125,
0.005054473876953125,
0.007312774658203125,
-0.035125732421875,
-0.01123809814453125,
-0.0149688720703125,
-0.0361328125,
0.0105133056640625,
0.0462646484375,
0.038848876953125,
0.033294677734375,
0.0028095245361328125,
0.0017938613891601562,
0.053955078125,
-0.040618896484375,
0.01139068603515625,
-0.012054443359375,
-0.0031986236572265625,
-0.01776123046875,
0.03717041015625,
-0.03704833984375,
0.0283966064453125,
-0.023590087890625,
0.0133209228515625,
0.0155792236328125,
-0.01485443115234375,
-0.0010595321655273438,
0.0010194778442382812,
-0.01358795166015625,
0.0133514404296875,
-0.0159149169921875,
-0.0298309326171875,
-0.01050567626953125,
0.0112152099609375,
0.032379150390625,
0.037017822265625,
0.04888916015625,
-0.01123809814453125,
0.009185791015625,
0.0006151199340820312,
-0.00788116455078125,
0.006855010986328125,
0.04205322265625,
0.0301971435546875,
-0.01285552978515625,
-0.007480621337890625,
-0.01690673828125,
-0.0005736351013183594,
0.0257415771484375,
-0.0110015869140625,
-0.0203399658203125,
-0.034698486328125,
0.006534576416015625,
-0.0014925003051757812,
-0.02947998046875,
0.039825439453125,
0.05194091796875,
-0.01375579833984375,
-0.01047515869140625,
-0.0004410743713378906,
0.048309326171875,
0.00806427001953125,
0.0221710205078125,
-0.00238800048828125,
-0.0008459091186523438,
0.032135009765625,
-0.037689208984375,
0.0418701171875,
-0.025390625,
0.032745361328125,
0.05743408203125,
-0.0103302001953125,
0.00408172607421875,
0.0305633544921875,
0.002330780029296875,
0.0303497314453125,
0.02740478515625,
0.020477294921875,
0.032470703125,
-0.0826416015625,
-0.0235595703125,
0.0119476318359375,
-0.046600341796875,
0.010040283203125,
-0.013427734375,
-0.0203857421875,
-0.005771636962890625,
-0.07305908203125,
-0.0254974365234375,
-0.02581787109375,
-0.05230712890625,
-0.003673553466796875,
0.01377105712890625,
-0.033935546875,
-0.01369476318359375,
0.052276611328125,
0.006519317626953125,
-0.0254669189453125,
0.01290130615234375,
-0.031890869140625,
-0.00365447998046875,
-0.0262451171875,
0.0582275390625,
-0.005123138427734375,
0.0357666015625,
0.0171356201171875,
0.027008056640625,
-0.0036067962646484375,
-0.072021484375,
-0.005619049072265625,
0.04315185546875,
-0.001232147216796875,
0.023193359375,
0.005794525146484375,
-0.0165863037109375,
-0.00128936767578125,
0.00045418739318847656,
0.07196044921875,
0.02337646484375,
-0.026947021484375,
-0.0028228759765625,
-0.00255584716796875,
-0.0110321044921875,
-0.00736236572265625,
-0.005908966064453125,
0.0292205810546875,
-0.048736572265625,
-0.0257720947265625,
-0.08367919921875,
-0.04791259765625,
-0.01552581787109375,
-0.04547119140625,
0.0229644775390625,
0.00873565673828125,
0.00008678436279296875,
-0.0209197998046875,
0.036285400390625,
0.05670166015625,
0.0300445556640625,
0.0141143798828125,
-0.01190948486328125,
0.03680419921875,
0.0033512115478515625,
0.0279083251953125,
-0.035430908203125,
0.043548583984375,
-0.007114410400390625,
0.01299285888671875,
0.0205230712890625,
-0.00495147705078125,
-0.0277862548828125,
0.0307159423828125,
-0.04217529296875,
-0.053497314453125,
0.056549072265625,
-0.0302886962890625,
-0.01216888427734375,
-0.043304443359375,
-0.0146026611328125,
-0.0191802978515625,
0.0799560546875,
-0.033905029296875,
-0.003971099853515625,
-0.0207366943359375,
0.023284912109375,
-0.040130615234375,
-0.07403564453125,
-0.04266357421875,
0.01068878173828125,
-0.089111328125,
0.012359619140625,
-0.003528594970703125,
-0.0290069580078125,
0.00797271728515625,
-0.06292724609375,
-0.049591064453125,
-0.051025390625,
0.039642333984375,
-0.0037384033203125,
0.04144287109375,
0.0024700164794921875,
0.0311279296875,
-0.019134521484375,
-0.033843994140625,
-0.0108489990234375,
-0.055328369140625,
-0.0255889892578125,
0.03271484375,
0.025054931640625,
-0.023162841796875,
-0.0009260177612304688,
-0.0235748291015625,
0.057342529296875,
-0.0025634765625,
0.006748199462890625,
-0.00299835205078125,
-0.006336212158203125,
0.008209228515625,
0.0074920654296875,
0.009246826171875,
-0.017242431640625,
-0.0093231201171875,
-0.045654296875,
-0.052581787109375,
-0.042510986328125,
-0.03363037109375,
-0.00524139404296875,
0.011688232421875,
-0.012237548828125,
0.0085601806640625,
-0.0288543701171875,
-0.07550048828125,
0.0214385986328125,
-0.0430908203125,
-0.001956939697265625,
-0.0341796875,
-0.0222930908203125,
0.0496826171875,
-0.00450897216796875,
0.01183319091796875,
0.0036869049072265625,
0.06646728515625,
0.003147125244140625,
-0.0203857421875,
-0.044097900390625,
0.0175323486328125,
0.034912109375,
0.00995635986328125,
0.0792236328125,
0.033599853515625,
-0.005138397216796875,
0.041961669921875,
0.0131683349609375,
0.000720977783203125,
0.01389312744140625,
0.02154541015625,
0.01214599609375,
-0.0094757080078125,
-0.00522613525390625,
0.000026285648345947266,
0.01512908935546875,
0.013641357421875,
-0.0009255409240722656,
-0.0119171142578125,
0.0083770751953125,
0.02825927734375,
0.01473236083984375,
-0.037261962890625,
-0.0408935546875,
-0.06793212890625,
0.0249176025390625,
-0.00341033935546875,
0.031646728515625,
0.0002067089080810547,
0.0028228759765625,
0.05780029296875,
0.05059814453125,
0.004451751708984375,
0.004711151123046875,
-0.0214996337890625,
-0.0130462646484375,
0.016326904296875,
0.00424957275390625,
-0.00922393798828125,
0.0156402587890625,
0.0025768280029296875,
-0.0018491744995117188,
-0.0153350830078125,
-0.032562255859375,
-0.016998291015625,
-0.0097503662109375,
0.00878143310546875,
0.03533935546875,
-0.04547119140625,
0.0246734619140625,
0.02789306640625,
0.004009246826171875,
0.0194854736328125,
-0.0374755859375,
-0.004486083984375,
-0.034454345703125,
0.043731689453125,
-0.0005993843078613281,
-0.01284027099609375,
0.047698974609375,
-0.005130767822265625,
-0.0328369140625,
0.0221405029296875,
0.013214111328125,
-0.0021495819091796875,
0.01470947265625,
0.0274658203125,
0.0231170654296875,
-0.024383544921875,
0.01084136962890625,
0.00042176246643066406,
0.04364013671875,
-0.036041259765625,
-0.0008020401000976562,
0.051116943359375,
0.058258056640625,
-0.0119171142578125,
-0.039642333984375,
-0.01500701904296875,
-0.037200927734375,
-0.012298583984375,
-0.0136566162109375,
-0.0293426513671875,
-0.016265869140625,
-0.0206756591796875,
-0.0135650634765625,
0.02398681640625,
0.02239990234375,
-0.023681640625,
-0.0198211669921875,
-0.054443359375,
-0.038909912109375,
0.06658935546875,
-0.08380126953125,
0.010040283203125,
0.0223846435546875,
0.01251983642578125,
-0.0205535888671875,
-0.012847900390625,
-0.032470703125,
-0.0123291015625,
-0.016387939453125,
0.0019989013671875,
0.03900146484375,
0.0023441314697265625,
0.001983642578125,
-0.0176239013671875,
-0.0190277099609375,
-0.0104522705078125,
0.01263427734375,
0.031280517578125,
-0.00847625732421875,
-0.057769775390625,
0.0183258056640625,
-0.0296630859375,
0.00847625732421875,
0.007793426513671875,
-0.034637451171875,
-0.03118896484375,
-0.04205322265625,
-0.0172576904296875,
0.01558685302734375,
-0.026458740234375,
0.00897979736328125,
0.0034732818603515625,
0.0180816650390625,
-0.0152130126953125,
0.01837158203125,
-0.01219940185546875,
0.0474853515625,
0.005260467529296875,
0.053619384765625,
0.0190277099609375,
0.0186309814453125,
-0.0282440185546875,
-0.045135498046875,
-0.005649566650390625,
-0.0521240234375,
0.008056640625,
0.0032825469970703125,
-0.01351165771484375,
0.03753662109375,
0.04241943359375,
0.00974273681640625,
0.01433563232421875,
-0.014801025390625,
0.005214691162109375,
-0.0396728515625,
0.019622802734375,
-0.06640625,
0.006992340087890625,
-0.04559326171875,
0.0131683349609375,
0.039764404296875,
-0.004398345947265625,
-0.030792236328125,
0.000469207763671875,
0.0206756591796875,
0.01383209228515625,
0.000005841255187988281,
0.026336669921875,
0.037750244140625,
0.09991455078125,
-0.005550384521484375,
0.07952880859375,
0.053070068359375,
0.0218353271484375,
0.05169677734375,
0.00989532470703125,
-0.0018701553344726562,
-0.001461029052734375,
0.07757568359375,
0.0309295654296875,
0.0016851425170898438,
0.08111572265625,
-0.0199737548828125,
0.0243072509765625,
0.035064697265625,
0.0401611328125,
-0.05535888671875,
0.004184722900390625,
-0.029754638671875,
-0.0032444000244140625,
0.06280517578125,
0.0325927734375,
-0.0220947265625,
-0.0124053955078125,
-0.03302001953125,
-0.0361328125,
-0.0179443359375,
-0.0193328857421875,
0.007526397705078125,
-0.00899505615234375,
0.03570556640625,
0.033050537109375,
0.02130126953125,
-0.046417236328125,
-0.015380859375,
0.0426025390625,
-0.00689697265625,
-0.0071258544921875,
-0.0026798248291015625,
0.01045989990234375,
-0.01324462890625,
-0.032684326171875,
0.0289306640625,
-0.00966644287109375,
0.00006461143493652344,
0.022979736328125,
-0.0097198486328125,
0.00034308433532714844,
0.054412841796875,
-0.02203369140625,
0.008544921875,
0.023529052734375,
-0.029876708984375,
0.036224365234375,
-0.0005059242248535156,
0.010894775390625,
-0.0239715576171875,
-0.059478759765625,
-0.01012420654296875,
-0.04888916015625,
0.0144805908203125,
-0.00505828857421875,
-0.011932373046875,
0.058349609375,
-0.05926513671875,
0.0040130615234375,
0.032562255859375,
0.027679443359375,
-0.00043272972106933594,
0.0019311904907226562,
0.025421142578125,
-0.0426025390625,
-0.0246734619140625,
-0.0081024169921875,
-0.0361328125,
0.005840301513671875,
-0.038360595703125,
-0.06829833984375,
0.09613037109375,
-0.00759124755859375,
0.044952392578125,
0.05767822265625,
0.0185546875,
-0.05084228515625,
-0.0082550048828125,
-0.016815185546875,
0.050262451171875,
-0.0310821533203125,
0.0230712890625,
-0.0687255859375,
0.006622314453125,
0.0008306503295898438,
0.04193115234375,
0.07763671875,
0.004276275634765625,
-0.0489501953125,
-0.0128173828125,
0.08392333984375,
0.08477783203125,
0.0361328125,
0.019775390625,
-0.0169830322265625,
0.0107421875,
0.0035266876220703125,
-0.040191650390625,
0.0011186599731445312,
0.0030670166015625,
-0.050506591796875,
0.0185394287109375,
0.03033447265625,
0.041046142578125,
0.02447509765625,
0.0184173583984375,
-0.01525115966796875,
0.022735595703125,
0.0322265625,
-0.00501251220703125,
0.0011224746704101562,
0.0221710205078125,
0.0026302337646484375,
-0.054962158203125,
0.0034027099609375,
-0.0239410400390625,
0.039581298828125,
-0.0029964447021484375,
0.0560302734375,
0.06024169921875,
0.029022216796875,
0.047882080078125,
0.0047607421875,
0.0233917236328125,
0.01084136962890625,
-0.0276031494140625,
0.03887939453125,
0.0404052734375,
0.02923583984375,
0.00006437301635742188,
0.00815582275390625,
0.0261077880859375,
0.0350341796875,
-0.0276641845703125,
-0.02154541015625,
0.01430511474609375,
-0.004833221435546875,
-0.02435302734375,
-0.03271484375,
-0.01995849609375,
-0.0404052734375,
-0.0305023193359375,
-0.0260467529296875,
-0.0066986083984375,
0.043243408203125,
0.032958984375,
0.0023174285888671875,
0.0052490234375,
-0.033477783203125,
-0.0272216796875,
-0.01107025146484375,
-0.0218963623046875,
-0.01313018798828125,
0.030364990234375,
0.0310516357421875,
0.0257415771484375,
-0.018463134765625,
-0.01038360595703125,
0.01456451416015625,
0.03302001953125,
-0.0258026123046875,
-0.013519287109375,
-0.043243408203125,
-0.09014892578125,
0.038299560546875,
0.043670654296875,
0.04681396484375,
0.01409149169921875,
0.050323486328125,
0.04034423828125,
-0.030517578125,
-0.0089263916015625,
0.0285186767578125,
-0.00441741943359375,
0.04339599609375,
-0.0252227783203125,
0.03839111328125,
0.02392578125,
-0.01015472412109375,
-0.0416259765625,
-0.00853729248046875,
0.07708740234375,
-0.0017595291137695312,
0.031829833984375,
-0.0037212371826171875,
-0.045928955078125,
-0.002361297607421875,
-0.05340576171875,
0.05938720703125,
-0.004550933837890625,
-0.041259765625,
0.0015621185302734375,
-0.022186279296875,
-0.033355712890625,
0.016571044921875,
0.037078857421875,
-0.0039825439453125,
0.0157012939453125,
0.0158233642578125,
-0.01279449462890625,
-0.046173095703125,
0.01104736328125,
0.03802490234375,
-0.01043701171875,
0.0004489421844482422,
0.010955810546875,
-0.0699462890625,
-0.041015625,
-0.018035888671875,
0.0292205810546875,
0.00965118408203125,
0.12396240234375,
-0.02783203125,
0.013397216796875,
0.00551605224609375,
-0.00978851318359375,
-0.01027679443359375,
0.0156402587890625,
-0.0040740966796875,
-0.015625,
0.0021228790283203125,
-0.00519561767578125,
-0.0361328125,
-0.01947021484375,
0.01544952392578125,
-0.0267791748046875,
0.0004203319549560547,
-0.0487060546875,
0.031280517578125,
0.0283203125,
-0.004150390625,
-0.03643798828125,
-0.024566650390625,
-0.0411376953125,
0.0023250579833984375,
0.0091400146484375,
-0.00357818603515625,
-0.04901123046875,
0.023590087890625,
-0.006801605224609375,
-0.0284423828125,
0.03558349609375,
-0.050140380859375,
0.058197021484375,
0.052093505859375,
-0.02545166015625,
-0.0257110595703125,
0.0082244873046875,
-0.004680633544921875,
-0.006488800048828125,
0.017181396484375,
0.007354736328125,
0.01456451416015625,
-0.0048980712890625,
-0.06256103515625,
-0.0250396728515625,
-0.037109375,
-0.0149078369140625,
-0.017852783203125,
-0.005443572998046875,
-0.0284881591796875,
-0.0128631591796875,
-0.010467529296875,
-0.01551055908203125,
-0.001369476318359375,
-0.019561767578125,
0.0221405029296875,
0.0083160400390625,
-0.01306915283203125,
-0.018585205078125,
-0.0065460205078125,
0.025299072265625,
0.006771087646484375,
-0.06781005859375,
0.0173492431640625,
-0.0081329345703125,
0.059173583984375,
-0.03204345703125,
0.049468994140625,
-0.0210723876953125,
0.00327301025390625,
-0.0276641845703125,
-0.0313720703125,
-0.017791748046875,
0.039642333984375,
-0.017974853515625,
0.0017194747924804688,
0.019866943359375,
-0.0128173828125,
0.034332275390625,
-0.00047326087951660156,
0.0020580291748046875,
0.059326171875,
-0.030731201171875,
-0.02252197265625,
-0.009429931640625,
0.005649566650390625,
-0.0101165771484375,
0.006500244140625,
0.0157623291015625,
0.002063751220703125,
-0.032379150390625,
-0.00555419921875,
-0.0255584716796875,
-0.020172119140625,
-0.0543212890625,
-0.086181640625,
0.030487060546875,
0.0024623870849609375,
-0.04718017578125,
0.0021762847900390625,
0.015716552734375,
-0.0218505859375,
0.028778076171875,
0.01654052734375,
-0.019561767578125,
0.0098114013671875,
0.0129547119140625,
0.00039649009704589844,
0.055328369140625,
-0.0251617431640625,
-0.0008139610290527344,
-0.0140533447265625,
0.0120086669921875,
0.004924774169921875,
-0.0067291259765625,
0.023468017578125,
-0.006641387939453125,
0.041168212890625,
0.05126953125,
-0.00749969482421875,
0.054351806640625,
0.0074005126953125,
-0.06280517578125,
-0.0117950439453125,
-0.0260009765625,
-0.03765869140625,
-0.0404052734375,
0.06317138671875,
0.06390380859375,
0.01505279541015625,
-0.00836944580078125,
-0.0221405029296875,
-0.00011801719665527344,
0.0177764892578125,
-0.006988525390625,
0.02520751953125,
-0.06121826171875,
-0.02508544921875,
0.009063720703125,
0.01059722900390625,
-0.032867431640625,
-0.006603240966796875,
-0.04144287109375,
-0.034637451171875,
-0.05340576171875,
-0.0050811767578125,
-0.052398681640625,
0.0266265869140625,
0.03350830078125,
-0.025146484375,
0.00954437255859375,
-0.01507568359375,
0.0114593505859375,
0.0168914794921875,
-0.0167999267578125,
-0.01497650146484375,
-0.00821685791015625,
-0.004566192626953125,
0.03607177734375,
-0.00417327880859375,
0.01019287109375,
-0.02203369140625,
0.00714111328125,
-0.0084686279296875,
0.000019669532775878906,
0.004138946533203125,
0.01161956787109375,
-0.00901031494140625,
0.037109375,
0.006267547607421875,
0.03729248046875,
-0.0179290771484375,
0.032623291015625,
0.0007290840148925781,
0.01120758056640625,
-0.039794921875,
0.0177154541015625,
0.018341064453125,
-0.0426025390625,
0.01123809814453125,
0.019134521484375,
0.0276336669921875,
-0.0225677490234375,
-0.0037136077880859375,
-0.053863525390625,
0.020782470703125,
-0.01270294189453125
]
|
f131b4db1b6f9853002e3a35487aa8f3b0eb4a2c | Wordpress Stackexchange
Q: wp-admin redirecting to https, denying login I use cloudflare via the cloudflare plugin, have SSL enabled.
Enabled ssl within the wp-config.php file:
define('WP_HOME','https://example.org');
define('WP_SITEURL','https://example.org');
$_SERVER['HTTPS'] = 'on';
Everything seems to work fine on the main site, but when trying to login to admin I see:
You do not have sufficient permissions to access this page.
This started after going into general settings and adjusting the 'Home' and 'Site URL' options.
Following guides, I am able to get the page to appear (instead of being stuck in an infinite redirection loop).
I'm not sure what else to change here, as I've just lost permissions out right after switching to https everywhere.
A: The fellow above was correct, however the string MUST be above:
require_once(ABSPATH . 'wp-settings.php');
This is located within wp-config.php :)
| Q: wp-admin redirecting to https, denying login I use cloudflare via the cloudflare plugin, have SSL enabled.
Enabled ssl within the wp-config.php file:
define('WP_HOME','https://example.org');
define('WP_SITEURL','https://example.org');
$_SERVER['HTTPS'] = 'on';
Everything seems to work fine on the main site, but when trying to login to admin I see:
You do not have sufficient permissions to access this page.
This started after going into general settings and adjusting the 'Home' and 'Site URL' options.
Following guides, I am able to get the page to appear (instead of being stuck in an infinite redirection loop).
I'm not sure what else to change here, as I've just lost permissions out right after switching to https everywhere.
A: The fellow above was correct, however the string MUST be above:
require_once(ABSPATH . 'wp-settings.php');
This is located within wp-config.php :)
A: You need to forward the http:// to https:// to avoid infinite loop.
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
$_SERVER['HTTPS']='on';
| wordpress | {
"language": "en",
"length": 150,
"provenance": "stackexchange_00019.jsonl.gz:455279",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/186371"
} | [
0.04949951171875,
-0.00508880615234375,
-0.0017938613891601562,
0.0021533966064453125,
-0.0010852813720703125,
-0.04168701171875,
0.039947509765625,
-0.037872314453125,
-0.024139404296875,
-0.0014581680297851562,
0.0250244140625,
-0.00505828857421875,
-0.020782470703125,
-0.0543212890625,
0.024505615234375,
-0.02020263671875,
0.0072784423828125,
0.00618743896484375,
0.00252532958984375,
-0.0217132568359375,
-0.00792694091796875,
-0.00783538818359375,
0.01129913330078125,
-0.004734039306640625,
0.004703521728515625,
0.001800537109375,
0.0968017578125,
-0.05096435546875,
0.0141143798828125,
-0.007770538330078125,
0.01049041748046875,
-0.040008544921875,
0.01169586181640625,
0.060699462890625,
-0.06512451171875,
-0.0775146484375,
-0.02850341796875,
0.025238037109375,
-0.026458740234375,
0.023651123046875,
0.0243072509765625,
-0.0101470947265625,
0.037750244140625,
0.049346923828125,
-0.0140380859375,
-0.0253143310546875,
0.017669677734375,
-0.031890869140625,
0.006198883056640625,
0.0130157470703125,
0.002796173095703125,
-0.0028362274169921875,
0.0065460205078125,
-0.0089569091796875,
-0.021728515625,
-0.01363372802734375,
0.027923583984375,
0.0056915283203125,
0.0142059326171875,
-0.0307464599609375,
-0.033538818359375,
0.01454925537109375,
0.01641845703125,
0.01515960693359375,
-0.01425933837890625,
-0.01120758056640625,
-0.006488800048828125,
0.00888824462890625,
-0.0380859375,
-0.03472900390625,
0.0201873779296875,
-0.0107574462890625,
0.004222869873046875,
-0.016754150390625,
0.00336456298828125,
-0.0033588409423828125,
-0.0201263427734375,
0.0164031982421875,
0.026397705078125,
-0.0003635883331298828,
-0.012908935546875,
-0.0074005126953125,
-0.0027751922607421875,
-0.00445556640625,
-0.0167236328125,
0.018829345703125,
-0.0254364013671875,
-0.0172576904296875,
0.005962371826171875,
0.01006317138671875,
0.00327301025390625,
0.0036220550537109375,
0.033233642578125,
0.01018524169921875,
-0.0194854736328125,
-0.02960205078125,
0.005985260009765625,
-0.002460479736328125,
0.01070404052734375,
-0.01251983642578125,
-0.0025177001953125,
-0.036407470703125,
-0.034942626953125,
0.004589080810546875,
0.0027675628662109375,
0.05328369140625,
0.006801605224609375,
0.0325927734375,
0.0234527587890625,
0.0162200927734375,
0.018524169921875,
-0.019256591796875,
-0.0222930908203125,
-0.046630859375,
0.0080108642578125,
0.033935546875,
-0.0300140380859375,
-0.002155303955078125,
-0.0025348663330078125,
-0.006504058837890625,
-0.04656982421875,
-0.00008046627044677734,
-0.01177978515625,
0.00673675537109375,
0.006023406982421875,
-0.00424957275390625,
0.013702392578125,
-0.006687164306640625,
-0.01247406005859375,
0.016845703125,
-0.0230560302734375,
0.01177978515625,
0.07391357421875,
0.047698974609375,
0.01168060302734375,
-0.017974853515625,
0.043121337890625,
-0.0193939208984375,
-0.0265655517578125,
0.0218963623046875,
0.0069732666015625,
-0.04339599609375,
-0.0423583984375,
-0.017242431640625,
0.0280303955078125,
0.023040771484375,
0.0144500732421875,
0.0117645263671875,
0.0185089111328125,
-0.05517578125,
0.035614013671875,
-0.041046142578125,
0.02532958984375,
0.034454345703125,
0.0016584396362304688,
0.02166748046875,
0.041534423828125,
-0.0211181640625,
-0.03778076171875,
-0.039886474609375,
-0.01181793212890625,
-0.004276275634765625,
0.03009033203125,
0.0004401206970214844,
0.0004987716674804688,
-0.004669189453125,
-0.0080108642578125,
-0.0020351409912109375,
0.023223876953125,
0.01092529296875,
0.03436279296875,
-0.0008034706115722656,
-0.00843048095703125,
0.019134521484375,
0.016632080078125,
0.01401519775390625,
-0.0182647705078125,
0.01380157470703125,
0.042755126953125,
0.03228759765625,
0.017059326171875,
-0.005878448486328125,
0.06884765625,
0.01087188720703125,
-0.022247314453125,
-0.0011892318725585938,
-0.01038360595703125,
0.01239776611328125,
0.030609130859375,
0.006927490234375,
-0.019866943359375,
-0.01056671142578125,
-0.03985595703125,
0.03515625,
-0.037933349609375,
-0.054840087890625,
-0.0202789306640625,
-0.0236358642578125,
-0.02410888671875,
0.033477783203125,
-0.001674652099609375,
-0.0161895751953125,
-0.0108489990234375,
0.000400543212890625,
0.0335693359375,
-0.04150390625,
0.018707275390625,
-0.004413604736328125,
0.036865234375,
0.0157470703125,
-0.0100250244140625,
-0.0108795166015625,
0.00502777099609375,
-0.0592041015625,
-0.03375244140625,
0.0364990234375,
-0.0201263427734375,
0.052764892578125,
0.0033969879150390625,
0.059478759765625,
0.004344940185546875,
-0.06097412109375,
-0.01055145263671875,
-0.0240325927734375,
0.005138397216796875,
-0.01129913330078125,
-0.0107574462890625,
-0.000942230224609375,
0.045654296875,
-0.00925445556640625,
0.048828125,
0.0013904571533203125,
0.0020599365234375,
0.037689208984375,
-0.037384033203125,
-0.0192413330078125,
-0.03955078125,
-0.057464599609375,
0.0124359130859375,
0.037628173828125,
0.041656494140625,
0.023651123046875,
-0.039886474609375,
-0.06298828125,
0.0350341796875,
-0.06768798828125,
0.001796722412109375,
-0.027008056640625,
0.018096923828125,
0.005031585693359375,
0.002044677734375,
-0.004695892333984375,
0.021392822265625,
-0.025726318359375,
0.0178680419921875,
0.041015625,
0.0119781494140625,
-0.020599365234375,
0.0055694580078125,
-0.0229644775390625,
0.03021240234375,
-0.0186004638671875,
-0.06365966796875,
0.013641357421875,
-0.055999755859375,
-0.020355224609375,
-0.0234832763671875,
-0.0291748046875,
-0.0005445480346679688,
-0.042938232421875,
0.02886962890625,
-0.0174102783203125,
-0.01244354248046875,
0.024169921875,
0.092041015625,
-0.04522705078125,
-0.047607421875,
0.0028533935546875,
0.03125,
0.01166534423828125,
-0.000225067138671875,
0.028228759765625,
-0.0302734375,
-0.004901885986328125,
-0.0195465087890625,
-0.043212890625,
0.0118408203125,
0.03973388671875,
0.01226043701171875,
0.012725830078125,
0.03778076171875,
-0.0109405517578125,
-0.0271759033203125,
0.032562255859375,
-0.01715087890625,
-0.0283355712890625,
0.031494140625,
-0.04339599609375,
0.029541015625,
-0.0257110595703125,
0.08917236328125,
0.058685302734375,
0.003936767578125,
0.0174102783203125,
0.01209259033203125,
0.00154876708984375,
0.01543426513671875,
0.00096893310546875,
-0.01348876953125,
-0.005420684814453125,
-0.04827880859375,
0.00019109249114990234,
0.03533935546875,
-0.0406494140625,
0.057342529296875,
-0.00677490234375,
0.005889892578125,
0.0167694091796875,
-0.070556640625,
-0.07269287109375,
-0.07952880859375,
-0.07012939453125,
0.055145263671875,
0.019622802734375,
-0.012786865234375,
0.00011914968490600586,
0.06085205078125,
0.043487548828125,
-0.0124664306640625,
-0.032318115234375,
-0.051177978515625,
-0.08587646484375,
-0.0731201171875,
-0.005855560302734375,
0.007205963134765625,
0.017791748046875,
0.0031585693359375,
0.033966064453125,
-0.00908660888671875,
-0.02410888671875,
-0.00365447998046875,
-0.006847381591796875,
-0.0078582763671875,
-0.01153564453125,
-0.05303955078125,
0.029632568359375,
0.01473236083984375,
-0.0023097991943359375,
0.0161590576171875,
-0.01442718505859375,
0.0133819580078125,
-0.0199737548828125,
0.00009435415267944336,
-0.055145263671875,
0.0016918182373046875,
-0.0404052734375,
-0.0235595703125,
-0.048004150390625,
-0.0108795166015625,
-0.056640625,
0.0232391357421875,
-0.01058197021484375,
-0.0178070068359375,
0.00036263465881347656,
0.007396697998046875,
-0.020355224609375,
0.039398193359375,
-0.041900634765625,
0.009918212890625,
0.014892578125,
0.0196075439453125,
-0.0012054443359375,
0.026763916015625,
-0.0171661376953125,
-0.01983642578125,
-0.0297088623046875,
0.023773193359375,
-0.0209503173828125,
-0.037567138671875,
-0.0189208984375,
-0.0325927734375,
-0.0364990234375,
-0.00788116455078125,
-0.056121826171875,
-0.082763671875,
0.049774169921875,
-0.044830322265625,
0.01145172119140625,
-0.051177978515625,
-0.0263519287109375,
-0.016326904296875,
0.10137939453125,
-0.0243988037109375,
0.002674102783203125,
0.0166778564453125,
0.00457000732421875,
-0.01255035400390625,
-0.005290985107421875,
-0.059814453125,
-0.0257720947265625,
-0.097900390625,
-0.0074615478515625,
-0.016510009765625,
-0.038482666015625,
0.039337158203125,
-0.0875244140625,
-0.02734375,
-0.07421875,
0.0235595703125,
-0.0011272430419921875,
-0.0012683868408203125,
0.038299560546875,
0.0005478858947753906,
-0.0167236328125,
0.00604248046875,
-0.01053619384765625,
-0.0906982421875,
-0.01226806640625,
-0.0231170654296875,
0.08685302734375,
0.0016765594482421875,
0.0166778564453125,
-0.0235443115234375,
0.059539794921875,
0.0218963623046875,
0.004520416259765625,
0.0208892822265625,
-0.01506805419921875,
0.034088134765625,
0.0083160400390625,
0.01108551025390625,
-0.0080413818359375,
-0.0119781494140625,
-0.019744873046875,
-0.044921875,
-0.00765228271484375,
-0.0187530517578125,
-0.0238800048828125,
0.0269317626953125,
-0.038177490234375,
-0.059295654296875,
-0.0174713134765625,
-0.039276123046875,
0.0018510818481445312,
0.0009479522705078125,
-0.031707763671875,
-0.0285186767578125,
-0.06878662109375,
0.0662841796875,
-0.024078369140625,
-0.0201416015625,
0.0082244873046875,
0.077392578125,
0.00635528564453125,
-0.01432037353515625,
-0.03558349609375,
0.01294708251953125,
0.023345947265625,
-0.01149749755859375,
0.084716796875,
0.033447265625,
0.0035076141357421875,
0.0911865234375,
-0.00504302978515625,
0.0004241466522216797,
-0.007205963134765625,
0.0072174072265625,
-0.0031375885009765625,
-0.048583984375,
0.02288818359375,
-0.00507354736328125,
-0.01216888427734375,
0.02813720703125,
0.034271240234375,
-0.01953125,
0.04022216796875,
-0.014556884765625,
-0.01229095458984375,
-0.0225830078125,
0.0270538330078125,
-0.050018310546875,
0.025299072265625,
-0.04351806640625,
0.046478271484375,
0.01995849609375,
0.003864288330078125,
0.046295166015625,
0.0413818359375,
-0.007045745849609375,
-0.03692626953125,
-0.031463623046875,
-0.038116455078125,
0.0019063949584960938,
-0.033966064453125,
-0.04229736328125,
0.01336669921875,
-0.03302001953125,
0.12890625,
0.032928466796875,
-0.0628662109375,
0.0755615234375,
-0.03643798828125,
0.0190887451171875,
0.02410888671875,
-0.0162353515625,
0.0184173583984375,
-0.02142333984375,
-0.0413818359375,
-0.0016984939575195312,
-0.0016803741455078125,
-0.06085205078125,
-0.041748046875,
0.0428466796875,
-0.0024433135986328125,
0.022979736328125,
0.03631591796875,
0.07135009765625,
0.037811279296875,
0.0535888671875,
-0.0423583984375,
0.002307891845703125,
0.038787841796875,
0.00640869140625,
0.00262451171875,
0.044219970703125,
0.005214691162109375,
-0.01165008544921875,
0.043731689453125,
-0.01727294921875,
-0.052642822265625,
0.0008392333984375,
0.04949951171875,
0.0159759521484375,
0.02557373046875,
0.0015592575073242188,
0.00010460615158081055,
-0.018798828125,
0.042266845703125,
-0.0102691650390625,
-0.05596923828125,
-0.0266876220703125,
0.014434814453125,
0.06536865234375,
-0.0138702392578125,
-0.02337646484375,
0.04510498046875,
-0.028350830078125,
0.028289794921875,
0.0289764404296875,
-0.01380157470703125,
-0.007518768310546875,
-0.0097503662109375,
-0.0114898681640625,
-0.02740478515625,
-0.012481689453125,
-0.01263427734375,
0.0007996559143066406,
-0.0225830078125,
-0.00333404541015625,
0.0163421630859375,
-0.0211334228515625,
0.005931854248046875,
0.017181396484375,
-0.014373779296875,
0.032958984375,
0.0127716064453125,
0.04779052734375,
0.01026153564453125,
-0.0196990966796875,
-0.0243072509765625,
-0.0119476318359375,
-0.01189422607421875,
0.026611328125,
0.009552001953125,
-0.0157318115234375,
-0.01079559326171875,
0.0406494140625,
0.0094757080078125,
0.0008916854858398438,
-0.049835205078125,
-0.058319091796875,
0.0182037353515625,
0.063720703125,
0.031158447265625,
-0.015289306640625,
0.05047607421875,
-0.0044708251953125,
0.04315185546875,
-0.0022296905517578125,
0.0167999267578125,
-0.0153045654296875,
-0.00731658935546875,
0.025054931640625,
-0.053985595703125,
-0.00426483154296875,
-0.047332763671875,
-0.0092315673828125,
0.01239013671875,
0.04931640625,
-0.004180908203125,
-0.012359619140625,
0.003238677978515625,
-0.00005030632019042969,
-0.01105499267578125,
0.0011892318725585938,
0.032073974609375,
-0.0014009475708007812,
0.0195159912109375,
0.0169830322265625,
0.02569580078125,
-0.049835205078125,
-0.051666259765625,
0.02825927734375,
0.01331329345703125,
0.0054168701171875,
0.0228118896484375,
-0.005710601806640625,
0.040374755859375,
0.08837890625,
0.004180908203125,
0.045745849609375,
0.03607177734375,
0.0025997161865234375,
0.00981903076171875,
-0.00176239013671875,
-0.0460205078125,
-0.0229339599609375,
0.00616455078125,
-0.005535125732421875,
-0.009063720703125,
0.0167083740234375,
-0.00960540771484375,
0.00801849365234375,
0.09051513671875,
0.061553955078125,
-0.11651611328125,
-0.007518768310546875,
0.000009119510650634766,
-0.00728607177734375,
0.01502227783203125,
0.00644683837890625,
-0.02215576171875,
-0.0218505859375,
0.005916595458984375,
-0.0040130615234375,
-0.022064208984375,
-0.0103607177734375,
0.028045654296875,
-0.0292205810546875,
-0.005023956298828125,
0.0236053466796875,
-0.00013124942779541016,
-0.040618896484375,
0.0048828125,
0.0035419464111328125,
-0.0236053466796875,
0.023223876953125,
-0.00830841064453125,
-0.00009047985076904297,
-0.050750732421875,
-0.0594482421875,
-0.0278472900390625,
-0.041778564453125,
-0.0239410400390625,
0.03314208984375,
0.0318603515625,
0.04510498046875,
0.06402587890625,
0.01259613037109375,
0.004253387451171875,
0.0256805419921875,
0.00403594970703125,
0.0601806640625,
-0.031219482421875,
-0.00754547119140625,
0.01092529296875,
-0.03717041015625,
-0.002044677734375,
0.00499725341796875,
-0.0145111083984375,
-0.001300811767578125,
-0.0284881591796875,
0.040283203125,
-0.01364898681640625,
-0.002338409423828125,
0.0379638671875,
0.006038665771484375,
-0.0207672119140625,
0.00432586669921875,
0.055511474609375,
-0.043304443359375,
-0.0026226043701171875,
0.020233154296875,
-0.00534820556640625,
-0.01065826416015625,
0.0088653564453125,
-0.037078857421875,
0.09130859375,
-0.0264434814453125,
0.034942626953125,
0.034576416015625,
0.022979736328125,
-0.01404571533203125,
0.032379150390625,
-0.010711669921875,
0.0592041015625,
0.030120849609375,
-0.0175323486328125,
-0.0090179443359375,
0.0014715194702148438,
-0.00963592529296875,
0.0284576416015625,
0.056549072265625,
0.0174713134765625,
-0.05963134765625,
0.0008835792541503906,
0.039154052734375,
0.0234832763671875,
0.00617218017578125,
0.05902099609375,
-0.0092010498046875,
0.054901123046875,
0.03997802734375,
-0.043548583984375,
0.03497314453125,
-0.0303192138671875,
-0.04156494140625,
-0.004802703857421875,
0.00460052490234375,
-0.0218353271484375,
-0.0127716064453125,
0.0139923095703125,
-0.08514404296875,
0.0267181396484375,
0.0472412109375,
0.0009512901306152344,
0.020721435546875,
-0.035430908203125,
-0.0252685546875,
-0.017578125,
0.026092529296875,
-0.0256500244140625,
0.0220489501953125,
-0.0149383544921875,
-0.0086822509765625,
-0.01125335693359375,
0.01727294921875,
-0.03515625,
-0.01413726806640625,
-0.0146636962890625,
0.0372314453125,
-0.037933349609375,
0.0261993408203125,
0.02178955078125,
0.0249481201171875,
-0.00864410400390625,
0.057281494140625,
0.0173797607421875,
0.0295257568359375,
-0.046142578125,
-0.031768798828125,
-0.00904083251953125,
-0.0007500648498535156,
0.037353515625,
0.0006909370422363281,
0.0552978515625,
0.01027679443359375,
0.023193359375,
-0.002285003662109375,
0.01259613037109375,
0.0494384765625,
-0.0279693603515625,
0.0088958740234375,
0.06256103515625,
-0.0172882080078125,
0.044158935546875,
-0.0172576904296875,
-0.054595947265625,
0.004230499267578125,
0.04864501953125,
0.067138671875,
0.0004611015319824219,
0.0025424957275390625,
-0.020843505859375,
-0.0215911865234375,
0.03216552734375,
0.0087127685546875,
0.004901885986328125,
-0.03912353515625,
-0.023681640625,
-0.00431060791015625,
0.051361083984375,
0.005664825439453125,
-0.00872039794921875,
0.0239105224609375,
0.04962158203125,
0.007808685302734375,
-0.0256195068359375,
0.0186004638671875,
-0.0002453327178955078,
0.0126800537109375,
-0.04132080078125,
0.01318359375,
-0.00763702392578125,
-0.01392364501953125,
-0.01270294189453125,
-0.0117950439453125,
0.0194244384765625,
0.013092041015625,
0.033111572265625,
0.00667572021484375,
-0.0186309814453125,
-0.0156402587890625,
-0.0001951456069946289,
0.0236053466796875,
0.023529052734375,
-0.04241943359375,
-0.005886077880859375,
0.0019025802612304688,
-0.05010986328125,
0.026702880859375,
0.0408935546875,
-0.0159759521484375,
0.012664794921875,
0.0001958608627319336,
-0.041412353515625,
0.047027587890625,
0.0079803466796875,
-0.006778717041015625,
-0.0160064697265625,
0.007076263427734375,
-0.03521728515625,
-0.022735595703125,
0.01221466064453125,
0.01137542724609375,
0.0179595947265625,
-0.0010919570922851562,
0.0614013671875,
-0.0202484130859375,
0.0108642578125,
-0.0049591064453125,
-0.0023479461669921875,
-0.0035037994384765625,
0.00478363037109375,
0.0031795501708984375,
-0.0006127357482910156,
-0.0132598876953125,
-0.0130615234375,
-0.0814208984375,
0.052459716796875,
0.0030384063720703125,
0.0004642009735107422,
0.05877685546875,
0.0074920654296875,
-0.00954437255859375,
-0.044891357421875,
-0.00569915771484375,
-0.051239013671875,
-0.0946044921875,
-0.07049560546875,
0.0496826171875,
-0.035247802734375,
0.0189361572265625,
-0.006988525390625,
0.0243682861328125,
-0.0650634765625,
-0.00800323486328125,
0.00012046098709106445,
-0.019561767578125,
-0.050262451171875,
0.00795745849609375,
-0.04278564453125,
-0.00513458251953125,
0.017333984375,
-0.00852203369140625,
0.016143798828125,
0.01171112060546875,
0.0086212158203125,
0.00931549072265625,
-0.007526397705078125,
-0.008636474609375,
0.0057220458984375,
-0.003810882568359375,
-0.0257568359375,
-0.009063720703125,
0.02691650390625,
-0.0218658447265625,
-0.0174560546875,
-0.0222625732421875,
-0.0318603515625,
-0.026153564453125,
-0.01424407958984375,
0.00972747802734375,
-0.00603485107421875,
-0.06707763671875,
-0.04742431640625,
0.038055419921875,
0.018524169921875,
-0.032012939453125,
0.00032639503479003906,
0.01485443115234375,
-0.06597900390625,
0.044281005859375,
-0.0198516845703125,
0.0258026123046875,
0.004650115966796875,
0.0222015380859375,
-0.0416259765625,
-0.00974273681640625,
-0.0180206298828125,
0.00788116455078125,
-0.030303955078125,
0.01763916015625,
0.041107177734375,
-0.0152587890625,
0.00508880615234375,
-0.040374755859375,
-0.02557373046875,
0.01345062255859375,
-0.0631103515625,
0.007663726806640625,
0.02801513671875,
-0.00786590576171875,
-0.044158935546875,
-0.0338134765625,
0.01485443115234375,
-0.016265869140625,
-0.031707763671875,
-0.00722503662109375,
0.00885772705078125,
0.00583648681640625,
-0.041595458984375,
-0.0758056640625,
0.0374755859375,
-0.00464630126953125,
-0.0235748291015625,
-0.036834716796875,
0.0166168212890625,
-0.016632080078125,
0.01483154296875,
0.00702667236328125,
-0.0308685302734375,
0.004360198974609375,
0.02197265625,
0.0126190185546875,
-0.01399993896484375,
-0.01094818115234375,
0.0253143310546875,
-0.052734375,
0.0400390625,
0.0355224609375,
-0.0114288330078125,
0.0004878044128417969,
0.004741668701171875,
0.029815673828125,
0.06439208984375,
0.0031490325927734375,
0.0018911361694335938,
-0.0034732818603515625,
-0.053253173828125,
0.022857666015625,
-0.0138397216796875,
-0.010833740234375,
-0.034088134765625,
-0.0233612060546875,
0.020263671875,
-0.01497650146484375,
0.0099639892578125,
-0.0606689453125,
-0.04876708984375,
0.0021305084228515625,
-0.0278778076171875,
0.01227569580078125,
-0.061737060546875,
0.0174102783203125,
-0.021209716796875,
0.01165771484375,
-0.0167694091796875,
0.0187225341796875,
-0.0164337158203125,
-0.014190673828125,
0.00910186767578125,
-0.0362548828125,
0.0243682861328125,
-0.002849578857421875,
0.05462646484375,
-0.0380859375,
0.009124755859375,
-0.026397705078125,
0.0229034423828125,
0.015625,
-0.0594482421875,
-0.0012674331665039062,
0.0238800048828125,
-0.023345947265625,
0.0021572113037109375,
0.006290435791015625,
0.004886627197265625,
-0.0338134765625,
-0.005374908447265625,
-0.01531219482421875,
0.017486572265625,
0.00946044921875,
0.034576416015625,
0.001316070556640625,
-0.0092926025390625,
0.0110321044921875,
-0.0025997161865234375,
0.0013275146484375,
-0.01100921630859375,
-0.0150146484375,
0.045654296875,
-0.007610321044921875,
-0.031768798828125,
0.0247650146484375,
-0.0301513671875,
0.019561767578125,
0.015350341796875,
0.043212890625,
0.01123046875,
-0.00994110107421875,
-0.038482666015625,
0.017547607421875,
-0.0037631988525390625
]
|
a2c053e2360002f0c48975ad042bbe1d3ace9b85 | Wordpress Stackexchange
Q: Updating Post Meta with Backbone and the REST API I'm getting started with a project that is making use of Backbone and the WP REST API, but I"m having a little trouble.
Using the built in API JS for models and collections allows me to pretty easily update a post title or content. All I have to do is call:
this.model.set({title: 'New Title'});
this.model.save();
And everything works really well. But for post meta, there doesn't appear to be an easy way to update an entry to the database. Does anyone know how to go about taking a post model in Backbone, and updating it's meta data?
A: var parentId = 96; // the post id
var metaData = new wp.api.collections.PostMeta('', {parent: parentId});
metaData.fetch()
.done(function(data) {
var someKey = data.findWhere({key: 'someKey'});
someKey.set('value', 'newValue');
someKey.save({parent: parentId});
});
| Q: Updating Post Meta with Backbone and the REST API I'm getting started with a project that is making use of Backbone and the WP REST API, but I"m having a little trouble.
Using the built in API JS for models and collections allows me to pretty easily update a post title or content. All I have to do is call:
this.model.set({title: 'New Title'});
this.model.save();
And everything works really well. But for post meta, there doesn't appear to be an easy way to update an entry to the database. Does anyone know how to go about taking a post model in Backbone, and updating it's meta data?
A: var parentId = 96; // the post id
var metaData = new wp.api.collections.PostMeta('', {parent: parentId});
metaData.fetch()
.done(function(data) {
var someKey = data.findWhere({key: 'someKey'});
someKey.set('value', 'newValue');
someKey.save({parent: parentId});
});
A: Now you can use the models api as well:
var post = new wp.api.models.Post( { id: 1 } );
post.fetch();
post.setMeta('metaKey', 'metaValue');
// Or multiple metas at one time:
post.setMetas({metaKeyOne: 'metaValueOne', metaKeyTwo: 'metaValueTwo'});
post.save()
For this to work , the meta must be registered for REST API with register_post_meta and show_in_rest argument set to true.
Here is an example:
add_action(
'init',
function() {
register_post_meta('my_post_type', 'my_meta_key', ['show_in_rest' => true, 'single' => true]);
}
);
| wordpress | {
"language": "en",
"length": 210,
"provenance": "stackexchange_00019.jsonl.gz:455315",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/187499"
} | [
-0.01203155517578125,
0.0170745849609375,
-0.06201171875,
-0.01824951171875,
0.0023193359375,
-0.016845703125,
-0.0168304443359375,
-0.005802154541015625,
0.022308349609375,
0.04034423828125,
-0.004878997802734375,
-0.03387451171875,
0.032196044921875,
-0.0193023681640625,
-0.04376220703125,
-0.01123809814453125,
0.051116943359375,
-0.027069091796875,
0.043609619140625,
-0.005290985107421875,
-0.0053253173828125,
0.023895263671875,
0.05975341796875,
0.048919677734375,
0.0069427490234375,
0.030364990234375,
0.003955841064453125,
-0.00522613525390625,
-0.0184326171875,
-0.00736236572265625,
0.0137481689453125,
0.011932373046875,
0.018402099609375,
-0.022125244140625,
0.00891876220703125,
-0.0775146484375,
0.025360107421875,
-0.0169830322265625,
-0.028778076171875,
0.03399658203125,
0.01473236083984375,
0.0042724609375,
-0.01074981689453125,
0.054779052734375,
-0.0244293212890625,
-0.032958984375,
-0.003368377685546875,
-0.04693603515625,
0.04779052734375,
0.037628173828125,
-0.0162811279296875,
0.016357421875,
-0.0292510986328125,
0.007434844970703125,
0.007450103759765625,
-0.0011835098266601562,
-0.0221099853515625,
-0.018524169921875,
0.044036865234375,
0.002559661865234375,
-0.02520751953125,
-0.047210693359375,
0.0182647705078125,
-0.0284423828125,
-0.01204681396484375,
-0.0198211669921875,
0.0196075439453125,
-0.006069183349609375,
-0.0168304443359375,
0.004322052001953125,
0.039764404296875,
0.0025482177734375,
-0.0033321380615234375,
-0.0290374755859375,
0.0230560302734375,
0.0170745849609375,
-0.005481719970703125,
0.0081939697265625,
0.00653076171875,
0.0185089111328125,
0.024993896484375,
0.010284423828125,
0.02288818359375,
-0.01116180419921875,
-0.00377655029296875,
-0.00818634033203125,
-0.0106353759765625,
-0.01367950439453125,
-0.05078125,
-0.01380157470703125,
-0.034027099609375,
-0.061004638671875,
-0.058013916015625,
0.0270843505859375,
0.00829315185546875,
0.004848480224609375,
0.00907135009765625,
0.0212554931640625,
-0.0155487060546875,
-0.00018203258514404297,
0.02423095703125,
-0.03997802734375,
0.038726806640625,
-0.024017333984375,
0.0156707763671875,
-0.0243072509765625,
-0.00994110107421875,
-0.0197906494140625,
0.043212890625,
0.0203094482421875,
-0.0284881591796875,
0.0753173828125,
0.01067352294921875,
0.048858642578125,
-0.07073974609375,
-0.03704833984375,
-0.021697998046875,
-0.038177490234375,
-0.034637451171875,
-0.019195556640625,
0.0030307769775390625,
0.0213470458984375,
-0.04046630859375,
-0.0023250579833984375,
0.031646728515625,
0.0165863037109375,
-0.0225067138671875,
0.018463134765625,
-0.04010009765625,
-0.0222625732421875,
-0.010955810546875,
0.044403076171875,
0.06951904296875,
0.0552978515625,
0.01116180419921875,
-0.00025177001953125,
0.0037250518798828125,
0.00384521484375,
-0.02423095703125,
-0.00004553794860839844,
-0.0233154296875,
-0.01201629638671875,
0.0195465087890625,
-0.040069580078125,
0.0029811859130859375,
-0.0043487548828125,
0.0013904571533203125,
0.024505615234375,
0.017852783203125,
0.00876617431640625,
-0.016998291015625,
-0.00769805908203125,
0.014251708984375,
0.02996826171875,
0.0211944580078125,
-0.007389068603515625,
0.060455322265625,
-0.033172607421875,
-0.0013341903686523438,
-0.0438232421875,
-0.0164642333984375,
-0.01158905029296875,
0.068603515625,
-0.0206146240234375,
-0.0206298828125,
0.032562255859375,
-0.08795166015625,
-0.0200042724609375,
0.0213165283203125,
0.035308837890625,
0.015625,
-0.0166778564453125,
-0.03118896484375,
-0.01349639892578125,
-0.0135498046875,
-0.01049041748046875,
-0.063232421875,
-0.01068115234375,
0.035797119140625,
-0.018798828125,
0.00212860107421875,
-0.016632080078125,
0.015625,
0.03643798828125,
0.00829315185546875,
-0.022308349609375,
0.0204925537109375,
0.0217437744140625,
-0.0163726806640625,
0.034027099609375,
0.01560211181640625,
0.0136566162109375,
-0.006694793701171875,
-0.00460052490234375,
0.00511932373046875,
-0.0178070068359375,
-0.0104522705078125,
-0.0035800933837890625,
-0.01024627685546875,
-0.005523681640625,
-0.061126708984375,
0.043548583984375,
-0.037017822265625,
0.029876708984375,
-0.0109100341796875,
0.00470733642578125,
-0.0176544189453125,
0.04998779296875,
-0.0509033203125,
0.01806640625,
0.037384033203125,
-0.007114410400390625,
-0.045562744140625,
0.0217437744140625,
0.012115478515625,
-0.045013427734375,
-0.0256195068359375,
-0.00970458984375,
-0.0127410888671875,
0.0081939697265625,
-0.00890350341796875,
-0.0022220611572265625,
-0.017120361328125,
0.0261993408203125,
0.0281982421875,
-0.005146026611328125,
0.00533294677734375,
-0.01273345947265625,
0.04144287109375,
0.02386474609375,
-0.0294036865234375,
-0.01153564453125,
-0.0210113525390625,
-0.0235137939453125,
-0.04266357421875,
-0.01134490966796875,
-0.03765869140625,
-0.040618896484375,
0.01184844970703125,
0.06414794921875,
0.004291534423828125,
-0.0018262863159179688,
-0.01617431640625,
0.04278564453125,
0.0218048095703125,
0.03533935546875,
0.0161285400390625,
0.017822265625,
0.019989013671875,
0.0179901123046875,
-0.028961181640625,
-0.04022216796875,
0.038665771484375,
-0.0582275390625,
-0.0021533966064453125,
0.057403564453125,
-0.01678466796875,
0.004467010498046875,
-0.00870513916015625,
-0.01776123046875,
0.002208709716796875,
-0.04107666015625,
-0.0172271728515625,
-0.023162841796875,
0.055999755859375,
-0.018035888671875,
0.04693603515625,
0.0261688232421875,
-0.043182373046875,
0.00461578369140625,
0.0237579345703125,
0.03973388671875,
0.024322509765625,
0.068603515625,
0.0147552490234375,
0.0106201171875,
0.0026302337646484375,
-0.047393798828125,
0.04071044921875,
0.0460205078125,
-0.0079498291015625,
-0.01082611083984375,
0.0157470703125,
-0.007110595703125,
0.01165008544921875,
-0.025604248046875,
0.03143310546875,
-0.0015649795532226562,
0.0170440673828125,
0.033660888671875,
0.04547119140625,
-0.0034503936767578125,
-0.006618499755859375,
0.02313232421875,
0.0015926361083984375,
-0.019805908203125,
0.04010009765625,
-0.00960540771484375,
0.01214599609375,
-0.017333984375,
0.03955078125,
0.035919189453125,
-0.012603759765625,
-0.01000213623046875,
-0.0114593505859375,
0.0159454345703125,
-0.015045166015625,
0.00942230224609375,
-0.00966644287109375,
-0.0684814453125,
0.04278564453125,
0.039306640625,
0.0171661376953125,
0.019195556640625,
-0.0051422119140625,
-0.037811279296875,
-0.01522064208984375,
0.0082855224609375,
-0.11151123046875,
-0.09674072265625,
0.0305938720703125,
-0.056793212890625,
-0.034271240234375,
-0.00933074951171875,
-0.06256103515625,
0.0010166168212890625,
0.01293182373046875,
-0.0120849609375,
-0.0016880035400390625,
0.007114410400390625,
-0.040374755859375,
-0.0229644775390625,
-0.060882568359375,
-0.03985595703125,
-0.008392333984375,
-0.007610321044921875,
0.0017156600952148438,
0.006435394287109375,
-0.006526947021484375,
-0.018402099609375,
-0.006290435791015625,
0.038543701171875,
-0.00933074951171875,
-0.022705078125,
0.04962158203125,
-0.06365966796875,
0.01318359375,
-0.010467529296875,
0.0305633544921875,
0.0455322265625,
-0.0285186767578125,
-0.0057220458984375,
-0.020782470703125,
0.0307159423828125,
0.02508544921875,
-0.0006580352783203125,
0.01751708984375,
0.06494140625,
0.033477783203125,
0.004062652587890625,
-0.036895751953125,
-0.032562255859375,
-0.062744140625,
-0.0167999267578125,
0.03424072265625,
0.031219482421875,
-0.049652099609375,
0.042327880859375,
0.0015850067138671875,
-0.00962066650390625,
0.0382080078125,
-0.0169830322265625,
0.0186309814453125,
-0.037933349609375,
-0.034515380859375,
-0.03631591796875,
0.060943603515625,
0.0139312744140625,
-0.054412841796875,
0.0032806396484375,
0.005237579345703125,
-0.023681640625,
-0.0077972412109375,
-0.0693359375,
0.0018205642700195312,
0.03704833984375,
0.013458251953125,
0.046173095703125,
-0.0340576171875,
-0.030181884765625,
-0.0377197265625,
0.0516357421875,
0.033721923828125,
-0.031829833984375,
-0.0020503997802734375,
0.0196990966796875,
-0.0545654296875,
-0.020111083984375,
-0.002567291259765625,
0.009246826171875,
0.028167724609375,
-0.004848480224609375,
-0.00121307373046875,
0.002811431884765625,
-0.0157012939453125,
0.06427001953125,
0.006011962890625,
0.004146575927734375,
0.033477783203125,
-0.07421875,
0.0267181396484375,
-0.03515625,
0.04339599609375,
-0.0914306640625,
-0.004669189453125,
-0.03814697265625,
-0.07659912109375,
-0.02593994140625,
0.04058837890625,
0.035614013671875,
-0.02130126953125,
-0.05755615234375,
-0.0207672119140625,
0.0298919677734375,
-0.01300811767578125,
0.0634765625,
-0.05389404296875,
-0.0010309219360351562,
-0.0123748779296875,
-0.013092041015625,
-0.023223876953125,
-0.01322174072265625,
-0.039215087890625,
-0.0080718994140625,
-0.0098114013671875,
0.0188751220703125,
-0.007366180419921875,
-0.044708251953125,
0.01593017578125,
-0.01371002197265625,
-0.057525634765625,
-0.051116943359375,
-0.0595703125,
0.0005426406860351562,
-0.052337646484375,
-0.000957489013671875,
-0.05718994140625,
-0.0633544921875,
0.06134033203125,
-0.0149688720703125,
-0.000053822994232177734,
-0.01837158203125,
0.0693359375,
0.0174407958984375,
-0.0220794677734375,
0.0237579345703125,
0.01068115234375,
0.0179595947265625,
-0.0228424072265625,
0.034393310546875,
-0.01541900634765625,
-0.0147247314453125,
0.0780029296875,
-0.022308349609375,
0.0271759033203125,
0.0009484291076660156,
0.011077880859375,
0.01593017578125,
-0.019439697265625,
0.025177001953125,
0.04559326171875,
-0.0489501953125,
-0.0228271484375,
-0.0017442703247070312,
0.0202178955078125,
-0.01067352294921875,
-0.018402099609375,
0.00714874267578125,
0.00921630859375,
0.00862884521484375,
-0.0562744140625,
0.032073974609375,
-0.00969696044921875,
-0.0196533203125,
-0.00420379638671875,
-0.005580902099609375,
0.00787353515625,
-0.0335693359375,
0.0099945068359375,
-0.0576171875,
-0.0026607513427734375,
-0.06829833984375,
0.0142669677734375,
-0.044891357421875,
-0.0265960693359375,
-0.042724609375,
-0.01123809814453125,
0.04840087890625,
-0.019378662109375,
-0.05694580078125,
0.00595855712890625,
-0.0191192626953125,
0.061126708984375,
0.0243072509765625,
0.044036865234375,
0.026153564453125,
-0.0094451904296875,
-0.020721435546875,
-0.0103912353515625,
-0.0092010498046875,
0.012725830078125,
-0.03338623046875,
-0.0008549690246582031,
0.0298919677734375,
-0.016082763671875,
-0.0217437744140625,
0.045623779296875,
0.02142333984375,
-0.00948333740234375,
-0.0201568603515625,
0.02886962890625,
-0.01511383056640625,
0.06671142578125,
0.021881103515625,
-0.054534912109375,
0.0203857421875,
0.0274505615234375,
-0.035736083984375,
-0.038482666015625,
-0.007747650146484375,
0.043548583984375,
0.048583984375,
0.00690460205078125,
-0.016357421875,
0.0055999755859375,
-0.02069091796875,
-0.00844573974609375,
-0.029022216796875,
-0.0364990234375,
-0.01123809814453125,
-0.00975799560546875,
0.036895751953125,
0.0233306884765625,
0.016571044921875,
0.033721923828125,
-0.047119140625,
0.0213470458984375,
0.032501220703125,
-0.0703125,
0.0411376953125,
-0.021484375,
-0.028076171875,
-0.01053619384765625,
-0.0116119384765625,
-0.0036296844482421875,
-0.0046234130859375,
-0.0191650390625,
-0.01318359375,
-0.018035888671875,
0.056793212890625,
0.003772735595703125,
0.03338623046875,
-0.038330078125,
0.0005774497985839844,
0.00768280029296875,
-0.0037403106689453125,
0.0168304443359375,
-0.023651123046875,
0.033966064453125,
-0.03399658203125,
-0.0236358642578125,
-0.0302734375,
-0.016387939453125,
-0.01580810546875,
-0.01495361328125,
0.0151824951171875,
0.003940582275390625,
0.029449462890625,
-0.00563812255859375,
-0.012451171875,
0.0173187255859375,
-0.00510406494140625,
-0.01158905029296875,
0.01520538330078125,
0.019683837890625,
0.06427001953125,
-0.066650390625,
0.07366943359375,
0.009521484375,
0.0156707763671875,
-0.041778564453125,
-0.0209808349609375,
-0.01116180419921875,
-0.06884765625,
0.007061004638671875,
0.0298309326171875,
-0.006191253662109375,
-0.0092620849609375,
-0.03607177734375,
0.0188140869140625,
0.047210693359375,
-0.034698486328125,
0.0009279251098632812,
-0.01320648193359375,
0.044830322265625,
-0.053436279296875,
0.0180816650390625,
0.04205322265625,
-0.01184844970703125,
0.00614166259765625,
-0.0101318359375,
-0.00487518310546875,
0.023681640625,
-0.005664825439453125,
0.002017974853515625,
0.0123138427734375,
-0.009521484375,
0.02899169921875,
0.088134765625,
0.020477294921875,
0.049346923828125,
0.01067352294921875,
0.0206146240234375,
0.00962066650390625,
-0.004352569580078125,
0.01983642578125,
0.025146484375,
0.04095458984375,
-0.0200958251953125,
-0.025238037109375,
-0.011383056640625,
-0.041656494140625,
0.015869140625,
-0.0278167724609375,
0.042938232421875,
0.0092620849609375,
0.0238037109375,
0.018890380859375,
-0.0256500244140625,
0.035797119140625,
0.0235595703125,
-0.02056884765625,
-0.0199432373046875,
-0.037841796875,
-0.00443267822265625,
-0.0290374755859375,
-0.00844573974609375,
0.0173187255859375,
-0.002140045166015625,
-0.0220489501953125,
0.0192718505859375,
0.00966644287109375,
0.06988525390625,
-0.0307769775390625,
-0.02545166015625,
0.0007414817810058594,
-0.02911376953125,
0.002490997314453125,
0.0321044921875,
-0.036224365234375,
-0.06195068359375,
0.031341552734375,
0.0021610260009765625,
-0.0141754150390625,
0.0195159912109375,
0.0242462158203125,
0.05438232421875,
0.046661376953125,
0.01959228515625,
-0.013671875,
0.019744873046875,
0.00762176513671875,
-0.043701171875,
-0.0267486572265625,
0.00028896331787109375,
0.0335693359375,
-0.002811431884765625,
0.0254058837890625,
0.007305145263671875,
-0.0245513916015625,
-0.0088348388671875,
-0.06298828125,
0.0180816650390625,
-0.025238037109375,
-0.00743865966796875,
-0.01349639892578125,
0.013671875,
0.0208740234375,
0.016357421875,
0.042266845703125,
-0.03387451171875,
-0.004947662353515625,
0.03131103515625,
-0.0017290115356445312,
-0.058135986328125,
0.026458740234375,
-0.05902099609375,
0.11749267578125,
0.040771484375,
-0.034271240234375,
-0.0316162109375,
0.0684814453125,
-0.05657958984375,
0.034912109375,
-0.04583740234375,
0.06866455078125,
-0.0247650146484375,
0.034149169921875,
-0.053253173828125,
0.0142669677734375,
0.00557708740234375,
0.0013628005981445312,
0.05194091796875,
0.0216064453125,
-0.0279998779296875,
-0.058349609375,
-0.06475830078125,
-0.01129150390625,
-0.05780029296875,
0.059783935546875,
-0.004787445068359375,
0.012939453125,
0.0328369140625,
-0.038421630859375,
0.002758026123046875,
0.005535125732421875,
-0.0257110595703125,
0.01210784912109375,
0.032501220703125,
0.040802001953125,
-0.00759124755859375,
0.06298828125,
0.0004355907440185547,
-0.006221771240234375,
0.0185699462890625,
-0.0186004638671875,
0.0274810791015625,
0.0115203857421875,
0.0035400390625,
0.00666046142578125,
0.030364990234375,
-0.0237274169921875,
0.03863525390625,
-0.023193359375,
0.0274505615234375,
-0.00887298583984375,
0.0286102294921875,
-0.01611328125,
-0.005481719970703125,
0.0038890838623046875,
0.03448486328125,
-0.0413818359375,
0.04022216796875,
0.00649261474609375,
0.0152435302734375,
-0.06707763671875,
-0.047027587890625,
0.06231689453125,
0.0755615234375,
-0.032073974609375,
-0.016937255859375,
0.01206207275390625,
0.0183258056640625,
0.00449371337890625,
-0.0136871337890625,
0.0182342529296875,
-0.0292816162109375,
0.00677490234375,
-0.00026679039001464844,
-0.00774383544921875,
0.01177215576171875,
0.025970458984375,
0.021881103515625,
0.044281005859375,
-0.0618896484375,
-0.02606201171875,
-0.03302001953125,
-0.0144805908203125,
0.004261016845703125,
0.06524658203125,
0.0418701171875,
0.024078369140625,
-0.043212890625,
-0.0306243896484375,
-0.0176849365234375,
0.0194244384765625,
0.023834228515625,
0.004669189453125,
-0.028717041015625,
-0.037689208984375,
0.04742431640625,
0.03253173828125,
0.05352783203125,
0.0709228515625,
0.0770263671875,
0.0261688232421875,
-0.023345947265625,
0.0171356201171875,
0.03778076171875,
-0.0208740234375,
0.01263427734375,
-0.030364990234375,
0.008544921875,
-0.02349853515625,
-0.006275177001953125,
-0.00397491455078125,
0.0435791015625,
-0.0120849609375,
-0.01097869873046875,
0.05712890625,
0.00424957275390625,
-0.0064697265625,
0.067626953125,
0.02789306640625,
0.09442138671875,
0.045440673828125,
-0.040435791015625,
-0.01398468017578125,
-0.003017425537109375,
-0.050048828125,
0.0252685546875,
0.040771484375,
-0.046234130859375,
0.04278564453125,
-0.058990478515625,
-0.0024585723876953125,
0.0150604248046875,
-0.01239013671875,
-0.01132965087890625,
0.045562744140625,
0.0228424072265625,
-0.00319671630859375,
-0.032989501953125,
-0.026702880859375,
0.006954193115234375,
0.0279998779296875,
-0.021209716796875,
0.043365478515625,
-0.01242828369140625,
-0.0110321044921875,
-0.05059814453125,
0.0323486328125,
-0.04791259765625,
-0.0291900634765625,
-0.0147247314453125,
0.0145416259765625,
0.0261077880859375,
0.01035308837890625,
-0.01435089111328125,
-0.0015401840209960938,
0.04144287109375,
-0.019561767578125,
0.0271759033203125,
-0.045654296875,
0.0218658447265625,
-0.034759521484375,
0.0222930908203125,
-0.0233917236328125,
-0.00308990478515625,
-0.012603759765625,
-0.00921630859375,
0.034393310546875,
0.022369384765625,
-0.006313323974609375,
-0.0097808837890625,
0.012939453125,
-0.0255889892578125,
0.012451171875,
0.0034770965576171875,
0.0255126953125,
0.0419921875,
0.00040912628173828125,
0.03570556640625,
0.04559326171875,
-0.005115509033203125,
-0.0032711029052734375,
0.03863525390625,
-0.02386474609375,
0.036468505859375,
-0.0261688232421875,
0.00360870361328125,
0.047760009765625,
0.038909912109375,
0.007122039794921875,
0.0260772705078125,
0.00144195556640625,
-0.0238189697265625,
-0.007312774658203125,
-0.0020999908447265625,
-0.004180908203125,
-0.0228424072265625,
-0.0155181884765625,
0.0124664306640625,
-0.01511383056640625,
-0.0211639404296875,
-0.0213165283203125,
-0.0042572021484375,
0.020782470703125,
0.000027358531951904297,
-0.042083740234375,
0.027618408203125,
-0.01479339599609375,
0.0167388916015625,
-0.005157470703125,
-0.02105712890625,
-0.0013513565063476562,
0.04925537109375,
-0.015960693359375,
-0.0267333984375,
-0.03271484375,
0.004955291748046875,
-0.02447509765625,
-0.0010013580322265625,
0.0075836181640625,
-0.0026493072509765625,
-0.0369873046875,
-0.03204345703125,
0.006381988525390625,
0.01317596435546875,
0.037841796875,
-0.02392578125,
0.01436614990234375,
0.01007080078125,
0.009674072265625,
-0.049713134765625,
-0.00623321533203125,
-0.036224365234375,
0.0004286766052246094,
-0.0482177734375,
0.02294921875,
0.022216796875,
-0.037139892578125,
-0.06573486328125,
0.056976318359375,
-0.0201873779296875,
-0.0275421142578125,
-0.012359619140625,
-0.0167083740234375,
0.00434112548828125,
0.013671875,
-0.0103759765625,
-0.02923583984375,
-0.042022705078125,
0.006633758544921875,
0.0167388916015625,
0.032012939453125,
0.0129547119140625,
0.0000033974647521972656,
-0.0297088623046875,
0.0179595947265625,
0.002193450927734375,
0.0111236572265625,
-0.03509521484375,
0.032379150390625,
-0.015411376953125,
0.0030040740966796875,
-0.051971435546875,
0.005672454833984375,
-0.0020580291748046875,
0.03765869140625,
-0.0291290283203125,
-0.05206298828125,
-0.02362060546875,
0.006160736083984375,
0.09649658203125,
0.06781005859375,
0.0242919921875,
-0.0667724609375,
0.0203094482421875,
-0.01971435546875,
0.01544189453125,
-0.0005097389221191406,
-0.020233154296875,
-0.01149749755859375,
-0.00603485107421875,
-0.0011205673217773438,
0.031402587890625,
-0.0060882568359375,
-0.0213470458984375,
0.0364990234375,
-0.044158935546875,
0.0423583984375,
-0.01406097412109375,
0.039703369140625,
-0.0038280487060546875,
0.06884765625,
-0.0272216796875,
0.0303802490234375,
0.003063201904296875,
0.0186614990234375,
0.05572509765625,
0.040008544921875,
0.01708984375,
-0.0024871826171875,
-0.0200347900390625,
0.008697509765625,
0.00919342041015625,
-0.00899505615234375,
-0.004520416259765625,
-0.020721435546875,
-0.035186767578125,
0.00373077392578125,
0.02935791015625,
-0.01491546630859375,
-0.044464111328125,
0.0024890899658203125,
0.002353668212890625,
0.05120849609375,
-0.047454833984375,
0.0611572265625,
-0.022674560546875,
0.00746917724609375,
-0.0149078369140625,
0.03338623046875,
0.01849365234375,
0.023193359375,
0.0064849853515625,
-0.01168060302734375,
0.00986480712890625,
-0.046417236328125,
0.018280029296875,
-0.023284912109375,
0.004177093505859375,
0.0211944580078125
]
|
64c77f6788a22a9da732d4c7781a91991f83e167 | Wordpress Stackexchange
Q: Safe to delete blank postmeta? We have a lot of rogue custom fields. I feel that we can clear significant space in the DB if we remove the blank values. If I query my database with the following:
select * from wp_postmeta where meta_value = ''
I get 871038 (!)
My question is, is it safe to delete these? Are there any potential issues that could arise from doing this?
A: You should be fine deleting empty custom fields.
The main reason is, that get_post_meta( $id, 'metakey', true ) returns an empty string if the field is not set, so it is the same as having an empty record set.
get_post_meta( $id, 'metakey', false ), returns an empty array if no value is set, so you should be fine too.
The only problem you could face is with getting all metadata at once (get_post_meta( $id )), because in the return to this call the empty values are set, but they are not set, if there is no record in the database. This could cause a few PHP_WARNINGs, but you should be okay.
| Q: Safe to delete blank postmeta? We have a lot of rogue custom fields. I feel that we can clear significant space in the DB if we remove the blank values. If I query my database with the following:
select * from wp_postmeta where meta_value = ''
I get 871038 (!)
My question is, is it safe to delete these? Are there any potential issues that could arise from doing this?
A: You should be fine deleting empty custom fields.
The main reason is, that get_post_meta( $id, 'metakey', true ) returns an empty string if the field is not set, so it is the same as having an empty record set.
get_post_meta( $id, 'metakey', false ), returns an empty array if no value is set, so you should be fine too.
The only problem you could face is with getting all metadata at once (get_post_meta( $id )), because in the return to this call the empty values are set, but they are not set, if there is no record in the database. This could cause a few PHP_WARNINGs, but you should be okay.
A: As @fischi pointed out, it should be safe to delete empty values because get_post_meta() returns the same value for non-existent and empty meta keys,
unless you somehow rely on the keys being set when fetching all metadata at once.
WP 3.1 introduced the filters add_{$meta_type}_metadata and update_{$meta_type}_metadata that you can use to clean up empty values or even prevent them from being saved in the database:
https://codex.wordpress.org/Plugin_API/Filter_Reference/update_(meta_type)_metadata
For example, you can intercept and delete falsy values for all keys containing 'my_prefix' like this:
add_filter('update_post_metadata', function($check, $object_id, $meta_key, $meta_value, $prev_value) {
if(strpos($meta_key, 'my_prefix')) {
if(empty($meta_value)) {
delete_post_meta($object_id, $meta_key, $prev_value);
return true; //stop update
}
}
return null; //do update
}, 10, 5);
Note that this won't clean up any already existing records.
| wordpress | {
"language": "en",
"length": 305,
"provenance": "stackexchange_00019.jsonl.gz:455316",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/187500"
} | [
0.044342041015625,
0.00003731250762939453,
0.015380859375,
-0.00024139881134033203,
-0.0007395744323730469,
-0.007312774658203125,
0.0295867919921875,
-0.050323486328125,
0.018402099609375,
0.0160675048828125,
-0.00983428955078125,
-0.054443359375,
0.021148681640625,
-0.0311126708984375,
-0.0155181884765625,
-0.038299560546875,
0.0256805419921875,
0.0135955810546875,
0.053070068359375,
0.0072784423828125,
0.0274505615234375,
0.0251922607421875,
0.005313873291015625,
-0.026519775390625,
0.00777435302734375,
-0.025238037109375,
0.0230712890625,
-0.00786590576171875,
-0.020843505859375,
-0.045013427734375,
0.007045745849609375,
0.058502197265625,
-0.00435638427734375,
0.00904083251953125,
0.03314208984375,
0.0011157989501953125,
0.064208984375,
-0.0023975372314453125,
0.03155517578125,
0.0152435302734375,
0.0218353271484375,
-0.01824951171875,
-0.02142333984375,
-0.03741455078125,
-0.006175994873046875,
0.00232696533203125,
0.01026153564453125,
-0.03338623046875,
0.0079193115234375,
-0.0203399658203125,
0.0025844573974609375,
-0.027679443359375,
0.022552490234375,
-0.0042724609375,
-0.032745361328125,
-0.036224365234375,
-0.052093505859375,
-0.037139892578125,
0.03656005859375,
0.0511474609375,
0.01045989990234375,
-0.040679931640625,
0.00400543212890625,
-0.052734375,
0.03350830078125,
0.003368377685546875,
-0.026214599609375,
0.0199737548828125,
-0.0265655517578125,
0.0316162109375,
0.03326416015625,
-0.063232421875,
0.01297760009765625,
-0.038421630859375,
0.00568389892578125,
0.0005202293395996094,
-0.01384735107421875,
-0.031219482421875,
0.00405120849609375,
0.0004191398620605469,
-0.0012521743774414062,
-0.00664520263671875,
-0.057952880859375,
-0.00853729248046875,
-0.0005102157592773438,
-0.00009745359420776367,
-0.009857177734375,
-0.006198883056640625,
-0.0130615234375,
-0.0589599609375,
-0.01001739501953125,
-0.053985595703125,
-0.0287933349609375,
-0.006465911865234375,
-0.0163116455078125,
-0.041534423828125,
0.05218505859375,
0.0660400390625,
-0.005077362060546875,
-0.0185546875,
0.01525115966796875,
-0.05108642578125,
-0.005573272705078125,
-0.016845703125,
0.0081024169921875,
0.0239105224609375,
-0.02703857421875,
-0.05145263671875,
0.0018548965454101562,
0.04046630859375,
-0.00492095947265625,
-0.04156494140625,
0.00652313232421875,
-0.034332275390625,
-0.0254058837890625,
0.041961669921875,
0.0270233154296875,
-0.01227569580078125,
0.01152801513671875,
0.0117645263671875,
0.0012454986572265625,
0.007457733154296875,
0.01526641845703125,
-0.01488494873046875,
0.01351165771484375,
0.004116058349609375,
-0.0439453125,
-0.0027179718017578125,
-0.03778076171875,
0.0699462890625,
-0.05523681640625,
-0.020965576171875,
0.0648193359375,
0.0294189453125,
0.01043701171875,
-0.0447998046875,
-0.01071929931640625,
-0.033203125,
0.0009632110595703125,
0.0010557174682617188,
0.00827789306640625,
-0.03887939453125,
0.0155487060546875,
0.00409698486328125,
-0.0247344970703125,
0.03265380859375,
0.0136260986328125,
0.00098419189453125,
-0.0189971923828125,
-0.046722412109375,
-0.019439697265625,
-0.035308837890625,
0.0242156982421875,
0.00128936767578125,
0.0096282958984375,
-0.03485107421875,
0.06298828125,
-0.052001953125,
-0.0205535888671875,
-0.052337646484375,
0.000025570392608642578,
-0.01467132568359375,
-0.01204681396484375,
-0.06591796875,
-0.07037353515625,
0.01390838623046875,
-0.02825927734375,
-0.01116943359375,
0.0266876220703125,
0.01580810546875,
0.04193115234375,
-0.005828857421875,
-0.0162811279296875,
0.00666046142578125,
0.017242431640625,
-0.005977630615234375,
0.004634857177734375,
-0.03265380859375,
0.04705810546875,
-0.01202392578125,
-0.039947509765625,
-0.0245361328125,
0.048004150390625,
-0.023468017578125,
-0.06103515625,
0.023223876953125,
0.0126800537109375,
0.05987548828125,
0.0304412841796875,
0.010650634765625,
0.03094482421875,
-0.025970458984375,
-0.0063934326171875,
-0.03155517578125,
0.0305633544921875,
0.014984130859375,
-0.01494598388671875,
-0.01393890380859375,
0.014984130859375,
-0.007236480712890625,
0.0386962890625,
0.031219482421875,
0.006786346435546875,
-0.022857666015625,
-0.079833984375,
0.024810791015625,
-0.02252197265625,
0.053375244140625,
-0.0906982421875,
0.0178375244140625,
0.04803466796875,
-0.03668212890625,
-0.047149658203125,
0.08453369140625,
0.047515869140625,
-0.043304443359375,
0.00261688232421875,
-0.0059967041015625,
0.00153350830078125,
-0.0123138427734375,
0.001251220703125,
-0.02020263671875,
-0.037841796875,
0.0033664703369140625,
0.0212249755859375,
-0.0247802734375,
-0.00577545166015625,
-0.034454345703125,
0.04510498046875,
-0.016387939453125,
0.021484375,
0.04779052734375,
0.0185394287109375,
-0.0019159317016601562,
-0.0200042724609375,
0.0035991668701171875,
-0.005847930908203125,
-0.09185791015625,
0.0033473968505859375,
0.05987548828125,
0.01255035400390625,
0.0219268798828125,
-0.050628662109375,
0.00928497314453125,
0.04962158203125,
-0.01482391357421875,
-0.01242828369140625,
0.02606201171875,
0.032012939453125,
0.05706787109375,
-0.047760009765625,
-0.015838623046875,
0.0141754150390625,
-0.03594970703125,
-0.0032329559326171875,
0.034027099609375,
-0.044403076171875,
-0.0229949951171875,
-0.00223541259765625,
0.00791168212890625,
0.00041937828063964844,
-0.0181732177734375,
-0.0022125244140625,
-0.0129241943359375,
0.053558349609375,
0.04119873046875,
0.06121826171875,
0.049957275390625,
-0.035736083984375,
0.0428466796875,
-0.007480621337890625,
-0.0256500244140625,
-0.0031337738037109375,
-0.0031681060791015625,
0.0241546630859375,
0.01334381103515625,
-0.04986572265625,
0.01068878173828125,
0.040557861328125,
0.0017747879028320312,
-0.0036373138427734375,
0.035064697265625,
-0.03533935546875,
-0.0159759521484375,
-0.01349639892578125,
0.0075225830078125,
-0.0018720626831054688,
0.01526641845703125,
0.03533935546875,
0.0202789306640625,
0.03216552734375,
0.01806640625,
-0.0132904052734375,
0.041900634765625,
0.0008192062377929688,
-0.013092041015625,
0.01477813720703125,
-0.038604736328125,
0.01861572265625,
-0.02239990234375,
0.043243408203125,
0.06103515625,
-0.002071380615234375,
0.00144195556640625,
-0.016876220703125,
0.0201263427734375,
-0.0292816162109375,
0.02471923828125,
-0.002483367919921875,
-0.069091796875,
0.011383056640625,
-0.012420654296875,
0.0271453857421875,
0.06549072265625,
-0.0201416015625,
-0.033599853515625,
-0.004154205322265625,
0.03424072265625,
-0.035400390625,
-0.041290283203125,
0.0186614990234375,
0.0192718505859375,
-0.040008544921875,
-0.034393310546875,
-0.0025787353515625,
0.0117950439453125,
-0.06048583984375,
-0.01186370849609375,
0.053680419921875,
-0.0258026123046875,
-0.03558349609375,
-0.005977630615234375,
-0.05255126953125,
-0.01378631591796875,
0.00824737548828125,
-0.0158233642578125,
-0.0135498046875,
0.0845947265625,
-0.0064849853515625,
-0.06524658203125,
-0.033905029296875,
-0.007244110107421875,
-0.00716400146484375,
-0.001766204833984375,
-0.00849151611328125,
0.029388427734375,
-0.013458251953125,
0.0168914794921875,
0.01486968994140625,
0.016082763671875,
-0.03985595703125,
-0.03302001953125,
0.0016574859619140625,
-0.01093292236328125,
0.01393890380859375,
-0.00836181640625,
-0.01132965087890625,
0.0262603759765625,
0.0367431640625,
-0.01535797119140625,
-0.0404052734375,
-0.00910186767578125,
-0.035980224609375,
0.03973388671875,
0.0106201171875,
0.01605224609375,
0.0057373046875,
0.03961181640625,
0.04779052734375,
0.039886474609375,
-0.004974365234375,
0.0255126953125,
-0.014312744140625,
0.0013942718505859375,
0.0208587646484375,
-0.0205078125,
-0.003704071044921875,
-0.038330078125,
0.01477813720703125,
-0.0131378173828125,
0.0059356689453125,
0.00937652587890625,
-0.0311279296875,
-0.01580810546875,
0.0135040283203125,
0.0533447265625,
0.044586181640625,
0.05316162109375,
-0.017974853515625,
-0.048980712890625,
-0.0465087890625,
0.06353759765625,
0.0038738250732421875,
-0.0205230712890625,
-0.01397705078125,
0.007495880126953125,
-0.0303192138671875,
-0.0087432861328125,
0.00933837890625,
0.0103607177734375,
-0.071533203125,
0.0128631591796875,
0.0098724365234375,
-0.0238494873046875,
-0.0309295654296875,
0.045074462890625,
-0.0628662109375,
-0.02252197265625,
0.01392364501953125,
-0.040191650390625,
0.048187255859375,
-0.026275634765625,
0.04571533203125,
-0.0498046875,
0.0266876220703125,
-0.059814453125,
-0.06195068359375,
-0.03289794921875,
0.013458251953125,
0.060943603515625,
-0.00821685791015625,
-0.00405120849609375,
0.005168914794921875,
0.0452880859375,
-0.00600433349609375,
0.0169677734375,
-0.01556396484375,
0.01299285888671875,
-0.0292205810546875,
-0.006500244140625,
-0.007358551025390625,
-0.025360107421875,
-0.01020050048828125,
-0.020263671875,
0.0177764892578125,
-0.00388336181640625,
-0.038330078125,
-0.007659912109375,
-0.01666259765625,
-0.00737762451171875,
0.00394439697265625,
0.001918792724609375,
-0.05816650390625,
0.0202484130859375,
-0.03594970703125,
-0.015960693359375,
-0.01145172119140625,
-0.0293426513671875,
0.0421142578125,
0.002124786376953125,
0.002223968505859375,
0.006114959716796875,
0.05279541015625,
-0.006805419921875,
-0.016510009765625,
-0.068603515625,
-0.01377105712890625,
0.01702880859375,
0.027099609375,
0.0176239013671875,
-0.0280914306640625,
-0.02423095703125,
0.0718994140625,
-0.006244659423828125,
-0.01456451416015625,
-0.043731689453125,
0.08892822265625,
-0.02056884765625,
0.02081298828125,
-0.01910400390625,
-0.0477294921875,
0.040557861328125,
0.050567626953125,
0.0154571533203125,
-0.0153350830078125,
0.026031494140625,
0.0111846923828125,
-0.0189208984375,
-0.024017333984375,
-0.01416778564453125,
-0.01617431640625,
0.00969696044921875,
-0.0183563232421875,
0.0245208740234375,
-0.00891876220703125,
0.006481170654296875,
-0.0040740966796875,
0.022796630859375,
0.0303802490234375,
-0.04150390625,
0.0037517547607421875,
-0.045166015625,
0.0188140869140625,
0.0023632049560546875,
0.0016155242919921875,
-0.033111572265625,
-0.00968170166015625,
0.033294677734375,
-0.004673004150390625,
-0.06292724609375,
0.0152587890625,
0.00838470458984375,
0.0281829833984375,
0.0188140869140625,
0.0204620361328125,
0.048004150390625,
0.04193115234375,
-0.001934051513671875,
0.0059814453125,
-0.0029144287109375,
0.038299560546875,
-0.0518798828125,
-0.005527496337890625,
-0.0002346038818359375,
-0.0170440673828125,
-0.021331787109375,
0.04510498046875,
-0.016326904296875,
0.01297760009765625,
-0.0006794929504394531,
0.049224853515625,
0.041900634765625,
0.05712890625,
0.0242462158203125,
-0.0513916015625,
-0.0131072998046875,
0.051422119140625,
-0.043701171875,
-0.053466796875,
-0.041046142578125,
0.0192108154296875,
0.05352783203125,
-0.0258331298828125,
-0.0149078369140625,
0.03338623046875,
0.00855255126953125,
-0.00450897216796875,
0.0225830078125,
-0.0189971923828125,
-0.0257568359375,
-0.035003662109375,
-0.01415252685546875,
0.0307769775390625,
-0.013519287109375,
0.01904296875,
-0.018707275390625,
-0.03314208984375,
0.019805908203125,
-0.058868408203125,
0.032073974609375,
-0.032257080078125,
-0.033599853515625,
0.051483154296875,
-0.02801513671875,
-0.0235443115234375,
-0.036041259765625,
0.0265045166015625,
-0.039886474609375,
-0.017364501953125,
0.04693603515625,
-0.007122039794921875,
0.007274627685546875,
-0.007167816162109375,
-0.017364501953125,
0.0067901611328125,
0.0152130126953125,
0.01548004150390625,
-0.020172119140625,
-0.0169677734375,
-0.006145477294921875,
-0.0265045166015625,
-0.030731201171875,
0.0098419189453125,
-0.0026302337646484375,
-0.02484130859375,
0.0019216537475585938,
0.0259552001953125,
0.044036865234375,
-0.0008454322814941406,
-0.046112060546875,
-0.0006747245788574219,
-0.0113525390625,
0.0328369140625,
0.07501220703125,
-0.026336669921875,
0.021148681640625,
0.041656494140625,
0.02264404296875,
0.019744873046875,
0.03369140625,
0.0279388427734375,
-0.03997802734375,
0.000797271728515625,
-0.0335693359375,
-0.009552001953125,
-0.007450103759765625,
0.0215301513671875,
0.00013589859008789062,
-0.0022373199462890625,
0.0013360977172851562,
-0.01275634765625,
-0.0196990966796875,
-0.004940032958984375,
-0.022430419921875,
0.07647705078125,
0.0185394287109375,
0.0010614395141601562,
0.0390625,
0.0009870529174804688,
-0.01375579833984375,
-0.009368896484375,
-0.032989501953125,
0.01462554931640625,
0.02154541015625,
0.00931549072265625,
0.0038928985595703125,
-0.0251007080078125,
0.042022705078125,
0.03729248046875,
-0.0023956298828125,
0.042083740234375,
-0.002750396728515625,
0.00823211669921875,
0.02374267578125,
-0.0289459228515625,
-0.010498046875,
0.0206146240234375,
0.061187744140625,
0.006824493408203125,
0.00008004903793334961,
0.05712890625,
-0.0175933837890625,
0.01715087890625,
0.027313232421875,
0.07806396484375,
-0.06097412109375,
0.02313232421875,
0.038360595703125,
0.0006680488586425781,
0.0300140380859375,
0.00806427001953125,
-0.0021495819091796875,
0.000011622905731201172,
-0.0345458984375,
0.00630950927734375,
-0.0257110595703125,
-0.01280975341796875,
0.0186767578125,
-0.00809478759765625,
-0.036529541015625,
-0.00476837158203125,
0.0007538795471191406,
0.01384735107421875,
-0.0010986328125,
0.0219573974609375,
-0.004611968994140625,
-0.006443023681640625,
0.0257110595703125,
-0.00238037109375,
-0.017181396484375,
-0.061370849609375,
-0.004886627197265625,
-0.00926971435546875,
-0.039794921875,
-0.011505126953125,
0.0760498046875,
0.050262451171875,
0.0369873046875,
0.033599853515625,
-0.0095977783203125,
0.00579833984375,
0.040496826171875,
-0.044464111328125,
-0.053863525390625,
-0.0169677734375,
0.051055908203125,
-0.0106658935546875,
0.03948974609375,
0.041534423828125,
-0.049102783203125,
-0.0193634033203125,
-0.0177154541015625,
0.06231689453125,
-0.019622802734375,
-0.0220489501953125,
0.022064208984375,
0.01467132568359375,
-0.01062774658203125,
-0.007022857666015625,
0.0260009765625,
-0.032135009765625,
0.026092529296875,
0.00717926025390625,
0.0224761962890625,
0.0029582977294921875,
0.0209197998046875,
-0.0762939453125,
0.090087890625,
0.03497314453125,
0.00783538818359375,
-0.0272674560546875,
0.036895751953125,
-0.0264892578125,
0.0153961181640625,
-0.025054931640625,
0.08612060546875,
0.00926971435546875,
-0.01531982421875,
-0.061859130859375,
-0.00103759765625,
-0.0280914306640625,
-0.00397491455078125,
0.0299530029296875,
0.000701904296875,
0.0255126953125,
0.010833740234375,
0.0487060546875,
-0.01206207275390625,
-0.0460205078125,
0.01812744140625,
0.004177093505859375,
0.09625244140625,
0.07611083984375,
-0.0694580078125,
0.029571533203125,
0.0149993896484375,
-0.02496337890625,
0.0297088623046875,
0.006885528564453125,
0.0103759765625,
-0.01473236083984375,
0.00232696533203125,
0.04718017578125,
-0.023345947265625,
-0.02813720703125,
-0.031768798828125,
0.040496826171875,
-0.0173797607421875,
0.0438232421875,
-0.06536865234375,
0.0185699462890625,
-0.008453369140625,
0.047393798828125,
0.01491546630859375,
0.04119873046875,
0.02130126953125,
0.0194854736328125,
0.04864501953125,
-0.04541015625,
0.0164337158203125,
-0.006389617919921875,
-0.031494140625,
0.083251953125,
0.02899169921875,
0.0230255126953125,
-0.0191802978515625,
0.025299072265625,
0.014617919921875,
0.07183837890625,
-0.055511474609375,
-0.0452880859375,
0.011749267578125,
0.0011911392211914062,
-0.01160430908203125,
0.0004494190216064453,
-0.0253143310546875,
0.003665924072265625,
0.05584716796875,
-0.058441162109375,
0.021453857421875,
0.01128387451171875,
0.0151214599609375,
-0.01375579833984375,
0.018341064453125,
-0.04351806640625,
0.01056671142578125,
-0.0367431640625,
-0.04486083984375,
0.0307464599609375,
0.05780029296875,
0.05145263671875,
0.021881103515625,
0.0296173095703125,
-0.0294189453125,
-0.008453369140625,
0.02081298828125,
-0.003223419189453125,
0.0079193115234375,
-0.0390625,
-0.052520751953125,
0.0299072265625,
0.031585693359375,
0.03265380859375,
0.006572723388671875,
0.06353759765625,
0.022369384765625,
-0.05572509765625,
-0.01190948486328125,
-0.01406097412109375,
-0.039276123046875,
-0.0285186767578125,
-0.04266357421875,
0.00788116455078125,
0.00330352783203125,
0.01099395751953125,
0.006103515625,
0.0400390625,
-0.0167694091796875,
0.0071258544921875,
-0.01012420654296875,
0.0167236328125,
-0.022918701171875,
0.047119140625,
-0.0046844482421875,
0.0147705078125,
0.01708984375,
-0.032867431640625,
-0.00798797607421875,
-0.02191162109375,
0.0271148681640625,
-0.0264434814453125,
0.0006489753723144531,
-0.0005679130554199219,
0.042724609375,
-0.042877197265625,
-0.021087646484375,
-0.0020236968994140625,
0.0158538818359375,
0.0038242340087890625,
0.0477294921875,
0.017730712890625,
0.0031604766845703125,
-0.0250244140625,
-0.0121612548828125,
0.01078033447265625,
0.01146697998046875,
-0.02667236328125,
0.0904541015625,
-0.0201263427734375,
0.01055908203125,
-0.0338134765625,
0.051727294921875,
-0.034820556640625,
-0.006191253662109375,
-0.014068603515625,
0.0167388916015625,
0.03509521484375,
-0.004917144775390625,
0.01532745361328125,
0.03570556640625,
0.035552978515625,
-0.0218658447265625,
0.0112762451171875,
0.00787353515625,
0.0006995201110839844,
-0.00125885009765625,
0.003604888916015625,
-0.0240936279296875,
-0.015869140625,
-0.0184783935546875,
-0.005596160888671875,
0.020050048828125,
0.03765869140625,
0.0232086181640625,
-0.01221466064453125,
-0.01366424560546875,
-0.05975341796875,
0.039306640625,
-0.03411865234375,
0.05780029296875,
0.03973388671875,
-0.01007843017578125,
0.024383544921875,
0.01385498046875,
-0.026336669921875,
0.04107666015625,
-0.004039764404296875,
0.0250091552734375,
0.018280029296875,
-0.0292205810546875,
-0.0160675048828125,
-0.0010213851928710938,
0.033905029296875,
-0.0087127685546875,
0.0006475448608398438,
-0.0191192626953125,
0.0103759765625,
0.00841522216796875,
0.001190185546875,
-0.0221405029296875,
-0.0238800048828125,
-0.020294189453125,
-0.00018322467803955078,
-0.0217437744140625,
-0.057373046875,
-0.04638671875,
-0.0015468597412109375,
0.0247344970703125,
0.00835418701171875,
-0.034698486328125,
0.0462646484375,
-0.0294189453125,
-0.037506103515625,
0.010833740234375,
-0.01168060302734375,
-0.0027751922607421875,
0.0283660888671875,
-0.00998687744140625,
-0.04205322265625,
-0.023406982421875,
0.0516357421875,
-0.0095672607421875,
0.002605438232421875,
0.0180206298828125,
-0.009368896484375,
-0.045074462890625,
0.01178741455078125,
0.013580322265625,
0.021697998046875,
0.048370361328125,
-0.0322265625,
0.0060577392578125,
-0.00415802001953125,
0.00018143653869628906,
-0.038726806640625,
0.0095062255859375,
-0.07147216796875,
0.00044155120849609375,
-0.0411376953125,
0.025482177734375,
0.032073974609375,
-0.03857421875,
-0.097900390625,
0.054901123046875,
-0.03515625,
-0.020263671875,
0.00804901123046875,
-0.026641845703125,
-0.0003590583801269531,
0.045989990234375,
0.0157318115234375,
-0.029510498046875,
-0.04107666015625,
0.004192352294921875,
0.006130218505859375,
0.016937255859375,
0.016632080078125,
0.01305389404296875,
-0.018280029296875,
0.00989532470703125,
0.000873565673828125,
-0.008758544921875,
-0.01337432861328125,
0.0100555419921875,
0.017425537109375,
0.03302001953125,
-0.042510986328125,
0.04071044921875,
0.00655364990234375,
0.01544952392578125,
-0.0242767333984375,
0.004070281982421875,
-0.033660888671875,
0.005603790283203125,
0.10430908203125,
0.052764892578125,
0.0242156982421875,
-0.049346923828125,
-0.023040771484375,
-0.0165252685546875,
0.0155487060546875,
-0.044525146484375,
0.005706787109375,
-0.090087890625,
-0.0416259765625,
-0.001689910888671875,
0.01165771484375,
0.0302581787109375,
-0.03790283203125,
0.01551055908203125,
-0.0092315673828125,
0.015350341796875,
0.003936767578125,
-0.001064300537109375,
-0.009979248046875,
0.0163726806640625,
-0.0167083740234375,
-0.00455474853515625,
-0.004138946533203125,
0.007293701171875,
-0.0002491474151611328,
0.033294677734375,
0.037628173828125,
-0.056640625,
-0.0102081298828125,
0.03631591796875,
0.003032684326171875,
0.0091705322265625,
-0.0276947021484375,
-0.067626953125,
-0.00981903076171875,
0.021087646484375,
0.01271820068359375,
0.0269622802734375,
-0.004756927490234375,
-0.005512237548828125,
0.0213470458984375,
-0.05157470703125,
-0.02777099609375,
0.034423828125,
-0.01328277587890625,
0.0284881591796875,
0.00899505615234375,
-0.016021728515625,
0.0706787109375,
-0.039306640625,
-0.0153350830078125,
-0.01380157470703125,
-0.035064697265625,
-0.0843505859375,
0.0229949951171875,
0.00909423828125,
0.00909423828125,
0.036376953125
]
|
7aeddb8367b466f909e6d271c66d396262cd46c9 | Wordpress Stackexchange
Q: Redirecting to old domain after migration I have moved one of my website to a new domain, below is what i did.
*
*Backed up database
*Uploaded all the files to the new server.
*Imported sql into new server via phpmyadmin
*Now i have used this script to change URL in database.
Now, problems i am facing are:
*
*All the links are going to old domain.
*All the images are linked to old domain.
*wp-admin is also redirected to old domain when i try to run mydomain.com/wp-admin
Please help if you have any ideas about this, any help would be greatly appreciated.
A: Run the following when you are changing domain:
UPDATE wp_options SET option_value = 'https://yournew.domain' WHERE option_name = 'siteurl';
UPDATE wp_options SET option_value = 'https://yournew.domain' WHERE option_name = 'home';
| Q: Redirecting to old domain after migration I have moved one of my website to a new domain, below is what i did.
*
*Backed up database
*Uploaded all the files to the new server.
*Imported sql into new server via phpmyadmin
*Now i have used this script to change URL in database.
Now, problems i am facing are:
*
*All the links are going to old domain.
*All the images are linked to old domain.
*wp-admin is also redirected to old domain when i try to run mydomain.com/wp-admin
Please help if you have any ideas about this, any help would be greatly appreciated.
A: Run the following when you are changing domain:
UPDATE wp_options SET option_value = 'https://yournew.domain' WHERE option_name = 'siteurl';
UPDATE wp_options SET option_value = 'https://yournew.domain' WHERE option_name = 'home';
A: Changing wp_options field will help a little, but sometimes your pages, posts and plugins will use absolute references to images and other files. In this case, you'll need to update the entire database. Since there's no easy "replace all" in phpMyAdmin (unless you construct an UPDATE statement in SQL), it's best to:
*
*Backup your entire database as an sql file. (I would include the DROP TABLE option)
*Export your entire database as a sql (text) file and open it in a text editor. (I use Notepad++)
*Do a Replace All of all instances of your old domain with your new domain. (i.e. olddomain.com with newdomain.com)
*Save the updated SQL and import it back into phpMyAdmin.
Voila!
A: My issue is resolved, I am posting this as an answer so that someone else can benefit out of it.
My issue was, siteurl and homeurl were not updated, so I have placed define('RELOCATE',true); in my wp-config.php file. And again tried to access the website , it gone to the correct URL but all the CSS was gone.
Then I headed over to wp-admin and it also came with no CSS but still I tried to login but this time it has taken me to the correct URL and with CSS login page but didn't log in. Then again I attempted to login and this time I was successful.
Then I changed both the URLs from settings in the admin panel.
After this you must to delete all your browser cache files to delete any kind of persistent redirection.
Hope this helps someone else dealing with the same problem.
A: I had the same problem (works fine now), here is what i done
instead of try to access to the admin panel whit yoursite.com/wp-admin i tried with yoursite.com/wp-login.php and it took me to the admin panel of my new site. Then I changed the site domain in general settings and now it works just fine.
A: Change the URL in option database file in phpmyadmin. Means your actual URL link. Then open wp-admin page..with wp-login.php link.. Type your authentication then in general setting change the URL directory again and access the website.
A: To just expand on Reezppo's answer,
Open PHPMyadmin in your cPanel and then click on the wp_options file and then you will see a bunch of fields that you can change and you will see the old url which you can then change manually to the new url (in two places). Then save it and go back to yoursite.com/wp-login.php and it should let you login without redirecting. Remember you will be logging in with the old Wordpress username and password (the one from the original site that you have moved).
| wordpress | {
"language": "en",
"length": 585,
"provenance": "stackexchange_00019.jsonl.gz:455335",
"question_score": "20",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/187574"
} | [
0.07781982421875,
0.00418853759765625,
0.0243682861328125,
0.020660400390625,
0.01407623291015625,
-0.054290771484375,
0.085205078125,
-0.07305908203125,
0.017120361328125,
0.01068115234375,
0.0171966552734375,
-0.0179443359375,
0.002223968505859375,
-0.0543212890625,
-0.0017843246459960938,
-0.0113372802734375,
0.031982421875,
-0.0206298828125,
0.0087127685546875,
-0.0125579833984375,
0.007076263427734375,
0.01953125,
0.0082550048828125,
0.0455322265625,
0.005588531494140625,
-0.047882080078125,
0.0784912109375,
-0.022247314453125,
-0.00018656253814697266,
-0.03033447265625,
0.01690673828125,
0.0161285400390625,
-0.003711700439453125,
0.00514984130859375,
0.0185394287109375,
-0.01065826416015625,
0.052764892578125,
-0.00814056396484375,
0.0030670166015625,
0.0450439453125,
0.044525146484375,
-0.02728271484375,
0.0113372802734375,
0.03057861328125,
0.01483917236328125,
-0.043792724609375,
0.04296875,
-0.0675048828125,
-0.0096588134765625,
0.01202392578125,
0.023956298828125,
-0.0159454345703125,
0.0220489501953125,
0.017791748046875,
-0.007068634033203125,
-0.0148773193359375,
-0.011260986328125,
0.01027679443359375,
0.0107421875,
-0.00820159912109375,
-0.0160369873046875,
0.025970458984375,
0.0174407958984375,
-0.007007598876953125,
-0.0264892578125,
-0.0081939697265625,
0.032745361328125,
0.01323699951171875,
-0.0902099609375,
-0.04266357421875,
0.056427001953125,
-0.022186279296875,
-0.01007080078125,
-0.030242919921875,
0.00482940673828125,
0.0117034912109375,
0.01509857177734375,
0.01480865478515625,
-0.003330230712890625,
0.02423095703125,
0.031097412109375,
0.025634765625,
0.01483917236328125,
-0.06610107421875,
0.053131103515625,
-0.028350830078125,
-0.01418304443359375,
-0.0219573974609375,
-0.0238494873046875,
-0.01280975341796875,
-0.021148681640625,
-0.023590087890625,
-0.0193023681640625,
0.0015668869018554688,
-0.0211334228515625,
-0.01953125,
0.0277252197265625,
0.0157470703125,
-0.01392364501953125,
-0.0000908970832824707,
-0.038330078125,
-0.02685546875,
0.0007357597351074219,
-0.00021946430206298828,
-0.0030651092529296875,
0.0220794677734375,
0.0185394287109375,
-0.0192718505859375,
0.000011622905731201172,
0.00554656982421875,
-0.03515625,
0.0162200927734375,
-0.046600341796875,
0.0210113525390625,
-0.026153564453125,
0.0233917236328125,
-0.062469482421875,
-0.01995849609375,
-0.047515869140625,
0.033935546875,
-0.00966644287109375,
0.0310821533203125,
-0.0194091796875,
-0.0251007080078125,
0.00024700164794921875,
-0.0274200439453125,
-0.0224151611328125,
-0.01110076904296875,
-0.048675537109375,
-0.01009368896484375,
-0.038116455078125,
0.03057861328125,
0.07257080078125,
0.0526123046875,
0.01995849609375,
-0.016265869140625,
0.02850341796875,
0.0128021240234375,
-0.0085601806640625,
0.0218048095703125,
0.042755126953125,
-0.053070068359375,
-0.0615234375,
0.0184326171875,
0.009918212890625,
0.0438232421875,
0.00493621826171875,
0.00024890899658203125,
-0.00603485107421875,
-0.07513427734375,
0.01229095458984375,
-0.03399658203125,
0.047027587890625,
0.0093994140625,
-0.01158905029296875,
-0.035888671875,
0.031402587890625,
-0.042327880859375,
0.006366729736328125,
-0.061492919921875,
0.0183868408203125,
0.0184173583984375,
0.03326416015625,
-0.0068817138671875,
-0.027099609375,
-0.0360107421875,
-0.06597900390625,
-0.029541015625,
0.01251220703125,
0.01294708251953125,
-0.0008068084716796875,
-0.0260467529296875,
0.00434112548828125,
0.001369476318359375,
-0.019256591796875,
0.0253448486328125,
-0.006313323974609375,
0.0002932548522949219,
0.034088134765625,
0.0284576416015625,
0.0160064697265625,
-0.01419830322265625,
0.023956298828125,
0.01971435546875,
-0.041229248046875,
0.04681396484375,
-0.00013828277587890625,
0.05181884765625,
-0.00476837158203125,
0.014251708984375,
0.0219268798828125,
0.0302886962890625,
-0.044647216796875,
0.041168212890625,
-0.0031490325927734375,
0.01407623291015625,
-0.026641845703125,
0.0178985595703125,
-0.00882720947265625,
-0.043853759765625,
-0.04058837890625,
0.0147857666015625,
-0.0142364501953125,
0.0187225341796875,
0.004199981689453125,
-0.006195068359375,
-0.003662109375,
0.03228759765625,
0.01434326171875,
0.040496826171875,
-0.0024852752685546875,
-0.002681732177734375,
-0.016265869140625,
-0.039886474609375,
-0.019561767578125,
0.01381683349609375,
-0.0173187255859375,
-0.002063751220703125,
-0.0150146484375,
0.016143798828125,
-0.033782958984375,
-0.0006389617919921875,
-0.048736572265625,
-0.0110931396484375,
0.007556915283203125,
-0.0300445556640625,
-0.0164031982421875,
-0.0258636474609375,
-0.02099609375,
-0.0081329345703125,
-0.038909912109375,
0.040252685546875,
-0.00289154052734375,
-0.01287078857421875,
-0.040252685546875,
0.0013513565063476562,
-0.014556884765625,
-0.05133056640625,
0.0011053085327148438,
0.05828857421875,
0.0260162353515625,
-0.01508331298828125,
-0.0086212158203125,
0.01207733154296875,
-0.004547119140625,
-0.0650634765625,
-0.00021409988403320312,
0.0085601806640625,
0.00041604042053222656,
0.044036865234375,
-0.0150604248046875,
0.00788116455078125,
0.0203399658203125,
-0.031036376953125,
-0.0232391357421875,
0.056182861328125,
-0.0267486572265625,
-0.016357421875,
-0.013031005859375,
-0.0258941650390625,
0.01180267333984375,
-0.0609130859375,
-0.04412841796875,
-0.01042938232421875,
-0.0269927978515625,
0.00531005859375,
-0.018035888671875,
-0.01284027099609375,
-0.0264892578125,
0.00029850006103515625,
0.0430908203125,
-0.01806640625,
0.007160186767578125,
-0.0174713134765625,
0.0199127197265625,
-0.02923583984375,
-0.004436492919921875,
0.0011053085327148438,
0.0318603515625,
-0.015960693359375,
-0.0259246826171875,
-0.01105499267578125,
-0.0164947509765625,
-0.0150299072265625,
-0.002246856689453125,
-0.021942138671875,
0.03106689453125,
0.003849029541015625,
0.035614013671875,
-0.00600433349609375,
0.0272216796875,
0.00557708740234375,
-0.0130462646484375,
0.037811279296875,
0.0406494140625,
-0.04364013671875,
0.05419921875,
-0.035919189453125,
0.022491455078125,
-0.017303466796875,
0.061981201171875,
0.065673828125,
-0.00937652587890625,
0.0103912353515625,
0.0082550048828125,
0.0103607177734375,
0.0531005859375,
-0.0157012939453125,
-0.0180816650390625,
0.01263427734375,
-0.07928466796875,
-0.0635986328125,
0.0191192626953125,
-0.01137542724609375,
0.00904083251953125,
-0.01415252685546875,
-0.0005617141723632812,
-0.01763916015625,
-0.0797119140625,
-0.043548583984375,
-0.10321044921875,
-0.039520263671875,
-0.0118408203125,
0.0259857177734375,
-0.0096282958984375,
0.0364990234375,
0.033966064453125,
0.031463623046875,
0.0794677734375,
-0.02630615234375,
-0.09771728515625,
-0.03607177734375,
-0.094970703125,
-0.056182861328125,
-0.004039764404296875,
-0.000029325485229492188,
0.00305938720703125,
-0.020660400390625,
-0.00026345252990722656,
-0.01262664794921875,
0.0265655517578125,
0.04095458984375,
0.0030841827392578125,
-0.019500732421875,
0.01751708984375,
-0.04620361328125,
-0.007083892822265625,
0.0014219284057617188,
0.0804443359375,
0.016876220703125,
-0.02178955078125,
0.0007452964782714844,
-0.0151824951171875,
-0.01236724853515625,
0.0016603469848632812,
-0.056396484375,
0.01641845703125,
-0.0175933837890625,
-0.03790283203125,
-0.052947998046875,
-0.01641845703125,
-0.00252532958984375,
-0.0303497314453125,
0.0028438568115234375,
0.016326904296875,
-0.0189208984375,
0.016143798828125,
-0.010467529296875,
0.01108551025390625,
-0.0174713134765625,
0.0284423828125,
-0.011932373046875,
-0.0274505615234375,
0.0028285980224609375,
0.001262664794921875,
-0.017303466796875,
0.0203399658203125,
-0.0206146240234375,
-0.03680419921875,
-0.00616455078125,
-0.007541656494140625,
-0.01433563232421875,
0.01885986328125,
-0.0269012451171875,
-0.11175537109375,
0.046661376953125,
-0.058807373046875,
-0.0234527587890625,
-0.037811279296875,
-0.021728515625,
0.0230712890625,
0.1207275390625,
0.002696990966796875,
-0.001819610595703125,
-0.0021038055419921875,
0.0143280029296875,
-0.006011962890625,
0.0013895034790039062,
-0.035186767578125,
-0.00860595703125,
-0.09796142578125,
-0.00438690185546875,
-0.0281982421875,
-0.0107879638671875,
-0.0196075439453125,
0.033294677734375,
-0.031280517578125,
-0.05096435546875,
0.0305023193359375,
-0.011322021484375,
0.0176544189453125,
-0.00861358642578125,
0.01526641845703125,
-0.0261688232421875,
-0.008056640625,
-0.007904052734375,
-0.06402587890625,
0.00453948974609375,
0.01381683349609375,
-0.0010051727294921875,
-0.0154571533203125,
0.01326751708984375,
0.01080322265625,
0.029876708984375,
-0.01058197021484375,
0.038360595703125,
-0.042938232421875,
0.01091766357421875,
-0.02508544921875,
-0.00879669189453125,
-0.0282745361328125,
-0.006969451904296875,
-0.010101318359375,
-0.08612060546875,
-0.046966552734375,
-0.04730224609375,
-0.027557373046875,
0.0587158203125,
-0.024383544921875,
0.0174407958984375,
-0.05145263671875,
-0.0072021484375,
-0.0086212158203125,
0.026580810546875,
-0.0008258819580078125,
-0.0259246826171875,
-0.00927734375,
-0.060699462890625,
0.029327392578125,
-0.045562744140625,
-0.01403045654296875,
0.013702392578125,
0.05682373046875,
-0.00019109249114990234,
-0.005519866943359375,
0.024566650390625,
0.00044989585876464844,
0.0211181640625,
0.0225372314453125,
0.0259246826171875,
-0.0200347900390625,
-0.01715087890625,
0.08575439453125,
-0.00017642974853515625,
0.01500701904296875,
-0.0017023086547851562,
-0.0006518363952636719,
0.027130126953125,
-0.0243377685546875,
0.0131683349609375,
0.0307159423828125,
-0.00899505615234375,
0.04010009765625,
0.0103607177734375,
-0.00940704345703125,
-0.004062652587890625,
-0.0041961669921875,
0.00794219970703125,
-0.025482177734375,
-0.01291656494140625,
-0.0384521484375,
0.01300048828125,
-0.0157928466796875,
0.00472259521484375,
-0.0014047622680664062,
-0.00041103363037109375,
0.0179595947265625,
0.037689208984375,
0.00814056396484375,
-0.056396484375,
-0.006412506103515625,
-0.019439697265625,
0.051239013671875,
-0.0484619140625,
0.00754547119140625,
-0.0294342041015625,
-0.020721435546875,
0.09515380859375,
0.01806640625,
-0.0479736328125,
0.038055419921875,
-0.028900146484375,
-0.01042938232421875,
0.041717529296875,
-0.004425048828125,
0.028533935546875,
0.01052093505859375,
-0.02679443359375,
-0.0163116455078125,
-0.006561279296875,
-0.0275421142578125,
-0.049163818359375,
0.0498046875,
0.0222015380859375,
0.006504058837890625,
0.048675537109375,
0.038726806640625,
0.043548583984375,
0.043701171875,
-0.032562255859375,
-0.01537322998046875,
0.0225372314453125,
0.02337646484375,
0.0258941650390625,
-0.01427459716796875,
-0.00284576416015625,
0.0172882080078125,
0.036590576171875,
-0.03192138671875,
0.0207366943359375,
0.0281219482421875,
0.053192138671875,
0.0005331039428710938,
-0.038421630859375,
0.0116119384765625,
-0.044281005859375,
-0.00855255126953125,
0.07781982421875,
0.0196685791015625,
-0.068359375,
-0.02685546875,
0.006649017333984375,
0.045318603515625,
-0.0307769775390625,
-0.020111083984375,
-0.042724609375,
-0.05450439453125,
0.01457977294921875,
-0.0193023681640625,
0.00939178466796875,
-0.0012502670288085938,
-0.0291900634765625,
-0.027740478515625,
-0.0282745361328125,
-0.013946533203125,
-0.0027103424072265625,
0.00337982177734375,
-0.023956298828125,
-0.0316162109375,
0.030426025390625,
-0.0164031982421875,
0.0135498046875,
-0.028533935546875,
-0.00826263427734375,
-0.0061798095703125,
0.01202392578125,
0.04266357421875,
0.00647735595703125,
-0.047760009765625,
-0.00951385498046875,
-0.032623291015625,
-0.01148223876953125,
0.04693603515625,
0.004756927490234375,
-0.01337432861328125,
-0.0225067138671875,
0.0262603759765625,
0.0104217529296875,
0.00930023193359375,
-0.043731689453125,
-0.0290985107421875,
-0.00399017333984375,
0.036376953125,
-0.036376953125,
-0.004344940185546875,
0.039520263671875,
-0.0128631591796875,
0.039886474609375,
-0.0021495819091796875,
0.017608642578125,
-0.0037441253662109375,
-0.022308349609375,
0.0104217529296875,
0.0007715225219726562,
-0.01094818115234375,
-0.0300445556640625,
-0.01158905029296875,
-0.004802703857421875,
0.0635986328125,
-0.0177001953125,
0.03082275390625,
-0.0118560791015625,
-0.00283050537109375,
-0.02484130859375,
0.005649566650390625,
-0.038299560546875,
0.0625,
-0.038360595703125,
-0.00397491455078125,
0.02728271484375,
-0.0188751220703125,
0.004177093505859375,
-0.0281829833984375,
0.00281524658203125,
-0.0173797607421875,
0.036346435546875,
-0.0145721435546875,
0.018585205078125,
0.05694580078125,
-0.0126800537109375,
0.036102294921875,
0.021453857421875,
0.002002716064453125,
0.050628662109375,
-0.0201416015625,
0.0028972625732421875,
0.01401519775390625,
0.026702880859375,
-0.00748443603515625,
0.0255126953125,
0.032470703125,
0.0081329345703125,
-0.006317138671875,
0.052764892578125,
0.062408447265625,
-0.080078125,
0.011077880859375,
0.03118896484375,
0.006832122802734375,
-0.01078033447265625,
0.01172637939453125,
-0.00728607177734375,
0.0206756591796875,
0.004207611083984375,
-0.03167724609375,
-0.0186767578125,
0.0014705657958984375,
0.01904296875,
-0.01558685302734375,
0.00753021240234375,
0.01309967041015625,
0.01532745361328125,
-0.0288848876953125,
0.01058197021484375,
0.0226898193359375,
-0.004352569580078125,
0.0106048583984375,
-0.0194091796875,
0.035369873046875,
-0.032318115234375,
-0.045501708984375,
0.0168914794921875,
-0.050933837890625,
0.007450103759765625,
-0.019561767578125,
0.00017082691192626953,
0.068115234375,
0.0626220703125,
-0.00867462158203125,
-0.003177642822265625,
0.04290771484375,
0.00909423828125,
0.0270538330078125,
-0.0177764892578125,
0.0201568603515625,
-0.0269927978515625,
-0.02978515625,
-0.01157379150390625,
-0.01219940185546875,
-0.033233642578125,
-0.01181793212890625,
-0.007537841796875,
0.01568603515625,
0.007350921630859375,
-0.02056884765625,
0.03399658203125,
0.0202789306640625,
-0.0171966552734375,
-0.019500732421875,
0.01885986328125,
-0.034423828125,
-0.0260772705078125,
-0.0189971923828125,
-0.060638427734375,
-0.0364990234375,
-0.060302734375,
-0.0494384765625,
0.07159423828125,
-0.016693115234375,
0.0263824462890625,
0.03070068359375,
0.02142333984375,
-0.02978515625,
0.005718231201171875,
-0.01751708984375,
0.038360595703125,
-0.021331787109375,
0.006134033203125,
-0.0377197265625,
0.006603240966796875,
-0.01354217529296875,
0.002899169921875,
0.039581298828125,
0.0135955810546875,
-0.052276611328125,
0.01241302490234375,
0.060272216796875,
0.0275115966796875,
0.00579071044921875,
0.06011962890625,
-0.046478271484375,
0.004123687744140625,
0.0222930908203125,
-0.037628173828125,
0.0145721435546875,
0.0217437744140625,
-0.048858642578125,
-0.021453857421875,
0.01568603515625,
0.016571044921875,
-0.00782012939453125,
-0.0119781494140625,
-0.04571533203125,
0.00634002685546875,
0.0419921875,
0.0025844573974609375,
0.01800537109375,
-0.0196990966796875,
-0.019927978515625,
-0.0281982421875,
0.0745849609375,
-0.0299224853515625,
0.03094482421875,
-0.020477294921875,
-0.0047760009765625,
0.022308349609375,
0.028717041015625,
0.01189422607421875,
-0.0176239013671875,
-0.00582122802734375,
0.038848876953125,
-0.043548583984375,
0.0833740234375,
0.046600341796875,
0.0552978515625,
-0.0006327629089355469,
-0.0380859375,
-0.002880096435546875,
0.0927734375,
-0.032562255859375,
-0.01055908203125,
-0.0018720626831054688,
-0.0167236328125,
0.03497314453125,
-0.0025768280029296875,
0.059661865234375,
-0.006290435791015625,
-0.037872314453125,
0.006198883056640625,
-0.012115478515625,
0.028656005859375,
-0.0069580078125,
0.00620269775390625,
0.03271484375,
0.0007891654968261719,
0.002712249755859375,
-0.0296478271484375,
0.005580902099609375,
0.02410888671875,
0.04217529296875,
-0.0032711029052734375,
0.04351806640625,
0.0135955810546875,
-0.018707275390625,
0.010711669921875,
0.01265716552734375,
-0.01457977294921875,
-0.0091094970703125,
-0.05548095703125,
-0.07696533203125,
0.0218048095703125,
0.05645751953125,
0.016448974609375,
-0.00432586669921875,
0.019744873046875,
0.00968170166015625,
-0.019287109375,
-0.01187896728515625,
0.041259765625,
-0.0200958251953125,
0.07501220703125,
-0.036376953125,
0.0330810546875,
-0.007801055908203125,
-0.0267333984375,
-0.04608154296875,
0.0083160400390625,
0.047821044921875,
0.00710296630859375,
0.0242767333984375,
0.00021183490753173828,
-0.037078857421875,
0.019256591796875,
0.001407623291015625,
0.09088134765625,
0.03594970703125,
-0.01001739501953125,
-0.0177154541015625,
-0.012054443359375,
-0.0054779052734375,
0.007633209228515625,
0.03802490234375,
0.009033203125,
0.007740020751953125,
-0.041473388671875,
-0.013427734375,
0.00423431396484375,
0.01494598388671875,
-0.02191162109375,
0.0301971435546875,
0.0257568359375,
-0.008087158203125,
-0.0281982421875,
-0.01068878173828125,
0.01218414306640625,
0.0236358642578125,
0.0212860107421875,
0.041839599609375,
-0.0098114013671875,
0.019622802734375,
-0.01238250732421875,
-0.01081085205078125,
-0.005474090576171875,
-0.036224365234375,
0.0335693359375,
-0.0017366409301757812,
-0.00252532958984375,
-0.01395416259765625,
-0.08477783203125,
0.022064208984375,
0.00937652587890625,
0.00809478759765625,
0.034332275390625,
-0.025360107421875,
0.01439666748046875,
0.006992340087890625,
0.0091094970703125,
-0.04779052734375,
-0.07470703125,
-0.07415771484375,
-0.0204010009765625,
-0.00962066650390625,
-0.0024280548095703125,
0.00617218017578125,
0.06396484375,
-0.005279541015625,
0.0214996337890625,
0.0179443359375,
-0.059326171875,
0.023712158203125,
0.038604736328125,
-0.038909912109375,
-0.0352783203125,
0.0099029541015625,
-0.00696563720703125,
-0.0004987716674804688,
-0.00873565673828125,
0.03997802734375,
0.004390716552734375,
-0.0141143798828125,
-0.0550537109375,
-0.0323486328125,
-0.009063720703125,
-0.0206146240234375,
-0.005588531494140625,
-0.034881591796875,
-0.00920867919921875,
-0.0028209686279296875,
-0.013336181640625,
-0.0283966064453125,
-0.041961669921875,
-0.0036220550537109375,
0.022735595703125,
-0.0151519775390625,
-0.01467132568359375,
-0.037200927734375,
-0.0129241943359375,
0.049591064453125,
0.0227508544921875,
-0.06695556640625,
0.02520751953125,
-0.039398193359375,
0.01450347900390625,
-0.00728607177734375,
-0.01171875,
-0.004547119140625,
0.035369873046875,
-0.0281524658203125,
-0.051513671875,
-0.042633056640625,
0.0124969482421875,
-0.053863525390625,
-0.004734039306640625,
0.038360595703125,
-0.0192108154296875,
-0.0158233642578125,
-0.048492431640625,
-0.01702880859375,
-0.0074615478515625,
-0.03729248046875,
-0.021820068359375,
-0.0081939697265625,
-0.0109100341796875,
-0.0255126953125,
-0.01522064208984375,
0.0269622802734375,
-0.043975830078125,
-0.0372314453125,
-0.0275115966796875,
-0.0244140625,
-0.02734375,
-0.047454833984375,
-0.063720703125,
0.01336669921875,
-0.00199127197265625,
-0.025482177734375,
-0.03607177734375,
-0.01454925537109375,
-0.0187225341796875,
0.0787353515625,
0.0035152435302734375,
-0.053558349609375,
-0.03497314453125,
0.0252532958984375,
0.0013685226440429688,
0.07391357421875,
-0.0297698974609375,
0.01428985595703125,
0.02301025390625,
0.0301971435546875,
0.0233001708984375,
0.0018367767333984375,
0.00945281982421875,
-0.01336669921875,
0.02001953125,
0.05859375,
-0.0158233642578125,
-0.046051025390625,
-0.01708984375,
-0.0546875,
0.004985809326171875,
-0.03570556640625,
-0.0295562744140625,
-0.038360595703125,
0.04278564453125,
0.0167236328125,
0.00731658935546875,
-0.007843017578125,
-0.06463623046875,
-0.0233917236328125,
0.01229095458984375,
-0.0400390625,
0.032196044921875,
-0.10406494140625,
-0.01213836669921875,
0.0141754150390625,
0.01284027099609375,
0.0247955322265625,
-0.0195465087890625,
0.009857177734375,
-0.004001617431640625,
0.0300750732421875,
-0.006908416748046875,
-0.030731201171875,
-0.01641845703125,
0.08209228515625,
-0.046234130859375,
0.006175994873046875,
0.008941650390625,
0.035400390625,
0.02581787109375,
-0.01456451416015625,
0.03369140625,
-0.01025390625,
0.01108551025390625,
0.0061798095703125,
0.0242156982421875,
0.0111083984375,
0.0008063316345214844,
-0.052337646484375,
0.0011844635009765625,
0.01474761962890625,
-0.002002716064453125,
0.01519775390625,
-0.0028533935546875,
0.03082275390625,
-0.0025539398193359375,
0.0299224853515625,
0.0144195556640625,
0.0552978515625,
-0.0124053955078125,
0.054107666015625,
-0.056976318359375,
-0.018707275390625,
-0.02471923828125,
-0.033050537109375,
0.01073455810546875,
-0.0010232925415039062,
0.032867431640625,
-0.01800537109375,
0.0157928466796875,
0.007205963134765625,
0.0220489501953125,
0.006011962890625
]
|
db387304730d1ba371f5bfc5546a71f7e07a3cbb | Wordpress Stackexchange
Q: Allow only 1 taxonomy per custom post type Wordpress allows Admin to select more than one category for a post , I would like to change that so user is allowed to select only 1 category for a custom post type.
Please note I cannot remove category selection box due to requirement of the project. Any help appreciated
A: Here's the JS I use to replace checkboxes for radio buttons.
function checktoradio(){
echo '<script type="text/javascript">jQuery("#categorychecklist-pop input, #categorychecklist input, .cat-checklist input").each(function(){this.type="radio"});</script>';
}
add_action('admin_footer', 'checktoradio');
This would also work for custom terms, you just need to find out the custom term ID used by inspecting the metabox element.
You would place this code inside functions.php. It basically adds a jquery script to the footer of the admin pages.
Disclaimer: I found the original code a long time ago on some website and adapted for my own use.
| Q: Allow only 1 taxonomy per custom post type Wordpress allows Admin to select more than one category for a post , I would like to change that so user is allowed to select only 1 category for a custom post type.
Please note I cannot remove category selection box due to requirement of the project. Any help appreciated
A: Here's the JS I use to replace checkboxes for radio buttons.
function checktoradio(){
echo '<script type="text/javascript">jQuery("#categorychecklist-pop input, #categorychecklist input, .cat-checklist input").each(function(){this.type="radio"});</script>';
}
add_action('admin_footer', 'checktoradio');
This would also work for custom terms, you just need to find out the custom term ID used by inspecting the metabox element.
You would place this code inside functions.php. It basically adds a jquery script to the footer of the admin pages.
Disclaimer: I found the original code a long time ago on some website and adapted for my own use.
| wordpress | {
"language": "en",
"length": 146,
"provenance": "stackexchange_00019.jsonl.gz:455340",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/187595"
} | [
0.07000732421875,
0.005489349365234375,
-0.0197906494140625,
-0.06903076171875,
0.035003662109375,
-0.045867919921875,
0.0189056396484375,
-0.0191192626953125,
-0.0207366943359375,
-0.004032135009765625,
-0.01241302490234375,
-0.0159454345703125,
-0.030364990234375,
-0.046295166015625,
0.017120361328125,
-0.050201416015625,
0.0169677734375,
-0.003360748291015625,
-0.0172271728515625,
-0.03948974609375,
0.01534271240234375,
-0.0290069580078125,
-0.0204925537109375,
0.058441162109375,
0.02642822265625,
-0.0144195556640625,
0.0058135986328125,
-0.034881591796875,
-0.0037689208984375,
-0.0277099609375,
0.01271820068359375,
0.0281829833984375,
0.0109405517578125,
-0.0020160675048828125,
-0.0035305023193359375,
-0.026580810546875,
-0.005626678466796875,
0.011627197265625,
-0.007129669189453125,
0.02447509765625,
0.04083251953125,
-0.035400390625,
-0.025054931640625,
0.031768798828125,
-0.005764007568359375,
-0.04815673828125,
0.0404052734375,
-0.0648193359375,
0.0290069580078125,
-0.06329345703125,
0.01148223876953125,
-0.032928466796875,
0.039306640625,
-0.09393310546875,
-0.03472900390625,
-0.0115203857421875,
0.006427764892578125,
-0.06903076171875,
0.03619384765625,
0.036834716796875,
-0.0183258056640625,
-0.02740478515625,
0.021392822265625,
-0.038818359375,
-0.029296875,
-0.0012331008911132812,
-0.04718017578125,
0.00446319580078125,
-0.051300048828125,
-0.026580810546875,
0.03460693359375,
-0.040802001953125,
0.0117645263671875,
0.0046234130859375,
-0.0101165771484375,
-0.032073974609375,
0.0225830078125,
-0.005321502685546875,
0.011260986328125,
0.0217742919921875,
0.036956787109375,
-0.00392913818359375,
-0.0084228515625,
-0.00850677490234375,
0.01715087890625,
0.01273345947265625,
0.00003510713577270508,
-0.0268707275390625,
-0.0294189453125,
-0.0297698974609375,
-0.0220184326171875,
-0.0419921875,
-0.05511474609375,
0.0236968994140625,
0.0154266357421875,
-0.0255889892578125,
0.013214111328125,
0.034515380859375,
0.0043487548828125,
-0.01421356201171875,
-0.00022161006927490234,
-0.0257110595703125,
-0.00267791748046875,
-0.018341064453125,
0.0253448486328125,
0.0404052734375,
-0.005748748779296875,
0.00662994384765625,
0.061065673828125,
0.0103912353515625,
0.0120086669921875,
0.045806884765625,
-0.0019550323486328125,
-0.00894927978515625,
-0.01280975341796875,
0.004222869873046875,
-0.030487060546875,
0.00801849365234375,
-0.017974853515625,
0.0017461776733398438,
0.009063720703125,
0.042938232421875,
0.0321044921875,
-0.058502197265625,
0.003925323486328125,
-0.0033435821533203125,
-0.0094757080078125,
-0.060699462890625,
-0.01050567626953125,
0.00543975830078125,
-0.03289794921875,
-0.00385284423828125,
0.063232421875,
0.06298828125,
0.027801513671875,
-0.008209228515625,
0.0290069580078125,
0.0276031494140625,
0.008819580078125,
-0.005504608154296875,
0.024871826171875,
-0.0257720947265625,
-0.02484130859375,
0.027191162109375,
-0.01319122314453125,
0.02557373046875,
0.013458251953125,
-0.0005502700805664062,
0.00809478759765625,
-0.036163330078125,
-0.01194000244140625,
-0.03662109375,
0.05731201171875,
0.00962066650390625,
-0.0633544921875,
-0.0311737060546875,
0.01204681396484375,
-0.021514892578125,
-0.0209808349609375,
-0.0653076171875,
0.034088134765625,
0.0176239013671875,
0.0243988037109375,
-0.0097808837890625,
-0.0205535888671875,
-0.01410675048828125,
-0.068359375,
-0.01099395751953125,
0.01861572265625,
0.0261688232421875,
0.01143646240234375,
-0.0036945343017578125,
-0.00732421875,
-0.0001270771026611328,
-0.0007834434509277344,
-0.003742218017578125,
0.0169525146484375,
0.03765869140625,
0.0028781890869140625,
0.0117340087890625,
-0.003360748291015625,
-0.0382080078125,
0.056121826171875,
-0.031951904296875,
-0.04046630859375,
0.019775390625,
-0.0018177032470703125,
0.04144287109375,
0.0136871337890625,
0.0124053955078125,
0.031158447265625,
0.035003662109375,
-0.022308349609375,
-0.021209716796875,
0.0015325546264648438,
0.0123138427734375,
-0.045257568359375,
0.00011271238327026367,
-0.00583648681640625,
0.01256561279296875,
0.01422119140625,
-0.0161895751953125,
0.0111083984375,
-0.020843505859375,
-0.035003662109375,
0.0005140304565429688,
-0.01904296875,
0.0289306640625,
-0.0264129638671875,
0.027435302734375,
0.019378662109375,
0.00479888916015625,
-0.0244293212890625,
-0.017242431640625,
-0.0037136077880859375,
-0.0236663818359375,
0.0072479248046875,
0.05230712890625,
-0.013763427734375,
-0.0007796287536621094,
-0.00659942626953125,
-0.042999267578125,
-0.0079193115234375,
0.044891357421875,
0.050079345703125,
0.02972412109375,
-0.01824951171875,
-0.0077362060546875,
0.028594970703125,
0.041473388671875,
-0.07525634765625,
0.01216888427734375,
0.0276336669921875,
0.003780364990234375,
-0.0188446044921875,
0.01267242431640625,
0.032470703125,
-0.057830810546875,
-0.0008091926574707031,
0.043487548828125,
0.0133514404296875,
0.003753662109375,
-0.04632568359375,
0.005950927734375,
0.04315185546875,
-0.043975830078125,
-0.025054931640625,
0.02520751953125,
-0.01007843017578125,
0.01151275634765625,
0.0269622802734375,
0.018798828125,
0.03363037109375,
0.03173828125,
0.0328369140625,
0.020416259765625,
-0.0193023681640625,
-0.027801513671875,
0.0025691986083984375,
-0.0194549560546875,
0.0252838134765625,
-0.053985595703125,
-0.05218505859375,
-0.004405975341796875,
0.046051025390625,
0.0020771026611328125,
0.046630859375,
0.0273590087890625,
-0.029266357421875,
0.005626678466796875,
0.0012235641479492188,
-0.0196990966796875,
-0.00504302978515625,
0.0077362060546875,
0.021209716796875,
0.0287322998046875,
-0.035797119140625,
0.005733489990234375,
0.019012451171875,
0.01410675048828125,
0.001224517822265625,
0.03338623046875,
-0.046661376953125,
-0.0122833251953125,
0.00147247314453125,
-0.07000732421875,
-0.025177001953125,
0.024169921875,
-0.030426025390625,
-0.020172119140625,
0.0191650390625,
0.0062255859375,
-0.03240966796875,
0.0148468017578125,
0.0017719268798828125,
-0.0222625732421875,
0.0218963623046875,
-0.024200439453125,
0.01314544677734375,
-0.0149383544921875,
0.0682373046875,
0.05181884765625,
0.00962066650390625,
-0.0015859603881835938,
-0.003368377685546875,
0.0014972686767578125,
-0.0283050537109375,
0.033905029296875,
-0.006252288818359375,
-0.02496337890625,
-0.0106201171875,
0.019805908203125,
0.0187530517578125,
0.00479888916015625,
0.0206451416015625,
-0.012939453125,
-0.004283905029296875,
0.0164642333984375,
-0.00821685791015625,
-0.002689361572265625,
0.040679931640625,
-0.0186614990234375,
0.035125732421875,
0.002605438232421875,
0.0019197463989257812,
-0.0557861328125,
0.0281982421875,
0.002635955810546875,
-0.01715087890625,
-0.024169921875,
-0.00908660888671875,
-0.027587890625,
-0.0191192626953125,
-0.01418304443359375,
0.005046844482421875,
-0.0243377685546875,
0.0162506103515625,
0.0670166015625,
0.0157012939453125,
-0.0870361328125,
0.0126495361328125,
0.011260986328125,
-0.0292205810546875,
0.046661376953125,
0.0269927978515625,
-0.0550537109375,
0.01427459716796875,
-0.002651214599609375,
-0.00981903076171875,
0.006862640380859375,
-0.0027103424072265625,
-0.0205078125,
-0.0207061767578125,
0.0266876220703125,
0.01568603515625,
0.0005564689636230469,
0.006725311279296875,
0.05914306640625,
0.034149169921875,
0.00800323486328125,
0.0229034423828125,
0.004161834716796875,
-0.00655364990234375,
-0.0263519287109375,
-0.0159149169921875,
-0.02215576171875,
-0.00157928466796875,
-0.0036640167236328125,
0.01325225830078125,
0.0165863037109375,
-0.0240020751953125,
-0.00792694091796875,
0.005435943603515625,
0.0065155029296875,
0.02191162109375,
0.0081939697265625,
-0.027374267578125,
-0.04547119140625,
0.0221710205078125,
-0.02325439453125,
-0.0026645660400390625,
0.003940582275390625,
0.01207733154296875,
0.00933837890625,
-0.0867919921875,
0.0228424072265625,
-0.0679931640625,
-0.0225830078125,
-0.033721923828125,
-0.00342559814453125,
0.00937652587890625,
0.09161376953125,
-0.054534912109375,
0.00516510009765625,
0.0015420913696289062,
0.006443023681640625,
-0.00661468505859375,
-0.034210205078125,
-0.061767578125,
-0.018829345703125,
-0.07568359375,
-0.0155029296875,
0.004856109619140625,
-0.03582763671875,
-0.009613037109375,
0.033905029296875,
-0.05523681640625,
-0.0347900390625,
0.03680419921875,
-0.07110595703125,
0.01404571533203125,
-0.00681304931640625,
0.01328277587890625,
-0.06353759765625,
-0.00444793701171875,
-0.035247802734375,
-0.0556640625,
-0.0199737548828125,
0.007843017578125,
0.03167724609375,
-0.0067901611328125,
0.0025653839111328125,
0.004093170166015625,
0.051361083984375,
0.0015916824340820312,
0.02618408203125,
-0.026153564453125,
-0.001438140869140625,
0.004848480224609375,
-0.0025539398193359375,
-0.0097808837890625,
0.00234222412109375,
-0.0355224609375,
0.0003333091735839844,
0.0240631103515625,
0.04974365234375,
-0.0233154296875,
-0.031768798828125,
-0.0252532958984375,
-0.005401611328125,
-0.1024169921875,
-0.056976318359375,
-0.064453125,
-0.054107666015625,
-0.01552581787109375,
-0.03167724609375,
-0.03173828125,
-0.08209228515625,
0.0218963623046875,
-0.011627197265625,
-0.009674072265625,
0.0203399658203125,
0.0599365234375,
0.01140594482421875,
-0.0021209716796875,
-0.06988525390625,
-0.006717681884765625,
0.0298004150390625,
-0.019256591796875,
0.02734375,
0.01090240478515625,
-0.029144287109375,
0.08441162109375,
-0.00611114501953125,
-0.0296630859375,
-0.032073974609375,
0.0921630859375,
-0.002323150634765625,
-0.024261474609375,
0.0098419189453125,
-0.04180908203125,
0.022430419921875,
-0.004329681396484375,
-0.01544189453125,
0.005970001220703125,
-0.018341064453125,
0.0207061767578125,
0.01134490966796875,
-0.02362060546875,
-0.0379638671875,
-0.04937744140625,
0.0168609619140625,
-0.01358795166015625,
0.03021240234375,
0.041778564453125,
-0.0054931640625,
0.0506591796875,
0.02520751953125,
-0.004505157470703125,
0.013275146484375,
0.02490234375,
0.0061798095703125,
0.0374755859375,
0.0093841552734375,
0.0083770751953125,
-0.0189666748046875,
0.0115509033203125,
-0.0174102783203125,
0.0020313262939453125,
-0.031280517578125,
-0.0462646484375,
0.00893402099609375,
0.0033588409423828125,
-0.00611114501953125,
0.004711151123046875,
0.03533935546875,
-0.021575927734375,
0.00916290283203125,
-0.0035800933837890625,
-0.053863525390625,
-0.0099945068359375,
-0.0263214111328125,
0.024200439453125,
0.034820556640625,
-0.0191802978515625,
0.034942626953125,
0.02874755859375,
0.035797119140625,
0.015594482421875,
-0.03277587890625,
0.06781005859375,
0.03570556640625,
0.020751953125,
0.0093536376953125,
0.0052032470703125,
-0.0115814208984375,
-0.01105499267578125,
-0.043304443359375,
-0.033935546875,
-0.030426025390625,
0.028228759765625,
0.031707763671875,
-0.00689697265625,
0.0026874542236328125,
0.0002949237823486328,
0.015655517578125,
-0.028656005859375,
0.01128387451171875,
-0.00740814208984375,
-0.0288848876953125,
-0.0205535888671875,
-0.02886962890625,
-0.01000213623046875,
-0.005474090576171875,
-0.01654052734375,
0.00687408447265625,
-0.032806396484375,
0.0094757080078125,
-0.0025463104248046875,
-0.0140380859375,
-0.00879669189453125,
0.0029315948486328125,
-0.062744140625,
0.00370025634765625,
0.013641357421875,
-0.03466796875,
-0.06396484375,
0.017425537109375,
-0.0217742919921875,
-0.00921630859375,
0.0037937164306640625,
0.02105712890625,
-0.01494598388671875,
-0.02978515625,
-0.0003287792205810547,
-0.0012674331665039062,
0.06292724609375,
0.006694793701171875,
-0.0222320556640625,
-0.0195465087890625,
-0.046295166015625,
-0.019927978515625,
-0.039520263671875,
-0.034820556640625,
-0.009063720703125,
0.02197265625,
0.027740478515625,
0.0191802978515625,
0.00811767578125,
-0.01155853271484375,
-0.01165008544921875,
0.01335906982421875,
0.0192413330078125,
0.035919189453125,
-0.057220458984375,
0.0068817138671875,
0.0400390625,
0.00791168212890625,
-0.046417236328125,
-0.0322265625,
0.025360107421875,
0.0010824203491210938,
-0.0080413818359375,
-0.08868408203125,
-0.018035888671875,
0.00173187255859375,
-0.03070068359375,
0.058135986328125,
0.033447265625,
0.0150146484375,
0.0022182464599609375,
0.02655029296875,
0.01641845703125,
-0.0182037353515625,
-0.05267333984375,
0.036407470703125,
0.01311492919921875,
0.00807952880859375,
0.006832122802734375,
0.055999755859375,
0.006679534912109375,
-0.0185546875,
0.031646728515625,
-0.007358551025390625,
0.0579833984375,
-0.00923919677734375,
-0.0072479248046875,
-0.0021228790283203125,
0.017486572265625,
0.04425048828125,
0.044097900390625,
-0.0108795166015625,
0.05963134765625,
-0.0012493133544921875,
-0.025909423828125,
-0.00856781005859375,
-0.00984954833984375,
-0.017669677734375,
-0.032318115234375,
0.018951416015625,
-0.0105438232421875,
0.0106048583984375,
-0.0179595947265625,
0.04302978515625,
0.030731201171875,
-0.09210205078125,
0.0138092041015625,
0.004398345947265625,
0.01158905029296875,
0.00756072998046875,
-0.0081787109375,
-0.01515960693359375,
-0.043304443359375,
0.0174560546875,
0.0243072509765625,
-0.02874755859375,
-0.0014495849609375,
0.00951385498046875,
-0.018157958984375,
0.004184722900390625,
0.0130767822265625,
0.01544189453125,
-0.0200042724609375,
0.004215240478515625,
0.0167999267578125,
-0.00445556640625,
-0.0005054473876953125,
0.004138946533203125,
0.0030040740966796875,
-0.027435302734375,
-0.06182861328125,
0.002094268798828125,
-0.0167999267578125,
-0.029327392578125,
0.023223876953125,
0.029022216796875,
-0.005481719970703125,
0.03997802734375,
-0.00762939453125,
0.004520416259765625,
0.0021514892578125,
-0.036376953125,
-0.05279541015625,
-0.038116455078125,
-0.0086517333984375,
0.0182037353515625,
-0.0369873046875,
0.03289794921875,
-0.0176544189453125,
-0.032623291015625,
-0.0024127960205078125,
-0.01543426513671875,
0.03985595703125,
0.005523681640625,
-0.0269622802734375,
0.0287933349609375,
0.00695037841796875,
-0.005512237548828125,
0.01195526123046875,
-0.01788330078125,
-0.04449462890625,
-0.04388427734375,
-0.00730133056640625,
-0.0780029296875,
0.0083465576171875,
0.004638671875,
-0.07293701171875,
0.10357666015625,
0.0218963623046875,
0.037933349609375,
-0.0099334716796875,
0.0391845703125,
-0.023040771484375,
0.0215911865234375,
-0.020965576171875,
-0.006015777587890625,
0.020172119140625,
-0.004146575927734375,
-0.0246429443359375,
-0.01873779296875,
-0.0269317626953125,
0.039398193359375,
0.052459716796875,
0.01102447509765625,
0.0161895751953125,
-0.01117706298828125,
0.00861358642578125,
0.056243896484375,
-0.0154571533203125,
-0.01021575927734375,
0.0030345916748046875,
0.0149993896484375,
0.051361083984375,
-0.00818634033203125,
0.025146484375,
0.0276336669921875,
-0.018157958984375,
0.0303192138671875,
0.0289154052734375,
0.031646728515625,
0.01145172119140625,
-0.01071929931640625,
-0.037841796875,
0.005962371826171875,
0.035797119140625,
-0.0185546875,
0.018280029296875,
0.045379638671875,
0.0212249755859375,
-0.001140594482421875,
0.02996826171875,
-0.0287628173828125,
0.046966552734375,
-0.03179931640625,
0.03277587890625,
0.035308837890625,
0.02215576171875,
0.03204345703125,
0.006786346435546875,
0.032928466796875,
0.004852294921875,
-0.0273895263671875,
0.01052093505859375,
-0.00830078125,
0.01043701171875,
-0.03411865234375,
0.06280517578125,
0.025390625,
0.0172882080078125,
-0.04388427734375,
-0.0572509765625,
0.01323699951171875,
0.034088134765625,
0.0263519287109375,
0.017547607421875,
0.055816650390625,
0.055084228515625,
0.099853515625,
-0.07159423828125,
0.0210418701171875,
0.05206298828125,
0.00799560546875,
-0.0060882568359375,
0.020111083984375,
-0.0465087890625,
0.01439666748046875,
-0.0252227783203125,
-0.026092529296875,
0.0135955810546875,
0.06103515625,
0.03668212890625,
0.026947021484375,
-0.033355712890625,
-0.0286102294921875,
-0.0015134811401367188,
0.019866943359375,
0.00533294677734375,
-0.01495361328125,
-0.0124053955078125,
-0.0343017578125,
0.0249481201171875,
0.015655517578125,
-0.00872039794921875,
0.00604248046875,
0.0196380615234375,
0.082763671875,
0.047332763671875,
-0.023162841796875,
0.08868408203125,
0.0258941650390625,
-0.0245513916015625,
-0.04107666015625,
0.023590087890625,
0.0338134765625,
0.01459503173828125,
0.005245208740234375,
0.0177001953125,
0.05938720703125,
0.042572021484375,
-0.0030975341796875,
0.0194549560546875,
-0.0242156982421875,
0.01178741455078125,
0.0214385986328125,
0.061431884765625,
0.07135009765625,
-0.09326171875,
-0.0244293212890625,
-0.043975830078125,
-0.07122802734375,
0.054718017578125,
0.050506591796875,
-0.0399169921875,
0.0110931396484375,
0.00908660888671875,
-0.031036376953125,
0.013519287109375,
0.00698089599609375,
0.0033130645751953125,
-0.0139923095703125,
-0.0014276504516601562,
-0.018035888671875,
-0.023590087890625,
-0.00283050537109375,
0.0298309326171875,
0.00701141357421875,
-0.00820159912109375,
0.0303955078125,
0.00594329833984375,
-0.00879669189453125,
-0.03143310546875,
0.055023193359375,
-0.06793212890625,
-0.038543701171875,
0.0380859375,
-0.00952911376953125,
-0.0008358955383300781,
0.0084075927734375,
-0.02459716796875,
0.0037784576416015625,
0.06170654296875,
-0.0494384765625,
0.024322509765625,
0.0020694732666015625,
-0.0008039474487304688,
-0.0771484375,
0.06903076171875,
-0.0117034912109375,
-0.0003287792205810547,
-0.055816650390625,
-0.047271728515625,
0.05804443359375,
0.053955078125,
0.0198516845703125,
-0.010589599609375,
-0.0291595458984375,
-0.0251617431640625,
0.005580902099609375,
0.025482177734375,
-0.012786865234375,
0.0413818359375,
-0.033294677734375,
-0.0023822784423828125,
0.04205322265625,
-0.0013675689697265625,
0.0008707046508789062,
0.051361083984375,
-0.0167388916015625,
0.043304443359375,
-0.030731201171875,
0.0175933837890625,
0.0131378173828125,
0.00981903076171875,
-0.033111572265625,
-0.01056671142578125,
0.0552978515625,
-0.023345947265625,
-0.0269622802734375,
0.0180206298828125,
-0.022674560546875,
-0.00490570068359375,
-0.01103973388671875,
-0.01348876953125,
0.0183563232421875,
-0.037628173828125,
-0.0171661376953125,
0.0223541259765625,
0.039886474609375,
-0.0010061264038085938,
-0.0238800048828125,
0.0284423828125,
-0.050018310546875,
0.048980712890625,
0.0018644332885742188,
-0.006866455078125,
0.010009765625,
0.05224609375,
-0.043701171875,
-0.015289306640625,
-0.017822265625,
0.006778717041015625,
-0.042877197265625,
0.011199951171875,
0.001964569091796875,
-0.0262603759765625,
-0.0261383056640625,
0.0300140380859375,
0.0225982666015625,
0.057891845703125,
0.049285888671875,
0.01313018798828125,
-0.0108184814453125,
0.042510986328125,
-0.06646728515625,
-0.08056640625,
0.046295166015625,
-0.05767822265625,
-0.0196380615234375,
-0.02105712890625,
0.0164337158203125,
0.022735595703125,
-0.0295257568359375,
-0.06683349609375,
0.035400390625,
-0.0190582275390625,
-0.02435302734375,
-0.0272216796875,
-0.00962066650390625,
-0.01383209228515625,
0.0282745361328125,
-0.00371551513671875,
-0.0278167724609375,
-0.0199737548828125,
0.020050048828125,
0.021087646484375,
0.040740966796875,
0.0177764892578125,
0.004840850830078125,
-0.048309326171875,
0.0195159912109375,
0.008087158203125,
0.052093505859375,
0.011810302734375,
-0.0125579833984375,
0.0053558349609375,
0.0180816650390625,
-0.05169677734375,
-0.0416259765625,
-0.0200042724609375,
0.021148681640625,
-0.0007958412170410156,
-0.07672119140625,
-0.055267333984375,
-0.054901123046875,
0.051544189453125,
0.04766845703125,
0.019989013671875,
-0.0136260986328125,
-0.04693603515625,
-0.07379150390625,
-0.0290985107421875,
-0.017333984375,
0.018524169921875,
-0.078369140625,
0.0213470458984375,
0.041717529296875,
-0.02020263671875,
0.00872039794921875,
0.0281524658203125,
-0.02459716796875,
-0.0007681846618652344,
0.02020263671875,
-0.0161590576171875,
-0.075439453125,
0.0689697265625,
-0.031402587890625,
-0.01230621337890625,
-0.01471710205078125,
-0.01068878173828125,
-0.036956787109375,
-0.0254364013671875,
-0.005146026611328125,
-0.0258941650390625,
0.00989532470703125,
-0.04742431640625,
0.0209808349609375,
-0.0231781005859375,
-0.005191802978515625,
-0.053741455078125,
0.0213775634765625,
0.006053924560546875,
-0.0033016204833984375,
0.01129913330078125,
-0.0081024169921875,
-0.042999267578125,
0.0187530517578125,
-0.01503753662109375,
0.01029205322265625,
-0.0022869110107421875,
-0.029266357421875,
-0.0286712646484375,
0.039459228515625,
0.0074615478515625,
-0.023040771484375,
0.050689697265625,
-0.0255279541015625,
-0.009124755859375,
-0.007389068603515625,
-0.00791168212890625,
-0.03570556640625,
0.0027484893798828125,
0.039764404296875,
-0.0037403106689453125,
0.01342010498046875
]
|
d6a7c10f52994b4ebb01ea41aca0a2f951750402 | Wordpress Stackexchange
Q: How to Output HTML tags in do_shortcode? i want to output html tags in do_shortcode(); function
<?php echo do_shortcode($content); ?>
is it possible? thx!
A: Yes it is possible.
There are two ways that I can think of at this moment.
First follow what the codex says Shortcodes.
Basically you just wrap your html in ob_start(); this will return the html as a string so you can echo it.
function my_shortcode() {
ob_start();
?> <HTML> <here> ... <?php
return ob_get_clean();
}
The second way is to add your html as a string to a variable then return it later. eg.
function my_shortcode() {
$output = '';
$output.= '<html>content</html>';
return $output;
}
| Q: How to Output HTML tags in do_shortcode? i want to output html tags in do_shortcode(); function
<?php echo do_shortcode($content); ?>
is it possible? thx!
A: Yes it is possible.
There are two ways that I can think of at this moment.
First follow what the codex says Shortcodes.
Basically you just wrap your html in ob_start(); this will return the html as a string so you can echo it.
function my_shortcode() {
ob_start();
?> <HTML> <here> ... <?php
return ob_get_clean();
}
The second way is to add your html as a string to a variable then return it later. eg.
function my_shortcode() {
$output = '';
$output.= '<html>content</html>';
return $output;
}
A: My solution was, and perfectly works fine for me
function my_function(){
ob_start();
echo 'Long html tag here';
$output = ob_get_contents();
ob_end_clean();
return $output;
}
| wordpress | {
"language": "en",
"length": 137,
"provenance": "stackexchange_00019.jsonl.gz:455415",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/187852"
} | [
0.03558349609375,
-0.0126495361328125,
-0.0051116943359375,
-0.039031982421875,
0.009307861328125,
-0.019775390625,
0.0274658203125,
-0.0136260986328125,
-0.0377197265625,
0.0443115234375,
0.01708984375,
0.0006542205810546875,
-0.033447265625,
-0.0206756591796875,
-0.0280303955078125,
-0.03924560546875,
0.041046142578125,
-0.01073455810546875,
0.00982666015625,
0.00007891654968261719,
-0.00571441650390625,
0.030303955078125,
-0.00595855712890625,
0.02935791015625,
0.0148773193359375,
-0.016571044921875,
0.05047607421875,
0.0012989044189453125,
-0.016571044921875,
-0.01444244384765625,
0.01427459716796875,
0.0025234222412109375,
0.045257568359375,
0.04498291015625,
-0.09942626953125,
0.0201873779296875,
-0.03973388671875,
0.020050048828125,
-0.034820556640625,
0.04522705078125,
0.0304718017578125,
-0.0227813720703125,
0.0748291015625,
-0.029510498046875,
0.02642822265625,
0.029541015625,
0.0019168853759765625,
-0.06103515625,
-0.02703857421875,
0.00977325439453125,
0.05975341796875,
-0.005279541015625,
0.0615234375,
-0.055145263671875,
-0.00989532470703125,
0.0155029296875,
-0.031951904296875,
-0.01181793212890625,
0.01546478271484375,
-0.01334381103515625,
-0.0003266334533691406,
-0.0233154296875,
0.032135009765625,
0.0220184326171875,
0.0015783309936523438,
0.0012798309326171875,
0.0235595703125,
0.0057220458984375,
-0.0006198883056640625,
0.0094757080078125,
0.01806640625,
-0.00730133056640625,
0.0027618408203125,
-0.0206146240234375,
0.02825927734375,
0.026947021484375,
-0.0276336669921875,
0.0094146728515625,
0.0158233642578125,
0.0161590576171875,
0.03802490234375,
0.0357666015625,
0.003997802734375,
-0.014404296875,
0.0003898143768310547,
-0.00873565673828125,
-0.00952911376953125,
-0.0222625732421875,
0.01512908935546875,
-0.0077667236328125,
-0.0093841552734375,
0.05914306640625,
-0.0006299018859863281,
0.0088348388671875,
-0.044464111328125,
0.0017185211181640625,
-0.01468658447265625,
0.0090179443359375,
-0.01529693603515625,
0.0269317626953125,
-0.000732421875,
-0.04351806640625,
0.06243896484375,
-0.04266357421875,
-0.009765625,
0.01019287109375,
-0.01235198974609375,
-0.003719329833984375,
0.048492431640625,
0.04193115234375,
-0.0026226043701171875,
0.02459716796875,
-0.07196044921875,
-0.0239715576171875,
-0.0243682861328125,
0.061004638671875,
-0.067626953125,
-0.00627899169921875,
-0.01131439208984375,
0.01824951171875,
0.01119232177734375,
0.0230560302734375,
0.039581298828125,
-0.0216522216796875,
-0.0302886962890625,
-0.01361846923828125,
-0.0159912109375,
-0.05859375,
0.029876708984375,
-0.01605224609375,
-0.044342041015625,
0.0258941650390625,
0.0299072265625,
0.0277252197265625,
0.019744873046875,
0.00922393798828125,
0.007068634033203125,
-0.040924072265625,
-0.00960540771484375,
0.050201416015625,
-0.05474853515625,
-0.036285400390625,
0.0242767333984375,
-0.059600830078125,
-0.02496337890625,
0.0284576416015625,
0.0198211669921875,
0.0250701904296875,
-0.0274200439453125,
-0.120849609375,
0.06561279296875,
-0.0380859375,
0.0224609375,
0.00125885009765625,
0.01357269287109375,
-0.0216064453125,
0.0026454925537109375,
-0.0201416015625,
0.020416259765625,
-0.015869140625,
0.0004630088806152344,
-0.0135650634765625,
0.0283660888671875,
-0.0076751708984375,
-0.0296478271484375,
0.000995635986328125,
-0.0435791015625,
0.00287628173828125,
0.01442718505859375,
0.036712646484375,
-0.00586700439453125,
-0.0224456787109375,
-0.052520751953125,
-0.01410675048828125,
-0.0206756591796875,
0.004680633544921875,
-0.026458740234375,
-0.0159454345703125,
0.0465087890625,
0.00920867919921875,
-0.019317626953125,
-0.0260772705078125,
0.050018310546875,
0.01505279541015625,
-0.07464599609375,
0.0599365234375,
-0.007564544677734375,
0.08941650390625,
0.035003662109375,
-0.0016193389892578125,
0.0230560302734375,
-0.0127410888671875,
-0.009429931640625,
-0.0014190673828125,
0.0341796875,
-0.0325927734375,
-0.046722412109375,
-0.03985595703125,
-0.003482818603515625,
0.0032215118408203125,
0.0073089599609375,
-0.0205535888671875,
0.0256195068359375,
0.01110076904296875,
0.0048675537109375,
0.0004055500030517578,
-0.01183319091796875,
0.0168609619140625,
-0.0190887451171875,
-0.0215911865234375,
0.0182037353515625,
-0.0217132568359375,
-0.008392333984375,
-0.006381988525390625,
-0.0166015625,
0.051300048828125,
-0.0283966064453125,
0.030242919921875,
0.01849365234375,
0.036102294921875,
0.054229736328125,
-0.0260162353515625,
0.036407470703125,
0.0035190582275390625,
0.055877685546875,
-0.0125885009765625,
-0.01885986328125,
-0.033233642578125,
-0.00804901123046875,
0.01151275634765625,
-0.094482421875,
0.048309326171875,
0.0293426513671875,
0.0241851806640625,
-0.0389404296875,
-0.018096923828125,
-0.01262664794921875,
-0.0082244873046875,
0.00501251220703125,
0.03955078125,
0.041229248046875,
0.042999267578125,
-0.0089111328125,
-0.048370361328125,
0.101806640625,
0.0079345703125,
0.0188446044921875,
-0.05548095703125,
0.0095977783203125,
-0.01461029052734375,
0.00353240966796875,
-0.03338623046875,
0.0386962890625,
-0.08203125,
-0.0003383159637451172,
0.0219879150390625,
0.01007843017578125,
0.020904541015625,
-0.01006317138671875,
-0.018402099609375,
0.02459716796875,
0.01424407958984375,
-0.0189666748046875,
-0.0177459716796875,
0.025360107421875,
0.032958984375,
0.0188751220703125,
0.0158233642578125,
-0.045745849609375,
0.0328369140625,
0.02142333984375,
0.00121307373046875,
-0.00661468505859375,
0.07177734375,
-0.009796142578125,
-0.00649261474609375,
-0.00911712646484375,
-0.0239410400390625,
-0.00872802734375,
0.0308074951171875,
0.00995635986328125,
0.0278167724609375,
-0.00001627206802368164,
-0.01177978515625,
0.012420654296875,
0.0146636962890625,
-0.004215240478515625,
0.0135955810546875,
0.0352783203125,
0.039520263671875,
0.0163116455078125,
0.0791015625,
0.01049041748046875,
0.05291748046875,
0.0266265869140625,
0.030426025390625,
0.0309906005859375,
-0.043121337890625,
0.07342529296875,
-0.0440673828125,
0.049560546875,
0.06915283203125,
-0.04278564453125,
0.03704833984375,
0.0171966552734375,
0.014434814453125,
0.0004818439483642578,
-0.0031833648681640625,
-0.00725555419921875,
0.01392364501953125,
-0.050994873046875,
0.0294647216796875,
0.032135009765625,
0.0214691162109375,
0.0278778076171875,
-0.0206451416015625,
0.002742767333984375,
0.039825439453125,
-0.06475830078125,
-0.06439208984375,
0.0246429443359375,
-0.028900146484375,
0.00029659271240234375,
0.0026302337646484375,
-0.0266876220703125,
-0.0305023193359375,
0.022216796875,
-0.01009368896484375,
0.0133056640625,
-0.029144287109375,
-0.036590576171875,
-0.0308837890625,
-0.0587158203125,
0.041015625,
0.0034732818603515625,
0.01540374755859375,
0.01605224609375,
0.0051422119140625,
0.00147247314453125,
-0.040557861328125,
0.00948333740234375,
-0.0005259513854980469,
-0.021240234375,
-0.0019817352294921875,
0.01163482666015625,
-0.0455322265625,
-0.026214599609375,
0.0008988380432128906,
-0.01171875,
-0.004665374755859375,
0.0205535888671875,
-0.01776123046875,
-0.026763916015625,
0.0008764266967773438,
0.03497314453125,
-0.0295867919921875,
-0.00023925304412841797,
-0.0031337738037109375,
0.031951904296875,
-0.0322265625,
-0.0008721351623535156,
0.0018978118896484375,
-0.0252838134765625,
-0.033447265625,
0.01242828369140625,
-0.0185699462890625,
-0.026702880859375,
-0.00951385498046875,
0.0027790069580078125,
0.006977081298828125,
0.02325439453125,
0.00901031494140625,
-0.017364501953125,
-0.0285491943359375,
-0.01364898681640625,
-0.0096893310546875,
0.0187835693359375,
-0.009429931640625,
-0.01343536376953125,
-0.016754150390625,
0.03204345703125,
-0.032623291015625,
0.0170440673828125,
-0.06414794921875,
-0.045318603515625,
0.0712890625,
0.004367828369140625,
-0.005558013916015625,
-0.02374267578125,
-0.03387451171875,
0.0082550048828125,
0.08599853515625,
-0.0034637451171875,
-0.0082244873046875,
-0.01549530029296875,
-0.01218414306640625,
0.007404327392578125,
-0.0207672119140625,
-0.037506103515625,
-0.0131072998046875,
-0.04486083984375,
0.04168701171875,
0.0015764236450195312,
0.0013637542724609375,
-0.040130615234375,
-0.0181884765625,
-0.03631591796875,
-0.0164947509765625,
0.0231170654296875,
0.02838134765625,
0.00763702392578125,
-0.016754150390625,
-0.01425933837890625,
-0.00719451904296875,
-0.0295562744140625,
0.01389312744140625,
-0.01291656494140625,
0.0010766983032226562,
-0.0189361572265625,
0.002643585205078125,
0.04547119140625,
-0.040985107421875,
-0.00749969482421875,
0.019073486328125,
-0.0253143310546875,
0.0030460357666015625,
0.033843994140625,
0.054290771484375,
0.00222015380859375,
-0.0080413818359375,
0.02618408203125,
-0.039947509765625,
-0.0178375244140625,
0.0164642333984375,
0.026397705078125,
0.08355712890625,
-0.0184783935546875,
-0.0235595703125,
-0.004558563232421875,
-0.020477294921875,
-0.026092529296875,
-0.006862640380859375,
-0.0244140625,
0.01462554931640625,
-0.0237274169921875,
-0.0062255859375,
-0.0111541748046875,
-0.042144775390625,
0.0257720947265625,
0.0231170654296875,
-0.02801513671875,
0.007232666015625,
0.00725555419921875,
0.0172119140625,
-0.03167724609375,
-0.045562744140625,
0.03204345703125,
0.064697265625,
-0.0174560546875,
0.03424072265625,
0.0279388427734375,
-0.04925537109375,
0.0675048828125,
0.02978515625,
0.0243988037109375,
-0.038116455078125,
0.0728759765625,
0.00872039794921875,
0.02593994140625,
-0.005825042724609375,
0.0214996337890625,
-0.0193023681640625,
0.0162200927734375,
-0.024566650390625,
0.026885986328125,
-0.00768280029296875,
0.00711822509765625,
0.00553131103515625,
-0.01412200927734375,
-0.0233001708984375,
-0.028045654296875,
-0.00852203369140625,
0.06048583984375,
0.033111572265625,
0.04266357421875,
0.003055572509765625,
0.028564453125,
0.050262451171875,
0.01047515869140625,
0.00713348388671875,
-0.044647216796875,
-0.00763702392578125,
0.029327392578125,
-0.0224456787109375,
-0.0005702972412109375,
0.033416748046875,
-0.01120758056640625,
0.0261077880859375,
0.0245819091796875,
-0.027130126953125,
-0.00948333740234375,
-0.01140594482421875,
0.0033969879150390625,
-0.0238037109375,
0.0025272369384765625,
0.007137298583984375,
0.0236358642578125,
0.01641845703125,
0.01467132568359375,
-0.0036373138427734375,
0.033599853515625,
-0.01367950439453125,
-0.0242919921875,
-0.0189971923828125,
-0.01473236083984375,
0.028778076171875,
0.0076446533203125,
-0.06378173828125,
0.036773681640625,
0.004772186279296875,
-0.01528167724609375,
0.0030536651611328125,
0.00966644287109375,
0.044097900390625,
-0.01456451416015625,
-0.0138702392578125,
-0.0170135498046875,
0.004367828369140625,
-0.0411376953125,
0.006359100341796875,
0.0394287109375,
0.056304931640625,
-0.04180908203125,
-0.057098388671875,
0.01512908935546875,
-0.0428466796875,
-0.0078125,
0.0085906982421875,
-0.00672149658203125,
-0.004299163818359375,
-0.0213470458984375,
0.00164794921875,
0.023834228515625,
0.031768798828125,
-0.0028133392333984375,
-0.007801055908203125,
-0.0187530517578125,
0.0147247314453125,
-0.027984619140625,
-0.00026345252990722656,
0.008880615234375,
-0.0016937255859375,
-0.02947998046875,
-0.01062774658203125,
-0.0017709732055664062,
-0.036895751953125,
-0.03350830078125,
-0.01351165771484375,
-0.0190887451171875,
0.042633056640625,
-0.046630859375,
0.009613037109375,
-0.021514892578125,
0.0321044921875,
-0.0136871337890625,
-0.017181396484375,
0.08892822265625,
0.0811767578125,
-0.059417724609375,
0.024871826171875,
-0.05859375,
0.024566650390625,
0.01464080810546875,
-0.0501708984375,
-0.0268707275390625,
-0.031951904296875,
0.02532958984375,
0.0369873046875,
-0.00603485107421875,
-0.04339599609375,
-0.00830078125,
0.00948333740234375,
0.0149688720703125,
0.062103271484375,
0.0266265869140625,
0.00910186767578125,
-0.01279449462890625,
0.032806396484375,
0.01461029052734375,
0.012176513671875,
0.005695343017578125,
-0.051605224609375,
0.042999267578125,
-0.031280517578125,
-0.05224609375,
-0.0270843505859375,
-0.035186767578125,
-0.0211334228515625,
0.01360321044921875,
-0.0162811279296875,
0.021728515625,
-0.01457977294921875,
-0.004268646240234375,
-0.0160675048828125,
0.0180206298828125,
-0.0215301513671875,
0.00901031494140625,
-0.00046515464782714844,
-0.0193634033203125,
-0.04046630859375,
-0.0231475830078125,
0.02545166015625,
0.0209197998046875,
-0.0068206787109375,
-0.0008878707885742188,
-0.01016998291015625,
0.00012290477752685547,
0.035919189453125,
0.052825927734375,
-0.03277587890625,
0.028717041015625,
0.032379150390625,
-0.01334381103515625,
0.0281829833984375,
0.03466796875,
0.0171051025390625,
-0.00244140625,
0.08660888671875,
0.017059326171875,
-0.0176239013671875,
0.048126220703125,
-0.032928466796875,
0.040740966796875,
0.0732421875,
0.08245849609375,
-0.099609375,
0.0191192626953125,
0.01503753662109375,
-0.0176544189453125,
0.01560211181640625,
-0.00885772705078125,
-0.01064300537109375,
-0.0389404296875,
0.06207275390625,
0.021881103515625,
0.0027008056640625,
0.025054931640625,
-0.000370025634765625,
-0.00931549072265625,
-0.01203155517578125,
0.06378173828125,
0.0200347900390625,
-0.040313720703125,
-0.01558685302734375,
0.025787353515625,
-0.0012149810791015625,
-0.05108642578125,
0.0269012451171875,
-0.0081939697265625,
-0.0002644062042236328,
-0.045928955078125,
0.02984619140625,
0.017242431640625,
0.007068634033203125,
-0.001049041748046875,
-0.0146026611328125,
-0.023223876953125,
0.049163818359375,
-0.04730224609375,
0.037872314453125,
0.0160980224609375,
-0.0277252197265625,
0.025238037109375,
0.01407623291015625,
0.00841522216796875,
0.005229949951171875,
-0.045196533203125,
-0.004024505615234375,
-0.040374755859375,
0.034881591796875,
-0.00150299072265625,
-0.006206512451171875,
0.0645751953125,
-0.01317596435546875,
-0.024871826171875,
0.0027942657470703125,
0.0169525146484375,
-0.00855255126953125,
-0.035064697265625,
0.0229644775390625,
-0.0322265625,
0.031463623046875,
-0.022674560546875,
0.0268096923828125,
-0.00191497802734375,
-0.06591796875,
-0.0933837890625,
0.10369873046875,
0.037567138671875,
0.018402099609375,
-0.0099639892578125,
0.038238525390625,
-0.044525146484375,
-0.003997802734375,
-0.021514892578125,
0.07586669921875,
0.04254150390625,
0.01100921630859375,
-0.0290069580078125,
-0.01390838623046875,
0.0257720947265625,
0.03387451171875,
-0.047882080078125,
-0.016998291015625,
0.01544189453125,
0.01165771484375,
0.03472900390625,
-0.014312744140625,
-0.016021728515625,
0.0158843994140625,
-0.007030487060546875,
0.034637451171875,
0.03472900390625,
-0.062744140625,
0.0259246826171875,
-0.034576416015625,
-0.0107421875,
0.00605010986328125,
-0.007495880126953125,
-0.04327392578125,
0.005542755126953125,
-0.048065185546875,
-0.032470703125,
0.00949859619140625,
-0.011199951171875,
0.032196044921875,
-0.02410888671875,
0.061767578125,
0.0311126708984375,
-0.09515380859375,
-0.0211639404296875,
-0.047515869140625,
0.048583984375,
-0.006793975830078125,
0.0643310546875,
-0.00325775146484375,
0.017364501953125,
0.042236328125,
-0.00946807861328125,
0.033477783203125,
0.0223388671875,
-0.03167724609375,
0.0206146240234375,
-0.00433349609375,
0.02069091796875,
-0.0716552734375,
-0.0592041015625,
0.048828125,
0.057525634765625,
-0.006259918212890625,
0.017181396484375,
0.003185272216796875,
0.01491546630859375,
-0.0007939338684082031,
-0.04449462890625,
0.0148162841796875,
0.00820159912109375,
-0.003314971923828125,
-0.00972747802734375,
-0.036407470703125,
0.003917694091796875,
0.037628173828125,
0.01399993896484375,
0.037261962890625,
0.0051422119140625,
-0.06561279296875,
-0.0361328125,
0.01056671142578125,
0.005584716796875,
0.03228759765625,
0.01055908203125,
0.04962158203125,
-0.0269012451171875,
-0.018341064453125,
0.0075836181640625,
0.002361297607421875,
-0.0215301513671875,
-0.0219573974609375,
-0.0031833648681640625,
-0.0305328369140625,
0.00449371337890625,
0.0216522216796875,
0.010986328125,
0.0032329559326171875,
0.0193023681640625,
0.025482177734375,
-0.0150146484375,
-0.0236968994140625,
0.03277587890625,
-0.01038360595703125,
-0.016387939453125,
-0.0258636474609375,
-0.024078369140625,
0.00946044921875,
-0.019500732421875,
0.010345458984375,
-0.0113677978515625,
0.0419921875,
-0.05316162109375,
0.07928466796875,
-0.0244293212890625,
-0.004138946533203125,
0.0301666259765625,
-0.047576904296875,
0.054473876953125,
-0.034759521484375,
-0.02777099609375,
-0.003658294677734375,
-0.0167083740234375,
-0.04736328125,
0.0306243896484375,
0.045562744140625,
0.013153076171875,
-0.0124664306640625,
0.00733184814453125,
-0.0281982421875,
0.003421783447265625,
0.03948974609375,
-0.00138092041015625,
0.034454345703125,
0.0312347412109375,
0.0133056640625,
-0.04681396484375,
-0.0211334228515625,
-0.0552978515625,
0.0665283203125,
0.032501220703125,
0.0634765625,
-0.018341064453125,
0.048248291015625,
-0.0213470458984375,
0.023956298828125,
-0.0518798828125,
-0.045196533203125,
0.05987548828125,
-0.01282501220703125,
-0.0103912353515625,
-0.021636962890625,
0.005870819091796875,
0.0160675048828125,
0.0267333984375,
-0.0212554931640625,
-0.00797271728515625,
-0.00994873046875,
0.0197906494140625,
0.01308441162109375,
0.024200439453125,
-0.0033817291259765625,
-0.0233154296875,
-0.032257080078125,
0.01503753662109375,
0.01137542724609375,
0.049468994140625,
-0.007495880126953125,
0.016143798828125,
0.05841064453125,
-0.0210113525390625,
0.02001953125,
-0.0249481201171875,
0.048248291015625,
0.03875732421875,
0.0037822723388671875,
-0.0200042724609375,
0.006954193115234375,
-0.0198211669921875,
0.043426513671875,
-0.01511383056640625,
0.03631591796875,
0.0255126953125,
-0.046051025390625,
0.031036376953125,
0.0404052734375,
0.060821533203125,
0.00531005859375,
0.0357666015625,
0.00653839111328125,
-0.004390716552734375,
0.0155029296875,
0.036163330078125,
-0.024871826171875,
-0.0273284912109375,
0.0162200927734375,
0.01715087890625,
0.00447845458984375,
-0.003833770751953125,
-0.05157470703125,
-0.0199432373046875,
0.0228118896484375,
0.00689697265625,
-0.001194000244140625,
-0.05548095703125,
0.0164642333984375,
0.0214691162109375,
0.01497650146484375,
0.0220489501953125,
-0.00823211669921875,
-0.017913818359375,
-0.042266845703125,
-0.0194091796875,
-0.028411865234375,
0.0307464599609375,
-0.0021152496337890625,
0.016021728515625,
0.0171356201171875,
-0.01294708251953125,
-0.006015777587890625,
0.040069580078125,
-0.0032711029052734375,
0.1021728515625,
-0.01267242431640625,
-0.0046844482421875,
0.005451202392578125,
0.01099395751953125,
-0.03680419921875,
-0.04510498046875,
0.02178955078125,
-0.054351806640625,
0.00412750244140625,
0.0241851806640625,
0.001209259033203125,
0.03631591796875,
-0.02764892578125,
-0.09112548828125,
0.0212860107421875,
0.006744384765625,
-0.040008544921875,
0.0535888671875,
-0.0032501220703125,
0.00482940673828125,
-0.06231689453125,
0.0034618377685546875,
0.00350189208984375,
-0.0162353515625,
-0.0211944580078125,
0.01983642578125,
0.0024089813232421875,
0.01568603515625,
0.019134521484375,
-0.0484619140625,
0.01175689697265625,
-0.01776123046875,
-0.0174407958984375,
0.002330780029296875,
-0.01904296875,
0.0289154052734375,
0.0230255126953125,
-0.048858642578125,
-0.0284271240234375,
-0.005634307861328125,
0.005584716796875,
0.02386474609375,
-0.0731201171875,
-0.02020263671875,
-0.031829833984375,
0.01922607421875,
-0.0113372802734375,
0.006717681884765625,
-0.0078582763671875,
-0.013275146484375,
0.016998291015625,
-0.0204315185546875,
-0.01983642578125,
0.022369384765625,
-0.06982421875,
-0.0269622802734375,
-0.01800537109375,
-0.00992584228515625,
0.02996826171875,
-0.03485107421875,
-0.036529541015625,
0.0032672882080078125,
-0.0204620361328125,
0.01251220703125,
-0.0406494140625,
-0.0145111083984375,
0.0218658447265625,
-0.01335906982421875,
0.027008056640625,
-0.035858154296875,
0.030548095703125,
0.0194244384765625,
-0.03759765625,
0.00885772705078125,
0.00539398193359375,
0.0128326416015625,
0.01461029052734375,
0.0285491943359375,
0.0267486572265625,
0.0192413330078125,
-0.012054443359375,
0.0132598876953125,
0.01373291015625,
-0.0099945068359375,
0.01922607421875,
-0.0101470947265625,
0.0263671875,
0.0123443603515625,
-0.0154266357421875,
-0.038360595703125,
0.022216796875,
-0.0040435791015625,
0.01213836669921875,
-0.038848876953125,
0.027069091796875,
0.0158843994140625,
-0.042633056640625,
0.029571533203125,
0.0188140869140625,
0.0902099609375,
-0.0034885406494140625,
0.0228271484375,
-0.032928466796875,
0.041748046875,
0.01000213623046875
]
|
47ea004573376772df95905fb63e4713ca4a6c50 | Wordpress Stackexchange
Q: Thumbnails of same size with different crop Is there any way to generate thumbnails of the same dimensions, but with a different crop?
I want to do something like:
add_image_size( 'thumbnail_top', 360 , 180 , array ('center', 'top') );
add_image_size( 'thumbnail_middle', 360 , 180 , array ('center', 'center') );
add_image_size( 'thumbnail_bottom', 360 , 180 , array ('center', 'bottom') );
but there is nothing in the filename to define the crop, so the thumbnail file always gets overwritten with the last in the list of the same size, therefore in this example, 'thumbnail_top' will always display as 'thumbnail_bottom'.
A: You can define your own cropping sizes but you can create a function that accepts image size + image position and then load your images accordingly.
For example-
<?php
$size = 'medium';
$pos = array(
'top' => '100',
'left' => '100'
);
function load_image_with_pos( $img_id, $size, $pos ) {
$img_src = wp_get_attachment_image_src( $img_id, $size );
$new_img = array(
'url' => $img_src,
'size' => $size,
'position' => $pos
);
return $new_img;
}
?>
I hope it helps
| Q: Thumbnails of same size with different crop Is there any way to generate thumbnails of the same dimensions, but with a different crop?
I want to do something like:
add_image_size( 'thumbnail_top', 360 , 180 , array ('center', 'top') );
add_image_size( 'thumbnail_middle', 360 , 180 , array ('center', 'center') );
add_image_size( 'thumbnail_bottom', 360 , 180 , array ('center', 'bottom') );
but there is nothing in the filename to define the crop, so the thumbnail file always gets overwritten with the last in the list of the same size, therefore in this example, 'thumbnail_top' will always display as 'thumbnail_bottom'.
A: You can define your own cropping sizes but you can create a function that accepts image size + image position and then load your images accordingly.
For example-
<?php
$size = 'medium';
$pos = array(
'top' => '100',
'left' => '100'
);
function load_image_with_pos( $img_id, $size, $pos ) {
$img_src = wp_get_attachment_image_src( $img_id, $size );
$new_img = array(
'url' => $img_src,
'size' => $size,
'position' => $pos
);
return $new_img;
}
?>
I hope it helps
| wordpress | {
"language": "en",
"length": 175,
"provenance": "stackexchange_00019.jsonl.gz:455482",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188087"
} | [
0.0538330078125,
-0.007205963134765625,
0.037567138671875,
-0.01389312744140625,
-0.0001195669174194336,
-0.01045989990234375,
0.048248291015625,
-0.04150390625,
0.03973388671875,
-0.008514404296875,
-0.05035400390625,
0.004581451416015625,
-0.0281219482421875,
-0.0034008026123046875,
-0.029937744140625,
-0.026153564453125,
0.0675048828125,
-0.033721923828125,
0.033905029296875,
0.01061248779296875,
0.0010547637939453125,
0.0682373046875,
0.0110626220703125,
0.1025390625,
-0.01351165771484375,
0.00344085693359375,
0.051605224609375,
4.172325134277344e-7,
-0.036956787109375,
-0.0200347900390625,
-0.0126800537109375,
0.0279541015625,
0.0207977294921875,
0.02545166015625,
-0.0236663818359375,
0.017730712890625,
0.032684326171875,
-0.0217742919921875,
-0.0106048583984375,
0.0478515625,
0.03582763671875,
-0.019775390625,
0.01678466796875,
-0.0023860931396484375,
-0.0169830322265625,
-0.0280303955078125,
0.041839599609375,
-0.01013946533203125,
0.0029125213623046875,
0.027679443359375,
0.03460693359375,
-0.03277587890625,
0.038421630859375,
-0.0022792816162109375,
-0.011138916015625,
0.010833740234375,
-0.039276123046875,
0.09161376953125,
0.018768310546875,
-0.0110321044921875,
-0.0306396484375,
0.03460693359375,
0.01374053955078125,
0.01174163818359375,
-0.02252197265625,
-0.0103912353515625,
-0.005069732666015625,
-0.00315093994140625,
-0.0288238525390625,
-0.0162353515625,
0.039947509765625,
-0.006984710693359375,
-0.02667236328125,
-0.0203704833984375,
-0.0156402587890625,
0.05963134765625,
-0.02337646484375,
-0.0006818771362304688,
0.015838623046875,
-0.00312042236328125,
-0.0012445449829101562,
-0.01067352294921875,
-0.03497314453125,
-0.01416015625,
0.0361328125,
0.03131103515625,
-0.0143280029296875,
-0.016265869140625,
-0.0119476318359375,
0.00885772705078125,
-0.01383209228515625,
-0.037384033203125,
-0.007503509521484375,
0.030914306640625,
-0.00015723705291748047,
-0.033233642578125,
0.0010442733764648438,
0.022247314453125,
-0.0229644775390625,
0.0023441314697265625,
0.006061553955078125,
-0.035491943359375,
0.0271148681640625,
-0.04144287109375,
0.0013647079467773438,
0.0299224853515625,
0.003376007080078125,
-0.033935546875,
0.02337646484375,
0.03448486328125,
0.00013327598571777344,
0.06597900390625,
-0.00335693359375,
-0.00644683837890625,
-0.005886077880859375,
0.021728515625,
-0.025177001953125,
0.024078369140625,
-0.003063201904296875,
0.0250244140625,
-0.0081787109375,
0.0129852294921875,
0.0347900390625,
-0.0168914794921875,
0.03082275390625,
0.0333251953125,
-0.0161895751953125,
-0.0576171875,
-0.02264404296875,
-0.00638580322265625,
-0.0303955078125,
0.0309295654296875,
0.05548095703125,
0.0285186767578125,
0.01128387451171875,
-0.0022068023681640625,
-0.03533935546875,
-0.06207275390625,
-0.035736083984375,
0.0423583984375,
-0.04840087890625,
-0.025909423828125,
0.058013916015625,
-0.037017822265625,
0.0008978843688964844,
0.0025539398193359375,
0.00011277198791503906,
0.03851318359375,
0.01422119140625,
-0.04107666015625,
0.033294677734375,
-0.034210205078125,
0.0228271484375,
0.0287017822265625,
-0.0115966796875,
0.00577545166015625,
0.05828857421875,
-0.0276031494140625,
-0.0264739990234375,
-0.0643310546875,
0.016815185546875,
-0.0122528076171875,
-0.036224365234375,
-0.0467529296875,
-0.05450439453125,
0.0115966796875,
-0.0247955322265625,
0.0037841796875,
0.0167388916015625,
0.0071258544921875,
0.019012451171875,
0.0345458984375,
0.0204620361328125,
0.025146484375,
0.00847625732421875,
0.002910614013671875,
0.0060272216796875,
-0.0361328125,
0.028717041015625,
0.03582763671875,
-0.024932861328125,
-0.032257080078125,
0.017486572265625,
-0.0203094482421875,
-0.011871337890625,
-0.030029296875,
-0.0024547576904296875,
-0.0142364501953125,
0.036163330078125,
0.019195556640625,
0.00876617431640625,
0.0005559921264648438,
-0.0390625,
0.052001953125,
-0.0117034912109375,
-0.00775909423828125,
-0.018341064453125,
0.01078033447265625,
-0.0130767822265625,
-0.025634765625,
0.048095703125,
0.0282745361328125,
-0.004657745361328125,
0.01165771484375,
-0.0316162109375,
0.035736083984375,
-0.0240936279296875,
0.0284576416015625,
-0.03570556640625,
0.035552978515625,
0.0035724639892578125,
0.0013446807861328125,
-0.02490234375,
0.0174102783203125,
0.0246124267578125,
0.0183258056640625,
0.00782012939453125,
-0.008544921875,
0.00439453125,
0.029937744140625,
-0.03558349609375,
0.013153076171875,
-0.02911376953125,
0.01354217529296875,
0.0496826171875,
-0.0001188516616821289,
-0.02374267578125,
-0.0273284912109375,
0.026947021484375,
-0.00307464599609375,
-0.04583740234375,
0.0645751953125,
-0.0160675048828125,
0.00504302978515625,
-0.00974273681640625,
0.002124786376953125,
-0.015777587890625,
-0.056640625,
0.00452423095703125,
0.0426025390625,
0.033660888671875,
0.035919189453125,
0.013763427734375,
0.0260162353515625,
0.12200927734375,
0.04522705078125,
0.024169921875,
-0.016845703125,
-0.017181396484375,
-0.01557159423828125,
-0.0077972412109375,
-0.024261474609375,
0.0255279541015625,
-0.05902099609375,
-0.023468017578125,
0.03662109375,
-0.0218963623046875,
0.0255584716796875,
-0.0243072509765625,
0.039398193359375,
-0.0149993896484375,
0.0733642578125,
0.05828857421875,
0.006992340087890625,
0.002887725830078125,
0.01094818115234375,
-0.01312255859375,
-0.01340484619140625,
-0.03515625,
0.03619384765625,
0.0302886962890625,
-0.035400390625,
-0.000118255615234375,
0.0015439987182617188,
-0.025909423828125,
0.003513336181640625,
-0.010284423828125,
0.0296173095703125,
-0.0164794921875,
-0.02581787109375,
-0.0277099609375,
0.0006389617919921875,
-0.0794677734375,
-0.0037994384765625,
-0.006256103515625,
-0.03546142578125,
-0.0189208984375,
0.01355743408203125,
0.01053619384765625,
-0.005748748779296875,
-0.006008148193359375,
0.046356201171875,
-0.004241943359375,
0.043060302734375,
-0.002899169921875,
0.003360748291015625,
-0.005321502685546875,
-0.044281005859375,
0.045379638671875,
-0.0357666015625,
0.07427978515625,
0.0794677734375,
-0.02911376953125,
0.0343017578125,
-0.00957489013671875,
-0.01428985595703125,
-0.02447509765625,
0.005123138427734375,
-0.0169525146484375,
-0.004009246826171875,
-0.0465087890625,
0.0160369873046875,
0.00992584228515625,
0.055267333984375,
-0.005970001220703125,
-0.0201568603515625,
0.0258636474609375,
0.0413818359375,
0.0182952880859375,
0.00844573974609375,
0.036376953125,
-0.062164306640625,
-0.00745391845703125,
-0.00693511962890625,
-0.03375244140625,
-0.0225982666015625,
0.00995635986328125,
-0.00905609130859375,
0.007259368896484375,
0.00307464599609375,
-0.035614013671875,
-0.014068603515625,
-0.0452880859375,
0.005977630615234375,
-0.003757476806640625,
0.0121307373046875,
0.0022792816162109375,
-0.021331787109375,
-0.007755279541015625,
-0.0083465576171875,
0.011810302734375,
0.10223388671875,
0.021881103515625,
-0.0220947265625,
-0.00823974609375,
-0.002727508544921875,
-0.0082244873046875,
-0.01190185546875,
0.0263824462890625,
0.036712646484375,
-0.0345458984375,
0.0120697021484375,
-0.047149658203125,
-0.04486083984375,
-0.0298614501953125,
0.0391845703125,
0.053192138671875,
-0.033538818359375,
0.0204925537109375,
-0.048919677734375,
-0.018951416015625,
-0.0289154052734375,
-0.05853271484375,
0.0186004638671875,
0.0256500244140625,
0.01812744140625,
0.0001894235610961914,
0.010528564453125,
0.0298614501953125,
0.01367950439453125,
-0.0179595947265625,
0.01983642578125,
0.016754150390625,
-0.0135040283203125,
0.00897979736328125,
-0.0240631103515625,
-0.0189971923828125,
-0.0200958251953125,
0.026702880859375,
-0.00978851318359375,
0.030914306640625,
-0.005481719970703125,
0.0166168212890625,
-0.021759033203125,
-0.0238189697265625,
0.046539306640625,
0.0174560546875,
0.036773681640625,
-0.027801513671875,
-0.04229736328125,
-0.00849151611328125,
0.08258056640625,
-0.057464599609375,
-0.03900146484375,
-0.0081024169921875,
0.0276336669921875,
-0.01126861572265625,
-0.050689697265625,
0.004642486572265625,
-0.0196075439453125,
-0.04583740234375,
-0.003566741943359375,
0.004756927490234375,
-0.0226593017578125,
-0.0268402099609375,
0.03955078125,
-0.052154541015625,
-0.0206756591796875,
0.006946563720703125,
0.023193359375,
-0.016387939453125,
0.016571044921875,
-0.0144195556640625,
0.0391845703125,
0.008880615234375,
-0.0341796875,
-0.0745849609375,
-0.01617431640625,
-0.01708984375,
0.060028076171875,
-0.03729248046875,
0.07391357421875,
-0.04241943359375,
0.046112060546875,
-0.06878662109375,
0.032257080078125,
0.0013189315795898438,
0.0645751953125,
0.00458526611328125,
0.006748199462890625,
-0.0032978057861328125,
-0.0179901123046875,
-0.0282440185546875,
-0.07293701171875,
-0.0257720947265625,
-0.038970947265625,
-0.03790283203125,
0.0078277587890625,
-0.039306640625,
0.004383087158203125,
-0.02789306640625,
-0.0243988037109375,
0.024993896484375,
0.032440185546875,
0.00036025047302246094,
-0.004741668701171875,
-0.03887939453125,
-0.0211029052734375,
0.036590576171875,
0.03369140625,
-0.0306396484375,
0.01255035400390625,
0.05462646484375,
0.012481689453125,
-0.032135009765625,
-0.09130859375,
0.007904052734375,
0.0546875,
0.0166473388671875,
0.0238494873046875,
0.0305328369140625,
-0.0280914306640625,
0.0097808837890625,
0.03607177734375,
0.006008148193359375,
-0.0081329345703125,
0.05584716796875,
-0.00974273681640625,
-0.0275726318359375,
0.0289306640625,
-0.013336181640625,
-0.0260467529296875,
0.0274658203125,
-0.01812744140625,
0.0102996826171875,
-0.0335693359375,
0.01971435546875,
0.002727508544921875,
-0.00428009033203125,
-0.02569580078125,
-0.027618408203125,
0.005527496337890625,
-0.0010862350463867188,
0.049102783203125,
0.0279541015625,
-0.00638580322265625,
0.017181396484375,
0.022674560546875,
0.007568359375,
0.002735137939453125,
0.042144775390625,
0.0198974609375,
0.035888671875,
0.0298614501953125,
0.0310211181640625,
-0.04095458984375,
0.0216522216796875,
-0.05413818359375,
0.0229034423828125,
-0.00696563720703125,
-0.039306640625,
0.0244140625,
-0.003849029541015625,
-0.027618408203125,
-0.041412353515625,
0.0321044921875,
0.036773681640625,
0.005382537841796875,
-0.00942230224609375,
-0.0309295654296875,
-0.0003325939178466797,
-0.041778564453125,
0.0152130126953125,
0.0162506103515625,
-0.0220794677734375,
0.07623291015625,
-0.0162506103515625,
0.0007495880126953125,
0.035400390625,
-0.0196990966796875,
0.027984619140625,
0.033477783203125,
0.0047760009765625,
0.00838470458984375,
0.041595458984375,
-0.0245361328125,
0.0164337158203125,
0.01806640625,
-0.0214996337890625,
0.019622802734375,
0.01776123046875,
0.041259765625,
-0.03302001953125,
-0.041290283203125,
0.0313720703125,
-0.038116455078125,
0.00037479400634765625,
-0.006267547607421875,
-0.047454833984375,
-0.03857421875,
-0.00994873046875,
0.0266265869140625,
0.059173583984375,
-0.025146484375,
-0.0300445556640625,
-0.0128021240234375,
-0.0355224609375,
0.01056671142578125,
0.02593994140625,
-0.0276336669921875,
0.031768798828125,
0.018310546875,
-0.024078369140625,
-0.0242767333984375,
-0.037994384765625,
0.046478271484375,
0.00505828857421875,
-0.0245208740234375,
-0.040069580078125,
0.05047607421875,
-0.0013494491577148438,
0.048858642578125,
-0.02569580078125,
-0.0243072509765625,
-0.017913818359375,
-0.0018930435180664062,
0.0386962890625,
0.015380859375,
-0.031646728515625,
-0.00848388671875,
-0.06109619140625,
-0.0261993408203125,
0.03125,
0.0100860595703125,
-0.0126800537109375,
-0.00910186767578125,
-0.01849365234375,
0.027099609375,
-0.031036376953125,
-0.0155487060546875,
0.006893157958984375,
-0.01227569580078125,
-0.019500732421875,
0.0079803466796875,
-0.0102996826171875,
0.01389312744140625,
0.022308349609375,
0.01922607421875,
-0.005840301513671875,
-0.00015211105346679688,
-0.0223236083984375,
-0.001949310302734375,
-0.031402587890625,
-0.040313720703125,
0.02142333984375,
0.025054931640625,
0.004451751708984375,
0.01195526123046875,
0.04559326171875,
0.018585205078125,
-0.0026798248291015625,
-0.0261077880859375,
-0.01399993896484375,
-0.02435302734375,
0.04974365234375,
-0.00820159912109375,
0.00919342041015625,
-0.00653076171875,
-0.038421630859375,
0.03277587890625,
-0.00101470947265625,
0.038787841796875,
-0.0168304443359375,
-0.07098388671875,
0.00814056396484375,
0.0574951171875,
0.006778717041015625,
-0.0003838539123535156,
0.0633544921875,
-0.0179901123046875,
0.04937744140625,
0.03814697265625,
0.01885986328125,
0.074951171875,
0.008758544921875,
0.0283355712890625,
0.0274505615234375,
0.073486328125,
0.00438690185546875,
0.007293701171875,
0.0287017822265625,
-0.029937744140625,
0.01727294921875,
-0.0204315185546875,
0.003814697265625,
-0.01067352294921875,
0.03106689453125,
-0.00931549072265625,
-0.02471923828125,
0.0250091552734375,
0.00391387939453125,
0.0193939208984375,
0.0117034912109375,
0.02923583984375,
-0.01367950439453125,
-0.016876220703125,
-0.006092071533203125,
-0.0182952880859375,
-0.00507354736328125,
-0.0203094482421875,
-0.05694580078125,
-0.0010223388671875,
-0.046661376953125,
0.0020046234130859375,
0.0361328125,
-0.019989013671875,
-0.0172271728515625,
0.0082550048828125,
-0.036407470703125,
0.01763916015625,
-0.0205230712890625,
-0.0011281967163085938,
-0.0614013671875,
0.01032257080078125,
-0.01001739501953125,
0.036895751953125,
0.05535888671875,
0.019989013671875,
0.0321044921875,
-0.033966064453125,
0.00696563720703125,
-0.0287017822265625,
0.058563232421875,
0.00890350341796875,
-0.006740570068359375,
-0.0022430419921875,
-0.037933349609375,
-0.01806640625,
-0.044525146484375,
0.054473876953125,
-0.003753662109375,
-0.01062774658203125,
0.0340576171875,
-0.0269317626953125,
-0.00991058349609375,
0.01107025146484375,
0.028472900390625,
0.00714874267578125,
0.00972747802734375,
0.041259765625,
-0.07080078125,
-0.04736328125,
0.02813720703125,
-0.03790283203125,
0.007434844970703125,
-0.0095367431640625,
-0.037933349609375,
0.0655517578125,
-0.0008153915405273438,
0.015960693359375,
0.018035888671875,
0.01369476318359375,
-0.019256591796875,
0.002414703369140625,
0.01052093505859375,
-0.00811004638671875,
-0.042022705078125,
-0.0026531219482421875,
-0.01186370849609375,
0.023193359375,
-0.00342559814453125,
0.0195770263671875,
0.048553466796875,
0.0027370452880859375,
-0.06793212890625,
0.01904296875,
0.125,
0.08013916015625,
0.049560546875,
0.025909423828125,
0.0036869049072265625,
-0.02947998046875,
0.047698974609375,
-0.01335906982421875,
0.0246734619140625,
0.00873565673828125,
0.004032135009765625,
0.022796630859375,
0.005157470703125,
0.01032257080078125,
0.0261383056640625,
0.0201416015625,
-0.07098388671875,
0.0266876220703125,
0.052459716796875,
-0.0256195068359375,
0.069580078125,
-0.0005803108215332031,
0.054412841796875,
-0.0005397796630859375,
-0.04058837890625,
0.0182342529296875,
0.04583740234375,
0.0220947265625,
0.0147857666015625,
0.0093841552734375,
0.0017099380493164062,
0.083984375,
0.0075836181640625,
0.007781982421875,
0.045196533203125,
0.008087158203125,
-0.023223876953125,
0.04351806640625,
0.0194091796875,
-0.001087188720703125,
-0.005615234375,
0.0562744140625,
0.0107879638671875,
-0.0197906494140625,
-0.01184844970703125,
-0.002880096435546875,
0.0129852294921875,
0.027740478515625,
-0.01157379150390625,
0.0535888671875,
-0.07318115234375,
-0.0621337890625,
-0.043701171875,
-0.005146026611328125,
0.042327880859375,
0.03961181640625,
0.0174407958984375,
0.0133209228515625,
-0.073486328125,
-0.031524658203125,
-0.0193328857421875,
-0.014556884765625,
0.033935546875,
0.0256195068359375,
-0.01043701171875,
0.04473876953125,
0.0174713134765625,
0.0024051666259765625,
-0.01076507568359375,
0.043609619140625,
-0.01033782958984375,
-0.0003108978271484375,
-0.0200958251953125,
-0.02313232421875,
-0.0136260986328125,
0.0273895263671875,
0.0013370513916015625,
0.0035114288330078125,
0.0499267578125,
0.011322021484375,
-0.06744384765625,
-0.01105499267578125,
0.00543975830078125,
-0.0484619140625,
-0.0025424957275390625,
-0.0183563232421875,
0.0006003379821777344,
0.04937744140625,
-0.0035076141357421875,
-0.00867462158203125,
-0.0149688720703125,
0.0633544921875,
-0.03326416015625,
0.0252685546875,
-0.0123138427734375,
-0.039337158203125,
0.010009765625,
-0.022613525390625,
0.07257080078125,
-0.0170440673828125,
-0.055877685546875,
-0.0016126632690429688,
-0.04595947265625,
-0.004970550537109375,
0.02545166015625,
0.0282135009765625,
-0.01142120361328125,
0.03558349609375,
0.0246429443359375,
-0.00943756103515625,
-0.01349639892578125,
-0.0012063980102539062,
0.0208740234375,
-0.0282135009765625,
0.006885528564453125,
-0.0038928985595703125,
-0.0665283203125,
-0.036895751953125,
-0.0170745849609375,
0.033233642578125,
0.01861572265625,
0.044769287109375,
0.0038433074951171875,
0.016754150390625,
0.01171875,
0.00859832763671875,
-0.00005990266799926758,
-0.0238189697265625,
0.06695556640625,
-0.0170135498046875,
-0.0279083251953125,
-0.0255126953125,
0.027252197265625,
-0.0156707763671875,
0.03460693359375,
-0.033782958984375,
-0.0472412109375,
-0.03094482421875,
0.038665771484375,
0.02508544921875,
0.006206512451171875,
-0.04412841796875,
-0.031768798828125,
-0.034332275390625,
-0.011688232421875,
0.0013456344604492188,
-0.00860595703125,
0.0085601806640625,
0.04156494140625,
0.0379638671875,
0.0153350830078125,
0.0287322998046875,
-0.0073394775390625,
0.053924560546875,
0.038909912109375,
-0.02325439453125,
-0.062225341796875,
-0.005741119384765625,
-0.00795745849609375,
-0.0325927734375,
0.0172882080078125,
0.05059814453125,
-0.0172119140625,
-0.00801849365234375,
0.052276611328125,
0.033111572265625,
0.032928466796875,
-0.0584716796875,
-0.01345062255859375,
0.061279296875,
0.00276947021484375,
-0.01383209228515625,
-0.01517486572265625,
-0.0095367431640625,
-0.025360107421875,
-0.003147125244140625,
0.0081634521484375,
0.0106201171875,
0.0173797607421875,
0.0305023193359375,
-0.0059661865234375,
0.013519287109375,
0.035003662109375,
-0.0693359375,
0.055206298828125,
0.010833740234375,
-0.01806640625,
0.0009198188781738281,
-0.055938720703125,
0.003139495849609375,
0.0009646415710449219,
0.00037169456481933594,
-0.043609619140625,
-0.02459716796875,
0.04534912109375,
-0.00399017333984375,
0.0352783203125,
0.038299560546875,
-0.0269775390625,
-0.031982421875,
0.050384521484375,
0.0283966064453125,
0.09307861328125,
-0.0302581787109375,
-0.042327880859375,
-0.018829345703125,
0.0123138427734375,
0.008819580078125,
-0.03851318359375,
-0.004947662353515625,
-0.05499267578125,
0.000025987625122070312,
-0.0357666015625,
0.004150390625,
-0.0160369873046875,
-0.040618896484375,
-0.055145263671875,
0.0297088623046875,
-0.001781463623046875,
-0.0241241455078125,
0.0026721954345703125,
-0.0077056884765625,
-0.0054779052734375,
0.0225372314453125,
0.0146331787109375,
-0.004215240478515625,
-0.0188446044921875,
0.00731658935546875,
-0.00681304931640625,
-0.031005859375,
0.047149658203125,
-0.0302886962890625,
-0.0221099853515625,
0.007305145263671875,
0.032684326171875,
-0.04315185546875,
0.0123748779296875,
-0.01453399658203125,
0.046661376953125,
0.059783935546875,
0.01047515869140625,
-0.0159912109375,
0.00812530517578125,
-0.06744384765625,
-0.01849365234375,
-0.0262451171875,
-0.028594970703125,
0.0103302001953125,
0.084716796875,
0.06610107421875,
0.0193634033203125,
-0.06201171875,
-0.00299835205078125,
0.0083465576171875,
-0.0210418701171875,
-0.022308349609375,
0.0177764892578125,
-0.074462890625,
-0.030517578125,
-0.0194244384765625,
0.00013768672943115234,
0.002773284912109375,
-0.0153656005859375,
-0.03692626953125,
-0.0185699462890625,
-0.0247650146484375,
0.0015888214111328125,
-0.05902099609375,
0.058380126953125,
0.053375244140625,
-0.0430908203125,
-0.006305694580078125,
-0.042999267578125,
0.0030689239501953125,
0.018157958984375,
-0.08740234375,
0.001873016357421875,
0.038055419921875,
-0.0154266357421875,
-0.004058837890625,
0.01235198974609375,
-0.00604248046875,
-0.0007162094116210938,
0.01157379150390625,
-0.015869140625,
0.00728607177734375,
0.016693115234375,
0.0156097412109375,
0.00036025047302246094,
0.01215362548828125,
0.02142333984375,
-0.024444580078125,
0.0094451904296875,
-0.0157012939453125,
-0.018402099609375,
0.0292205810546875,
0.0087432861328125,
-0.0276641845703125,
0.019989013671875,
-0.014495849609375,
0.0184326171875,
-0.020477294921875,
-0.020416259765625,
-0.026092529296875,
0.00896453857421875,
0.00988006591796875,
-0.035797119140625,
0.0237884521484375
]
|
8e332212c06b955648c508e933833612f3e03967 | Wordpress Stackexchange
Q: How do I serve static content on same domain as WordPress I have a portfolio site that I would also like to make a demo site for some of my client work. Basically, I would like to serve a subfolder statically along side the WordPress install. For instance, if I have http://example.com/demo/subfolder/index.html that index file would be served directly from Apache rather than WordPress. I have root access to my server, just not sure how to implement this
A: If the files are static HTML, then you only need to be concerned with name collisions for the directory structure. And if you don't have anything in WordPress that generates /demo/subfolder/ you don't have to worry about ignoring it - it's already ignored.
I have a sandbox folder that I use for a similar purpose as you and haven't had to implement anything - It's ignored by WordPress already.
| Q: How do I serve static content on same domain as WordPress I have a portfolio site that I would also like to make a demo site for some of my client work. Basically, I would like to serve a subfolder statically along side the WordPress install. For instance, if I have http://example.com/demo/subfolder/index.html that index file would be served directly from Apache rather than WordPress. I have root access to my server, just not sure how to implement this
A: If the files are static HTML, then you only need to be concerned with name collisions for the directory structure. And if you don't have anything in WordPress that generates /demo/subfolder/ you don't have to worry about ignoring it - it's already ignored.
I have a sandbox folder that I use for a similar purpose as you and haven't had to implement anything - It's ignored by WordPress already.
A: For anyone with the same question, you can use my plugin available at Wordpress repository: WP Custom HTML Pages
It allows you to serve static HTML pages at custom URI of your choice.
1) Install and activate the plugin
2) Use the new submenu item (Pages->HTML Pages) to create a new HTML page
3) In "Page Permalink" field enter the custom URI you wish to assign to your page, for example /my-html-page (at the time of writing this answer, it is required that the value you enter starts with "/" character) and in "HTML Page Code" field enter all the HTML and CSS of the page document that you wish to display
4) Click "Publish" then go to yourwebsite.com/my-html-page and you should see your static HTML page, providing its status is set to "published"
By creating and linking several pages you may have a whole static website.
A: You can request WordPress to ignore the subdirectory structure by adding these rules in .htaccess. Add them within <Ifmodule mod_rewrite.c> But generally if there is no page such as demo, WordPress ignores it and the static page is rendered.
RewriteCond %{REQUEST_URI} ^/Demo_directory/(.*)$
| wordpress | {
"language": "en",
"length": 340,
"provenance": "stackexchange_00019.jsonl.gz:455491",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188120"
} | [
0.06805419921875,
0.004253387451171875,
-0.01274871826171875,
-0.044952392578125,
0.0177764892578125,
-0.04656982421875,
0.0222625732421875,
-0.035980224609375,
0.0008792877197265625,
-0.010528564453125,
-0.0282440185546875,
-0.004970550537109375,
-0.00627899169921875,
-0.036346435546875,
0.033233642578125,
-0.02508544921875,
0.0213470458984375,
0.0142822265625,
0.05426025390625,
-0.006816864013671875,
0.00815582275390625,
0.0135650634765625,
0.03289794921875,
0.0283660888671875,
0.01708984375,
-0.0439453125,
0.056488037109375,
-0.0178680419921875,
0.006046295166015625,
-0.03424072265625,
0.01702880859375,
0.0168914794921875,
-0.00194549560546875,
0.040008544921875,
-0.0130767822265625,
0.007354736328125,
0.019622802734375,
0.023651123046875,
0.0341796875,
0.0227203369140625,
0.032806396484375,
-0.01367950439453125,
0.0272216796875,
0.0101470947265625,
0.0114593505859375,
-0.07269287109375,
0.059539794921875,
-0.0457763671875,
0.0061187744140625,
0.0005578994750976562,
0.01519012451171875,
0.01146697998046875,
0.03387451171875,
-0.015411376953125,
-0.0180511474609375,
-0.017578125,
0.0511474609375,
0.01045989990234375,
0.031768798828125,
-0.0465087890625,
-0.053466796875,
0.0227508544921875,
0.022308349609375,
0.00980377197265625,
-0.0008549690246582031,
-0.0015535354614257812,
-0.0270843505859375,
0.0303802490234375,
-0.07098388671875,
-0.007030487060546875,
0.04345703125,
-0.059234619140625,
-0.004314422607421875,
-0.0438232421875,
0.018890380859375,
0.052490234375,
-0.0300750732421875,
0.0084075927734375,
0.0250244140625,
0.0017957687377929688,
-0.0005002021789550781,
0.00563812255859375,
-0.065185546875,
-0.06768798828125,
0.03533935546875,
-0.0237274169921875,
-0.0096893310546875,
-0.0032253265380859375,
-0.00222015380859375,
-0.0193634033203125,
-0.0272216796875,
0.00420379638671875,
0.034393310546875,
0.0020618438720703125,
-0.05584716796875,
-0.0019369125366210938,
0.00986480712890625,
0.05267333984375,
0.00023496150970458984,
-0.0031871795654296875,
0.0223236083984375,
-0.04962158203125,
0.00439453125,
-0.03485107421875,
-0.021453857421875,
0.0240631103515625,
0.0301971435546875,
-0.00439453125,
0.0029296875,
0.01276397705078125,
-0.0180206298828125,
0.01273345947265625,
0.008758544921875,
-0.042083740234375,
-0.026580810546875,
0.0438232421875,
0.0221710205078125,
-0.027679443359375,
0.01160430908203125,
-0.0213470458984375,
0.01511383056640625,
0.05426025390625,
0.0129241943359375,
-0.0362548828125,
0.021575927734375,
0.024322509765625,
-0.00905609130859375,
-0.0650634765625,
0.00865936279296875,
-0.0110015869140625,
-0.0188140869140625,
0.02008056640625,
0.049560546875,
0.049560546875,
0.001110076904296875,
0.011077880859375,
0.03546142578125,
0.003993988037109375,
-0.01485443115234375,
0.0278778076171875,
-0.02056884765625,
-0.05047607421875,
-0.013092041015625,
-0.0221710205078125,
0.008331298828125,
0.053802490234375,
0.02471923828125,
-0.006893157958984375,
-0.01201629638671875,
-0.050811767578125,
0.00007343292236328125,
-0.0423583984375,
0.04168701171875,
-0.0143280029296875,
0.006275177001953125,
-0.054931640625,
0.00853729248046875,
-0.043182373046875,
0.01517486572265625,
-0.031890869140625,
-0.012908935546875,
0.0092315673828125,
0.053375244140625,
-0.048095703125,
-0.0435791015625,
-0.0513916015625,
-0.0267486572265625,
-0.0125579833984375,
0.021026611328125,
-0.01555633544921875,
0.027679443359375,
-0.0032444000244140625,
-0.0135040283203125,
-0.005962371826171875,
0.0150909423828125,
0.0172576904296875,
-0.00836944580078125,
0.049560546875,
0.0021915435791015625,
0.048248291015625,
0.0192108154296875,
-0.04278564453125,
0.03460693359375,
0.0020809173583984375,
-0.042816162109375,
0.00922393798828125,
-0.01261138916015625,
0.02093505859375,
0.040618896484375,
0.007488250732421875,
0.00572967529296875,
0.0069122314453125,
-0.031982421875,
0.0222625732421875,
0.0117340087890625,
0.000743865966796875,
-0.024566650390625,
0.0017118453979492188,
-0.002567291259765625,
-0.037353515625,
-0.0224456787109375,
-0.0203399658203125,
0.036285400390625,
0.034637451171875,
0.08050537109375,
-0.031707763671875,
0.0232391357421875,
-0.01116180419921875,
0.0171966552734375,
0.019256591796875,
-0.00044417381286621094,
-0.0140228271484375,
0.00812530517578125,
-0.061248779296875,
-0.056549072265625,
-0.01397705078125,
-0.01593017578125,
0.0187225341796875,
-0.0020198822021484375,
0.0126495361328125,
0.0194091796875,
-0.00592803955078125,
-0.00787353515625,
-0.0172882080078125,
0.0282745361328125,
0.0226287841796875,
-0.023101806640625,
-0.007442474365234375,
0.020050048828125,
0.03204345703125,
-0.06256103515625,
-0.001728057861328125,
0.01702880859375,
0.034149169921875,
-0.01617431640625,
-0.005947113037109375,
-0.0057525634765625,
-0.039520263671875,
0.0027103424072265625,
0.043121337890625,
0.022186279296875,
0.0249176025390625,
-0.018798828125,
-0.013641357421875,
0.041534423828125,
-0.03643798828125,
-0.0112457275390625,
-0.00971221923828125,
-0.0252227783203125,
0.00811767578125,
0.005588531494140625,
0.0059661865234375,
0.0189971923828125,
-0.0498046875,
-0.050537109375,
0.05767822265625,
0.02716064453125,
0.0101470947265625,
-0.024261474609375,
0.0216827392578125,
0.005908966064453125,
0.04833984375,
-0.0411376953125,
0.024505615234375,
-0.02276611328125,
0.04461669921875,
0.01256561279296875,
0.03277587890625,
0.01348114013671875,
-0.001163482666015625,
0.00310516357421875,
-0.035919189453125,
0.0194549560546875,
0.054901123046875,
0.0537109375,
-0.00399017333984375,
-0.0015201568603515625,
-0.0574951171875,
0.064453125,
0.03955078125,
-0.020111083984375,
0.00238800048828125,
-0.0132598876953125,
-0.01485443115234375,
-0.00954437255859375,
-0.027679443359375,
0.01279449462890625,
-0.0037670135498046875,
0.025634765625,
0.037567138671875,
0.037261962890625,
0.0290374755859375,
-0.020111083984375,
0.042266845703125,
0.026397705078125,
-0.0097198486328125,
0.04803466796875,
-0.05194091796875,
0.0301055908203125,
-0.021270751953125,
0.05316162109375,
0.05859375,
0.0200042724609375,
-0.0272979736328125,
0.007213592529296875,
-0.003398895263671875,
0.005176544189453125,
0.0017795562744140625,
-0.0201568603515625,
0.01513671875,
-0.11419677734375,
-0.03997802734375,
0.02825927734375,
-0.0114898681640625,
0.019775390625,
-0.01407623291015625,
-0.00811004638671875,
0.02294921875,
-0.06048583984375,
-0.053131103515625,
0.0328369140625,
-0.02593994140625,
0.002353668212890625,
0.0250701904296875,
-0.026123046875,
-0.046539306640625,
0.06134033203125,
0.00664520263671875,
-0.004791259765625,
-0.033050537109375,
-0.083251953125,
-0.07421875,
-0.1055908203125,
-0.0052032470703125,
-0.0009336471557617188,
0.0177154541015625,
0.032440185546875,
-0.03961181640625,
0.00797271728515625,
-0.034942626953125,
0.04931640625,
0.07452392578125,
-0.008087158203125,
-0.002651214599609375,
0.01517486572265625,
-0.0638427734375,
0.0107269287109375,
-0.0141143798828125,
0.02691650390625,
0.007686614990234375,
0.0029048919677734375,
-0.00272369384765625,
-0.00551605224609375,
-0.033111572265625,
-0.01306915283203125,
0.0013637542724609375,
0.02081298828125,
-0.00551605224609375,
0.004741668701171875,
-0.036376953125,
-0.00917816162109375,
-0.00775146484375,
-0.0345458984375,
-0.038238525390625,
0.022003173828125,
-0.01316070556640625,
-0.024322509765625,
-0.005401611328125,
0.003353118896484375,
0.0040283203125,
0.034027099609375,
-0.015625,
-0.01546478271484375,
-0.0198974609375,
-0.01132965087890625,
-0.030181884765625,
0.0084686279296875,
-0.030181884765625,
0.0283966064453125,
-0.0007696151733398438,
-0.0150604248046875,
-0.0338134765625,
0.032196044921875,
-0.04705810546875,
-0.0214996337890625,
0.044891357421875,
0.00872039794921875,
0.033477783203125,
-0.02093505859375,
-0.034027099609375,
-0.016693115234375,
0.083984375,
-0.08172607421875,
-0.00047588348388671875,
0.01346588134765625,
0.01215362548828125,
0.010040283203125,
-0.03179931640625,
-0.07989501953125,
-0.0272674560546875,
-0.0261077880859375,
-0.00704193115234375,
-0.021392822265625,
-0.006717681884765625,
-0.0178070068359375,
-0.07318115234375,
-0.017669677734375,
-0.0439453125,
0.018951416015625,
-0.042724609375,
0.039306640625,
-0.031036376953125,
0.04327392578125,
-0.0657958984375,
0.004535675048828125,
-0.042449951171875,
-0.0143280029296875,
-0.022552490234375,
0.05328369140625,
0.0168609619140625,
-0.00479888916015625,
-0.0113983154296875,
0.005756378173828125,
0.045135498046875,
-0.01483917236328125,
0.01074981689453125,
0.0202178955078125,
0.0215911865234375,
0.022064208984375,
-0.0007700920104980469,
0.0184478759765625,
-0.025543212890625,
0.0111541748046875,
-0.04510498046875,
-0.0253448486328125,
-0.0182952880859375,
-0.05963134765625,
0.00897979736328125,
-0.051116943359375,
-0.01248931884765625,
-0.0261383056640625,
-0.0089874267578125,
-0.008544921875,
0.007904052734375,
-0.0072021484375,
-0.006740570068359375,
0.0157012939453125,
-0.0010995864868164062,
0.0281829833984375,
0.01885986328125,
-0.0288238525390625,
0.01259613037109375,
0.032012939453125,
0.0211334228515625,
-0.0310821533203125,
0.0002834796905517578,
-0.01715087890625,
0.04736328125,
-0.0031280517578125,
0.0291900634765625,
0.0302734375,
-0.03076171875,
0.0643310546875,
0.027130126953125,
0.01922607421875,
0.0260009765625,
-0.005168914794921875,
-0.006404876708984375,
-0.03839111328125,
0.02044677734375,
0.00638580322265625,
-0.0218353271484375,
0.022186279296875,
-0.004730224609375,
0.0247344970703125,
-0.01506805419921875,
-0.016571044921875,
0.0136260986328125,
-0.0244903564453125,
-0.01198577880859375,
-0.053955078125,
0.0015106201171875,
-0.061767578125,
0.0662841796875,
0.0172119140625,
0.0031261444091796875,
0.07379150390625,
0.1029052734375,
-0.01788330078125,
0.03509521484375,
0.0272064208984375,
0.0276336669921875,
0.0222930908203125,
0.04541015625,
-0.0022296905517578125,
-0.00830841064453125,
-0.024932861328125,
0.07440185546875,
0.0009579658508300781,
-0.043853759765625,
-0.005588531494140625,
-0.0285797119140625,
-0.0012607574462890625,
0.004650115966796875,
-0.0347900390625,
0.01898193359375,
-0.00008815526962280273,
-0.01026153564453125,
0.0201263427734375,
-0.0230865478515625,
-0.02081298828125,
-0.036163330078125,
0.0084075927734375,
-0.011444091796875,
-0.0002491474151611328,
0.0281982421875,
0.061279296875,
-0.0038814544677734375,
0.04583740234375,
-0.024932861328125,
0.03948974609375,
0.048492431640625,
0.040252685546875,
0.0174407958984375,
-0.0226593017578125,
-0.024200439453125,
0.038330078125,
-0.0189208984375,
-0.0230255126953125,
-0.0198211669921875,
0.0142974853515625,
0.04852294921875,
-0.00104522705078125,
0.009185791015625,
-0.0073394775390625,
-0.0110015869140625,
-0.01146697998046875,
0.01522064208984375,
-0.03302001953125,
-0.0142059326171875,
-0.0308380126953125,
-0.0121002197265625,
0.0399169921875,
-0.0036907196044921875,
-0.01241302490234375,
0.0176849365234375,
-0.007282257080078125,
0.02587890625,
0.0175018310546875,
-0.032745361328125,
0.0128326416015625,
0.031646728515625,
0.0159454345703125,
0.0144805908203125,
0.0181884765625,
-0.065185546875,
-0.00902557373046875,
-0.035736083984375,
-0.019012451171875,
0.08148193359375,
-0.0194091796875,
0.03314208984375,
-0.038177490234375,
0.0023670196533203125,
-0.0814208984375,
0.02410888671875,
-0.0142822265625,
0.00421905517578125,
-0.09417724609375,
0.02813720703125,
-0.044525146484375,
-0.0012331008911132812,
0.00787353515625,
-0.0194244384765625,
-0.06854248046875,
-0.0293121337890625,
0.0277099609375,
0.01045989990234375,
-0.0240020751953125,
-0.09564208984375,
-0.046234130859375,
-0.01499176025390625,
0.0673828125,
-0.049957275390625,
-0.0021495819091796875,
0.0244293212890625,
-0.0232391357421875,
0.0248260498046875,
-0.0119171142578125,
-0.01444244384765625,
-0.00122833251953125,
-0.0179901123046875,
0.00824737548828125,
-0.07891845703125,
0.00013375282287597656,
-0.031158447265625,
0.0170440673828125,
0.01995849609375,
-0.0134735107421875,
0.01065826416015625,
-0.0248260498046875,
-0.0230255126953125,
-0.012176513671875,
-0.0303802490234375,
0.0369873046875,
0.0013418197631835938,
0.004146575927734375,
-0.047698974609375,
-0.00696563720703125,
0.0081939697265625,
-0.00945281982421875,
-0.039337158203125,
0.0253753662109375,
0.00897216796875,
0.004177093505859375,
0.0232696533203125,
-0.028045654296875,
0.0267791748046875,
0.08917236328125,
0.024169921875,
0.06597900390625,
0.0021514892578125,
0.01354217529296875,
0.03594970703125,
0.032684326171875,
-0.00026226043701171875,
-0.04888916015625,
0.044189453125,
0.0241241455078125,
-0.012908935546875,
0.0267486572265625,
-0.0270843505859375,
-0.0199737548828125,
0.0572509765625,
0.04241943359375,
-0.0706787109375,
-0.0294189453125,
-0.0074005126953125,
-0.0191650390625,
-0.0269927978515625,
0.0115509033203125,
0.00250244140625,
-0.001689910888671875,
-0.004207611083984375,
0.0179901123046875,
-0.0113677978515625,
0.0128936767578125,
0.01522064208984375,
-0.01336669921875,
0.021026611328125,
0.03387451171875,
0.00658416748046875,
-0.0259552001953125,
-0.0092315673828125,
0.0166778564453125,
0.0021610260009765625,
-0.0296630859375,
-0.0273895263671875,
-0.0015392303466796875,
-0.0252532958984375,
-0.041107177734375,
0.0008807182312011719,
-0.0219268798828125,
0.0184783935546875,
-0.01538848876953125,
-0.000045299530029296875,
0.03070068359375,
0.04400634765625,
-0.0185394287109375,
0.0006275177001953125,
0.0016307830810546875,
0.0239105224609375,
0.04571533203125,
0.0158233642578125,
0.004001617431640625,
-0.0270538330078125,
-0.01194000244140625,
-0.01529693603515625,
-0.04876708984375,
0.015869140625,
0.0005688667297363281,
0.0124969482421875,
0.079833984375,
-0.03204345703125,
-0.0217132568359375,
0.043060302734375,
0.01308441162109375,
-0.019866943359375,
-0.0219268798828125,
0.0306549072265625,
-0.05596923828125,
-0.01434326171875,
0.01201629638671875,
-0.0178680419921875,
-0.01424407958984375,
-0.0264892578125,
-0.053497314453125,
0.057342529296875,
-0.04248046875,
0.039093017578125,
0.03729248046875,
0.0197906494140625,
-0.0185089111328125,
-0.00984954833984375,
-0.001789093017578125,
0.00751495361328125,
-0.02777099609375,
0.0184478759765625,
-0.04180908203125,
-0.0169677734375,
-0.004535675048828125,
0.055267333984375,
0.0193328857421875,
0.0072479248046875,
-0.0283966064453125,
-0.01513671875,
0.00677490234375,
0.0110321044921875,
-0.0095367431640625,
0.04949951171875,
-0.039764404296875,
0.0168304443359375,
-0.0281982421875,
-0.042724609375,
-0.00452423095703125,
0.0037593841552734375,
-0.07763671875,
0.00551605224609375,
0.0261993408203125,
0.012786865234375,
0.024261474609375,
-0.027069091796875,
-0.039337158203125,
0.031005859375,
0.0345458984375,
0.044158935546875,
0.016265869140625,
0.033599853515625,
0.043060302734375,
-0.015380859375,
-0.0095367431640625,
-0.016693115234375,
0.049957275390625,
0.00001996755599975586,
-0.0015649795532226562,
-0.0019483566284179688,
0.011474609375,
0.0237579345703125,
-0.0382080078125,
-0.007419586181640625,
0.001255035400390625,
-0.032470703125,
-0.0017223358154296875,
0.01190185546875,
0.0140380859375,
-0.0433349609375,
-0.0185089111328125,
0.04345703125,
0.01226806640625,
-0.002216339111328125,
-0.031646728515625,
0.0088653564453125,
-0.0135955810546875,
0.005214691162109375,
-0.031036376953125,
-0.023162841796875,
-0.0169219970703125,
0.0006403923034667969,
-0.01337432861328125,
-0.031646728515625,
0.010284423828125,
0.01024627685546875,
0.01445770263671875,
0.063720703125,
-0.00555419921875,
-0.03411865234375,
-0.0011682510375976562,
0.0222320556640625,
0.0288238525390625,
0.0111236572265625,
-0.0380859375,
0.056182861328125,
-0.01514434814453125,
0.007495880126953125,
-0.007411956787109375,
0.052215576171875,
0.00844573974609375,
0.01313018798828125,
-0.052337646484375,
-0.056182861328125,
0.04461669921875,
0.043853759765625,
0.02227783203125,
0.029449462890625,
0.0457763671875,
0.06134033203125,
0.0095062255859375,
-0.01287078857421875,
0.043792724609375,
0.0010433197021484375,
0.02886962890625,
-0.002410888671875,
-0.01181793212890625,
0.0081939697265625,
-0.0194091796875,
-0.0316162109375,
-0.0160064697265625,
0.05047607421875,
-0.022918701171875,
0.02740478515625,
-0.00952911376953125,
-0.020843505859375,
0.02880859375,
-0.045135498046875,
0.0041351318359375,
-0.0128021240234375,
-0.02374267578125,
-0.0095977783203125,
-0.01079559326171875,
0.00763702392578125,
-0.004306793212890625,
0.02496337890625,
0.0015621185302734375,
0.04644775390625,
0.032257080078125,
-0.002788543701171875,
-0.01154327392578125,
-0.0040283203125,
0.0304412841796875,
0.0176239013671875,
0.00978851318359375,
0.04083251953125,
-0.048126220703125,
-0.044342041015625,
-0.02764892578125,
0.0562744140625,
-0.01416778564453125,
0.1265869140625,
-0.0762939453125,
0.021392822265625,
-0.01541900634765625,
0.0134429931640625,
0.00016248226165771484,
-0.01163482666015625,
0.033966064453125,
0.01119232177734375,
-0.003475189208984375,
-0.0275726318359375,
-0.039215087890625,
-0.00225067138671875,
0.00887298583984375,
-0.05426025390625,
0.00572967529296875,
-0.027679443359375,
0.016815185546875,
-0.0084991455078125,
-0.0088043212890625,
-0.0216827392578125,
-0.06842041015625,
-0.0292205810546875,
0.052947998046875,
-0.0137939453125,
0.022216796875,
-0.055206298828125,
0.01068115234375,
-0.0020160675048828125,
-0.0303955078125,
0.0236663818359375,
-0.02593994140625,
0.024627685546875,
0.0273895263671875,
0.004180908203125,
-0.052520751953125,
0.00823974609375,
-0.00611114501953125,
0.0008435249328613281,
-0.00563812255859375,
0.057098388671875,
0.01232147216796875,
-0.044158935546875,
0.002773284912109375,
0.007843017578125,
0.016815185546875,
-0.0217132568359375,
0.005901336669921875,
0.017059326171875,
-0.007144927978515625,
0.01270294189453125,
0.01325225830078125,
-0.034271240234375,
0.0023441314697265625,
-0.00978851318359375,
0.0232086181640625,
-0.0091705322265625,
-0.035247802734375,
-0.09088134765625,
0.0062408447265625,
0.031951904296875,
0.003986358642578125,
-0.044464111328125,
0.022430419921875,
-0.0235595703125,
0.042510986328125,
-0.0029582977294921875,
0.02557373046875,
-0.024261474609375,
-0.0207977294921875,
-0.038604736328125,
-0.02215576171875,
-0.0307769775390625,
0.026458740234375,
-0.01019287109375,
0.03662109375,
0.059112548828125,
-0.0269317626953125,
0.0310516357421875,
0.01163482666015625,
-0.007091522216796875,
0.078857421875,
-0.056365966796875,
0.017333984375,
0.00563812255859375,
0.0224456787109375,
-0.049957275390625,
-0.04217529296875,
0.007965087890625,
0.017364501953125,
-0.027740478515625,
0.0026454925537109375,
0.0024356842041015625,
0.021942138671875,
-0.025787353515625,
-0.03662109375,
0.04327392578125,
0.00972747802734375,
-0.0298614501953125,
-0.051544189453125,
0.00567626953125,
-0.02215576171875,
0.0316162109375,
-0.0178680419921875,
-0.022369384765625,
0.0197296142578125,
0.06402587890625,
0.0171356201171875,
0.031005859375,
-0.0117950439453125,
0.03546142578125,
0.0147705078125,
0.054962158203125,
0.04803466796875,
-0.013916015625,
-0.019927978515625,
0.0026836395263671875,
0.03399658203125,
0.0655517578125,
0.004150390625,
0.01428985595703125,
0.0265960693359375,
-0.043426513671875,
-0.01425933837890625,
-0.049530029296875,
-0.02532958984375,
-0.0360107421875,
0.05010986328125,
0.0321044921875,
0.015869140625,
-0.006317138671875,
0.00363922119140625,
-0.03839111328125,
-0.031463623046875,
-0.010162353515625,
0.023773193359375,
-0.0765380859375,
0.00286102294921875,
0.040863037109375,
-0.004322052001953125,
0.00275421142578125,
-0.003692626953125,
-0.0341796875,
0.0100555419921875,
0.0218505859375,
0.0033817291259765625,
-0.027435302734375,
-0.0215911865234375,
0.0867919921875,
-0.034393310546875,
0.033905029296875,
-0.00662994384765625,
0.0303802490234375,
0.060638427734375,
0.00572967529296875,
0.0399169921875,
0.0189971923828125,
-0.037872314453125,
0.008880615234375,
0.03009033203125,
-0.0146636962890625,
-0.0214996337890625,
-0.037841796875,
-0.0168609619140625,
0.006320953369140625,
0.01454925537109375,
0.0040130615234375,
-0.007595062255859375,
0.0181884765625,
0.004169464111328125,
0.06024169921875,
-0.001995086669921875,
-0.01507568359375,
-0.0092620849609375,
0.041778564453125,
-0.060760498046875,
-0.00506591796875,
-0.0021839141845703125,
-0.07916259765625,
0.01309967041015625,
-0.00901031494140625,
-0.0018777847290039062,
-0.03631591796875,
0.0305023193359375,
0.0050506591796875,
-0.0124664306640625,
0.01538848876953125
]
|
cd97768080339e96a8a321a6690736480ead99fb | Wordpress Stackexchange
Q: Why is wp_is_post_revision always false? I am trying to save a revision of a custom post type. This is what I have to check if the post has a parent:
function save_revision( $post ) {
if ( $post['submitted'] == true ) {
$parent_id = wp_is_post_revision( $post['post_id'] );
...
}
} add_action('init', 'save_revision');
The problem is that I always get false for $parent_id even though I know there is a parent post for that post_id.
Any help is appreciated, I have been trying to get this to work forever.
A: I know this is an old thread, but for future reference - the term "revision" in Wordpress is a little confusing. It's not the updated, or revised, post... but the older version. The most updated version is the "parent."
So, if you're calling the function wp_is_revision_post() on the current version of the post, it will always return false (and wp_get_post_parent_id() will return NULL) since the current post is not considered a "revision." You will need to call it on an actual revision, (which would have a different ID from the current version of the post).
| Q: Why is wp_is_post_revision always false? I am trying to save a revision of a custom post type. This is what I have to check if the post has a parent:
function save_revision( $post ) {
if ( $post['submitted'] == true ) {
$parent_id = wp_is_post_revision( $post['post_id'] );
...
}
} add_action('init', 'save_revision');
The problem is that I always get false for $parent_id even though I know there is a parent post for that post_id.
Any help is appreciated, I have been trying to get this to work forever.
A: I know this is an old thread, but for future reference - the term "revision" in Wordpress is a little confusing. It's not the updated, or revised, post... but the older version. The most updated version is the "parent."
So, if you're calling the function wp_is_revision_post() on the current version of the post, it will always return false (and wp_get_post_parent_id() will return NULL) since the current post is not considered a "revision." You will need to call it on an actual revision, (which would have a different ID from the current version of the post).
A: It is simple: If $post is not a revision, wp_is_post_revision() returns false; just reading the name of the function give you the reason. wp_is_post_revision() returns the parent post ID only if the given post is a revision (a revision has always a parent post). It seems that you want to get the parent post ID of $post, not checking if $post is a revision.
To get the parent post ID of another post use wp_get_post_parent_id():
function save_revision( $post ) {
if ( $post['submitted'] == true ) {
$parent_id = wp_get_post_parent_id( $post['post_id'] );
...
}
}
add_action('init', 'save_revision');
| wordpress | {
"language": "en",
"length": 283,
"provenance": "stackexchange_00019.jsonl.gz:455534",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188267"
} | [
0.0031070709228515625,
-0.00827789306640625,
-0.028045654296875,
-0.02581787109375,
-0.01055908203125,
-0.01371002197265625,
-0.019073486328125,
-0.0182037353515625,
-0.0139312744140625,
0.02276611328125,
-0.04205322265625,
-0.01180267333984375,
-0.012542724609375,
-0.01004791259765625,
-0.027252197265625,
-0.0396728515625,
0.04229736328125,
-0.032806396484375,
0.015289306640625,
-0.01065826416015625,
-0.0202178955078125,
-0.00310516357421875,
0.0487060546875,
0.0222625732421875,
0.05242919921875,
-0.006626129150390625,
0.02301025390625,
-0.027587890625,
0.043304443359375,
-0.013275146484375,
0.033111572265625,
-0.0216064453125,
0.023590087890625,
-0.0179443359375,
0.03594970703125,
-0.007472991943359375,
0.0173187255859375,
-0.01068878173828125,
0.0142822265625,
0.00392913818359375,
0.0249481201171875,
-0.01215362548828125,
-0.0162200927734375,
-0.032745361328125,
-0.039642333984375,
0.0098876953125,
-0.005352020263671875,
0.002040863037109375,
0.0267791748046875,
0.0281524658203125,
-0.01351165771484375,
0.00047850608825683594,
-0.00786590576171875,
0.0182342529296875,
-0.01497650146484375,
-0.0203857421875,
-0.01558685302734375,
0.0236663818359375,
0.04266357421875,
-0.0153961181640625,
-0.05474853515625,
-0.013458251953125,
0.023681640625,
-0.019805908203125,
-0.0006208419799804688,
-0.0015611648559570312,
0.030364990234375,
0.0181121826171875,
-0.061859130859375,
-0.045440673828125,
0.032684326171875,
-0.01345062255859375,
0.012847900390625,
0.0048828125,
-0.005481719970703125,
-0.06353759765625,
0.038848876953125,
-0.0140533447265625,
-0.00475311279296875,
0.0306243896484375,
0.0023193359375,
-0.002140045166015625,
-0.04705810546875,
0.0264739990234375,
-0.0102691650390625,
0.03863525390625,
-0.01910400390625,
-0.027862548828125,
-0.07415771484375,
-0.024017333984375,
-0.037078857421875,
-0.055694580078125,
-0.0762939453125,
-0.0223388671875,
0.003387451171875,
-0.032318115234375,
0.0523681640625,
0.07666015625,
-0.0518798828125,
-0.032745361328125,
-0.0062255859375,
-0.0299530029296875,
-0.0074310302734375,
-0.02703857421875,
0.023345947265625,
0.03948974609375,
-0.023712158203125,
-0.047882080078125,
0.04345703125,
0.0237884521484375,
0.01708984375,
0.019134521484375,
-0.0292816162109375,
-0.05670166015625,
-0.0019168853759765625,
0.04632568359375,
-0.03179931640625,
0.00731658935546875,
0.0189208984375,
-0.00966644287109375,
0.02392578125,
0.042694091796875,
0.0006422996520996094,
-0.036865234375,
0.01032257080078125,
0.00839996337890625,
-0.03302001953125,
-0.0308074951171875,
0.01971435546875,
0.010498046875,
-0.0452880859375,
-0.0013904571533203125,
0.08294677734375,
0.01068878173828125,
0.01360321044921875,
-0.0248565673828125,
-0.003772735595703125,
-0.01532745361328125,
-0.024261474609375,
0.0265350341796875,
-0.0469970703125,
-0.0175323486328125,
0.05035400390625,
-0.04656982421875,
-0.038482666015625,
0.013092041015625,
0.0211639404296875,
0.02362060546875,
-0.0248260498046875,
-0.05047607421875,
0.0037212371826171875,
-0.0245819091796875,
0.043121337890625,
-0.0276031494140625,
-0.01293182373046875,
-0.06793212890625,
-0.01013946533203125,
-0.045135498046875,
0.0253753662109375,
-0.0552978515625,
0.02325439453125,
-0.0025787353515625,
0.027313232421875,
-0.004772186279296875,
-0.0478515625,
0.02581787109375,
-0.06793212890625,
-0.0141448974609375,
0.03204345703125,
0.034912109375,
0.0484619140625,
-0.0256500244140625,
0.0007781982421875,
0.0148468017578125,
-0.01070404052734375,
-0.003936767578125,
0.00420379638671875,
-0.0262908935546875,
0.01309967041015625,
0.053619384765625,
-0.00013148784637451172,
-0.018280029296875,
-0.007686614990234375,
0.0083465576171875,
-0.0138397216796875,
0.0215301513671875,
0.0012216567993164062,
0.00812530517578125,
0.00691986083984375,
0.011627197265625,
-0.01454925537109375,
0.03680419921875,
-0.006256103515625,
0.003833770751953125,
0.0034198760986328125,
0.0038280487060546875,
-0.02459716796875,
0.0120697021484375,
-0.0189971923828125,
-0.0003466606140136719,
-0.0340576171875,
-0.051544189453125,
0.0007390975952148438,
-0.0195159912109375,
-0.09759521484375,
-0.033416748046875,
-0.039154052734375,
0.029571533203125,
-0.0006723403930664062,
0.038787841796875,
0.020904541015625,
0.0347900390625,
-0.04644775390625,
0.0263214111328125,
0.00254058837890625,
0.00824737548828125,
-0.0301361083984375,
0.00013017654418945312,
-0.04327392578125,
0.014556884765625,
-0.07843017578125,
0.0088958740234375,
-0.0633544921875,
-0.0006718635559082031,
0.046844482421875,
-0.006458282470703125,
0.002292633056640625,
-0.006381988525390625,
0.056793212890625,
0.0206298828125,
-0.012451171875,
0.0017194747924804688,
0.03570556640625,
0.00725555419921875,
-0.04229736328125,
-0.0199737548828125,
-0.040435791015625,
-0.08538818359375,
0.0095367431640625,
0.08526611328125,
0.018890380859375,
0.0440673828125,
-0.005275726318359375,
0.0287933349609375,
0.037811279296875,
-0.032470703125,
-0.006580352783203125,
0.00937652587890625,
0.00921630859375,
0.003448486328125,
0.005840301513671875,
-0.00792694091796875,
0.0288238525390625,
-0.05279541015625,
0.03546142578125,
0.034393310546875,
-0.003292083740234375,
0.020751953125,
-0.00274658203125,
-0.00860595703125,
-0.002246856689453125,
-0.05059814453125,
-0.016571044921875,
-0.0202178955078125,
0.01384735107421875,
0.0198516845703125,
0.042083740234375,
0.040313720703125,
-0.0047454833984375,
0.0027179718017578125,
-0.0074462890625,
-0.016845703125,
0.0083770751953125,
0.039825439453125,
0.073974609375,
0.0135040283203125,
-0.05218505859375,
-0.03515625,
0.048248291015625,
0.0506591796875,
-0.011505126953125,
0.01380157470703125,
0.0266876220703125,
-0.00789642333984375,
0.0024280548095703125,
-0.060333251953125,
0.0293426513671875,
0.0034332275390625,
-0.0110321044921875,
-0.01690673828125,
0.02349853515625,
0.0178070068359375,
-0.0154876708984375,
0.016082763671875,
0.0003170967102050781,
-0.0173187255859375,
-0.02325439453125,
-0.031951904296875,
0.0469970703125,
-0.0219879150390625,
0.027557373046875,
0.06982421875,
-0.0038318634033203125,
0.029510498046875,
-0.00988006591796875,
0.00955963134765625,
-0.0104522705078125,
0.014251708984375,
-0.0174713134765625,
-0.0243988037109375,
-0.053466796875,
-0.020294189453125,
0.023895263671875,
0.060272216796875,
0.006435394287109375,
-0.0245361328125,
0.0236053466796875,
0.030120849609375,
-0.029388427734375,
-0.053009033203125,
-0.04547119140625,
-0.035491943359375,
-0.00397491455078125,
-0.01369476318359375,
0.00788116455078125,
-0.002811431884765625,
-0.0250091552734375,
0.00958251953125,
0.01004791259765625,
-0.03399658203125,
-0.055206298828125,
-0.061248779296875,
-0.08135986328125,
-0.0196533203125,
0.007537841796875,
0.024017333984375,
0.016632080078125,
0.05682373046875,
0.019195556640625,
-0.037353515625,
0.00872039794921875,
0.00682830810546875,
-0.027984619140625,
-0.00951385498046875,
-0.019256591796875,
0.013031005859375,
0.0098419189453125,
0.0102996826171875,
-0.05029296875,
-0.004791259765625,
0.0099029541015625,
-0.03826904296875,
-0.003147125244140625,
-0.02423095703125,
0.03546142578125,
0.015472412109375,
-0.019866943359375,
0.009490966796875,
0.068603515625,
-0.0272216796875,
-0.06414794921875,
-0.0142822265625,
-0.0638427734375,
0.052001953125,
0.020172119140625,
0.02294921875,
-0.00925445556640625,
0.04864501953125,
0.0293426513671875,
0.028228759765625,
0.052215576171875,
0.016265869140625,
-0.0188446044921875,
-0.00453948974609375,
-0.005451202392578125,
-0.05010986328125,
0.03155517578125,
-0.0201416015625,
-0.01311492919921875,
-0.0036525726318359375,
0.01275634765625,
0.01267242431640625,
-0.0308074951171875,
-0.0283050537109375,
-0.00328826904296875,
-0.0020046234130859375,
-0.05987548828125,
0.062469482421875,
-0.059814453125,
0.0032444000244140625,
-0.048492431640625,
0.05126953125,
0.005817413330078125,
-0.01751708984375,
-0.042510986328125,
0.00960540771484375,
-0.03814697265625,
-0.076904296875,
0.022552490234375,
0.01079559326171875,
-0.0159912109375,
0.037811279296875,
0.0015211105346679688,
0.01338958740234375,
-0.0288848876953125,
0.0119171142578125,
-0.021484375,
-0.0170745849609375,
0.04425048828125,
-0.046356201171875,
0.00023305416107177734,
0.04534912109375,
0.00438690185546875,
-0.0016460418701171875,
-0.03277587890625,
-0.0169525146484375,
-0.10076904296875,
-0.006500244140625,
-0.0283050537109375,
0.05657958984375,
0.0021800994873046875,
-0.00325775146484375,
-0.022613525390625,
0.040771484375,
0.06024169921875,
0.024139404296875,
0.0264129638671875,
-0.03216552734375,
0.0014371871948242188,
-0.01885986328125,
0.034332275390625,
-0.034423828125,
-0.0355224609375,
-0.038909912109375,
-0.014862060546875,
-0.04791259765625,
-0.05712890625,
-0.060943603515625,
-0.016876220703125,
-0.01084136962890625,
-0.01355743408203125,
-0.02301025390625,
-0.0423583984375,
0.0178680419921875,
-0.036346435546875,
-0.01215362548828125,
-0.037445068359375,
-0.045806884765625,
0.026214599609375,
0.007480621337890625,
-0.0014810562133789062,
0.00843048095703125,
0.052886962890625,
0.0183258056640625,
-0.0208282470703125,
-0.046539306640625,
0.0010776519775390625,
0.00543975830078125,
-0.0360107421875,
0.04705810546875,
-0.001323699951171875,
0.004238128662109375,
0.034515380859375,
-0.031341552734375,
-0.0011692047119140625,
0.01019287109375,
0.04681396484375,
0.0019359588623046875,
-0.006256103515625,
0.00984954833984375,
-0.013397216796875,
-0.0028781890869140625,
0.02142333984375,
0.0009851455688476562,
-0.031585693359375,
0.009613037109375,
0.0557861328125,
-0.03765869140625,
0.0325927734375,
-0.040740966796875,
-0.0252838134765625,
0.0166015625,
-0.005649566650390625,
0.01165771484375,
0.033447265625,
-0.002910614013671875,
0.005435943603515625,
-0.00922393798828125,
0.0177764892578125,
-0.03240966796875,
0.01462554931640625,
-0.0306549072265625,
0.034637451171875,
-0.006137847900390625,
0.00811004638671875,
-0.0157928466796875,
0.00273895263671875,
-0.0146331787109375,
0.0059814453125,
-0.04656982421875,
0.01110076904296875,
-0.01104736328125,
0.0147857666015625,
-0.01506805419921875,
0.0282135009765625,
0.02044677734375,
-0.02435302734375,
-0.00484466552734375,
-0.009002685546875,
-0.00026679039001464844,
-0.0034580230712890625,
-0.0322265625,
-0.00024890899658203125,
0.0184173583984375,
-0.0184326171875,
0.0104217529296875,
0.0256195068359375,
0.0662841796875,
-0.009063720703125,
-0.036590576171875,
0.0259246826171875,
0.035430908203125,
0.031951904296875,
0.036224365234375,
-0.047882080078125,
0.02691650390625,
-0.0261688232421875,
0.006305694580078125,
-0.03369140625,
-0.0104827880859375,
0.041259765625,
0.028350830078125,
-0.006427764892578125,
-0.02703857421875,
0.01200103759765625,
-0.004451751708984375,
-0.023223876953125,
0.0152740478515625,
0.0247955322265625,
-0.01200103759765625,
-0.00936126708984375,
0.01090240478515625,
0.008453369140625,
0.0216064453125,
0.0007767677307128906,
-0.0290069580078125,
-0.055511474609375,
-0.034271240234375,
0.006710052490234375,
-0.04437255859375,
-0.01282501220703125,
-0.0028667449951171875,
-0.04852294921875,
-0.044403076171875,
-0.0106048583984375,
0.08258056640625,
0.0308837890625,
-0.021240234375,
-0.05145263671875,
0.00640106201171875,
0.0100250244140625,
0.022796630859375,
-0.035400390625,
-0.020050048828125,
0.0084381103515625,
-0.01446533203125,
0.07501220703125,
0.0168609619140625,
-0.0308837890625,
-0.003963470458984375,
-0.0273284912109375,
0.00004506111145019531,
0.0004837512969970703,
-0.060821533203125,
-0.011505126953125,
-0.0149383544921875,
-0.0016012191772460938,
0.0009088516235351562,
0.0042266845703125,
0.001934051513671875,
-0.022613525390625,
0.031707763671875,
0.00411224365234375,
0.0119781494140625,
-0.0129852294921875,
0.0789794921875,
-0.033172607421875,
0.051971435546875,
-0.0136871337890625,
0.0188140869140625,
-0.041656494140625,
0.004608154296875,
0.02001953125,
-0.00634002685546875,
-0.017974853515625,
-0.00733184814453125,
-0.00342559814453125,
-0.038421630859375,
-0.00655364990234375,
-0.0220794677734375,
0.0208282470703125,
-0.00018155574798583984,
-0.002410888671875,
-0.01049041748046875,
0.0201873779296875,
-0.007198333740234375,
0.0015087127685546875,
0.046722412109375,
-0.044189453125,
-0.061614990234375,
0.0188140869140625,
0.0263519287109375,
0.0083160400390625,
-0.020965576171875,
0.002841949462890625,
-0.007083892822265625,
-0.0282440185546875,
0.0185089111328125,
0.040679931640625,
0.01070404052734375,
0.07086181640625,
0.005451202392578125,
0.0511474609375,
0.06048583984375,
0.0482177734375,
-0.056121826171875,
-0.0230712890625,
0.060272216796875,
0.034393310546875,
-0.0300140380859375,
0.03656005859375,
-0.0240936279296875,
0.0225677490234375,
0.001495361328125,
0.04583740234375,
-0.0285186767578125,
0.0221405029296875,
0.024169921875,
-0.0224151611328125,
0.03826904296875,
0.01751708984375,
0.0021820068359375,
-0.00498199462890625,
0.004970550537109375,
-0.054046630859375,
-0.016387939453125,
0.006771087646484375,
-0.033966064453125,
0.0016222000122070312,
-0.033538818359375,
0.04473876953125,
0.0266265869140625,
-0.0014486312866210938,
0.02435302734375,
0.01064300537109375,
0.01397705078125,
-0.022491455078125,
0.041656494140625,
-0.0180206298828125,
-0.00991058349609375,
-0.072265625,
-0.0027008056640625,
0.006130218505859375,
-0.0205535888671875,
0.0243377685546875,
-0.00794219970703125,
0.0002906322479248047,
0.02685546875,
-0.0269622802734375,
0.016082763671875,
-0.0091400146484375,
-0.0215606689453125,
-0.09185791015625,
-0.0081787109375,
0.033416748046875,
0.0205535888671875,
-0.02484130859375,
0.032623291015625,
-0.0462646484375,
-0.0218963623046875,
0.01120758056640625,
-0.01113128662109375,
0.0694580078125,
-0.062744140625,
-0.01058197021484375,
0.01287841796875,
-0.0330810546875,
-0.004909515380859375,
-0.0205535888671875,
-0.0120697021484375,
-0.055389404296875,
-0.049072265625,
-0.029083251953125,
-0.07623291015625,
-0.005779266357421875,
-0.05426025390625,
-0.048004150390625,
0.136474609375,
-0.003993988037109375,
0.035491943359375,
-0.0036220550537109375,
0.051849365234375,
-0.0099945068359375,
0.042388916015625,
-0.048431396484375,
0.023590087890625,
0.0498046875,
0.02203369140625,
-0.050567626953125,
-0.01209259033203125,
-0.023468017578125,
0.034454345703125,
0.03350830078125,
0.0210113525390625,
-0.06768798828125,
0.010894775390625,
0.033966064453125,
0.003253936767578125,
0.006008148193359375,
0.07904052734375,
0.00611114501953125,
-0.029083251953125,
0.059600830078125,
0.007167816162109375,
0.043487548828125,
0.0082855224609375,
0.021209716796875,
0.006465911865234375,
0.00310516357421875,
-0.0181427001953125,
-0.033843994140625,
-0.0011892318725585938,
-0.04864501953125,
-0.009521484375,
0.01390838623046875,
0.0220489501953125,
0.031951904296875,
-0.01108551025390625,
0.043243408203125,
-0.017364501953125,
-0.0006642341613769531,
-0.01485443115234375,
0.04486083984375,
0.0209503173828125,
-0.01068878173828125,
0.001865386962890625,
-0.00312042236328125,
-0.00850677490234375,
0.04022216796875,
0.0018749237060546875,
0.03228759765625,
0.0223388671875,
-0.0008473396301269531,
0.049468994140625,
0.005184173583984375,
0.0159759521484375,
0.052581787109375,
0.055816650390625,
0.01003265380859375,
-0.039520263671875,
-0.03759765625,
0.0161285400390625,
-0.00408935546875,
-0.022369384765625,
-0.009246826171875,
-0.0187835693359375,
-0.01617431640625,
0.036163330078125,
-0.01061248779296875,
-0.0207977294921875,
0.0191650390625,
0.01126861572265625,
0.023040771484375,
0.032928466796875,
-0.0219268798828125,
-0.0283660888671875,
-0.03326416015625,
-0.031463623046875,
0.00754547119140625,
0.053802490234375,
0.05731201171875,
0.01194000244140625,
0.00600433349609375,
-0.02978515625,
0.004352569580078125,
-0.0015411376953125,
-0.005756378173828125,
-0.001628875732421875,
-0.029876708984375,
-0.0369873046875,
0.0189056396484375,
0.034515380859375,
0.0634765625,
0.037841796875,
0.071044921875,
0.01468658447265625,
-0.05389404296875,
0.0194549560546875,
0.04400634765625,
-0.026458740234375,
-0.00852203369140625,
-0.0019588470458984375,
-0.028076171875,
0.01398468017578125,
-0.0122222900390625,
-0.00977325439453125,
0.015472412109375,
0.031280517578125,
0.01375579833984375,
0.0487060546875,
0.00969696044921875,
0.01015472412109375,
0.017974853515625,
0.0244598388671875,
0.039306640625,
0.05523681640625,
-0.01904296875,
-0.00931549072265625,
-0.0006427764892578125,
-0.006591796875,
-0.0289764404296875,
0.001255035400390625,
-0.01126861572265625,
0.057037353515625,
0.035797119140625,
-0.005153656005859375,
-0.00540924072265625,
0.00926971435546875,
0.00910186767578125,
-0.0167388916015625,
0.0194091796875,
0.00518035888671875,
-0.02960205078125,
-0.00579833984375,
-0.00672149658203125,
-0.002132415771484375,
-0.0008406639099121094,
0.08221435546875,
-0.002620697021484375,
-0.00809478759765625,
0.027191162109375,
0.06134033203125,
-0.09326171875,
-0.0219879150390625,
0.041046142578125,
-0.0911865234375,
0.0038433074951171875,
0.034698486328125,
-0.04815673828125,
0.006275177001953125,
0.02740478515625,
0.0195465087890625,
0.03375244140625,
-0.047698974609375,
0.0243072509765625,
-0.0194549560546875,
-0.028167724609375,
-0.022064208984375,
-0.0229339599609375,
0.00666046142578125,
0.0046539306640625,
0.01324462890625,
0.007030487060546875,
-0.0145263671875,
0.025665283203125,
-0.00855255126953125,
-0.0633544921875,
0.0294647216796875,
-0.055938720703125,
-0.0024013519287109375,
0.01462554931640625,
0.046783447265625,
0.00864410400390625,
-0.0036716461181640625,
-0.01141357421875,
0.01123809814453125,
0.0161285400390625,
-0.01467132568359375,
0.0241241455078125,
-0.043609619140625,
-0.0053863525390625,
0.038299560546875,
0.038360595703125,
-0.01497650146484375,
0.00982666015625,
0.0335693359375,
-0.0126800537109375,
0.00301361083984375,
-0.023468017578125,
-0.0284576416015625,
-0.044952392578125,
0.0077667236328125,
0.00048422813415527344,
-0.0014104843139648438,
-0.041656494140625,
0.0225982666015625,
0.021575927734375,
0.0247344970703125,
-0.00818634033203125,
-0.032379150390625,
0.01947021484375,
-0.03863525390625,
0.0531005859375,
-0.02099609375,
0.027374267578125,
-0.0004076957702636719,
0.016815185546875,
-0.030853271484375,
0.0219879150390625,
-0.002422332763671875,
0.010955810546875,
0.03173828125,
0.01059722900390625,
0.008941650390625,
-0.0106048583984375,
-0.042572021484375,
0.02825927734375,
0.00434112548828125,
0.04425048828125,
0.03057861328125,
-0.049468994140625,
-0.0182342529296875,
0.0112152099609375,
0.035736083984375,
-0.004932403564453125,
0.00446319580078125,
-0.0252685546875,
-0.0207672119140625,
-0.0693359375,
0.01727294921875,
0.0082855224609375,
-0.045318603515625,
-0.03778076171875,
0.029022216796875,
-0.02142333984375,
-0.0254058837890625,
-0.04156494140625,
0.0016260147094726562,
-0.01174163818359375,
0.043670654296875,
0.0002620220184326172,
-0.027496337890625,
-0.00571441650390625,
0.04949951171875,
-0.002521514892578125,
0.0736083984375,
-0.02862548828125,
0.0219268798828125,
-0.048065185546875,
0.0025806427001953125,
-0.031402587890625,
0.007293701171875,
-0.02154541015625,
0.02288818359375,
-0.025390625,
0.03125,
-0.0269622802734375,
-0.03668212890625,
-0.0121917724609375,
-0.003650665283203125,
-0.007030487060546875,
-0.02008056640625,
-0.0134429931640625,
-0.006744384765625,
0.04351806640625,
0.0233306884765625,
-0.0023708343505859375,
-0.02362060546875,
0.0034542083740234375,
-0.050872802734375,
-0.0867919921875,
0.035552978515625,
0.0236663818359375,
-0.023040771484375,
0.0545654296875,
0.038909912109375,
0.01200103759765625,
-0.031646728515625,
-0.00843048095703125,
-0.027099609375,
-0.02105712890625,
-0.006092071533203125,
0.007289886474609375,
-0.03466796875,
0.007488250732421875,
-0.0164031982421875,
-0.01502227783203125,
-0.0220947265625,
0.0190887451171875,
-0.006023406982421875,
-0.0137939453125,
0.08203125,
0.05859375,
0.0587158203125,
-0.054779052734375,
-0.027313232421875,
0.04437255859375,
-0.0108795166015625,
-0.00096893310546875,
-0.036407470703125,
-0.029388427734375,
-0.021240234375,
-0.0013275146484375,
-0.05157470703125,
0.01141357421875,
-0.003406524658203125,
-0.0201263427734375,
0.082275390625,
-0.019500732421875,
0.020050048828125,
-0.019683837890625,
0.035858154296875,
-0.0242462158203125,
0.00490570068359375,
-0.01032257080078125,
-0.00921630859375,
-0.00222015380859375,
0.0014858245849609375,
0.01470947265625,
-0.04486083984375,
0.031585693359375,
-0.04754638671875,
0.0032196044921875,
0.024505615234375
]
|
a444313782c5675eede2404e5863286fada8764d | Wordpress Stackexchange
Q: Possible to use /%monthname%/ in my permalink structure without using a plugin? I need to use the following permalink structure so that when I launch the website, the urls will be the same as they were before (moving from a non-wordpress site):
/blog/posts/%year%/%monthname%/%postname%/
Is this possible without a plugin?
| Q: Possible to use /%monthname%/ in my permalink structure without using a plugin? I need to use the following permalink structure so that when I launch the website, the urls will be the same as they were before (moving from a non-wordpress site):
/blog/posts/%year%/%monthname%/%postname%/
Is this possible without a plugin?
| wordpress | {
"language": "en",
"length": 50,
"provenance": "stackexchange_00019.jsonl.gz:455544",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188299"
} | [
0.040985107421875,
-0.027679443359375,
0.0026988983154296875,
-0.0079498291015625,
-0.042877197265625,
-0.0266265869140625,
0.007404327392578125,
-0.026702880859375,
0.03717041015625,
0.004302978515625,
0.029083251953125,
-0.018707275390625,
-0.004840850830078125,
-0.053619384765625,
0.00012004375457763672,
0.013092041015625,
0.02947998046875,
-0.03485107421875,
-0.005756378173828125,
-0.01995849609375,
0.01255035400390625,
0.0016155242919921875,
0.0288848876953125,
0.031341552734375,
0.03570556640625,
-0.00672149658203125,
0.05224609375,
-0.03515625,
0.0249481201171875,
-0.02374267578125,
0.02935791015625,
-0.0236663818359375,
-0.00745391845703125,
-0.0020999908447265625,
0.0792236328125,
0.0484619140625,
0.005771636962890625,
0.028900146484375,
0.0682373046875,
-0.01387786865234375,
0.01462554931640625,
-0.01543426513671875,
0.0031414031982421875,
0.054595947265625,
0.0089263916015625,
-0.02783203125,
-0.00494384765625,
-0.0819091796875,
-0.004642486572265625,
-0.04412841796875,
0.0031833648681640625,
0.03668212890625,
0.0213775634765625,
0.0108795166015625,
-0.018585205078125,
-0.01125335693359375,
0.0260009765625,
-0.059539794921875,
0.005474090576171875,
0.00849151611328125,
-0.0024623870849609375,
0.00794219970703125,
0.01561737060546875,
0.003265380859375,
0.0009331703186035156,
-0.00586700439453125,
-0.059478759765625,
0.0186767578125,
-0.03985595703125,
0.01071929931640625,
0.044097900390625,
-0.0767822265625,
-0.00426483154296875,
-0.043243408203125,
-0.0251312255859375,
0.00872039794921875,
-0.00836181640625,
-0.04144287109375,
0.011688232421875,
-0.0155029296875,
-0.0095367431640625,
0.00441741943359375,
0.0029277801513671875,
-0.05743408203125,
0.03729248046875,
-0.0260162353515625,
-0.0006532669067382812,
0.00010442733764648438,
-0.0618896484375,
-0.0287322998046875,
-0.044036865234375,
-0.02142333984375,
-0.052490234375,
-0.0232086181640625,
-0.022857666015625,
-0.01038360595703125,
0.0181884765625,
0.043487548828125,
0.01505279541015625,
0.0189361572265625,
-0.01486968994140625,
-0.03173828125,
-0.0017652511596679688,
-0.0292205810546875,
-0.005413055419921875,
0.042999267578125,
0.044036865234375,
0.044097900390625,
0.0283660888671875,
-0.01611328125,
-0.0031681060791015625,
0.058624267578125,
-0.020721435546875,
-0.01457977294921875,
-0.019256591796875,
0.0672607421875,
-0.0131988525390625,
-0.01343536376953125,
-0.014556884765625,
0.059051513671875,
-0.01113128662109375,
0.03558349609375,
-0.0100250244140625,
-0.0168914794921875,
-0.0197296142578125,
-0.025177001953125,
0.01058197021484375,
-0.03863525390625,
-0.0198211669921875,
0.0175323486328125,
0.009124755859375,
0.02154541015625,
0.00734710693359375,
0.0168914794921875,
-0.01262664794921875,
-0.01201629638671875,
0.05499267578125,
-0.047332763671875,
-0.0311737060546875,
0.0047454833984375,
0.00582122802734375,
-0.00720977783203125,
-0.0018901824951171875,
-0.0262908935546875,
0.008514404296875,
0.0082550048828125,
0.01120758056640625,
0.0167388916015625,
0.0101165771484375,
-0.006317138671875,
-0.041229248046875,
0.0031986236572265625,
0.00855255126953125,
0.0101470947265625,
-0.00501251220703125,
-0.0294342041015625,
-0.00787353515625,
-0.0197296142578125,
0.036102294921875,
-0.02093505859375,
0.044891357421875,
-0.00299072265625,
-0.0450439453125,
-0.021484375,
-0.06182861328125,
-0.004573822021484375,
-0.03582763671875,
0.00897216796875,
0.0077362060546875,
-0.01517486572265625,
-0.0037822723388671875,
0.01509857177734375,
-0.00955963134765625,
-0.0285491943359375,
0.0003345012664794922,
-0.0121002197265625,
-0.00331878662109375,
0.02581787109375,
-0.00606536865234375,
0.048126220703125,
0.038818359375,
-0.0204010009765625,
0.0161895751953125,
0.016937255859375,
-0.05780029296875,
-0.00920867919921875,
0.03076171875,
0.037261962890625,
0.00641632080078125,
0.0252685546875,
0.072265625,
0.0161895751953125,
-0.0775146484375,
0.02264404296875,
-0.0091705322265625,
0.007488250732421875,
0.0262908935546875,
0.021697998046875,
0.00830841064453125,
-0.034332275390625,
0.01055145263671875,
0.03643798828125,
-0.0211639404296875,
0.06256103515625,
0.0201568603515625,
0.0312042236328125,
0.005535125732421875,
0.002887725830078125,
0.005390167236328125,
0.030242919921875,
0.0176544189453125,
0.042572021484375,
-0.0228424072265625,
-0.059478759765625,
-0.02178955078125,
0.0246429443359375,
0.0173187255859375,
-0.014129638671875,
-0.003173828125,
-0.0206298828125,
0.03564453125,
-0.005474090576171875,
0.002201080322265625,
0.043426513671875,
0.022918701171875,
-0.05657958984375,
-0.006351470947265625,
-0.0703125,
-0.0372314453125,
-0.01568603515625,
-0.08184814453125,
0.0845947265625,
-0.03057861328125,
0.00937652587890625,
0.0034961700439453125,
0.007450103759765625,
0.0076446533203125,
-0.047088623046875,
0.026458740234375,
0.0379638671875,
0.026641845703125,
0.03228759765625,
-0.010162353515625,
-0.008026123046875,
0.0260772705078125,
-0.045257568359375,
0.01212310791015625,
-0.01073455810546875,
0.0115203857421875,
0.0751953125,
-0.01146697998046875,
-0.0017499923706054688,
-0.004512786865234375,
-0.0287933349609375,
-0.01312255859375,
0.03271484375,
-0.0024871826171875,
-0.03424072265625,
0.004695892333984375,
0.02215576171875,
0.01122283935546875,
0.037811279296875,
-0.0241241455078125,
0.00817108154296875,
0.0269927978515625,
-0.001819610595703125,
0.03497314453125,
0.042022705078125,
0.004894256591796875,
-0.00550079345703125,
-0.0186767578125,
-0.015411376953125,
0.00638580322265625,
0.035064697265625,
0.0311431884765625,
-0.0074005126953125,
-0.03558349609375,
-0.013458251953125,
0.03094482421875,
0.025299072265625,
-0.0229644775390625,
0.004245758056640625,
-0.003826141357421875,
-0.01513671875,
-0.0100555419921875,
-0.0198974609375,
0.007328033447265625,
-0.004871368408203125,
0.0174560546875,
-0.0014677047729492188,
0.058380126953125,
-0.042724609375,
-0.041900634765625,
0.0106201171875,
0.0267333984375,
-0.0694580078125,
-0.01490020751953125,
-0.0489501953125,
0.0390625,
-0.03338623046875,
0.01496124267578125,
0.061248779296875,
0.0338134765625,
-0.017669677734375,
0.00812530517578125,
-0.0156707763671875,
0.03375244140625,
-0.0081024169921875,
-0.0230560302734375,
0.00859832763671875,
-0.06793212890625,
-0.0261383056640625,
0.021514892578125,
0.061798095703125,
-0.01537322998046875,
-0.043701171875,
0.004802703857421875,
0.01134490966796875,
-0.06768798828125,
-0.0911865234375,
-0.0178985595703125,
-0.0240020751953125,
0.0258026123046875,
0.029937744140625,
-0.0007262229919433594,
-0.039031982421875,
0.048187255859375,
0.0017480850219726562,
0.002071380615234375,
-0.03021240234375,
-0.03741455078125,
-0.05682373046875,
-0.08026123046875,
0.005702972412109375,
0.007274627685546875,
0.0159149169921875,
-0.0186614990234375,
-0.019134521484375,
-0.0347900390625,
-0.064208984375,
-0.050445556640625,
0.0675048828125,
0.0123443603515625,
-0.0263214111328125,
0.00740814208984375,
0.01654052734375,
0.00342559814453125,
0.0021076202392578125,
0.051544189453125,
0.06396484375,
-0.07421875,
0.00485992431640625,
-0.005428314208984375,
-0.0227508544921875,
0.03009033203125,
-0.038055419921875,
-0.01360321044921875,
0.02374267578125,
0.0183563232421875,
-0.0325927734375,
-0.030670166015625,
-0.0352783203125,
-0.0858154296875,
0.008056640625,
0.043426513671875,
0.0173187255859375,
0.005359649658203125,
-0.0225067138671875,
-0.0026607513427734375,
-0.0024166107177734375,
-0.00008165836334228516,
-0.048553466796875,
0.041900634765625,
0.0087127685546875,
0.0285797119140625,
-0.0057373046875,
0.0123748779296875,
-0.04632568359375,
0.01364898681640625,
-0.0020160675048828125,
-0.028778076171875,
-0.006092071533203125,
-0.020233154296875,
-0.006565093994140625,
-0.0236053466796875,
0.022247314453125,
-0.0732421875,
0.00348663330078125,
-0.0261383056640625,
0.0007395744323730469,
-0.0005979537963867188,
0.04913330078125,
-0.0179290771484375,
-0.0266571044921875,
0.015960693359375,
-0.0030155181884765625,
0.0012149810791015625,
-0.0025119781494140625,
-0.0294647216796875,
-0.0236053466796875,
-0.01215362548828125,
-0.023895263671875,
-0.0238800048828125,
-0.0245208740234375,
0.00897216796875,
-0.0059661865234375,
0.008575439453125,
-0.0261383056640625,
0.0279388427734375,
0.0207672119140625,
-0.007598876953125,
-0.029022216796875,
-0.0156707763671875,
-0.0251617431640625,
-0.0323486328125,
0.0175933837890625,
-0.03955078125,
-0.01873779296875,
0.0096588134765625,
0.0556640625,
0.00634002685546875,
-0.0022602081298828125,
-0.0208892822265625,
0.046417236328125,
-0.0350341796875,
0.0318603515625,
0.006450653076171875,
0.032745361328125,
0.01100921630859375,
0.024139404296875,
0.01096343994140625,
-0.005535125732421875,
0.0149688720703125,
-0.019989013671875,
-0.037933349609375,
0.003787994384765625,
-0.0282440185546875,
0.019195556640625,
-0.011444091796875,
-0.00951385498046875,
-0.032928466796875,
0.009307861328125,
0.0036258697509765625,
0.021514892578125,
-0.0233154296875,
0.005645751953125,
0.008575439453125,
-0.022003173828125,
0.042572021484375,
0.02203369140625,
0.0225372314453125,
-0.01242828369140625,
0.049163818359375,
0.0036449432373046875,
-0.0281219482421875,
-0.019561767578125,
0.033233642578125,
0.0213775634765625,
-0.0077362060546875,
0.06719970703125,
0.01129913330078125,
-0.0158843994140625,
0.0740966796875,
-0.0237884521484375,
-0.025299072265625,
-0.0241546630859375,
0.006275177001953125,
-0.00037860870361328125,
-0.033172607421875,
0.0176239013671875,
-0.03521728515625,
0.06976318359375,
0.0635986328125,
0.00849151611328125,
-0.00016129016876220703,
-0.05078125,
0.0051116943359375,
0.003398895263671875,
-0.007476806640625,
-0.031280517578125,
-0.033172607421875,
0.01611328125,
0.01148223876953125,
0.0063629150390625,
0.0100250244140625,
-0.00921630859375,
-0.002017974853515625,
-0.003711700439453125,
-0.0235137939453125,
0.018280029296875,
0.006778717041015625,
0.0183868408203125,
-0.0008144378662109375,
0.035980224609375,
-0.01617431640625,
-0.01617431640625,
0.0005965232849121094,
0.03173828125,
0.022705078125,
0.001678466796875,
-0.04681396484375,
-0.00835418701171875,
0.0218505859375,
-0.005401611328125,
-0.0176849365234375,
0.02740478515625,
0.04705810546875,
0.0260162353515625,
0.0139312744140625,
0.01325225830078125,
-0.0049896240234375,
-0.0230560302734375,
0.0257415771484375,
0.036865234375,
-0.0160980224609375,
0.0116729736328125,
0.061431884765625,
-0.002628326416015625,
0.042236328125,
-0.00644683837890625,
-0.00040984153747558594,
0.0202178955078125,
0.034210205078125,
0.0205078125,
-0.036346435546875,
0.006519317626953125,
-0.001399993896484375,
0.0299224853515625,
-0.032989501953125,
0.01519775390625,
0.021270751953125,
0.03167724609375,
0.027618408203125,
-0.01097869873046875,
0.01080322265625,
-0.003936767578125,
-0.020050048828125,
0.019561767578125,
-0.02783203125,
-0.033233642578125,
-0.03515625,
-0.01202392578125,
0.04425048828125,
-0.00299072265625,
0.008697509765625,
-0.01904296875,
-0.01165771484375,
-0.01300048828125,
-0.00872039794921875,
-0.0125885009765625,
-0.0013275146484375,
0.0009427070617675781,
0.0587158203125,
-0.01457977294921875,
-0.0016498565673828125,
0.0345458984375,
0.046905517578125,
-0.06439208984375,
-0.006740570068359375,
0.09625244140625,
-0.01910400390625,
0.0528564453125,
-0.034759521484375,
-0.01227569580078125,
-0.006259918212890625,
-0.007091522216796875,
0.053314208984375,
0.037933349609375,
-0.09173583984375,
-0.0097503662109375,
-0.043243408203125,
0.0017232894897460938,
-0.03790283203125,
0.0037479400634765625,
-0.035675048828125,
0.016632080078125,
0.037750244140625,
0.03546142578125,
0.00714111328125,
-0.011444091796875,
0.004425048828125,
0.0102386474609375,
0.00806427001953125,
0.05126953125,
-0.00421142578125,
0.041778564453125,
0.0151519775390625,
0.0195159912109375,
0.0020313262939453125,
0.0110626220703125,
-0.0152587890625,
-0.0234527587890625,
-0.00554656982421875,
-0.03546142578125,
-0.0308380126953125,
-0.0081787109375,
-0.0036468505859375,
0.031524658203125,
0.039215087890625,
0.00833892822265625,
0.0135345458984375,
-0.01259613037109375,
0.01058197021484375,
-0.0295867919921875,
0.01242828369140625,
-0.0653076171875,
-0.002330780029296875,
-0.0277862548828125,
0.0300750732421875,
0.035247802734375,
-0.02978515625,
-0.0295257568359375,
-0.006069183349609375,
0.03363037109375,
0.007709503173828125,
-0.01104736328125,
-0.045501708984375,
0.02960205078125,
0.03399658203125,
0.01134490966796875,
0.038055419921875,
0.00695037841796875,
0.0210723876953125,
0.0167236328125,
-0.048583984375,
0.057373046875,
0.029754638671875,
0.0787353515625,
-0.0199737548828125,
0.003253936767578125,
0.070068359375,
-0.03375244140625,
0.01445770263671875,
0.050201416015625,
0.0308990478515625,
-0.10040283203125,
0.005146026611328125,
-0.01143646240234375,
0.0184478759765625,
0.061767578125,
-0.0117340087890625,
-0.00545501708984375,
0.00536346435546875,
0.0095062255859375,
0.0036029815673828125,
-0.0157012939453125,
0.0007328987121582031,
0.0019083023071289062,
-0.00638580322265625,
0.01044464111328125,
0.03564453125,
0.01515960693359375,
0.016845703125,
-0.049896240234375,
0.0017490386962890625,
-0.0178680419921875,
-0.022064208984375,
-0.005702972412109375,
0.01251983642578125,
-0.0234832763671875,
-0.03033447265625,
0.0305633544921875,
-0.0296478271484375,
0.01477813720703125,
-0.0038585662841796875,
-0.009307861328125,
0.01352691650390625,
0.0352783203125,
-0.016265869140625,
-0.01277923583984375,
0.0087890625,
0.00800323486328125,
0.019256591796875,
-0.01419830322265625,
-0.012420654296875,
0.0074310302734375,
0.03265380859375,
0.005767822265625,
0.0102081298828125,
-0.0350341796875,
-0.0003848075866699219,
-0.0211944580078125,
0.07867431640625,
-0.0207672119140625,
-0.0285186767578125,
0.0157318115234375,
-0.038726806640625,
-0.01959228515625,
0.0001919269561767578,
-0.0120391845703125,
-0.0261077880859375,
0.01386260986328125,
-0.03131103515625,
-0.005828857421875,
0.0217132568359375,
-0.039337158203125,
-0.07000732421875,
0.14501953125,
-0.0283050537109375,
0.03802490234375,
0.03704833984375,
0.050537109375,
-0.02447509765625,
0.017059326171875,
-0.041229248046875,
0.067626953125,
-0.0158538818359375,
0.0292510986328125,
-0.046417236328125,
0.004261016845703125,
0.0008974075317382812,
0.01161956787109375,
0.07781982421875,
0.0119476318359375,
-0.05230712890625,
-0.0309295654296875,
0.07379150390625,
0.04815673828125,
0.0140838623046875,
0.038726806640625,
-0.0002815723419189453,
0.04443359375,
0.0293121337890625,
-0.0256195068359375,
0.025360107421875,
-0.00547027587890625,
-0.031585693359375,
0.0333251953125,
0.01471710205078125,
0.0249786376953125,
0.007762908935546875,
-0.068603515625,
-0.0175628662109375,
0.004558563232421875,
0.0256500244140625,
-0.00247955322265625,
0.0347900390625,
0.00107574462890625,
0.053863525390625,
-0.0899658203125,
-0.0399169921875,
-0.01763916015625,
0.04913330078125,
0.005992889404296875,
0.00548553466796875,
0.0025787353515625,
0.0171966552734375,
0.019439697265625,
-0.03631591796875,
-0.002445220947265625,
0.0108642578125,
-0.02618408203125,
0.0225982666015625,
0.0181884765625,
0.0235595703125,
-0.034210205078125,
-0.0682373046875,
0.06854248046875,
0.05975341796875,
-0.00283050537109375,
-0.0265960693359375,
-0.002620697021484375,
0.00817108154296875,
0.005458831787109375,
-0.007472991943359375,
0.01094818115234375,
0.0081634521484375,
0.0182037353515625,
-0.001880645751953125,
-0.00428009033203125,
0.0257568359375,
0.032318115234375,
0.01230621337890625,
0.0016431808471679688,
-0.052337646484375,
0.002544403076171875,
-0.052459716796875,
0.0677490234375,
0.0131683349609375,
0.033447265625,
0.001556396484375,
0.033599853515625,
-0.01486968994140625,
-0.0096588134765625,
-0.005344390869140625,
-0.0004229545593261719,
0.0111236572265625,
0.005496978759765625,
-0.0025424957275390625,
0.01224517822265625,
0.0143585205078125,
0.031982421875,
0.03668212890625,
0.042388916015625,
0.026947021484375,
0.000038564205169677734,
0.0234527587890625,
0.00865936279296875,
-0.0299072265625,
-0.01360321044921875,
0.052215576171875,
-0.0198974609375,
0.061676025390625,
0.0147857666015625,
0.0017995834350585938,
-0.033966064453125,
0.021636962890625,
0.049896240234375,
-0.0298309326171875,
0.0232391357421875,
-0.007091522216796875,
-0.0221405029296875,
0.02850341796875,
-0.031585693359375,
0.05059814453125,
-0.01493072509765625,
0.0129852294921875,
-0.006687164306640625,
-0.01263427734375,
-0.053436279296875,
0.005878448486328125,
0.0391845703125,
0.024261474609375,
-0.0237884521484375,
0.017303466796875,
0.01552581787109375,
0.0174102783203125,
-0.051849365234375,
0.029876708984375,
0.0270233154296875,
0.01340484619140625,
0.0361328125,
-0.046661376953125,
-0.03228759765625,
-0.03662109375,
0.03375244140625,
0.004924774169921875,
0.07757568359375,
-0.018768310546875,
0.01451873779296875,
0.01141357421875,
-0.0013513565063476562,
0.01041412353515625,
0.01456451416015625,
-0.0059356689453125,
-0.014984130859375,
0.0108642578125,
-0.00887298583984375,
-0.0224609375,
0.0174713134765625,
0.009521484375,
-0.00994873046875,
0.004619598388671875,
-0.034454345703125,
0.013702392578125,
0.0251617431640625,
0.038604736328125,
-0.030792236328125,
-0.06317138671875,
-0.024017333984375,
0.01204681396484375,
-0.0178375244140625,
0.002361297607421875,
0.01309967041015625,
0.06353759765625,
-0.003795623779296875,
-0.0098419189453125,
0.010009765625,
-0.0509033203125,
-0.0184326171875,
0.0128326416015625,
0.04400634765625,
0.0168304443359375,
0.046356201171875,
-0.0194549560546875,
0.0380859375,
0.0064239501953125,
0.013763427734375,
0.04052734375,
-0.031219482421875,
-0.00844573974609375,
-0.010772705078125,
0.0195770263671875,
-0.00644683837890625,
0.00876617431640625,
-0.020660400390625,
-0.0022029876708984375,
0.000041484832763671875,
-0.041534423828125,
-0.0305023193359375,
-0.04339599609375,
-0.0079345703125,
0.0147552490234375,
-0.035888671875,
-0.055999755859375,
-0.041351318359375,
-0.005191802978515625,
-0.01025390625,
-0.01171112060546875,
-0.0223236083984375,
0.01152801513671875,
-0.017974853515625,
0.032806396484375,
-0.052032470703125,
0.0034198760986328125,
0.00617218017578125,
0.00801849365234375,
-0.045654296875,
-0.0282135009765625,
-0.0245208740234375,
0.0236053466796875,
-0.0117340087890625,
0.033721923828125,
0.0330810546875,
-0.0285491943359375,
-0.01140594482421875,
0.049285888671875,
0.0277099609375,
0.10540771484375,
-0.0216522216796875,
-0.0016651153564453125,
0.038360595703125,
0.0032444000244140625,
-0.0310211181640625,
-0.08343505859375,
-0.01203155517578125,
-0.0242767333984375,
0.01314544677734375,
0.0033206939697265625,
-0.073974609375,
-0.06463623046875,
-0.0616455078125,
-0.08331298828125,
0.0625,
-0.00025272369384765625,
-0.037994384765625,
-0.05364990234375,
-0.030853271484375,
0.017425537109375,
0.01525115966796875,
-0.02203369140625,
-0.017822265625,
-0.08050537109375,
0.0217132568359375,
-0.004901885986328125,
0.0167999267578125,
-0.01433563232421875,
0.0180511474609375,
-0.01027679443359375,
0.055877685546875,
0.053497314453125,
-0.0171966552734375,
0.03582763671875,
-0.00971221923828125,
0.0404052734375,
0.061798095703125,
-0.01983642578125,
0.016326904296875,
-0.030731201171875,
-0.047119140625,
-0.00902557373046875,
-0.04376220703125,
-0.022796630859375,
0.0157318115234375,
0.07171630859375,
0.056549072265625,
0.01044464111328125,
-0.055084228515625,
-0.0061492919921875,
-0.0250701904296875,
-0.035064697265625,
-0.0132598876953125,
0.035003662109375,
-0.06903076171875,
-0.0036296844482421875,
0.0198974609375,
-0.0029163360595703125,
-0.013031005859375,
0.006885528564453125,
-0.01290130615234375,
-0.0181884765625,
-0.005489349365234375,
-0.0178985595703125,
0.0028476715087890625,
0.0258941650390625,
0.05047607421875,
-0.039794921875,
-0.0087890625,
0.00812530517578125,
0.0032196044921875,
0.0017633438110351562,
-0.024932861328125,
0.012115478515625,
0.0210723876953125,
0.005096435546875,
-0.0004925727844238281,
0.044891357421875,
0.01123809814453125,
0.006610870361328125,
-0.0194091796875,
0.007389068603515625,
0.0302734375,
0.0003104209899902344,
0.02587890625,
-0.04205322265625,
0.044586181640625,
-0.007427215576171875,
0.058502197265625,
0.0069580078125,
-0.0283050537109375,
-0.00811767578125,
0.02215576171875,
-0.0654296875,
-0.0044097900390625,
-0.033782958984375,
-0.052642822265625,
-0.00965118408203125,
-0.0128326416015625,
-0.05108642578125,
-0.04962158203125,
-0.004383087158203125,
-0.09539794921875,
-0.01517486572265625,
0.00884246826171875
]
|
b884cef40c5d89049f72be1aac7504c4d9cdb38e | Wordpress Stackexchange
Q: Override default WordPress core translation WordPress is set to Dutch language. When I use get_the_archive_title() my theme correctly outputs "Categorie: Category-name" on a category archive page. However I'd like that to read "Sectie: Category-name".
I do not want to change the Dutch language file in the wp-content/languages folder, because that will be updated by WordPress updates.
I tried copying that translation file, altering the "category" translation and putting the new nl_NL.mo file into my-theme/languages. This did not have any effect.
How can I achieve a different translation for some strings without altering the core translation files?
A: I was about to use the "add_filter( 'gettext'..." solution suggested above but then read at https://developer.wordpress.org/reference/hooks/gettext/ that this solution can have quite a negative performance impact. I suggest to therefore go with alternative solutions where possible.
In my case I can copy a theme template file to my child theme and edit the string in the template file. This can be a great solution but it of course doesn't help for strings that don't appear in template files.
PS: I meant to add this as a comment but unfortunately I'm not allowed to do so yet.
| Q: Override default WordPress core translation WordPress is set to Dutch language. When I use get_the_archive_title() my theme correctly outputs "Categorie: Category-name" on a category archive page. However I'd like that to read "Sectie: Category-name".
I do not want to change the Dutch language file in the wp-content/languages folder, because that will be updated by WordPress updates.
I tried copying that translation file, altering the "category" translation and putting the new nl_NL.mo file into my-theme/languages. This did not have any effect.
How can I achieve a different translation for some strings without altering the core translation files?
A: I was about to use the "add_filter( 'gettext'..." solution suggested above but then read at https://developer.wordpress.org/reference/hooks/gettext/ that this solution can have quite a negative performance impact. I suggest to therefore go with alternative solutions where possible.
In my case I can copy a theme template file to my child theme and edit the string in the template file. This can be a great solution but it of course doesn't help for strings that don't appear in template files.
PS: I meant to add this as a comment but unfortunately I'm not allowed to do so yet.
A: You could use gettext filter:
add_filter( 'gettext', 'cyb_filter_gettext', 10, 3 );
function cyb_filter_gettext( $translated, $original, $domain ) {
// Use the text string exactly as it is in the translation file
if ( $translated == "Categorie: %s" ) {
$translated = "Sectie: %s";
}
return $translated;
}
If you need to filter a translation with context, use gettext_with_context filter:
add_filter( 'gettext_with_context', 'cyb_filter_gettext_with_context', 10, 4 );
function cyb_filter_gettext_with_context( $translated, $original, $context, $domain ) {
// Use the text string exactly as it is in the translation file
if ( $translated == "Categorie: %s" ) {
$translated = "Sectie: %s";
}
return $translated;
}
A translation with context means that a context is given in the gettext function used to translate the string. For example, this is without context:
$translated = __( 'Search', 'textdomain' );
And this is with context:
$translated = _x( 'Search', 'form placeholder', 'textdomain' );
Similar filters are available for plural translations ([_n()][2] and [_nx()][2]): ngettext and ngettext_with_context.
A: It's also possible to use get_the_archive_title filter in your functions.php:
function archive_title_modify( $title ) {
return str_replace('Categorie: ', 'Sectie: ', $title);
}
add_filter('get_the_archive_title', 'archive_title_modify');
The advantage is that it's called only once per page, instead on every translated string as with gettext filter.
| wordpress | {
"language": "en",
"length": 398,
"provenance": "stackexchange_00019.jsonl.gz:455554",
"question_score": "16",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188332"
} | [
-0.0268707275390625,
-0.023193359375,
-0.0143890380859375,
0.0223236083984375,
-0.03448486328125,
-0.023681640625,
0.02374267578125,
-0.0163726806640625,
0.0103912353515625,
0.047821044921875,
0.00927734375,
-0.03692626953125,
0.0711669921875,
-0.030517578125,
-0.0274658203125,
-0.00634765625,
0.03875732421875,
-0.0014448165893554688,
0.053863525390625,
0.0135498046875,
-0.01264190673828125,
0.041412353515625,
0.03411865234375,
-0.0138397216796875,
-0.0022792816162109375,
-0.050567626953125,
0.0826416015625,
-0.03985595703125,
0.004241943359375,
-0.03131103515625,
0.01531982421875,
0.00853729248046875,
0.0258026123046875,
-0.028717041015625,
-0.0057525634765625,
-0.0225067138671875,
-0.0107879638671875,
-0.007091522216796875,
-0.032989501953125,
0.00302886962890625,
0.019744873046875,
-0.0109710693359375,
0.020965576171875,
0.050323486328125,
0.0006709098815917969,
-0.0643310546875,
0.02569580078125,
-0.048309326171875,
0.0096435546875,
0.00011461973190307617,
-0.00995635986328125,
0.0167083740234375,
0.00948333740234375,
-0.039337158203125,
0.0071258544921875,
-0.0017652511596679688,
-0.055511474609375,
0.04864501953125,
0.027496337890625,
0.0222015380859375,
0.0006952285766601562,
0.007015228271484375,
0.00362396240234375,
-0.026947021484375,
0.01377105712890625,
-0.01052093505859375,
0.02294921875,
0.00788116455078125,
-0.04656982421875,
0.0141754150390625,
0.041900634765625,
-0.02130126953125,
0.036865234375,
-0.03521728515625,
-0.0131378173828125,
0.0174560546875,
-0.01953125,
-0.01450347900390625,
0.034332275390625,
-0.030792236328125,
0.01241302490234375,
-0.0258941650390625,
0.031951904296875,
0.01401519775390625,
-0.01264190673828125,
0.03045654296875,
-0.007419586181640625,
-0.0207672119140625,
-0.054168701171875,
-0.028594970703125,
-0.032562255859375,
-0.019683837890625,
-0.08929443359375,
0.018890380859375,
0.0257720947265625,
-0.02935791015625,
0.007366180419921875,
0.027740478515625,
0.00046133995056152344,
0.0411376953125,
-0.006862640380859375,
-0.0179290771484375,
0.032135009765625,
-0.03179931640625,
-0.006702423095703125,
0.0011663436889648438,
-0.00641632080078125,
0.0272979736328125,
0.035614013671875,
0.041229248046875,
-0.0152740478515625,
0.054901123046875,
-0.0160980224609375,
-0.02783203125,
0.0079193115234375,
0.049468994140625,
-0.01222991943359375,
0.01483917236328125,
-0.00557708740234375,
0.02532958984375,
0.00395965576171875,
0.03131103515625,
-0.03289794921875,
-0.03375244140625,
0.0019855499267578125,
-0.037017822265625,
-0.010986328125,
0.006862640380859375,
0.01096343994140625,
0.00801849365234375,
-0.016265869140625,
-0.006229400634765625,
0.01250457763671875,
0.035491943359375,
0.0103607177734375,
-0.005168914794921875,
0.02630615234375,
0.0103302001953125,
0.006099700927734375,
0.0019273757934570312,
0.0031070709228515625,
0.002040863037109375,
0.01137542724609375,
-0.006927490234375,
0.0024662017822265625,
-0.016448974609375,
-0.004329681396484375,
0.045074462890625,
0.0230712890625,
0.0017156600952148438,
0.0305633544921875,
-0.039794921875,
0.04864501953125,
-0.01555633544921875,
-0.0469970703125,
-0.036102294921875,
-0.004894256591796875,
-0.017486572265625,
-0.019012451171875,
-0.033447265625,
-0.049591064453125,
-0.04119873046875,
-0.0232696533203125,
-0.02093505859375,
-0.05877685546875,
0.0802001953125,
0.041351318359375,
0.005428314208984375,
0.0189208984375,
0.0161590576171875,
-0.00728607177734375,
0.0211639404296875,
-0.005283355712890625,
-0.009490966796875,
-0.004337310791015625,
-0.0014400482177734375,
-0.051483154296875,
0.02520751953125,
0.019073486328125,
0.019134521484375,
0.0004973411560058594,
-0.039764404296875,
0.0169830322265625,
0.01690673828125,
-0.0220184326171875,
-0.027557373046875,
0.00382232666015625,
0.045989990234375,
0.0252838134765625,
0.0224609375,
0.01125335693359375,
-0.0220184326171875,
-0.04302978515625,
0.0311737060546875,
-0.00847625732421875,
-0.0280303955078125,
0.004810333251953125,
0.0083770751953125,
-0.0078277587890625,
0.0022945404052734375,
0.0272979736328125,
0.00185394287109375,
0.01071929931640625,
-0.0283355712890625,
-0.03857421875,
-0.007518768310546875,
-0.021026611328125,
0.0380859375,
-0.0037593841552734375,
0.0175018310546875,
0.01493072509765625,
0.0003037452697753906,
-0.023345947265625,
-0.018585205078125,
-0.020111083984375,
-0.00867462158203125,
-0.0180511474609375,
0.01491546630859375,
0.0012426376342773438,
0.01177978515625,
0.0194091796875,
-0.033050537109375,
0.0157928466796875,
0.03009033203125,
0.032470703125,
0.0146331787109375,
0.0009918212890625,
-0.0081329345703125,
0.0809326171875,
0.019195556640625,
0.0132293701171875,
-0.0279693603515625,
0.0240325927734375,
0.0266265869140625,
-0.0171051025390625,
-0.0021152496337890625,
-0.0119781494140625,
-0.031005859375,
-0.0018014907836914062,
0.0345458984375,
0.012420654296875,
0.0113372802734375,
-0.0181121826171875,
0.01105499267578125,
0.0298309326171875,
-0.0010423660278320312,
0.01517486572265625,
0.00655364990234375,
0.042816162109375,
0.046875,
-0.00681304931640625,
-0.02484130859375,
0.006542205810546875,
-0.03216552734375,
0.02288818359375,
0.0265350341796875,
-0.01010894775390625,
-0.08642578125,
0.036895751953125,
-0.0247039794921875,
0.039520263671875,
-0.03302001953125,
-0.08062744140625,
0.0311737060546875,
0.056976318359375,
-0.0200653076171875,
0.0212860107421875,
0.0127410888671875,
-0.039337158203125,
0.00762176513671875,
0.0173492431640625,
-0.0194854736328125,
-0.01450347900390625,
0.03253173828125,
-0.0079345703125,
-0.033966064453125,
-0.019775390625,
0.00896453857421875,
-0.036163330078125,
-0.004886627197265625,
-0.00630950927734375,
0.07147216796875,
-0.007293701171875,
-0.0281524658203125,
-0.0004642009735107422,
-0.04766845703125,
-0.039306640625,
-0.0599365234375,
-0.0257720947265625,
-0.0244598388671875,
0.0233001708984375,
0.02484130859375,
-0.0256500244140625,
0.042572021484375,
-0.06988525390625,
-0.0143585205078125,
0.06524658203125,
-0.048187255859375,
0.035247802734375,
-0.049072265625,
0.054046630859375,
0.042205810546875,
-0.045166015625,
0.0194091796875,
-0.00251007080078125,
-0.01331329345703125,
-0.00925445556640625,
-0.018096923828125,
-0.0302276611328125,
-0.01227569580078125,
-0.067626953125,
-0.00725555419921875,
0.0113525390625,
-0.001415252685546875,
-0.01441192626953125,
-0.0310821533203125,
-0.024078369140625,
-0.0164337158203125,
-0.06756591796875,
-0.033599853515625,
0.03424072265625,
0.033782958984375,
0.040802001953125,
0.0184173583984375,
0.03973388671875,
-0.052001953125,
0.006404876708984375,
-0.007495880126953125,
0.054351806640625,
-0.03387451171875,
-0.0172119140625,
-0.04010009765625,
-0.07757568359375,
-0.08526611328125,
0.022430419921875,
-0.0139312744140625,
0.01508331298828125,
-0.006649017333984375,
0.0080413818359375,
-0.033447265625,
0.01081085205078125,
0.109619140625,
-0.0124053955078125,
-0.01543426513671875,
0.0221099853515625,
-0.0290679931640625,
0.021484375,
0.00445556640625,
0.0016269683837890625,
0.044189453125,
-0.0287628173828125,
-0.0089111328125,
0.0075531005859375,
0.047637939453125,
0.0066070556640625,
-0.00780487060546875,
0.00823211669921875,
0.07379150390625,
0.009796142578125,
-0.003856658935546875,
-0.07696533203125,
0.033447265625,
-0.0374755859375,
0.0574951171875,
0.0158843994140625,
-0.0282440185546875,
0.00971221923828125,
0.04815673828125,
-0.0031604766845703125,
-0.0082244873046875,
0.0594482421875,
-0.0447998046875,
0.02496337890625,
-0.0188140869140625,
-0.006439208984375,
-0.046783447265625,
0.037506103515625,
-0.0277862548828125,
-0.029876708984375,
-0.0116424560546875,
0.0010347366333007812,
0.0162506103515625,
-0.01264190673828125,
0.019317626953125,
-0.048553466796875,
0.049591064453125,
-0.0462646484375,
-0.03179931640625,
-0.004001617431640625,
-0.01360321044921875,
0.0305633544921875,
0.07708740234375,
-0.01488494873046875,
-0.01568603515625,
0.0082550048828125,
0.01690673828125,
0.00284576416015625,
-0.01444244384765625,
-0.0028228759765625,
-0.026153564453125,
-0.0330810546875,
0.01052093505859375,
-0.003143310546875,
-0.00787353515625,
-0.00824737548828125,
0.047119140625,
-0.01788330078125,
-0.02593994140625,
0.021942138671875,
-0.0050201416015625,
0.0280914306640625,
-0.006732940673828125,
0.0020923614501953125,
-0.0189208984375,
-0.003063201904296875,
-0.0247955322265625,
-0.099609375,
-0.0257568359375,
-0.0252532958984375,
0.0997314453125,
-0.005523681640625,
0.0189361572265625,
-0.01239013671875,
0.0672607421875,
-0.0142059326171875,
0.05865478515625,
-0.01678466796875,
0.00830078125,
0.04840087890625,
-0.001148223876953125,
0.00881195068359375,
-0.00963592529296875,
0.0016117095947265625,
0.0245208740234375,
-0.01435089111328125,
0.036224365234375,
-0.0144805908203125,
-0.0144195556640625,
0.0302886962890625,
-0.044891357421875,
-0.06793212890625,
-0.063720703125,
-0.07415771484375,
-0.0325927734375,
-0.0019350051879882812,
-0.034332275390625,
-0.05364990234375,
-0.0711669921875,
0.08349609375,
0.033599853515625,
-0.0024394989013671875,
-0.01305389404296875,
0.056976318359375,
-0.00960540771484375,
-0.05560302734375,
-0.051116943359375,
0.00826263427734375,
0.036773681640625,
-0.0029735565185546875,
0.03729248046875,
-0.00614166259765625,
-0.04180908203125,
0.0693359375,
0.005615234375,
-0.0108795166015625,
0.026123046875,
0.0316162109375,
0.0086669921875,
-0.0323486328125,
0.005680084228515625,
-0.013702392578125,
-0.0282135009765625,
-0.010955810546875,
0.009307861328125,
0.0229339599609375,
0.00792694091796875,
-0.019012451171875,
0.01236724853515625,
0.018096923828125,
0.00791168212890625,
-0.0234832763671875,
0.0195465087890625,
0.0211944580078125,
-0.005157470703125,
0.01203155517578125,
-0.00699615478515625,
-0.01129913330078125,
-0.0153961181640625,
-0.00832366943359375,
0.0052032470703125,
-0.004802703857421875,
-0.004703521728515625,
0.029022216796875,
0.01288604736328125,
-0.0198516845703125,
-0.01219940185546875,
-0.0119171142578125,
0.0092010498046875,
-0.0272979736328125,
-0.04901123046875,
-0.0226593017578125,
0.006656646728515625,
0.04754638671875,
0.06378173828125,
-0.01447296142578125,
-0.0088348388671875,
-0.004825592041015625,
-0.0014696121215820312,
0.0225372314453125,
-0.0219268798828125,
-0.0014295578002929688,
-0.027191162109375,
0.0054931640625,
0.042205810546875,
-0.02813720703125,
0.036163330078125,
0.02301025390625,
0.026611328125,
0.00841522216796875,
-0.0185546875,
-0.004375457763671875,
-0.01727294921875,
0.04901123046875,
0.03875732421875,
-0.05950927734375,
0.01450347900390625,
0.0117645263671875,
0.01038360595703125,
-0.01161956787109375,
0.02923583984375,
0.00478363037109375,
0.031646728515625,
-0.00665283203125,
-0.03411865234375,
0.01313018798828125,
-0.06549072265625,
0.00827789306640625,
0.017669677734375,
-0.0186767578125,
-0.0389404296875,
-0.007843017578125,
-0.0271453857421875,
0.0010156631469726562,
-0.033935546875,
-0.022003173828125,
0.00859832763671875,
-0.0361328125,
-0.003612518310546875,
0.06817626953125,
-0.05218505859375,
0.013397216796875,
0.00783538818359375,
-0.028076171875,
-0.006404876708984375,
0.022979736328125,
-0.017425537109375,
-0.00949859619140625,
-0.00963592529296875,
-0.01294708251953125,
0.01332855224609375,
0.005889892578125,
0.0290985107421875,
-0.0079498291015625,
-0.030181884765625,
0.0260467529296875,
0.01506805419921875,
0.01727294921875,
-0.0277862548828125,
-0.014678955078125,
-0.010528564453125,
-0.06268310546875,
-0.037750244140625,
-0.031982421875,
-0.060516357421875,
-0.0268402099609375,
0.00482177734375,
0.00848388671875,
0.0159149169921875,
0.003993988037109375,
0.0058135986328125,
-0.032623291015625,
0.03497314453125,
0.0298614501953125,
0.05743408203125,
-0.0242767333984375,
0.06787109375,
0.01137542724609375,
0.04168701171875,
-0.0223846435546875,
0.0291900634765625,
-0.01097869873046875,
0.0023193359375,
-0.013580322265625,
-0.034759521484375,
0.0089263916015625,
0.0187530517578125,
-0.038909912109375,
-0.00891876220703125,
0.022857666015625,
0.01059722900390625,
0.01303863525390625,
0.0024738311767578125,
0.00989532470703125,
-0.0192108154296875,
0.014678955078125,
-0.0008592605590820312,
0.0098876953125,
0.00676727294921875,
-0.0186767578125,
0.062469482421875,
-0.033294677734375,
-0.0184478759765625,
0.0596923828125,
-0.05926513671875,
0.064453125,
0.044769287109375,
-0.047821044921875,
0.0239105224609375,
0.046875,
-0.0030879974365234375,
0.02850341796875,
-0.0006413459777832031,
0.007213592529296875,
0.011077880859375,
-0.029205322265625,
0.01910400390625,
0.052459716796875,
0.0008611679077148438,
-0.04638671875,
0.0132904052734375,
-0.034576416015625,
0.0022754669189453125,
-0.00658416748046875,
0.0682373046875,
0.06292724609375,
-0.0726318359375,
-0.0167694091796875,
0.0270233154296875,
-0.0189056396484375,
-0.035247802734375,
0.026885986328125,
-0.04119873046875,
-0.0276641845703125,
0.0130767822265625,
-0.03204345703125,
-0.0157012939453125,
0.01110076904296875,
0.0246429443359375,
0.0033664703369140625,
-0.0120697021484375,
0.0887451171875,
0.047760009765625,
-0.0325927734375,
0.0157928466796875,
0.01488494873046875,
0.034393310546875,
-0.0517578125,
-0.007068634033203125,
0.027679443359375,
-0.0173492431640625,
-0.07049560546875,
0.0421142578125,
0.01197052001953125,
0.01088714599609375,
0.00008535385131835938,
-0.0007610321044921875,
-0.009765625,
0.04931640625,
-0.046112060546875,
0.035736083984375,
0.0154876708984375,
-0.0205078125,
-0.00039839744567871094,
-0.0262451171875,
-0.0209197998046875,
0.021240234375,
-0.0218505859375,
0.010772705078125,
-0.00620269775390625,
-0.01157379150390625,
-0.0103607177734375,
-0.0278167724609375,
0.038604736328125,
-0.0247955322265625,
-0.01666259765625,
0.019195556640625,
0.024078369140625,
0.0020313262939453125,
0.01708984375,
0.0467529296875,
-0.047088623046875,
-0.0330810546875,
0.037750244140625,
-0.046234130859375,
-0.028411865234375,
0.031280517578125,
-0.04248046875,
0.03802490234375,
0.01001739501953125,
0.01373291015625,
0.00537872314453125,
0.021484375,
-0.01551055908203125,
-0.0013103485107421875,
-0.021575927734375,
0.0277252197265625,
-0.0094146728515625,
0.03228759765625,
-0.03021240234375,
-0.01043701171875,
0.0105438232421875,
0.040924072265625,
0.03009033203125,
0.020843505859375,
0.00812530517578125,
-0.0333251953125,
-0.0053253173828125,
0.026214599609375,
-0.026123046875,
0.00931549072265625,
-0.0151824951171875,
0.01163482666015625,
-0.028564453125,
-0.026336669921875,
0.01580810546875,
-0.03094482421875,
-0.057708740234375,
0.01325225830078125,
0.00914764404296875,
-0.0081634521484375,
0.012176513671875,
0.006092071533203125,
-0.07891845703125,
0.01617431640625,
0.056854248046875,
-0.046844482421875,
0.0026912689208984375,
0.0254058837890625,
0.0711669921875,
-0.07568359375,
-0.0205230712890625,
-0.03985595703125,
0.054443359375,
0.03106689453125,
0.02197265625,
0.05841064453125,
0.0182952880859375,
0.026763916015625,
-0.01788330078125,
0.00968170166015625,
-0.002841949462890625,
0.0044708251953125,
0.005687713623046875,
0.004268646240234375,
0.030609130859375,
0.024078369140625,
0.043609619140625,
0.00557708740234375,
-0.003505706787109375,
-0.022918701171875,
0.007678985595703125,
0.01238250732421875,
-0.0008058547973632812,
-0.0292816162109375,
-0.038543701171875,
-0.03765869140625,
0.01123046875,
0.0258636474609375,
-0.0279388427734375,
-0.0289154052734375,
0.008575439453125,
0.054595947265625,
-0.00574493408203125,
-0.03240966796875,
0.00862884521484375,
-0.03887939453125,
-0.068603515625,
0.04730224609375,
0.03515625,
0.07708740234375,
-0.0113983154296875,
0.1019287109375,
0.0022602081298828125,
-0.031951904296875,
0.0125274658203125,
0.003017425537109375,
-0.01568603515625,
-0.01499176025390625,
-0.00665283203125,
-0.0168304443359375,
0.006694793701171875,
0.0231475830078125,
-0.000591278076171875,
0.0220184326171875,
0.039398193359375,
0.056732177734375,
-0.020965576171875,
-0.0101318359375,
0.07171630859375,
-0.024871826171875,
-0.01287078857421875,
-0.0242462158203125,
0.012786865234375,
0.00901031494140625,
0.0016384124755859375,
0.00017893314361572266,
0.062255859375,
-0.01274871826171875,
0.0124359130859375,
0.0225982666015625,
0.0164794921875,
-0.0283660888671875,
0.01401519775390625,
-0.0005125999450683594,
0.073486328125,
0.040283203125,
-0.06463623046875,
-0.0051422119140625,
-0.0214385986328125,
-0.044952392578125,
0.02532958984375,
0.04449462890625,
-0.02130126953125,
0.0026836395263671875,
0.005344390869140625,
-0.03253173828125,
0.0180816650390625,
0.0187225341796875,
-0.0021762847900390625,
0.016143798828125,
0.0271453857421875,
-0.00437164306640625,
-0.004360198974609375,
-0.0023937225341796875,
0.0007114410400390625,
0.038299560546875,
0.038330078125,
0.01313018798828125,
0.00334930419921875,
0.0275421142578125,
-0.032958984375,
0.0139617919921875,
-0.05523681640625,
-0.028564453125,
0.02215576171875,
-0.005725860595703125,
-0.00738525390625,
-0.00615692138671875,
-0.0504150390625,
-0.02386474609375,
0.037506103515625,
-0.0347900390625,
0.01593017578125,
-0.022796630859375,
0.0201873779296875,
-0.03570556640625,
-0.0098724365234375,
-0.036865234375,
-0.0787353515625,
-0.050994873046875,
0.020843505859375,
-0.00420379638671875,
0.0261383056640625,
-0.0130615234375,
0.038726806640625,
-0.00540924072265625,
0.0197296142578125,
0.022247314453125,
-0.0233001708984375,
0.023956298828125,
0.02587890625,
-0.05804443359375,
0.01702880859375,
-0.0135955810546875,
-0.024932861328125,
0.0189666748046875,
0.00144195556640625,
0.0036907196044921875,
-0.0124359130859375,
0.01139068603515625,
-0.0294036865234375,
-0.017913818359375,
0.006145477294921875,
0.004001617431640625,
0.0210723876953125,
-0.055267333984375,
0.007720947265625,
0.016082763671875,
0.0107879638671875,
-0.0098876953125,
-0.0303497314453125,
-0.0372314453125,
-0.0145263671875,
-0.036956787109375,
-0.06103515625,
-0.042510986328125,
-0.02056884765625,
0.0308685302734375,
-0.004161834716796875,
-0.0307769775390625,
0.00007790327072143555,
-0.01313018798828125,
0.028411865234375,
-0.028564453125,
-0.0577392578125,
0.01462554931640625,
0.02227783203125,
-0.05810546875,
-0.0081787109375,
-0.05157470703125,
-0.0557861328125,
-0.05126953125,
-0.0015811920166015625,
0.0511474609375,
-0.0014286041259765625,
-0.06341552734375,
-0.00980377197265625,
-0.0084991455078125,
0.04571533203125,
-0.034271240234375,
-0.020263671875,
-0.0012769699096679688,
-0.01407623291015625,
-0.0234832763671875,
-0.046173095703125,
0.04437255859375,
-0.1031494140625,
-0.028900146484375,
-0.017364501953125,
-0.00428009033203125,
-0.005893707275390625,
-0.0606689453125,
-0.072998046875,
0.02734375,
-0.00972747802734375,
-0.034698486328125,
-0.018218994140625,
0.0198516845703125,
-0.0188751220703125,
0.027801513671875,
-0.0025272369384765625,
-0.004322052001953125,
-0.01025390625,
0.01122283935546875,
0.0265960693359375,
0.0188446044921875,
0.00516510009765625,
0.00919342041015625,
-0.0208892822265625,
0.039337158203125,
0.047637939453125,
0.01255035400390625,
-0.0152740478515625,
0.0157318115234375,
-0.0251922607421875,
-0.00696563720703125,
-0.058929443359375,
-0.02484130859375,
-0.020050048828125,
0.04425048828125,
0.008056640625,
-0.0662841796875,
-0.04443359375,
-0.0298614501953125,
0.0213623046875,
0.0249176025390625,
-0.002105712890625,
-0.0108184814453125,
-0.03826904296875,
-0.004047393798828125,
-0.028778076171875,
-0.0216827392578125,
0.02862548828125,
-0.0888671875,
-0.0033931732177734375,
0.005496978759765625,
-0.02691650390625,
-0.0283660888671875,
-0.01242828369140625,
-0.06298828125,
0.00475311279296875,
-0.029693603515625,
-0.0092620849609375,
-0.0093841552734375,
-0.0775146484375,
0.0849609375,
-0.0160980224609375,
0.014923095703125,
0.0204010009765625,
0.04205322265625,
0.047027587890625,
0.036376953125,
-0.051971435546875,
-0.0076904296875,
0.0195159912109375,
0.0131378173828125,
-0.01337432861328125,
0.0175628662109375,
0.026153564453125,
0.00829315185546875,
0.002902984619140625,
0.0160064697265625,
0.007297515869140625,
0.0382080078125,
-0.0031890869140625,
0.0229644775390625,
0.008514404296875,
-0.007526397705078125,
-0.0070343017578125,
0.0362548828125,
-0.01174163818359375,
0.05133056640625,
-0.02349853515625,
-0.01377105712890625,
-0.010589599609375,
-0.029876708984375,
-0.00021827220916748047,
0.020751953125,
-0.022491455078125,
-0.0150909423828125,
-0.0224456787109375,
-0.0706787109375,
0.005176544189453125,
-0.0091705322265625
]
|
ad78250201bde862a02f08be53e6d1301640cbb1 | Wordpress Stackexchange
Q: Rewriting 'rewrite' slug for custom post type used by plugin quick question: I'm using a plugin that creates a custom-post-type with the rewrite slug /projects/
So myurl.com/projects/single-project
I want to to rewrite `projects/ with
'rewrite' => array('slug'=>''),
Is there a hook or something so that I can hook to for the register_post_type() function of the external plugin?
I want this rewriting to happen in my functions.php and only if this plugin is activated. I know the name of the custom-post-type "ignition_product"
Kind Regards,
Matt
Update
function modify_ign_projects() {
if ( post_type_exists( 'ignition_product' ) ) {
global $wp_post_types, $wp_rewrite;
$wp_post_types['ignition_product']->hierarchical = true;
$args = $wp_post_types['ignition_product'];
//print_r( $args ); // [rewrite] => Array ( [slug] => projects
$wp_rewrite->add_rewrite_tag("%spendenprojekte%", '(.+?)', "projects");
add_post_type_support('ignition_product','page-attributes');
}
}
add_action( 'init', 'modify_ign_projects', 100 );
A: Are you calling flush_rewrite_rules at any moment?
If you are going to change the slug of a custom post type, you also have to call the flush_rewrite_rules.
You can find more documentation here
Setting up custom post type archives in WP3.1? Any luck?
And here
https://codex.wordpress.org/Function_Reference/flush_rewrite_rules
| Q: Rewriting 'rewrite' slug for custom post type used by plugin quick question: I'm using a plugin that creates a custom-post-type with the rewrite slug /projects/
So myurl.com/projects/single-project
I want to to rewrite `projects/ with
'rewrite' => array('slug'=>''),
Is there a hook or something so that I can hook to for the register_post_type() function of the external plugin?
I want this rewriting to happen in my functions.php and only if this plugin is activated. I know the name of the custom-post-type "ignition_product"
Kind Regards,
Matt
Update
function modify_ign_projects() {
if ( post_type_exists( 'ignition_product' ) ) {
global $wp_post_types, $wp_rewrite;
$wp_post_types['ignition_product']->hierarchical = true;
$args = $wp_post_types['ignition_product'];
//print_r( $args ); // [rewrite] => Array ( [slug] => projects
$wp_rewrite->add_rewrite_tag("%spendenprojekte%", '(.+?)', "projects");
add_post_type_support('ignition_product','page-attributes');
}
}
add_action( 'init', 'modify_ign_projects', 100 );
A: Are you calling flush_rewrite_rules at any moment?
If you are going to change the slug of a custom post type, you also have to call the flush_rewrite_rules.
You can find more documentation here
Setting up custom post type archives in WP3.1? Any luck?
And here
https://codex.wordpress.org/Function_Reference/flush_rewrite_rules
A: I searched everywhere in post type registration flow but didn't found a right way (using filter or action) to do it.
All you can do either register the post type again with a different slug (I prefer) or just run those lines of code which WordPress run to build the rewrite rules in register_post_type.
I register this post type with slug book and changed it using this trick.
I am not sure it is 100% correct (as I am rewriting rules for the same post type) but it works.
add_action('registered_post_type', 'testbook', 10, 2);
function testbook($post_type, $args) {
global $wp_rewrite;
if ($post_type == 'book') {
$args->rewrite['slug'] = 'changed_slug_book'; //write your new slug here
if ( $args->has_archive ) {
$archive_slug = $args->has_archive === true ? $args->rewrite['slug'] : $args->has_archive;
if ( $args->rewrite['with_front'] )
$archive_slug = substr( $wp_rewrite->front, 1 ) . $archive_slug;
else
$archive_slug = $wp_rewrite->root . $archive_slug;
add_rewrite_rule( "{$archive_slug}/?$", "index.php?post_type=$post_type", 'top' );
if ( $args->rewrite['feeds'] && $wp_rewrite->feeds ) {
$feeds = '(' . trim( implode( '|', $wp_rewrite->feeds ) ) . ')';
add_rewrite_rule( "{$archive_slug}/feed/$feeds/?$", "index.php?post_type=$post_type" . '&feed=$matches[1]', 'top' );
add_rewrite_rule( "{$archive_slug}/$feeds/?$", "index.php?post_type=$post_type" . '&feed=$matches[1]', 'top' );
}
if ( $args->rewrite['pages'] )
add_rewrite_rule( "{$archive_slug}/{$wp_rewrite->pagination_base}/([0-9]{1,})/?$", "index.php?post_type=$post_type" . '&paged=$matches[1]', 'top' );
}
$permastruct_args = $args->rewrite;
$permastruct_args['feed'] = $permastruct_args['feeds'];
add_permastruct( $post_type, "{$args->rewrite['slug']}/%$post_type%", $permastruct_args );
}
}
| wordpress | {
"language": "en",
"length": 383,
"provenance": "stackexchange_00019.jsonl.gz:455587",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188431"
} | [
0.00974273681640625,
0.005832672119140625,
-0.057647705078125,
-0.04437255859375,
0.01947021484375,
-0.01081085205078125,
0.006183624267578125,
0.007335662841796875,
-0.07373046875,
0.00968170166015625,
0.0088958740234375,
0.02703857421875,
-0.020599365234375,
-0.04229736328125,
0.07061767578125,
-0.01534271240234375,
0.022979736328125,
-0.0011415481567382812,
0.02032470703125,
-0.035247802734375,
0.041412353515625,
-0.017974853515625,
-0.0190887451171875,
0.04913330078125,
0.0175323486328125,
-0.041595458984375,
0.023834228515625,
-0.0266571044921875,
0.006870269775390625,
-0.0281524658203125,
0.01392364501953125,
0.0114898681640625,
0.0210418701171875,
0.0128021240234375,
-0.0018310546875,
0.01155853271484375,
0.05413818359375,
-0.0254669189453125,
-0.002262115478515625,
0.03082275390625,
0.0733642578125,
-0.0606689453125,
-0.037811279296875,
-0.00901031494140625,
0.0036792755126953125,
-0.03143310546875,
0.06475830078125,
-0.031036376953125,
0.0421142578125,
0.025970458984375,
-0.009490966796875,
0.0196990966796875,
-0.006275177001953125,
-0.00453948974609375,
-0.00113677978515625,
0.014984130859375,
-0.03900146484375,
0.028350830078125,
0.01389312744140625,
0.02252197265625,
0.01837158203125,
0.0135650634765625,
0.0037059783935546875,
0.006839752197265625,
-0.020416259765625,
0.004550933837890625,
0.043426513671875,
-0.0002548694610595703,
-0.009063720703125,
-0.0146484375,
0.0225067138671875,
0.02587890625,
0.023040771484375,
0.025421142578125,
-0.006374359130859375,
-0.0704345703125,
0.030059814453125,
-0.006740570068359375,
0.0093841552734375,
0.0244903564453125,
-0.00814056396484375,
-0.05029296875,
0.00768280029296875,
-0.0183563232421875,
-0.00013768672943115234,
-0.00024390220642089844,
-0.016265869140625,
-0.0011043548583984375,
-0.02447509765625,
0.01111602783203125,
-0.0257720947265625,
0.023712158203125,
0.002765655517578125,
0.0038089752197265625,
-0.0156097412109375,
0.004955291748046875,
0.0309600830078125,
-0.002292633056640625,
0.02215576171875,
0.018524169921875,
0.055419921875,
-0.08489990234375,
0.09344482421875,
-0.0302581787109375,
0.005039215087890625,
0.013214111328125,
-0.00791168212890625,
0.039886474609375,
0.0548095703125,
0.0213165283203125,
0.002201080322265625,
0.03515625,
-0.0027790069580078125,
0.009735107421875,
-0.04095458984375,
-0.0164947509765625,
-0.037689208984375,
-0.005565643310546875,
-0.004367828369140625,
0.004291534423828125,
0.0215606689453125,
0.021331787109375,
0.0170440673828125,
0.0233306884765625,
-0.01515960693359375,
0.0011949539184570312,
-0.0077056884765625,
-0.04791259765625,
0.01546478271484375,
0.01593017578125,
-0.03680419921875,
0.017059326171875,
0.08343505859375,
0.042327880859375,
0.0192108154296875,
-0.0191802978515625,
0.00970458984375,
0.0060882568359375,
-0.01271820068359375,
0.0094451904296875,
0.01326751708984375,
-0.0145416259765625,
-0.0093231201171875,
-0.0015888214111328125,
0.049041748046875,
0.0338134765625,
0.00745391845703125,
-0.00695037841796875,
0.00258636474609375,
-0.0166015625,
0.00237274169921875,
-0.0268402099609375,
0.045166015625,
0.0277862548828125,
-0.035888671875,
-0.00443267822265625,
0.039154052734375,
-0.0171661376953125,
-0.032379150390625,
-0.05218505859375,
-0.004634857177734375,
-0.0172882080078125,
0.00975799560546875,
-0.00637054443359375,
-0.037445068359375,
0.039947509765625,
-0.03582763671875,
-0.003414154052734375,
0.0137481689453125,
0.037841796875,
0.029327392578125,
-0.0186920166015625,
-0.005168914794921875,
-0.0244293212890625,
-0.0259246826171875,
-0.01678466796875,
0.0038204193115234375,
0.03594970703125,
-0.0065765380859375,
0.050689697265625,
0.014739990234375,
-0.042205810546875,
0.036529541015625,
-0.0215911865234375,
-0.065673828125,
0.056732177734375,
0.006153106689453125,
0.0477294921875,
0.017120361328125,
-0.01483154296875,
0.045806884765625,
0.0210723876953125,
-0.026763916015625,
0.0199432373046875,
-0.00968170166015625,
-0.0233612060546875,
0.004299163818359375,
-0.0030384063720703125,
-0.0195770263671875,
0.027099609375,
-0.0286407470703125,
0.053497314453125,
-0.0131988525390625,
0.0164031982421875,
-0.0458984375,
0.06500244140625,
-0.0238800048828125,
0.06817626953125,
0.01203155517578125,
0.01158905029296875,
0.005535125732421875,
-0.0024356842041015625,
-0.041168212890625,
0.0311431884765625,
-0.002712249755859375,
0.0258026123046875,
0.01018524169921875,
0.02166748046875,
-0.01132965087890625,
0.0209503173828125,
-0.0010900497436523438,
-0.0150909423828125,
-0.0253753662109375,
0.0034332275390625,
0.0716552734375,
0.003177642822265625,
-0.006748199462890625,
-0.021209716796875,
0.06353759765625,
0.0067901611328125,
-0.0235748291015625,
0.008331298828125,
0.04168701171875,
0.06329345703125,
-0.01152801513671875,
0.006771087646484375,
0.0018062591552734375,
-0.0308380126953125,
-0.01436614990234375,
0.039154052734375,
0.0191497802734375,
0.019256591796875,
-0.01535797119140625,
0.005199432373046875,
0.012786865234375,
-0.0396728515625,
-0.0005803108215332031,
0.00836944580078125,
-0.0197906494140625,
0.036712646484375,
0.0096282958984375,
0.026611328125,
-0.008819580078125,
-0.007659912109375,
-0.01654052734375,
0.03753662109375,
-0.03485107421875,
-0.039794921875,
-0.010009765625,
0.00799560546875,
0.0017290115356445312,
-0.0021762847900390625,
-0.0033283233642578125,
-0.010101318359375,
0.0164642333984375,
-0.004238128662109375,
0.027984619140625,
0.02044677734375,
-0.0313720703125,
-0.016143798828125,
0.0189971923828125,
0.06768798828125,
-0.00904083251953125,
0.039581298828125,
0.060272216796875,
-0.0164947509765625,
-0.036285400390625,
-0.0196990966796875,
0.041259765625,
0.020538330078125,
-0.0203399658203125,
0.016021728515625,
-0.0283203125,
-0.01123046875,
-0.0247039794921875,
-0.0484619140625,
-0.0012636184692382812,
-0.004230499267578125,
0.039031982421875,
-0.0212554931640625,
0.01300811767578125,
-0.0035533905029296875,
-0.005542755126953125,
0.03411865234375,
0.03680419921875,
-0.0487060546875,
0.01922607421875,
-0.0528564453125,
0.06378173828125,
-0.042572021484375,
0.024200439453125,
0.07049560546875,
-0.01056671142578125,
0.01406097412109375,
0.018585205078125,
0.01580810546875,
-0.007106781005859375,
0.050537109375,
0.017333984375,
-0.0161895751953125,
-0.022430419921875,
-0.0081787109375,
0.033782958984375,
0.04498291015625,
0.02813720703125,
-0.0270538330078125,
0.028656005859375,
0.058441162109375,
-0.0218658447265625,
-0.055511474609375,
0.003314971923828125,
-0.10516357421875,
0.0009050369262695312,
-0.0170440673828125,
-0.048797607421875,
-0.00560760498046875,
0.0203399658203125,
0.01132965087890625,
-0.0234222412109375,
0.0174560546875,
-0.05029296875,
-0.06048583984375,
-0.05682373046875,
-0.0323486328125,
-0.0133209228515625,
0.02557373046875,
0.01018524169921875,
0.0035724639892578125,
0.00832366943359375,
-0.035919189453125,
0.02374267578125,
0.060302734375,
-0.0279998779296875,
-0.0047149658203125,
-0.039337158203125,
-0.06646728515625,
0.0535888671875,
-0.0286712646484375,
0.04693603515625,
0.0079803466796875,
0.03082275390625,
0.0281219482421875,
0.006183624267578125,
0.01122283935546875,
0.0196533203125,
0.004058837890625,
0.0159759521484375,
0.029815673828125,
0.023773193359375,
-0.02056884765625,
-0.047149658203125,
-0.018218994140625,
-0.0364990234375,
0.00923919677734375,
0.03564453125,
-0.0121612548828125,
-0.027008056640625,
0.031524658203125,
-0.01456451416015625,
-0.00344085693359375,
0.023193359375,
-0.04913330078125,
0.049896240234375,
-0.0025634765625,
0.0153350830078125,
-0.0298919677734375,
0.02984619140625,
-0.0187225341796875,
0.040191650390625,
0.02484130859375,
-0.006458282470703125,
0.00386810302734375,
-0.0250701904296875,
-0.048614501953125,
-0.050994873046875,
0.00760650634765625,
-0.0938720703125,
-0.0283203125,
-0.04620361328125,
0.034454345703125,
-0.021209716796875,
0.022186279296875,
-0.03271484375,
-0.0210723876953125,
-0.00235748291015625,
0.006866455078125,
-0.00334930419921875,
-0.041961669921875,
-0.005466461181640625,
-0.0189971923828125,
-0.0703125,
0.0130615234375,
0.01398468017578125,
-0.041717529296875,
0.0010805130004882812,
0.00325775146484375,
-0.0236358642578125,
-0.038360595703125,
0.04827880859375,
-0.0236663818359375,
0.00015270709991455078,
0.05255126953125,
-0.02105712890625,
0.0330810546875,
-0.06622314453125,
0.003879547119140625,
-0.10345458984375,
-0.016265869140625,
0.01629638671875,
0.06683349609375,
0.016357421875,
-0.06134033203125,
-0.01169586181640625,
0.0638427734375,
0.003002166748046875,
-0.00891876220703125,
-0.00006687641143798828,
0.000010609626770019531,
-0.048828125,
0.03717041015625,
-0.0015783309936523438,
0.01485443115234375,
0.0188446044921875,
0.0028228759765625,
-0.035858154296875,
0.038116455078125,
-0.0108184814453125,
-0.00018930435180664062,
0.018341064453125,
-0.04364013671875,
-0.03515625,
-0.01541900634765625,
-0.0313720703125,
-0.004878997802734375,
-0.00021159648895263672,
-0.041473388671875,
-0.00510406494140625,
-0.029266357421875,
0.0513916015625,
-0.00977325439453125,
0.018951416015625,
-0.01168060302734375,
0.067138671875,
0.0030574798583984375,
-0.034027099609375,
0.043487548828125,
0.030364990234375,
0.035675048828125,
0.0082244873046875,
0.01016998291015625,
-0.00997161865234375,
-0.011444091796875,
0.022003173828125,
-0.0077667236328125,
-0.0229644775390625,
0.0036563873291015625,
0.0035610198974609375,
0.004238128662109375,
-0.00725555419921875,
-0.006420135498046875,
-0.022735595703125,
0.0631103515625,
0.055908203125,
-0.004268646240234375,
-0.025238037109375,
-0.005046844482421875,
0.053070068359375,
-0.024383544921875,
-0.0062408447265625,
-0.04644775390625,
-0.05609130859375,
0.03570556640625,
0.0089263916015625,
0.0150146484375,
-0.004146575927734375,
0.0070037841796875,
0.03717041015625,
-0.0208740234375,
0.00445556640625,
0.0112762451171875,
0.01251983642578125,
0.004634857177734375,
0.00960540771484375,
0.049346923828125,
0.0181732177734375,
-0.04058837890625,
0.00399017333984375,
0.0305938720703125,
0.009368896484375,
-0.00469207763671875,
-0.02471923828125,
-0.01253509521484375,
-0.0099945068359375,
-0.00870513916015625,
0.016845703125,
0.0253753662109375,
0.01519012451171875,
-0.0019207000732421875,
0.007022857666015625,
-0.0234222412109375,
0.014678955078125,
-0.040740966796875,
-0.05206298828125,
-0.011505126953125,
-0.0278472900390625,
-0.032012939453125,
0.036865234375,
0.004669189453125,
-0.015655517578125,
0.0002065896987915039,
0.0294036865234375,
0.059539794921875,
0.00815582275390625,
0.017425537109375,
0.005527496337890625,
-0.0204925537109375,
0.00634002685546875,
-0.006679534912109375,
-0.042236328125,
0.03167724609375,
0.0223236083984375,
0.049957275390625,
0.00661468505859375,
-0.045867919921875,
0.0015621185302734375,
-0.05487060546875,
-0.01363372802734375,
0.001651763916015625,
0.0036602020263671875,
-0.03472900390625,
-0.019256591796875,
0.0229644775390625,
0.0180206298828125,
0.00569915771484375,
-0.02520751953125,
0.021209716796875,
-0.0300750732421875,
-0.0152435302734375,
0.0513916015625,
-0.051025390625,
-0.000013530254364013672,
0.0180206298828125,
0.031646728515625,
-0.03741455078125,
0.003253936767578125,
-0.035980224609375,
0.0279388427734375,
-0.02801513671875,
-0.004184722900390625,
0.0169525146484375,
0.01064300537109375,
0.025421142578125,
-0.010498046875,
-0.03759765625,
0.027679443359375,
-0.0044708251953125,
0.0197601318359375,
-0.0241241455078125,
0.00988006591796875,
-0.0153350830078125,
-0.040679931640625,
-0.006381988525390625,
0.0242919921875,
-0.04632568359375,
-0.003482818603515625,
-0.0158233642578125,
0.001678466796875,
0.048675537109375,
-0.0262451171875,
-0.026123046875,
0.003963470458984375,
-0.01152801513671875,
-0.00684356689453125,
0.06390380859375,
-0.0043487548828125,
0.045074462890625,
-0.013641357421875,
0.0179595947265625,
-0.004150390625,
-0.0133514404296875,
-0.019989013671875,
0.0036258697509765625,
-0.0233001708984375,
-0.033477783203125,
0.0013217926025390625,
0.00955963134765625,
0.01071929931640625,
0.0543212890625,
0.0687255859375,
0.01177215576171875,
0.006649017333984375,
-0.006381988525390625,
0.0012331008911132812,
-0.032379150390625,
0.0204620361328125,
-0.032745361328125,
0.029205322265625,
-0.01094818115234375,
0.00833892822265625,
0.043243408203125,
0.016326904296875,
-0.00034332275390625,
-0.0183258056640625,
0.00298309326171875,
0.01122283935546875,
-0.0123291015625,
-0.0552978515625,
0.03582763671875,
0.0247955322265625,
0.01837158203125,
0.0184173583984375,
-0.02099609375,
0.029449462890625,
0.00899505615234375,
-0.025421142578125,
0.042388916015625,
0.050537109375,
0.050811767578125,
-0.0200958251953125,
-0.0024318695068359375,
0.020050048828125,
-0.012603759765625,
0.021331787109375,
0.06744384765625,
0.039520263671875,
-0.1036376953125,
-0.0094451904296875,
-0.0212554931640625,
-0.0277862548828125,
0.0390625,
0.0016727447509765625,
0.01096343994140625,
0.0625,
-0.03863525390625,
-0.0027904510498046875,
-0.037811279296875,
-0.01953125,
0.0275421142578125,
-0.005764007568359375,
-0.026153564453125,
0.058441162109375,
-0.006053924560546875,
-0.01064300537109375,
-0.0253753662109375,
-0.019073486328125,
-0.0138702392578125,
-0.035430908203125,
-0.01392364501953125,
0.03802490234375,
-0.0093231201171875,
-0.0308074951171875,
0.0738525390625,
-0.05206298828125,
0.03997802734375,
0.07891845703125,
0.015838623046875,
-0.0015764236450195312,
0.039276123046875,
-0.0034656524658203125,
-0.000152587890625,
0.00478363037109375,
-0.038818359375,
-0.0057220458984375,
-0.0112152099609375,
-0.0011510848999023438,
0.035919189453125,
-0.042510986328125,
0.006954193115234375,
-0.03680419921875,
0.0154876708984375,
-0.019805908203125,
-0.042205810546875,
0.041656494140625,
0.004413604736328125,
-0.01885986328125,
0.03631591796875,
0.02008056640625,
-0.030914306640625,
-0.006504058837890625,
0.0022411346435546875,
-0.041229248046875,
-0.038330078125,
-0.0167388916015625,
-0.06524658203125,
-0.00959014892578125,
-0.03521728515625,
-0.0926513671875,
0.1085205078125,
0.0277099609375,
0.058197021484375,
0.001270294189453125,
0.036468505859375,
-0.023773193359375,
0.0032176971435546875,
-0.01971435546875,
0.023773193359375,
-0.031585693359375,
0.039642333984375,
-0.05706787109375,
-0.0177764892578125,
0.01238250732421875,
0.04388427734375,
0.0714111328125,
0.031494140625,
-0.05645751953125,
-0.0194091796875,
0.0102691650390625,
0.007701873779296875,
-0.021240234375,
0.0638427734375,
-0.0149383544921875,
-0.01052093505859375,
0.01276397705078125,
-0.0208282470703125,
0.0264892578125,
-0.033843994140625,
-0.0162506103515625,
0.005767822265625,
-0.005218505859375,
-0.019927978515625,
-0.036773681640625,
0.007205963134765625,
-0.0218505859375,
-0.024566650390625,
0.0035037994384765625,
0.0025691986083984375,
0.029144287109375,
-0.01453399658203125,
0.035125732421875,
-0.020355224609375,
-0.00787353515625,
-0.00974273681640625,
0.045166015625,
0.00501251220703125,
0.016693115234375,
0.0295562744140625,
0.01953125,
-0.009002685546875,
-0.04449462890625,
-0.0031261444091796875,
-0.024444580078125,
-0.012969970703125,
0.021484375,
0.027252197265625,
0.0498046875,
0.0386962890625,
0.039154052734375,
0.006107330322265625,
0.026580810546875,
-0.0276947021484375,
-0.07550048828125,
0.0062255859375,
0.01245880126953125,
0.028900146484375,
0.0233306884765625,
0.04681396484375,
-0.01371002197265625,
0.02203369140625,
-0.041290283203125,
-0.00661468505859375,
0.0126953125,
0.033782958984375,
-0.031585693359375,
-0.0706787109375,
-0.00485992431640625,
-0.00970458984375,
-0.061798095703125,
0.035797119140625,
0.0082855224609375,
0.09423828125,
0.0163421630859375,
0.080078125,
-0.043975830078125,
-0.038482666015625,
-0.01277923583984375,
-0.0167236328125,
-0.01502227783203125,
0.0313720703125,
-0.06884765625,
-0.0195465087890625,
0.026123046875,
0.061553955078125,
0.037384033203125,
0.022216796875,
0.04827880859375,
0.0180206298828125,
-0.01309967041015625,
-0.0014047622680664062,
0.019317626953125,
-0.0205841064453125,
0.049224853515625,
-0.0236663818359375,
0.03106689453125,
-0.0130462646484375,
-0.017120361328125,
-0.0478515625,
0.018646240234375,
0.010345458984375,
-0.029815673828125,
0.06243896484375,
-0.01537322998046875,
0.00559234619140625,
0.055389404296875,
-0.0044097900390625,
0.06494140625,
0.0138397216796875,
-0.032073974609375,
0.0055999755859375,
-0.0169219970703125,
-0.05499267578125,
-0.00429534912109375,
0.033355712890625,
-0.00018668174743652344,
0.0067138671875,
0.0092010498046875,
0.0243988037109375,
0.004344940185546875,
-0.033721923828125,
-0.0103607177734375,
-0.021942138671875,
0.027984619140625,
0.004398345947265625,
-0.051055908203125,
-0.031341552734375,
-0.00998687744140625,
0.0266876220703125,
-0.01153564453125,
0.0977783203125,
-0.036163330078125,
0.01203155517578125,
-0.037506103515625,
-0.0082855224609375,
-0.0165252685546875,
-0.01439666748046875,
-0.0440673828125,
-0.00115203857421875,
0.0200653076171875,
0.0178375244140625,
-0.0330810546875,
0.00031948089599609375,
0.043609619140625,
-0.040740966796875,
0.020843505859375,
-0.02264404296875,
0.03118896484375,
-0.0401611328125,
0.004154205322265625,
-0.047943115234375,
-0.073974609375,
-0.056640625,
0.00873565673828125,
-0.0113067626953125,
-0.02813720703125,
-0.046875,
0.03826904296875,
-0.001995086669921875,
-0.03564453125,
0.013153076171875,
-0.06402587890625,
0.01568603515625,
0.035400390625,
0.0174560546875,
-0.050018310546875,
0.0226593017578125,
-0.007228851318359375,
-0.0117645263671875,
0.0228118896484375,
0.05633544921875,
0.0058441162109375,
-0.054046630859375,
-0.039581298828125,
-0.0224456787109375,
0.0032482147216796875,
-0.006557464599609375,
0.0163116455078125,
-0.04693603515625,
0.00037169456481933594,
-0.016082763671875,
-0.0286865234375,
-0.0132904052734375,
-0.01800537109375,
-0.006450653076171875,
0.01236724853515625,
0.002445220947265625,
-0.017822265625,
-0.00907135009765625,
-0.01107025146484375,
0.03912353515625,
0.01505279541015625,
-0.07586669921875,
0.03839111328125,
-0.017578125,
0.05340576171875,
-0.004180908203125,
-0.011383056640625,
-0.00281524658203125,
0.0038890838623046875,
-0.03985595703125,
-0.033447265625,
-0.040374755859375,
0.004756927490234375,
-0.0572509765625,
0.0076751708984375,
0.059814453125,
-0.0197601318359375,
-0.038665771484375,
-0.041259765625,
-0.00931549072265625,
0.0204620361328125,
-0.03857421875,
-0.026702880859375,
0.025390625,
-0.0261993408203125,
-0.00982666015625,
-0.05731201171875,
-0.0025234222412109375,
-0.0809326171875,
-0.0240478515625,
0.037994384765625,
-0.01477813720703125,
0.0241851806640625,
-0.0114288330078125,
-0.007221221923828125,
0.038330078125,
0.032073974609375,
-0.0079803466796875,
-0.044586181640625,
-0.0082550048828125,
-0.004787445068359375,
0.035858154296875,
-0.0154571533203125,
-0.0227508544921875,
-0.056121826171875,
0.0216217041015625,
-0.005584716796875,
0.0548095703125,
-0.01953125,
0.01325225830078125,
-0.017974853515625,
0.0092010498046875,
-0.00832366943359375,
-0.008758544921875,
0.0197296142578125,
-0.016326904296875,
0.042449951171875,
0.0165557861328125,
-0.0214080810546875,
0.0291748046875,
0.00829315185546875,
-0.0224151611328125,
0.0236663818359375,
-0.00702667236328125,
-0.040130615234375,
-0.0272369384765625,
0.033538818359375,
0.0146942138671875,
0.00611114501953125,
0.004123687744140625,
0.0128326416015625,
-0.003055572509765625,
-0.05145263671875,
0.0078277587890625,
0.031768798828125,
-0.033599853515625,
-0.01131439208984375,
0.0049285888671875,
0.0230865478515625,
-0.0093536376953125,
0.00917816162109375,
0.017120361328125,
-0.020721435546875,
0.01446533203125,
-0.04901123046875,
0.0117340087890625,
0.06695556640625,
0.0084228515625,
-0.0120849609375,
-0.00405120849609375,
-0.01276397705078125,
-0.021484375,
0.013580322265625,
-0.040618896484375,
-0.007228851318359375,
0.04022216796875,
-0.035125732421875,
0.0076141357421875,
0.0009632110595703125,
0.043121337890625,
-0.0499267578125,
0.0159759521484375,
-0.01284027099609375,
0.010528564453125,
-0.028289794921875,
-0.01108551025390625,
-0.02520751953125,
0.088134765625,
0.01038360595703125,
0.10028076171875,
-0.0085296630859375,
-0.041046142578125,
-0.0008654594421386719,
0.006069183349609375,
-0.0618896484375,
0.01739501953125,
-0.0254974365234375,
-0.037689208984375,
0.006290435791015625,
0.005828857421875,
-0.03619384765625,
-0.0311279296875,
0.0032939910888671875,
-0.0181427001953125,
-0.0164947509765625,
0.00995635986328125
]
|
9e1c5176063ff5553e53fa3feb5f4b1c5525fb92 | Wordpress Stackexchange
Q: Use wp_enqueue_scripts, not wp_print_styles? Everywhere is said that you need to use wp_enqueue_scripts() instead of wp_print_styles().
wp_print_styles() is located in wp-includes/functions.wp-styles.php.
So what does it mean? What should I change? Where? Why? Can it compromise my theme?
A: In short, as of WordPress 3.3 use wp_enqueue_scripts to load JS and CSS. wp_print_styles has/had some minor bugs with it (namely, it may include your scripts in the admin as well) - here and here are some more details on all of that. It doesn't sound like there's any major security flaws or theme breaking here, just better practice to use wp_enqueue_scripts.
Additionally:
*
*wp_enqueue_scripts - for enqueuing on the front end
*login_enqueue_scripts - for enqueuing on the login page
*admin_enqueue_scripts - for enqueuing on admin pages
| Q: Use wp_enqueue_scripts, not wp_print_styles? Everywhere is said that you need to use wp_enqueue_scripts() instead of wp_print_styles().
wp_print_styles() is located in wp-includes/functions.wp-styles.php.
So what does it mean? What should I change? Where? Why? Can it compromise my theme?
A: In short, as of WordPress 3.3 use wp_enqueue_scripts to load JS and CSS. wp_print_styles has/had some minor bugs with it (namely, it may include your scripts in the admin as well) - here and here are some more details on all of that. It doesn't sound like there's any major security flaws or theme breaking here, just better practice to use wp_enqueue_scripts.
Additionally:
*
*wp_enqueue_scripts - for enqueuing on the front end
*login_enqueue_scripts - for enqueuing on the login page
*admin_enqueue_scripts - for enqueuing on admin pages
A: The other answer confuses the function with the action hook. There is nothing wrong with using the wp_print_styles() function to print a stylesheet link, as long as you've already registered/enqueued the stylesheet and know its handle.
(Fun fact: it's the function WP uses under the hood to output the enqueued stylesheets during wp_head().)
The guidance on the core blog and in the Trac ticket advises against using the wp_print_styles hook to enqueue a stylesheet. In WP 3.3, this might have caused your custom stylesheet to load in the admin area, but this was fixed. Regardless, it's still the wrong hook for registering or enqueuing stylesheets, since it fires during the wp_print_styles() function.
Generally, you should use wp_enqueue_style() since it handles registration & enqueueing (and, as a result, printing the link as part of wp_head). All-in-one simplicity.
However, if you need total control over where the stylesheet link is placed (say it needs to go in a specific template part, or wrapped inside <noscript> tags), wp_print_styles() is the right function to use.
Here's an example of how you might use them all:
// functions.php
function addMainStylesheet(){
wp_enqueue_style( 'main-styles', 'main.css' );
}
function registerNoscriptStylesheet(){
// registers the handle, but does not add it to the print queue.
wp_register_style( 'noscript-styles', 'noscript.css' );
}
add_action( 'wp_enqueue_scripts', 'addMainStylesheet' );
add_action( 'wp_enqueue_scripts', 'registerNoscriptStylesheet' );
// header.php
// Fire the `wp_head` hook, which prints the link for main.css
wp_head();
?>
<noscript>
<?php
// Now we'll print the handle we registered earlier
wp_print_styles( 'noscript-styles' );
?>
</noscript>
I'd recommend this question for more about the difference between wp_enqueue_style() and wp_register_style():
Why wp_register_style() is important while I'm using a complete wp_enqueue_style()?
| wordpress | {
"language": "en",
"length": 399,
"provenance": "stackexchange_00019.jsonl.gz:455619",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188510"
} | [
0.018280029296875,
-0.003269195556640625,
-0.0223236083984375,
0.0006899833679199219,
-0.00542449951171875,
-0.06591796875,
0.04595947265625,
0.0009322166442871094,
-0.006717681884765625,
0.0161895751953125,
-0.031341552734375,
0.0167388916015625,
-0.0164337158203125,
-0.01023101806640625,
0.007732391357421875,
-0.045867919921875,
0.05511474609375,
-0.0643310546875,
-0.0147857666015625,
-0.014373779296875,
0.026519775390625,
0.0225067138671875,
-0.0016269683837890625,
0.0733642578125,
-0.006496429443359375,
-0.046844482421875,
0.130126953125,
-0.0127716064453125,
0.0162811279296875,
-0.0172576904296875,
0.021820068359375,
-0.03839111328125,
0.019622802734375,
0.0189056396484375,
-0.022979736328125,
0.0158843994140625,
0.0225982666015625,
-0.00885772705078125,
0.021453857421875,
0.003261566162109375,
-0.0012044906616210938,
0.0099029541015625,
0.005893707275390625,
-0.01557159423828125,
-0.0157470703125,
-0.006435394287109375,
-0.019378662109375,
-0.0207061767578125,
-0.0059051513671875,
0.04150390625,
0.0059814453125,
-0.00476837158203125,
0.006000518798828125,
0.0560302734375,
-0.00380706787109375,
0.00901031494140625,
-0.018157958984375,
-0.0176849365234375,
0.0216522216796875,
0.0295257568359375,
-0.001987457275390625,
0.002231597900390625,
0.008026123046875,
-0.03076171875,
-0.02679443359375,
-0.003681182861328125,
-0.0035800933837890625,
-0.005916595458984375,
0.006595611572265625,
-0.01448822021484375,
0.0133209228515625,
0.0003154277801513672,
0.01068115234375,
-0.025177001953125,
-0.04278564453125,
0.021392822265625,
0.01171875,
-0.020172119140625,
0.0236358642578125,
-0.019805908203125,
-0.0240478515625,
-0.02899169921875,
-0.060302734375,
-0.012847900390625,
0.0048980712890625,
0.00783538818359375,
-0.01523590087890625,
-0.00144195556640625,
-0.0037860870361328125,
-0.0277557373046875,
-0.0187225341796875,
-0.018402099609375,
-0.0007147789001464844,
-0.0168914794921875,
-0.01441192626953125,
-0.0433349609375,
0.027496337890625,
0.069091796875,
0.0345458984375,
0.04193115234375,
-0.0200653076171875,
-0.02886962890625,
0.00335693359375,
-0.033538818359375,
-0.005828857421875,
0.07086181640625,
0.01300048828125,
0.004573822021484375,
0.026947021484375,
0.00714111328125,
0.023590087890625,
-0.017486572265625,
0.0027256011962890625,
-0.047088623046875,
0.0086517333984375,
0.025421142578125,
-0.01004791259765625,
0.0408935546875,
0.03131103515625,
0.01837158203125,
0.0220947265625,
0.039886474609375,
0.00620269775390625,
-0.019012451171875,
-0.023162841796875,
-0.0200042724609375,
0.000514984130859375,
-0.055908203125,
0.0394287109375,
0.055908203125,
-0.025665283203125,
-0.022552490234375,
0.039581298828125,
-0.004215240478515625,
-0.0191192626953125,
-0.0277862548828125,
0.0283050537109375,
0.0018177032470703125,
-0.0223388671875,
0.0009760856628417969,
0.005340576171875,
-0.02069091796875,
0.009613037109375,
-0.0273590087890625,
-0.0230255126953125,
0.0211944580078125,
0.03741455078125,
0.0135345458984375,
-0.03106689453125,
-0.053985595703125,
0.00664520263671875,
0.0028629302978515625,
0.01280975341796875,
-0.0016622543334960938,
0.0290985107421875,
-0.0261688232421875,
0.025360107421875,
-0.0117340087890625,
0.004146575927734375,
-0.014984130859375,
-0.03448486328125,
0.02337646484375,
0.028564453125,
-0.035186767578125,
0.0018901824951171875,
-0.05499267578125,
0.0012025833129882812,
0.0120086669921875,
0.03375244140625,
-0.0292510986328125,
-0.0177764892578125,
-0.0679931640625,
0.0290374755859375,
-0.002033233642578125,
-0.015838623046875,
0.07000732421875,
-0.005084991455078125,
0.031494140625,
0.04180908203125,
-0.01113128662109375,
-0.04315185546875,
-0.03900146484375,
0.0731201171875,
-0.057220458984375,
-0.051361083984375,
-0.05133056640625,
0.0372314453125,
0.048004150390625,
0.033782958984375,
0.0343017578125,
0.08050537109375,
-0.0247650146484375,
-0.0267333984375,
0.0115814208984375,
-0.0152740478515625,
-0.005474090576171875,
0.00705718994140625,
0.0169677734375,
-0.0008826255798339844,
-0.0367431640625,
0.0201416015625,
0.009368896484375,
0.020263671875,
-0.0004794597625732422,
-0.01751708984375,
0.02020263671875,
-0.01221466064453125,
0.03582763671875,
-0.02313232421875,
0.00007826089859008789,
0.001705169677734375,
-0.016815185546875,
0.0197906494140625,
-0.052032470703125,
-0.029205322265625,
0.0285186767578125,
-0.0141448974609375,
0.07025146484375,
0.00443267822265625,
0.0338134765625,
0.029144287109375,
-0.039794921875,
0.0328369140625,
0.0047149658203125,
-0.01422119140625,
-0.0180816650390625,
-0.0219879150390625,
-0.028564453125,
-0.007221221923828125,
-0.0169830322265625,
0.0222625732421875,
0.046600341796875,
0.009613037109375,
0.107421875,
0.0246429443359375,
-0.0249786376953125,
0.01043701171875,
-0.00823974609375,
0.039215087890625,
0.005084991455078125,
0.0537109375,
0.0391845703125,
0.01494598388671875,
-0.0034847259521484375,
0.04742431640625,
-0.040374755859375,
0.0229034423828125,
-0.031524658203125,
-0.0194091796875,
-0.0040283203125,
0.01061248779296875,
-0.004261016845703125,
0.0273284912109375,
-0.067138671875,
-0.01096343994140625,
0.053985595703125,
-0.02716064453125,
0.01085662841796875,
0.00971221923828125,
0.002483367919921875,
0.01441192626953125,
0.03369140625,
0.022491455078125,
0.0010480880737304688,
-0.01702880859375,
-0.006195068359375,
0.00632476806640625,
-0.000053048133850097656,
0.002727508544921875,
-0.032257080078125,
0.02105712890625,
-0.0116119384765625,
0.006317138671875,
0.047515869140625,
-0.03424072265625,
0.005313873291015625,
-0.0220489501953125,
-0.0010051727294921875,
-0.0015230178833007812,
0.0230712890625,
-0.0018491744995117188,
0.04931640625,
-0.047332763671875,
-0.025726318359375,
-0.022674560546875,
-0.06182861328125,
-0.021514892578125,
0.0194549560546875,
0.03125,
0.012176513671875,
0.03753662109375,
0.037689208984375,
0.0266265869140625,
0.007633209228515625,
0.019317626953125,
-0.01047515869140625,
0.034698486328125,
0.01123809814453125,
0.01568603515625,
-0.01050567626953125,
0.015472412109375,
0.030914306640625,
-0.01873779296875,
0.006961822509765625,
0.0000762939453125,
0.04510498046875,
0.025634765625,
-0.0176239013671875,
-0.01148223876953125,
0.0010271072387695312,
-0.054351806640625,
-0.03021240234375,
0.04107666015625,
0.024139404296875,
0.0169219970703125,
-0.01557159423828125,
-0.0144500732421875,
0.02081298828125,
-0.0980224609375,
-0.1146240234375,
-0.062408447265625,
-0.12493896484375,
0.02423095703125,
-0.036773681640625,
-0.049224853515625,
0.0117950439453125,
0.00982666015625,
0.034332275390625,
0.005680084228515625,
-0.01776123046875,
-0.0052642822265625,
-0.0244293212890625,
-0.033843994140625,
-0.02734375,
0.0084991455078125,
-0.0103607177734375,
0.0003266334533691406,
0.06732177734375,
0.0018863677978515625,
-0.046173095703125,
-0.00881195068359375,
-0.002643585205078125,
-0.01561737060546875,
-0.0100250244140625,
0.0236968994140625,
-0.038818359375,
-0.047698974609375,
0.010467529296875,
-0.030914306640625,
-0.016815185546875,
0.01934814453125,
-0.0181732177734375,
-0.00798797607421875,
-0.042236328125,
-0.01082611083984375,
0.04437255859375,
0.006183624267578125,
-0.0290069580078125,
0.002834320068359375,
-0.059844970703125,
-0.032867431640625,
0.00853729248046875,
-0.03277587890625,
0.046051025390625,
0.0031871795654296875,
-0.0225830078125,
0.0248870849609375,
0.01331329345703125,
0.037933349609375,
0.01153564453125,
-0.02520751953125,
-0.0014829635620117188,
0.07281494140625,
0.01557159423828125,
0.0386962890625,
-0.0147857666015625,
-0.0205078125,
-0.043731689453125,
0.03118896484375,
-0.0241851806640625,
-0.01129913330078125,
-0.0190582275390625,
-0.01184844970703125,
-0.0222625732421875,
-0.05810546875,
0.03424072265625,
-0.0418701171875,
0.00853729248046875,
-0.0299224853515625,
-0.006320953369140625,
0.021575927734375,
0.10186767578125,
-0.04296875,
-0.006000518798828125,
0.0261993408203125,
0.037994384765625,
-0.083740234375,
-0.06976318359375,
-0.036834716796875,
0.0158843994140625,
-0.059906005859375,
-0.00811004638671875,
-0.04217529296875,
-0.025909423828125,
0.0030269622802734375,
-0.0166168212890625,
-0.015838623046875,
-0.061248779296875,
0.033416748046875,
0.00792694091796875,
-0.00705718994140625,
-0.00472259521484375,
-0.01953125,
-0.023223876953125,
0.003185272216796875,
-0.0108489990234375,
-0.087890625,
-0.00540924072265625,
-0.0767822265625,
0.09332275390625,
0.058380126953125,
-0.024932861328125,
0.036590576171875,
0.065673828125,
0.01024627685546875,
-0.015625,
0.032958984375,
0.0242919921875,
-0.0390625,
0.010406494140625,
0.019134521484375,
-0.0379638671875,
-0.0201263427734375,
0.006481170654296875,
-0.06439208984375,
-0.0235748291015625,
0.00600433349609375,
-0.031585693359375,
0.06854248046875,
-0.034149169921875,
-0.0289459228515625,
0.0096588134765625,
0.038909912109375,
0.0025539398193359375,
0.024261474609375,
-0.01910400390625,
0.0009965896606445312,
-0.0028514862060546875,
0.012054443359375,
-0.00485992431640625,
-0.0050048828125,
-0.00833892822265625,
0.039581298828125,
0.03570556640625,
-0.01148223876953125,
0.006866455078125,
-0.01056671142578125,
0.00983428955078125,
0.0039825439453125,
0.01558685302734375,
-0.005512237548828125,
-0.0187835693359375,
0.0215911865234375,
-0.005062103271484375,
-0.037109375,
-0.01045989990234375,
0.07666015625,
-0.004985809326171875,
-0.0223846435546875,
-0.007080078125,
-0.053253173828125,
0.02716064453125,
0.0033473968505859375,
0.0298004150390625,
-0.0244598388671875,
0.039825439453125,
0.0088653564453125,
0.017242431640625,
-0.03765869140625,
-0.0162200927734375,
-0.03143310546875,
-0.0103607177734375,
0.01739501953125,
0.057952880859375,
0.0297393798828125,
-0.01358795166015625,
0.032440185546875,
0.05743408203125,
0.01328277587890625,
0.036376953125,
0.0252685546875,
0.0214385986328125,
0.043701171875,
0.0380859375,
0.0159454345703125,
-0.00760650634765625,
-0.0082855224609375,
0.022735595703125,
-0.01629638671875,
-0.05908203125,
-0.051727294921875,
0.0050048828125,
0.07470703125,
0.01253509521484375,
0.0296630859375,
0.05499267578125,
-0.01471710205078125,
-0.038299560546875,
-0.0389404296875,
-0.01476287841796875,
-0.0253143310546875,
-0.06439208984375,
0.005512237548828125,
-0.0234527587890625,
-0.015533447265625,
0.0035800933837890625,
0.019500732421875,
-0.0203399658203125,
0.0251007080078125,
-0.01299285888671875,
-0.0168609619140625,
-0.033233642578125,
0.02203369140625,
0.005435943603515625,
0.0031566619873046875,
0.0225372314453125,
-0.0064544677734375,
0.0572509765625,
-0.0159454345703125,
0.021270751953125,
0.0218353271484375,
0.02374267578125,
-0.0181884765625,
-0.016693115234375,
0.024871826171875,
-0.0206451416015625,
-0.01654052734375,
-0.0013256072998046875,
-0.01311492919921875,
-0.0179443359375,
-0.006237030029296875,
0.00939178466796875,
0.0169830322265625,
0.012969970703125,
0.01519775390625,
0.01557159423828125,
0.00011414289474487305,
0.01059722900390625,
-0.027801513671875,
-0.005401611328125,
-0.00995635986328125,
-0.009796142578125,
-0.0186309814453125,
-0.00493621826171875,
-0.0001970529556274414,
-0.032806396484375,
-0.034027099609375,
0.004192352294921875,
-0.0230255126953125,
0.00917816162109375,
-0.0158233642578125,
0.024261474609375,
-0.038421630859375,
-0.000934600830078125,
-0.0281524658203125,
0.02020263671875,
0.0169219970703125,
0.007526397705078125,
-0.0192718505859375,
-0.036865234375,
-0.039581298828125,
-0.02752685546875,
-0.065185546875,
-0.049713134765625,
-0.0132598876953125,
0.0231475830078125,
-0.0184783935546875,
0.0011510848999023438,
-0.04913330078125,
-0.05487060546875,
-0.055816650390625,
0.055816650390625,
0.05657958984375,
0.07794189453125,
-0.031768798828125,
0.0804443359375,
0.018707275390625,
-0.00433349609375,
-0.0016260147094726562,
0.04510498046875,
0.00453948974609375,
-0.00412750244140625,
-0.0011987686157226562,
-0.035430908203125,
-0.006107330322265625,
-0.013946533203125,
0.016387939453125,
0.01983642578125,
0.039764404296875,
0.0033779144287109375,
0.037628173828125,
0.01151275634765625,
-0.0009055137634277344,
-0.0019130706787109375,
-0.0260162353515625,
0.0047607421875,
0.0265960693359375,
0.05224609375,
0.006458282470703125,
0.04339599609375,
-0.022918701171875,
-0.0009851455688476562,
0.03302001953125,
-0.0175018310546875,
0.040374755859375,
-0.0181121826171875,
-0.04400634765625,
0.046142578125,
-0.001605987548828125,
0.0001901388168334961,
-0.00670623779296875,
-0.022125244140625,
-0.005100250244140625,
-0.04180908203125,
0.012298583984375,
-0.0148773193359375,
-0.0406494140625,
0.049652099609375,
-0.008544921875,
-0.017242431640625,
0.0286102294921875,
-0.0190277099609375,
0.0167083740234375,
0.06402587890625,
0.048919677734375,
-0.0933837890625,
0.020538330078125,
-0.01326751708984375,
-0.0108642578125,
0.0338134765625,
-0.0207366943359375,
0.0006999969482421875,
-0.0189208984375,
0.10345458984375,
-0.00911712646484375,
0.007770538330078125,
0.05084228515625,
-0.030181884765625,
-0.0007548332214355469,
-0.0322265625,
-0.0094757080078125,
-0.0116119384765625,
-0.036865234375,
-0.001068115234375,
0.028045654296875,
-0.02679443359375,
-0.0030231475830078125,
-0.003971099853515625,
-0.0034351348876953125,
-0.04168701171875,
-0.039215087890625,
0.004608154296875,
-0.037261962890625,
-0.00923919677734375,
-0.018768310546875,
0.0190887451171875,
0.03631591796875,
0.0278167724609375,
0.004444122314453125,
-0.0162353515625,
0.0006117820739746094,
0.0316162109375,
0.040374755859375,
-0.0321044921875,
0.060699462890625,
0.0499267578125,
-0.1109619140625,
0.030029296875,
0.003322601318359375,
-0.0283050537109375,
-0.01435089111328125,
-0.016754150390625,
0.041748046875,
-0.028106689453125,
-0.0036678314208984375,
-0.01654052734375,
0.0283966064453125,
0.0379638671875,
-0.0296630859375,
0.02484130859375,
-0.0810546875,
-0.05230712890625,
-0.00499725341796875,
-0.0675048828125,
-0.016357421875,
-0.04638671875,
-0.03839111328125,
0.06341552734375,
-0.018280029296875,
0.00841522216796875,
0.02166748046875,
0.022369384765625,
-0.013397216796875,
-0.00817108154296875,
0.00931549072265625,
0.0225830078125,
-0.0210113525390625,
0.0229949951171875,
-0.001495361328125,
-0.00481414794921875,
0.030670166015625,
0.03741455078125,
0.0034732818603515625,
-0.004375457763671875,
-0.03338623046875,
-0.0103302001953125,
0.04180908203125,
0.09124755859375,
0.06085205078125,
-0.01495361328125,
-0.00321197509765625,
0.0164794921875,
-0.0026226043701171875,
-0.06463623046875,
0.0090179443359375,
-0.031219482421875,
-0.0130157470703125,
0.02484130859375,
-0.01026153564453125,
-0.0186614990234375,
-0.01605224609375,
-0.0155487060546875,
-0.055877685546875,
0.003082275390625,
0.0242919921875,
0.041259765625,
-0.039581298828125,
0.052032470703125,
-0.009918212890625,
-0.038177490234375,
-0.04241943359375,
-0.0303955078125,
0.015960693359375,
-0.0037174224853515625,
0.00975799560546875,
0.025482177734375,
0.01904296875,
0.059906005859375,
0.019744873046875,
0.01397705078125,
0.0295257568359375,
0.00787353515625,
0.03326416015625,
0.0219879150390625,
0.047027587890625,
0.0279083251953125,
0.0189361572265625,
-0.038665771484375,
0.00534820556640625,
-0.030059814453125,
-0.0010700225830078125,
0.01094818115234375,
0.0012683868408203125,
0.0010957717895507812,
-0.0214385986328125,
0.017913818359375,
-0.02630615234375,
-0.0110015869140625,
-0.020172119140625,
-0.0184783935546875,
0.0236968994140625,
-0.002727508544921875,
0.0006513595581054688,
0.0050811767578125,
0.005306243896484375,
0.0129547119140625,
-0.031280517578125,
0.0018739700317382812,
0.014068603515625,
0.044586181640625,
0.020538330078125,
0.0184326171875,
-0.01099395751953125,
-0.0216522216796875,
-0.046142578125,
0.01361846923828125,
0.0091400146484375,
0.053955078125,
-0.032440185546875,
0.04168701171875,
-0.00701904296875,
0.0325927734375,
-0.0069122314453125,
-0.0084686279296875,
0.032257080078125,
0.00543212890625,
-0.0821533203125,
-0.0165863037109375,
0.01055145263671875,
-0.041717529296875,
-0.00765228271484375,
0.0111236572265625,
-0.01265716552734375,
0.01375579833984375,
-0.0100860595703125,
-0.012359619140625,
0.054595947265625,
0.01178741455078125,
-0.05181884765625,
0.0197906494140625,
0.00490570068359375,
-0.02520751953125,
-0.00017511844635009766,
0.01364898681640625,
0.038299560546875,
-0.00763702392578125,
-0.030670166015625,
-0.01512908935546875,
0.009613037109375,
0.049957275390625,
-0.01540374755859375,
0.004138946533203125,
-0.0095672607421875,
0.047515869140625,
0.076171875,
-0.038787841796875,
0.00919342041015625,
0.04571533203125,
0.015899658203125,
-0.0034084320068359375,
0.024444580078125,
0.013275146484375,
-0.045196533203125,
-0.0286102294921875,
-0.01548004150390625,
0.05242919921875,
0.0052032470703125,
0.017730712890625,
-0.00726318359375,
0.0196533203125,
0.0207977294921875,
0.0101776123046875,
-0.017425537109375,
-0.0095367431640625,
0.025970458984375,
-0.04766845703125,
0.00371551513671875,
0.0018548965454101562,
-0.041595458984375,
0.0029392242431640625,
0.026458740234375,
-0.0038509368896484375,
0.00241851806640625,
0.005748748779296875,
0.01538848876953125,
-0.0124969482421875,
0.01230621337890625,
-0.03790283203125,
-0.033203125,
-0.01416778564453125,
0.019561767578125,
-0.020538330078125,
-0.050750732421875,
-0.027923583984375,
0.002410888671875,
0.05230712890625,
-0.021026611328125,
0.0290679931640625,
-0.0035247802734375,
0.05377197265625,
0.02227783203125,
0.02288818359375,
0.0126495361328125,
0.003078460693359375,
-0.01055908203125,
0.03082275390625,
-0.0006628036499023438,
0.04095458984375,
-0.0013990402221679688,
0.0219573974609375,
-0.007049560546875,
0.04217529296875,
0.02777099609375,
0.005023956298828125,
0.000171661376953125,
0.0300750732421875,
-0.04827880859375,
-0.0357666015625,
-0.0154571533203125,
-0.01276397705078125,
-0.039703369140625,
-0.00896453857421875,
0.00548553466796875,
-0.01062774658203125,
-0.01934814453125,
-0.00921630859375,
-0.01325225830078125,
0.03375244140625,
-0.0035552978515625,
-0.0458984375,
0.04278564453125,
-0.055328369140625,
-0.004192352294921875,
-0.0111236572265625,
0.026092529296875,
0.005550384521484375,
0.0274810791015625,
-0.060546875,
-0.0238800048828125,
-0.0269622802734375,
0.0200042724609375,
-0.037841796875,
0.01268768310546875,
0.040283203125,
-0.0209503173828125,
0.00928497314453125,
0.0162811279296875,
0.01454925537109375,
0.06170654296875,
-0.0386962890625,
-0.01369476318359375,
-0.0014638900756835938,
0.03546142578125,
-0.006694793701171875,
-0.058258056640625,
-0.0106048583984375,
-0.011444091796875,
0.0190582275390625,
0.01268768310546875,
-0.0147247314453125,
0.0038051605224609375,
-0.04290771484375,
-0.0994873046875,
0.044097900390625,
-0.01267242431640625,
-0.04180908203125,
-0.0379638671875,
-0.020477294921875,
0.0156097412109375,
-0.0130767822265625,
-0.018402099609375,
-0.02978515625,
-0.06610107421875,
0.00531005859375,
0.0217437744140625,
0.031890869140625,
0.0311279296875,
-0.01410675048828125,
-0.0229339599609375,
0.01395416259765625,
0.0115814208984375,
0.033477783203125,
-0.04034423828125,
0.0201416015625,
0.00786590576171875,
0.006824493408203125,
-0.0115966796875,
0.0247344970703125,
0.034088134765625,
0.03265380859375,
-0.00963592529296875,
0.050537109375,
-0.0242767333984375,
0.04229736328125,
0.09747314453125,
0.046600341796875,
0.024658203125,
-0.054901123046875,
-0.0252532958984375,
-0.0196685791015625,
0.0065155029296875,
-0.00662994384765625,
0.01259613037109375,
-0.03948974609375,
-0.006626129150390625,
0.0035228729248046875,
-0.0076904296875,
-0.03546142578125,
-0.0087127685546875,
-0.0304718017578125,
-0.0330810546875,
-0.031768798828125,
-0.0003440380096435547,
0.0031585693359375,
-0.05169677734375,
0.06890869140625,
-0.0206451416015625,
0.0379638671875,
-0.0033721923828125,
0.05059814453125,
0.0511474609375,
0.0186614990234375,
-0.0195465087890625,
0.045257568359375,
-0.05987548828125,
-0.01448822021484375,
-0.0130157470703125,
0.01007080078125,
-0.0302734375,
0.03375244140625,
0.01505279541015625,
-0.00982666015625,
-0.0189971923828125,
-0.0208282470703125,
0.0149383544921875,
0.00357818603515625,
-0.0274810791015625,
0.04681396484375,
-0.0325927734375,
-0.0027904510498046875,
-0.030609130859375,
0.01023101806640625,
0.00652313232421875,
0.00685882568359375,
0.056640625,
-0.01456451416015625,
0.01227569580078125,
-0.00963592529296875,
0.00859832763671875,
-0.010467529296875,
-0.00926971435546875,
-0.024566650390625,
-0.00572967529296875,
0.00064849853515625
]
|
8fe45f35034997af5be50fc614b2e859f86019ae | Wordpress Stackexchange
Q: View WordPress page template usage (or unused) When I create a new page within WordPress, I have the option of specifying which template to use from my theme (from a dropdown list on the right-hand side of the interface).
I need to find which of the available templates are unused, so that I can delete them.
How is this done please?
WP version is 4.2.2
A: What you need to do is compare the values of the meta field _wp_page_template, which contains the page template selected for a single page with the available page templates.
For this you need to construct an array of used templates, because you want the templates used by all the pages, similar as shown here:
*
*Return all custom meta data for one custom post type
Use array_unique to get unique values.
Then you need to get the available page templates, as shown here:
*
*get page templates
Last but not least, you can use array_diff to compare the arrays of used and available templates, which subsequently gives you the unused templates.
| Q: View WordPress page template usage (or unused) When I create a new page within WordPress, I have the option of specifying which template to use from my theme (from a dropdown list on the right-hand side of the interface).
I need to find which of the available templates are unused, so that I can delete them.
How is this done please?
WP version is 4.2.2
A: What you need to do is compare the values of the meta field _wp_page_template, which contains the page template selected for a single page with the available page templates.
For this you need to construct an array of used templates, because you want the templates used by all the pages, similar as shown here:
*
*Return all custom meta data for one custom post type
Use array_unique to get unique values.
Then you need to get the available page templates, as shown here:
*
*get page templates
Last but not least, you can use array_diff to compare the arrays of used and available templates, which subsequently gives you the unused templates.
A: Update:
Page Template Usage Info in WordPress 4.4+
In WordPress 4.4 the array_intersect_assoc() was removed from the WP_Theme::get_page_templates() method.
See ticket #13265 and changeset #34995.
We can therefore add the page templates usage info, directly into the template dropdown, with the theme_page_templates filter, without using javascript or some clever object cache tricks explained here by @MikeSchinkel or here by @gmazzap.
Here's a demo (PHP 5.4+):
add_filter( 'theme_page_templates', function( $page_templates, $obj, $post )
{
// Restrict to the post.php loading
if( ! did_action( 'load-post.php' ) )
return $page_templates;
foreach( (array) $page_templates as $key => $template )
{
$posts = get_posts(
[
'post_type' => 'any',
'post_status' => 'any',
'posts_per_page' => 10,
'fields' => 'ids',
'meta_query' => [
[
'key' => '_wp_page_template',
'value' => $key,
'compare' => '=',
]
]
]
);
$count = count( $posts );
// Add the count to the template name in the dropdown. Use 10+ for >= 10
$page_templates[$key] = sprintf(
'%s (%s)',
$template,
$count >= 10 ? '10+' : $count
);
}
return $page_templates;
}, 10, 3 );
Example:
Here we can see how it could look like, with the usage count info added to the template names :
Hope you can adjust this to your needs!
| wordpress | {
"language": "en",
"length": 379,
"provenance": "stackexchange_00019.jsonl.gz:455653",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188635"
} | [
-0.02862548828125,
-0.018280029296875,
-0.001773834228515625,
0.0277557373046875,
-0.0236358642578125,
-0.0261077880859375,
0.0291595458984375,
-0.035797119140625,
0.016845703125,
-0.005001068115234375,
-0.0291290283203125,
-0.01123046875,
-0.025360107421875,
-0.0258331298828125,
-0.0015211105346679688,
-0.049591064453125,
0.037506103515625,
-0.02325439453125,
0.02520751953125,
-0.014739990234375,
0.0128326416015625,
0.006618499755859375,
0.01165008544921875,
0.060028076171875,
0.031951904296875,
-0.055450439453125,
0.0361328125,
-0.006244659423828125,
-0.00909423828125,
-0.045684814453125,
0.0164794921875,
0.049713134765625,
0.001148223876953125,
0.0007100105285644531,
0.0267333984375,
-0.043731689453125,
-0.0211944580078125,
0.0151824951171875,
0.0208587646484375,
-0.0202789306640625,
-0.0012807846069335938,
0.010223388671875,
0.023956298828125,
-0.003543853759765625,
-0.008392333984375,
0.0144805908203125,
-0.031524658203125,
-0.046875,
-0.025238037109375,
0.028961181640625,
0.02197265625,
-0.06610107421875,
0.0255584716796875,
0.037353515625,
-0.02178955078125,
-0.03863525390625,
0.033447265625,
0.0270843505859375,
0.040802001953125,
-0.02630615234375,
-0.05267333984375,
0.0157623291015625,
0.01186370849609375,
-0.0286712646484375,
-0.01085662841796875,
0.0025539398193359375,
-0.028961181640625,
0.0139617919921875,
-0.0166473388671875,
-0.00391387939453125,
0.0180511474609375,
-0.017242431640625,
-0.0133819580078125,
-0.045318603515625,
-0.0131988525390625,
0.0313720703125,
0.006839752197265625,
-0.0247802734375,
-0.0214691162109375,
0.00846099853515625,
-0.004405975341796875,
-0.0017795562744140625,
-0.058349609375,
-0.01702880859375,
0.01390838623046875,
0.0167694091796875,
-0.0034580230712890625,
-0.02197265625,
-0.0443115234375,
-0.016937255859375,
-0.03875732421875,
-0.032623291015625,
-0.006374359130859375,
-0.01181793212890625,
-0.042327880859375,
0.00917816162109375,
0.02191162109375,
0.069091796875,
-0.044830322265625,
-0.0003905296325683594,
-0.0194244384765625,
-0.027130126953125,
0.0182647705078125,
-0.044677734375,
0.01522064208984375,
0.0262908935546875,
-0.01605224609375,
-0.01708984375,
0.036407470703125,
0.041900634765625,
0.006389617919921875,
-0.0222625732421875,
0.005859375,
-0.01555633544921875,
-0.03729248046875,
0.01393890380859375,
0.007137298583984375,
-0.01546478271484375,
-0.003704071044921875,
-0.011627197265625,
0.02056884765625,
0.03594970703125,
0.034393310546875,
-0.023895263671875,
0.0213165283203125,
0.0223388671875,
-0.027679443359375,
-0.06231689453125,
0.0258941650390625,
0.0244598388671875,
-0.019500732421875,
-0.0039005279541015625,
-0.00048279762268066406,
0.01235198974609375,
-0.0101318359375,
-0.0229339599609375,
-0.01690673828125,
-0.0110931396484375,
0.00986480712890625,
0.0008678436279296875,
-0.00921630859375,
-0.025115966796875,
0.037689208984375,
-0.016876220703125,
0.0015106201171875,
-0.00406646728515625,
0.011077880859375,
0.031524658203125,
0.01568603515625,
0.00824737548828125,
-0.007160186767578125,
-0.01922607421875,
0.00672149658203125,
0.0157012939453125,
0.0172882080078125,
-0.01195526123046875,
0.033172607421875,
-0.0222015380859375,
-0.01447296142578125,
-0.0301666259765625,
0.02178955078125,
0.026947021484375,
0.016082763671875,
-0.013580322265625,
-0.006320953369140625,
-0.031890869140625,
-0.03179931640625,
-0.0018672943115234375,
0.021453857421875,
0.013519287109375,
0.0005254745483398438,
-0.061279296875,
0.044403076171875,
0.005367279052734375,
-0.022247314453125,
0.042083740234375,
-0.01236724853515625,
0.01557159423828125,
0.0174560546875,
0.01490020751953125,
0.00264739990234375,
-0.02105712890625,
0.045379638671875,
0.00634002685546875,
-0.0609130859375,
-0.00798797607421875,
0.031097412109375,
0.044097900390625,
-0.004444122314453125,
0.0167388916015625,
0.0794677734375,
-0.00701141357421875,
-0.0296783447265625,
0.06610107421875,
0.045806884765625,
-0.0259552001953125,
-0.055755615234375,
0.00164794921875,
0.00235748291015625,
-0.0789794921875,
0.01512908935546875,
0.027008056640625,
-0.0012540817260742188,
-0.01959228515625,
-0.07891845703125,
0.01934814453125,
-0.03466796875,
0.046630859375,
-0.059906005859375,
0.00797271728515625,
0.0416259765625,
-0.0362548828125,
-0.035675048828125,
0.028594970703125,
0.006252288818359375,
0.00566864013671875,
0.004749298095703125,
0.0153045654296875,
0.0169525146484375,
-0.025146484375,
0.042572021484375,
-0.01522064208984375,
0.015777587890625,
0.0350341796875,
0.0258331298828125,
0.01153564453125,
-0.042999267578125,
-0.015289306640625,
-0.036468505859375,
0.030731201171875,
-0.07843017578125,
0.057861328125,
-0.0323486328125,
0.0212249755859375,
-0.0197296142578125,
-0.00812530517578125,
0.006244659423828125,
-0.0037174224853515625,
0.022705078125,
0.016265869140625,
0.0284423828125,
0.04180908203125,
-0.01004791259765625,
-0.0121307373046875,
0.06634521484375,
-0.033111572265625,
-0.000025570392608642578,
-0.00701141357421875,
0.048614501953125,
0.051177978515625,
0.00580596923828125,
-0.0284423828125,
0.0040283203125,
0.007518768310546875,
0.0257110595703125,
0.0022754669189453125,
-0.03955078125,
-0.0151214599609375,
0.0007839202880859375,
0.02923583984375,
-0.01202392578125,
-0.0021228790283203125,
0.023651123046875,
-0.0300140380859375,
0.080078125,
-0.00170135498046875,
0.040740966796875,
0.0247955322265625,
-0.0301055908203125,
0.01517486572265625,
0.00447845458984375,
-0.0261383056640625,
0.007659912109375,
0.020294189453125,
-0.0204315185546875,
0.040557861328125,
-0.01348114013671875,
-0.01456451416015625,
0.0288238525390625,
0.0172271728515625,
-0.02435302734375,
0.03228759765625,
-0.06280517578125,
-0.02008056640625,
-0.02960205078125,
-0.07305908203125,
-0.0181427001953125,
0.0262451171875,
0.0286407470703125,
0.030609130859375,
0.024444580078125,
0.050445556640625,
-0.01904296875,
0.04766845703125,
0.00592041015625,
-0.0006070137023925781,
0.0162811279296875,
-0.051116943359375,
0.0513916015625,
-0.040802001953125,
0.01129913330078125,
0.06317138671875,
-0.006710052490234375,
0.0204315185546875,
0.0018978118896484375,
0.01161956787109375,
0.021453857421875,
-0.0162353515625,
-0.00939178466796875,
-0.01187896728515625,
-0.012847900390625,
0.00830841064453125,
0.012115478515625,
0.0445556640625,
-0.0303955078125,
-0.038909912109375,
-0.01412200927734375,
-0.008575439453125,
-0.061981201171875,
-0.05224609375,
0.0116729736328125,
-0.04791259765625,
-0.0283966064453125,
-0.032928466796875,
-0.0307159423828125,
-0.0005040168762207031,
-0.0253753662109375,
-0.007221221923828125,
0.02069091796875,
-0.0281524658203125,
-0.077880859375,
-0.07464599609375,
-0.08868408203125,
-0.08319091796875,
-0.0229644775390625,
-0.016021728515625,
-0.0076446533203125,
0.050567626953125,
-0.01447296142578125,
-0.045806884765625,
-0.0280914306640625,
-0.003704071044921875,
-0.00267791748046875,
-0.024749755859375,
0.01525115966796875,
-0.007198333740234375,
0.007015228271484375,
0.014190673828125,
0.0030078887939453125,
0.022796630859375,
-0.018829345703125,
-0.0143280029296875,
-0.021392822265625,
-0.047576904296875,
-0.00902557373046875,
0.0169525146484375,
0.0222625732421875,
-0.0361328125,
0.0142059326171875,
-0.055267333984375,
-0.04736328125,
0.0019483566284179688,
-0.053314208984375,
0.0352783203125,
0.040924072265625,
-0.0012311935424804688,
0.0002968311309814453,
0.003620147705078125,
0.02777099609375,
0.00994110107421875,
-0.024383544921875,
0.00867462158203125,
0.0546875,
-0.0020618438720703125,
0.0177154541015625,
-0.00910186767578125,
0.00850677490234375,
-0.029296875,
0.0711669921875,
0.01485443115234375,
0.01114654541015625,
0.01128387451171875,
-0.0165557861328125,
0.0124969482421875,
-0.059722900390625,
0.056976318359375,
0.00015616416931152344,
-0.0011653900146484375,
-0.0182342529296875,
-0.034088134765625,
0.0131378173828125,
0.10150146484375,
-0.002666473388671875,
-0.019195556640625,
-0.03564453125,
-0.00875091552734375,
0.018798828125,
-0.0302886962890625,
0.01488494873046875,
-0.018402099609375,
-0.09716796875,
0.027801513671875,
-0.006488800048828125,
-0.030120849609375,
-0.0157623291015625,
-0.0240936279296875,
-0.0533447265625,
-0.05181884765625,
0.022613525390625,
0.0209808349609375,
0.006053924560546875,
0.0116729736328125,
-0.018524169921875,
0.01641845703125,
-0.016998291015625,
-0.00927734375,
-0.01800537109375,
0.006961822509765625,
-0.0131683349609375,
-0.009124755859375,
0.01123809814453125,
-0.0252838134765625,
-0.0022869110107421875,
0.002735137939453125,
0.02978515625,
0.05438232421875,
-0.005390167236328125,
0.00775146484375,
-0.0015401840209960938,
-0.059112548828125,
0.0114593505859375,
-0.052520751953125,
0.009063720703125,
-0.008819580078125,
-0.047332763671875,
0.0205841064453125,
-0.00844573974609375,
0.041534423828125,
0.0239105224609375,
-0.0221405029296875,
0.002803802490234375,
-0.002765655517578125,
0.021942138671875,
0.036773681640625,
0.0168914794921875,
-0.00926971435546875,
-0.0250091552734375,
-0.0238037109375,
0.070556640625,
0.03472900390625,
-0.01010894775390625,
0.0022487640380859375,
0.058685302734375,
0.00531768798828125,
-0.049591064453125,
-0.07183837890625,
-0.0033817291259765625,
0.0242919921875,
0.0283966064453125,
0.0302276611328125,
0.006916046142578125,
-0.0178375244140625,
0.033477783203125,
0.00960540771484375,
-0.0307769775390625,
-0.0204010009765625,
0.04949951171875,
-0.0251617431640625,
-0.061248779296875,
0.02032470703125,
-0.05859375,
0.05328369140625,
0.0767822265625,
-0.0091094970703125,
-0.032135009765625,
0.0028629302978515625,
0.05224609375,
-0.02777099609375,
0.0024356842041015625,
-0.04754638671875,
-0.036407470703125,
-0.0131988525390625,
0.00504302978515625,
0.058563232421875,
0.028594970703125,
-0.01271820068359375,
0.056854248046875,
0.0548095703125,
-0.01971435546875,
0.019683837890625,
0.0199127197265625,
0.002536773681640625,
-0.00240325927734375,
0.036407470703125,
-0.028228759765625,
-0.0167388916015625,
-0.0037288665771484375,
-0.002719879150390625,
-0.0026645660400390625,
-0.068603515625,
0.006618499755859375,
0.0184783935546875,
0.042999267578125,
0.02410888671875,
0.003002166748046875,
0.0206756591796875,
0.01494598388671875,
-0.018310546875,
-0.0196990966796875,
0.007625579833984375,
-0.020843505859375,
-0.04327392578125,
-0.01442718505859375,
0.0022373199462890625,
-0.0270233154296875,
-0.04327392578125,
0.06414794921875,
-0.01137542724609375,
-0.00412750244140625,
-0.001605987548828125,
0.0266265869140625,
0.0535888671875,
0.019561767578125,
0.022735595703125,
-0.01242828369140625,
-0.0206451416015625,
-0.006290435791015625,
-0.018798828125,
-0.043609619140625,
-0.042327880859375,
0.00691986083984375,
0.04620361328125,
-0.0263214111328125,
-0.01483154296875,
0.03045654296875,
0.00876617431640625,
0.0164642333984375,
0.01087188720703125,
-0.035125732421875,
-0.0372314453125,
-0.0149383544921875,
0.037353515625,
0.045654296875,
-0.02398681640625,
-0.0230255126953125,
0.0272369384765625,
-0.019622802734375,
0.0230865478515625,
0.0165252685546875,
-0.037445068359375,
0.022796630859375,
0.0208282470703125,
-0.031585693359375,
-0.0163726806640625,
0.0106353759765625,
-0.06927490234375,
-0.0240325927734375,
-0.01378631591796875,
0.006305694580078125,
0.0264892578125,
0.0020008087158203125,
0.0187835693359375,
-0.00510406494140625,
-0.035186767578125,
-0.01136016845703125,
0.01045989990234375,
0.013946533203125,
-0.0097503662109375,
-0.042816162109375,
-0.0038127899169921875,
-0.0623779296875,
-0.022186279296875,
-0.0154571533203125,
-0.051849365234375,
-0.03533935546875,
0.00783538818359375,
-0.0180206298828125,
0.0214385986328125,
-0.007476806640625,
0.01824951171875,
0.01580810546875,
0.0291595458984375,
-0.0190277099609375,
0.058563232421875,
0.0026111602783203125,
0.06829833984375,
-0.01219940185546875,
0.0246429443359375,
0.018890380859375,
0.039093017578125,
-0.006481170654296875,
-0.01959228515625,
0.0222625732421875,
0.027313232421875,
-0.0338134765625,
-0.0259857177734375,
-0.029876708984375,
0.0037593841552734375,
0.09918212890625,
-0.007373809814453125,
0.031707763671875,
-0.04046630859375,
-0.0006632804870605469,
-0.0278472900390625,
0.0655517578125,
-0.053619384765625,
-0.0147247314453125,
0.06329345703125,
0.0027942657470703125,
-0.011474609375,
-0.00498199462890625,
-0.0274810791015625,
0.0088653564453125,
0.0282135009765625,
-0.001827239990234375,
-0.022674560546875,
-0.02862548828125,
0.0731201171875,
0.050262451171875,
-0.015838623046875,
0.01666259765625,
0.016754150390625,
-0.00856781005859375,
-0.006557464599609375,
-0.0018777847290039062,
-0.006496429443359375,
-0.0347900390625,
0.059661865234375,
0.0229949951171875,
-0.0032520294189453125,
0.0791015625,
-0.0283660888671875,
-0.0021800994873046875,
0.04473876953125,
0.0239715576171875,
-0.07366943359375,
-0.00274658203125,
0.01271820068359375,
0.00766754150390625,
-0.016082763671875,
0.0014181137084960938,
-0.0206756591796875,
-0.0902099609375,
0.0124969482421875,
0.00653839111328125,
-0.0106964111328125,
-0.0164337158203125,
-0.0207366943359375,
-0.01031494140625,
-0.01541900634765625,
0.051849365234375,
-0.0033893585205078125,
0.004913330078125,
0.006679534912109375,
-0.004566192626953125,
0.01512908935546875,
-0.0177154541015625,
0.0138397216796875,
-0.0212554931640625,
-0.001056671142578125,
-0.0283050537109375,
0.00970458984375,
-0.04205322265625,
-0.001956939697265625,
-0.006549835205078125,
0.02801513671875,
0.00799560546875,
0.037109375,
-0.015655517578125,
-0.00582122802734375,
0.02850341796875,
-0.0198822021484375,
-0.0478515625,
-0.03594970703125,
0.007259368896484375,
0.01561737060546875,
-0.0283660888671875,
0.04205322265625,
-0.009521484375,
-0.03271484375,
-0.0126953125,
0.019195556640625,
0.09521484375,
0.005802154541015625,
-0.0333251953125,
0.04620361328125,
0.01508331298828125,
-0.042022705078125,
0.015899658203125,
-0.0068817138671875,
-0.031707763671875,
-0.01641845703125,
0.007152557373046875,
-0.0103302001953125,
0.0162200927734375,
0.033355712890625,
-0.10137939453125,
0.11627197265625,
0.01337432861328125,
0.06280517578125,
0.0184173583984375,
0.03204345703125,
-0.04949951171875,
-0.0003924369812011719,
-0.0173797607421875,
0.05279541015625,
-0.00011324882507324219,
0.054046630859375,
-0.01971435546875,
-0.0028209686279296875,
0.023529052734375,
0.0504150390625,
0.0175933837890625,
0.004772186279296875,
0.0285186767578125,
-0.00017321109771728516,
0.0330810546875,
0.0016374588012695312,
-0.0269927978515625,
0.01386260986328125,
-0.0080413818359375,
0.012786865234375,
0.01311492919921875,
-0.069091796875,
0.0043792724609375,
-0.02606201171875,
0.005603790283203125,
0.006317138671875,
-0.0077362060546875,
-0.007720947265625,
0.0147552490234375,
-0.0021820068359375,
-0.050689697265625,
0.00716400146484375,
0.0246734619140625,
-0.03125,
0.032806396484375,
-0.01593017578125,
0.022186279296875,
-0.082763671875,
-0.0309295654296875,
-0.0066680908203125,
0.041015625,
0.01006317138671875,
0.0013370513916015625,
-0.00867462158203125,
0.004810333251953125,
0.0491943359375,
-0.0303955078125,
-0.0171356201171875,
0.0167999267578125,
0.0016031265258789062,
0.0460205078125,
0.0158538818359375,
0.0289459228515625,
-0.021759033203125,
0.015716552734375,
0.006671905517578125,
0.0262451171875,
-0.031494140625,
-0.04754638671875,
0.0014495849609375,
0.0048828125,
-0.0017957687377929688,
-0.00041747093200683594,
0.02496337890625,
0.00128173828125,
0.0396728515625,
-0.0142669677734375,
-0.01812744140625,
-0.0018186569213867188,
-0.0183563232421875,
-0.01373291015625,
0.01325225830078125,
0.039306640625,
0.0204925537109375,
-0.033599853515625,
-0.0140838623046875,
0.030487060546875,
0.040283203125,
0.0197601318359375,
0.0221099853515625,
-0.006290435791015625,
-0.01505279541015625,
-0.039947509765625,
-0.007801055908203125,
-0.0087432861328125,
0.035919189453125,
-0.025909423828125,
0.01641845703125,
-0.01319122314453125,
0.03436279296875,
-0.0019130706787109375,
-0.03399658203125,
0.004547119140625,
0.020416259765625,
-0.0273895263671875,
-0.032501220703125,
-0.0037479400634765625,
-0.0305938720703125,
0.004024505615234375,
-0.030059814453125,
-0.02813720703125,
-0.0247802734375,
-0.04022216796875,
0.00815582275390625,
-0.022674560546875,
0.0095672607421875,
-0.036163330078125,
0.07177734375,
-0.0013151168823242188,
0.01418304443359375,
0.02447509765625,
-0.00928497314453125,
0.032470703125,
0.00437164306640625,
-0.0926513671875,
0.0022678375244140625,
-0.078857421875,
-0.0201416015625,
0.04345703125,
0.0390625,
-0.0272064208984375,
0.03240966796875,
-0.0007233619689941406,
0.0269012451171875,
-0.0276031494140625,
-0.016265869140625,
0.0261077880859375,
0.0021190643310546875,
0.0188751220703125,
0.0179595947265625,
-0.05865478515625,
-0.03753662109375,
-0.0211334228515625,
0.039764404296875,
-0.0014505386352539062,
0.104248046875,
-0.0262298583984375,
0.0159759521484375,
0.0103302001953125,
0.0272369384765625,
-0.01580810546875,
-0.0021228790283203125,
0.04473876953125,
0.0162353515625,
-0.005523681640625,
-0.024505615234375,
-0.07208251953125,
0.037109375,
0.0250396728515625,
0.01160430908203125,
0.02545166015625,
-0.009002685546875,
0.006336212158203125,
0.00023865699768066406,
0.00406646728515625,
-0.0244598388671875,
-0.0144500732421875,
-0.00966644287109375,
-0.0081939697265625,
0.01329803466796875,
0.03863525390625,
0.03314208984375,
0.033905029296875,
0.013702392578125,
-0.0217437744140625,
0.0160980224609375,
-0.01503753662109375,
0.00850677490234375,
0.025360107421875,
0.0340576171875,
-0.029144287109375,
0.0130615234375,
-0.018310546875,
0.0305328369140625,
-0.00974273681640625,
0.05279541015625,
0.0170440673828125,
-0.0215606689453125,
0.004886627197265625,
-0.053436279296875,
-0.00774383544921875,
-0.0548095703125,
-0.0297393798828125,
-0.0172119140625,
0.036041259765625,
0.01187896728515625,
-0.0212249755859375,
-0.01345062255859375,
-0.0312042236328125,
-0.005523681640625,
0.022125244140625,
-0.019195556640625,
0.01515960693359375,
-0.0361328125,
-0.034912109375,
0.0252838134765625,
0.01360321044921875,
-0.032745361328125,
0.025787353515625,
-0.0039215087890625,
-0.0458984375,
0.01090240478515625,
0.031280517578125,
0.01332855224609375,
0.040771484375,
-0.01511383056640625,
0.0197906494140625,
0.027252197265625,
0.01245880126953125,
0.038726806640625,
0.0006155967712402344,
0.01413726806640625,
-0.00605010986328125,
0.004749298095703125,
0.0286102294921875,
0.016754150390625,
0.0648193359375,
-0.01488494873046875,
-0.016693115234375,
0.0083160400390625,
-0.0159454345703125,
0.0018701553344726562,
-0.047882080078125,
-0.004512786865234375,
-0.0478515625,
0.0017366409301757812,
-0.01325225830078125,
0.00853729248046875,
0.0113067626953125,
-0.0433349609375,
-0.1044921875,
0.043701171875,
-0.019866943359375,
-0.0380859375,
-0.04547119140625,
0.042877197265625,
0.01483917236328125,
-0.036865234375,
-0.0262603759765625,
0.00481414794921875,
0.01026153564453125,
0.0224151611328125,
0.002475738525390625,
0.0290374755859375,
0.04150390625,
-0.005184173583984375,
-0.04052734375,
-0.0303497314453125,
-0.04803466796875,
-0.0025997161865234375,
-0.0208740234375,
0.006427764892578125,
-0.00508880615234375,
0.0267486572265625,
-0.0301361083984375,
-0.0638427734375,
-0.008819580078125,
0.00942230224609375,
0.00884246826171875,
0.02398681640625,
-0.042816162109375,
-0.003871917724609375,
0.06817626953125,
0.058837890625,
0.0311737060546875,
-0.0269317626953125,
-0.0003707408905029297,
-0.01409149169921875,
-0.06854248046875,
0.00411224365234375,
0.048553466796875,
-0.06573486328125,
0.007732391357421875,
0.014068603515625,
-0.030059814453125,
-0.027099609375,
0.005886077880859375,
-0.06317138671875,
-0.005947113037109375,
-0.056549072265625,
0.00673675537109375,
-0.048248291015625,
0.0452880859375,
0.01265716552734375,
-0.013580322265625,
0.01209259033203125,
-0.05194091796875,
0.006168365478515625,
0.00797271728515625,
-0.05572509765625,
0.0137786865234375,
0.03289794921875,
-0.059173583984375,
0.0023937225341796875,
-0.0003178119659423828,
0.038726806640625,
-0.06268310546875,
-0.0091705322265625,
-0.01233673095703125,
0.0228424072265625,
-0.005069732666015625,
0.0106658935546875,
-0.023162841796875,
0.0231170654296875,
-0.0182037353515625,
0.069580078125,
-0.00621795654296875,
0.07733154296875,
-0.01261138916015625,
0.050994873046875,
0.0143280029296875,
-0.01751708984375,
0.038818359375,
-0.0290985107421875,
-0.00426483154296875,
-0.0283355712890625,
-0.034332275390625,
-0.07354736328125,
0.03729248046875,
0.049072265625,
-0.01290130615234375,
0.039886474609375
]
|
5ffd995576ab47f5c65b1c82fe82020e7a5aa857 | Wordpress Stackexchange
Q: Is there a action hook for the "Empty Trash" button? I would like to run a function when the user clicks the "Empty Trash" button for posts. Something like:
add_action('empty_trash','myFunction');
function myFunction(){
// My code
}
A: I don't think there exist one, but you could create your own, wpse_empty_trash, with something like this:
/**
* Add a custom hook 'wpse_empty_trash'
*/
add_action( 'load-edit.php', function()
{
add_action( 'before_delete_post', function ( $post_id )
{
if (
'trash' === get_post_status( $post_id )
&& filter_input( INPUT_GET, 'delete_all' )
&& 1 === did_action( 'before_delete_post ' )
)
do_action( 'wpse_empty_trash' );
} );
} );
Then you can use it with your code. Example:
add_action( 'wpse_empty_trash', 'myFunction' );
function myFunction() {
// My code
}
Hopefully you can adjust this to your needs.
| Q: Is there a action hook for the "Empty Trash" button? I would like to run a function when the user clicks the "Empty Trash" button for posts. Something like:
add_action('empty_trash','myFunction');
function myFunction(){
// My code
}
A: I don't think there exist one, but you could create your own, wpse_empty_trash, with something like this:
/**
* Add a custom hook 'wpse_empty_trash'
*/
add_action( 'load-edit.php', function()
{
add_action( 'before_delete_post', function ( $post_id )
{
if (
'trash' === get_post_status( $post_id )
&& filter_input( INPUT_GET, 'delete_all' )
&& 1 === did_action( 'before_delete_post ' )
)
do_action( 'wpse_empty_trash' );
} );
} );
Then you can use it with your code. Example:
add_action( 'wpse_empty_trash', 'myFunction' );
function myFunction() {
// My code
}
Hopefully you can adjust this to your needs.
A: Yes.
https://developer.wordpress.org/reference/hooks/before_delete_post/
It’s important to note the hook runs only when the WordPress user empties the Trash. If you’re using this hook note that it will not fire if the user is deleting an Attachment, since attachments are force deleted, i.e., not sent to the Trash. Instead use the delete_post() hook.
| wordpress | {
"language": "en",
"length": 181,
"provenance": "stackexchange_00019.jsonl.gz:455660",
"question_score": "16",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188653"
} | [
0.050811767578125,
0.00774383544921875,
-0.01153564453125,
-0.030731201171875,
0.025360107421875,
-0.039520263671875,
0.047454833984375,
-0.0211334228515625,
0.03460693359375,
0.0083465576171875,
-0.0430908203125,
-0.03839111328125,
0.021484375,
-0.0267181396484375,
-0.017303466796875,
-0.03271484375,
0.052642822265625,
-0.0174102783203125,
0.06427001953125,
0.0012788772583007812,
-0.0234527587890625,
0.031707763671875,
0.0771484375,
-0.005641937255859375,
-0.007442474365234375,
-0.007335662841796875,
0.051239013671875,
-0.00482940673828125,
-0.036285400390625,
-0.032196044921875,
0.01267242431640625,
0.039031982421875,
-0.017822265625,
0.03466796875,
0.007358551025390625,
0.036712646484375,
0.0035572052001953125,
0.033905029296875,
0.0261077880859375,
0.01348114013671875,
0.0350341796875,
-0.015625,
-0.04730224609375,
0.002849578857421875,
-0.0234222412109375,
-0.0179290771484375,
0.04107666015625,
-0.01018524169921875,
0.0059051513671875,
0.00884246826171875,
0.0302581787109375,
0.0007948875427246094,
0.04730224609375,
-0.023895263671875,
-0.00943756103515625,
0.004306793212890625,
-0.05242919921875,
0.025146484375,
0.042327880859375,
0.046234130859375,
-0.0120697021484375,
-0.0225372314453125,
-0.003597259521484375,
-0.060699462890625,
0.03179931640625,
0.010955810546875,
-0.0016584396362304688,
0.0206146240234375,
0.009429931640625,
0.04107666015625,
-0.0070953369140625,
-0.0227813720703125,
-0.01947021484375,
0.024169921875,
-0.003055572509765625,
-0.0521240234375,
0.0233917236328125,
-0.02587890625,
-0.005279541015625,
0.062286376953125,
-0.0264892578125,
-0.0322265625,
-0.04754638671875,
-0.0001125335693359375,
-0.006511688232421875,
0.0132293701171875,
-0.01201629638671875,
-0.005695343017578125,
-0.037506103515625,
-0.049072265625,
-0.02105712890625,
-0.03216552734375,
-0.05145263671875,
-0.0246734619140625,
-0.0031948089599609375,
-0.055145263671875,
0.0321044921875,
0.034912109375,
0.005886077880859375,
-0.00878143310546875,
0.03857421875,
-0.05938720703125,
0.030303955078125,
-0.027557373046875,
0.01129913330078125,
0.01849365234375,
0.017791748046875,
-0.026702880859375,
0.005435943603515625,
0.00897216796875,
-0.035888671875,
-0.016082763671875,
0.017364501953125,
0.0174407958984375,
-0.05426025390625,
-0.03253173828125,
-0.0305023193359375,
0.005756378173828125,
-0.012908935546875,
-0.0008983612060546875,
0.000024259090423583984,
-0.0170135498046875,
0.03253173828125,
-0.001514434814453125,
0.01064300537109375,
-0.003993988037109375,
-0.0247344970703125,
-0.032958984375,
0.0675048828125,
-0.0215911865234375,
-0.0259857177734375,
0.0386962890625,
0.068603515625,
-0.0088348388671875,
-0.0034008026123046875,
-0.006549835205078125,
0.0457763671875,
-0.039886474609375,
-0.0004553794860839844,
-0.0038623809814453125,
0.044525146484375,
-0.041595458984375,
-0.054107666015625,
0.0311279296875,
0.027099609375,
0.026275634765625,
0.028656005859375,
-0.0185699462890625,
0.007843017578125,
-0.019256591796875,
-0.00580596923828125,
-0.03778076171875,
0.0307769775390625,
-0.0006833076477050781,
0.005161285400390625,
0.007572174072265625,
0.014617919921875,
-0.0037021636962890625,
-0.0287933349609375,
-0.007389068603515625,
0.045654296875,
-0.006229400634765625,
-0.0014486312866210938,
-0.0153045654296875,
-0.0772705078125,
0.01305389404296875,
-0.0284881591796875,
-0.0204315185546875,
0.03277587890625,
-0.01479339599609375,
0.03790283203125,
0.0256500244140625,
-0.01180267333984375,
0.0195465087890625,
0.01995849609375,
-0.0078582763671875,
-0.01386260986328125,
0.00514984130859375,
0.0173797607421875,
0.00984954833984375,
-0.01294708251953125,
-0.039947509765625,
0.0474853515625,
-0.01222991943359375,
-0.031829833984375,
0.01073455810546875,
0.0201263427734375,
0.0780029296875,
0.00859832763671875,
0.032012939453125,
-0.01506805419921875,
-0.00044655799865722656,
0.0053863525390625,
-0.04180908203125,
0.023956298828125,
-0.036102294921875,
-0.00759124755859375,
-0.04962158203125,
0.005283355712890625,
0.0404052734375,
0.04412841796875,
0.017486572265625,
0.0281829833984375,
-0.005153656005859375,
-0.06768798828125,
0.058685302734375,
-0.0266571044921875,
0.0386962890625,
-0.021514892578125,
0.02337646484375,
0.0195159912109375,
0.00908660888671875,
-0.01983642578125,
-0.015655517578125,
-0.0195465087890625,
-0.017852783203125,
-0.0214691162109375,
0.01448822021484375,
-0.0033721923828125,
0.0166473388671875,
-0.013824462890625,
-0.017059326171875,
-0.0143890380859375,
-0.01313018798828125,
0.04052734375,
-0.0281982421875,
0.00029587745666503906,
-0.02886962890625,
0.006793975830078125,
-0.0184783935546875,
-0.026336669921875,
0.0655517578125,
0.08575439453125,
0.0953369140625,
0.00016701221466064453,
0.00262451171875,
-0.0201568603515625,
-0.07513427734375,
-0.0212860107421875,
0.045318603515625,
-0.004901885986328125,
0.041107177734375,
-0.01377105712890625,
0.056854248046875,
0.096435546875,
0.034820556640625,
-0.002590179443359375,
0.051025390625,
-0.01421356201171875,
0.038848876953125,
-0.0281219482421875,
0.0272369384765625,
-0.00002473592758178711,
-0.05609130859375,
-0.00102996826171875,
0.036529541015625,
-0.033172607421875,
-0.01117706298828125,
-0.004802703857421875,
-0.0225982666015625,
0.0136871337890625,
-0.06787109375,
-0.03533935546875,
-0.03399658203125,
0.04913330078125,
-0.04119873046875,
0.027984619140625,
0.0020542144775390625,
-0.009796142578125,
-0.02130126953125,
0.023590087890625,
-0.0153350830078125,
-0.00792694091796875,
0.0209503173828125,
-0.01049041748046875,
-0.0164642333984375,
0.016632080078125,
-0.01323699951171875,
-0.0249481201171875,
-0.0128936767578125,
-0.0257568359375,
-0.01517486572265625,
-0.010498046875,
-0.0105133056640625,
0.01473236083984375,
-0.024749755859375,
0.0201263427734375,
-0.0231781005859375,
0.0152130126953125,
-0.022705078125,
-0.0030460357666015625,
0.0258941650390625,
-0.029937744140625,
0.053253173828125,
0.0235595703125,
-0.034393310546875,
-0.03570556640625,
-0.0318603515625,
0.019989013671875,
-0.035003662109375,
0.041412353515625,
0.08111572265625,
-0.0027942657470703125,
0.00846099853515625,
0.018585205078125,
0.0006480216979980469,
-0.0035247802734375,
0.02685546875,
0.0085906982421875,
0.00203704833984375,
-0.054779052734375,
0.007537841796875,
0.0253448486328125,
0.07452392578125,
-0.02447509765625,
-0.0362548828125,
-0.015380859375,
0.021881103515625,
-0.04107666015625,
-0.06591796875,
0.0008559226989746094,
-0.0457763671875,
0.0251312255859375,
-0.01139068603515625,
-0.0113525390625,
-0.039642333984375,
0.0220184326171875,
0.0145111083984375,
-0.0511474609375,
0.0049896240234375,
0.01364898681640625,
-0.0179443359375,
0.003894805908203125,
0.0101470947265625,
0.006877899169921875,
0.006908416748046875,
0.01047515869140625,
0.09210205078125,
0.0021648406982421875,
-0.07098388671875,
-0.0192718505859375,
-0.0124053955078125,
-0.019683837890625,
0.000400543212890625,
0.00818634033203125,
-0.01239776611328125,
0.029022216796875,
-0.01678466796875,
0.05316162109375,
0.05133056640625,
-0.03631591796875,
-0.0048828125,
-0.051788330078125,
-0.0703125,
-0.016754150390625,
0.061614990234375,
0.04345703125,
-0.00815582275390625,
0.06732177734375,
-0.032989501953125,
-0.0100250244140625,
-0.00710296630859375,
-0.047332763671875,
0.0220794677734375,
0.0159759521484375,
-0.00617218017578125,
0.016815185546875,
-0.0009984970092773438,
0.0253753662109375,
0.02850341796875,
-0.0017023086547851562,
0.034454345703125,
-0.0166015625,
-0.018463134765625,
-0.0006175041198730469,
-0.019775390625,
0.002300262451171875,
-0.017822265625,
0.0111541748046875,
-0.0038928985595703125,
0.01383209228515625,
-0.0015010833740234375,
0.0133819580078125,
-0.0194244384765625,
0.005828857421875,
0.0203399658203125,
0.016937255859375,
0.0189056396484375,
-0.008331298828125,
-0.00588226318359375,
-0.021240234375,
0.0150604248046875,
-0.0020160675048828125,
-0.028289794921875,
-0.051971435546875,
-0.00914764404296875,
0.01413726806640625,
-0.0160064697265625,
0.0282440185546875,
-0.0138702392578125,
-0.10986328125,
0.050872802734375,
-0.00203704833984375,
-0.0013017654418945312,
-0.04437255859375,
0.044952392578125,
-0.05975341796875,
-0.0399169921875,
0.039581298828125,
-0.10150146484375,
0.001247406005859375,
0.003986358642578125,
-0.0190277099609375,
-0.033416748046875,
-0.036102294921875,
-0.038909912109375,
-0.037506103515625,
-0.003261566162109375,
-0.03857421875,
0.0187835693359375,
0.0191802978515625,
-0.0092926025390625,
0.01274871826171875,
0.031097412109375,
0.0210113525390625,
0.028289794921875,
-0.0013761520385742188,
0.00154876708984375,
-0.0219268798828125,
-0.039398193359375,
0.007564544677734375,
-0.03912353515625,
0.002826690673828125,
-0.0011644363403320312,
-0.0006432533264160156,
0.01514434814453125,
-0.039581298828125,
0.00246429443359375,
-0.00356292724609375,
-0.0214385986328125,
-0.01235198974609375,
-0.021331787109375,
-0.0316162109375,
0.00940704345703125,
-0.015899658203125,
-0.005527496337890625,
-0.0262451171875,
-0.03472900390625,
0.0232696533203125,
-0.0160980224609375,
0.01885986328125,
-0.007343292236328125,
0.03314208984375,
-0.00009894371032714844,
-0.00968170166015625,
0.0106353759765625,
-0.020904541015625,
-0.005908966064453125,
-0.01508331298828125,
0.0382080078125,
-0.00855255126953125,
0.00482177734375,
0.01154327392578125,
-0.048004150390625,
0.01251983642578125,
-0.07012939453125,
0.06475830078125,
-0.019012451171875,
0.003406524658203125,
0.0196075439453125,
-0.0301361083984375,
0.053131103515625,
0.026336669921875,
-0.005878448486328125,
-0.0171966552734375,
0.033477783203125,
0.037353515625,
-0.0556640625,
0.03131103515625,
-0.01934814453125,
0.0066680908203125,
-0.027862548828125,
-0.013946533203125,
0.0782470703125,
0.056915283203125,
-0.01409149169921875,
0.0369873046875,
0.05767822265625,
-0.01105499267578125,
-0.017974853515625,
0.01090240478515625,
-0.00324249267578125,
0.044281005859375,
-0.017181396484375,
0.0105743408203125,
-0.0218048095703125,
-0.007442474365234375,
0.032073974609375,
0.01485443115234375,
-0.039031982421875,
-0.0210418701171875,
-0.001728057861328125,
0.0528564453125,
-0.0254364013671875,
0.006916046142578125,
0.0217742919921875,
0.02362060546875,
-0.0201263427734375,
0.005756378173828125,
0.0148162841796875,
0.01531219482421875,
-0.03924560546875,
0.0033245086669921875,
0.0272064208984375,
-0.0325927734375,
0.03802490234375,
-0.0101165771484375,
0.016571044921875,
0.011505126953125,
-0.013519287109375,
0.035491943359375,
0.028564453125,
0.027191162109375,
0.03411865234375,
-0.02557373046875,
-0.020233154296875,
0.0183868408203125,
-0.032623291015625,
-0.0274200439453125,
0.0040130615234375,
0.0281829833984375,
0.0259857177734375,
-0.01146697998046875,
-0.017974853515625,
0.01108551025390625,
0.0010309219360351562,
-0.00737762451171875,
0.05352783203125,
0.03802490234375,
-0.040985107421875,
-0.01300048828125,
0.034881591796875,
0.0206451416015625,
-0.01229095458984375,
0.0040740966796875,
0.01041412353515625,
0.017608642578125,
0.018890380859375,
0.03216552734375,
-0.03631591796875,
0.00823211669921875,
0.0097503662109375,
0.0066986083984375,
-0.0218048095703125,
0.0022830963134765625,
-0.0401611328125,
0.0227508544921875,
-0.036163330078125,
-0.0128631591796875,
0.0751953125,
0.0213470458984375,
-0.0082244873046875,
-0.041351318359375,
0.0003657341003417969,
0.0012035369873046875,
-0.00748443603515625,
0.044677734375,
-0.011962890625,
-0.037017822265625,
-0.0146331787109375,
0.0017566680908203125,
-0.031402587890625,
-0.033416748046875,
-0.035491943359375,
-0.055511474609375,
0.02423095703125,
0.00673675537109375,
0.0262603759765625,
0.01000213623046875,
-0.004364013671875,
-0.00479888916015625,
-0.004207611083984375,
-0.012054443359375,
0.0164642333984375,
-0.0171661376953125,
0.05047607421875,
0.038299560546875,
0.0350341796875,
0.033355712890625,
0.024993896484375,
-0.01053619384765625,
-0.0199737548828125,
-0.01213836669921875,
-0.05035400390625,
0.00701141357421875,
0.0192718505859375,
-0.018463134765625,
0.0240478515625,
0.028167724609375,
-0.001247406005859375,
-0.0186767578125,
0.0027790069580078125,
-0.00936126708984375,
-0.033538818359375,
0.02288818359375,
0.053009033203125,
0.029388427734375,
-0.0189666748046875,
-0.043670654296875,
-0.0178985595703125,
0.021270751953125,
0.042144775390625,
-0.01091766357421875,
-0.0260009765625,
-0.0166015625,
0.001827239990234375,
-0.048736572265625,
0.074462890625,
0.059478759765625,
0.00592803955078125,
0.0350341796875,
-0.0108184814453125,
0.00679779052734375,
-0.00959014892578125,
-0.006519317626953125,
0.0156707763671875,
-0.0199432373046875,
0.058868408203125,
0.0201873779296875,
0.0120849609375,
0.06964111328125,
-0.015411376953125,
-0.0137481689453125,
0.03662109375,
0.0281219482421875,
-0.040496826171875,
-0.018890380859375,
-0.004856109619140625,
-0.0274658203125,
0.004482269287109375,
-0.02972412109375,
0.0309906005859375,
0.006412506103515625,
0.0416259765625,
0.01233673095703125,
-0.0172576904296875,
0.0260467529296875,
-0.0313720703125,
-0.0017690658569335938,
-0.0160369873046875,
0.0263824462890625,
0.00861358642578125,
-0.07757568359375,
0.0638427734375,
0.044219970703125,
0.0179443359375,
-0.01422882080078125,
0.0227813720703125,
-0.01947021484375,
-0.00691986083984375,
-0.0458984375,
0.0120849609375,
-0.00261688232421875,
-0.01064300537109375,
-0.01345062255859375,
-0.002689361572265625,
0.0162506103515625,
0.03564453125,
-0.0206451416015625,
-0.01065826416015625,
-0.006500244140625,
-0.006664276123046875,
-0.0537109375,
-0.0413818359375,
0.019561767578125,
0.0268707275390625,
-0.037750244140625,
0.054473876953125,
0.002346038818359375,
-0.0673828125,
-0.007289886474609375,
-0.0196533203125,
0.0885009765625,
-0.0433349609375,
-0.012359619140625,
0.030029296875,
0.0157470703125,
-0.0195159912109375,
0.006191253662109375,
0.0230712890625,
-0.0228424072265625,
-0.035003662109375,
0.00962066650390625,
-0.035491943359375,
-0.0028972625732421875,
-0.01088714599609375,
-0.055145263671875,
0.10992431640625,
0.0243988037109375,
0.016754150390625,
-0.0265960693359375,
0.048614501953125,
-0.015869140625,
0.037994384765625,
-0.04827880859375,
0.0765380859375,
0.025177001953125,
-0.00499725341796875,
-0.028900146484375,
0.00954437255859375,
-0.01476287841796875,
-0.0244598388671875,
-0.0253143310546875,
-0.0034332275390625,
0.0237884521484375,
0.009002685546875,
0.029022216796875,
-0.00016582012176513672,
-0.0083160400390625,
-0.00043010711669921875,
0.0207366943359375,
0.018035888671875,
0.037017822265625,
-0.01296234130859375,
0.0408935546875,
-0.039154052734375,
0.006420135498046875,
0.0276641845703125,
0.006542205810546875,
-0.01245880126953125,
-0.037109375,
0.0235595703125,
-0.041778564453125,
-0.0010747909545898438,
0.00907135009765625,
0.035430908203125,
-0.0234527587890625,
0.06494140625,
0.0379638671875,
-0.022705078125,
0.003604888916015625,
-0.045166015625,
0.047393798828125,
0.0034847259521484375,
0.01300811767578125,
0.06719970703125,
0.0276641845703125,
0.0499267578125,
-0.04345703125,
0.00354766845703125,
-0.036895751953125,
-0.000579833984375,
0.06414794921875,
0.06512451171875,
0.0189208984375,
-0.0087432861328125,
-0.005680084228515625,
0.04937744140625,
0.07476806640625,
-0.040771484375,
-0.057891845703125,
0.00669097900390625,
-0.007495880126953125,
0.004779815673828125,
0.019073486328125,
0.03033447265625,
-0.0261688232421875,
0.0180511474609375,
-0.033660888671875,
-0.01849365234375,
0.0142822265625,
0.02813720703125,
0.0104217529296875,
0.042938232421875,
-0.03143310546875,
-0.03717041015625,
-0.0070037841796875,
-0.0299072265625,
0.0286712646484375,
0.055816650390625,
0.00830078125,
0.03778076171875,
-0.0301666259765625,
-0.0182952880859375,
-0.0267791748046875,
0.052764892578125,
0.0216064453125,
0.01332855224609375,
-0.02880859375,
-0.032012939453125,
-0.014984130859375,
0.031951904296875,
0.03900146484375,
0.051666259765625,
0.038848876953125,
-0.0036773681640625,
-0.021026611328125,
0.01114654541015625,
0.0223846435546875,
-0.041534423828125,
0.00804901123046875,
-0.03460693359375,
0.01044464111328125,
0.00218963623046875,
-0.0081787109375,
-0.00695037841796875,
-0.0002684593200683594,
0.02459716796875,
-0.054931640625,
0.049224853515625,
-0.0256500244140625,
-0.028717041015625,
0.024505615234375,
-0.06396484375,
0.057220458984375,
-0.035858154296875,
-0.04461669921875,
-0.0244293212890625,
-0.037567138671875,
-0.017578125,
0.0303955078125,
0.033294677734375,
0.01763916015625,
0.02093505859375,
-0.01401519775390625,
0.00568389892578125,
0.0186767578125,
-0.005168914794921875,
-0.024993896484375,
0.001178741455078125,
0.033233642578125,
-0.0024356842041015625,
-0.0109710693359375,
-0.0218505859375,
-0.0078582763671875,
0.037872314453125,
-0.02789306640625,
0.05975341796875,
-0.039093017578125,
0.0120849609375,
0.01312255859375,
0.052459716796875,
-0.0270538330078125,
0.0100860595703125,
0.004913330078125,
-0.0022430419921875,
0.037567138671875,
-0.007160186767578125,
-0.05224609375,
0.0018854141235351562,
0.0176849365234375,
0.00246429443359375,
0.0240936279296875,
-0.03497314453125,
0.0248260498046875,
0.00029349327087402344,
0.06500244140625,
-0.005657196044921875,
-0.01515960693359375,
0.0019779205322265625,
-0.00798797607421875,
0.02880859375,
0.05267333984375,
0.020355224609375,
0.015472412109375,
-0.01258087158203125,
-0.00701141357421875,
0.01035308837890625,
-0.0052032470703125,
0.006317138671875,
0.0288543701171875,
-0.03753662109375,
0.011260986328125,
0.0035800933837890625,
-0.013702392578125,
0.01971435546875,
0.01007080078125,
-0.024139404296875,
0.0229339599609375,
0.00591278076171875,
-0.0247802734375,
-0.0286712646484375,
0.024017333984375,
-0.0206146240234375,
-0.00974273681640625,
-0.0222625732421875,
0.01605224609375,
-0.019287109375,
-0.002742767333984375,
-0.03155517578125,
-0.0185699462890625,
0.01142120361328125,
-0.00258636474609375,
-0.0018281936645507812,
-0.04290771484375,
-0.0276336669921875,
0.0015382766723632812,
0.033477783203125,
0.0279388427734375,
-0.0865478515625,
0.0657958984375,
0.002285003662109375,
0.0151824951171875,
-0.00611114501953125,
0.00720977783203125,
-0.01062774658203125,
-0.0308380126953125,
-0.0391845703125,
-0.03802490234375,
-0.023895263671875,
0.058197021484375,
-0.024932861328125,
-0.0093536376953125,
-0.003658294677734375,
-0.0195159912109375,
-0.048675537109375,
0.017822265625,
0.0238037109375,
0.047119140625,
0.09393310546875,
-0.0253753662109375,
0.01004791259765625,
0.01654052734375,
0.00121307373046875,
-0.046844482421875,
-0.007129669189453125,
-0.0147857666015625,
0.016357421875,
-0.01314544677734375,
-0.02362060546875,
-0.018890380859375,
-0.055511474609375,
-0.12188720703125,
0.07763671875,
-0.027069091796875,
-0.0301513671875,
-0.040313720703125,
0.037322998046875,
0.01593017578125,
-0.04632568359375,
-0.006557464599609375,
0.006717681884765625,
-0.006961822509765625,
0.0032520294189453125,
-0.016876220703125,
0.0223236083984375,
0.01163482666015625,
-0.010986328125,
-0.02362060546875,
0.0016717910766601562,
0.0155487060546875,
-0.0065765380859375,
0.08251953125,
-0.046142578125,
0.06866455078125,
0.0595703125,
-0.063720703125,
0.0006499290466308594,
-0.05230712890625,
-0.0244598388671875,
0.00435638427734375,
-0.0290374755859375,
-0.034881591796875,
-0.0271759033203125,
0.06390380859375,
0.003345489501953125,
0.0171051025390625,
-0.006103515625,
-0.03729248046875,
-0.020294189453125,
-0.0160980224609375,
0.00705718994140625,
0.0154571533203125,
-0.042083740234375,
0.01123809814453125,
-0.0012865066528320312,
0.0158538818359375,
-0.00299835205078125,
-0.029876708984375,
0.006305694580078125,
-0.023773193359375,
0.016998291015625,
-0.0014181137084960938,
0.00713348388671875,
-0.016693115234375,
0.052764892578125,
-0.039398193359375,
-0.00734710693359375,
0.0269012451171875,
0.010711669921875,
0.0142669677734375,
0.03741455078125,
0.00428009033203125,
0.048309326171875,
-0.023193359375,
0.01038360595703125,
0.0093994140625,
-0.00421905517578125,
-0.042755126953125,
0.01457977294921875,
0.01206207275390625,
0.027862548828125,
-0.02288818359375,
0.045989990234375,
0.010040283203125,
0.044219970703125,
-0.02337646484375,
0.003925323486328125,
-0.029693603515625,
0.0248260498046875,
-0.01326751708984375,
0.034271240234375,
-0.02142333984375,
-0.0081024169921875,
0.051605224609375,
-0.049530029296875,
-0.022003173828125,
0.034698486328125,
0.007648468017578125,
-0.07464599609375,
0.07086181640625,
0.05877685546875,
0.04229736328125,
0.033843994140625
]
|
88df13915094e216a3673159bb2836dca949f1c6 | Wordpress Stackexchange
Q: How to store the_title() into a variable to reutrn the value, not just echo it I have a loop, and need to pass one more argument through it. I need to get the current page's single post title, and then use that as the value.
I tried going about it like this:
$tagz = the_title();
$args = array(
'post_type' => 'product',
'posts_per_page' => 5,
'product_tag' => "{$tagz}" );
and the $tagz variable just automatically echo's the current post title. I found out through this resource this resource that the_title() merely echos the title and never returns it, making the $tagz variable null.
How can I use the current posts title as an argument? I am really stumped!!
A: You can use get_the_title() to return the current post title in the loop.
| Q: How to store the_title() into a variable to reutrn the value, not just echo it I have a loop, and need to pass one more argument through it. I need to get the current page's single post title, and then use that as the value.
I tried going about it like this:
$tagz = the_title();
$args = array(
'post_type' => 'product',
'posts_per_page' => 5,
'product_tag' => "{$tagz}" );
and the $tagz variable just automatically echo's the current post title. I found out through this resource this resource that the_title() merely echos the title and never returns it, making the $tagz variable null.
How can I use the current posts title as an argument? I am really stumped!!
A: You can use get_the_title() to return the current post title in the loop.
| wordpress | {
"language": "en",
"length": 132,
"provenance": "stackexchange_00019.jsonl.gz:455678",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188707"
} | [
-0.00022673606872558594,
-0.0506591796875,
0.01515960693359375,
-0.00977325439453125,
-0.040496826171875,
-0.018798828125,
0.0380859375,
0.0078125,
0.00748443603515625,
0.027740478515625,
-0.0130767822265625,
-0.01021575927734375,
-0.0305938720703125,
-0.029296875,
-0.0228729248046875,
-0.03778076171875,
0.0438232421875,
-0.035369873046875,
0.046356201171875,
0.0016870498657226562,
-0.0205841064453125,
0.036346435546875,
0.061248779296875,
0.0268096923828125,
0.032440185546875,
-0.0543212890625,
0.0301513671875,
-0.04022216796875,
0.04400634765625,
-0.0146484375,
0.02679443359375,
0.0013275146484375,
0.01476287841796875,
-0.0155792236328125,
0.028533935546875,
0.0207977294921875,
0.04217529296875,
-0.028045654296875,
0.04315185546875,
-0.016632080078125,
0.00914764404296875,
-0.0026569366455078125,
0.01439666748046875,
0.0185546875,
-0.0179443359375,
-0.0191802978515625,
0.01202392578125,
-0.03070068359375,
0.0017023086547851562,
-0.0056304931640625,
0.0308074951171875,
0.0095367431640625,
0.0335693359375,
-0.00909423828125,
-0.006992340087890625,
0.0218505859375,
-0.00492095947265625,
-0.03155517578125,
0.050537109375,
-0.02398681640625,
-0.04132080078125,
-0.056060791015625,
0.055450439453125,
-0.0323486328125,
0.0197296142578125,
0.035430908203125,
0.03955078125,
0.0113525390625,
-0.020477294921875,
0.0132598876953125,
0.02166748046875,
-0.04437255859375,
-0.0031833648681640625,
-0.0134429931640625,
-0.02618408203125,
-0.039794921875,
0.032806396484375,
-0.050018310546875,
-0.0215606689453125,
0.01385498046875,
0.0081024169921875,
-0.036376953125,
0.0040740966796875,
0.00045228004455566406,
-0.0132598876953125,
0.0166778564453125,
-0.005313873291015625,
0.005374908447265625,
0.0008525848388671875,
-0.031585693359375,
-0.02508544921875,
0.05474853515625,
-0.0002834796905517578,
-0.0323486328125,
-0.043304443359375,
-0.0262298583984375,
-0.004482269287109375,
0.0159759521484375,
-0.031951904296875,
0.0169830322265625,
-0.034271240234375,
-0.007419586181640625,
0.00016558170318603516,
-0.0225372314453125,
0.01541900634765625,
0.052581787109375,
-0.0288543701171875,
-0.0233154296875,
0.04150390625,
0.0156402587890625,
0.004550933837890625,
-0.0016651153564453125,
-0.0212554931640625,
-0.0222320556640625,
-0.0238189697265625,
0.043304443359375,
-0.045501708984375,
0.020538330078125,
0.0005550384521484375,
0.037506103515625,
-0.0182952880859375,
0.0108184814453125,
-0.00775146484375,
0.002285003662109375,
0.01473236083984375,
0.0224151611328125,
0.01313018798828125,
-0.032135009765625,
-0.0235748291015625,
0.04364013671875,
-0.00736236572265625,
-0.0158843994140625,
0.0360107421875,
0.036163330078125,
-0.00222015380859375,
-0.0291748046875,
-0.02252197265625,
-0.049224853515625,
-0.00628662109375,
0.005405426025390625,
-0.01715087890625,
-0.0095672607421875,
0.036163330078125,
-0.03900146484375,
0.0204010009765625,
0.0233001708984375,
0.005306243896484375,
0.006214141845703125,
-0.0012884140014648438,
-0.0220947265625,
0.034454345703125,
-0.049102783203125,
-0.00807952880859375,
0.020782470703125,
0.025604248046875,
0.0005993843078613281,
-0.00475311279296875,
-0.00971221923828125,
0.035614013671875,
-0.0173187255859375,
0.00632476806640625,
-0.006473541259765625,
-0.00463104248046875,
-0.01119232177734375,
-0.057830810546875,
0.0155487060546875,
-0.012237548828125,
-0.0210113525390625,
0.0145416259765625,
0.0189208984375,
-0.0131683349609375,
0.007488250732421875,
0.0097198486328125,
0.00022983551025390625,
-0.009307861328125,
0.00567626953125,
-0.026123046875,
0.0017309188842773438,
0.0361328125,
-0.02862548828125,
-0.04693603515625,
-0.0489501953125,
0.01549530029296875,
-0.02398681640625,
-0.0269927978515625,
-0.005924224853515625,
-0.0009450912475585938,
-0.006824493408203125,
0.0239105224609375,
0.0081329345703125,
0.007537841796875,
0.0242156982421875,
-0.073974609375,
0.030853271484375,
0.002780914306640625,
0.00218963623046875,
0.00319671630859375,
-0.0008912086486816406,
-0.0023097991943359375,
-0.01114654541015625,
0.029815673828125,
-0.00872802734375,
0.012298583984375,
-0.0281219482421875,
-0.044891357421875,
-0.01678466796875,
0.0003635883331298828,
0.041015625,
-0.00586700439453125,
0.0230560302734375,
0.01108551025390625,
-0.024566650390625,
-0.004398345947265625,
-0.004817962646484375,
-0.00994110107421875,
-0.019561767578125,
-0.04522705078125,
-0.02362060546875,
0.00830841064453125,
-0.016937255859375,
0.020416259765625,
0.0271148681640625,
0.0110626220703125,
0.0118865966796875,
0.0877685546875,
-0.011505126953125,
0.00829315185546875,
-0.0231475830078125,
0.06787109375,
0.0178680419921875,
-0.04046630859375,
0.0085906982421875,
-0.00965118408203125,
0.0021076202392578125,
-0.0286407470703125,
-0.01424407958984375,
-0.0196380615234375,
-0.0826416015625,
0.0209808349609375,
0.0736083984375,
0.0229644775390625,
0.04522705078125,
0.020050048828125,
0.04296875,
0.07586669921875,
-0.03466796875,
-0.005741119384765625,
0.006343841552734375,
0.0268096923828125,
0.044158935546875,
0.01465606689453125,
0.00896453857421875,
0.014801025390625,
-0.04937744140625,
-0.0015287399291992188,
0.039520263671875,
-0.03753662109375,
-0.024505615234375,
-0.02716064453125,
-0.0093841552734375,
-0.0006723403930664062,
-0.0196685791015625,
0.003200531005859375,
-0.02099609375,
0.06927490234375,
0.026641845703125,
0.046112060546875,
0.032012939453125,
-0.01812744140625,
0.017059326171875,
-0.0019626617431640625,
-0.0200958251953125,
0.0037593841552734375,
-0.01319122314453125,
-0.016876220703125,
-0.0141754150390625,
-0.0266876220703125,
0.0184783935546875,
-0.001811981201171875,
-0.0457763671875,
0.0010213851928710938,
0.04071044921875,
-0.0082855224609375,
-0.0128326416015625,
-0.044097900390625,
-0.06591796875,
0.011444091796875,
0.05322265625,
0.02557373046875,
-0.0256195068359375,
-0.005046844482421875,
0.048492431640625,
-0.025054931640625,
0.08441162109375,
-0.01171112060546875,
-0.0109405517578125,
0.021484375,
-0.02117919921875,
0.0183258056640625,
-0.03204345703125,
0.060516357421875,
0.0513916015625,
-0.0229949951171875,
0.0099639892578125,
0.0065765380859375,
-0.01084136962890625,
0.00406646728515625,
-0.00504302978515625,
-0.0186004638671875,
0.0220184326171875,
-0.1015625,
0.0023517608642578125,
0.0340576171875,
0.08221435546875,
-0.00516510009765625,
-0.050018310546875,
0.008453369140625,
0.049652099609375,
-0.09063720703125,
-0.08502197265625,
0.0870361328125,
-0.068359375,
-0.0014925003051757812,
-0.006710052490234375,
-0.044097900390625,
-0.030364990234375,
0.050750732421875,
-0.00799560546875,
0.007076263427734375,
-0.029388427734375,
-0.054534912109375,
-0.0469970703125,
-0.074951171875,
0.0139617919921875,
-0.00213623046875,
0.01477813720703125,
0.005584716796875,
0.04931640625,
0.01285552978515625,
-0.0181427001953125,
0.0159912109375,
-0.0032444000244140625,
0.006961822509765625,
-0.0024261474609375,
0.0036869049072265625,
-0.0147247314453125,
0.0031833648681640625,
0.013031005859375,
-0.01837158203125,
0.00017130374908447266,
0.01259613037109375,
-0.024169921875,
0.011016845703125,
0.019866943359375,
0.0209503173828125,
0.051666259765625,
0.0029773712158203125,
0.0782470703125,
0.041839599609375,
0.0011844635009765625,
-0.0382080078125,
-0.00801849365234375,
-0.059417724609375,
0.01397705078125,
0.040740966796875,
0.00604248046875,
-0.0011453628540039062,
-0.0071258544921875,
-0.028900146484375,
0.0027618408203125,
0.01114654541015625,
-0.0227508544921875,
0.0195770263671875,
-0.00995635986328125,
-0.026031494140625,
0.01251983642578125,
0.0291748046875,
-0.012237548828125,
0.0283355712890625,
0.009918212890625,
0.00377655029296875,
0.0031261444091796875,
-0.0231170654296875,
-0.038726806640625,
-0.037811279296875,
0.050628662109375,
0.0022125244140625,
0.005298614501953125,
-0.024749755859375,
-0.0400390625,
-0.0168304443359375,
0.06109619140625,
-0.0689697265625,
-0.0028228759765625,
-0.01158905029296875,
0.02374267578125,
-0.0032215118408203125,
-0.05816650390625,
-0.031890869140625,
-0.03228759765625,
-0.03131103515625,
-0.01027679443359375,
-0.052825927734375,
0.0045013427734375,
0.0024013519287109375,
0.036346435546875,
0.0183563232421875,
-0.041900634765625,
0.028076171875,
-0.0660400390625,
0.022430419921875,
0.021820068359375,
-0.004756927490234375,
-0.00948333740234375,
-0.02581787109375,
-0.037109375,
-0.04150390625,
-0.0014905929565429688,
0.037322998046875,
0.028656005859375,
-0.054656982421875,
0.037139892578125,
0.01026153564453125,
0.050933837890625,
-0.00414276123046875,
-0.006031036376953125,
-0.002483367919921875,
0.004505157470703125,
0.002338409423828125,
-0.023468017578125,
-0.016815185546875,
-0.0251007080078125,
0.01033782958984375,
-0.00823974609375,
-0.0247955322265625,
0.02557373046875,
-0.039825439453125,
-0.0006337165832519531,
-0.0186767578125,
-0.03350830078125,
-0.07196044921875,
-0.0019702911376953125,
0.06463623046875,
0.01219940185546875,
-0.006641387939453125,
0.040679931640625,
0.01264190673828125,
-0.042572021484375,
0.06427001953125,
0.03131103515625,
-0.03338623046875,
-0.01165008544921875,
0.06689453125,
0.0133209228515625,
-0.039031982421875,
-0.00614166259765625,
0.0067138671875,
0.0430908203125,
-0.059844970703125,
0.03643798828125,
0.00661468505859375,
-0.041534423828125,
0.07989501953125,
-0.0182952880859375,
0.005672454833984375,
0.017974853515625,
0.03753662109375,
-0.0003402233123779297,
-0.0183258056640625,
0.00826263427734375,
-0.0165252685546875,
-0.0161285400390625,
0.0257568359375,
-0.02471923828125,
-0.038787841796875,
-0.01409912109375,
0.04266357421875,
-0.0210418701171875,
0.060333251953125,
-0.0209503173828125,
-0.03814697265625,
0.01541900634765625,
0.01690673828125,
-0.0258636474609375,
0.018890380859375,
-0.0032253265380859375,
-0.0034809112548828125,
-0.006595611572265625,
0.000995635986328125,
-0.0360107421875,
0.00021767616271972656,
0.0167388916015625,
0.03009033203125,
-0.010986328125,
0.0146331787109375,
-0.036865234375,
-0.0014171600341796875,
-0.033447265625,
0.022735595703125,
-0.0181121826171875,
0.0034465789794921875,
0.01039886474609375,
0.0288543701171875,
-0.0269775390625,
0.0391845703125,
0.0237274169921875,
0.03076171875,
0.04681396484375,
0.0093231201171875,
0.00859832763671875,
0.04803466796875,
0.0065155029296875,
0.01290130615234375,
0.00792694091796875,
-0.0025691986083984375,
-0.02752685546875,
0.1064453125,
-0.011077880859375,
0.05712890625,
-0.0276336669921875,
0.01739501953125,
0.044921875,
0.02069091796875,
0.0279541015625,
-0.037322998046875,
-0.0179901123046875,
0.0102996826171875,
0.007007598876953125,
-0.016387939453125,
0.018585205078125,
0.0211944580078125,
0.047210693359375,
-0.0027008056640625,
-0.00643157958984375,
0.01197052001953125,
-0.0440673828125,
-0.014984130859375,
0.0330810546875,
-0.0218505859375,
-0.047821044921875,
-0.044158935546875,
0.01983642578125,
0.06341552734375,
-0.0037479400634765625,
-0.0010786056518554688,
-0.040313720703125,
-0.02069091796875,
0.0221099853515625,
-0.028350830078125,
0.029541015625,
-0.0038623809814453125,
-0.0196990966796875,
-0.0226898193359375,
-0.0264434814453125,
0.0225677490234375,
-0.025848388671875,
0.004909515380859375,
-0.0175323486328125,
-0.0249786376953125,
0.01470947265625,
0.00745391845703125,
0.08184814453125,
-0.06927490234375,
-0.03851318359375,
-0.0256500244140625,
-0.022613525390625,
0.07940673828125,
0.049774169921875,
-0.058746337890625,
0.01557159423828125,
-0.050994873046875,
-0.0092620849609375,
0.006107330322265625,
-0.036346435546875,
-0.036651611328125,
-0.044464111328125,
0.0036754608154296875,
0.03515625,
-0.0134735107421875,
0.0005860328674316406,
-0.04107666015625,
0.018310546875,
-0.003574371337890625,
0.09234619140625,
-0.0107574462890625,
0.023468017578125,
0.03668212890625,
0.0277099609375,
-0.0029125213623046875,
-0.020538330078125,
-0.040069580078125,
0.005222320556640625,
0.0100555419921875,
-0.036468505859375,
-0.031646728515625,
-0.0005340576171875,
0.005771636962890625,
0.0073699951171875,
0.01189422607421875,
-0.004425048828125,
-0.0087127685546875,
0.0165557861328125,
0.0160675048828125,
-0.01097869873046875,
-0.029693603515625,
0.0262908935546875,
-0.054290771484375,
0.050323486328125,
-0.0173492431640625,
-0.02484130859375,
-0.01038360595703125,
0.0167236328125,
-0.031280517578125,
0.0027942657470703125,
-0.04986572265625,
0.0256805419921875,
-0.044281005859375,
0.0323486328125,
0.08636474609375,
0.00820159912109375,
0.04364013671875,
0.00576019287109375,
-0.004375457763671875,
0.043212890625,
-0.007598876953125,
0.00460052490234375,
-0.0137939453125,
0.05242919921875,
0.00930023193359375,
-0.0042877197265625,
0.050048828125,
-0.0255279541015625,
-0.020355224609375,
0.0235137939453125,
0.01277923583984375,
-0.040863037109375,
0.0084228515625,
-0.004108428955078125,
0.0252838134765625,
0.005031585693359375,
0.010711669921875,
0.027801513671875,
-0.00811004638671875,
0.00201416015625,
0.0178070068359375,
-0.00347900390625,
0.0006766319274902344,
-0.015655517578125,
0.01715087890625,
-0.0127410888671875,
0.06610107421875,
-0.002960205078125,
-0.1373291015625,
0.0026702880859375,
0.07452392578125,
-0.052947998046875,
-0.0291290283203125,
-0.007232666015625,
0.00424957275390625,
-0.02410888671875,
-0.06005859375,
0.0247039794921875,
-0.004787445068359375,
0.01299285888671875,
-0.029876708984375,
0.01479339599609375,
0.012054443359375,
0.063232421875,
-0.0178375244140625,
0.0085601806640625,
0.048126220703125,
-0.02972412109375,
-0.040771484375,
-0.029449462890625,
0.00415802001953125,
0.0225677490234375,
-0.033538818359375,
0.0196533203125,
-0.030303955078125,
-0.0153350830078125,
0.004306793212890625,
0.001758575439453125,
0.0108184814453125,
0.0255889892578125,
-0.047210693359375,
0.0384521484375,
-0.007282257080078125,
-0.00917816162109375,
-0.0110015869140625,
0.0203399658203125,
-0.019500732421875,
0.0145263671875,
-0.010955810546875,
-0.009857177734375,
-0.0241546630859375,
-0.042510986328125,
-0.0927734375,
0.1185302734375,
0.0169677734375,
0.0460205078125,
0.017364501953125,
0.03289794921875,
-0.04693603515625,
-0.01285552978515625,
-0.0250396728515625,
0.04296875,
-0.0238189697265625,
0.0513916015625,
-0.055145263671875,
-0.0243072509765625,
0.021453857421875,
0.05548095703125,
0.036651611328125,
0.005313873291015625,
-0.007709503173828125,
-0.0282745361328125,
0.04302978515625,
0.035400390625,
-0.0007753372192382812,
0.006649017333984375,
0.0219879150390625,
0.038665771484375,
0.0546875,
-0.036865234375,
0.0291900634765625,
-0.0183258056640625,
0.0100555419921875,
0.03466796875,
0.01525115966796875,
-0.0132293701171875,
-0.00853729248046875,
0.00536346435546875,
-0.049652099609375,
-0.00785064697265625,
0.00896453857421875,
0.0249481201171875,
0.040924072265625,
0.01482391357421875,
0.03448486328125,
-0.02923583984375,
-0.000015020370483398438,
-0.0230865478515625,
0.052215576171875,
0.001758575439453125,
-0.0212554931640625,
0.05029296875,
0.00786590576171875,
0.040313720703125,
-0.0015382766723632812,
-0.01541900634765625,
-0.006866455078125,
0.048736572265625,
0.04852294921875,
0.0291748046875,
0.016021728515625,
-0.0426025390625,
0.001163482666015625,
0.0654296875,
0.06781005859375,
-0.05224609375,
-0.00003528594970703125,
0.024505615234375,
-0.0133209228515625,
-0.007442474365234375,
-0.05621337890625,
-0.0159759521484375,
0.03643798828125,
0.0222015380859375,
-0.03131103515625,
0.020660400390625,
0.046844482421875,
0.0472412109375,
0.01003265380859375,
0.01328277587890625,
-0.09478759765625,
-0.0063934326171875,
-0.036102294921875,
0.0115509033203125,
0.01067352294921875,
0.079345703125,
0.03619384765625,
0.012451171875,
-0.07269287109375,
-0.0310211181640625,
0.0020542144775390625,
0.034698486328125,
-0.0123291015625,
-0.002166748046875,
-0.011474609375,
-0.029632568359375,
-0.0207061767578125,
0.01904296875,
0.08160400390625,
0.01227569580078125,
0.05645751953125,
0.044921875,
0.013519287109375,
0.01480865478515625,
0.006351470947265625,
-0.00154876708984375,
0.014434814453125,
0.0066070556640625,
0.0010805130004882812,
0.0016813278198242188,
-0.035919189453125,
-0.0165557861328125,
0.047210693359375,
-0.005023956298828125,
-0.0275421142578125,
0.038970947265625,
-0.01873779296875,
-0.035980224609375,
0.0108642578125,
-0.0094146728515625,
0.0533447265625,
-0.013458251953125,
-0.040313720703125,
-0.00010883808135986328,
-0.0281524658203125,
-0.0421142578125,
0.0112457275390625,
0.0355224609375,
-0.0141448974609375,
0.00940704345703125,
-0.02581787109375,
0.036834716796875,
0.006160736083984375,
-0.0256195068359375,
-0.006130218505859375,
0.027496337890625,
0.023590087890625,
0.0253448486328125,
-0.0391845703125,
-0.00533294677734375,
0.01119232177734375,
0.0082855224609375,
0.0127105712890625,
-0.030029296875,
0.03302001953125,
0.020355224609375,
-0.0113525390625,
0.017333984375,
-0.033294677734375,
-0.019378662109375,
0.023773193359375,
0.004398345947265625,
0.01264190673828125,
-0.0009450912475585938,
-0.012451171875,
-0.0014705657958984375,
0.056365966796875,
-0.028106689453125,
-0.008880615234375,
-0.00917816162109375,
0.0259552001953125,
-0.023681640625,
0.0384521484375,
-0.0187835693359375,
0.01448822021484375,
-0.0296783447265625,
-0.052032470703125,
0.06793212890625,
0.0391845703125,
0.0269317626953125,
0.019500732421875,
0.0257720947265625,
-0.0026302337646484375,
0.0219879150390625,
-0.031036376953125,
0.0214996337890625,
0.028045654296875,
0.025482177734375,
-0.004428863525390625,
-0.008514404296875,
-0.01416778564453125,
0.027008056640625,
0.0106048583984375,
0.0162506103515625,
0.015960693359375,
0.0103912353515625,
-0.0243988037109375,
-0.01317596435546875,
0.0295257568359375,
0.01239013671875,
0.01047515869140625,
-0.033477783203125,
-0.007007598876953125,
-0.045562744140625,
-0.03778076171875,
-0.039794921875,
-0.06488037109375,
0.0008335113525390625,
0.026702880859375,
-0.038238525390625,
-0.021270751953125,
-0.06182861328125,
-0.0266265869140625,
0.0005006790161132812,
-0.0287628173828125,
0.04693603515625,
-0.026824951171875,
-0.0213623046875,
-0.053192138671875,
-0.0228729248046875,
-0.03326416015625,
0.02130126953125,
0.00949859619140625,
-0.06866455078125,
-0.0016813278198242188,
-0.05230712890625,
-0.038116455078125,
-0.053497314453125,
0.0176849365234375,
0.01134490966796875,
-0.02239990234375,
-0.00954437255859375,
0.0219573974609375,
0.01812744140625,
0.072265625,
0.0291748046875,
-0.01953125,
0.006275177001953125,
0.0220184326171875,
-0.0091094970703125,
-0.08111572265625,
0.01064300537109375,
-0.061309814453125,
0.007568359375,
-0.015716552734375,
-0.027587890625,
-0.0206146240234375,
-0.032012939453125,
-0.0048370361328125,
0.0367431640625,
0.01910400390625,
-0.0238494873046875,
-0.033416748046875,
0.0225830078125,
-0.00618743896484375,
0.045440673828125,
0.00591278076171875,
-0.03216552734375,
-0.0095062255859375,
0.0071258544921875,
0.0194854736328125,
0.043365478515625,
0.026397705078125,
0.0304718017578125,
-0.036529541015625,
-0.021728515625,
-0.05279541015625,
-0.00484466552734375,
-0.01364898681640625,
-0.0191497802734375,
0.0021915435791015625,
0.0072174072265625,
-0.04046630859375,
-0.029571533203125,
0.009307861328125,
0.04754638671875,
-0.0127410888671875,
-0.00876617431640625,
-0.02630615234375,
-0.026763916015625,
0.0321044921875,
0.0302276611328125,
0.014495849609375,
-0.00013530254364013672,
-0.02301025390625,
-0.0036716461181640625,
-0.045379638671875,
0.017059326171875,
0.0279541015625,
-0.069091796875,
0.00495147705078125,
0.0242462158203125,
0.00798797607421875,
-0.0216217041015625,
0.0196380615234375,
-0.0261688232421875,
-0.027618408203125,
-0.01568603515625,
-0.00848388671875,
-0.03125,
-0.047210693359375,
0.033355712890625,
-0.021881103515625,
-0.00913238525390625,
0.014923095703125,
0.0261077880859375,
-0.0018014907836914062,
0.0273590087890625,
0.0279541015625,
0.033660888671875,
-0.025665283203125,
-0.00006663799285888672,
0.031829833984375,
0.0009121894836425781,
-0.01166534423828125,
-0.0181427001953125,
-0.007007598876953125,
0.0162506103515625,
-0.0101318359375,
0.01377105712890625,
-0.01494598388671875,
0.05908203125,
0.009765625,
0.06561279296875,
-0.00559234619140625,
-0.0236053466796875,
-0.020751953125,
0.044403076171875,
-0.02398681640625,
-0.0198211669921875,
0.00502777099609375,
-0.0276947021484375,
-0.005901336669921875,
-0.0005087852478027344,
0.005733489990234375,
-0.038543701171875,
0.0263671875,
-0.0243377685546875,
0.0173187255859375,
0.024993896484375
]
|
d16281f3280d4321c58f9ec101ba8fddb460221e | Wordpress Stackexchange
Q: How to reference a theme image in a stylesheet? I have a global element as part of my theme and I need to reference and image as a background image. I need the URL to the image. I assume that it's bad practice to hard-code the URL and that the URL needs to be relative to the theme location. What is the recommended way of referencing an image within a stylesheet?
A: It depends on your image and stylesheet location.
But this is the syntax:
.theme-image {
background-image: url('../images/header-img.jpg');
}
The above code is for the structure
wp-content
- themes
- your-theme
- images
- header-img.jpg
- css
- style.css
You are making the browser come one directory before and search for images directory.
| Q: How to reference a theme image in a stylesheet? I have a global element as part of my theme and I need to reference and image as a background image. I need the URL to the image. I assume that it's bad practice to hard-code the URL and that the URL needs to be relative to the theme location. What is the recommended way of referencing an image within a stylesheet?
A: It depends on your image and stylesheet location.
But this is the syntax:
.theme-image {
background-image: url('../images/header-img.jpg');
}
The above code is for the structure
wp-content
- themes
- your-theme
- images
- header-img.jpg
- css
- style.css
You are making the browser come one directory before and search for images directory.
A: I had a problem with the relativity of the URL.
I mean, when openening a categoryoverview from third or deeper child-categories like this:
-nature
--animals
---wolves >>>3rd level
--birds
The URL for wolves would become like:
/category/nature/animals/wolves/
Therefore the imagelocation is one directory-level before and doesn't show up.
So I tried this and it worked:
.sidebar-row .widget {
background-image: url("../../../../wp-content/uploads/.../image.webp");
background-image: url("../../../../../wp-content/uploads/.../image.webp");
background-image: url("../../../../../../wp-content/uploads/.../image.webp");
}
Images on incorrect locations will be ignored, the one on the correct location will show up.
BTW: I'm using the "Simple CSS"-plugin to change the layout for my site.
A: For WordPress, it should be something like this:
background:url('../wp-content/themes/yourtheme/images/social-icons-v2-opt.png');
For Child Theme
background:url('../wp-content/themes/yourtheme-child/images/social-icons-v2-opt.png');
| wordpress | {
"language": "en",
"length": 234,
"provenance": "stackexchange_00019.jsonl.gz:455682",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188725"
} | [
0.03350830078125,
-0.0198822021484375,
0.035888671875,
-0.00981903076171875,
-0.00811767578125,
-0.0167694091796875,
0.0343017578125,
-0.0247955322265625,
0.040435791015625,
0.0231170654296875,
-0.06103515625,
0.0084381103515625,
0.01446533203125,
0.007511138916015625,
-0.02471923828125,
-0.01346588134765625,
0.028411865234375,
-0.037139892578125,
0.0292510986328125,
0.015380859375,
0.024932861328125,
0.039581298828125,
0.0113067626953125,
-0.0210113525390625,
0.0196990966796875,
-0.0163421630859375,
0.0804443359375,
-0.0159912109375,
0.01517486572265625,
-0.0189666748046875,
0.0276641845703125,
-0.0135650634765625,
0.02215576171875,
0.0158233642578125,
-0.0137939453125,
-0.0021686553955078125,
-0.00926971435546875,
0.006908416748046875,
0.01277923583984375,
-0.0030384063720703125,
0.01404571533203125,
-0.0160369873046875,
0.020050048828125,
0.0228729248046875,
0.0016241073608398438,
-0.03692626953125,
0.01190948486328125,
-0.057220458984375,
0.0026416778564453125,
-0.0086517333984375,
0.034454345703125,
0.06695556640625,
0.043853759765625,
0.00493621826171875,
-0.0121612548828125,
0.00799560546875,
-0.01342010498046875,
-0.005535125732421875,
0.0239105224609375,
-0.022857666015625,
-0.024078369140625,
-0.0168304443359375,
0.03179931640625,
0.01776123046875,
0.016204833984375,
-0.004535675048828125,
-0.0281982421875,
0.031982421875,
-0.0152435302734375,
-0.00826263427734375,
0.018096923828125,
-0.020782470703125,
0.002758026123046875,
-0.035919189453125,
0.0028514862060546875,
-0.018157958984375,
-0.0026226043701171875,
-0.043212890625,
0.00612640380859375,
0.00926971435546875,
-0.0038127899169921875,
-0.0206146240234375,
-0.03009033203125,
-0.0182342529296875,
0.017547607421875,
0.006130218505859375,
0.00011491775512695312,
-0.002513885498046875,
-0.017303466796875,
-0.051727294921875,
-0.027252197265625,
0.01120758056640625,
-0.055633544921875,
-0.0267486572265625,
-0.0183258056640625,
-0.0322265625,
0.003971099853515625,
0.03179931640625,
-0.00844573974609375,
0.01690673828125,
-0.0203704833984375,
-0.0223541259765625,
0.0277099609375,
-0.036529541015625,
-0.0095672607421875,
0.05255126953125,
0.0278778076171875,
0.0249481201171875,
0.00508880615234375,
0.0170745849609375,
-0.00013399124145507812,
0.0023517608642578125,
0.009735107421875,
-0.0091094970703125,
-0.046051025390625,
0.0237579345703125,
0.0004703998565673828,
-0.020904541015625,
0.00959014892578125,
-0.004016876220703125,
0.006328582763671875,
0.02874755859375,
0.02459716796875,
-0.0089263916015625,
-0.005062103271484375,
0.0001882314682006836,
-0.0158233642578125,
-0.046905517578125,
0.0136260986328125,
-0.0246124267578125,
-0.040130615234375,
0.036834716796875,
0.0445556640625,
-0.0108795166015625,
0.0010175704956054688,
-0.005268096923828125,
0.0099029541015625,
-0.0120086669921875,
-0.021392822265625,
0.015869140625,
-0.00812530517578125,
-0.0216064453125,
0.0235137939453125,
-0.027679443359375,
0.022491455078125,
-0.0008721351623535156,
-0.000029981136322021484,
0.03326416015625,
0.0035114288330078125,
-0.05010986328125,
0.057861328125,
-0.04345703125,
0.0025653839111328125,
0.022735595703125,
0.0214996337890625,
-0.0186309814453125,
0.0301055908203125,
-0.0157623291015625,
0.0144805908203125,
-0.0308837890625,
-0.0090484619140625,
0.025360107421875,
0.04364013671875,
0.0122528076171875,
0.012298583984375,
-0.026153564453125,
-0.021636962890625,
0.00113677978515625,
0.0036106109619140625,
-0.0247955322265625,
-0.0255889892578125,
-0.0189666748046875,
-0.033416748046875,
0.0019092559814453125,
0.01419830322265625,
0.04693603515625,
0.042633056640625,
-0.02874755859375,
0.005512237548828125,
0.08599853515625,
0.0002541542053222656,
-0.006500244140625,
0.007717132568359375,
-0.0107574462890625,
-0.0278472900390625,
-0.01861572265625,
0.0026226043701171875,
0.0244293212890625,
0.0241851806640625,
0.0175628662109375,
0.018890380859375,
-0.01464080810546875,
-0.0131072998046875,
-0.00792694091796875,
-0.00771331787109375,
-0.0171661376953125,
-0.02484130859375,
-0.01114654541015625,
-0.01739501953125,
0.018798828125,
0.043731689453125,
0.01015472412109375,
0.01500701904296875,
-0.00588226318359375,
-0.00156402587890625,
0.01212310791015625,
0.00382232666015625,
0.01343536376953125,
-0.0168304443359375,
0.0034732818603515625,
0.00582122802734375,
0.00519561767578125,
0.0240020751953125,
-0.0919189453125,
-0.01383209228515625,
0.04766845703125,
0.0143280029296875,
-0.00817108154296875,
0.006473541259765625,
0.0228424072265625,
-0.00963592529296875,
0.020843505859375,
-0.0207061767578125,
0.0167388916015625,
0.0115966796875,
0.0328369140625,
-0.037017822265625,
-0.006404876708984375,
-0.0298919677734375,
0.0338134765625,
-0.06170654296875,
0.0300140380859375,
0.0013179779052734375,
0.033966064453125,
0.0150604248046875,
0.0107269287109375,
0.0430908203125,
-0.037384033203125,
0.0142669677734375,
0.0130462646484375,
0.040740966796875,
0.038818359375,
-0.00505828857421875,
-0.0205078125,
0.061859130859375,
0.01090240478515625,
0.0290374755859375,
-0.03814697265625,
0.0210418701171875,
-0.03619384765625,
0.02667236328125,
-0.09295654296875,
0.06512451171875,
-0.08184814453125,
0.0195770263671875,
0.00588226318359375,
0.0025653839111328125,
-0.01450347900390625,
-0.0304107666015625,
0.033050537109375,
0.01953125,
0.0103302001953125,
-0.0562744140625,
0.0180206298828125,
0.010406494140625,
0.0075531005859375,
0.0176849365234375,
-0.004848480224609375,
-0.0361328125,
0.0131988525390625,
0.0187225341796875,
-0.036773681640625,
0.00647735595703125,
0.047882080078125,
0.02069091796875,
-0.005489349365234375,
0.01806640625,
-0.027984619140625,
0.001766204833984375,
0.0218353271484375,
-0.0347900390625,
-0.042633056640625,
-0.01406097412109375,
0.00618743896484375,
0.004215240478515625,
-0.0253448486328125,
0.055206298828125,
0.042694091796875,
-0.0011949539184570312,
0.012481689453125,
0.034088134765625,
0.006500244140625,
-0.00897216796875,
0.0004124641418457031,
-0.00010097026824951172,
-0.01358795166015625,
0.0153045654296875,
0.00513458251953125,
0.029144287109375,
-0.0275115966796875,
0.0205535888671875,
0.041229248046875,
-0.03717041015625,
0.0198822021484375,
0.005126953125,
0.0198974609375,
0.0240478515625,
-0.0159912109375,
-0.01309967041015625,
0.007175445556640625,
-0.061248779296875,
-0.01326751708984375,
0.036468505859375,
-0.0187835693359375,
0.002277374267578125,
-0.02069091796875,
-0.026214599609375,
-0.028411865234375,
-0.127197265625,
-0.104248046875,
-0.01200103759765625,
-0.00963592529296875,
-0.01538848876953125,
-0.00872039794921875,
0.011749267578125,
0.006267547607421875,
-0.00954437255859375,
-0.005138397216796875,
-0.018463134765625,
-0.021240234375,
-0.047454833984375,
-0.1007080078125,
-0.0911865234375,
-0.07879638671875,
-0.006832122802734375,
0.02099609375,
-0.0005040168762207031,
0.007358551025390625,
0.0024890899658203125,
-0.0183563232421875,
0.0211334228515625,
0.0604248046875,
0.017333984375,
-0.01282501220703125,
0.028289794921875,
-0.0172119140625,
-0.01244354248046875,
0.0133514404296875,
0.0075836181640625,
0.029754638671875,
-0.031524658203125,
-0.00972747802734375,
-0.051116943359375,
-0.056793212890625,
-0.050140380859375,
0.040191650390625,
0.044647216796875,
-0.0699462890625,
-0.01019287109375,
-0.08349609375,
-0.0665283203125,
-0.0233306884765625,
-0.09271240234375,
0.0265655517578125,
0.06744384765625,
0.00893402099609375,
-0.0322265625,
0.006427764892578125,
0.013671875,
0.0041961669921875,
-0.008056640625,
-0.0188751220703125,
0.06597900390625,
0.006732940673828125,
0.01020050048828125,
-0.0176849365234375,
0.02154541015625,
-0.01025390625,
0.037689208984375,
0.005615234375,
0.0088958740234375,
-0.028533935546875,
0.050689697265625,
-0.042083740234375,
-0.045989990234375,
0.03656005859375,
0.004894256591796875,
0.026641845703125,
-0.016571044921875,
-0.02587890625,
0.003452301025390625,
0.0916748046875,
-0.023468017578125,
-0.0313720703125,
0.0018100738525390625,
0.025299072265625,
-0.03082275390625,
-0.032928466796875,
-0.01080322265625,
-0.01311492919921875,
-0.07464599609375,
0.0226593017578125,
0.01715087890625,
-0.04058837890625,
-0.0059814453125,
-0.0277862548828125,
-0.06072998046875,
-0.029327392578125,
0.0090789794921875,
0.032318115234375,
-0.0167083740234375,
0.057220458984375,
-0.05535888671875,
0.0784912109375,
-0.0140838623046875,
-0.0235748291015625,
-0.07275390625,
-0.0291290283203125,
-0.006504058837890625,
0.0753173828125,
0.00865936279296875,
-0.0103302001953125,
-0.0006823539733886719,
0.049163818359375,
0.007137298583984375,
0.08575439453125,
-0.01526641845703125,
0.01070404052734375,
-0.004634857177734375,
-0.0384521484375,
0.0207061767578125,
-0.042755126953125,
0.00007075071334838867,
0.00554656982421875,
-0.0265960693359375,
0.005039215087890625,
-0.0239715576171875,
-0.0086517333984375,
0.0266571044921875,
-0.038543701171875,
0.0099334716796875,
0.00664520263671875,
0.043548583984375,
0.0455322265625,
0.02484130859375,
-0.0117340087890625,
-0.023040771484375,
0.018646240234375,
0.056793212890625,
0.048797607421875,
0.0259857177734375,
-0.007801055908203125,
0.047393798828125,
0.0021953582763671875,
-0.03814697265625,
-0.03924560546875,
0.02239990234375,
0.0521240234375,
-0.003910064697265625,
0.03857421875,
0.0081939697265625,
-0.037841796875,
0.08758544921875,
0.02789306640625,
-0.00800323486328125,
0.021087646484375,
0.03997802734375,
-0.003826141357421875,
-0.03765869140625,
0.0262603759765625,
-0.01251983642578125,
-0.0024871826171875,
0.043182373046875,
-0.0214691162109375,
-0.01031494140625,
-0.023468017578125,
0.02923583984375,
-0.023406982421875,
0.006702423095703125,
-0.04766845703125,
-0.0036258697509765625,
-0.0113372802734375,
-0.0050201416015625,
0.08599853515625,
0.040130615234375,
-0.0142059326171875,
0.022491455078125,
0.045318603515625,
0.01837158203125,
0.0149688720703125,
0.0113983154296875,
-0.033416748046875,
0.024688720703125,
0.0277252197265625,
-0.00811767578125,
0.021575927734375,
-0.0096282958984375,
0.06298828125,
0.039642333984375,
0.0011425018310546875,
-0.032379150390625,
-0.0012197494506835938,
-0.0096588134765625,
-0.0159912109375,
-0.0192718505859375,
0.044891357421875,
-0.0151214599609375,
-0.017486572265625,
-0.0214996337890625,
-0.0341796875,
-0.0670166015625,
-0.047943115234375,
0.05157470703125,
0.02557373046875,
-0.027069091796875,
0.0377197265625,
-0.0243377685546875,
-0.0017995834350585938,
-0.01374053955078125,
0.007785797119140625,
-0.0162200927734375,
-0.0233612060546875,
0.0101470947265625,
0.0335693359375,
-0.0002073049545288086,
0.01157379150390625,
-0.0290679931640625,
0.0274505615234375,
-0.031707763671875,
0.0244140625,
0.038482666015625,
0.054351806640625,
-0.03741455078125,
-0.044036865234375,
0.0007424354553222656,
-0.039581298828125,
-0.00574493408203125,
0.03668212890625,
-0.0299072265625,
-0.059112548828125,
-0.0290374755859375,
-0.00499725341796875,
0.056365966796875,
-0.024169921875,
-0.05035400390625,
0.027740478515625,
-0.0272216796875,
0.061767578125,
0.0301055908203125,
-0.01522064208984375,
0.051788330078125,
0.0244598388671875,
-0.053741455078125,
-0.000286102294921875,
-0.005092620849609375,
0.004878997802734375,
-0.0196075439453125,
-0.00698089599609375,
-0.0264892578125,
0.0312042236328125,
-0.0212249755859375,
0.00902557373046875,
-0.02301025390625,
0.0007987022399902344,
-0.030517578125,
0.0096893310546875,
0.0477294921875,
0.01678466796875,
-0.0631103515625,
0.0186614990234375,
-0.05145263671875,
0.00580596923828125,
-0.0284423828125,
-0.073486328125,
-0.0259552001953125,
-0.0212249755859375,
0.0119171142578125,
0.02069091796875,
-0.0016841888427734375,
-0.0138702392578125,
-0.01508331298828125,
0.0213470458984375,
0.01181793212890625,
0.0482177734375,
-0.023529052734375,
0.037261962890625,
0.005649566650390625,
0.005405426025390625,
-0.007091522216796875,
0.014556884765625,
0.030487060546875,
-0.01322174072265625,
-0.0216064453125,
-0.03912353515625,
0.00897216796875,
0.0006308555603027344,
0.0208892822265625,
0.03753662109375,
0.039581298828125,
0.03179931640625,
0.025604248046875,
-0.028594970703125,
0.005443572998046875,
-0.02764892578125,
0.037872314453125,
-0.07232666015625,
-0.0125274658203125,
0.021942138671875,
0.01629638671875,
0.058135986328125,
-0.01383209228515625,
-0.00749969482421875,
-0.00791168212890625,
-0.00434112548828125,
0.0005054473876953125,
0.0279388427734375,
-0.04400634765625,
0.050506591796875,
0.1195068359375,
-0.0193939208984375,
0.0439453125,
0.0198516845703125,
-0.01383209228515625,
0.0220794677734375,
0.0810546875,
0.0029125213623046875,
-0.05596923828125,
0.04046630859375,
0.0168304443359375,
-0.042083740234375,
0.0020160675048828125,
-0.038970947265625,
0.00485992431640625,
0.0073394775390625,
0.059356689453125,
-0.005817413330078125,
0.0053558349609375,
0.01461029052734375,
-0.0168914794921875,
0.0357666015625,
0.0175628662109375,
-0.0200958251953125,
-0.01776123046875,
0.0293426513671875,
-0.02777099609375,
-0.006381988525390625,
0.007259368896484375,
0.0064544677734375,
0.00620269775390625,
0.016448974609375,
0.007312774658203125,
-0.02130126953125,
-0.072998046875,
-0.0867919921875,
0.0804443359375,
-0.087158203125,
-0.0191497802734375,
0.01424407958984375,
-0.0181427001953125,
-0.01499176025390625,
-0.007686614990234375,
0.01678466796875,
0.007137298583984375,
-0.005855560302734375,
0.01308441162109375,
0.0226898193359375,
0.0084228515625,
0.021942138671875,
0.00005322694778442383,
0.011199951171875,
-0.0170135498046875,
0.004154205322265625,
0.049652099609375,
0.01090240478515625,
0.021270751953125,
-0.016204833984375,
-0.04693603515625,
-0.0162353515625,
-0.052703857421875,
0.02130126953125,
-0.0137786865234375,
-0.01513671875,
0.09423828125,
-0.037261962890625,
-0.01409912109375,
0.026092529296875,
-0.00255584716796875,
-0.022552490234375,
0.03131103515625,
0.04986572265625,
-0.042938232421875,
-0.0154876708984375,
0.035003662109375,
-0.0074462890625,
-0.0215606689453125,
0.016815185546875,
0.0032024383544921875,
0.0094146728515625,
-0.0491943359375,
-0.0012731552124023438,
0.035308837890625,
0.00572967529296875,
0.0316162109375,
0.0180511474609375,
-0.007503509521484375,
0.03558349609375,
-0.0157012939453125,
0.0024261474609375,
-0.05938720703125,
0.00494384765625,
-0.0273895263671875,
0.0299530029296875,
0.052703857421875,
0.020263671875,
-0.028350830078125,
-0.004180908203125,
0.06158447265625,
0.0231781005859375,
0.00994873046875,
0.043670654296875,
0.00942230224609375,
-0.029998779296875,
-0.020294189453125,
0.0244140625,
0.031341552734375,
-0.06158447265625,
-0.022857666015625,
0.029754638671875,
-0.004688262939453125,
-0.026397705078125,
0.03314208984375,
0.01873779296875,
-0.10308837890625,
0.033203125,
0.07684326171875,
-0.033660888671875,
0.0020389556884765625,
0.038909912109375,
0.00640106201171875,
0.037811279296875,
-0.006683349609375,
-0.0099029541015625,
0.043731689453125,
-0.00418853759765625,
0.028472900390625,
0.0021800994873046875,
0.0033626556396484375,
0.034454345703125,
0.01232147216796875,
0.01073455810546875,
0.04815673828125,
-0.024871826171875,
0.02191162109375,
0.01507568359375,
0.027130126953125,
-0.033782958984375,
-0.006496429443359375,
0.020721435546875,
0.024566650390625,
-0.02618408203125,
-0.0182342529296875,
0.0091552734375,
-0.0003561973571777344,
0.01386260986328125,
-0.0244903564453125,
0.02679443359375,
-0.0584716796875,
-0.0498046875,
-0.0181884765625,
0.002613067626953125,
0.048614501953125,
-0.017822265625,
0.003997802734375,
0.0308837890625,
-0.01904296875,
0.034637451171875,
-0.02593994140625,
0.034393310546875,
0.00934600830078125,
-0.00963592529296875,
-0.018524169921875,
0.0299224853515625,
0.044525146484375,
0.01399993896484375,
-0.018402099609375,
0.03765869140625,
0.022796630859375,
0.023590087890625,
-0.005107879638671875,
-0.016632080078125,
0.0223236083984375,
0.0171356201171875,
-0.005428314208984375,
-0.042999267578125,
-0.006473541259765625,
-0.00531768798828125,
-0.051910400390625,
-0.0175628662109375,
-0.01308441162109375,
-0.020843505859375,
0.05572509765625,
-0.0214385986328125,
0.034423828125,
0.00841522216796875,
-0.02020263671875,
-0.031494140625,
-0.01381683349609375,
0.062347412109375,
-0.0153961181640625,
0.03326416015625,
0.00525665283203125,
-0.0004093647003173828,
-0.009429931640625,
-0.044921875,
0.0113677978515625,
-0.014404296875,
-0.0149688720703125,
0.0073394775390625,
0.007396697998046875,
-0.0657958984375,
-0.00824737548828125,
0.0241546630859375,
-0.027862548828125,
0.00966644287109375,
0.0129852294921875,
0.0029964447021484375,
-0.01546478271484375,
-0.01108551025390625,
0.0214691162109375,
-0.01715087890625,
0.02276611328125,
0.0085296630859375,
-0.01036834716796875,
-0.00641632080078125,
-0.00911712646484375,
0.04840087890625,
0.019927978515625,
0.03436279296875,
-0.0137481689453125,
0.038604736328125,
0.003849029541015625,
0.032928466796875,
-0.034912109375,
-0.0028095245361328125,
0.0230255126953125,
-0.0230865478515625,
0.0071868896484375,
0.0028820037841796875,
-0.0750732421875,
0.0167999267578125,
0.01506805419921875,
-0.004871368408203125,
-0.004001617431640625,
0.0130157470703125,
0.0206756591796875,
0.03179931640625,
-0.0018186569213867188,
-0.029266357421875,
-0.04119873046875,
-0.0528564453125,
0.00881195068359375,
0.021209716796875,
-0.0028533935546875,
-0.042999267578125,
0.0196075439453125,
-0.0013914108276367188,
-0.016876220703125,
0.044525146484375,
-0.0399169921875,
0.060882568359375,
0.037353515625,
-0.0260467529296875,
-0.053924560546875,
0.023956298828125,
-0.004840850830078125,
0.0083770751953125,
-0.006866455078125,
0.06842041015625,
-0.00585174560546875,
-0.03936767578125,
0.034820556640625,
0.035491943359375,
0.0474853515625,
-0.018218994140625,
-0.0023956298828125,
0.042327880859375,
0.0007066726684570312,
0.00811767578125,
-0.015838623046875,
-0.00864410400390625,
-0.00024187564849853516,
-0.02783203125,
0.028961181640625,
-0.01320648193359375,
-0.0001882314682006836,
-0.0555419921875,
-0.01366424560546875,
0.04998779296875,
0.0177001953125,
-0.062347412109375,
0.01364898681640625,
0.0025043487548828125,
0.04736328125,
0.0010814666748046875,
-0.0011091232299804688,
0.00185394287109375,
0.01267242431640625,
-0.0386962890625,
-0.046783447265625,
-0.02294921875,
0.025543212890625,
-0.0335693359375,
0.033843994140625,
0.06536865234375,
-0.025390625,
0.0416259765625,
0.039398193359375,
0.01629638671875,
0.091064453125,
-0.07476806640625,
-0.01247406005859375,
0.037200927734375,
0.0117034912109375,
-0.047607421875,
-0.061431884765625,
0.0080718994140625,
-0.0229949951171875,
0.01343536376953125,
-0.045135498046875,
0.009185791015625,
0.0206146240234375,
-0.050079345703125,
-0.0860595703125,
0.04412841796875,
-0.02288818359375,
-0.04205322265625,
-0.038604736328125,
-0.0007262229919433594,
-0.0089111328125,
-0.00354766845703125,
-0.01220703125,
-0.01407623291015625,
-0.00940704345703125,
0.0260162353515625,
0.01522064208984375,
0.036773681640625,
-0.007465362548828125,
0.0239715576171875,
-0.031768798828125,
0.0313720703125,
0.0100555419921875,
0.03033447265625,
-0.00931549072265625,
0.00812530517578125,
-0.005222320556640625,
0.025848388671875,
-0.0303955078125,
-0.0288848876953125,
-0.00740814208984375,
0.01280975341796875,
-0.041473388671875,
-0.02398681640625,
0.0098724365234375,
-0.01517486572265625,
0.034759521484375,
0.01473236083984375,
-0.0038547515869140625,
-0.005580902099609375,
0.0084686279296875,
0.00424957275390625,
-0.031982421875,
-0.00980377197265625,
0.0218048095703125,
-0.05267333984375,
-0.024688720703125,
0.00298309326171875,
-0.018798828125,
0.0196075439453125,
-0.045257568359375,
-0.0472412109375,
0.008453369140625,
-0.06158447265625,
0.0029926300048828125,
-0.0355224609375,
-0.039520263671875,
0.04681396484375,
-0.022369384765625,
0.03070068359375,
-0.01519775390625,
0.0465087890625,
0.041961669921875,
-0.005016326904296875,
-0.0012054443359375,
0.0305633544921875,
-0.01174163818359375,
0.0201873779296875,
0.0025768280029296875,
-0.01021575927734375,
-0.0321044921875,
0.01143646240234375,
-0.0131988525390625,
0.0006432533264160156,
-0.005992889404296875,
-0.0106964111328125,
0.0057525634765625,
0.0226287841796875,
-0.004093170166015625,
0.048187255859375,
-0.029541015625,
0.038299560546875,
-0.00905609130859375,
0.0246734619140625,
-0.0269775390625,
0.01247406005859375,
0.0187835693359375,
-0.045501708984375,
0.0165252685546875,
-0.0196533203125,
-0.005359649658203125,
-0.0139923095703125,
0.006084442138671875,
-0.073486328125,
-0.01727294921875,
0.006031036376953125
]
|
2e17b138b2da396ca3a1a21f09e3b563fd7ed1b4 | Wordpress Stackexchange
Q: how to add prefix to post url structor only I need to add "item/" prefix to post url only
I went to Settings -> Permalinks and set this :
/item/%postname%/
and for category and tag set this:
category
tag
But other post_type and taxonomies and author has "item/" prefix
I try correct author URL with this code:
add_action('init', 'ztcom_custom_rewrite_basic');
function ztcom_custom_rewrite_basic() {
global $wp_rewrite;
$wp_rewrite->author_base = 'author';
$wp_rewrite->author_structure = '/' . $wp_rewrite->author_base . '/%author%';
add_rewrite_rule('author/([^/]+)/?$', 'index.php?author_name=$matches[1]', 'top');
}
But I don't know how to correct other post type and taxonomies
or how to change only post URL structure
A: You have to set with_front to false when you register your taxonomy or post type to not have the prefix included in the URLs.
| Q: how to add prefix to post url structor only I need to add "item/" prefix to post url only
I went to Settings -> Permalinks and set this :
/item/%postname%/
and for category and tag set this:
category
tag
But other post_type and taxonomies and author has "item/" prefix
I try correct author URL with this code:
add_action('init', 'ztcom_custom_rewrite_basic');
function ztcom_custom_rewrite_basic() {
global $wp_rewrite;
$wp_rewrite->author_base = 'author';
$wp_rewrite->author_structure = '/' . $wp_rewrite->author_base . '/%author%';
add_rewrite_rule('author/([^/]+)/?$', 'index.php?author_name=$matches[1]', 'top');
}
But I don't know how to correct other post type and taxonomies
or how to change only post URL structure
A: You have to set with_front to false when you register your taxonomy or post type to not have the prefix included in the URLs.
A: I think this is answered here: https://wordpress.stackexchange.com/a/63895/51847.
In short you just need to set permalinks to "/%category%/%postname%/" and set a category to your posts (like "item"), and they will display as /item/post/.
So you don't need to add any init action, etc.
| wordpress | {
"language": "en",
"length": 167,
"provenance": "stackexchange_00019.jsonl.gz:455688",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188746"
} | [
0.051971435546875,
-0.0111846923828125,
0.014251708984375,
-0.062408447265625,
-0.00603485107421875,
0.00019621849060058594,
-0.00836181640625,
-0.02197265625,
-0.018096923828125,
0.0211181640625,
0.03570556640625,
-0.0007534027099609375,
0.002475738525390625,
-0.05438232421875,
0.006908416748046875,
0.01097869873046875,
0.005329132080078125,
-0.01387786865234375,
0.006931304931640625,
-0.019287109375,
0.032958984375,
-0.0219879150390625,
0.0170135498046875,
-0.002552032470703125,
0.021453857421875,
-0.0037059783935546875,
0.061309814453125,
-0.051513671875,
0.0174560546875,
-0.0231475830078125,
0.0178985595703125,
-0.0072784423828125,
0.014190673828125,
0.0321044921875,
-0.0270843505859375,
0.0203399658203125,
-0.00223541259765625,
0.0146484375,
0.0151214599609375,
0.0166015625,
0.02532958984375,
-0.0247039794921875,
-0.0002467632293701172,
0.031158447265625,
-0.01029205322265625,
-0.0418701171875,
0.040008544921875,
-0.041290283203125,
0.016998291015625,
-0.0209197998046875,
-0.01416015625,
0.0292205810546875,
0.00551605224609375,
-0.01378631591796875,
-0.0163726806640625,
-0.007793426513671875,
0.0167236328125,
-0.0307159423828125,
0.01267242431640625,
-0.0195770263671875,
-0.003063201904296875,
0.0243072509765625,
0.020263671875,
0.036468505859375,
0.0299224853515625,
-0.01032257080078125,
0.06805419921875,
0.032867431640625,
-0.035125732421875,
0.01544189453125,
0.041778564453125,
-0.0274200439453125,
-0.0308074951171875,
0.0286712646484375,
-0.0521240234375,
-0.036102294921875,
0.025787353515625,
-0.048614501953125,
-0.0005078315734863281,
0.027557373046875,
0.02410888671875,
-0.02313232421875,
0.046600341796875,
-0.06732177734375,
0.054473876953125,
-0.03369140625,
0.00231170654296875,
0.00218963623046875,
-0.05029296875,
-0.0207977294921875,
-0.0300140380859375,
-0.035919189453125,
-0.03515625,
-0.0019817352294921875,
-0.00543212890625,
-0.0017681121826171875,
0.046630859375,
0.036163330078125,
0.01010894775390625,
0.03936767578125,
-0.004543304443359375,
-0.046875,
0.06683349609375,
-0.061798095703125,
0.0238800048828125,
0.07379150390625,
0.0206451416015625,
0.03729248046875,
0.063232421875,
-0.0012369155883789062,
0.02569580078125,
0.059783935546875,
-0.0222015380859375,
0.0182952880859375,
-0.056182861328125,
0.002498626708984375,
-0.055816650390625,
-0.01276397705078125,
-0.01520538330078125,
0.01503753662109375,
0.000009179115295410156,
0.0308074951171875,
-0.0009946823120117188,
0.0007967948913574219,
-0.0003676414489746094,
0.005939483642578125,
0.0016946792602539062,
-0.040740966796875,
-0.0157623291015625,
0.004688262939453125,
-0.031097412109375,
0.042633056640625,
0.07904052734375,
0.014892578125,
-0.00952911376953125,
-0.0220794677734375,
0.0084686279296875,
-0.042236328125,
-0.002532958984375,
0.0172882080078125,
-0.0309600830078125,
-0.0112457275390625,
0.042694091796875,
-0.024810791015625,
0.018524169921875,
0.048828125,
0.0014810562133789062,
-0.0036067962646484375,
0.0063018798828125,
-0.0289459228515625,
0.0009870529174804688,
-0.04559326171875,
0.044921875,
0.01271820068359375,
-0.03558349609375,
-0.00470733642578125,
0.032562255859375,
-0.0249786376953125,
-0.0404052734375,
-0.0382080078125,
0.01145172119140625,
0.004058837890625,
0.01568603515625,
-0.034820556640625,
-0.0489501953125,
-0.005390167236328125,
-0.05902099609375,
-0.00614166259765625,
0.01898193359375,
0.0185699462890625,
0.0079498291015625,
0.01568603515625,
-0.020782470703125,
0.02911376953125,
0.013763427734375,
-0.0024509429931640625,
-0.00444793701171875,
-0.00974273681640625,
0.010986328125,
0.09112548828125,
0.01806640625,
-0.01129913330078125,
0.037078857421875,
-0.0174560546875,
-0.0750732421875,
0.0322265625,
0.033416748046875,
0.09075927734375,
0.00667572021484375,
0.0189056396484375,
0.0595703125,
-0.00226593017578125,
-0.0201416015625,
-0.02667236328125,
-0.007190704345703125,
-0.0005707740783691406,
0.0242156982421875,
0.007480621337890625,
-0.00341796875,
0.007007598876953125,
-0.037109375,
0.00844573974609375,
0.008575439453125,
0.0165863037109375,
0.030426025390625,
0.005764007568359375,
0.0103912353515625,
0.0272369384765625,
-0.01331329345703125,
0.0096435546875,
0.0217742919921875,
-0.006954193115234375,
-0.02154541015625,
-0.0221405029296875,
-0.0173492431640625,
0.0287933349609375,
0.00368499755859375,
-0.00567626953125,
0.000415802001953125,
0.0021991729736328125,
-0.0036373138427734375,
-0.007556915283203125,
-0.0022029876708984375,
0.0021915435791015625,
0.047576904296875,
-0.0125274658203125,
-0.00696563720703125,
-0.0367431640625,
0.00026869773864746094,
0.0147247314453125,
-0.07110595703125,
0.04022216796875,
0.019561767578125,
-0.04443359375,
-0.064208984375,
0.00846099853515625,
-0.0025501251220703125,
-0.032501220703125,
-0.013153076171875,
0.06622314453125,
0.00749969482421875,
-0.0089111328125,
-0.021087646484375,
0.03436279296875,
0.0211029052734375,
-0.00025916099548339844,
0.005451202392578125,
0.022308349609375,
0.0185394287109375,
0.0819091796875,
-0.00601959228515625,
0.0340576171875,
0.0011653900146484375,
-0.052886962890625,
0.0266265869140625,
0.031982421875,
0.014984130859375,
-0.005985260009765625,
0.004810333251953125,
0.000056803226470947266,
0.0083770751953125,
-0.01311492919921875,
-0.045135498046875,
0.0006575584411621094,
-0.00589752197265625,
0.048492431640625,
0.036163330078125,
0.046875,
-0.0248870849609375,
0.0203399658203125,
-0.0052337646484375,
0.026336669921875,
0.004062652587890625,
0.0163726806640625,
-0.008544921875,
-0.0122222900390625,
0.006900787353515625,
0.01009368896484375,
-0.023162841796875,
-0.01369476318359375,
-0.009307861328125,
0.0098419189453125,
0.00998687744140625,
0.004741668701171875,
-0.0118865966796875,
-0.04583740234375,
0.02880859375,
0.0147705078125,
-0.0114288330078125,
-0.039306640625,
0.0179443359375,
-0.0248565673828125,
-0.03546142578125,
0.005970001220703125,
0.01971435546875,
-0.057891845703125,
0.00417327880859375,
-0.0552978515625,
0.066650390625,
-0.0452880859375,
0.04400634765625,
0.07244873046875,
-0.003780364990234375,
0.004055023193359375,
0.0217742919921875,
-0.001087188720703125,
0.02142333984375,
0.018798828125,
-0.0011196136474609375,
-0.0243682861328125,
-0.04119873046875,
-0.0225067138671875,
0.0209808349609375,
0.0196380615234375,
0.0244140625,
-0.021148681640625,
0.022796630859375,
0.0281982421875,
-0.034881591796875,
-0.047149658203125,
-0.0146484375,
-0.01055908203125,
-0.040435791015625,
0.02130126953125,
-0.0159149169921875,
0.00609588623046875,
0.02374267578125,
-0.01351165771484375,
0.009521484375,
-0.0203704833984375,
-0.0916748046875,
-0.03973388671875,
-0.07867431640625,
-0.0105438232421875,
-0.0271453857421875,
-0.00815582275390625,
0.0081787109375,
0.0147705078125,
0.00722503662109375,
-0.045318603515625,
0.010223388671875,
0.0095672607421875,
-0.017364501953125,
-0.016448974609375,
0.0011501312255859375,
-0.01904296875,
0.008575439453125,
-0.00803375244140625,
0.04803466796875,
0.044647216796875,
-0.03375244140625,
0.0167388916015625,
0.01509857177734375,
0.01318359375,
0.0242919921875,
0.03302001953125,
-0.0022125244140625,
0.004154205322265625,
0.0224456787109375,
-0.047210693359375,
-0.0227813720703125,
0.015167236328125,
-0.007671356201171875,
0.0179290771484375,
-0.00882720947265625,
-0.024658203125,
-0.007354736328125,
0.0389404296875,
0.0109710693359375,
0.0237579345703125,
0.0222625732421875,
-0.00852203369140625,
0.00043082237243652344,
-0.002483367919921875,
0.003177642822265625,
-0.0167694091796875,
0.0185546875,
-0.031829833984375,
-0.0014057159423828125,
-0.006397247314453125,
-0.0306854248046875,
-0.01081085205078125,
-0.037811279296875,
-0.01160430908203125,
-0.050506591796875,
0.0235443115234375,
-0.07330322265625,
-0.029052734375,
-0.0310516357421875,
0.0111083984375,
-0.0126495361328125,
0.036651611328125,
-0.007305145263671875,
-0.0210418701171875,
-0.01654052734375,
0.02349853515625,
-0.040008544921875,
-0.0836181640625,
0.0004074573516845703,
-0.0109710693359375,
-0.0268096923828125,
0.0032176971435546875,
0.004215240478515625,
-0.0197906494140625,
-0.00608062744140625,
0.0011425018310546875,
-0.000392913818359375,
-0.01517486572265625,
0.020904541015625,
-0.02496337890625,
-0.01497650146484375,
0.01983642578125,
-0.037506103515625,
-0.00659942626953125,
-0.03253173828125,
-0.01776123046875,
-0.08612060546875,
-0.021392822265625,
0.02764892578125,
0.049835205078125,
-0.019775390625,
-0.01551055908203125,
-0.01372528076171875,
0.06640625,
0.024444580078125,
-0.026763916015625,
0.020965576171875,
-0.0104827880859375,
-0.023529052734375,
0.0169830322265625,
0.0022029876708984375,
-0.0060882568359375,
0.0187530517578125,
0.0276641845703125,
-0.07220458984375,
-0.0007805824279785156,
-0.023651123046875,
-0.00412750244140625,
0.0396728515625,
-0.0679931640625,
-0.0699462890625,
-0.04852294921875,
-0.0274505615234375,
0.0311431884765625,
-0.0206451416015625,
0.001194000244140625,
-0.06732177734375,
-0.08404541015625,
0.0287017822265625,
-0.04107666015625,
-0.0163421630859375,
-0.0016088485717773438,
0.054443359375,
0.007965087890625,
-0.0130767822265625,
0.005451202392578125,
0.03424072265625,
0.049957275390625,
-0.004871368408203125,
0.01094818115234375,
0.0206146240234375,
-0.031768798828125,
0.01343536376953125,
0.031585693359375,
-0.00540924072265625,
0.00504302978515625,
-0.0015192031860351562,
-0.00441741943359375,
-0.058074951171875,
0.0302276611328125,
-0.0182037353515625,
0.047576904296875,
0.02508544921875,
-0.0203399658203125,
0.000015735626220703125,
0.005901336669921875,
0.019805908203125,
-0.0330810546875,
0.032379150390625,
-0.00653076171875,
-0.0185699462890625,
0.015655517578125,
0.017181396484375,
0.00014972686767578125,
-0.005710601806640625,
-0.0004305839538574219,
-0.01358795166015625,
-0.0260162353515625,
-0.007015228271484375,
-0.01235198974609375,
-0.0126953125,
0.00992584228515625,
0.006683349609375,
-0.0092315673828125,
0.001529693603515625,
-0.0132293701171875,
0.0015850067138671875,
0.01378631591796875,
0.03680419921875,
0.00658416748046875,
-0.00885009765625,
-0.0016231536865234375,
0.0019140243530273438,
-0.0243988037109375,
-0.028717041015625,
0.0390625,
0.02001953125,
-0.005680084228515625,
0.018798828125,
-0.035980224609375,
-0.01238250732421875,
-0.032958984375,
0.04931640625,
-0.0072021484375,
0.0050201416015625,
-0.01311492919921875,
0.056365966796875,
0.0033817291259765625,
0.00899505615234375,
-0.0032787322998046875,
0.022308349609375,
0.01049041748046875,
0.0289459228515625,
0.00621795654296875,
-0.00901031494140625,
0.0012559890747070312,
0.008392333984375,
0.0206298828125,
-0.039154052734375,
0.03436279296875,
0.032135009765625,
0.0614013671875,
0.01528167724609375,
-0.047393798828125,
-0.0129852294921875,
-0.06634521484375,
-0.01678466796875,
0.010162353515625,
-0.0247650146484375,
-0.040802001953125,
-0.04522705078125,
-0.0197296142578125,
0.035247802734375,
-0.0168609619140625,
-0.0285491943359375,
0.0219879150390625,
-0.0247802734375,
0.044677734375,
0.047027587890625,
-0.01043701171875,
0.0202484130859375,
0.00611114501953125,
-0.0028400421142578125,
-0.0252532958984375,
0.00922393798828125,
-0.004894256591796875,
0.017364501953125,
-0.037628173828125,
-0.021484375,
0.052459716796875,
-0.01332855224609375,
0.004985809326171875,
0.002391815185546875,
-0.0150299072265625,
0.0657958984375,
0.005828857421875,
0.05352783203125,
-0.00024890899658203125,
-0.038848876953125,
0.00177001953125,
-0.01288604736328125,
-0.00774383544921875,
-0.0004916191101074219,
-0.01861572265625,
-0.03424072265625,
-0.00531768798828125,
0.0060882568359375,
0.00234222412109375,
-0.0086517333984375,
0.0013952255249023438,
-0.033172607421875,
0.029327392578125,
0.0203857421875,
-0.004947662353515625,
-0.01256561279296875,
0.04510498046875,
-0.017578125,
0.038787841796875,
-0.0107574462890625,
0.01354217529296875,
-0.01224517822265625,
-0.024322509765625,
-0.0052947998046875,
-0.10107421875,
-0.0433349609375,
0.012786865234375,
-0.0638427734375,
0.0767822265625,
0.037567138671875,
0.0067291259765625,
0.016143798828125,
-0.00873565673828125,
-0.003993988037109375,
-0.03424072265625,
-0.007137298583984375,
-0.023406982421875,
0.0323486328125,
-0.033782958984375,
0.04217529296875,
0.08197021484375,
-0.051361083984375,
-0.01904296875,
-0.037750244140625,
0.0048065185546875,
-0.005779266357421875,
0.0163726806640625,
-0.04986572265625,
0.0318603515625,
0.07781982421875,
0.046142578125,
0.06671142578125,
0.021087646484375,
0.044708251953125,
0.0237579345703125,
-0.01049041748046875,
-0.0390625,
0.02801513671875,
0.04766845703125,
0.01412200927734375,
-0.01271820068359375,
0.03387451171875,
-0.01303863525390625,
0.01111602783203125,
0.0443115234375,
0.0465087890625,
-0.072509765625,
-0.0014696121215820312,
0.0110321044921875,
-0.01142120361328125,
0.031646728515625,
0.02838134765625,
0.0173187255859375,
0.0255279541015625,
0.004547119140625,
-0.006038665771484375,
0.0004220008850097656,
0.0171356201171875,
0.0021533966064453125,
-0.0022735595703125,
-0.0313720703125,
0.055694580078125,
0.002349853515625,
-0.0019207000732421875,
-0.035369873046875,
0.00945281982421875,
-0.0111846923828125,
-0.0250244140625,
-0.00015091896057128906,
0.0212554931640625,
-0.00963592529296875,
-0.03582763671875,
0.046173095703125,
-0.036590576171875,
0.0212249755859375,
-0.003383636474609375,
0.003177642822265625,
0.0122833251953125,
0.01290130615234375,
-0.0086517333984375,
-0.00975799560546875,
-0.006420135498046875,
-0.021881103515625,
0.046905517578125,
-0.0229644775390625,
-0.04412841796875,
0.01068115234375,
0.0291900634765625,
-0.000023424625396728516,
0.0118255615234375,
-0.0192108154296875,
-0.0206756591796875,
-0.0142364501953125,
0.103271484375,
-0.053863525390625,
-0.01555633544921875,
0.0103607177734375,
0.004619598388671875,
-0.0014333724975585938,
0.027435302734375,
0.035675048828125,
-0.0212554931640625,
-0.0384521484375,
0.0267791748046875,
-0.05816650390625,
-0.0260467529296875,
-0.01082611083984375,
-0.051666259765625,
0.0775146484375,
-0.010650634765625,
0.034393310546875,
0.0007143020629882812,
0.034423828125,
0.00876617431640625,
0.019775390625,
-0.034637451171875,
0.0343017578125,
0.006916046142578125,
0.0269317626953125,
-0.02197265625,
0.007110595703125,
0.01337432861328125,
0.0169219970703125,
0.09576416015625,
0.02880859375,
-0.0693359375,
0.008941650390625,
0.05792236328125,
0.0283660888671875,
-0.007205963134765625,
0.068359375,
0.0029277801513671875,
-0.0002624988555908203,
0.03558349609375,
-0.0036869049072265625,
0.049102783203125,
-0.022796630859375,
-0.011932373046875,
0.01128387451171875,
0.030487060546875,
0.05059814453125,
-0.01187896728515625,
-0.018341064453125,
-0.03717041015625,
-0.0011625289916992188,
0.048675537109375,
-0.036224365234375,
-0.01398468017578125,
0.0289459228515625,
0.039398193359375,
-0.00431060791015625,
-0.0192718505859375,
-0.020477294921875,
0.0535888671875,
0.040130615234375,
0.03900146484375,
0.0302581787109375,
0.0208892822265625,
0.03717041015625,
0.0122833251953125,
0.03460693359375,
0.0265655517578125,
-0.01215362548828125,
0.036102294921875,
0.0295562744140625,
0.03326416015625,
-0.0262908935546875,
-0.0029659271240234375,
0.039031982421875,
0.045684814453125,
-0.041229248046875,
-0.0312347412109375,
0.00278472900390625,
-0.00426483154296875,
-0.005023956298828125,
0.006031036376953125,
0.016448974609375,
0.0134735107421875,
-0.004734039306640625,
-0.021209716796875,
-0.01125335693359375,
0.01387786865234375,
0.06475830078125,
-0.00423431396484375,
-0.0204010009765625,
-0.07275390625,
-0.0247344970703125,
-0.036102294921875,
-0.041107177734375,
-0.00292205810546875,
0.06964111328125,
0.06298828125,
0.01483154296875,
-0.00043201446533203125,
-0.032928466796875,
0.02294921875,
0.01410675048828125,
-0.0033855438232421875,
-0.03033447265625,
0.0036773681640625,
-0.0546875,
0.0193634033203125,
0.0165252685546875,
-0.00763702392578125,
0.045318603515625,
0.0151824951171875,
-0.0010976791381835938,
-0.00421142578125,
-0.01403045654296875,
0.019378662109375,
-0.037109375,
0.04583740234375,
-0.056427001953125,
0.043548583984375,
0.00511932373046875,
-0.004566192626953125,
-0.033477783203125,
0.0038166046142578125,
0.0308380126953125,
-0.0288848876953125,
-0.0107574462890625,
-0.003948211669921875,
-0.0538330078125,
0.071533203125,
-0.007625579833984375,
0.0772705078125,
-0.0097198486328125,
-0.02740478515625,
0.011199951171875,
-0.058349609375,
-0.100341796875,
0.04486083984375,
0.05157470703125,
-0.01375579833984375,
-0.015533447265625,
-0.01113128662109375,
0.01751708984375,
-0.006961822509765625,
-0.0196533203125,
-0.0032749176025390625,
0.038726806640625,
0.0167388916015625,
0.0187530517578125,
-0.03839111328125,
-0.0136871337890625,
-0.0093536376953125,
0.0190887451171875,
0.005718231201171875,
0.10968017578125,
-0.017852783203125,
0.005901336669921875,
-0.0236053466796875,
0.0523681640625,
-0.07379150390625,
-0.0276031494140625,
0.0362548828125,
-0.030303955078125,
-0.01153564453125,
0.01406097412109375,
-0.017242431640625,
-0.015472412109375,
0.04046630859375,
-0.061798095703125,
0.018341064453125,
-0.045135498046875,
0.007720947265625,
-0.050140380859375,
0.04913330078125,
-0.0220794677734375,
-0.0418701171875,
-0.0513916015625,
-0.025726318359375,
0.0245513916015625,
0.0287933349609375,
-0.0010042190551757812,
0.038909912109375,
0.00029587745666503906,
-0.0024738311767578125,
0.0172882080078125,
-0.0257110595703125,
0.01036834716796875,
0.031768798828125,
-0.0209808349609375,
-0.06390380859375,
0.050567626953125,
-0.0017223358154296875,
0.003612518310546875,
0.0312347412109375,
0.051605224609375,
0.0323486328125,
-0.047882080078125,
0.00728607177734375,
-0.01242828369140625,
0.03302001953125,
0.0157470703125,
0.007232666015625,
-0.033294677734375,
0.01226043701171875,
-0.01450347900390625,
0.01006317138671875,
-0.017547607421875,
-0.0201568603515625,
-0.0081787109375,
0.006072998046875,
-0.006439208984375,
-0.049774169921875,
-0.05377197265625,
0.00745391845703125,
0.0017995834350585938,
-0.0238800048828125,
-0.018768310546875,
0.022369384765625,
-0.03564453125,
0.036865234375,
-0.053375244140625,
-0.037841796875,
0.00653839111328125,
0.0237579345703125,
-0.06378173828125,
-0.01352691650390625,
-0.061065673828125,
-0.0307769775390625,
-0.06280517578125,
0.0135955810546875,
0.04803466796875,
-0.0252838134765625,
-0.038055419921875,
-0.019927978515625,
0.007396697998046875,
0.04656982421875,
-0.0213623046875,
-0.014434814453125,
-0.007778167724609375,
0.024810791015625,
-0.0340576171875,
-0.07867431640625,
0.0195465087890625,
-0.0731201171875,
-0.0023708343505859375,
0.0024852752685546875,
-0.00792694091796875,
0.00745391845703125,
-0.0243072509765625,
-0.043182373046875,
0.050750732421875,
0.001758575439453125,
-0.0197906494140625,
-0.07147216796875,
-0.032073974609375,
-0.0203857421875,
0.085693359375,
-0.01247406005859375,
-0.00858306884765625,
-0.051422119140625,
0.051025390625,
0.01190185546875,
0.03289794921875,
-0.0010547637939453125,
-0.0021209716796875,
-0.0263214111328125,
0.0160675048828125,
0.017608642578125,
0.0215606689453125,
0.017059326171875,
0.0055694580078125,
0.0292510986328125,
0.058624267578125,
-0.023773193359375,
0.05938720703125,
-0.00030040740966796875,
-0.0257110595703125,
-0.006107330322265625,
-0.050506591796875,
-0.0268096923828125,
-0.033355712890625,
0.06768798828125,
0.0012149810791015625,
0.0159912109375,
-0.01047515869140625,
-0.00951385498046875,
-0.0318603515625,
-0.036956787109375,
-0.00263214111328125,
0.0295562744140625,
-0.05926513671875,
0.00391387939453125,
0.021087646484375,
0.021575927734375,
-0.018280029296875,
-0.033355712890625,
-0.007495880126953125,
-0.034271240234375,
-0.0252838134765625,
0.0240325927734375,
-0.020843505859375,
0.0655517578125,
0.0158843994140625,
-0.03271484375,
-0.035919189453125,
-0.01049041748046875,
-0.00768280029296875,
-0.0198974609375,
-0.06915283203125,
-0.04901123046875,
0.0115509033203125,
0.01044464111328125,
0.0116424560546875,
0.005939483642578125,
0.04351806640625,
-0.007781982421875,
0.041534423828125,
-0.031829833984375,
0.0220184326171875,
0.0024776458740234375,
-0.0016651153564453125,
-0.01096343994140625,
0.042266845703125,
0.0135955810546875,
0.092529296875,
-0.010467529296875,
-0.0273895263671875,
-0.01325225830078125,
0.026275634765625,
-0.033599853515625,
0.0156097412109375,
-0.0165557861328125,
0.0159454345703125,
0.004207611083984375,
0.0022735595703125,
-0.01174163818359375,
-0.004245758056640625,
0.0078277587890625,
0.0002655982971191406,
-0.01113128662109375,
0.00616455078125
]
|
953a565e57d2bd51f518fbf289125e8e277ea6d7 | Wordpress Stackexchange
Q: Remove index.php in permalink structure on IIS server In permalinks(dashboard) section index.php added.
e.g.
Current Post Name: http://zakatchicago.com/index.php/sample-post/
Expected Post Name: http://zakatchicago.com/sample-post/
How can i remove index.php?
Note: I am using windows server
A: According to the documentation here: http://www.iis.net/learn/extensions/url-rewrite-module/enabling-pretty-permalinks-in-wordpress
I assume you have already selected Post Name in your permalink structure:
Then include this code in web.config
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
| Q: Remove index.php in permalink structure on IIS server In permalinks(dashboard) section index.php added.
e.g.
Current Post Name: http://zakatchicago.com/index.php/sample-post/
Expected Post Name: http://zakatchicago.com/sample-post/
How can i remove index.php?
Note: I am using windows server
A: According to the documentation here: http://www.iis.net/learn/extensions/url-rewrite-module/enabling-pretty-permalinks-in-wordpress
I assume you have already selected Post Name in your permalink structure:
Then include this code in web.config
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
A: As of WP 5.9 (but I am sure way back years and versions) there is no need to add web.config manually.
In case IIS rewrite module is installed (whichi is a prerequisite) when you modify Settings/Permalink, WP automatically emits web.config into the root of your site.
It even writes to the GUI a warning message, to revoke write access from web.config.
If IIS rewrite module is not installed, all of this above is not possible, neither manually, so WP will include the /index.php/ fragment in the path. If you overwrite this setting with a custom permalink setting, then the links will adopt (so will not contain the /index.php/ fragment, but because of lack of rewrite facility IIS will give 404.
| wordpress | {
"language": "en",
"length": 209,
"provenance": "stackexchange_00019.jsonl.gz:455720",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188859"
} | [
0.04107666015625,
0.00788116455078125,
-0.032257080078125,
0.01024627685546875,
0.01258087158203125,
-0.0316162109375,
0.07550048828125,
-0.034210205078125,
-0.0115509033203125,
-0.00998687744140625,
-0.009613037109375,
-0.0167083740234375,
-0.01397705078125,
-0.0537109375,
0.035736083984375,
-0.0247650146484375,
0.01087188720703125,
-0.01555633544921875,
0.027313232421875,
0.0005011558532714844,
-0.01540374755859375,
0.0119171142578125,
0.057159423828125,
-0.0222320556640625,
0.00014889240264892578,
-0.005184173583984375,
0.0655517578125,
-0.0284423828125,
-0.0031299591064453125,
-0.041107177734375,
0.001750946044921875,
0.032196044921875,
0.00662994384765625,
0.0259246826171875,
0.01004791259765625,
0.014434814453125,
-0.0015716552734375,
0.00574493408203125,
0.032196044921875,
0.01004791259765625,
0.0258636474609375,
-0.0195770263671875,
0.048828125,
-0.004619598388671875,
0.017669677734375,
-0.025360107421875,
0.03466796875,
-0.08599853515625,
0.01383209228515625,
-0.04010009765625,
0.0156402587890625,
0.07232666015625,
0.0239715576171875,
-0.028106689453125,
-0.00983428955078125,
0.0183868408203125,
-0.0198211669921875,
0.026153564453125,
0.0192718505859375,
0.0284576416015625,
0.00118255615234375,
0.01194000244140625,
-0.0069732666015625,
-0.0187530517578125,
-0.0219879150390625,
-0.0205535888671875,
-0.042694091796875,
0.0197906494140625,
-0.045562744140625,
-0.0196533203125,
0.0477294921875,
-0.0260009765625,
-0.027008056640625,
-0.01123809814453125,
-0.005161285400390625,
0.0009531974792480469,
0.01200103759765625,
-0.019287109375,
-0.0028705596923828125,
0.0307769775390625,
0.032989501953125,
-0.004947662353515625,
-0.01204681396484375,
-0.028472900390625,
0.0253448486328125,
-0.01800537109375,
0.0020427703857421875,
-0.0152740478515625,
-0.040924072265625,
-0.0262908935546875,
-0.0270538330078125,
-0.0423583984375,
-0.04351806640625,
-0.00868988037109375,
-0.0007538795471191406,
-0.0211639404296875,
0.049591064453125,
0.02581787109375,
0.01418304443359375,
-0.004058837890625,
0.04656982421875,
-0.06494140625,
0.039642333984375,
-0.02276611328125,
-0.03570556640625,
0.037567138671875,
0.0309600830078125,
0.0504150390625,
0.0216217041015625,
0.0055694580078125,
0.005611419677734375,
0.0105438232421875,
-0.01103973388671875,
0.004302978515625,
-0.06231689453125,
0.01885986328125,
-0.03436279296875,
-0.029693603515625,
-0.00882720947265625,
0.0163421630859375,
-0.010833740234375,
0.01739501953125,
-0.038330078125,
-0.0092010498046875,
0.03582763671875,
0.011444091796875,
-0.0019016265869140625,
0.01006317138671875,
0.01158905029296875,
0.0220794677734375,
-0.04632568359375,
0.0026531219482421875,
0.04632568359375,
0.0516357421875,
0.03131103515625,
-0.0286407470703125,
0.0263671875,
-0.0104217529296875,
0.0029354095458984375,
0.01061248779296875,
-0.0031909942626953125,
-0.0467529296875,
-0.00893402099609375,
0.00482940673828125,
-0.006633758544921875,
0.0185089111328125,
0.0168609619140625,
0.0213623046875,
-0.0172576904296875,
-0.01221466064453125,
-0.028594970703125,
-0.0205841064453125,
0.059051513671875,
0.017425537109375,
-0.02374267578125,
-0.0125579833984375,
0.03741455078125,
-0.040985107421875,
-0.032989501953125,
-0.06170654296875,
0.03271484375,
-0.0014390945434570312,
0.00661468505859375,
-0.0191802978515625,
-0.04949951171875,
-0.01560211181640625,
-0.05938720703125,
-0.01556396484375,
0.0198974609375,
0.00615692138671875,
-0.00811004638671875,
-0.031097412109375,
0.00151824951171875,
-0.0008273124694824219,
0.00400543212890625,
0.0218658447265625,
0.0181732177734375,
-0.0113067626953125,
-0.00789642333984375,
0.08746337890625,
0.033203125,
-0.016754150390625,
-0.020965576171875,
0.0196380615234375,
-0.0782470703125,
0.062164306640625,
0.0226593017578125,
0.08892822265625,
-0.030914306640625,
0.01617431640625,
0.08782958984375,
0.0355224609375,
-0.00034737586975097656,
0.0210723876953125,
-0.0026454925537109375,
-0.0129241943359375,
-0.02447509765625,
0.00899505615234375,
-0.0362548828125,
-0.02386474609375,
-0.0130767822265625,
0.01300048828125,
0.007595062255859375,
0.028778076171875,
-0.00782012939453125,
0.019012451171875,
-0.005947113037109375,
0.0262451171875,
-0.00534820556640625,
0.004878997802734375,
0.03924560546875,
0.01364898681640625,
-0.049835205078125,
-0.0143280029296875,
-0.0220184326171875,
0.029632568359375,
0.0097503662109375,
-0.000007092952728271484,
0.0165252685546875,
0.0198211669921875,
0.04193115234375,
-0.006984710693359375,
0.0167236328125,
0.02392578125,
0.0526123046875,
-0.0031280517578125,
-0.042022705078125,
-0.0333251953125,
0.006610870361328125,
-0.006885528564453125,
-0.07586669921875,
0.0682373046875,
0.0129547119140625,
0.01103973388671875,
-0.039581298828125,
0.00417327880859375,
-0.013336181640625,
-0.034149169921875,
-0.01004791259765625,
0.04833984375,
0.021759033203125,
0.0277252197265625,
0.0005955696105957031,
0.0296173095703125,
-0.01018524169921875,
-0.04913330078125,
0.00740814208984375,
0.0078125,
-0.0120086669921875,
0.01277923583984375,
0.0082550048828125,
0.0160064697265625,
0.0152740478515625,
-0.00717926025390625,
0.01263427734375,
0.0240631103515625,
-0.021209716796875,
-0.006839752197265625,
-0.03497314453125,
0.0124664306640625,
0.0183563232421875,
0.0038394927978515625,
-0.01995849609375,
0.0016193389892578125,
0.0391845703125,
0.00472259521484375,
0.031829833984375,
0.040679931640625,
-0.01262664794921875,
-0.0075225830078125,
0.01166534423828125,
-0.004436492919921875,
-0.004367828369140625,
0.04217529296875,
0.040252685546875,
-0.00439453125,
-0.028594970703125,
-0.00862884521484375,
0.026580810546875,
0.0139007568359375,
-0.0145416259765625,
0.0124359130859375,
0.0203857421875,
-0.0081329345703125,
-0.017059326171875,
-0.0537109375,
0.016571044921875,
-0.01050567626953125,
0.0128173828125,
0.0011072158813476562,
0.0276031494140625,
-0.00899505615234375,
-0.036712646484375,
0.0149078369140625,
0.04522705078125,
-0.036285400390625,
0.0184478759765625,
-0.03857421875,
0.043548583984375,
-0.022430419921875,
-0.00238800048828125,
0.05712890625,
0.01506805419921875,
-0.01611328125,
0.0078887939453125,
-0.0265350341796875,
0.018707275390625,
-0.018646240234375,
-0.0225982666015625,
0.01500701904296875,
-0.0789794921875,
0.0169219970703125,
0.019378662109375,
-0.015716552734375,
0.0176239013671875,
-0.01255035400390625,
0.0087127685546875,
0.019989013671875,
-0.046112060546875,
-0.08258056640625,
-0.0236358642578125,
-0.0193939208984375,
-0.0182647705078125,
0.0209503173828125,
-0.00627899169921875,
-0.0020999908447265625,
0.022308349609375,
-0.0010709762573242188,
-0.0030078887939453125,
-0.018646240234375,
-0.07733154296875,
-0.0694580078125,
-0.097412109375,
-0.03790283203125,
-0.0119171142578125,
0.0276031494140625,
0.013153076171875,
0.007686614990234375,
0.0068206787109375,
-0.00994110107421875,
0.03717041015625,
-0.034088134765625,
-0.0277557373046875,
-0.0232086181640625,
0.004444122314453125,
-0.041290283203125,
-0.004192352294921875,
-0.01178741455078125,
0.048980712890625,
0.0148162841796875,
-0.0161895751953125,
0.018402099609375,
-0.0211639404296875,
-0.02801513671875,
-0.0208587646484375,
0.00044274330139160156,
0.025787353515625,
-0.07427978515625,
-0.0302734375,
-0.096435546875,
-0.058319091796875,
0.01763916015625,
-0.056854248046875,
-0.01033782958984375,
0.033355712890625,
-0.01409912109375,
-0.0079193115234375,
-0.005702972412109375,
0.0124053955078125,
0.0018110275268554688,
0.0113983154296875,
-0.0345458984375,
0.0654296875,
0.01332855224609375,
0.0205230712890625,
-0.050628662109375,
0.0748291015625,
-0.0217437744140625,
-0.00490570068359375,
0.024200439453125,
-0.029998779296875,
-0.01203155517578125,
-0.04876708984375,
-0.043853759765625,
-0.025634765625,
0.035186767578125,
-0.0496826171875,
-0.0245361328125,
-0.029449462890625,
-0.005474090576171875,
-0.0184326171875,
0.034576416015625,
-0.0269012451171875,
-0.036102294921875,
-0.02777099609375,
0.01181793212890625,
0.0098419189453125,
-0.047943115234375,
0.0083160400390625,
-0.040252685546875,
-0.09417724609375,
-0.0090789794921875,
-0.01593017578125,
-0.043548583984375,
0.011871337890625,
-0.053436279296875,
-0.032196044921875,
-0.041046142578125,
0.03680419921875,
-0.0244293212890625,
-0.00202178955078125,
0.00786590576171875,
-0.01204681396484375,
-0.03790283203125,
-0.02447509765625,
-0.0163421630859375,
-0.057525634765625,
-0.024200439453125,
-0.028656005859375,
0.0673828125,
0.016387939453125,
-0.0211029052734375,
-0.0321044921875,
0.04541015625,
-0.011749267578125,
-0.020233154296875,
0.01380157470703125,
-0.00431060791015625,
0.008087158203125,
0.0267181396484375,
-0.003559112548828125,
-0.00726318359375,
0.016357421875,
0.0074310302734375,
-0.0176544189453125,
0.01509857177734375,
-0.021759033203125,
0.0023136138916015625,
0.0108489990234375,
-0.037139892578125,
-0.0821533203125,
-0.0277252197265625,
-0.035614013671875,
0.006824493408203125,
-0.01519012451171875,
-0.0245513916015625,
-0.024566650390625,
-0.0797119140625,
0.05291748046875,
-0.005260467529296875,
-0.00695037841796875,
0.0010318756103515625,
0.07037353515625,
0.0097198486328125,
-0.0218505859375,
-0.01556396484375,
0.0132598876953125,
0.0439453125,
0.0206451416015625,
0.0269927978515625,
-0.00823211669921875,
-0.0228729248046875,
0.052703857421875,
-0.002368927001953125,
-0.0132904052734375,
-0.00803375244140625,
0.02227783203125,
-0.0003414154052734375,
-0.0311126708984375,
0.01218414306640625,
-0.01187896728515625,
0.032623291015625,
0.0030002593994140625,
-0.01511383056640625,
0.0013303756713867188,
0.004589080810546875,
0.015899658203125,
-0.01555633544921875,
0.02392578125,
-0.00958251953125,
-0.0550537109375,
0.0289154052734375,
0.021087646484375,
0.0163116455078125,
-0.01190185546875,
0.00853729248046875,
0.03863525390625,
0.00801849365234375,
-0.01261138916015625,
0.004642486572265625,
0.015838623046875,
-0.0048675537109375,
0.00806427001953125,
0.0037250518798828125,
-0.0113372802734375,
-0.0012540817260742188,
-0.00756072998046875,
0.025848388671875,
0.0201263427734375,
-0.0419921875,
0.0188446044921875,
-0.022491455078125,
-0.00690460205078125,
0.007083892822265625,
-0.006183624267578125,
0.01035308837890625,
0.02105712890625,
0.01580810546875,
0.0274810791015625,
0.002655029296875,
-0.01035308837890625,
-0.0083465576171875,
-0.0163116455078125,
0.0008387565612792969,
-0.006011962890625,
0.020599365234375,
0.039215087890625,
-0.01036834716796875,
0.038726806640625,
0.0024089813232421875,
0.0007076263427734375,
0.006893157958984375,
0.05096435546875,
-0.0009531974792480469,
-0.007701873779296875,
0.0147552490234375,
0.026947021484375,
0.034912109375,
-0.051910400390625,
-0.0287933349609375,
0.035400390625,
0.0655517578125,
-0.01157379150390625,
-0.0222625732421875,
-0.00048732757568359375,
-0.0090789794921875,
-0.0293426513671875,
0.0164642333984375,
-0.0033931732177734375,
-0.0195159912109375,
-0.0380859375,
-0.0205230712890625,
0.01873779296875,
0.002643585205078125,
-0.01320648193359375,
-0.02410888671875,
-0.043975830078125,
-0.021575927734375,
0.056365966796875,
-0.029632568359375,
-0.0115966796875,
-0.0171051025390625,
0.05596923828125,
-0.002315521240234375,
0.012420654296875,
-0.07928466796875,
-0.007801055908203125,
-0.035858154296875,
-0.0015153884887695312,
0.07366943359375,
0.028350830078125,
0.02679443359375,
-0.0237579345703125,
-0.0259552001953125,
0.01340484619140625,
-0.00569915771484375,
0.021697998046875,
-0.0233917236328125,
-0.0592041015625,
-0.0098419189453125,
-0.039337158203125,
0.00949859619140625,
0.011322021484375,
-0.005767822265625,
-0.0135040283203125,
-0.007617950439453125,
-0.0118255615234375,
-0.00469970703125,
-0.006206512451171875,
0.0299530029296875,
-0.023406982421875,
0.045135498046875,
-0.011962890625,
-0.000018477439880371094,
-0.046051025390625,
0.0748291015625,
-0.01232147216796875,
0.036224365234375,
-0.017730712890625,
0.047607421875,
0.039154052734375,
-0.0222930908203125,
0.02691650390625,
-0.0555419921875,
-0.056182861328125,
-0.0114288330078125,
-0.060211181640625,
0.030548095703125,
0.05419921875,
-0.01580810546875,
-0.035064697265625,
0.0036144256591796875,
0.021148681640625,
-0.04296875,
0.0391845703125,
-0.038787841796875,
-0.0204315185546875,
-0.074951171875,
0.029083251953125,
0.0758056640625,
-0.01523590087890625,
0.008514404296875,
-0.04937744140625,
0.0002052783966064453,
-0.02276611328125,
0.00727081298828125,
-0.01062774658203125,
0.034088134765625,
0.07696533203125,
0.0300750732421875,
0.08746337890625,
0.0277862548828125,
0.031707763671875,
0.064208984375,
-0.0022754669189453125,
0.0027904510498046875,
-0.0003075599670410156,
0.037628173828125,
0.005870819091796875,
-0.0013332366943359375,
0.0286712646484375,
-0.02117919921875,
0.0016956329345703125,
0.06365966796875,
0.044403076171875,
-0.1119384765625,
0.007274627685546875,
-0.01580810546875,
0.00763702392578125,
0.012481689453125,
0.00473785400390625,
-0.0122833251953125,
-0.0008945465087890625,
0.01255035400390625,
0.022918701171875,
-0.0221405029296875,
-0.00244140625,
0.035980224609375,
-0.01039886474609375,
0.00513458251953125,
0.0172119140625,
0.0013294219970703125,
-0.01593017578125,
-0.041351318359375,
0.0251312255859375,
-0.0230255126953125,
0.00701904296875,
0.011627197265625,
0.00493621826171875,
-0.0292510986328125,
-0.02130126953125,
0.02081298828125,
-0.018463134765625,
-0.02545166015625,
0.021697998046875,
-0.0322265625,
-0.01004791259765625,
0.0277862548828125,
-0.0372314453125,
0.0045013427734375,
-0.0011463165283203125,
-0.051544189453125,
-0.0048828125,
-0.014923095703125,
0.006927490234375,
-0.021026611328125,
-0.00859832763671875,
0.0025997161865234375,
-0.037078857421875,
-0.01227569580078125,
-0.0039520263671875,
-0.0158843994140625,
0.08587646484375,
-0.06939697265625,
-0.0017976760864257812,
0.0025081634521484375,
0.003055572509765625,
0.0164794921875,
0.008575439453125,
-0.0007729530334472656,
-0.0300140380859375,
-0.0273590087890625,
-0.0088653564453125,
-0.03582763671875,
0.0176849365234375,
-0.028350830078125,
-0.0787353515625,
0.09393310546875,
-0.00771331787109375,
0.05743408203125,
0.0259246826171875,
0.03802490234375,
-0.041748046875,
-0.00690460205078125,
-0.00850677490234375,
0.03912353515625,
-0.0264892578125,
0.038909912109375,
-0.023834228515625,
0.0019683837890625,
0.019073486328125,
0.03118896484375,
0.08062744140625,
0.01509857177734375,
-0.022705078125,
-0.036895751953125,
0.040435791015625,
0.05548095703125,
0.00012564659118652344,
0.01263427734375,
-0.0179901123046875,
0.0288848876953125,
0.0146636962890625,
-0.049560546875,
0.005710601806640625,
0.003993988037109375,
-0.042755126953125,
0.01904296875,
0.025146484375,
0.030303955078125,
0.0236968994140625,
0.005191802978515625,
0.00528717041015625,
0.0022449493408203125,
0.0250701904296875,
-0.005207061767578125,
0.0128173828125,
0.0111846923828125,
0.0330810546875,
-0.04302978515625,
-0.0185089111328125,
-0.021148681640625,
0.052276611328125,
0.032318115234375,
0.01186370849609375,
0.052520751953125,
0.0265350341796875,
0.000698089599609375,
0.0244293212890625,
0.02850341796875,
0.039703369140625,
-0.02880859375,
0.0308380126953125,
0.054290771484375,
0.0226287841796875,
0.0270538330078125,
-0.0023059844970703125,
0.034454345703125,
0.042510986328125,
-0.03448486328125,
-0.05523681640625,
0.004192352294921875,
-0.007701873779296875,
0.006977081298828125,
0.0023021697998046875,
0.01032257080078125,
-0.0301361083984375,
-0.002094268798828125,
0.025360107421875,
0.01055145263671875,
0.0161895751953125,
0.002727508544921875,
0.0124359130859375,
0.02734375,
-0.04449462890625,
0.033721923828125,
-0.0172271728515625,
0.0077667236328125,
0.00531768798828125,
0.02679443359375,
0.01177978515625,
0.027740478515625,
-0.0169219970703125,
-0.015777587890625,
0.021453857421875,
0.0175018310546875,
-0.06988525390625,
-0.007648468017578125,
-0.059478759765625,
-0.09857177734375,
-0.0011358261108398438,
0.0628662109375,
0.0535888671875,
0.0294647216796875,
0.0213623046875,
-0.0175323486328125,
0.0206756591796875,
0.0153350830078125,
-0.00850677490234375,
-0.021575927734375,
0.038238525390625,
-0.018341064453125,
0.017913818359375,
-0.0091552734375,
-0.01507568359375,
-0.056610107421875,
0.03826904296875,
0.004405975341796875,
-0.011016845703125,
-0.0014905929565429688,
-0.0007386207580566406,
-0.022247314453125,
0.03643798828125,
0.0044708251953125,
0.0013933181762695312,
0.0153045654296875,
0.01800537109375,
0.0011587142944335938,
0.0102386474609375,
-0.01526641845703125,
-0.00679779052734375,
0.0297393798828125,
0.012115478515625,
0.0206756591796875,
0.05657958984375,
-0.0030879974365234375,
-0.0268402099609375,
-0.016693115234375,
0.03863525390625,
-0.02484130859375,
0.00411224365234375,
0.035064697265625,
-0.037841796875,
-0.02197265625,
-0.0084991455078125,
0.045074462890625,
-0.00371551513671875,
0.143798828125,
-0.074462890625,
-0.0014057159423828125,
-0.04034423828125,
0.01328277587890625,
-0.030364990234375,
-0.007045745849609375,
0.02154541015625,
0.016326904296875,
-0.0240325927734375,
-0.01001739501953125,
-0.0670166015625,
0.033599853515625,
0.01922607421875,
-0.020294189453125,
0.0347900390625,
-0.025543212890625,
0.005352020263671875,
-0.017120361328125,
0.00350189208984375,
-0.0321044921875,
-0.04296875,
-0.023040771484375,
0.007625579833984375,
-0.0022144317626953125,
0.006473541259765625,
-0.0175323486328125,
0.016265869140625,
0.034027099609375,
-0.004665374755859375,
0.0103607177734375,
-0.0103607177734375,
0.046966552734375,
0.041961669921875,
0.0001436471939086914,
-0.042236328125,
0.01361846923828125,
-0.0139312744140625,
-0.005924224853515625,
0.01187896728515625,
0.034210205078125,
0.021087646484375,
-0.0299072265625,
-0.01678466796875,
-0.005229949951171875,
0.0224761962890625,
0.0171356201171875,
0.01055145263671875,
-0.027862548828125,
-0.0172271728515625,
-0.00957489013671875,
-0.01739501953125,
-0.0207061767578125,
-0.0018787384033203125,
-0.0020198822021484375,
0.03192138671875,
-0.0088958740234375,
-0.0232391357421875,
-0.05419921875,
0.0147247314453125,
0.0009350776672363281,
0.0013074874877929688,
-0.059967041015625,
0.037445068359375,
-0.0091552734375,
0.041656494140625,
-0.03741455078125,
0.00742340087890625,
-0.0297088623046875,
-0.004001617431640625,
-0.0428466796875,
-0.036956787109375,
-0.06268310546875,
0.0147857666015625,
-0.05987548828125,
-0.00036716461181640625,
0.023468017578125,
-0.0016126632690429688,
0.005126953125,
-0.050994873046875,
-0.0257110595703125,
0.01739501953125,
-0.016204833984375,
-0.0199432373046875,
0.0227508544921875,
0.0343017578125,
-0.01200103759765625,
-0.0867919921875,
-0.0213623046875,
-0.036346435546875,
0.04718017578125,
-0.0010824203491210938,
-0.0160369873046875,
0.004116058349609375,
-0.0318603515625,
-0.04498291015625,
0.02813720703125,
0.00994110107421875,
-0.031005859375,
-0.02886962890625,
-0.006191253662109375,
-0.00267791748046875,
-0.004207611083984375,
-0.005176544189453125,
-0.027862548828125,
-0.0312042236328125,
0.027435302734375,
0.01021575927734375,
0.059783935546875,
-0.029693603515625,
0.02166748046875,
0.008026123046875,
0.051910400390625,
0.04150390625,
0.015380859375,
0.0014448165893554688,
0.00005263090133666992,
0.07098388671875,
0.0726318359375,
0.006839752197265625,
0.10699462890625,
0.01678466796875,
-0.046234130859375,
0.002841949462890625,
-0.07427978515625,
-0.041412353515625,
-0.03765869140625,
0.07568359375,
0.0236358642578125,
0.029541015625,
-0.032867431640625,
-0.0285797119140625,
-0.053436279296875,
-0.022705078125,
-0.043487548828125,
0.03326416015625,
-0.07257080078125,
-0.007568359375,
0.0178680419921875,
-0.00640106201171875,
0.006679534912109375,
-0.0307159423828125,
-0.0482177734375,
-0.0007920265197753906,
-0.022979736328125,
0.001529693603515625,
-0.0251617431640625,
0.029541015625,
0.0609130859375,
-0.057281494140625,
-0.00691986083984375,
-0.028350830078125,
0.020721435546875,
0.003307342529296875,
-0.0899658203125,
-0.0110321044921875,
0.006443023681640625,
-0.001873016357421875,
0.002643585205078125,
0.01267242431640625,
-0.001766204833984375,
0.01398468017578125,
0.01070404052734375,
-0.0098724365234375,
0.00591278076171875,
0.009063720703125,
0.005523681640625,
-0.042999267578125,
0.05633544921875,
0.0005488395690917969,
0.0726318359375,
-0.0028896331787109375,
0.01551055908203125,
-0.0137176513671875,
0.03814697265625,
-0.02923583984375,
0.003330230712890625,
0.01233673095703125,
-0.03668212890625,
0.007221221923828125,
0.0026187896728515625,
0.0250244140625,
-0.0211181640625,
0.021514892578125,
-0.01108551025390625,
0.0086212158203125,
0.01715087890625
]
|
afe13c8ce730aa92235fd29c99e2da94e89c8afd | Wordpress Stackexchange
Q: Insert DIV container below 1st search result How can I insert a DIV just below the first search result (between result #1 and #2)?
A: You should be able to do that with:
/**
* Setup a custom hook before the second post on the search page
*/
add_action( 'the_post', function( $post, \WP_Query $q )
{
if( $q->is_search() && $q->is_main_query() && 2 === $q->current_post )
{
do_action( 'wpse_before_second_post_in_search' );
}
}, 10, 2 );
/**
* Inject a Div after the first post on the search page
*/
add_action( 'wpse_before_second_post_in_search', function()
{
echo '<div>My Injected Div</div>';
} );
where we've introduced the custom wpse_before_second_post_in_search hook, that you can now play with as you need.
| Q: Insert DIV container below 1st search result How can I insert a DIV just below the first search result (between result #1 and #2)?
A: You should be able to do that with:
/**
* Setup a custom hook before the second post on the search page
*/
add_action( 'the_post', function( $post, \WP_Query $q )
{
if( $q->is_search() && $q->is_main_query() && 2 === $q->current_post )
{
do_action( 'wpse_before_second_post_in_search' );
}
}, 10, 2 );
/**
* Inject a Div after the first post on the search page
*/
add_action( 'wpse_before_second_post_in_search', function()
{
echo '<div>My Injected Div</div>';
} );
where we've introduced the custom wpse_before_second_post_in_search hook, that you can now play with as you need.
| wordpress | {
"language": "en",
"length": 115,
"provenance": "stackexchange_00019.jsonl.gz:455721",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188861"
} | [
0.051422119140625,
-0.015899658203125,
0.00763702392578125,
-0.006702423095703125,
-0.00412750244140625,
-0.03424072265625,
0.04974365234375,
-0.0201568603515625,
0.04449462890625,
0.016815185546875,
-0.08721923828125,
0.01507568359375,
-0.019805908203125,
0.006114959716796875,
-0.027252197265625,
-0.052642822265625,
0.025299072265625,
-0.032806396484375,
-0.007080078125,
-0.0171661376953125,
0.00865936279296875,
-0.017425537109375,
0.024444580078125,
0.046661376953125,
0.0016937255859375,
-0.041778564453125,
0.0919189453125,
-0.01513671875,
0.0086822509765625,
-0.0174102783203125,
0.0101318359375,
-0.0130767822265625,
0.042999267578125,
-0.01690673828125,
0.0058135986328125,
0.034393310546875,
0.014129638671875,
-0.0205078125,
0.017120361328125,
-0.01117706298828125,
0.03369140625,
-0.0242767333984375,
-0.003795623779296875,
0.0140228271484375,
-0.002971649169921875,
-0.0262908935546875,
0.0513916015625,
-0.04425048828125,
0.008697509765625,
-0.036712646484375,
0.0032978057861328125,
0.00514984130859375,
0.0175323486328125,
-0.052215576171875,
-0.0209197998046875,
0.01088714599609375,
-0.005664825439453125,
-0.043243408203125,
-0.00612640380859375,
0.004047393798828125,
0.0230865478515625,
0.007904052734375,
0.01934814453125,
0.027587890625,
-0.00028228759765625,
0.0085296630859375,
0.006130218505859375,
0.0031871795654296875,
-0.04754638671875,
-0.0249176025390625,
0.0310211181640625,
-0.0360107421875,
-0.03662109375,
-0.01219940185546875,
-0.039337158203125,
-0.0025081634521484375,
0.05633544921875,
-0.0215301513671875,
-0.035858154296875,
0.0303192138671875,
-0.0079803466796875,
0.0323486328125,
-0.0303802490234375,
-0.0604248046875,
0.0014848709106445312,
-0.078125,
-0.015228271484375,
0.0189208984375,
-0.01226043701171875,
-0.01485443115234375,
-0.0213775634765625,
0.002017974853515625,
-0.01580810546875,
-0.007778167724609375,
-0.0244598388671875,
-0.0161590576171875,
0.015899658203125,
0.0654296875,
-0.032745361328125,
0.030029296875,
-0.0355224609375,
-0.014312744140625,
0.0091552734375,
-0.048431396484375,
0.03485107421875,
0.00836181640625,
-0.02362060546875,
-0.06964111328125,
0.04949951171875,
0.0209197998046875,
-0.02239990234375,
0.06573486328125,
0.012939453125,
-0.049713134765625,
-0.003017425537109375,
0.0300445556640625,
0.01338958740234375,
0.0077362060546875,
0.0299072265625,
-0.0241546630859375,
-0.003879547119140625,
-0.009979248046875,
0.05902099609375,
-0.024017333984375,
-0.0016937255859375,
-0.0186309814453125,
-0.037994384765625,
-0.017181396484375,
-0.0085296630859375,
-0.028533935546875,
-0.01221466064453125,
0.0204620361328125,
0.044708251953125,
0.06689453125,
0.0215301513671875,
0.01221466064453125,
0.031280517578125,
0.01715087890625,
-0.0014524459838867188,
-0.0179901123046875,
0.019866943359375,
0.005859375,
-0.005950927734375,
-0.004413604736328125,
-0.01332855224609375,
0.00385284423828125,
0.026947021484375,
0.031280517578125,
-0.005146026611328125,
-0.076171875,
0.04693603515625,
0.006298065185546875,
0.04168701171875,
-0.007343292236328125,
-0.06304931640625,
0.01025390625,
-0.00788116455078125,
0.007843017578125,
-0.061004638671875,
-0.0219573974609375,
-0.01788330078125,
0.01364898681640625,
0.05810546875,
0.0019550323486328125,
0.022064208984375,
-0.0330810546875,
-0.044189453125,
0.00507354736328125,
0.01360321044921875,
0.07275390625,
-0.017333984375,
0.010955810546875,
-0.0003848075866699219,
-0.0091400146484375,
-0.034912109375,
-0.0232391357421875,
0.06036376953125,
-0.0053558349609375,
0.003604888916015625,
0.01380157470703125,
-0.03607177734375,
-0.026885986328125,
0.0850830078125,
-0.06829833984375,
-0.01611328125,
0.0672607421875,
0.0015239715576171875,
0.040130615234375,
-0.0265960693359375,
0.01483917236328125,
-0.0227508544921875,
0.062408447265625,
-0.04437255859375,
-0.006256103515625,
0.01210784912109375,
-0.0112457275390625,
0.003021240234375,
-0.011199951171875,
0.005939483642578125,
0.00848388671875,
-0.0155792236328125,
0.0572509765625,
-0.01593017578125,
0.0341796875,
0.0162353515625,
0.033935546875,
0.0003414154052734375,
0.03302001953125,
-0.006183624267578125,
-0.00478363037109375,
0.00726318359375,
-0.00379180908203125,
0.031494140625,
-0.11083984375,
-0.05316162109375,
-0.01143646240234375,
0.01010894775390625,
0.0496826171875,
0.029449462890625,
0.041107177734375,
0.042205810546875,
-0.03155517578125,
0.024017333984375,
-0.00981903076171875,
0.0673828125,
-0.02105712890625,
-0.0012292861938476562,
-0.03521728515625,
0.064453125,
-0.007328033447265625,
-0.02362060546875,
0.0305023193359375,
0.057891845703125,
0.05145263671875,
-0.022186279296875,
0.0159912109375,
0.00962066650390625,
-0.0232391357421875,
-0.0223388671875,
0.0285186767578125,
0.005168914794921875,
0.054046630859375,
-0.0206146240234375,
0.0310211181640625,
0.08673095703125,
-0.0250244140625,
-0.0154876708984375,
0.0367431640625,
0.0202178955078125,
0.06890869140625,
-0.0101318359375,
-0.004428863525390625,
-0.0026493072509765625,
-0.06658935546875,
0.0176849365234375,
0.017669677734375,
0.0102996826171875,
0.049713134765625,
-0.0230255126953125,
-0.002819061279296875,
-0.01434326171875,
-0.02734375,
-0.0070648193359375,
-0.0232086181640625,
0.045074462890625,
-0.0257720947265625,
0.035491943359375,
0.011505126953125,
-0.00933837890625,
-0.01103973388671875,
0.01145172119140625,
-0.014190673828125,
-0.0058441162109375,
-0.009185791015625,
-0.01285552978515625,
-0.01273345947265625,
-0.0350341796875,
0.0291595458984375,
-0.0245513916015625,
-0.032470703125,
-0.001941680908203125,
0.051727294921875,
-0.0071563720703125,
-0.01482391357421875,
-0.0168914794921875,
-0.0435791015625,
0.009368896484375,
0.0145263671875,
-0.01221466064453125,
-0.0003228187561035156,
0.03240966796875,
0.01190948486328125,
-0.0205230712890625,
0.0160675048828125,
-0.00551605224609375,
-0.021759033203125,
-0.03155517578125,
-0.006267547607421875,
0.034637451171875,
-0.032135009765625,
0.01232147216796875,
0.054351806640625,
-0.0290069580078125,
0.03369140625,
-0.016387939453125,
0.019683837890625,
-0.004241943359375,
-0.0181121826171875,
-0.0189666748046875,
-0.0169525146484375,
-0.0252685546875,
0.022064208984375,
0.0306396484375,
0.050079345703125,
0.01468658447265625,
-0.0206756591796875,
0.0299072265625,
0.034698486328125,
-0.0472412109375,
-0.08880615234375,
-0.00850677490234375,
-0.061065673828125,
0.0002123117446899414,
0.036163330078125,
-0.024444580078125,
-0.0044708251953125,
0.06890869140625,
-0.00966644287109375,
-0.029571533203125,
-0.035125732421875,
-0.036102294921875,
-0.061248779296875,
-0.042633056640625,
0.05010986328125,
0.0036983489990234375,
0.02081298828125,
0.017486572265625,
0.052947998046875,
0.0411376953125,
0.015869140625,
0.05865478515625,
0.044281005859375,
-0.0286865234375,
-0.0214080810546875,
-0.02197265625,
-0.017974853515625,
0.005588531494140625,
-0.00565338134765625,
-0.01245880126953125,
-0.0080413818359375,
0.0237274169921875,
0.02020263671875,
-0.02410888671875,
0.0035610198974609375,
-0.00820159912109375,
0.04730224609375,
0.01245880126953125,
-0.01244354248046875,
0.00519561767578125,
-0.059906005859375,
0.0233001708984375,
-0.0011081695556640625,
-0.0258026123046875,
-0.07513427734375,
0.006130218505859375,
-0.0086212158203125,
-0.032379150390625,
-0.04083251953125,
0.016876220703125,
0.0118408203125,
0.01678466796875,
-0.0179595947265625,
0.00994873046875,
0.0064239501953125,
0.00797271728515625,
-0.018829345703125,
0.0041351318359375,
-0.030670166015625,
0.036163330078125,
0.01439666748046875,
0.0093994140625,
0.003299713134765625,
-0.00119781494140625,
-0.0287322998046875,
-0.004566192626953125,
0.042999267578125,
0.027008056640625,
0.009033203125,
0.0025348663330078125,
-0.028045654296875,
0.02099609375,
0.0638427734375,
-0.10736083984375,
-0.0152740478515625,
0.01381683349609375,
0.0235595703125,
-0.00324249267578125,
-0.084228515625,
-0.04376220703125,
-0.0439453125,
-0.0733642578125,
0.00907135009765625,
-0.0204620361328125,
-0.003002166748046875,
-0.0169830322265625,
0.01055145263671875,
-0.0300445556640625,
-0.048431396484375,
0.0127716064453125,
-0.04254150390625,
-0.0206146240234375,
0.057830810546875,
-0.058319091796875,
0.040496826171875,
-0.0202484130859375,
-0.04290771484375,
-0.0721435546875,
-0.00988006591796875,
-0.006145477294921875,
0.05157470703125,
0.012542724609375,
-0.0276336669921875,
-0.03729248046875,
0.032562255859375,
0.0156707763671875,
0.032440185546875,
0.028045654296875,
0.01213836669921875,
0.0175933837890625,
-0.022857666015625,
0.00458526611328125,
-0.04388427734375,
-0.007720947265625,
-0.0217132568359375,
-0.0031604766845703125,
0.038482666015625,
-0.0269775390625,
0.046844482421875,
-0.028106689453125,
-0.00812530517578125,
-0.0140533447265625,
-0.029541015625,
0.0220794677734375,
0.044525146484375,
-0.032989501953125,
0.03948974609375,
-0.044586181640625,
-0.0109100341796875,
0.033660888671875,
0.03369140625,
-0.02471923828125,
-0.0014104843139648438,
0.0243072509765625,
0.024658203125,
-0.040252685546875,
-0.0163421630859375,
0.004573822021484375,
0.0263824462890625,
0.036834716796875,
-0.0222625732421875,
-0.0185394287109375,
-0.036773681640625,
0.01488494873046875,
0.0177001953125,
-0.0204315185546875,
0.01151275634765625,
0.0204620361328125,
0.0295562744140625,
-0.042144775390625,
0.01849365234375,
0.01529693603515625,
-0.017730712890625,
-0.0188140869140625,
-0.03704833984375,
0.0111846923828125,
-0.01483154296875,
0.021575927734375,
-0.0233612060546875,
0.06396484375,
-0.01221466064453125,
0.0005326271057128906,
-0.0213165283203125,
0.0184783935546875,
0.03271484375,
0.039794921875,
-0.0046539306640625,
-0.0006451606750488281,
0.032440185546875,
-0.03582763671875,
0.0199737548828125,
-0.0333251953125,
0.042999267578125,
0.0127105712890625,
-0.004878997802734375,
-0.0159912109375,
0.01265716552734375,
-0.0020351409912109375,
0.0248565673828125,
0.0311279296875,
-0.02069091796875,
-0.019378662109375,
0.00936126708984375,
0.00717926025390625,
-0.031280517578125,
0.0191497802734375,
-0.0282135009765625,
0.00555419921875,
-0.0037517547607421875,
0.0137786865234375,
0.06964111328125,
-0.046600341796875,
-0.007568359375,
0.004810333251953125,
0.0228271484375,
-0.0111236572265625,
-0.0292816162109375,
0.0673828125,
0.00933837890625,
0.0036449432373046875,
-0.025970458984375,
-0.00942230224609375,
-0.00394439697265625,
0.01324462890625,
0.0238189697265625,
-0.0014667510986328125,
0.0132904052734375,
-0.0236968994140625,
0.049224853515625,
-0.01123046875,
0.02239990234375,
0.031890869140625,
-0.025390625,
-0.01525115966796875,
-0.01177978515625,
0.02862548828125,
0.03656005859375,
-0.016204833984375,
-0.0117034912109375,
0.0292205810546875,
-0.0117034912109375,
-0.006038665771484375,
0.0168914794921875,
-0.001758575439453125,
0.0090789794921875,
0.01561737060546875,
0.00765228271484375,
-0.0040130615234375,
0.01513671875,
0.0411376953125,
0.016937255859375,
-0.0338134765625,
-0.036895751953125,
0.0204315185546875,
-0.01331329345703125,
-0.03216552734375,
-0.01495361328125,
-0.01250457763671875,
0.01229095458984375,
0.004726409912109375,
0.018341064453125,
-0.053314208984375,
-0.0013151168823242188,
-0.0168304443359375,
0.0295562744140625,
-0.07598876953125,
0.0367431640625,
0.004199981689453125,
0.0215301513671875,
-0.04571533203125,
-0.005672454833984375,
-0.0223846435546875,
-0.0126953125,
0.029266357421875,
0.01097869873046875,
-0.035369873046875,
-0.0122833251953125,
0.034637451171875,
0.0482177734375,
0.00447845458984375,
-0.043365478515625,
0.007755279541015625,
-0.031280517578125,
-0.00888824462890625,
0.020477294921875,
-0.033416748046875,
0.08111572265625,
-0.01467132568359375,
0.0085906982421875,
-0.01175689697265625,
0.0305328369140625,
0.00679779052734375,
0.00905609130859375,
-0.01169586181640625,
-0.0782470703125,
-0.037078857421875,
0.00423431396484375,
-0.041015625,
0.055572509765625,
0.0181121826171875,
-0.005222320556640625,
0.005611419677734375,
0.03265380859375,
0.009857177734375,
0.01409149169921875,
-0.0305023193359375,
0.057037353515625,
-0.015167236328125,
0.10382080078125,
0.0007252693176269531,
-0.01126861572265625,
-0.020477294921875,
-0.05230712890625,
0.03033447265625,
0.0168914794921875,
0.01354217529296875,
-0.01434326171875,
0.00626373291015625,
-0.01335906982421875,
0.01629638671875,
0.00859832763671875,
0.035064697265625,
-0.00897216796875,
0.01396942138671875,
0.0124664306640625,
-0.003246307373046875,
-0.04083251953125,
0.02838134765625,
0.05828857421875,
-0.01081085205078125,
-0.041107177734375,
0.0335693359375,
-0.0380859375,
-0.0054168701171875,
-0.00589752197265625,
0.01180267333984375,
-0.00521087646484375,
-0.009857177734375,
-0.0286712646484375,
-0.0638427734375,
-0.0050506591796875,
0.02227783203125,
0.005229949951171875,
-0.004940032958984375,
0.046966552734375,
0.03326416015625,
0.0293121337890625,
0.0526123046875,
0.0015249252319335938,
-0.03448486328125,
-0.019866943359375,
-0.039703369140625,
-0.0015316009521484375,
-0.05816650390625,
0.0614013671875,
0.0309600830078125,
0.035430908203125,
-0.0142364501953125,
0.021697998046875,
0.0008444786071777344,
-0.0216217041015625,
-0.055572509765625,
0.011505126953125,
0.002887725830078125,
-0.03118896484375,
0.0423583984375,
0.01837158203125,
0.032196044921875,
0.059844970703125,
0.0120391845703125,
0.00390625,
0.039398193359375,
-0.0031070709228515625,
-0.0506591796875,
0.0014667510986328125,
0.0447998046875,
0.0173797607421875,
-0.04779052734375,
0.028045654296875,
-0.04559326171875,
-0.01091766357421875,
-0.0022678375244140625,
-0.0200653076171875,
0.0706787109375,
-0.048553466796875,
0.00824737548828125,
0.0220184326171875,
0.0162200927734375,
-0.0015840530395507812,
0.0037059783935546875,
0.02716064453125,
-0.0236053466796875,
0.0117645263671875,
-0.006008148193359375,
0.00954437255859375,
-0.0159454345703125,
-0.0270843505859375,
-0.047607421875,
0.06744384765625,
0.00902557373046875,
0.00249481201171875,
-0.0015106201171875,
0.0190582275390625,
-0.0227203369140625,
0.005695343017578125,
-0.00962066650390625,
0.025177001953125,
-0.04998779296875,
0.036102294921875,
-0.0158538818359375,
-0.021240234375,
0.0262451171875,
0.0433349609375,
-0.0005464553833007812,
-0.0025005340576171875,
-0.023773193359375,
0.01384735107421875,
0.0478515625,
-0.0002987384796142578,
-0.01436614990234375,
0.050872802734375,
-0.004405975341796875,
0.002391815185546875,
-0.00608062744140625,
-0.0283355712890625,
0.0313720703125,
-0.06610107421875,
-0.02191162109375,
0.0133209228515625,
0.0193634033203125,
0.0308837890625,
-0.004791259765625,
0.020660400390625,
-0.000858306884765625,
-0.004119873046875,
0.007808685302734375,
0.0137176513671875,
-0.0027065277099609375,
0.06121826171875,
0.011932373046875,
-0.002918243408203125,
-0.017913818359375,
-0.0283355712890625,
0.025054931640625,
-0.021820068359375,
0.052825927734375,
0.0418701171875,
0.0211944580078125,
0.04498291015625,
0.07562255859375,
0.04754638671875,
0.047271728515625,
-0.0149383544921875,
0.031646728515625,
0.0006818771362304688,
0.0261077880859375,
-0.05389404296875,
-0.0224151611328125,
0.03814697265625,
0.054412841796875,
-0.032684326171875,
-0.0030574798583984375,
0.01702880859375,
0.00815582275390625,
-0.022125244140625,
-0.0232696533203125,
-0.024261474609375,
0.0298309326171875,
0.0557861328125,
0.016387939453125,
-0.05322265625,
-0.056060791015625,
0.019927978515625,
-0.013458251953125,
-0.024749755859375,
0.08551025390625,
-0.034637451171875,
-0.0267181396484375,
0.0143890380859375,
0.01323699951171875,
0.05718994140625,
0.01073455810546875,
0.0289459228515625,
-0.0421142578125,
-0.0173492431640625,
-0.0242767333984375,
-0.00849151611328125,
0.01181793212890625,
0.03875732421875,
-0.038726806640625,
0.00673675537109375,
0.0247344970703125,
0.0275421142578125,
-0.01451873779296875,
0.055877685546875,
0.001499176025390625,
0.0129547119140625,
0.0241546630859375,
-0.003749847412109375,
0.00719451904296875,
-0.032867431640625,
0.0455322265625,
-0.038421630859375,
0.0631103515625,
0.036041259765625,
-0.004283905029296875,
-0.023162841796875,
-0.01099395751953125,
0.072265625,
-0.0108795166015625,
0.008819580078125,
-0.0027980804443359375,
-0.0286407470703125,
0.0218963623046875,
0.0269622802734375,
0.05072021484375,
0.01416778564453125,
-0.071044921875,
-0.0037059783935546875,
-0.016754150390625,
-0.070068359375,
0.030548095703125,
0.041900634765625,
-0.05206298828125,
0.01418304443359375,
0.055694580078125,
-0.0235137939453125,
-0.042144775390625,
-0.001361846923828125,
0.0814208984375,
0.022979736328125,
-0.0216827392578125,
0.0511474609375,
-0.053741455078125,
-0.02740478515625,
-0.002925872802734375,
0.0208282470703125,
-0.025634765625,
0.0262298583984375,
0.0257720947265625,
0.0179290771484375,
-0.006237030029296875,
-0.0184173583984375,
0.010955810546875,
-0.03497314453125,
0.035186767578125,
-0.03045654296875,
-0.0174407958984375,
0.00029969215393066406,
0.004978179931640625,
-0.019317626953125,
0.057952880859375,
-0.048919677734375,
-0.02069091796875,
0.0029125213623046875,
0.0308074951171875,
-0.0213775634765625,
-0.00690460205078125,
-0.0241851806640625,
0.003681182861328125,
0.0087738037109375,
-0.007717132568359375,
0.0377197265625,
0.02142333984375,
-0.0168609619140625,
0.030487060546875,
0.0091705322265625,
-0.00487518310546875,
0.03289794921875,
-0.031646728515625,
0.051666259765625,
0.0181427001953125,
0.0011892318725585938,
0.0253753662109375,
-0.0176239013671875,
-0.01934814453125,
0.0108795166015625,
0.006591796875,
-0.042266845703125,
0.03253173828125,
-0.0217742919921875,
-0.01392364501953125,
-0.002674102783203125,
0.04498291015625,
0.006961822509765625,
0.0009427070617675781,
-0.0303192138671875,
-0.0145111083984375,
-0.035919189453125,
0.01061248779296875,
-0.031280517578125,
-0.006938934326171875,
-0.00714874267578125,
0.0014467239379882812,
0.001285552978515625,
-0.033203125,
-0.036529541015625,
0.005298614501953125,
0.049560546875,
0.031951904296875,
-0.07452392578125,
0.0222320556640625,
-0.003093719482421875,
0.037200927734375,
0.02020263671875,
0.0142364501953125,
0.01824951171875,
0.0341796875,
-0.04022216796875,
-0.022735595703125,
0.004627227783203125,
0.01629638671875,
-0.005786895751953125,
-0.006717681884765625,
0.00760650634765625,
0.01313018798828125,
0.02947998046875,
-0.01389312744140625,
-0.027191162109375,
0.04547119140625,
-0.049468994140625,
-0.0322265625,
0.021514892578125,
0.0007138252258300781,
-0.0156097412109375,
-0.0168914794921875,
0.0183258056640625,
-0.0301666259765625,
-0.006328582763671875,
0.01168060302734375,
0.002197265625,
0.03387451171875,
-0.0303497314453125,
-0.1175537109375,
0.0312042236328125,
-0.01468658447265625,
-0.039642333984375,
-0.0267181396484375,
-0.00345611572265625,
-0.002880096435546875,
-0.0233001708984375,
-0.01007080078125,
0.0070037841796875,
-0.02667236328125,
0.01126861572265625,
-0.0258026123046875,
0.042327880859375,
-0.01070404052734375,
-0.0196990966796875,
-0.044708251953125,
-0.0289306640625,
-0.0325927734375,
-0.0101318359375,
-0.01305389404296875,
-0.0013828277587890625,
0.03656005859375,
0.0288238525390625,
-0.01358795166015625,
0.0209197998046875,
0.015960693359375,
-0.02294921875,
-0.0251922607421875,
-0.01065826416015625,
0.0012960433959960938,
0.0087127685546875,
0.07928466796875,
0.0091552734375,
0.01702880859375,
-0.035888671875,
-0.02056884765625,
-0.0011081695556640625,
-0.0059356689453125,
-0.005527496337890625,
0.01018524169921875,
-0.05718994140625,
-0.0113067626953125,
-0.0005908012390136719,
0.0043182373046875,
0.04095458984375,
-0.01294708251953125,
-0.010498046875,
-0.0182342529296875,
-0.00348663330078125,
0.00171661376953125,
-0.064208984375,
0.0389404296875,
0.1153564453125,
-0.0672607421875,
-0.02838134765625,
0.02545166015625,
-0.028533935546875,
0.03521728515625,
-0.032806396484375,
0.028167724609375,
0.0124053955078125,
-0.0325927734375,
-0.017852783203125,
0.026824951171875,
0.04107666015625,
0.00298309326171875,
-0.038848876953125,
-0.038360595703125,
-0.009735107421875,
0.025421142578125,
-0.025543212890625,
-0.0289459228515625,
-0.00780487060546875,
0.006313323974609375,
0.0455322265625,
-0.0173797607421875,
0.0726318359375,
-0.0089263916015625,
0.037322998046875,
-0.01265716552734375,
-0.004123687744140625,
0.01910400390625,
-0.0144500732421875,
0.01251983642578125,
-0.005825042724609375,
-0.009063720703125,
-0.02783203125,
0.0188751220703125,
0.049591064453125,
-0.022247314453125,
0.019012451171875
]
|
c415f52b383881372c4826478745d91305e080f2 | Wordpress Stackexchange
Q: Show Font Awesome Icons In WP Post Editor I have added the Font Awesome script and it is being loaded in the source code also. But the icons are not being displayed in the post editor. Any possible solution?
A: Make sure you've registered the stylesheet for the editor:
add_editor_style( 'http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' );
This should be in your functions.php
https://codex.wordpress.org/Editor_Style
| Q: Show Font Awesome Icons In WP Post Editor I have added the Font Awesome script and it is being loaded in the source code also. But the icons are not being displayed in the post editor. Any possible solution?
A: Make sure you've registered the stylesheet for the editor:
add_editor_style( 'http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' );
This should be in your functions.php
https://codex.wordpress.org/Editor_Style
| wordpress | {
"language": "en",
"length": 60,
"provenance": "stackexchange_00019.jsonl.gz:455726",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188870"
} | [
0.005443572998046875,
-0.019744873046875,
0.0028629302978515625,
0.058837890625,
-0.0182647705078125,
-0.045562744140625,
0.07464599609375,
-0.0528564453125,
0.022705078125,
0.0433349609375,
0.002532958984375,
-0.0260467529296875,
0.0191497802734375,
-0.02978515625,
-0.0472412109375,
-0.00811004638671875,
0.044677734375,
-0.0224609375,
0.050567626953125,
0.006931304931640625,
-0.00464630126953125,
0.043792724609375,
0.03839111328125,
-0.0015306472778320312,
0.0181732177734375,
0.03021240234375,
0.09619140625,
-0.01515960693359375,
-0.00006157159805297852,
-0.0234832763671875,
0.0272064208984375,
-0.0247650146484375,
0.01377105712890625,
0.03472900390625,
-0.037017822265625,
0.01190185546875,
0.024169921875,
0.00010883808135986328,
-0.01184844970703125,
0.042877197265625,
0.0205841064453125,
-0.0043792724609375,
0.01544952392578125,
0.04132080078125,
-0.01116180419921875,
-0.03985595703125,
0.02032470703125,
-0.047149658203125,
0.0125732421875,
-0.01491546630859375,
-0.0012226104736328125,
0.032928466796875,
0.00978851318359375,
-0.01305389404296875,
-0.005184173583984375,
-0.007183074951171875,
-0.037384033203125,
0.04803466796875,
0.0312347412109375,
0.00522613525390625,
-0.028594970703125,
0.0171356201171875,
-0.01413726806640625,
-0.0347900390625,
0.0008878707885742188,
0.0188751220703125,
-0.009429931640625,
0.004924774169921875,
-0.0213470458984375,
0.0033321380615234375,
0.0062103271484375,
-0.042205810546875,
0.0239105224609375,
-0.022613525390625,
-0.005939483642578125,
-0.004222869873046875,
-0.006824493408203125,
-0.005123138427734375,
0.017120361328125,
-0.013427734375,
0.03564453125,
0.055755615234375,
-0.031646728515625,
-0.034515380859375,
-0.00406646728515625,
-0.037689208984375,
-0.00609588623046875,
-0.0224456787109375,
-0.023223876953125,
-0.0305328369140625,
-0.01739501953125,
-0.058441162109375,
-0.055450439453125,
0.027130126953125,
0.0153961181640625,
-0.046417236328125,
0.046417236328125,
0.0416259765625,
-0.0079498291015625,
0.017608642578125,
0.029937744140625,
-0.07452392578125,
0.0999755859375,
-0.0457763671875,
-0.009002685546875,
0.0237274169921875,
0.001354217529296875,
0.04473876953125,
0.0247344970703125,
0.0269775390625,
-0.006763458251953125,
-0.033111572265625,
0.019866943359375,
-0.00408172607421875,
-0.014801025390625,
-0.00536346435546875,
0.006008148193359375,
0.01293182373046875,
0.004650115966796875,
-0.0030956268310546875,
0.05535888671875,
0.0616455078125,
-0.002166748046875,
-0.038177490234375,
-0.01523590087890625,
-0.009735107421875,
-0.0206451416015625,
-0.05828857421875,
0.04486083984375,
0.07122802734375,
-0.040435791015625,
-0.0166168212890625,
0.03814697265625,
0.0117034912109375,
0.0106201171875,
-0.049774169921875,
-0.024993896484375,
-0.0296478271484375,
-0.0118255615234375,
0.024749755859375,
-0.0297088623046875,
-0.03631591796875,
0.025054931640625,
-0.027130126953125,
-0.00626373291015625,
0.0302581787109375,
0.00814056396484375,
-0.006023406982421875,
0.00116729736328125,
-0.042633056640625,
-0.020721435546875,
-0.0204315185546875,
0.0214996337890625,
0.04296875,
0.04840087890625,
-0.00852203369140625,
0.103515625,
-0.042724609375,
-0.007366180419921875,
-0.03759765625,
-0.0128173828125,
0.005840301513671875,
0.018035888671875,
-0.0302276611328125,
-0.0182342529296875,
-0.01096343994140625,
0.001861572265625,
-0.0014629364013671875,
0.031524658203125,
-0.01070404052734375,
0.022003173828125,
-0.0010585784912109375,
0.05108642578125,
-0.0191802978515625,
-0.033111572265625,
0.006717681884765625,
0.028167724609375,
-0.027374267578125,
0.0224761962890625,
0.0268402099609375,
-0.0280914306640625,
-0.0235137939453125,
0.043121337890625,
-0.044891357421875,
-0.04144287109375,
-0.0426025390625,
0.004856109619140625,
-0.0009298324584960938,
0.0516357421875,
0.0017871856689453125,
0.0028972625732421875,
-0.0087890625,
-0.0418701171875,
-0.00994873046875,
0.03509521484375,
-0.00396728515625,
-0.0174407958984375,
-0.0267181396484375,
0.022430419921875,
-0.02606201171875,
-0.01242828369140625,
-0.0163421630859375,
0.0229949951171875,
-0.0189208984375,
-0.0821533203125,
0.02178955078125,
-0.031585693359375,
0.039459228515625,
0.049957275390625,
0.014556884765625,
-0.014984130859375,
-0.0234375,
-0.003368377685546875,
0.00774383544921875,
-0.03887939453125,
0.01922607421875,
-0.0390625,
0.008514404296875,
0.004940032958984375,
0.03076171875,
0.0014982223510742188,
-0.020416259765625,
-0.0018825531005859375,
-0.01904296875,
-0.00940704345703125,
-0.00623321533203125,
-0.0004315376281738281,
-0.00945281982421875,
0.0037689208984375,
0.006816864013671875,
0.012603759765625,
0.01325225830078125,
0.005126953125,
-0.0131683349609375,
-0.0579833984375,
-0.016357421875,
-0.0379638671875,
-0.032440185546875,
0.005908966064453125,
0.0618896484375,
0.03631591796875,
0.05340576171875,
0.005153656005859375,
-0.004337310791015625,
0.0865478515625,
0.022674560546875,
0.03387451171875,
-0.035186767578125,
0.005962371826171875,
0.0200958251953125,
-0.0024967193603515625,
-0.01131439208984375,
0.02288818359375,
-0.0307159423828125,
0.011077880859375,
0.045867919921875,
0.0206756591796875,
0.032318115234375,
-0.0007700920104980469,
0.005313873291015625,
0.00897979736328125,
0.035308837890625,
-0.0185394287109375,
-0.00014972686767578125,
-0.0270233154296875,
0.03704833984375,
0.020660400390625,
0.0198516845703125,
-0.05389404296875,
0.016876220703125,
0.0357666015625,
0.06671142578125,
0.0111541748046875,
0.01416778564453125,
0.009124755859375,
-0.001739501953125,
-0.01910400390625,
-0.008636474609375,
0.035614013671875,
0.01222991943359375,
0.006572723388671875,
0.03753662109375,
0.039093017578125,
-0.010528564453125,
0.01271820068359375,
-0.0232391357421875,
0.0177154541015625,
-0.0040435791015625,
-0.00124359130859375,
-0.00045418739318847656,
0.01535797119140625,
0.0160369873046875,
-0.0257415771484375,
0.022064208984375,
0.005405426025390625,
-0.0132904052734375,
0.028594970703125,
-0.0416259765625,
0.05267333984375,
-0.0214385986328125,
0.03497314453125,
0.0638427734375,
0.00005370378494262695,
0.01727294921875,
0.01108551025390625,
-0.00818634033203125,
0.0080108642578125,
0.0209197998046875,
0.0034618377685546875,
-0.029327392578125,
-0.006450653076171875,
0.032928466796875,
0.040435791015625,
0.075927734375,
-0.0061187744140625,
-0.05023193359375,
0.0011987686157226562,
0.049560546875,
-0.065185546875,
-0.0721435546875,
-0.0124053955078125,
-0.058502197265625,
-0.004329681396484375,
-0.016021728515625,
-0.0188140869140625,
0.0007214546203613281,
0.0006699562072753906,
0.0099029541015625,
-0.050506591796875,
-0.0020923614501953125,
0.0009899139404296875,
-0.02813720703125,
-0.0274505615234375,
-0.04425048828125,
-0.0029144287109375,
0.00038743019104003906,
0.0146484375,
0.0262451171875,
-0.013458251953125,
-0.045166015625,
-0.0087738037109375,
-0.04046630859375,
-0.0024967193603515625,
0.0242767333984375,
0.0228271484375,
-0.045379638671875,
-0.00466156005859375,
-0.00392913818359375,
0.06976318359375,
0.0245361328125,
-0.02642822265625,
-0.00014150142669677734,
-0.004032135009765625,
-0.042449951171875,
0.01076507568359375,
0.0325927734375,
-0.003162384033203125,
-0.0172119140625,
0.04449462890625,
-0.0518798828125,
0.006153106689453125,
0.0017414093017578125,
-0.020660400390625,
0.024017333984375,
-0.004459381103515625,
-0.031646728515625,
-0.032928466796875,
0.047210693359375,
0.0096588134765625,
-0.005481719970703125,
0.0309906005859375,
-0.01165008544921875,
0.041717529296875,
-0.0022640228271484375,
-0.004474639892578125,
-0.04290771484375,
-0.00107574462890625,
-0.0134429931640625,
0.0325927734375,
0.0018663406372070312,
0.0257720947265625,
-0.0128173828125,
0.0399169921875,
-0.021820068359375,
-0.030517578125,
0.0246124267578125,
-0.0645751953125,
0.0179443359375,
-0.04559326171875,
-0.005573272705078125,
-0.0244598388671875,
0.060760498046875,
0.02166748046875,
-0.006160736083984375,
-0.004150390625,
0.006282806396484375,
-0.05743408203125,
-0.026763916015625,
-0.0301513671875,
0.012176513671875,
-0.11920166015625,
0.0301971435546875,
0.012603759765625,
-0.047698974609375,
0.0086517333984375,
0.0006690025329589844,
-0.06854248046875,
-0.0416259765625,
0.047393798828125,
-0.0797119140625,
-0.0011415481567382812,
0.03564453125,
-0.025054931640625,
0.0005116462707519531,
-0.052703857421875,
-0.031158447265625,
-0.1005859375,
-0.007171630859375,
-0.044952392578125,
0.06463623046875,
-0.004459381103515625,
0.037322998046875,
-0.0355224609375,
0.040924072265625,
0.003337860107421875,
0.05810546875,
-0.01036834716796875,
0.03326416015625,
-0.02044677734375,
-0.06793212890625,
0.0008730888366699219,
-0.053253173828125,
0.01483154296875,
-0.01264190673828125,
-0.07696533203125,
0.0020503997802734375,
-0.0262908935546875,
0.0281982421875,
0.0175323486328125,
-0.0276641845703125,
0.0256500244140625,
-0.009490966796875,
-0.04541015625,
0.0110321044921875,
-0.01480865478515625,
-0.0194854736328125,
-0.031829833984375,
-0.0199432373046875,
0.0261383056640625,
0.0131683349609375,
-0.004070281982421875,
0.0014333724975585938,
0.03271484375,
0.01416015625,
-0.0238189697265625,
-0.01377105712890625,
-0.016998291015625,
0.0238800048828125,
0.0110931396484375,
0.0273590087890625,
0.0076904296875,
-0.0120697021484375,
0.01456451416015625,
0.007289886474609375,
0.041534423828125,
-0.03082275390625,
0.018035888671875,
-0.0036220550537109375,
-0.01084136962890625,
0.0235748291015625,
0.00921630859375,
0.0068817138671875,
0.0243072509765625,
0.01490020751953125,
-0.044830322265625,
0.041656494140625,
0.035064697265625,
-0.01042938232421875,
0.008514404296875,
-0.00954437255859375,
-0.033966064453125,
-0.0075836181640625,
0.00901031494140625,
0.09039306640625,
0.045989990234375,
-0.0015401840209960938,
0.060638427734375,
0.05511474609375,
-0.00439453125,
0.0238494873046875,
0.0015735626220703125,
-0.0120086669921875,
0.0278778076171875,
-0.0066986083984375,
-0.016754150390625,
0.0229034423828125,
-0.014739990234375,
0.07037353515625,
0.0227813720703125,
-0.048004150390625,
0.01036834716796875,
0.005313873291015625,
0.040557861328125,
0.003505706787109375,
-0.0208892822265625,
0.025634765625,
0.026947021484375,
-0.0172271728515625,
-0.016357421875,
-0.006603240966796875,
-0.0180206298828125,
-0.048004150390625,
-0.0122833251953125,
-0.0135345458984375,
-0.021697998046875,
0.0173187255859375,
0.004703521728515625,
0.016632080078125,
-0.0149078369140625,
-0.011016845703125,
-0.005718231201171875,
0.01187896728515625,
0.0292816162109375,
0.033905029296875,
-0.0237884521484375,
-0.007236480712890625,
0.0008525848388671875,
0.0018444061279296875,
-0.03997802734375,
0.0101470947265625,
-0.0268096923828125,
0.053497314453125,
-0.01483917236328125,
-0.047882080078125,
0.059234619140625,
-0.034637451171875,
-0.0210113525390625,
0.0260772705078125,
-0.010406494140625,
-0.0784912109375,
-0.00652313232421875,
0.0266876220703125,
0.016387939453125,
-0.008270263671875,
-0.021026611328125,
0.040191650390625,
0.006519317626953125,
0.0301971435546875,
0.0205230712890625,
-0.0526123046875,
0.0256500244140625,
0.03173828125,
-0.03497314453125,
-0.0205535888671875,
-0.007450103759765625,
-0.04754638671875,
-0.01071929931640625,
-0.004413604736328125,
-0.01568603515625,
0.0281829833984375,
-0.01528167724609375,
-0.007476806640625,
0.007030487060546875,
-0.007175445556640625,
0.0012025833129882812,
0.0254669189453125,
0.01934814453125,
-0.020843505859375,
0.0025768280029296875,
0.006610870361328125,
-0.02130126953125,
-0.0227813720703125,
-0.01227569580078125,
-0.0078582763671875,
-0.05584716796875,
-0.037139892578125,
0.00982666015625,
0.025177001953125,
-0.00423431396484375,
-0.0050506591796875,
-0.00658416748046875,
0.050018310546875,
0.01959228515625,
0.0745849609375,
0.00615692138671875,
0.06365966796875,
-0.03363037109375,
0.034393310546875,
-0.0004363059997558594,
0.02789306640625,
-0.015380859375,
-0.0107574462890625,
-0.0025653839111328125,
-0.08447265625,
-0.0263671875,
-0.0028667449951171875,
0.004913330078125,
0.0400390625,
0.0035076141357421875,
0.0032672882080078125,
0.00720977783203125,
-0.0101776123046875,
0.002689361572265625,
-0.0025386810302734375,
0.045867919921875,
0.002689361572265625,
-0.01551055908203125,
0.05108642578125,
0.0003371238708496094,
0.0293121337890625,
-0.004695892333984375,
-0.03790283203125,
0.0281982421875,
0.01241302490234375,
0.0009851455688476562,
0.0147857666015625,
-0.047515869140625,
0.07977294921875,
0.05560302734375,
-0.0131072998046875,
0.01146697998046875,
-0.004444122314453125,
-0.0207672119140625,
-0.0413818359375,
-0.014404296875,
-0.029632568359375,
-0.0018663406372070312,
0.006862640380859375,
-0.017974853515625,
-0.0098724365234375,
0.00101470947265625,
-0.0154266357421875,
0.028228759765625,
0.01427459716796875,
0.064697265625,
-0.028961181640625,
0.0174407958984375,
0.0263519287109375,
-0.045074462890625,
0.020904541015625,
-0.0061798095703125,
-0.011199951171875,
-0.021087646484375,
0.06201171875,
-0.018341064453125,
-0.01192474365234375,
0.04107666015625,
-0.01123809814453125,
0.0151519775390625,
0.00832366943359375,
0.054534912109375,
0.01678466796875,
-0.096923828125,
0.00566864013671875,
0.06756591796875,
-0.01319122314453125,
0.0008955001831054688,
0.0038814544677734375,
-0.0176544189453125,
-0.0237884521484375,
-0.032135009765625,
-0.022369384765625,
-0.038330078125,
-0.0035877227783203125,
0.044891357421875,
0.01169586181640625,
0.0081024169921875,
0.03094482421875,
0.006160736083984375,
0.0106658935546875,
-0.0037364959716796875,
-0.005268096923828125,
0.00887298583984375,
-0.0352783203125,
0.0198516845703125,
0.041168212890625,
-0.02459716796875,
0.0197296142578125,
0.0150909423828125,
-0.0288238525390625,
-0.018798828125,
0.037445068359375,
0.12225341796875,
-0.024932861328125,
-0.03680419921875,
0.0401611328125,
0.040191650390625,
-0.03509521484375,
0.0081787109375,
-0.007568359375,
-0.034393310546875,
-0.0139007568359375,
0.01451873779296875,
-0.0223541259765625,
-0.001323699951171875,
0.0008606910705566406,
-0.035797119140625,
0.08026123046875,
-0.02398681640625,
-0.00646209716796875,
0.028076171875,
0.03912353515625,
-0.0259552001953125,
0.0203704833984375,
-0.047271728515625,
0.0400390625,
0.004985809326171875,
0.036651611328125,
-0.055084228515625,
0.007472991943359375,
-0.0023860931396484375,
0.0257110595703125,
0.037445068359375,
-0.00926971435546875,
-0.01108551025390625,
-0.014129638671875,
0.049652099609375,
0.0693359375,
0.019561767578125,
-0.006870269775390625,
-0.01165771484375,
-0.03009033203125,
0.00920867919921875,
0.01519775390625,
0.035614013671875,
-0.031951904296875,
-0.05230712890625,
-0.0025806427001953125,
0.0104217529296875,
0.007358551025390625,
-0.007320404052734375,
-0.0675048828125,
0.0255889892578125,
-0.01309967041015625,
-0.01136016845703125,
-0.045745849609375,
0.002231597900390625,
0.04022216796875,
0.01751708984375,
-0.007801055908203125,
-0.055511474609375,
-0.00890350341796875,
0.0198974609375,
0.0033016204833984375,
-0.01425933837890625,
0.00010335445404052734,
0.009429931640625,
-0.039031982421875,
0.020538330078125,
0.00531005859375,
0.044891357421875,
-0.0128021240234375,
0.01114654541015625,
-0.0205535888671875,
0.006725311279296875,
-0.0570068359375,
-0.0027923583984375,
0.021728515625,
0.0169525146484375,
-0.0166168212890625,
-0.002513885498046875,
0.012420654296875,
0.0165252685546875,
-0.0172271728515625,
-0.031829833984375,
-0.01171875,
-0.0784912109375,
-0.021881103515625,
-0.01541900634765625,
0.00347900390625,
0.0174102783203125,
0.015045166015625,
0.00919342041015625,
0.039520263671875,
-0.04132080078125,
0.020172119140625,
-0.03143310546875,
-0.0367431640625,
0.02294921875,
0.038482666015625,
0.023773193359375,
0.0667724609375,
0.034576416015625,
-0.0069732666015625,
-0.022369384765625,
0.00115203857421875,
0.00641632080078125,
0.0224151611328125,
-0.042999267578125,
-0.009552001953125,
0.00958251953125,
0.04461669921875,
0.01488494873046875,
0.0306549072265625,
0.0277099609375,
0.0318603515625,
0.0232696533203125,
-0.0177764892578125,
0.043548583984375,
-0.00015032291412353516,
-0.003437042236328125,
-0.034393310546875,
0.0183563232421875,
0.023284912109375,
0.011627197265625,
-0.013458251953125,
0.006072998046875,
0.0692138671875,
-0.047149658203125,
0.0096435546875,
0.00807952880859375,
0.00704193115234375,
0.027618408203125,
0.0008273124694824219,
-0.0504150390625,
-0.00782012939453125,
-0.04302978515625,
-0.0014972686767578125,
-0.0198211669921875,
-0.0439453125,
0.00759124755859375,
0.0266571044921875,
-0.01406097412109375,
0.0275115966796875,
0.01132965087890625,
-0.034393310546875,
0.0013484954833984375,
0.0073699951171875,
0.040740966796875,
0.04150390625,
-0.008514404296875,
0.0177154541015625,
-0.0063629150390625,
-0.0273590087890625,
-0.02435302734375,
0.06524658203125,
0.0129547119140625,
0.047882080078125,
-0.03509521484375,
0.030364990234375,
-0.00041031837463378906,
0.0095977783203125,
-0.033294677734375,
-0.0279083251953125,
0.03759765625,
-0.032135009765625,
-0.003997802734375,
-0.0011005401611328125,
-0.04241943359375,
0.047607421875,
-0.0007305145263671875,
-0.007232666015625,
0.00962066650390625,
0.00023448467254638672,
-0.00852203369140625,
0.0049591064453125,
0.040496826171875,
-0.0194549560546875,
-0.009613037109375,
-0.039459228515625,
-0.02587890625,
0.0396728515625,
-0.0004432201385498047,
-0.007579803466796875,
-0.0090484619140625,
0.04046630859375,
-0.035888671875,
0.033782958984375,
-0.0035762786865234375,
0.042724609375,
0.033599853515625,
0.01375579833984375,
-0.009735107421875,
-0.008880615234375,
-0.01617431640625,
-0.0013790130615234375,
0.007198333740234375,
0.006481170654296875,
-0.01552581787109375,
-0.0222930908203125,
0.077880859375,
0.0272979736328125,
0.03125,
-0.0279541015625,
-0.0234222412109375,
0.0831298828125,
-0.0008955001831054688,
-0.0258026123046875,
0.0364990234375,
-0.0137481689453125,
-0.00894927978515625,
-0.01160430908203125,
0.0254669189453125,
-0.017669677734375,
-0.03143310546875,
-0.11175537109375,
0.0272064208984375,
0.0174560546875,
-0.01024627685546875,
-0.053466796875,
0.00588226318359375,
-0.005657196044921875,
0.08319091796875,
-0.019989013671875,
0.040283203125,
0.01097869873046875,
0.033050537109375,
-0.0280914306640625,
-0.01605224609375,
0.005352020263671875,
0.042144775390625,
0.0102386474609375,
0.037750244140625,
0.040313720703125,
-0.0223846435546875,
-0.01470184326171875,
0.0251617431640625,
0.01513671875,
0.0693359375,
0.006481170654296875,
-0.02215576171875,
-0.0093536376953125,
-0.004100799560546875,
-0.027923583984375,
-0.051300048828125,
0.03985595703125,
-0.09124755859375,
-0.035797119140625,
0.0150146484375,
0.002079010009765625,
0.014556884765625,
-0.07037353515625,
-0.1563720703125,
0.0770263671875,
-0.0298004150390625,
-0.04705810546875,
-0.0219268798828125,
-0.02581787109375,
-0.0170135498046875,
0.035919189453125,
-0.0034427642822265625,
0.0011529922485351562,
-0.01239776611328125,
0.038421630859375,
-0.01271820068359375,
0.0213470458984375,
0.00807952880859375,
-0.005138397216796875,
-0.01910400390625,
0.0164337158203125,
0.01511383056640625,
-0.04180908203125,
0.0213470458984375,
-0.0028514862060546875,
0.002674102783203125,
0.0256500244140625,
-0.059906005859375,
-0.03912353515625,
-0.031707763671875,
0.0216217041015625,
0.01548004150390625,
-0.036224365234375,
-0.0151824951171875,
-0.0225677490234375,
0.037322998046875,
-0.0168609619140625,
0.007450103759765625,
-0.0182342529296875,
0.003345489501953125,
-0.00028395652770996094,
-0.0509033203125,
0.01184844970703125,
0.0198516845703125,
-0.0198516845703125,
0.0153961181640625,
-0.01070404052734375,
0.0189971923828125,
0.0222320556640625,
-0.03125,
0.0249176025390625,
-0.02593994140625,
0.009307861328125,
-0.00978851318359375,
0.0037384033203125,
-0.01088714599609375,
0.06451416015625,
-0.0240936279296875,
0.03460693359375,
0.0110015869140625,
0.016571044921875,
0.055023193359375,
0.046844482421875,
-0.011749267578125,
-0.007129669189453125,
-0.00762176513671875,
0.0298004150390625,
-0.0020618438720703125,
-0.003017425537109375,
-0.039947509765625,
0.0135498046875,
0.0159759521484375,
0.017822265625,
-0.0272979736328125,
0.0176544189453125,
0.041259765625,
0.052490234375,
-0.026824951171875,
0.059844970703125,
-0.03570556640625,
0.00208282470703125,
-0.015380859375,
0.002155303955078125,
-0.053009033203125,
0.03411865234375,
-0.01326751708984375,
-0.004467010498046875,
0.0166778564453125,
0.01434326171875,
0.0135498046875,
0.0038509368896484375,
0.0010042190551757812,
0.007061004638671875,
-0.0029468536376953125,
0.0019664764404296875
]
|
790088f9dab978e1b218de05b3554c12af7666f0 | Wordpress Stackexchange
Q: Move payment options at checkout in WooCommerce I'm using WooCommerce and i'm new to both Wordpress and this plugin. I have downloaded a free theme which I will configure, however I can't figure out how I can change the checkout template. What I want to do is moving payment options from bottom, to the top right column.
http://bildr.no/image/SWtmTlZo.jpeg
Which files do I need to edit?
A: You can customize the checkout page using hooks.
To remove the payment options add the following code to your (child)theme's functions.php:
remove_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
To add it after the order notes use this hook:
add_action( 'woocommerce_after_order_notes', 'woocommerce_checkout_payment', 20 );
| Q: Move payment options at checkout in WooCommerce I'm using WooCommerce and i'm new to both Wordpress and this plugin. I have downloaded a free theme which I will configure, however I can't figure out how I can change the checkout template. What I want to do is moving payment options from bottom, to the top right column.
http://bildr.no/image/SWtmTlZo.jpeg
Which files do I need to edit?
A: You can customize the checkout page using hooks.
To remove the payment options add the following code to your (child)theme's functions.php:
remove_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
To add it after the order notes use this hook:
add_action( 'woocommerce_after_order_notes', 'woocommerce_checkout_payment', 20 );
| wordpress | {
"language": "en",
"length": 108,
"provenance": "stackexchange_00019.jsonl.gz:455735",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188898"
} | [
0.036224365234375,
-0.01331329345703125,
-0.0072021484375,
0.0144500732421875,
-0.018829345703125,
-0.051727294921875,
0.041656494140625,
-0.02410888671875,
0.0289764404296875,
0.04461669921875,
0.0147705078125,
-0.01258087158203125,
-0.00919342041015625,
-0.018829345703125,
-0.045257568359375,
-0.001861572265625,
0.019317626953125,
-0.00482177734375,
0.0265960693359375,
0.00252532958984375,
-0.0014476776123046875,
0.0228729248046875,
0.01560211181640625,
0.052764892578125,
0.021575927734375,
0.012054443359375,
0.07720947265625,
-0.0452880859375,
0.043365478515625,
-0.0201568603515625,
0.038177490234375,
-0.034393310546875,
0.01378631591796875,
-0.00980377197265625,
0.0028514862060546875,
-0.030487060546875,
0.019012451171875,
-0.0196990966796875,
-0.00624847412109375,
0.026580810546875,
0.037628173828125,
-0.025146484375,
-0.026824951171875,
-0.0091094970703125,
-0.033935546875,
-0.0144500732421875,
0.00881195068359375,
-0.018310546875,
0.0311279296875,
-0.000012576580047607422,
-0.004085540771484375,
0.0302581787109375,
0.0011034011840820312,
-0.054351806640625,
-0.024871826171875,
-0.041961669921875,
-0.07855224609375,
0.02532958984375,
0.0035381317138671875,
0.06695556640625,
0.03607177734375,
0.0015468597412109375,
-0.0198211669921875,
-0.03314208984375,
-0.0174713134765625,
0.006000518798828125,
-0.015869140625,
0.0038661956787109375,
-0.06640625,
-0.01067352294921875,
0.05987548828125,
-0.03741455078125,
0.0209197998046875,
-0.0154876708984375,
-0.03619384765625,
-0.02593994140625,
0.01337432861328125,
-0.01519775390625,
0.033233642578125,
-0.027130126953125,
0.0255279541015625,
0.033477783203125,
-0.014068603515625,
-0.0253143310546875,
0.0206451416015625,
-0.00884246826171875,
0.00815582275390625,
-0.01058197021484375,
-0.058074951171875,
-0.03924560546875,
-0.037506103515625,
-0.0007028579711914062,
-0.077392578125,
-0.0008606910705566406,
-0.026031494140625,
-0.0035152435302734375,
-0.0218353271484375,
-0.0174102783203125,
0.03814697265625,
0.03399658203125,
0.002101898193359375,
-0.033782958984375,
0.048583984375,
-0.0217132568359375,
-0.01031494140625,
0.0019969940185546875,
0.010711669921875,
0.01169586181640625,
0.0299530029296875,
0.0214996337890625,
-0.03338623046875,
0.0211334228515625,
-0.001758575439453125,
-0.0185089111328125,
-0.01153564453125,
-0.0201873779296875,
-0.0584716796875,
0.038543701171875,
0.004543304443359375,
-0.006633758544921875,
0.01214599609375,
0.0220184326171875,
0.0081787109375,
-0.031463623046875,
-0.044586181640625,
-0.0462646484375,
-0.03521728515625,
-0.0260009765625,
-0.058319091796875,
0.04290771484375,
-0.054107666015625,
0.0022792816162109375,
0.08636474609375,
0.0667724609375,
0.03253173828125,
-0.030120849609375,
0.02215576171875,
0.00707244873046875,
0.005794525146484375,
-0.0052642822265625,
0.06060791015625,
-0.03997802734375,
-0.0584716796875,
0.048370361328125,
0.03375244140625,
0.0018863677978515625,
0.0181427001953125,
0.036041259765625,
0.01395416259765625,
-0.01085662841796875,
0.0198822021484375,
0.01418304443359375,
-0.001522064208984375,
0.019683837890625,
0.0103759765625,
0.021087646484375,
0.004070281982421875,
0.0098724365234375,
0.0110321044921875,
0.00013196468353271484,
-0.049713134765625,
-0.002330780029296875,
0.032073974609375,
-0.078369140625,
-0.05792236328125,
0.01409912109375,
-0.05169677734375,
-0.015228271484375,
0.034210205078125,
0.0031261444091796875,
0.024200439453125,
-0.0137176513671875,
0.047088623046875,
-0.0094757080078125,
-0.0253448486328125,
0.007427215576171875,
-0.0151214599609375,
0.0162506103515625,
0.0189971923828125,
0.03759765625,
0.0033435821533203125,
-0.0435791015625,
0.032257080078125,
-0.006114959716796875,
-0.04266357421875,
0.0277252197265625,
0.0261993408203125,
0.00734710693359375,
-0.01806640625,
0.00838470458984375,
0.07659912109375,
0.04486083984375,
-0.032745361328125,
0.0288848876953125,
0.0007419586181640625,
0.01910400390625,
-0.0002448558807373047,
0.033111572265625,
0.0019426345825195312,
-0.051605224609375,
-0.013275146484375,
0.025909423828125,
-0.0127716064453125,
0.01320648193359375,
0.03802490234375,
-0.0161895751953125,
0.0155181884765625,
0.00989532470703125,
-0.0127105712890625,
-0.0026187896728515625,
0.0233001708984375,
0.03857421875,
-0.043365478515625,
-0.034088134765625,
-0.01971435546875,
0.029205322265625,
-0.0302734375,
0.07000732421875,
0.0160064697265625,
0.035919189453125,
0.047576904296875,
-0.053802490234375,
0.060943603515625,
0.017364501953125,
0.01264190673828125,
0.00485992431640625,
-0.035980224609375,
-0.0223541259765625,
-0.0095367431640625,
0.0024166107177734375,
-0.049468994140625,
0.03717041015625,
-0.0029315948486328125,
-0.0303192138671875,
-0.0298919677734375,
0.00870513916015625,
-0.00791168212890625,
-0.06805419921875,
-0.006931304931640625,
0.051788330078125,
0.0284423828125,
0.0323486328125,
-0.0016031265258789062,
-0.01172637939453125,
0.05438232421875,
-0.034149169921875,
0.003997802734375,
-0.01409912109375,
0.0015077590942382812,
-0.0036945343017578125,
0.00806427001953125,
-0.0163421630859375,
0.03802490234375,
-0.0445556640625,
0.0245513916015625,
0.0283050537109375,
-0.042327880859375,
-0.0362548828125,
0.039459228515625,
-0.0023822784423828125,
0.007781982421875,
-0.050872802734375,
-0.01070404052734375,
-0.028045654296875,
0.0251312255859375,
-0.00737762451171875,
0.0262603759765625,
-0.0093994140625,
-0.03375244140625,
-0.013885498046875,
0.0303192138671875,
0.0180816650390625,
-0.006465911865234375,
0.02447509765625,
-0.0509033203125,
0.01074981689453125,
-0.0231475830078125,
0.0227813720703125,
-0.0296630859375,
-0.0015773773193359375,
-0.004291534423828125,
0.019317626953125,
-0.0180816650390625,
-0.0084075927734375,
0.003032684326171875,
-0.0380859375,
-0.00013434886932373047,
0.01055908203125,
-0.053314208984375,
-0.033966064453125,
0.01035308837890625,
0.00440216064453125,
-0.040374755859375,
0.01385498046875,
-0.026824951171875,
-0.0275421142578125,
0.040008544921875,
0.01285552978515625,
0.0058441162109375,
-0.0046539306640625,
0.0189361572265625,
0.045562744140625,
-0.01207733154296875,
0.0018148422241210938,
0.01544189453125,
-0.005687713623046875,
0.01116943359375,
0.0076141357421875,
-0.01143646240234375,
0.01001739501953125,
-0.049224853515625,
0.0141754150390625,
0.01122283935546875,
-0.00730133056640625,
-0.0007371902465820312,
-0.0195159912109375,
-0.01520538330078125,
0.001682281494140625,
-0.0298309326171875,
-0.0196380615234375,
-0.0183563232421875,
-0.07598876953125,
-0.0152740478515625,
-0.0007967948913574219,
-0.03753662109375,
0.012725830078125,
0.023345947265625,
0.003452301025390625,
0.00759124755859375,
-0.0287628173828125,
0.01099395751953125,
-0.012359619140625,
-0.01387786865234375,
-0.0067291259765625,
0.002979278564453125,
-0.014129638671875,
-0.0022430419921875,
0.07177734375,
0.00481414794921875,
-0.04541015625,
-0.00861358642578125,
0.015777587890625,
0.00551605224609375,
0.022552490234375,
0.059539794921875,
-0.038818359375,
0.0060272216796875,
0.01027679443359375,
-0.0177001953125,
0.0137481689453125,
-0.0235443115234375,
-0.03131103515625,
-0.038299560546875,
-0.015228271484375,
-0.05218505859375,
-0.00029087066650390625,
0.048675537109375,
-0.046539306640625,
-0.051910400390625,
-0.0736083984375,
-0.06427001953125,
0.03021240234375,
-0.036712646484375,
0.0082855224609375,
0.0079345703125,
-0.00809478759765625,
0.00347137451171875,
0.0293731689453125,
0.019989013671875,
-0.006259918212890625,
0.026611328125,
-0.004756927490234375,
-0.007129669189453125,
-0.0030231475830078125,
-0.005214691162109375,
-0.04925537109375,
0.01172637939453125,
-0.01153564453125,
0.0261077880859375,
0.01325225830078125,
0.019195556640625,
-0.0225067138671875,
0.037750244140625,
-0.05181884765625,
-0.10198974609375,
0.04217529296875,
-0.08819580078125,
-0.0048828125,
-0.043609619140625,
-0.0185699462890625,
0.00980377197265625,
0.1422119140625,
-0.01387786865234375,
-0.0179901123046875,
0.0207977294921875,
0.004184722900390625,
0.0020313262939453125,
0.01104736328125,
-0.033599853515625,
-0.020050048828125,
-0.0699462890625,
0.007965087890625,
-0.008758544921875,
-0.017333984375,
-0.0014553070068359375,
-0.033538818359375,
-0.018157958984375,
-0.04901123046875,
0.0278778076171875,
-0.00737762451171875,
0.00785064697265625,
0.046356201171875,
-0.02947998046875,
0.035614013671875,
-0.03564453125,
-0.00879669189453125,
-0.01084136962890625,
-0.0174560546875,
0.019073486328125,
0.007236480712890625,
0.00746917724609375,
-0.0247955322265625,
0.0013437271118164062,
0.0325927734375,
-0.00850677490234375,
0.05743408203125,
-0.030731201171875,
0.018341064453125,
-0.009674072265625,
-0.052886962890625,
-0.020965576171875,
-0.0265350341796875,
-0.007122039794921875,
-0.018646240234375,
-0.0118865966796875,
0.0304412841796875,
-0.01543426513671875,
0.0213775634765625,
0.00681304931640625,
-0.02447509765625,
-0.09912109375,
-0.06756591796875,
-0.048126220703125,
-0.0341796875,
-0.012420654296875,
-0.014617919921875,
-0.048065185546875,
-0.07806396484375,
0.041961669921875,
-0.0660400390625,
0.0119781494140625,
0.0224761962890625,
0.103759765625,
0.01812744140625,
0.01444244384765625,
-0.005275726318359375,
-0.00930023193359375,
0.015716552734375,
0.02691650390625,
-0.0299224853515625,
-0.07550048828125,
-0.040191650390625,
0.063232421875,
-0.0272064208984375,
-0.0152130126953125,
0.00215911865234375,
0.051788330078125,
-0.01509857177734375,
-0.035614013671875,
0.01384735107421875,
-0.057220458984375,
0.0133209228515625,
-0.01514434814453125,
-0.032867431640625,
-0.01015472412109375,
-0.00125885009765625,
0.02825927734375,
-0.032867431640625,
0.0621337890625,
0.0088958740234375,
-0.032623291015625,
-0.002178192138671875,
-0.005340576171875,
0.0171966552734375,
0.047821044921875,
-0.017242431640625,
0.0245513916015625,
0.0277862548828125,
0.006244659423828125,
-0.0293121337890625,
-0.0484619140625,
-0.02294921875,
0.0274810791015625,
-0.0241851806640625,
0.00887298583984375,
0.0183868408203125,
-0.004261016845703125,
0.01377105712890625,
-0.0012989044189453125,
-0.029754638671875,
-0.06781005859375,
-0.009735107421875,
0.005062103271484375,
-0.01012420654296875,
-0.03564453125,
0.0228271484375,
-0.034271240234375,
0.0198211669921875,
0.014190673828125,
-0.07952880859375,
-0.03240966796875,
-0.0341796875,
0.0234375,
0.026458740234375,
-0.01210784912109375,
0.0286407470703125,
0.0214385986328125,
0.0231170654296875,
0.005584716796875,
-0.01059722900390625,
0.010406494140625,
0.0079498291015625,
-0.0005660057067871094,
0.00588226318359375,
0.0228118896484375,
0.0216064453125,
-0.036895751953125,
0.045196533203125,
-0.00826263427734375,
-0.00600433349609375,
0.01247406005859375,
0.0007939338684082031,
-0.029693603515625,
-0.013916015625,
0.039764404296875,
0.00617218017578125,
-0.0032939910888671875,
-0.004528045654296875,
-0.00946807861328125,
-0.03802490234375,
-0.006107330322265625,
-0.006572723388671875,
-0.025909423828125,
-0.0236663818359375,
-0.00618743896484375,
-0.00478363037109375,
-0.059234619140625,
-0.027801513671875,
0.055572509765625,
-0.019744873046875,
-0.0201416015625,
-0.031707763671875,
-0.0615234375,
0.013458251953125,
0.0172882080078125,
-0.05694580078125,
-0.07977294921875,
0.01146697998046875,
-0.0018262863159179688,
0.0343017578125,
-0.014923095703125,
0.03521728515625,
-0.0008625984191894531,
-0.04150390625,
-0.00003075599670410156,
0.007129669189453125,
0.04937744140625,
0.015411376953125,
-0.049346923828125,
-0.01320648193359375,
-0.056640625,
-0.0306854248046875,
-0.06317138671875,
-0.01526641845703125,
-0.054779052734375,
0.01824951171875,
0.0171356201171875,
0.0286102294921875,
-0.032073974609375,
-0.0694580078125,
-0.01235198974609375,
-0.019439697265625,
0.043426513671875,
0.0025787353515625,
-0.0245513916015625,
0.060760498046875,
-0.0130767822265625,
0.004817962646484375,
-0.005603790283203125,
0.0170745849609375,
-0.0015974044799804688,
-0.00750732421875,
-0.0053863525390625,
0.00946044921875,
-0.03253173828125,
-0.00850677490234375,
-0.039398193359375,
0.037811279296875,
0.09686279296875,
-0.0126495361328125,
0.003704071044921875,
0.00727081298828125,
0.01166534423828125,
-0.022369384765625,
0.005023956298828125,
-0.004093170166015625,
-0.0172119140625,
0.0237579345703125,
-0.0115203857421875,
0.038330078125,
0.021820068359375,
0.029327392578125,
-0.006168365478515625,
-0.0275115966796875,
0.0220489501953125,
-0.009185791015625,
-0.034210205078125,
0.035186767578125,
0.04833984375,
0.00656890869140625,
0.034454345703125,
0.007297515869140625,
0.008209228515625,
0.0082855224609375,
0.0248870849609375,
0.017120361328125,
-0.0189056396484375,
0.04296875,
-0.0030059814453125,
-0.023101806640625,
0.0016489028930664062,
-0.037261962890625,
0.03564453125,
0.06280517578125,
0.0714111328125,
-0.137451171875,
0.032684326171875,
0.0188140869140625,
0.0014753341674804688,
0.042938232421875,
-0.0110015869140625,
0.01499176025390625,
-0.06256103515625,
0.0229034423828125,
0.012939453125,
-0.020843505859375,
-0.0196380615234375,
-0.041351318359375,
0.00830078125,
-0.0085296630859375,
0.024566650390625,
-0.0017375946044921875,
-0.06805419921875,
-0.00455474853515625,
0.03564453125,
-0.0102386474609375,
-0.0142059326171875,
0.01031494140625,
0.0010023117065429688,
-0.0012655258178710938,
-0.038482666015625,
0.02410888671875,
-0.037445068359375,
-0.000018656253814697266,
0.0261077880859375,
-0.036163330078125,
0.0028629302978515625,
0.035369873046875,
-0.0345458984375,
0.033782958984375,
-0.006076812744140625,
-0.01030731201171875,
-0.0101165771484375,
-0.021209716796875,
0.00823974609375,
-0.0002903938293457031,
-0.0697021484375,
0.01052093505859375,
-0.05255126953125,
0.005481719970703125,
0.0005517005920410156,
0.02459716796875,
0.0306854248046875,
-0.00890350341796875,
-0.0277099609375,
0.061187744140625,
0.0250244140625,
-0.044281005859375,
0.018829345703125,
0.04931640625,
-0.01320648193359375,
0.005706787109375,
0.03411865234375,
0.01971435546875,
-0.008636474609375,
0.05419921875,
-0.0241546630859375,
0.07110595703125,
0.016693115234375,
-0.029632568359375,
0.0241546630859375,
0.046051025390625,
-0.046356201171875,
0.021484375,
-0.0213775634765625,
0.03912353515625,
-0.01038360595703125,
0.041259765625,
-0.034454345703125,
-0.0079498291015625,
0.0003948211669921875,
0.048614501953125,
0.04803466796875,
0.0040130615234375,
-0.015716552734375,
0.0195770263671875,
0.1025390625,
0.055633544921875,
0.02349853515625,
0.02130126953125,
-0.0019359588623046875,
-0.040679931640625,
0.0058135986328125,
-0.01201629638671875,
0.0189971923828125,
-0.0301361083984375,
-0.017181396484375,
0.01322174072265625,
-0.001567840576171875,
-0.0178070068359375,
-0.01070404052734375,
0.0242462158203125,
-0.0256195068359375,
-0.00778961181640625,
0.0184783935546875,
-0.02874755859375,
0.01126861572265625,
0.004489898681640625,
-0.00988006591796875,
0.01320648193359375,
0.01454925537109375,
-0.0196990966796875,
0.0391845703125,
-0.010498046875,
0.028778076171875,
0.0201416015625,
0.0130462646484375,
0.0469970703125,
-0.04962158203125,
0.0133514404296875,
0.0025844573974609375,
-0.039093017578125,
0.030181884765625,
0.0108795166015625,
0.009674072265625,
0.01334381103515625,
0.09014892578125,
-0.016693115234375,
0.0023365020751953125,
-0.03997802734375,
0.037200927734375,
0.0186614990234375,
-0.01129913330078125,
0.005603790283203125,
-0.081787109375,
-0.004032135009765625,
-0.08917236328125,
-0.111083984375,
-0.054962158203125,
-0.0161895751953125,
0.022491455078125,
0.036865234375,
-0.0098724365234375,
0.021148681640625,
-0.051605224609375,
-0.04339599609375,
-0.01122283935546875,
0.0186309814453125,
0.028167724609375,
-0.007358551025390625,
-0.03607177734375,
0.026611328125,
0.0288238525390625,
0.0306243896484375,
0.00287628173828125,
0.037506103515625,
-0.01788330078125,
0.00748443603515625,
-0.0179901123046875,
-0.04278564453125,
-0.00997161865234375,
0.0323486328125,
-0.00689697265625,
-0.005359649658203125,
-0.0030040740966796875,
0.0309906005859375,
0.031280517578125,
-0.0214080810546875,
0.044891357421875,
-0.0036449432373046875,
-0.005741119384765625,
-0.01061248779296875,
-0.013336181640625,
0.0236968994140625,
-0.01360321044921875,
-0.01218414306640625,
-0.00093841552734375,
0.0350341796875,
0.0101776123046875,
-0.00799560546875,
0.005893707275390625,
-0.04144287109375,
-0.00290679931640625,
0.0203857421875,
0.0499267578125,
0.0318603515625,
-0.049072265625,
-0.01328277587890625,
-0.043792724609375,
0.029022216796875,
-0.00424957275390625,
0.019989013671875,
0.0192108154296875,
0.03021240234375,
0.0024280548095703125,
-0.0124053955078125,
-0.0107574462890625,
-0.0077972412109375,
0.03253173828125,
0.0029125213623046875,
0.0074005126953125,
0.00864410400390625,
-0.056396484375,
-0.036102294921875,
-0.025177001953125,
0.0401611328125,
0.0130462646484375,
0.0244903564453125,
0.01531982421875,
0.0313720703125,
-0.029327392578125,
-0.0032482147216796875,
-0.0021686553955078125,
-0.05975341796875,
0.09381103515625,
-0.01242828369140625,
-0.040496826171875,
0.006412506103515625,
-0.006206512451171875,
-0.0228424072265625,
0.044219970703125,
-0.049041748046875,
-0.02032470703125,
-0.017822265625,
0.04644775390625,
-0.0032444000244140625,
0.034698486328125,
-0.016143798828125,
-0.0200042724609375,
-0.00832366943359375,
-0.0059051513671875,
0.01934814453125,
0.00997161865234375,
-0.011322021484375,
0.0296783447265625,
0.022216796875,
0.011932373046875,
0.02667236328125,
0.004787445068359375,
0.0423583984375,
0.032958984375,
-0.02423095703125,
-0.0257720947265625,
0.01432037353515625,
-0.01055145263671875,
0.0247650146484375,
0.01483917236328125,
0.0127105712890625,
0.035858154296875,
-0.056640625,
-0.00012254714965820312,
0.0089263916015625,
0.00821685791015625,
-0.0157928466796875,
0.001941680908203125,
0.017425537109375,
-0.0208892822265625,
-0.0033893585205078125,
0.0305023193359375,
-0.023651123046875,
0.00797271728515625,
0.0150604248046875,
-0.0047760009765625,
0.08062744140625,
0.00485992431640625,
0.028900146484375,
-0.0246734619140625,
0.00508880615234375,
0.0101470947265625,
-0.042633056640625,
0.007686614990234375,
0.004276275634765625,
0.01203155517578125,
-0.018341064453125,
-0.01373291015625,
0.0159454345703125,
0.0264129638671875,
-0.028289794921875,
-0.01427459716796875,
-0.032745361328125,
-0.0142059326171875,
-0.03948974609375,
-0.00923919677734375,
0.03131103515625,
-0.004180908203125,
-0.03326416015625,
0.0166778564453125,
-0.00653839111328125,
0.0635986328125,
-0.0175323486328125,
-0.018768310546875,
0.0247039794921875,
0.0006852149963378906,
-0.01104736328125,
-0.0703125,
-0.0107574462890625,
-0.028656005859375,
0.005931854248046875,
-0.0243377685546875,
0.0044708251953125,
0.01242828369140625,
-0.040496826171875,
-0.058135986328125,
0.045074462890625,
-0.0084686279296875,
-0.013641357421875,
-0.01291656494140625,
-0.0080413818359375,
-0.04052734375,
0.0704345703125,
0.016510009765625,
-0.0168304443359375,
-0.0034770965576171875,
0.03375244140625,
-0.01580810546875,
0.04840087890625,
-0.0084686279296875,
-0.0200042724609375,
-0.00838470458984375,
0.0101165771484375,
0.0076446533203125,
0.0256500244140625,
-0.0108184814453125,
-0.007282257080078125,
0.0093231201171875,
0.01275634765625,
-0.01363372802734375,
-0.0271759033203125,
0.01256561279296875,
-0.0185089111328125,
0.01338958740234375,
0.001461029052734375,
0.004306793212890625,
0.007038116455078125,
-0.0161285400390625,
0.031005859375,
-0.00731658935546875,
-0.00472259521484375,
-0.017120361328125,
0.0186767578125,
-0.002353668212890625,
-0.0013427734375,
-0.000782012939453125,
-0.01232147216796875,
0.0014829635620117188,
-0.026275634765625,
-0.0172271728515625,
-0.0172119140625,
0.0271453857421875,
-0.03271484375,
-0.00411224365234375,
0.017486572265625,
-0.005489349365234375,
-0.05291748046875,
0.033355712890625,
0.009979248046875,
-0.024993896484375,
-0.018280029296875,
-0.01494598388671875,
0.00353240966796875,
-0.01038360595703125,
-0.055572509765625,
-0.03204345703125,
0.0085906982421875,
-0.034210205078125,
0.0277557373046875,
-0.0216827392578125,
0.0673828125,
-0.037750244140625,
0.019378662109375,
-0.028778076171875,
0.0174560546875,
0.010894775390625,
-0.01042938232421875,
-0.031158447265625,
0.04730224609375,
0.02093505859375,
0.07452392578125,
0.034393310546875,
0.08306884765625,
0.005764007568359375,
0.070556640625,
0.00099945068359375,
-0.040069580078125,
-0.005756378173828125,
-0.03619384765625,
0.018341064453125,
-0.0144805908203125,
0.0190887451171875,
-0.005718231201171875,
0.00791168212890625,
-0.032073974609375,
-0.01451873779296875,
0.00469970703125
]
|
5e3b177084fd5a53764caa8fb216a39f053006f8 | Wordpress Stackexchange
Q: Hiding Parent Theme I am using the child theme and have renamed it to the new theme name. However, the parent theme is still viewable in the admin area with the original theme name. How do I hide the parent theme? Thanks.
A: There is a filter called wp_prepare_themes_for_js in wp-admin/includes/theme.php in the wp_prepare_themes_for_js() function, which is called by wp-admin/themes.php to populate the theme set. That filter will allow you to remove themes from the list. Of course, you have to know the theme name.
function kill_theme_wpse_188906($themes) {
unset($themes['twentyten']);
return $themes;
}
add_filter('wp_prepare_themes_for_js','kill_theme_wpse_188906');
| Q: Hiding Parent Theme I am using the child theme and have renamed it to the new theme name. However, the parent theme is still viewable in the admin area with the original theme name. How do I hide the parent theme? Thanks.
A: There is a filter called wp_prepare_themes_for_js in wp-admin/includes/theme.php in the wp_prepare_themes_for_js() function, which is called by wp-admin/themes.php to populate the theme set. That filter will allow you to remove themes from the list. Of course, you have to know the theme name.
function kill_theme_wpse_188906($themes) {
unset($themes['twentyten']);
return $themes;
}
add_filter('wp_prepare_themes_for_js','kill_theme_wpse_188906');
| wordpress | {
"language": "en",
"length": 94,
"provenance": "stackexchange_00019.jsonl.gz:455738",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/188906"
} | [
0.0015420913696289062,
0.00995635986328125,
-0.022430419921875,
0.006103515625,
0.0008692741394042969,
-0.031524658203125,
0.0149993896484375,
-0.036468505859375,
-0.037109375,
0.00299835205078125,
0.0084075927734375,
-0.0259552001953125,
-0.016754150390625,
-0.0482177734375,
0.00583648681640625,
-0.057098388671875,
0.0307159423828125,
-0.031494140625,
0.01009368896484375,
-0.002292633056640625,
-0.0140228271484375,
0.006877899169921875,
0.0210418701171875,
0.0306854248046875,
0.0277252197265625,
-0.03955078125,
0.08026123046875,
-0.036163330078125,
0.0277252197265625,
-0.03173828125,
0.02587890625,
0.005222320556640625,
-0.0223388671875,
0.03985595703125,
0.02081298828125,
-0.0233917236328125,
0.00815582275390625,
0.0251312255859375,
0.037353515625,
0.006381988525390625,
-0.01256561279296875,
0.01442718505859375,
-0.031097412109375,
0.0138092041015625,
-0.033172607421875,
-0.06060791015625,
-0.001750946044921875,
-0.0265045166015625,
-0.01198577880859375,
0.0012216567993164062,
0.04693603515625,
0.0016841888427734375,
0.062744140625,
-0.027130126953125,
-0.01230621337890625,
-0.0009589195251464844,
-0.005710601806640625,
0.02978515625,
0.039031982421875,
-0.003101348876953125,
-0.049591064453125,
0.00420379638671875,
0.0031909942626953125,
-0.047210693359375,
0.0283203125,
0.0230560302734375,
-0.013671875,
0.0092010498046875,
-0.06988525390625,
0.0404052734375,
0.0440673828125,
-0.06988525390625,
0.0222930908203125,
-0.037078857421875,
0.0028820037841796875,
-0.0080413818359375,
-0.015350341796875,
-0.0143585205078125,
0.0288848876953125,
-0.00807952880859375,
-0.0007367134094238281,
-0.0177001953125,
-0.0811767578125,
-0.00469207763671875,
0.015411376953125,
0.020904541015625,
-0.01270294189453125,
-0.0171966552734375,
-0.0416259765625,
0.0264434814453125,
-0.0308685302734375,
-0.046905517578125,
-0.0016164779663085938,
0.047943115234375,
0.019378662109375,
0.010650634765625,
0.042266845703125,
0.060760498046875,
-0.0323486328125,
-0.0245513916015625,
-0.023101806640625,
-0.0240478515625,
-0.032867431640625,
-0.00875091552734375,
-0.0126953125,
0.023162841796875,
0.020660400390625,
0.017303466796875,
0.01163482666015625,
0.0131988525390625,
-0.00583648681640625,
0.01216888427734375,
-0.01528167724609375,
-0.01678466796875,
-0.0364990234375,
0.046142578125,
-0.01549530029296875,
-0.0208740234375,
-0.005451202392578125,
0.031158447265625,
-0.0081024169921875,
-0.0215301513671875,
-0.001529693603515625,
0.0229949951171875,
0.012786865234375,
-0.0099945068359375,
-0.053863525390625,
0.020721435546875,
0.01221466064453125,
0.015380859375,
-0.0499267578125,
-0.01448822021484375,
0.07489013671875,
0.051910400390625,
0.048370361328125,
-0.035400390625,
0.0204620361328125,
0.03875732421875,
0.021453857421875,
-0.0147857666015625,
0.029266357421875,
-0.034088134765625,
-0.03472900390625,
0.0226287841796875,
-0.01495361328125,
0.0182037353515625,
-0.01110076904296875,
0.01739501953125,
0.0200958251953125,
-0.03948974609375,
0.0019626617431640625,
-0.06634521484375,
0.057586669921875,
-0.0011510848999023438,
-0.013397216796875,
-0.0082855224609375,
0.03839111328125,
-0.029022216796875,
-0.04180908203125,
-0.05279541015625,
0.0053863525390625,
0.00905609130859375,
0.040557861328125,
0.0113983154296875,
-0.0112152099609375,
-0.00279998779296875,
-0.025482177734375,
-0.00988006591796875,
0.0294036865234375,
-0.040252685546875,
0.06463623046875,
-0.0521240234375,
-0.017822265625,
0.0171661376953125,
0.0190887451171875,
0.04742431640625,
-0.004703521728515625,
0.00958251953125,
0.0236053466796875,
0.00844573974609375,
0.013580322265625,
-0.02825927734375,
0.03289794921875,
0.00861358642578125,
-0.0509033203125,
0.01299285888671875,
0.02581787109375,
0.00865936279296875,
-0.0038661956787109375,
-0.0002639293670654297,
0.06671142578125,
0.03607177734375,
0.0054473876953125,
-0.01800537109375,
0.0253753662109375,
-0.00658416748046875,
-0.0236663818359375,
0.0012760162353515625,
-0.0092620849609375,
-0.00524139404296875,
-0.002483367919921875,
0.022308349609375,
0.01528167724609375,
-0.001331329345703125,
-0.04620361328125,
0.0374755859375,
-0.0323486328125,
0.048858642578125,
0.001678466796875,
0.04388427734375,
0.004207611083984375,
0.00643157958984375,
-0.00982666015625,
-0.05450439453125,
-0.007785797119140625,
0.00841522216796875,
-0.0004754066467285156,
0.00913238525390625,
0.00963592529296875,
-0.006587982177734375,
0.0238800048828125,
0.01483154296875,
0.01436614990234375,
0.0121612548828125,
0.055206298828125,
-0.008758544921875,
-0.016510009765625,
-0.01544952392578125,
0.036712646484375,
0.00457000732421875,
-0.038604736328125,
0.047393798828125,
0.041595458984375,
0.01529693603515625,
-0.0304718017578125,
-0.0068817138671875,
0.005290985107421875,
-0.058441162109375,
-0.00714874267578125,
0.05096435546875,
0.03253173828125,
0.039825439453125,
-0.0204010009765625,
-0.028900146484375,
0.09661865234375,
-0.06829833984375,
-0.03802490234375,
0.01416778564453125,
0.03338623046875,
0.0240325927734375,
0.01580810546875,
-0.04681396484375,
0.02874755859375,
-0.050048828125,
0.0213470458984375,
0.0211944580078125,
-0.00664520263671875,
-0.003631591796875,
0.00214385986328125,
-0.0207061767578125,
0.0197601318359375,
-0.008453369140625,
-0.0367431640625,
0.0167083740234375,
0.04534912109375,
0.0118255615234375,
0.00970458984375,
-0.0045013427734375,
-0.043670654296875,
0.0274200439453125,
0.030914306640625,
-0.018402099609375,
0.006824493408203125,
0.0229339599609375,
0.0131683349609375,
-0.016082763671875,
-0.01226806640625,
-0.00009083747863769531,
0.0020294189453125,
0.007598876953125,
-0.0004451274871826172,
0.00588226318359375,
-0.0180816650390625,
-0.005443572998046875,
-0.012969970703125,
-0.0049896240234375,
0.0290985107421875,
0.050872802734375,
0.030364990234375,
0.018218994140625,
0.00582122802734375,
0.0711669921875,
0.0113677978515625,
0.05230712890625,
0.0200042724609375,
0.01186370849609375,
-0.001857757568359375,
-0.01265716552734375,
0.03399658203125,
-0.014373779296875,
-0.00963592529296875,
0.0399169921875,
-0.0016908645629882812,
0.004974365234375,
0.026458740234375,
-0.015869140625,
0.04541015625,
0.0211944580078125,
0.01018524169921875,
0.0213470458984375,
-0.06036376953125,
-0.00812530517578125,
0.0222625732421875,
0.0006847381591796875,
-0.006175994873046875,
-0.0308990478515625,
-0.0243682861328125,
0.0091400146484375,
-0.041748046875,
0.01495361328125,
-0.053375244140625,
-0.05023193359375,
-0.018341064453125,
-0.0035953521728515625,
-0.02587890625,
0.0152130126953125,
0.006317138671875,
0.0116119384765625,
0.01500701904296875,
-0.05279541015625,
-0.04425048828125,
-0.0645751953125,
-0.05059814453125,
-0.0182342529296875,
-0.0056915283203125,
-0.00937652587890625,
-0.007717132568359375,
0.062255859375,
0.00640106201171875,
-0.042510986328125,
0.01157379150390625,
0.042144775390625,
0.0191497802734375,
0.0340576171875,
0.01448822021484375,
-0.032806396484375,
-0.00608062744140625,
0.016754150390625,
-0.01267242431640625,
-0.00995635986328125,
-0.002536773681640625,
-0.033355712890625,
-0.0377197265625,
-0.01580810546875,
-0.0024356842041015625,
0.00376129150390625,
0.0303192138671875,
-0.01499176025390625,
0.01023101806640625,
-0.054473876953125,
-0.0513916015625,
-0.02490234375,
-0.06982421875,
0.033905029296875,
0.0255584716796875,
0.022003173828125,
0.012054443359375,
0.00717926025390625,
0.041412353515625,
0.005191802978515625,
0.019317626953125,
-0.01385498046875,
0.041656494140625,
0.020599365234375,
0.0369873046875,
-0.049835205078125,
0.01332855224609375,
-0.027435302734375,
0.0042724609375,
-0.00379180908203125,
0.00731658935546875,
0.0072021484375,
-0.0048370361328125,
0.005855560302734375,
-0.063720703125,
0.039886474609375,
-0.003910064697265625,
0.0006203651428222656,
-0.039703369140625,
-0.02264404296875,
-0.016387939453125,
0.08062744140625,
-0.06451416015625,
-0.00417327880859375,
0.006160736083984375,
0.013275146484375,
-0.0184326171875,
-0.00872039794921875,
-0.06134033203125,
-0.014617919921875,
-0.12286376953125,
0.0173492431640625,
-0.0006709098815917969,
-0.02850341796875,
-0.01099395751953125,
0.0234222412109375,
-0.0540771484375,
-0.046112060546875,
0.037445068359375,
0.0017375946044921875,
-0.01209259033203125,
0.002399444580078125,
-0.01245880126953125,
-0.035980224609375,
-0.020111083984375,
0.0166168212890625,
-0.051055908203125,
-0.003688812255859375,
-0.0309906005859375,
0.023529052734375,
0.0123291015625,
0.0006313323974609375,
-0.0209503173828125,
0.0267181396484375,
0.043853759765625,
0.07379150390625,
-0.035736083984375,
-0.039306640625,
-0.006206512451171875,
0.0086822509765625,
0.006805419921875,
0.0011463165283203125,
-0.028228759765625,
-0.035308837890625,
-0.035736083984375,
-0.0248870849609375,
0.00030159950256347656,
-0.00539398193359375,
0.053192138671875,
-0.020751953125,
-0.01092529296875,
-0.0494384765625,
-0.07342529296875,
-0.02392578125,
-0.028106689453125,
-0.01447296142578125,
-0.0321044921875,
-0.02850341796875,
0.01256561279296875,
-0.00563812255859375,
-0.022918701171875,
0.0131072998046875,
0.05926513671875,
0.0307464599609375,
-0.0161285400390625,
-0.0478515625,
-0.017059326171875,
0.038055419921875,
0.03466796875,
0.019775390625,
-0.0162200927734375,
-0.03851318359375,
0.0771484375,
0.0204010009765625,
-0.0263671875,
0.02471923828125,
0.07489013671875,
-0.0038013458251953125,
-0.034637451171875,
0.0298309326171875,
-0.019927978515625,
-0.0086669921875,
-0.007724761962890625,
-0.01261138916015625,
-0.01442718505859375,
-0.008331298828125,
0.03656005859375,
0.0098876953125,
0.00662994384765625,
-0.053436279296875,
-0.04150390625,
0.020050048828125,
-0.006183624267578125,
-0.00917816162109375,
0.003849029541015625,
0.01178741455078125,
0.006622314453125,
0.0013227462768554688,
0.0240478515625,
-0.056793212890625,
0.0298919677734375,
-0.06549072265625,
0.046722412109375,
-0.0416259765625,
-0.020172119140625,
-0.027191162109375,
-0.009490966796875,
0.0552978515625,
0.01055145263671875,
-0.0257568359375,
-0.015869140625,
-0.00444793701171875,
0.038787841796875,
0.00930023193359375,
0.005680084228515625,
0.002223968505859375,
0.0115509033203125,
0.0005016326904296875,
-0.005466461181640625,
0.0232391357421875,
0.0147857666015625,
-0.02056884765625,
-0.003711700439453125,
0.01531982421875,
-0.0211334228515625,
0.055816650390625,
0.0184173583984375,
0.01235198974609375,
0.031890869140625,
-0.0256195068359375,
-0.01309967041015625,
-0.0067596435546875,
0.01464080810546875,
0.01849365234375,
-0.01971435546875,
0.045196533203125,
-0.039306640625,
0.068115234375,
-0.016265869140625,
-0.0269927978515625,
0.04656982421875,
0.031768798828125,
0.0238494873046875,
0.016021728515625,
-0.01462554931640625,
0.01513671875,
-0.0172119140625,
-0.0012054443359375,
-0.03497314453125,
-0.02716064453125,
-0.0211639404296875,
0.003749847412109375,
0.03607177734375,
0.0211029052734375,
-0.0243682861328125,
-0.01849365234375,
-0.068359375,
-0.04571533203125,
0.07568359375,
-0.08172607421875,
0.0229034423828125,
0.0190277099609375,
-0.04754638671875,
-0.002117156982421875,
0.01200103759765625,
-0.07489013671875,
-0.060638427734375,
-0.0013332366943359375,
-0.00832366943359375,
0.02325439453125,
0.01136016845703125,
0.035736083984375,
-0.026580810546875,
-0.027008056640625,
0.00885772705078125,
-0.0193023681640625,
0.08355712890625,
0.0302734375,
-0.07916259765625,
0.004985809326171875,
-0.056854248046875,
-0.0017223358154296875,
-0.060150146484375,
-0.044921875,
-0.041778564453125,
0.0306549072265625,
-0.028167724609375,
-0.0122833251953125,
-0.018341064453125,
-0.003269195556640625,
-0.006313323974609375,
0.041839599609375,
0.00861358642578125,
0.009490966796875,
-0.01198577880859375,
0.0823974609375,
-0.031280517578125,
0.019073486328125,
0.006946563720703125,
0.03021240234375,
-0.016571044921875,
0.0017938613891601562,
0.0146484375,
-0.002895355224609375,
-0.01305389404296875,
-0.00408172607421875,
-0.015869140625,
-0.032470703125,
0.03466796875,
-0.00695037841796875,
0.03912353515625,
-0.01241302490234375,
-0.0022220611572265625,
-0.0292205810546875,
0.0048675537109375,
-0.0399169921875,
0.05303955078125,
-0.029388427734375,
-0.0201263427734375,
-0.0133819580078125,
0.00348663330078125,
-0.025238037109375,
0.0237274169921875,
-0.00457000732421875,
0.0045318603515625,
0.035675048828125,
-0.0250701904296875,
0.06524658203125,
0.037353515625,
-0.0301361083984375,
0.0226898193359375,
-0.0009751319885253906,
0.00641632080078125,
0.01287841796875,
0.0146331787109375,
-0.046051025390625,
-0.0024089813232421875,
0.0313720703125,
0.0199127197265625,
0.003459930419921875,
0.040130615234375,
-0.0127105712890625,
-0.03265380859375,
0.032623291015625,
0.021942138671875,
-0.04443359375,
-0.0158843994140625,
-0.019989013671875,
0.007061004638671875,
0.0019588470458984375,
0.034515380859375,
0.00856781005859375,
-0.00258636474609375,
-0.0333251953125,
-0.0261077880859375,
0.005924224853515625,
0.00572967529296875,
-0.0087432861328125,
-0.01708984375,
-0.031005859375,
0.0159912109375,
0.009063720703125,
-0.01983642578125,
0.029876708984375,
0.012847900390625,
0.007419586181640625,
-0.0159912109375,
-0.0074005126953125,
0.0255889892578125,
-0.034942626953125,
-0.0673828125,
0.0010805130004882812,
-0.0197906494140625,
-0.0009055137634277344,
0.010711669921875,
0.034332275390625,
-0.04034423828125,
0.05914306640625,
-0.04632568359375,
0.0521240234375,
0.0231781005859375,
0.0003535747528076172,
-0.0160369873046875,
0.01074981689453125,
0.049774169921875,
-0.023895263671875,
-0.059722900390625,
0.0126495361328125,
-0.08172607421875,
0.003589630126953125,
-0.011138916015625,
0.010528564453125,
0.06170654296875,
0.00797271728515625,
-0.031829833984375,
0.04095458984375,
0.040069580078125,
-0.0264434814453125,
0.0029811859130859375,
0.029754638671875,
-0.0188446044921875,
0.00879669189453125,
0.0016279220581054688,
0.0086517333984375,
0.0077362060546875,
-0.0069427490234375,
-0.0648193359375,
0.10809326171875,
-0.02593994140625,
0.031494140625,
0.01355743408203125,
0.04449462890625,
-0.0205841064453125,
0.005218505859375,
-0.0276641845703125,
0.050445556640625,
0.0175933837890625,
0.039276123046875,
-0.0241241455078125,
-0.006450653076171875,
0.007965087890625,
0.01548004150390625,
0.01200103759765625,
-0.0106201171875,
0.00286865234375,
-0.00439453125,
0.0631103515625,
0.0421142578125,
0.00910186767578125,
0.0207977294921875,
-0.0201263427734375,
0.00399017333984375,
-0.01617431640625,
-0.0037021636962890625,
0.02130126953125,
-0.0178985595703125,
-0.07977294921875,
0.00931549072265625,
0.01458740234375,
0.0149993896484375,
0.0196685791015625,
-0.00572967529296875,
-0.030120849609375,
0.01311492919921875,
0.0328369140625,
-0.049957275390625,
0.01177978515625,
-0.0141143798828125,
0.016510009765625,
-0.07623291015625,
-0.0262451171875,
-0.0210113525390625,
0.032257080078125,
0.00844573974609375,
0.018585205078125,
0.00311279296875,
0.03076171875,
-0.055694580078125,
-0.03265380859375,
0.01256561279296875,
0.030914306640625,
-0.08477783203125,
-0.0093994140625,
0.021453857421875,
0.0306243896484375,
-0.007038116455078125,
0.027496337890625,
-0.01031494140625,
-0.00756072998046875,
-0.01505279541015625,
-0.045867919921875,
0.013031005859375,
-0.01094818115234375,
-0.013885498046875,
0.004428863525390625,
-0.004123687744140625,
0.015472412109375,
0.0268707275390625,
-0.0181884765625,
-0.00859832763671875,
0.050079345703125,
0.034576416015625,
0.018524169921875,
0.03790283203125,
-0.043731689453125,
-0.0218505859375,
-0.0278167724609375,
-0.035552978515625,
0.0240325927734375,
0.0472412109375,
0.044158935546875,
0.037322998046875,
0.001800537109375,
-0.0301666259765625,
-0.0087738037109375,
-0.0279541015625,
-0.00313568115234375,
0.01715087890625,
-0.052276611328125,
0.006580352783203125,
0.0287322998046875,
0.034210205078125,
0.0193328857421875,
0.022613525390625,
0.052886962890625,
0.0254058837890625,
-0.05133056640625,
-0.01702880859375,
0.00795745849609375,
-0.03143310546875,
0.0457763671875,
-0.023651123046875,
0.031890869140625,
-0.01381683349609375,
-0.01314544677734375,
-0.05352783203125,
0.04034423828125,
0.0162200927734375,
-0.01146697998046875,
0.02703857421875,
-0.0025539398193359375,
-0.0246124267578125,
0.011566162109375,
-0.00678253173828125,
0.0406494140625,
0.01190948486328125,
-0.09124755859375,
-0.0251922607421875,
-0.00907135009765625,
0.003810882568359375,
0.028167724609375,
0.0223846435546875,
-0.030517578125,
0.0467529296875,
0.03521728515625,
-0.0237884521484375,
-0.034515380859375,
0.030242919921875,
0.0196685791015625,
-0.01461029052734375,
0.006008148193359375,
0.00862884521484375,
-0.053985595703125,
-0.03839111328125,
-0.03228759765625,
0.041778564453125,
0.0185699462890625,
0.06109619140625,
-0.016510009765625,
0.0311126708984375,
-0.0316162109375,
0.01861572265625,
-0.050750732421875,
-0.046112060546875,
0.0654296875,
-0.0201873779296875,
-0.018157958984375,
0.003208160400390625,
-0.081787109375,
-0.0009870529174804688,
0.0364990234375,
-0.00206756591796875,
0.040802001953125,
-0.01316070556640625,
0.017425537109375,
-0.04730224609375,
0.004825592041015625,
-0.014617919921875,
-0.035736083984375,
-0.038299560546875,
-0.0003447532653808594,
0.01445770263671875,
0.0095977783203125,
-0.032135009765625,
-0.010101318359375,
0.0289306640625,
-0.02142333984375,
0.027099609375,
0.0236053466796875,
0.0191192626953125,
0.032440185546875,
-0.0170745849609375,
-0.0865478515625,
0.01427459716796875,
-0.0029296875,
0.0029964447021484375,
0.0026493072509765625,
0.09521484375,
0.005298614501953125,
-0.036773681640625,
-0.01129913330078125,
0.0187225341796875,
0.00222015380859375,
-0.044769287109375,
0.004425048828125,
0.0230865478515625,
-0.0211944580078125,
0.03216552734375,
-0.0177459716796875,
-0.0196075439453125,
-0.03253173828125,
-0.0059356689453125,
0.0257720947265625,
-0.0161285400390625,
-0.032196044921875,
-0.042510986328125,
0.0244598388671875,
0.08563232421875,
0.031890869140625,
-0.0731201171875,
0.028106689453125,
-0.037261962890625,
0.0704345703125,
0.048004150390625,
0.04364013671875,
-0.00557708740234375,
-0.006580352783203125,
-0.031707763671875,
-0.01751708984375,
-0.019012451171875,
0.033477783203125,
-0.0118408203125,
-0.0129241943359375,
0.003459930419921875,
0.00724029541015625,
0.03717041015625,
-0.0145416259765625,
-0.031219482421875,
0.039886474609375,
-0.0267333984375,
-0.03759765625,
-0.033050537109375,
0.008636474609375,
0.0037975311279296875,
-0.006847381591796875,
0.027313232421875,
-0.0253448486328125,
-0.0494384765625,
-0.039825439453125,
-0.00011390447616577148,
0.0088653564453125,
-0.045257568359375,
-0.055328369140625,
0.031341552734375,
-0.0017595291137695312,
-0.0305023193359375,
-0.00984954833984375,
0.019989013671875,
-0.0193023681640625,
0.01271820068359375,
0.0216064453125,
-0.046478271484375,
0.0328369140625,
0.04144287109375,
-0.00403594970703125,
0.050079345703125,
-0.035797119140625,
0.004512786865234375,
-0.0300445556640625,
0.016326904296875,
0.00586700439453125,
-0.004520416259765625,
-0.0178375244140625,
0.0197906494140625,
0.0143280029296875,
0.041839599609375,
-0.007602691650390625,
0.026123046875,
0.0116119384765625,
0.0025501251220703125,
-0.01250457763671875,
-0.03863525390625,
-0.0177154541015625,
-0.0228729248046875,
0.054229736328125,
0.0256805419921875,
0.00708770751953125,
-0.00763702392578125,
-0.07025146484375,
-0.053558349609375,
-0.0146026611328125,
0.009124755859375,
0.03564453125,
-0.10382080078125,
0.020355224609375,
0.0682373046875,
-0.00476837158203125,
-0.00585174560546875,
-0.02154541015625,
-0.029693603515625,
-0.0244903564453125,
-0.025787353515625,
0.0180511474609375,
-0.0633544921875,
-0.0199432373046875,
0.032958984375,
-0.0148162841796875,
0.0016307830810546875,
-0.00656890869140625,
0.026458740234375,
0.0241851806640625,
0.0254058837890625,
-0.0098114013671875,
0.00836944580078125,
-0.0135955810546875,
0.034393310546875,
-0.002468109130859375,
0.0198516845703125,
-0.038421630859375,
-0.0053558349609375,
-0.01397705078125,
0.01312255859375,
0.006641387939453125,
-0.00019812583923339844,
-0.025787353515625,
0.06549072265625,
0.0185394287109375,
0.044586181640625,
-0.0276947021484375,
0.0830078125,
-0.01511383056640625,
0.033905029296875,
-0.010467529296875,
0.0170440673828125,
0.0190277099609375,
-0.0067138671875,
0.0106658935546875,
-0.01373291015625,
0.02081298828125,
-0.037872314453125,
0.0276031494140625,
-0.0400390625,
0.00133514404296875,
0.02276611328125
]
|
24e976d816177f0fe502d7f8174a27d6a9c32a3c | Wordpress Stackexchange
Q: How does wordpress calculate the page depth? When using functions such as wp_list_pages(), WordPress gives you the depth option. How is it calculated?
Is it stored somewhere in the DB? (I couldn't find it).
Or is it calculated in a loop checking post parents?
What's strange is that wp_list_pages() offer the parameter depth but that function is based of get_pages() which doesn't have that same option available.
A: Ok, lets break it down, all the links are going to be to the source code.
wp_list_pages() only uses get_pages() to (sic!) get pages, walk_page_tree() does the hierarchical structuring inside it. The further course of the process goes Walker_Page - and the generic Walker of course -, unless a custom walker is used. Inside walk_page_tree() you will see, the walkers walk method is called, which subsequently calls the display_element method. Mainly in the display_element, but also in the walk, method you find the handling of the depth.
To make it short: the depth is handled by iterating, display_element calls itself until the end or the given depth parameter.
| Q: How does wordpress calculate the page depth? When using functions such as wp_list_pages(), WordPress gives you the depth option. How is it calculated?
Is it stored somewhere in the DB? (I couldn't find it).
Or is it calculated in a loop checking post parents?
What's strange is that wp_list_pages() offer the parameter depth but that function is based of get_pages() which doesn't have that same option available.
A: Ok, lets break it down, all the links are going to be to the source code.
wp_list_pages() only uses get_pages() to (sic!) get pages, walk_page_tree() does the hierarchical structuring inside it. The further course of the process goes Walker_Page - and the generic Walker of course -, unless a custom walker is used. Inside walk_page_tree() you will see, the walkers walk method is called, which subsequently calls the display_element method. Mainly in the display_element, but also in the walk, method you find the handling of the depth.
To make it short: the depth is handled by iterating, display_element calls itself until the end or the given depth parameter.
| wordpress | {
"language": "en",
"length": 177,
"provenance": "stackexchange_00019.jsonl.gz:455773",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/189013"
} | [
0.0091400146484375,
-0.012847900390625,
-0.0228271484375,
-0.0234375,
-0.01334381103515625,
-0.029052734375,
0.0182647705078125,
0.01371002197265625,
0.0160980224609375,
-0.01416778564453125,
-0.0197906494140625,
-0.03167724609375,
-0.049163818359375,
-0.0277862548828125,
-0.0228729248046875,
-0.067626953125,
0.046783447265625,
-0.0181121826171875,
0.046295166015625,
0.01540374755859375,
-0.01328277587890625,
0.0233001708984375,
0.056793212890625,
0.055816650390625,
0.03997802734375,
-0.0180511474609375,
0.045166015625,
-0.051300048828125,
0.03143310546875,
-0.0467529296875,
0.016448974609375,
0.006336212158203125,
0.021209716796875,
-0.047515869140625,
0.06683349609375,
0.0213623046875,
-0.0035419464111328125,
-0.023468017578125,
0.028900146484375,
-0.00970458984375,
-0.0023784637451171875,
0.0193939208984375,
0.004138946533203125,
-0.034423828125,
-0.03070068359375,
-0.031524658203125,
-0.003559112548828125,
-0.0207977294921875,
0.02239990234375,
-0.01690673828125,
0.021820068359375,
0.003326416015625,
0.027313232421875,
-0.00492095947265625,
-0.0151214599609375,
-0.005184173583984375,
0.0797119140625,
-0.04119873046875,
0.0247650146484375,
-0.0672607421875,
-0.042999267578125,
0.026763916015625,
0.044158935546875,
0.01165771484375,
-0.01532745361328125,
0.0014276504516601562,
-0.01546478271484375,
0.02301025390625,
-0.0297698974609375,
-0.03692626953125,
0.01169586181640625,
-0.021575927734375,
-0.02423095703125,
0.04400634765625,
-0.0303497314453125,
-0.036865234375,
0.0330810546875,
-0.017852783203125,
0.0103302001953125,
0.048187255859375,
-0.0204925537109375,
0.01215362548828125,
-0.029296875,
0.00028014183044433594,
0.014312744140625,
0.05181884765625,
-0.02618408203125,
-0.0183868408203125,
-0.0311737060546875,
-0.032073974609375,
-0.0291290283203125,
0.03204345703125,
-0.026947021484375,
-0.0364990234375,
-0.0452880859375,
-0.0025787353515625,
0.0151824951171875,
0.0126800537109375,
0.0004210472106933594,
0.032745361328125,
0.003543853759765625,
-0.042694091796875,
0.06854248046875,
-0.0308074951171875,
0.020965576171875,
0.020233154296875,
-0.0233917236328125,
0.0012607574462890625,
0.05853271484375,
0.0291748046875,
0.000377655029296875,
0.023956298828125,
0.00247955322265625,
-0.048919677734375,
0.0093536376953125,
0.021759033203125,
-0.025421142578125,
0.0386962890625,
0.0212860107421875,
-0.0029888153076171875,
-0.031463623046875,
-0.0122528076171875,
0.003894805908203125,
-0.00844573974609375,
0.03558349609375,
0.0117340087890625,
-0.0024242401123046875,
-0.0070953369140625,
0.07244873046875,
0.01181793212890625,
-0.038543701171875,
0.0198974609375,
0.056427001953125,
-0.033599853515625,
-0.0206756591796875,
-0.01367950439453125,
-0.0149078369140625,
-0.0279083251953125,
-0.033935546875,
0.033538818359375,
-0.031463623046875,
-0.062042236328125,
-0.0093841552734375,
-0.0338134765625,
-0.003452301025390625,
-0.0012979507446289062,
0.0167388916015625,
0.0301055908203125,
0.004932403564453125,
-0.03533935546875,
0.0145263671875,
0.01332855224609375,
0.006893157958984375,
0.006317138671875,
0.0022945404052734375,
-0.026580810546875,
0.00446319580078125,
-0.0248260498046875,
0.00894927978515625,
-0.023956298828125,
-0.0252532958984375,
-0.00965118408203125,
0.01922607421875,
-0.03961181640625,
-0.0299835205078125,
-0.00943756103515625,
-0.03668212890625,
-0.0035915374755859375,
0.027008056640625,
-0.01183319091796875,
0.0543212890625,
-0.04217529296875,
-0.006855010986328125,
0.01270294189453125,
0.01523590087890625,
0.023193359375,
-0.0305938720703125,
0.0379638671875,
0.011810302734375,
0.0153656005859375,
-0.01079559326171875,
-0.04913330078125,
0.04437255859375,
-0.0035343170166015625,
-0.010589599609375,
0.037994384765625,
-0.00817108154296875,
0.031951904296875,
-0.002475738525390625,
0.01995849609375,
-0.01523590087890625,
0.0257110595703125,
-0.066650390625,
0.05181884765625,
-0.0219268798828125,
-0.004062652587890625,
-0.00592041015625,
0.01468658447265625,
-0.017242431640625,
0.0011453628540039062,
-0.01450347900390625,
-0.004978179931640625,
0.007434844970703125,
0.01617431640625,
-0.0016431808471679688,
0.01100921630859375,
-0.00739288330078125,
0.017822265625,
0.017364501953125,
0.018218994140625,
0.01189422607421875,
0.01215362548828125,
-0.034149169921875,
0.010528564453125,
-0.021820068359375,
0.0131988525390625,
-0.0086517333984375,
-0.02093505859375,
-0.0197906494140625,
-0.0281219482421875,
-0.033355712890625,
0.0106658935546875,
-0.050994873046875,
0.037567138671875,
0.0665283203125,
0.0022678375244140625,
-0.0201873779296875,
-0.0114898681640625,
0.0384521484375,
0.0260009765625,
-0.05853271484375,
0.0195159912109375,
0.04315185546875,
0.04095458984375,
-0.0237884521484375,
-0.04248046875,
-0.02032470703125,
-0.078125,
0.0244293212890625,
0.06463623046875,
0.04339599609375,
0.058441162109375,
-0.006748199462890625,
-0.023895263671875,
0.034271240234375,
-0.079345703125,
-0.003276824951171875,
-0.0121307373046875,
-0.008575439453125,
0.055908203125,
0.0129241943359375,
0.0095367431640625,
-0.0007233619689941406,
-0.0235443115234375,
-0.0230255126953125,
0.0312042236328125,
-0.0186614990234375,
0.01495361328125,
0.017242431640625,
-0.0244293212890625,
0.0045623779296875,
-0.027313232421875,
0.0150909423828125,
-0.0126800537109375,
-0.00922393798828125,
-0.004970550537109375,
0.0252838134765625,
0.0194854736328125,
0.01214599609375,
-0.02880859375,
0.0136566162109375,
0.01094818115234375,
0.01187896728515625,
-0.039794921875,
-0.03594970703125,
-0.016204833984375,
-0.015899658203125,
0.029052734375,
0.015777587890625,
-0.03863525390625,
-0.0027790069580078125,
0.07183837890625,
-0.034271240234375,
-0.01508331298828125,
-0.058319091796875,
-0.059417724609375,
-0.00539398193359375,
0.052459716796875,
0.001651763916015625,
0.004241943359375,
0.0212554931640625,
0.04302978515625,
-0.0272674560546875,
0.049560546875,
0.0037860870361328125,
-0.005382537841796875,
0.0036411285400390625,
-0.036651611328125,
0.0205841064453125,
-0.029510498046875,
0.035125732421875,
0.057830810546875,
0.006969451904296875,
-0.03692626953125,
0.0169677734375,
0.00423431396484375,
0.024505615234375,
0.0010929107666015625,
-0.004718780517578125,
-0.01306915283203125,
-0.01116180419921875,
0.0146636962890625,
0.007598876953125,
0.0018587112426757812,
0.01528167724609375,
-0.0269775390625,
0.00007045269012451172,
0.0162353515625,
-0.0693359375,
-0.05462646484375,
-0.00983428955078125,
-0.1192626953125,
-0.0192413330078125,
0.004322052001953125,
-0.06463623046875,
0.01107025146484375,
0.039398193359375,
0.00034499168395996094,
-0.0298919677734375,
-0.049713134765625,
-0.07427978515625,
-0.1009521484375,
-0.075927734375,
-0.0167236328125,
-0.006862640380859375,
0.0230560302734375,
-0.004047393798828125,
0.047393798828125,
-0.0093841552734375,
-0.045867919921875,
-0.036834716796875,
0.06866455078125,
-0.0196380615234375,
-0.04736328125,
-0.016571044921875,
-0.031951904296875,
0.032867431640625,
0.0027904510498046875,
-0.06463623046875,
-0.016754150390625,
0.06353759765625,
-0.01910400390625,
-0.02081298828125,
-0.0160980224609375,
-0.007781982421875,
0.0223541259765625,
0.0209503173828125,
-0.017333984375,
0.0155792236328125,
-0.0380859375,
-0.042083740234375,
0.01309967041015625,
-0.038848876953125,
0.0154571533203125,
0.03704833984375,
-0.0258941650390625,
-0.0146942138671875,
0.0012874603271484375,
0.00945281982421875,
0.0003952980041503906,
0.00341796875,
-0.00711822509765625,
0.01702880859375,
0.0009741783142089844,
-0.002384185791015625,
-0.011871337890625,
0.068115234375,
0.015899658203125,
0.0093841552734375,
0.04119873046875,
0.0235595703125,
0.01120758056640625,
-0.0194854736328125,
-0.034942626953125,
-0.048370361328125,
0.042083740234375,
0.012298583984375,
-0.0150146484375,
0.010955810546875,
-0.02197265625,
0.0261688232421875,
0.061248779296875,
-0.0264892578125,
-0.02191162109375,
-0.0141754150390625,
0.029693603515625,
-0.035888671875,
-0.07958984375,
0.004375457763671875,
-0.0185546875,
-0.045989990234375,
0.0097808837890625,
-0.007598876953125,
-0.026580810546875,
-0.035919189453125,
0.04498291015625,
-0.034912109375,
-0.0262908935546875,
-0.00414276123046875,
-0.01611328125,
-0.017852783203125,
0.03472900390625,
-0.0250244140625,
0.0153045654296875,
0.02032470703125,
-0.042877197265625,
-0.042724609375,
-0.021881103515625,
0.0289306640625,
0.02886962890625,
-0.0146636962890625,
-0.03057861328125,
-0.0150604248046875,
0.040435791015625,
0.03204345703125,
0.0458984375,
0.019622802734375,
-0.01432037353515625,
0.031219482421875,
-0.0207977294921875,
0.03125,
-0.028900146484375,
-0.0208587646484375,
-0.042572021484375,
-0.01227569580078125,
0.031768798828125,
-0.020233154296875,
0.0005087852478027344,
-0.032684326171875,
0.003658294677734375,
-0.031951904296875,
-0.0210113525390625,
-0.0469970703125,
0.004413604736328125,
-0.01348876953125,
-0.00604248046875,
-0.04254150390625,
-0.05426025390625,
0.04388427734375,
0.0041046142578125,
-0.0242767333984375,
0.0020465850830078125,
0.087158203125,
0.017425537109375,
-0.041412353515625,
-0.07720947265625,
-0.0114898681640625,
0.00537872314453125,
-0.006870269775390625,
0.076171875,
0.043853759765625,
0.0199127197265625,
0.02215576171875,
-0.005962371826171875,
0.0013103485107421875,
0.0029010772705078125,
0.0452880859375,
0.011627197265625,
-0.0134429931640625,
0.00594329833984375,
-0.009002685546875,
-0.032257080078125,
0.053558349609375,
-0.0298614501953125,
0.01629638671875,
-0.024993896484375,
0.031982421875,
-0.0209808349609375,
-0.004180908203125,
-0.04351806640625,
-0.02093505859375,
0.0005445480346679688,
-0.00992584228515625,
0.05560302734375,
0.0196685791015625,
0.00946807861328125,
0.00994873046875,
0.01788330078125,
0.027313232421875,
0.021026611328125,
0.01187896728515625,
0.0035572052001953125,
0.05364990234375,
0.01157379150390625,
0.02838134765625,
0.007015228271484375,
-0.006259918212890625,
0.040740966796875,
0.00001990795135498047,
-0.067138671875,
0.04522705078125,
-0.01116180419921875,
-0.0203094482421875,
0.03948974609375,
-0.026275634765625,
0.037811279296875,
0.0321044921875,
-0.0284271240234375,
-0.00955963134765625,
-0.027587890625,
-0.018707275390625,
-0.05059814453125,
0.019622802734375,
0.006252288818359375,
-0.0160980224609375,
-0.031768798828125,
0.06890869140625,
0.030059814453125,
0.004467010498046875,
-0.0240020751953125,
-0.01513671875,
0.007076263427734375,
0.0212860107421875,
0.0364990234375,
-0.017730712890625,
0.01296234130859375,
-0.0110931396484375,
0.042449951171875,
-0.0211334228515625,
-0.052490234375,
0.0355224609375,
0.0328369140625,
-0.0096435546875,
0.037872314453125,
-0.01163482666015625,
0.0169677734375,
0.0079498291015625,
0.01229095458984375,
0.01142120361328125,
-0.02618408203125,
0.00653839111328125,
0.0113677978515625,
-0.00450897216796875,
-0.025054931640625,
-0.026092529296875,
0.01168060302734375,
-0.03399658203125,
0.030670166015625,
-0.0233917236328125,
0.01319122314453125,
-0.0005540847778320312,
-0.0149383544921875,
-0.085693359375,
-0.03790283203125,
0.037689208984375,
-0.048004150390625,
-0.004638671875,
-0.0128631591796875,
-0.0360107421875,
0.0016193389892578125,
-0.0011491775512695312,
0.0285491943359375,
-0.0034389495849609375,
-0.0506591796875,
0.0288848876953125,
0.0163726806640625,
0.029937744140625,
-0.01062774658203125,
-0.0015401840209960938,
-0.0211181640625,
-0.048675537109375,
-0.0278778076171875,
0.004711151123046875,
0.0056915283203125,
-0.0330810546875,
-0.001262664794921875,
-0.034515380859375,
-0.00923919677734375,
-0.007579803466796875,
0.0208282470703125,
-0.0102386474609375,
0.01666259765625,
-0.020355224609375,
-0.037384033203125,
0.01367950439453125,
0.0263214111328125,
-0.0221405029296875,
0.0489501953125,
0.02227783203125,
0.00751495361328125,
-0.0024547576904296875,
-0.047515869140625,
0.043670654296875,
-0.0214080810546875,
-0.035888671875,
-0.06103515625,
0.005828857421875,
-0.0204010009765625,
0.006622314453125,
-0.014984130859375,
0.034393310546875,
-0.005157470703125,
-0.0009412765502929688,
-0.0054931640625,
-0.01168060302734375,
-0.006626129150390625,
0.01494598388671875,
0.027984619140625,
0.00470733642578125,
0.0161590576171875,
0.00696563720703125,
-0.057464599609375,
0.0206146240234375,
0.027099609375,
0.02813720703125,
-0.002750396728515625,
-0.059051513671875,
0.0382080078125,
0.042816162109375,
0.0087738037109375,
0.021728515625,
-0.007045745849609375,
-0.008087158203125,
-0.00627899169921875,
0.022613525390625,
-0.0185699462890625,
-0.0205078125,
0.04852294921875,
0.01611328125,
-0.004917144775390625,
0.0259552001953125,
-0.023529052734375,
0.004688262939453125,
-0.00652313232421875,
0.03515625,
-0.006305694580078125,
0.0216217041015625,
0.0170440673828125,
-0.0149688720703125,
-0.0106658935546875,
0.0075836181640625,
0.0194549560546875,
-0.02069091796875,
-0.00664520263671875,
0.0201568603515625,
0.0010538101196289062,
-0.002071380615234375,
-0.01727294921875,
-0.019622802734375,
-0.0216522216796875,
0.021514892578125,
0.031463623046875,
0.038787841796875,
0.02178955078125,
-0.0283050537109375,
0.0618896484375,
-0.051177978515625,
0.0000028014183044433594,
-0.0067901611328125,
0.0088348388671875,
-0.037200927734375,
0.03961181640625,
-0.04510498046875,
0.04998779296875,
0.0413818359375,
-0.01201629638671875,
0.00449371337890625,
0.055877685546875,
-0.03460693359375,
0.02166748046875,
0.02947998046875,
-0.040924072265625,
0.00505828857421875,
-0.00440216064453125,
0.03338623046875,
-0.04034423828125,
-0.078125,
0.0038280487060546875,
-0.08380126953125,
0.0018053054809570312,
-0.011627197265625,
-0.037200927734375,
0.06988525390625,
-0.039337158203125,
-0.00833892822265625,
0.0175628662109375,
0.00347900390625,
0.0017595291137695312,
-0.01250457763671875,
0.03790283203125,
-0.026031494140625,
0.0021266937255859375,
0.01361846923828125,
0.016387939453125,
-0.01425933837890625,
-0.00543975830078125,
-0.035247802734375,
0.06787109375,
-0.03826904296875,
0.006641387939453125,
0.003299713134765625,
0.030487060546875,
0.01000213623046875,
0.029510498046875,
-0.042938232421875,
0.04779052734375,
0.00804901123046875,
0.073486328125,
-0.0789794921875,
-0.039794921875,
0.00627899169921875,
0.07916259765625,
-0.0164794921875,
-0.0023479461669921875,
-0.01953125,
-0.00896453857421875,
0.0478515625,
0.045806884765625,
0.030120849609375,
0.032012939453125,
0.0093994140625,
0.039764404296875,
0.060516357421875,
-0.070068359375,
0.0374755859375,
-0.050872802734375,
0.030548095703125,
0.014434814453125,
-0.0018186569213867188,
-0.0179595947265625,
-0.0117950439453125,
-0.031494140625,
-0.0128936767578125,
-0.0175628662109375,
-0.0170135498046875,
0.006504058837890625,
-0.030609130859375,
0.051666259765625,
0.019989013671875,
-0.058349609375,
-0.00893402099609375,
-0.05987548828125,
0.03839111328125,
-0.019744873046875,
0.056793212890625,
0.037872314453125,
0.0294952392578125,
0.055389404296875,
0.000885009765625,
0.0289764404296875,
0.0140533447265625,
-0.035125732421875,
0.04632568359375,
0.01213836669921875,
0.01552581787109375,
-0.054901123046875,
0.007503509521484375,
0.034912109375,
0.0621337890625,
-0.03973388671875,
-0.057373046875,
-0.006046295166015625,
-0.002635955810546875,
0.012481689453125,
0.006656646728515625,
0.031951904296875,
0.0166015625,
0.03851318359375,
0.007640838623046875,
-0.07696533203125,
-0.0016393661499023438,
0.01776123046875,
0.0011701583862304688,
-0.0296173095703125,
0.059661865234375,
-0.06903076171875,
-0.01183319091796875,
-0.040313720703125,
0.004047393798828125,
0.018035888671875,
0.0105438232421875,
0.050079345703125,
0.01215362548828125,
-0.0010051727294921875,
-0.01143646240234375,
-0.0022296905517578125,
0.0009756088256835938,
0.0094451904296875,
-0.0223236083984375,
-0.00489044189453125,
0.04058837890625,
0.0212554931640625,
0.0249481201171875,
0.0312347412109375,
0.0204925537109375,
-0.004634857177734375,
-0.01184844970703125,
0.00112152099609375,
0.037353515625,
-0.033172607421875,
-0.0159454345703125,
-0.023834228515625,
0.033203125,
0.052825927734375,
0.01044464111328125,
-0.014739990234375,
0.0131988525390625,
0.068359375,
0.0293121337890625,
0.0253448486328125,
0.0079803466796875,
-0.00733184814453125,
-0.00557708740234375,
0.004199981689453125,
0.059722900390625,
0.049560546875,
-0.07354736328125,
-0.0034580230712890625,
-0.040130615234375,
-0.020172119140625,
0.0364990234375,
0.033660888671875,
-0.01593017578125,
0.0149383544921875,
0.005519866943359375,
-0.0157623291015625,
0.006618499755859375,
0.0167236328125,
0.00015604496002197266,
0.008636474609375,
0.0187835693359375,
-0.000850677490234375,
-0.0242919921875,
-0.008819580078125,
-0.0267791748046875,
0.015289306640625,
0.03643798828125,
0.0980224609375,
-0.0289459228515625,
0.0311279296875,
0.035064697265625,
0.01031494140625,
0.01526641845703125,
-0.00597381591796875,
0.061920166015625,
0.0099639892578125,
0.01227569580078125,
-0.036468505859375,
-0.0589599609375,
0.020965576171875,
0.0005278587341308594,
-0.0010805130004882812,
0.00719451904296875,
-0.0335693359375,
0.020904541015625,
0.03363037109375,
0.00559234619140625,
-0.029388427734375,
-0.00830078125,
-0.021240234375,
-0.0298309326171875,
0.0263214111328125,
0.005023956298828125,
0.00858306884765625,
0.061431884765625,
0.0006999969482421875,
-0.047027587890625,
0.0517578125,
-0.08709716796875,
0.0633544921875,
0.0258026123046875,
0.0164947509765625,
-0.01503753662109375,
0.0202789306640625,
-0.008270263671875,
0.0084075927734375,
0.025665283203125,
-0.01129913330078125,
0.036407470703125,
-0.0732421875,
0.01526641845703125,
0.0095367431640625,
0.02777099609375,
-0.0182342529296875,
-0.004055023193359375,
0.0013914108276367188,
-0.007175445556640625,
0.015899658203125,
-0.04388427734375,
-0.0176849365234375,
-0.050994873046875,
0.007740020751953125,
0.0230865478515625,
-0.0035343170166015625,
0.0181732177734375,
-0.006805419921875,
0.00696563720703125,
0.0277252197265625,
0.0256195068359375,
-0.0535888671875,
0.0400390625,
-0.027099609375,
0.00994110107421875,
0.0210113525390625,
0.0130157470703125,
0.0101470947265625,
0.03369140625,
-0.02587890625,
0.0216064453125,
-0.0118865966796875,
-0.01702880859375,
0.005741119384765625,
0.0278167724609375,
0.0194091796875,
-0.0259857177734375,
0.01192474365234375,
0.06927490234375,
0.0296478271484375,
0.10223388671875,
-0.00677490234375,
-0.03375244140625,
-0.0011529922485351562,
-0.003509521484375,
0.035430908203125,
-0.039398193359375,
-0.007221221923828125,
-0.0236663818359375,
0.0002980232238769531,
-0.01226043701171875,
0.0181732177734375,
0.032806396484375,
-0.02923583984375,
-0.0653076171875,
-0.00409698486328125,
-0.0012826919555664062,
-0.04180908203125,
-0.056243896484375,
0.0248870849609375,
-0.016204833984375,
0.05401611328125,
0.0087890625,
-0.017242431640625,
0.01312255859375,
0.021514892578125,
0.01464080810546875,
0.06103515625,
0.000027358531951904297,
0.03338623046875,
-0.0404052734375,
0.0297698974609375,
0.0018444061279296875,
0.01546478271484375,
0.0160675048828125,
0.0004930496215820312,
0.024139404296875,
0.0289764404296875,
-0.052032470703125,
0.0224609375,
-0.0112152099609375,
0.0229644775390625,
0.0108489990234375,
-0.049652099609375,
-0.0009732246398925781,
-0.025726318359375,
0.043121337890625,
-0.020111083984375,
0.00733184814453125,
0.012237548828125,
-0.01430511474609375,
-0.06488037109375,
-0.0162811279296875,
-0.01474761962890625,
0.0113525390625,
-0.07373046875,
-0.0102996826171875,
0.04541015625,
-0.0207672119140625,
-0.016357421875,
-0.02197265625,
-0.033843994140625,
-0.006748199462890625,
-0.0182342529296875,
-0.00447845458984375,
0.0004799365997314453,
-0.0018892288208007812,
0.011383056640625,
-0.0262603759765625,
-0.0269622802734375,
0.004344940185546875,
0.01285552978515625,
-0.0202484130859375,
0.01003265380859375,
-0.047271728515625,
0.059478759765625,
-0.0325927734375,
0.00682830810546875,
-0.0247802734375,
0.0222015380859375,
-0.030426025390625,
0.049468994140625,
0.006748199462890625,
0.018096923828125,
-0.0177459716796875,
0.0113067626953125,
0.0029201507568359375,
0.0236358642578125,
-0.01318359375,
0.052520751953125,
0.004802703857421875,
0.12353515625,
0.01123809814453125,
0.0535888671875,
-0.006664276123046875,
-0.007175445556640625,
0.01152801513671875,
-0.020843505859375,
0.0014247894287109375,
-0.0027599334716796875,
-0.00626373291015625,
-0.0362548828125,
0.01163482666015625,
0.0364990234375,
-0.018157958984375,
0.0228729248046875
]
|
ca4749ad7ea3f151fcea7e199eb8768024d678a1 | Wordpress Stackexchange
Q: Displaying the category name of a custom post type So I have a custom query, in which I'm displaying some results posts of a custom post type called "staff". This custom post type is linked to a custom taxonomy called "department". I am able to display results, but I am unable to print the category that's linked to each post.
This is my code:
<?php
$args = array(
'post_type' => 'staff', 'posts_per_page' => -1, 'orderby' => 'menu_order', 'order' => 'ASC',
'tax_query' => array(
array(
'taxonomy' => 'departments',
'field' => 'slug',
'terms' => 'board'
)
)
);
$loop = new WP_Query( $args );
?>
<?php if( $loop->have_posts() ): ?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<p class="text-center name"><?php the_title(); ?></p>
<?php the_category(' '); ?>
<?php endwhile; ?>
<?php endif; ?>
I think the problem is that I'm using but I'm not sure.
Any ideas what could be wrong?
Thanks!
A: use terms like this :
$terms = get_the_terms($post->ID, 'Enter_your_taxonomy_here' );
if ($terms && ! is_wp_error($terms)) :
$tslugs_arr = array();
foreach ($terms as $term) {
$tslugs_arr[] = $term->slug;
}
$terms_slug_str = join( " ", $tslugs_arr);
endif;
echo $terms_slug_str;
| Q: Displaying the category name of a custom post type So I have a custom query, in which I'm displaying some results posts of a custom post type called "staff". This custom post type is linked to a custom taxonomy called "department". I am able to display results, but I am unable to print the category that's linked to each post.
This is my code:
<?php
$args = array(
'post_type' => 'staff', 'posts_per_page' => -1, 'orderby' => 'menu_order', 'order' => 'ASC',
'tax_query' => array(
array(
'taxonomy' => 'departments',
'field' => 'slug',
'terms' => 'board'
)
)
);
$loop = new WP_Query( $args );
?>
<?php if( $loop->have_posts() ): ?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<p class="text-center name"><?php the_title(); ?></p>
<?php the_category(' '); ?>
<?php endwhile; ?>
<?php endif; ?>
I think the problem is that I'm using but I'm not sure.
Any ideas what could be wrong?
Thanks!
A: use terms like this :
$terms = get_the_terms($post->ID, 'Enter_your_taxonomy_here' );
if ($terms && ! is_wp_error($terms)) :
$tslugs_arr = array();
foreach ($terms as $term) {
$tslugs_arr[] = $term->slug;
}
$terms_slug_str = join( " ", $tslugs_arr);
endif;
echo $terms_slug_str;
A: In case if someone looking for this in 2019.
With this you are getting CUSTOM POST TYPE name with URL
$terms = wp_get_post_terms( $post->ID, 'PLACE-HERE-YOUR-TAXONOMY');
foreach ( $terms as $term ) {
$term_link = get_term_link( $term );
echo '<a href="' . $term_link . '">' . $term->name . '</a>' . ' ';
}
A: So this is what I needed:
<?php
$terms = get_the_terms( $post->ID , 'board' );
foreach ( $terms as $term ) {
echo $term->name;
}
?>
| wordpress | {
"language": "en",
"length": 268,
"provenance": "stackexchange_00019.jsonl.gz:455787",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/189055"
} | [
0.056182861328125,
0.015899658203125,
-0.037200927734375,
-0.05145263671875,
0.034393310546875,
-0.03912353515625,
0.0482177734375,
0.0187835693359375,
-0.0030078887939453125,
0.0149383544921875,
-0.03936767578125,
-0.0176239013671875,
-0.0286865234375,
-0.03900146484375,
0.007556915283203125,
-0.0413818359375,
0.03851318359375,
-0.0205078125,
0.038726806640625,
0.00815582275390625,
0.01123046875,
0.03521728515625,
0.03277587890625,
0.0207061767578125,
0.0184478759765625,
-0.04901123046875,
0.0294647216796875,
-0.055084228515625,
0.031951904296875,
-0.0198211669921875,
0.0110626220703125,
-0.00019621849060058594,
0.0183868408203125,
0.012542724609375,
0.01180267333984375,
0.0165252685546875,
0.0516357421875,
-0.001384735107421875,
0.0179901123046875,
0.03515625,
0.01476287841796875,
0.0029430389404296875,
0.03857421875,
0.039764404296875,
0.00626373291015625,
-0.026824951171875,
0.01555633544921875,
-0.051605224609375,
0.0016117095947265625,
0.01187896728515625,
0.0384521484375,
0.024993896484375,
0.032318115234375,
0.0121307373046875,
-0.00807952880859375,
0.0227813720703125,
-0.0179290771484375,
-0.0276031494140625,
0.0214385986328125,
-0.0279388427734375,
-0.01027679443359375,
-0.047332763671875,
0.054229736328125,
0.0141448974609375,
-0.0080108642578125,
0.000457763671875,
0.01849365234375,
0.00289154052734375,
0.00200653076171875,
-0.00550079345703125,
0.0082244873046875,
-0.00231170654296875,
0.0185699462890625,
0.0181427001953125,
-0.01348114013671875,
-0.07049560546875,
0.0021038055419921875,
-0.044952392578125,
0.0136260986328125,
0.018157958984375,
-0.0011138916015625,
-0.0032787322998046875,
-0.0513916015625,
0.0333251953125,
-0.0168609619140625,
0.045501708984375,
-0.023468017578125,
-0.0203399658203125,
0.01110076904296875,
-0.0273590087890625,
-0.003940582275390625,
0.005344390869140625,
0.005588531494140625,
0.0034046173095703125,
0.006923675537109375,
-0.05340576171875,
0.01383209228515625,
0.0171051025390625,
0.005603790283203125,
0.01207733154296875,
-0.030731201171875,
-0.0085601806640625,
-0.0008640289306640625,
-0.0198516845703125,
0.0335693359375,
0.054107666015625,
-0.0062103271484375,
-0.008392333984375,
0.0631103515625,
-0.0015840530395507812,
0.040802001953125,
0.057342529296875,
-0.0499267578125,
-0.039794921875,
0.0029430389404296875,
0.05523681640625,
-0.05072021484375,
-0.00292205810546875,
-0.0016717910766601562,
0.0085601806640625,
0.0014438629150390625,
0.016571044921875,
0.02569580078125,
-0.03289794921875,
-0.01282501220703125,
-0.012298583984375,
-0.01165771484375,
-0.03912353515625,
0.03521728515625,
0.005615234375,
-0.0372314453125,
0.0005626678466796875,
0.06903076171875,
0.0293731689453125,
0.0211639404296875,
-0.0192108154296875,
0.00861358642578125,
-0.04510498046875,
-0.009185791015625,
-0.01175689697265625,
0.0163116455078125,
0.0118255615234375,
0.041656494140625,
-0.021881103515625,
0.02935791015625,
-0.0030498504638671875,
0.0189666748046875,
0.0272369384765625,
0.0030956268310546875,
-0.0355224609375,
0.050750732421875,
-0.01861572265625,
0.044525146484375,
0.019927978515625,
-0.0814208984375,
0.0107574462890625,
-0.003307342529296875,
-0.025115966796875,
-0.04339599609375,
-0.053436279296875,
0.01433563232421875,
0.00518798828125,
0.006160736083984375,
-0.045074462890625,
-0.0235748291015625,
-0.032684326171875,
-0.031494140625,
0.0004470348358154297,
0.016815185546875,
-0.00946044921875,
0.0145263671875,
-0.0025730133056640625,
0.016845703125,
0.0102386474609375,
0.01055145263671875,
0.0194091796875,
-0.0293426513671875,
0.0280914306640625,
0.0408935546875,
-0.01739501953125,
-0.01195526123046875,
-0.0296173095703125,
0.0270233154296875,
0.005229949951171875,
-0.048187255859375,
0.01641845703125,
-0.0007410049438476562,
0.034912109375,
0.0207977294921875,
0.01641845703125,
0.0167388916015625,
0.01245880126953125,
-0.054931640625,
0.0404052734375,
0.0037174224853515625,
-0.017547607421875,
-0.019256591796875,
-0.0142059326171875,
-0.0021648406982421875,
-0.0005021095275878906,
-0.0279083251953125,
-0.0005340576171875,
-0.001987457275390625,
0.0143585205078125,
-0.05718994140625,
0.027740478515625,
-0.02557373046875,
0.041778564453125,
0.004291534423828125,
0.003948211669921875,
0.0166473388671875,
-0.00958251953125,
-0.03265380859375,
0.01287841796875,
-0.0273590087890625,
0.0207061767578125,
0.006320953369140625,
0.0004398822784423828,
-0.009368896484375,
-0.0019521713256835938,
0.005123138427734375,
-0.033966064453125,
-0.005138397216796875,
0.042755126953125,
0.0391845703125,
0.00443267822265625,
-0.005558013916015625,
-0.0037746429443359375,
0.0214385986328125,
0.0205535888671875,
-0.0283966064453125,
-0.007282257080078125,
0.048675537109375,
0.047515869140625,
-0.01270294189453125,
0.019195556640625,
0.06378173828125,
-0.0219879150390625,
0.003978729248046875,
0.0247650146484375,
0.0225677490234375,
0.017791748046875,
-0.03875732421875,
-0.042327880859375,
0.0650634765625,
-0.0213470458984375,
-0.01137542724609375,
-0.0132904052734375,
0.011322021484375,
0.040863037109375,
0.0307464599609375,
0.050018310546875,
0.020721435546875,
0.035064697265625,
0.04486083984375,
0.03466796875,
0.003932952880859375,
-0.01043701171875,
-0.001800537109375,
-0.002971649169921875,
0.0129547119140625,
-0.039581298828125,
-0.0328369140625,
-0.00843048095703125,
-0.0007009506225585938,
0.03662109375,
-0.00879669189453125,
-0.01325225830078125,
-0.05609130859375,
0.0172882080078125,
0.026702880859375,
-0.00934600830078125,
-0.01120758056640625,
0.013092041015625,
0.0236663818359375,
-0.0308380126953125,
-0.046875,
0.00777435302734375,
0.0199432373046875,
-0.002925872802734375,
-0.007965087890625,
0.033660888671875,
0.0142669677734375,
-0.0013723373413085938,
-0.032318115234375,
-0.07672119140625,
0.0160064697265625,
0.0261993408203125,
-0.041961669921875,
0.0016021728515625,
0.01483154296875,
0.06378173828125,
-0.00214385986328125,
0.0151214599609375,
-0.0426025390625,
0.039581298828125,
0.05718994140625,
-0.0268402099609375,
0.01441192626953125,
-0.0003314018249511719,
0.04443359375,
0.05023193359375,
0.01314544677734375,
0.004451751708984375,
0.003936767578125,
0.01348876953125,
0.0026149749755859375,
0.023193359375,
0.006839752197265625,
-0.0548095703125,
0.015625,
-0.0032100677490234375,
0.0389404296875,
0.0594482421875,
-0.002689361572265625,
-0.049163818359375,
-0.0161590576171875,
0.0287017822265625,
-0.09765625,
-0.08135986328125,
0.0184326171875,
-0.032135009765625,
0.0058135986328125,
0.0093841552734375,
-0.01169586181640625,
-0.0091094970703125,
0.01983642578125,
-0.00017762184143066406,
-0.0017566680908203125,
-0.0174713134765625,
-0.0633544921875,
-0.044830322265625,
-0.0777587890625,
-0.002727508544921875,
-0.0038547515869140625,
0.0078277587890625,
0.021759033203125,
0.060882568359375,
0.03973388671875,
-0.0252838134765625,
0.056488037109375,
0.05853271484375,
-0.0280914306640625,
0.027435302734375,
-0.0099334716796875,
0.01140594482421875,
0.0311279296875,
-0.00598907470703125,
0.018890380859375,
0.048095703125,
-0.033416748046875,
0.01053619384765625,
0.00444793701171875,
0.006870269775390625,
0.0281982421875,
0.0080108642578125,
-0.0246124267578125,
0.031463623046875,
0.047393798828125,
-0.0135498046875,
-0.0264892578125,
-0.01824951171875,
-0.042877197265625,
0.0178070068359375,
0.0142822265625,
0.00516510009765625,
-0.029815673828125,
0.0281829833984375,
-0.0300750732421875,
0.00608062744140625,
-0.0030231475830078125,
-0.041839599609375,
0.053741455078125,
0.007152557373046875,
-0.003063201904296875,
0.026336669921875,
0.0151519775390625,
0.00496673583984375,
0.040618896484375,
0.0231475830078125,
0.04833984375,
-0.0003685951232910156,
0.0230255126953125,
-0.036102294921875,
-0.0843505859375,
0.0374755859375,
-0.083251953125,
-0.002414703369140625,
-0.064697265625,
-0.013458251953125,
-0.00974273681640625,
0.10174560546875,
-0.0484619140625,
-0.012542724609375,
0.00586700439453125,
0.002750396728515625,
0.00923919677734375,
-0.0015316009521484375,
-0.03448486328125,
-0.02423095703125,
-0.0872802734375,
0.017852783203125,
0.0261993408203125,
-0.038299560546875,
-0.017364501953125,
0.03314208984375,
-0.059112548828125,
-0.01224517822265625,
0.045013427734375,
-0.037872314453125,
0.0384521484375,
0.0214996337890625,
0.0278472900390625,
0.0006899833679199219,
-0.0240478515625,
-0.030548095703125,
-0.06634521484375,
-0.0027027130126953125,
0.0018901824951171875,
0.044708251953125,
0.009063720703125,
-0.0186767578125,
-0.00652313232421875,
0.0467529296875,
0.061309814453125,
-0.01274871826171875,
0.0313720703125,
-0.0255126953125,
-0.0024738311767578125,
0.0191497802734375,
0.0206146240234375,
-0.021820068359375,
-0.003192901611328125,
0.0121307373046875,
-0.0160064697265625,
0.052978515625,
-0.0207672119140625,
0.0212860107421875,
-0.001300811767578125,
-0.034027099609375,
-0.01557159423828125,
0.00206756591796875,
0.006832122802734375,
0.032470703125,
-0.00601959228515625,
0.00371551513671875,
-0.00672149658203125,
-0.02008056640625,
0.0287017822265625,
0.01953125,
-0.0161285400390625,
0.0164031982421875,
0.0330810546875,
0.00811004638671875,
-0.0211944580078125,
-0.0743408203125,
-0.0006961822509765625,
0.028411865234375,
-0.010284423828125,
0.04132080078125,
0.03424072265625,
-0.0182952880859375,
0.0452880859375,
-0.006076812744140625,
-0.0030517578125,
-0.0004696846008300781,
0.05120849609375,
-0.00402069091796875,
-0.022247314453125,
0.0260467529296875,
-0.01256561279296875,
0.00948333740234375,
0.0396728515625,
-0.007171630859375,
-0.0170440673828125,
-0.005126953125,
0.045013427734375,
-0.0156402587890625,
0.032958984375,
-0.030029296875,
-0.0038776397705078125,
0.0015974044799804688,
-0.00830078125,
0.017669677734375,
0.0384521484375,
0.001949310302734375,
-0.01050567626953125,
-0.0014581680297851562,
0.00782012939453125,
0.01447296142578125,
-0.0016050338745117188,
0.0017862319946289062,
0.01739501953125,
0.0235137939453125,
0.0019359588623046875,
0.004108428955078125,
-0.006565093994140625,
0.0357666015625,
0.0011415481567382812,
-0.04156494140625,
-0.00243377685546875,
-0.004852294921875,
0.022216796875,
0.012420654296875,
0.01483917236328125,
0.031341552734375,
0.033721923828125,
0.017730712890625,
0.0219573974609375,
-0.022430419921875,
0.033721923828125,
-0.00563812255859375,
0.01001739501953125,
0.00823974609375,
-0.0016145706176757812,
-0.0163116455078125,
0.06024169921875,
0.015228271484375,
0.01082611083984375,
-0.0270843505859375,
-0.0068511962890625,
-0.00091552734375,
0.0211334228515625,
0.0251617431640625,
-0.004547119140625,
-0.0082244873046875,
-0.0031642913818359375,
0.02520751953125,
-0.049102783203125,
0.0037078857421875,
-0.003955841064453125,
0.05999755859375,
-0.00765228271484375,
-0.0265655517578125,
0.03619384765625,
-0.031494140625,
-0.00505828857421875,
0.010589599609375,
-0.030609130859375,
-0.017333984375,
-0.025787353515625,
0.01178741455078125,
0.03155517578125,
-0.005558013916015625,
-0.0211029052734375,
0.031982421875,
0.00365447998046875,
0.055938720703125,
-0.027587890625,
0.003753662109375,
0.0173797607421875,
0.0194854736328125,
-0.04718017578125,
-0.034027099609375,
0.005962371826171875,
-0.027862548828125,
-0.0205078125,
0.004619598388671875,
-0.0263214111328125,
-0.01053619384765625,
-0.043701171875,
0.043792724609375,
-0.031463623046875,
0.003513336181640625,
0.00504302978515625,
0.0063629150390625,
0.07525634765625,
0.062255859375,
-0.05950927734375,
0.0290679931640625,
-0.021697998046875,
0.0250701904296875,
0.032135009765625,
-0.057342529296875,
-0.01041412353515625,
-0.052703857421875,
-0.00811004638671875,
0.01538848876953125,
0.0158843994140625,
-0.007122039794921875,
-0.07275390625,
-0.003570556640625,
0.029327392578125,
0.0164947509765625,
-0.00685882568359375,
-0.0015344619750976562,
0.035797119140625,
0.034423828125,
0.00017142295837402344,
-0.03857421875,
-0.0280609130859375,
-0.016082763671875,
-0.01201629638671875,
-0.10394287109375,
-0.019317626953125,
0.031463623046875,
-0.037384033203125,
0.072021484375,
0.0159912109375,
0.022186279296875,
0.006450653076171875,
0.00685882568359375,
0.0042877197265625,
0.005275726318359375,
-0.0233612060546875,
0.0177001953125,
-0.031707763671875,
0.0699462890625,
-0.0282440185546875,
-0.008026123046875,
0.018402099609375,
-0.011962890625,
0.043975830078125,
-0.01476287841796875,
0.0219573974609375,
0.005496978759765625,
-0.01506805419921875,
0.0301055908203125,
0.044647216796875,
0.008270263671875,
0.017333984375,
0.0227508544921875,
0.0048675537109375,
0.004817962646484375,
0.0149993896484375,
0.03411865234375,
0.00698089599609375,
0.042327880859375,
-0.01032257080078125,
0.007114410400390625,
0.0111541748046875,
-0.017242431640625,
-0.03619384765625,
0.0173797607421875,
0.01490020751953125,
-0.04876708984375,
-0.0078125,
0.02410888671875,
0.008392333984375,
-0.0194854736328125,
0.02996826171875,
0.0114898681640625,
0.017730712890625,
-0.04388427734375,
0.000335693359375,
-0.0156707763671875,
-0.0029144287109375,
0.01525115966796875,
0.00788116455078125,
-0.01071929931640625,
0.07354736328125,
0.0012865066528320312,
-0.03045654296875,
-0.0286865234375,
0.01183319091796875,
-0.0057830810546875,
-0.0213623046875,
0.0012979507446289062,
-0.01444244384765625,
-0.009063720703125,
-0.049407958984375,
0.02496337890625,
-0.037384033203125,
0.0200347900390625,
0.05157470703125,
-0.006072998046875,
0.010101318359375,
0.024322509765625,
-0.00727081298828125,
0.01800537109375,
-0.019317626953125,
-0.0384521484375,
0.01708984375,
-0.0038280487060546875,
-0.033477783203125,
0.042755126953125,
-0.01436614990234375,
0.005062103271484375,
0.0006375312805175781,
0.025146484375,
-0.0321044921875,
-0.042236328125,
0.0298309326171875,
0.017822265625,
-0.032867431640625,
0.0306549072265625,
0.054840087890625,
-0.020751953125,
0.019287109375,
0.02239990234375,
-0.06591796875,
-0.038726806640625,
0.0210113525390625,
-0.021087646484375,
0.003444671630859375,
0.01242828369140625,
-0.06561279296875,
0.06494140625,
-0.0083160400390625,
0.0186004638671875,
-0.01416778564453125,
0.0230712890625,
0.00865936279296875,
0.01050567626953125,
-0.05364990234375,
0.0958251953125,
0.041595458984375,
0.0595703125,
-0.0675048828125,
-0.0152740478515625,
0.0399169921875,
0.01483154296875,
0.051971435546875,
0.018157958984375,
-0.04425048828125,
-0.008087158203125,
0.0411376953125,
0.035003662109375,
-0.0150604248046875,
0.034149169921875,
0.017486572265625,
0.026885986328125,
0.061798095703125,
-0.00494384765625,
0.04449462890625,
0.014434814453125,
-0.01305389404296875,
0.04913330078125,
0.0218048095703125,
0.03631591796875,
-0.01117706298828125,
-0.033233642578125,
-0.049468994140625,
-0.007221221923828125,
0.044830322265625,
-0.016387939453125,
-0.00870513916015625,
0.055328369140625,
0.0538330078125,
-0.07208251953125,
-0.00989532470703125,
-0.04107666015625,
0.0689697265625,
0.006572723388671875,
0.0170745849609375,
0.016357421875,
0.0130462646484375,
0.078857421875,
-0.045074462890625,
0.003551483154296875,
0.01192474365234375,
-0.02392578125,
0.032989501953125,
0.051025390625,
0.01329803466796875,
-0.0304107666015625,
-0.0146484375,
0.057861328125,
0.0657958984375,
-0.0538330078125,
-0.064208984375,
0.006793975830078125,
0.0162811279296875,
-0.0035419464111328125,
0.036224365234375,
-0.0012416839599609375,
0.06390380859375,
0.0960693359375,
-0.09710693359375,
-0.004184722900390625,
0.012054443359375,
0.044158935546875,
-0.05126953125,
-0.07952880859375,
0.007659912109375,
-0.033416748046875,
-0.058319091796875,
0.01288604736328125,
0.0347900390625,
0.07861328125,
0.00991058349609375,
0.054534912109375,
-0.00952911376953125,
-0.02496337890625,
-0.0030040740966796875,
-0.0037174224853515625,
-0.018402099609375,
0.01499176025390625,
-0.0189056396484375,
-0.004314422607421875,
-0.034271240234375,
0.02032470703125,
0.01152801513671875,
-0.01207733154296875,
0.00833892822265625,
0.02630615234375,
-0.0030345916748046875,
-0.00099945068359375,
0.037109375,
-0.011260986328125,
-0.03973388671875,
-0.01092529296875,
0.03436279296875,
0.042388916015625,
0.0286865234375,
-0.01055908203125,
0.04425048828125,
0.034515380859375,
-0.01519775390625,
0.067626953125,
-0.01387786865234375,
0.033111572265625,
0.051971435546875,
-0.0006842613220214844,
0.04833984375,
0.0281219482421875,
-0.0941162109375,
-0.0286407470703125,
-0.034088134765625,
-0.06494140625,
0.03253173828125,
0.04638671875,
0.0062408447265625,
-0.0179901123046875,
0.0218963623046875,
-0.044158935546875,
0.0201416015625,
0.0245819091796875,
0.0016841888427734375,
-0.033905029296875,
-0.00969696044921875,
-0.0272064208984375,
-0.0160369873046875,
0.006244659423828125,
0.033050537109375,
-0.0088043212890625,
-0.0018339157104492188,
0.036468505859375,
0.019195556640625,
0.00634002685546875,
-0.06048583984375,
0.044189453125,
-0.0704345703125,
-0.052215576171875,
0.035003662109375,
0.0234527587890625,
0.012542724609375,
0.0045928955078125,
0.0158233642578125,
-0.0093231201171875,
0.054046630859375,
-0.07470703125,
-0.038055419921875,
0.007648468017578125,
0.025054931640625,
-0.0159454345703125,
0.054901123046875,
-0.00995635986328125,
-0.00896453857421875,
-0.0382080078125,
-0.0345458984375,
0.054412841796875,
0.055877685546875,
0.028289794921875,
0.0065460205078125,
0.025299072265625,
-0.01511383056640625,
0.0206298828125,
-0.00807952880859375,
0.029937744140625,
0.030181884765625,
0.022125244140625,
-0.0309295654296875,
0.00995635986328125,
-0.0022068023681640625,
-0.0257415771484375,
0.05108642578125,
-0.0242462158203125,
0.0171051025390625,
-0.00635528564453125,
-0.005443572998046875,
-0.006046295166015625,
0.0311737060546875,
-0.0197906494140625,
0.00957489013671875,
-0.004413604736328125,
-0.0024166107177734375,
-0.002773284912109375,
-0.0133514404296875,
-0.04010009765625,
-0.030914306640625,
0.028839111328125,
0.0176544189453125,
0.0168609619140625,
0.00385284423828125,
-0.05499267578125,
-0.030059814453125,
0.060638427734375,
0.021759033203125,
-0.0188751220703125,
-0.00788116455078125,
-0.0298919677734375,
-0.009735107421875,
0.0355224609375,
-0.0341796875,
0.0230712890625,
0.04840087890625,
-0.01073455810546875,
0.055572509765625,
-0.0286865234375,
-0.05712890625,
0.018402099609375,
0.0181884765625,
0.022216796875,
-0.03082275390625,
-0.05853271484375,
0.01495361328125,
0.01320648193359375,
0.052276611328125,
0.061004638671875,
0.00007617473602294922,
0.0297088623046875,
0.00534820556640625,
-0.050567626953125,
-0.028594970703125,
0.028961181640625,
-0.009521484375,
-0.0325927734375,
0.0290985107421875,
-0.01355743408203125,
-0.00417327880859375,
-0.03228759765625,
-0.049072265625,
0.0308837890625,
0.006229400634765625,
-0.0286712646484375,
-0.060302734375,
-0.000018358230590820312,
0.002429962158203125,
-0.029510498046875,
-0.0225830078125,
-0.01015472412109375,
-0.04608154296875,
0.0201568603515625,
0.01177978515625,
0.017608642578125,
0.02301025390625,
0.028564453125,
-0.05023193359375,
0.024749755859375,
-0.004730224609375,
-0.0180206298828125,
0.005859375,
-0.0238800048828125,
-0.006786346435546875,
-0.00949859619140625,
-0.048797607421875,
-0.0570068359375,
-0.016326904296875,
0.0023250579833984375,
-0.003875732421875,
-0.04364013671875,
-0.051239013671875,
-0.026885986328125,
0.031341552734375,
0.03887939453125,
0.02288818359375,
-0.01526641845703125,
-0.02691650390625,
-0.0067596435546875,
-0.0202178955078125,
0.01702880859375,
0.037628173828125,
-0.057708740234375,
0.00875091552734375,
0.0129547119140625,
-0.006656646728515625,
-0.00229644775390625,
-0.02392578125,
-0.025787353515625,
-0.025390625,
-0.03216552734375,
-0.005519866943359375,
-0.0269775390625,
0.0322265625,
0.00013887882232666016,
-0.025543212890625,
-0.017974853515625,
-0.041534423828125,
0.0032253265380859375,
-0.0294342041015625,
-0.07049560546875,
-0.0282745361328125,
-0.019866943359375,
0.02630615234375,
0.0198211669921875,
-0.0021686553955078125,
-0.0138397216796875,
0.018463134765625,
0.00875091552734375,
0.008026123046875,
0.03338623046875,
-0.0290985107421875,
0.026458740234375,
0.0090789794921875,
0.06451416015625,
-0.00666046142578125,
0.09722900390625,
0.0103302001953125,
0.026702880859375,
-0.0009822845458984375,
0.043304443359375,
0.0175933837890625,
-0.031890869140625,
0.026885986328125,
-0.0223846435546875,
0.0240325927734375,
-0.0162353515625,
0.026519775390625,
0.00420379638671875,
-0.0020732879638671875,
-0.003063201904296875,
-0.01497650146484375,
0.0212249755859375
]
|
3be981ed8e31ea455cd9135ad880da4b1855e8e4 | Wordpress Stackexchange
Q: Remove parent theme action in child I'm creating a child theme from Storefront.
Now I want to remove these action in child theme
add_action( 'woocommerce_before_shop_loop','storefront_sorting_wrapper',9 );
by this function:
add_action( 'after_setup_theme','remove_action', 100 );
function remove_action() {
remove_action( 'init', 'woocommerce_before_shop_loop');
}
but it doesn't work!
A: @Sumit is right, but if you call your function remove_action() Wordpress will throw an error. So this will work:
add_action( 'init', 'remove_actions_parent_theme');
function remove_actions_parent_theme() {
remove_action( 'storefront_header','storefront_skip_links',0 );
};
| Q: Remove parent theme action in child I'm creating a child theme from Storefront.
Now I want to remove these action in child theme
add_action( 'woocommerce_before_shop_loop','storefront_sorting_wrapper',9 );
by this function:
add_action( 'after_setup_theme','remove_action', 100 );
function remove_action() {
remove_action( 'init', 'woocommerce_before_shop_loop');
}
but it doesn't work!
A: @Sumit is right, but if you call your function remove_action() Wordpress will throw an error. So this will work:
add_action( 'init', 'remove_actions_parent_theme');
function remove_actions_parent_theme() {
remove_action( 'storefront_header','storefront_skip_links',0 );
};
A: For removing an action hook you should use the same action name, callback name and the priority that was used to add a action in parent theme.
And register it on init
add_action( 'init', 'remove_my_action');
function remove_my_action() {
remove_action( 'woocommerce_before_shop_loop','storefront_sorting_wrapper',9 );
}
Read about remove_action
| wordpress | {
"language": "en",
"length": 121,
"provenance": "stackexchange_00019.jsonl.gz:455789",
"question_score": "18",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/189062"
} | [
0.023468017578125,
0.01233673095703125,
-0.03607177734375,
-0.005645751953125,
0.0096282958984375,
-0.047882080078125,
0.042144775390625,
-0.026763916015625,
-0.0008187294006347656,
0.0352783203125,
0.0091094970703125,
-0.010223388671875,
-0.006641387939453125,
-0.0302734375,
-0.0240478515625,
-0.007663726806640625,
0.0191192626953125,
-0.00189971923828125,
0.041961669921875,
-0.0025081634521484375,
-0.025054931640625,
0.0132598876953125,
0.052978515625,
0.0182647705078125,
0.049530029296875,
-0.053009033203125,
0.0740966796875,
-0.015625,
0.036529541015625,
-0.018951416015625,
0.0307769775390625,
-0.013397216796875,
-0.009613037109375,
0.0195770263671875,
0.036102294921875,
-0.01506805419921875,
-0.002895355224609375,
0.005031585693359375,
0.0253448486328125,
0.003997802734375,
0.00830841064453125,
0.01093292236328125,
-0.029510498046875,
0.004329681396484375,
-0.044036865234375,
-0.027252197265625,
0.006610870361328125,
-0.019012451171875,
-0.0022411346435546875,
-0.055145263671875,
0.01009368896484375,
0.02398681640625,
0.035186767578125,
-0.042572021484375,
-0.0164337158203125,
-0.006275177001953125,
-0.03228759765625,
0.0223236083984375,
0.028076171875,
0.07232666015625,
-0.00826263427734375,
0.01409912109375,
-0.0210723876953125,
-0.07525634765625,
0.0245208740234375,
-0.005207061767578125,
-0.04547119140625,
0.0116424560546875,
-0.052581787109375,
0.0489501953125,
0.062469482421875,
-0.0579833984375,
-0.0193023681640625,
0.00695037841796875,
-0.037322998046875,
-0.03411865234375,
0.00753021240234375,
-0.033233642578125,
0.019683837890625,
0.0128326416015625,
-0.0177001953125,
-0.024017333984375,
-0.0679931640625,
-0.040985107421875,
0.038604736328125,
-0.015716552734375,
-0.00310516357421875,
0.00916290283203125,
-0.05413818359375,
-0.03411865234375,
-0.035003662109375,
-0.06951904296875,
-0.0256805419921875,
-0.005527496337890625,
-0.01444244384765625,
-0.0023479461669921875,
0.050994873046875,
0.04156494140625,
-0.0228118896484375,
-0.0198211669921875,
0.0167388916015625,
-0.04144287109375,
0.0147705078125,
-0.019775390625,
0.00009655952453613281,
0.01055908203125,
-0.0175018310546875,
0.0175018310546875,
0.043243408203125,
0.035491943359375,
0.0031795501708984375,
0.004390716552734375,
-0.026031494140625,
-0.024383544921875,
-0.0230255126953125,
0.029815673828125,
-0.0231781005859375,
-0.012542724609375,
-0.00878143310546875,
0.0112762451171875,
-0.00678253173828125,
0.005107879638671875,
0.00164794921875,
-0.029815673828125,
0.00616455078125,
-0.0110321044921875,
-0.037750244140625,
-0.0038604736328125,
0.0413818359375,
-0.0094757080078125,
-0.050628662109375,
0.00975799560546875,
0.07281494140625,
0.027862548828125,
0.0230865478515625,
-0.0185546875,
0.0204010009765625,
0.0330810546875,
0.0210723876953125,
-0.0238189697265625,
0.043060302734375,
-0.038543701171875,
-0.041656494140625,
0.047698974609375,
0.049285888671875,
-0.00920867919921875,
0.0003345012664794922,
0.0218505859375,
0.0389404296875,
0.00734710693359375,
0.038421630859375,
-0.032501220703125,
0.023956298828125,
0.011505126953125,
0.0203704833984375,
-0.0027561187744140625,
0.0361328125,
-0.018341064453125,
-0.006633758544921875,
-0.0264434814453125,
-0.01444244384765625,
-0.028289794921875,
0.00018835067749023438,
-0.04351806640625,
-0.08465576171875,
0.03857421875,
-0.0172882080078125,
-0.01444244384765625,
0.0274658203125,
-0.02471923828125,
0.052154541015625,
-0.041717529296875,
0.00495147705078125,
0.01548004150390625,
0.006412506103515625,
0.039764404296875,
-0.0264129638671875,
0.00754547119140625,
0.0141448974609375,
0.007320404052734375,
0.004650115966796875,
-0.028717041015625,
0.0092315673828125,
0.0106048583984375,
-0.0538330078125,
-0.0019054412841796875,
0.024871826171875,
0.006561279296875,
-0.01497650146484375,
0.0217437744140625,
0.05120849609375,
0.050201416015625,
-0.0178985595703125,
-0.00839996337890625,
0.0362548828125,
-0.025848388671875,
0.0077972412109375,
-0.029876708984375,
0.00921630859375,
0.01338958740234375,
0.0015201568603515625,
0.0191802978515625,
0.00927734375,
-0.0099334716796875,
-0.00850677490234375,
0.0212554931640625,
-0.022186279296875,
0.03887939453125,
-0.035003662109375,
0.0269622802734375,
0.0268096923828125,
0.00838470458984375,
-0.03350830078125,
-0.0131988525390625,
0.010894775390625,
0.0152130126953125,
-0.010711669921875,
0.037750244140625,
0.00849151611328125,
0.031494140625,
0.02099609375,
0.0047149658203125,
0.02484130859375,
-0.00039386749267578125,
0.07574462890625,
-0.0019092559814453125,
-0.0258331298828125,
-0.038299560546875,
0.0184326171875,
-0.0019168853759765625,
-0.0889892578125,
0.07568359375,
0.0203399658203125,
0.003414154052734375,
-0.04400634765625,
-0.0035724639892578125,
-0.029144287109375,
-0.053955078125,
-0.01287078857421875,
0.06268310546875,
0.01690673828125,
0.0278167724609375,
-0.028533935546875,
-0.0002841949462890625,
0.021636962890625,
-0.026947021484375,
0.0015420913696289062,
-0.001209259033203125,
0.00968170166015625,
0.0408935546875,
-0.0017709732055664062,
0.00751495361328125,
0.01360321044921875,
-0.038482666015625,
0.0269622802734375,
0.02862548828125,
-0.026641845703125,
-0.09161376953125,
0.031280517578125,
-0.004688262939453125,
0.033538818359375,
-0.06915283203125,
-0.07244873046875,
-0.0010461807250976562,
0.042144775390625,
0.0015239715576171875,
0.0040740966796875,
-0.00963592529296875,
-0.043731689453125,
0.023834228515625,
0.046417236328125,
-0.0269775390625,
-0.01194000244140625,
0.03155517578125,
-0.004764556884765625,
-0.0263519287109375,
-0.0243072509765625,
0.01763916015625,
-0.0584716796875,
0.0016489028930664062,
0.0036411285400390625,
0.0008144378662109375,
0.0260162353515625,
-0.0037517547607421875,
0.0195159912109375,
-0.026580810546875,
0.030426025390625,
0.0235748291015625,
0.006511688232421875,
-0.0126190185546875,
0.006046295166015625,
0.010833740234375,
-0.037384033203125,
0.044830322265625,
0.007549285888671875,
-0.0286865234375,
0.02490234375,
0.0079498291015625,
0.018890380859375,
-0.01085662841796875,
0.043212890625,
0.03863525390625,
-0.021697998046875,
0.00818634033203125,
0.0223541259765625,
-0.057891845703125,
0.01534271240234375,
0.01983642578125,
0.0060577392578125,
0.01514434814453125,
-0.056854248046875,
0.0195465087890625,
0.0296478271484375,
0.02923583984375,
0.0230712890625,
-0.0244598388671875,
0.01824951171875,
0.03656005859375,
-0.00250244140625,
-0.018157958984375,
0.0168914794921875,
-0.0657958984375,
0.0062255859375,
-0.00940704345703125,
-0.028961181640625,
-0.026885986328125,
0.030242919921875,
0.00609588623046875,
0.043914794921875,
-0.038055419921875,
0.0008325576782226562,
-0.00862884521484375,
-0.042510986328125,
-0.0482177734375,
0.0214385986328125,
-0.000004887580871582031,
-0.004100799560546875,
0.06549072265625,
0.0076751708984375,
-0.04522705078125,
0.003643035888671875,
-0.019012451171875,
-0.006732940673828125,
0.03826904296875,
-0.013275146484375,
0.0106964111328125,
0.0030517578125,
0.027923583984375,
-0.01788330078125,
-0.001712799072265625,
-0.01168060302734375,
-0.044342041015625,
-0.029144287109375,
0.011688232421875,
-0.007549285888671875,
0.0394287109375,
0.03692626953125,
-0.035491943359375,
-0.005489349365234375,
-0.06866455078125,
-0.053192138671875,
-0.011688232421875,
-0.06494140625,
0.035430908203125,
0.05145263671875,
-0.0006594657897949219,
-0.00933837890625,
0.00876617431640625,
0.03973388671875,
0.0160064697265625,
0.03875732421875,
-0.004261016845703125,
0.05108642578125,
0.0021038055419921875,
0.0161285400390625,
-0.0709228515625,
0.041351318359375,
-0.0212554931640625,
-0.002773284912109375,
0.01331329345703125,
0.00496673583984375,
0.0005106925964355469,
0.006504058837890625,
-0.0187225341796875,
-0.01396942138671875,
0.023468017578125,
-0.0225982666015625,
0.031494140625,
-0.028533935546875,
-0.00543975830078125,
-0.006526947021484375,
0.0631103515625,
-0.0758056640625,
-0.0242462158203125,
0.006805419921875,
0.0228424072265625,
-0.0199737548828125,
-0.01331329345703125,
-0.0325927734375,
-0.019317626953125,
-0.10333251953125,
0.005847930908203125,
-0.0092620849609375,
-0.019012451171875,
-0.0033855438232421875,
-0.006435394287109375,
-0.06451416015625,
-0.0465087890625,
0.024444580078125,
0.01448822021484375,
-0.01036834716796875,
0.0071868896484375,
-0.042236328125,
-0.00021636486053466797,
-0.0192718505859375,
0.0017347335815429688,
-0.045013427734375,
0.0013647079467773438,
-0.0540771484375,
0.050933837890625,
0.036346435546875,
0.0027256011962890625,
-0.011993408203125,
0.0300750732421875,
0.024749755859375,
0.0548095703125,
-0.0008807182312011719,
-0.0167083740234375,
-0.001953125,
0.0058135986328125,
0.01299285888671875,
-0.01265716552734375,
-0.01338958740234375,
0.00525665283203125,
-0.01329803466796875,
0.0175018310546875,
-0.0211334228515625,
-0.0228729248046875,
0.019073486328125,
-0.0266571044921875,
-0.0430908203125,
-0.02099609375,
-0.017059326171875,
0.01427459716796875,
-0.0042724609375,
-0.0020961761474609375,
-0.032745361328125,
-0.05206298828125,
-0.002498626708984375,
-0.035675048828125,
-0.00995635986328125,
0.0170135498046875,
0.05291748046875,
0.03271484375,
-0.005237579345703125,
0.03668212890625,
-0.00875091552734375,
0.01557159423828125,
0.0024089813232421875,
0.00981903076171875,
-0.0271759033203125,
-0.014678955078125,
0.0187530517578125,
-0.015655517578125,
-0.0038585662841796875,
-0.0104827880859375,
0.07269287109375,
-0.003688812255859375,
-0.0078277587890625,
0.006389617919921875,
-0.025238037109375,
0.037811279296875,
-0.032196044921875,
-0.0258941650390625,
-0.0081634521484375,
-0.0142974853515625,
0.0261383056640625,
-0.00016832351684570312,
0.042449951171875,
-0.0218658447265625,
0.0130462646484375,
-0.002727508544921875,
-0.0036258697509765625,
0.032135009765625,
0.0186309814453125,
-0.003452301025390625,
-0.025665283203125,
-0.0308074951171875,
0.022979736328125,
-0.054229736328125,
-0.0010690689086914062,
-0.068359375,
0.050872802734375,
-0.047637939453125,
-0.005565643310546875,
-0.00018739700317382812,
-0.0034885406494140625,
0.0299835205078125,
-0.00525665283203125,
-0.0006804466247558594,
-0.065673828125,
-0.0099945068359375,
0.07818603515625,
-0.0194091796875,
0.036102294921875,
0.039947509765625,
-0.0169677734375,
0.002094268798828125,
-0.03741455078125,
-0.0229034423828125,
0.01214599609375,
-0.044891357421875,
-0.0198822021484375,
-0.00305938720703125,
-0.0204925537109375,
0.0241241455078125,
-0.0018825531005859375,
0.02288818359375,
0.0004379749298095703,
-0.0190887451171875,
-0.007080078125,
-0.0282440185546875,
0.04669189453125,
0.01422882080078125,
-0.0401611328125,
0.0535888671875,
0.00360107421875,
0.062255859375,
-0.01401519775390625,
-0.01534271240234375,
0.037078857421875,
0.032684326171875,
-0.00391387939453125,
-0.004497528076171875,
0.0013704299926757812,
0.00443267822265625,
-0.028594970703125,
0.019927978515625,
0.0181121826171875,
-0.03057861328125,
0.00978851318359375,
0.021575927734375,
-0.018798828125,
0.00727081298828125,
-0.00494384765625,
0.04681396484375,
-0.0186767578125,
-0.0029449462890625,
0.046966552734375,
-0.0400390625,
-0.0031375885009765625,
0.00957489013671875,
-0.044189453125,
-0.004436492919921875,
0.01143646240234375,
-0.06243896484375,
-0.04315185546875,
-0.0128021240234375,
-0.0200347900390625,
0.0394287109375,
-0.0014476776123046875,
0.0188446044921875,
-0.02874755859375,
-0.00659942626953125,
-0.05572509765625,
-0.013519287109375,
0.08062744140625,
0.03643798828125,
-0.032257080078125,
-0.0006742477416992188,
-0.037322998046875,
-0.0110321044921875,
-0.0931396484375,
-0.050933837890625,
-0.0406494140625,
0.0302734375,
-0.048583984375,
-0.013031005859375,
-0.0164947509765625,
0.03668212890625,
0.0099945068359375,
0.041961669921875,
-0.0186309814453125,
-0.0159759521484375,
-0.0297698974609375,
0.0858154296875,
-0.0149383544921875,
0.0170745849609375,
0.01494598388671875,
0.05078125,
0.024169921875,
-0.018157958984375,
0.01508331298828125,
-0.01016998291015625,
-0.0216217041015625,
-0.01488494873046875,
-0.04144287109375,
0.00972747802734375,
0.0753173828125,
-0.00611114501953125,
-0.003086090087890625,
-0.01189422607421875,
0.0011777877807617188,
-0.0455322265625,
0.034027099609375,
-0.0399169921875,
0.009765625,
-0.0533447265625,
-0.048126220703125,
-0.006237030029296875,
-0.005481719970703125,
0.0253753662109375,
0.0247344970703125,
-0.039703369140625,
0.01529693603515625,
0.022186279296875,
-0.0430908203125,
0.061920166015625,
0.047149658203125,
-0.03277587890625,
0.04925537109375,
-0.003627777099609375,
0.0029544830322265625,
0.04486083984375,
0.05242919921875,
-0.022979736328125,
-0.053558349609375,
0.07720947265625,
0.0478515625,
-0.0079345703125,
0.06494140625,
-0.031097412109375,
0.007083892822265625,
0.037017822265625,
0.052764892578125,
-0.08599853515625,
-0.0006847381591796875,
0.0133819580078125,
0.0188446044921875,
0.028167724609375,
-0.019256591796875,
0.045196533203125,
0.0177001953125,
-0.0051727294921875,
0.042205810546875,
-0.01367950439453125,
-0.0016984939575195312,
-0.01395416259765625,
0.00337982177734375,
0.005619049072265625,
-0.01959228515625,
-0.003505706787109375,
-0.024627685546875,
-0.00609588623046875,
0.0183868408203125,
-0.008331298828125,
-0.03973388671875,
0.0150604248046875,
0.0060882568359375,
-0.0193328857421875,
-0.0706787109375,
0.000553131103515625,
-0.0208587646484375,
0.0018062591552734375,
0.00412750244140625,
-0.04296875,
-0.01319122314453125,
0.041412353515625,
-0.067626953125,
0.029052734375,
0.00403594970703125,
-0.0182647705078125,
-0.07135009765625,
-0.02093505859375,
0.031707763671875,
-0.0183868408203125,
-0.07818603515625,
0.03192138671875,
-0.087158203125,
-0.00931549072265625,
-0.0005292892456054688,
0.007762908935546875,
0.0025882720947265625,
-0.021148681640625,
-0.016998291015625,
0.033447265625,
0.01457977294921875,
-0.01380157470703125,
-0.007495880126953125,
0.0199432373046875,
-0.04486083984375,
-0.0033664703369140625,
0.01177215576171875,
0.00936126708984375,
0.0013990402221679688,
0.004009246826171875,
-0.06781005859375,
0.1043701171875,
-0.048919677734375,
0.038909912109375,
0.017913818359375,
0.042083740234375,
-0.01486968994140625,
0.01419830322265625,
-0.0127105712890625,
0.061248779296875,
0.05023193359375,
0.029083251953125,
0.0238494873046875,
-0.006435394287109375,
0.0260467529296875,
0.0226898193359375,
0.056549072265625,
0.0009379386901855469,
-0.01000213623046875,
-0.018310546875,
0.046112060546875,
0.033050537109375,
-0.01538848876953125,
0.0290069580078125,
-0.0013523101806640625,
-0.050750732421875,
-0.0157928466796875,
0.004436492919921875,
0.037994384765625,
-0.06842041015625,
-0.0176849365234375,
0.004016876220703125,
0.0014772415161132812,
-0.0241241455078125,
0.0007238388061523438,
0.0609130859375,
-0.041748046875,
-0.0005669593811035156,
0.0253753662109375,
0.022918701171875,
-0.0233612060546875,
0.0279541015625,
-0.0113067626953125,
0.0011339187622070312,
-0.0309295654296875,
-0.019012451171875,
0.0236053466796875,
0.0017671585083007812,
0.0282135009765625,
0.01055145263671875,
0.0255126953125,
-0.0192413330078125,
-0.019317626953125,
0.0239715576171875,
0.04156494140625,
-0.07562255859375,
0.0260772705078125,
0.036346435546875,
0.0211334228515625,
0.03460693359375,
0.08563232421875,
0.001461029052734375,
0.0134124755859375,
-0.038970947265625,
-0.0198974609375,
0.01212310791015625,
-0.012847900390625,
0.008544921875,
-0.034912109375,
-0.007251739501953125,
-0.055633544921875,
-0.0145721435546875,
-0.032318115234375,
-0.0024700164794921875,
0.0292510986328125,
0.045166015625,
0.00667572021484375,
0.042327880859375,
-0.07049560546875,
-0.03424072265625,
-0.01183319091796875,
-0.031982421875,
-0.00909423828125,
0.0355224609375,
0.033721923828125,
0.041717529296875,
-0.035675048828125,
-0.0246429443359375,
-0.0002865791320800781,
-0.002422332763671875,
-0.0657958984375,
0.0275421142578125,
-0.040557861328125,
-0.032440185546875,
-0.032562255859375,
0.03857421875,
0.034210205078125,
0.019134521484375,
0.01512908935546875,
0.0184783935546875,
0.02703857421875,
0.0064239501953125,
0.01800537109375,
-0.01068878173828125,
-0.0034885406494140625,
-0.0313720703125,
-0.005458831787109375,
-0.007354736328125,
-0.0023593902587890625,
-0.019927978515625,
0.02166748046875,
-0.00693511962890625,
-0.015838623046875,
0.00426483154296875,
0.0054473876953125,
-0.017608642578125,
0.04852294921875,
0.045623779296875,
0.04364013671875,
0.0296783447265625,
-0.025146484375,
-0.027984619140625,
-0.00287628173828125,
0.00931549072265625,
0.0245513916015625,
0.031280517578125,
-0.024505615234375,
0.054901123046875,
0.0126800537109375,
-0.022064208984375,
-0.0172271728515625,
0.018524169921875,
-0.005779266357421875,
0.0112762451171875,
0.011138916015625,
0.012420654296875,
-0.00322723388671875,
-0.0088958740234375,
0.00897216796875,
0.02374267578125,
0.032623291015625,
0.045013427734375,
-0.0182037353515625,
0.0305938720703125,
-0.0008983612060546875,
0.0259857177734375,
-0.0009050369262695312,
-0.020233154296875,
0.06658935546875,
0.000019311904907226562,
-0.0171051025390625,
-0.0251617431640625,
-0.045745849609375,
-0.01519775390625,
0.04876708984375,
-0.044677734375,
0.0018320083618164062,
0.007251739501953125,
0.01561737060546875,
-0.040130615234375,
0.022003173828125,
-0.0046539306640625,
-0.0233154296875,
-0.033966064453125,
-0.00775146484375,
0.03204345703125,
0.0294647216796875,
-0.01708984375,
-0.0045623779296875,
0.010345458984375,
-0.006374359130859375,
0.01837158203125,
0.0379638671875,
0.0149688720703125,
0.0259552001953125,
-0.034271240234375,
-0.0272064208984375,
0.03875732421875,
0.005367279052734375,
0.02471923828125,
0.021087646484375,
0.03155517578125,
0.056671142578125,
-0.08294677734375,
-0.00034117698669433594,
0.0404052734375,
0.02569580078125,
-0.00676727294921875,
0.01047515869140625,
0.019927978515625,
-0.038055419921875,
0.007266998291015625,
-0.024658203125,
-0.02435302734375,
-0.0443115234375,
-0.00501251220703125,
0.01276397705078125,
-0.0227203369140625,
-0.0313720703125,
-0.023101806640625,
0.02056884765625,
0.046875,
0.0299072265625,
-0.07781982421875,
0.050750732421875,
-0.00978851318359375,
0.02459716796875,
0.017852783203125,
0.01419830322265625,
-0.0330810546875,
-0.034271240234375,
-0.03668212890625,
-0.042449951171875,
-0.0660400390625,
0.0487060546875,
-0.061798095703125,
-0.00909423828125,
-0.00380706787109375,
0.003387451171875,
0.00978851318359375,
-0.018463134765625,
0.01192474365234375,
0.0323486328125,
0.0115966796875,
-0.04534912109375,
-0.00372314453125,
0.00786590576171875,
0.0283355712890625,
0.00018966197967529297,
0.00435638427734375,
-0.027435302734375,
-0.01494598388671875,
-0.0154876708984375,
-0.00411224365234375,
-0.0022296905517578125,
-0.033599853515625,
-0.023162841796875,
0.05963134765625,
0.00183868408203125,
-0.0214996337890625,
-0.03436279296875,
0.04351806640625,
-0.007495880126953125,
0.0228424072265625,
0.006061553955078125,
0.0167694091796875,
0.0186767578125,
0.01751708984375,
-0.006877899169921875,
0.0258941650390625,
-0.01126861572265625,
-0.0033168792724609375,
0.0024871826171875,
0.042022705078125,
0.040740966796875,
-0.005413055419921875,
0.00035309791564941406,
-0.00054931640625,
0.042266845703125,
0.044891357421875,
-0.016845703125,
0.05645751953125,
0.01461029052734375,
-0.01323699951171875,
0.00824737548828125,
0.002681732177734375,
0.001529693603515625,
0.002986907958984375,
0.0083160400390625,
0.019775390625,
-0.0128173828125,
-0.00559234619140625,
-0.050537109375,
-0.028961181640625,
0.0228271484375,
-0.0028362274169921875,
0.0016021728515625,
-0.046844482421875,
0.006481170654296875,
0.017822265625,
-0.01546478271484375,
-0.0174102783203125,
-0.01806640625,
-0.050201416015625,
-0.01361846923828125,
0.0022106170654296875,
0.0426025390625,
-0.058197021484375,
0.04266357421875,
0.0310516357421875,
-0.025665283203125,
-0.00290679931640625,
-0.018951416015625,
-0.005645751953125,
0.0224761962890625,
0.00565338134765625,
0.038604736328125,
0.052978515625,
-0.060516357421875,
0.01354217529296875,
0.0120849609375,
0.03704833984375,
-0.04901123046875,
-0.0262603759765625,
-0.04266357421875,
0.005889892578125,
0.007080078125,
-0.005336761474609375,
0.01204681396484375,
0.0253753662109375,
0.0110626220703125,
0.07781982421875,
0.0183563232421875,
0.10577392578125,
0.0109405517578125,
0.050537109375,
0.016937255859375,
-0.021759033203125,
0.0274658203125,
-0.0220794677734375,
-0.0162811279296875,
-0.00772857666015625,
-0.0230560302734375,
-0.09808349609375,
0.053375244140625,
0.01079559326171875,
0.01763916015625,
0.045257568359375
]
|
64ac4248445a81fbd0988fe1ffc49dd947934f56 | Wordpress Stackexchange
Q: Get Current user email as a return string value if(strpos($query, '%get_email%') !== false){
$query = str_replace('%get_email%', get_the_author_meta( 'user_email' ), $query);
}
Okay so am trying to make a MySQL query and in the plugin I am trying to add a shortcode %get_email% but anyway its not returning any email in the actual query.
Like
select* from tablename where email='%get_email%';
Any idea on how to do that?
Here what is working for id -
if(strpos($query, '%CURRENT_USER_ID%') !== false){
$query = str_replace('%CURRENT_USER_ID%', get_current_user_id(), $query);
}
A: I will approach like this:
global $current_user;
get_currentuserinfo();
$email = (string) $current_user->user_email;
var_dump($email);
You just called got the email from the current_user array and cast it into string :) that's it
| Q: Get Current user email as a return string value if(strpos($query, '%get_email%') !== false){
$query = str_replace('%get_email%', get_the_author_meta( 'user_email' ), $query);
}
Okay so am trying to make a MySQL query and in the plugin I am trying to add a shortcode %get_email% but anyway its not returning any email in the actual query.
Like
select* from tablename where email='%get_email%';
Any idea on how to do that?
Here what is working for id -
if(strpos($query, '%CURRENT_USER_ID%') !== false){
$query = str_replace('%CURRENT_USER_ID%', get_current_user_id(), $query);
}
A: I will approach like this:
global $current_user;
get_currentuserinfo();
$email = (string) $current_user->user_email;
var_dump($email);
You just called got the email from the current_user array and cast it into string :) that's it
A: Download/Install the PHPCode Snippets WordPress Plugin,
Then just create a shortcode with this content (exactly as follows);
<?php
$current_user = wp_get_current_user();
echo $current_user->user_email;
A: If you just need to "Get Current user email as a return string value" then you can simply do this by using following function
// Add this function in your functions.php or in your plugin
function mm_get_current_user_email(){
global $current_user;
get_currentuserinfo();
$email = $current_user->user_email;
return $email;
}
add_shortcode( 'get_email', 'mm_get_current_user_email');
Then you can get current user email as string where ever you want by simply using [get_email] or <?php echo do_shortcode( '[get_email]' ); ?>
For more on get_currentuserinfo() visit WordPress Codex.
A: Mile response is ok but there is no need to call an extra function.
you can just use like this :
global $current_user;
$email = $current_user->user_email;
| wordpress | {
"language": "en",
"length": 248,
"provenance": "stackexchange_00019.jsonl.gz:455815",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/189151"
} | [
0.027923583984375,
-0.0247039794921875,
-0.035919189453125,
-0.0264434814453125,
0.003570556640625,
-0.032989501953125,
0.029876708984375,
0.00821685791015625,
0.004711151123046875,
0.06591796875,
-0.00701904296875,
0.007526397705078125,
0.0019311904907226562,
-0.0019016265869140625,
-0.038177490234375,
-0.013916015625,
0.0257568359375,
-0.0136871337890625,
-0.00846099853515625,
-0.0184478759765625,
-0.01275634765625,
0.007080078125,
-0.0161285400390625,
0.03363037109375,
0.002895355224609375,
0.0009751319885253906,
0.09613037109375,
-0.028961181640625,
0.01148223876953125,
-0.01406097412109375,
0.0088348388671875,
-0.0227508544921875,
0.027496337890625,
0.0484619140625,
-0.052154541015625,
0.0256805419921875,
0.0239410400390625,
0.00720977783203125,
0.0076141357421875,
0.0256195068359375,
0.025390625,
0.0005850791931152344,
-0.045013427734375,
-0.00930023193359375,
-0.0521240234375,
-0.057952880859375,
0.03985595703125,
0.0206146240234375,
0.0163726806640625,
0.090087890625,
0.031402587890625,
0.04718017578125,
0.008575439453125,
0.0018091201782226562,
0.016021728515625,
0.017669677734375,
-0.044647216796875,
-0.03839111328125,
0.01605224609375,
-0.0023250579833984375,
0.013885498046875,
-0.0152435302734375,
0.033538818359375,
0.0199127197265625,
-0.00225067138671875,
0.00374603271484375,
0.0283355712890625,
0.00679779052734375,
0.0161895751953125,
-0.00018990039825439453,
-0.0004506111145019531,
0.0195770263671875,
0.0203857421875,
-0.0162506103515625,
-0.028778076171875,
0.0015249252319335938,
0.021331787109375,
-0.006191253662109375,
0.0014677047729492188,
-0.01294708251953125,
-0.03594970703125,
-0.015106201171875,
-0.09234619140625,
0.0472412109375,
-0.0231475830078125,
0.055389404296875,
-0.0207366943359375,
-0.015899658203125,
0.003818511962890625,
0.005794525146484375,
-0.01102447509765625,
0.006687164306640625,
0.00949859619140625,
0.01531982421875,
-0.0311279296875,
-0.025390625,
0.0164337158203125,
0.06915283203125,
-0.0196685791015625,
0.00004845857620239258,
-0.0242767333984375,
-0.0099334716796875,
-0.03619384765625,
-0.03436279296875,
-0.0151519775390625,
0.01461029052734375,
0.0081329345703125,
0.00788116455078125,
-0.00278472900390625,
0.025238037109375,
0.00384521484375,
-0.033599853515625,
-0.058929443359375,
-0.029205322265625,
-0.0159454345703125,
0.058441162109375,
-0.043548583984375,
-0.0260162353515625,
-0.003936767578125,
-0.00958251953125,
0.0096588134765625,
0.0308837890625,
-0.004367828369140625,
-0.056427001953125,
-0.01312255859375,
-0.03668212890625,
-0.0279541015625,
-0.016815185546875,
-0.041107177734375,
0.045562744140625,
-0.02947998046875,
0.0003383159637451172,
0.05084228515625,
0.058746337890625,
0.015838623046875,
-0.035797119140625,
-0.012237548828125,
-0.049072265625,
0.0160980224609375,
0.00753021240234375,
-0.011688232421875,
0.0022258758544921875,
0.036651611328125,
-0.0192413330078125,
-0.032257080078125,
0.0116424560546875,
0.007472991943359375,
0.00896453857421875,
-0.01458740234375,
-0.031402587890625,
-0.041656494140625,
0.006336212158203125,
0.008392333984375,
0.02642822265625,
0.00736236572265625,
0.03424072265625,
0.00045037269592285156,
-0.0096893310546875,
0.00792694091796875,
0.01033782958984375,
0.06298828125,
-0.0157012939453125,
-0.043792724609375,
-0.0005717277526855469,
-0.0400390625,
0.01197052001953125,
-0.03973388671875,
-0.00614166259765625,
0.0159149169921875,
-0.01885986328125,
0.02850341796875,
0.016845703125,
0.0433349609375,
-0.0021686553955078125,
-0.0191497802734375,
-0.0174102783203125,
-0.040374755859375,
0.0152130126953125,
0.049041748046875,
0.0001590251922607422,
-0.0202178955078125,
-0.035125732421875,
0.04840087890625,
-0.005130767822265625,
-0.01392364501953125,
0.03961181640625,
-0.006343841552734375,
0.0214385986328125,
0.023773193359375,
0.0064697265625,
-0.00800323486328125,
0.0438232421875,
-0.006805419921875,
-0.00740814208984375,
0.019073486328125,
-0.0230560302734375,
0.0164337158203125,
-0.0021495819091796875,
-0.0013980865478515625,
-0.002346038818359375,
0.026275634765625,
-0.01268768310546875,
0.0183563232421875,
-0.0243072509765625,
-0.0693359375,
0.0005006790161132812,
-0.0183868408203125,
0.0276031494140625,
-0.0305633544921875,
-0.00655364990234375,
0.01544952392578125,
-0.0281524658203125,
-0.037200927734375,
0.0562744140625,
0.005260467529296875,
0.0210723876953125,
-0.03131103515625,
0.04425048828125,
-0.026702880859375,
0.06256103515625,
-0.03173828125,
-0.0242462158203125,
-0.0157012939453125,
0.01004791259765625,
0.00994873046875,
-0.017181396484375,
-0.006320953369140625,
-0.022369384765625,
0.01270294189453125,
-0.005279541015625,
0.0026683807373046875,
-0.002254486083984375,
0.00852203369140625,
0.01953125,
-0.037811279296875,
0.006168365478515625,
-0.01006317138671875,
0.005573272705078125,
0.00235748291015625,
0.036712646484375,
0.048126220703125,
0.0295257568359375,
0.0229644775390625,
-0.00986480712890625,
0.03961181640625,
-0.010833740234375,
0.0452880859375,
-0.052703857421875,
0.0094451904296875,
0.060638427734375,
-0.01184844970703125,
0.0118865966796875,
-0.0001837015151977539,
-0.01763916015625,
0.00007921457290649414,
0.044219970703125,
-0.021820068359375,
0.006988525390625,
-0.041015625,
0.0188446044921875,
0.0010738372802734375,
-0.0011615753173828125,
0.0145111083984375,
-0.0093231201171875,
-0.0249481201171875,
0.0175628662109375,
0.01277923583984375,
0.01219940185546875,
-0.00797271728515625,
-0.01300811767578125,
0.00649261474609375,
0.01477813720703125,
0.007007598876953125,
-0.00921630859375,
-0.0202484130859375,
0.042205810546875,
-0.03338623046875,
-0.006656646728515625,
0.051605224609375,
0.00955963134765625,
-0.01226043701171875,
-0.023040771484375,
-0.01456451416015625,
-0.0048980712890625,
0.045196533203125,
0.0017671585083007812,
0.0099029541015625,
-0.0091705322265625,
0.04754638671875,
0.0115814208984375,
0.0340576171875,
0.00878143310546875,
-0.0220947265625,
0.0745849609375,
-0.031402587890625,
-0.030853271484375,
0.0191802978515625,
-0.0217132568359375,
0.0411376953125,
-0.029022216796875,
-0.00301361083984375,
0.0462646484375,
0.006824493408203125,
-0.004215240478515625,
-0.00992584228515625,
-0.04052734375,
-0.045989990234375,
0.020050048828125,
0.005626678466796875,
-0.0254669189453125,
-0.0257110595703125,
0.08489990234375,
0.03668212890625,
0.061859130859375,
-0.027374267578125,
-0.04730224609375,
-0.02532958984375,
0.020477294921875,
-0.06195068359375,
-0.05963134765625,
0.02008056640625,
-0.052459716796875,
-0.027069091796875,
-0.01117706298828125,
-0.0230255126953125,
0.01230621337890625,
0.0026988983154296875,
-0.0019989013671875,
0.0347900390625,
-0.07574462890625,
-0.09521484375,
-0.06768798828125,
-0.094482421875,
0.035125732421875,
-0.0033130645751953125,
0.01556396484375,
-0.01042938232421875,
0.034088134765625,
-0.0019521713256835938,
-0.05706787109375,
-0.02117919921875,
0.0423583984375,
-0.0081939697265625,
-0.009307861328125,
0.01424407958984375,
-0.009002685546875,
-0.01332855224609375,
0.0216522216796875,
0.0012645721435546875,
0.0074920654296875,
-0.0217742919921875,
-0.0187225341796875,
0.01233673095703125,
0.011322021484375,
0.0438232421875,
-0.029815673828125,
-0.046295166015625,
0.07305908203125,
0.0540771484375,
-0.01146697998046875,
-0.0121307373046875,
-0.006839752197265625,
-0.0288238525390625,
0.036712646484375,
-0.0041046142578125,
-0.003021240234375,
0.01181793212890625,
0.0171356201171875,
0.03363037109375,
0.005176544189453125,
0.017181396484375,
0.00701141357421875,
-0.00273895263671875,
0.00438690185546875,
0.03216552734375,
-0.016021728515625,
0.046142578125,
-0.006153106689453125,
-0.0200347900390625,
0.0120086669921875,
0.0135498046875,
-0.0144195556640625,
0.0081329345703125,
-0.017913818359375,
-0.039794921875,
0.054473876953125,
0.016632080078125,
0.02392578125,
-0.03228759765625,
-0.036865234375,
-0.00751495361328125,
0.0977783203125,
0.030364990234375,
-0.01145172119140625,
0.0080413818359375,
-0.0095062255859375,
-0.06494140625,
-0.01934814453125,
-0.0841064453125,
0.0048675537109375,
-0.0250396728515625,
-0.02935791015625,
-0.032196044921875,
-0.0169219970703125,
-0.01194000244140625,
-0.052337646484375,
-0.01910400390625,
-0.04205322265625,
0.01160430908203125,
-0.0255279541015625,
0.00909423828125,
0.0226287841796875,
-0.022613525390625,
-0.001110076904296875,
0.0037174224853515625,
-0.0413818359375,
-0.017730712890625,
-0.0156097412109375,
0.0027523040771484375,
0.019073486328125,
-0.003826141357421875,
0.030914306640625,
-0.05047607421875,
0.0101470947265625,
-0.0306549072265625,
-0.020355224609375,
0.0133209228515625,
0.038665771484375,
0.025390625,
0.0029354095458984375,
-0.0085906982421875,
-0.01177215576171875,
-0.005615234375,
-0.0122222900390625,
0.01142120361328125,
-0.0244903564453125,
-0.053741455078125,
-0.039459228515625,
-0.0312042236328125,
-0.0211029052734375,
-0.016632080078125,
-0.0090484619140625,
0.004276275634765625,
0.03240966796875,
-0.00579071044921875,
-0.006755828857421875,
0.01372528076171875,
-0.0285797119140625,
0.06829833984375,
0.020050048828125,
-0.0247955322265625,
-0.0118560791015625,
0.037994384765625,
0.0106964111328125,
-0.0528564453125,
-0.013275146484375,
0.016937255859375,
0.0594482421875,
-0.006626129150390625,
0.034393310546875,
0.035736083984375,
-0.058685302734375,
0.046173095703125,
0.04229736328125,
0.0182952880859375,
-0.033294677734375,
0.052276611328125,
-0.01245880126953125,
-0.01325225830078125,
0.0276947021484375,
0.0013780593872070312,
-0.007205963134765625,
-0.016448974609375,
-0.00585174560546875,
-0.047027587890625,
-0.0121307373046875,
0.031219482421875,
-0.0143280029296875,
0.07061767578125,
0.00699615478515625,
-0.08319091796875,
0.0251922607421875,
-0.03424072265625,
-0.01380157470703125,
0.01507568359375,
-0.0045013427734375,
0.043426513671875,
0.01052093505859375,
-0.035064697265625,
-0.0029659271240234375,
-0.030853271484375,
0.01078033447265625,
0.01971435546875,
-0.0633544921875,
-0.014678955078125,
0.01442718505859375,
-0.007476806640625,
0.0711669921875,
0.01418304443359375,
-0.028289794921875,
0.0060577392578125,
-0.037872314453125,
-0.0445556640625,
0.0015249252319335938,
-0.0323486328125,
0.049774169921875,
0.070556640625,
-0.025238037109375,
-0.004741668701171875,
-0.03521728515625,
0.0266876220703125,
-0.060516357421875,
0.0189056396484375,
-0.0006895065307617188,
-0.00537872314453125,
0.0036106109619140625,
0.07708740234375,
-0.0032825469970703125,
0.04766845703125,
-0.013153076171875,
-0.01434326171875,
-0.01104736328125,
0.0309295654296875,
0.039398193359375,
-0.00481414794921875,
-0.006618499755859375,
0.002410888671875,
0.004436492919921875,
-0.01107025146484375,
0.016387939453125,
0.01369476318359375,
0.017364501953125,
0.002162933349609375,
-0.015869140625,
0.01397705078125,
-0.0283355712890625,
0.0009374618530273438,
0.05157470703125,
0.0232696533203125,
-0.01103973388671875,
-0.04583740234375,
-0.0247650146484375,
0.0347900390625,
0.00548553466796875,
-0.0037517547607421875,
0.0092620849609375,
-0.006816864013671875,
0.0222625732421875,
0.042266845703125,
0.00991058349609375,
-0.0190277099609375,
-0.031829833984375,
-0.010040283203125,
-0.0207061767578125,
-0.0049591064453125,
0.0028629302978515625,
0.018951416015625,
-0.033233642578125,
-0.04217529296875,
0.041839599609375,
0.0202789306640625,
0.03271484375,
-0.0673828125,
-0.0001537799835205078,
-0.049957275390625,
-0.03717041015625,
0.065673828125,
0.025604248046875,
-0.04718017578125,
0.01282501220703125,
-0.0394287109375,
0.004245758056640625,
0.0159149169921875,
-0.0169830322265625,
-0.0245361328125,
-0.02276611328125,
0.01081085205078125,
0.046142578125,
-0.007427215576171875,
-0.055938720703125,
-0.026336669921875,
-0.038482666015625,
0.0171661376953125,
0.05413818359375,
-0.001739501953125,
0.044525146484375,
0.01215362548828125,
0.0631103515625,
0.014434814453125,
0.0279693603515625,
-0.0283203125,
-0.0311279296875,
-0.0017156600952148438,
-0.01293182373046875,
-0.015625,
-0.005535125732421875,
0.00569915771484375,
-0.014862060546875,
0.0234222412109375,
0.002788543701171875,
-0.0225067138671875,
-0.0016965866088867188,
-0.0032062530517578125,
-0.010223388671875,
0.0462646484375,
0.051483154296875,
-0.006900787353515625,
0.0060882568359375,
-0.023773193359375,
-0.0293731689453125,
0.003337860107421875,
0.01546478271484375,
-0.019378662109375,
0.0010309219360351562,
-0.030609130859375,
0.005344390869140625,
0.0080108642578125,
0.067138671875,
0.0889892578125,
-0.05096435546875,
0.0244293212890625,
0.0272064208984375,
-0.0213165283203125,
0.0194091796875,
0.01171112060546875,
-0.0113677978515625,
-0.005855560302734375,
0.0775146484375,
0.0171356201171875,
-0.05023193359375,
0.0404052734375,
-0.0460205078125,
0.032318115234375,
0.06390380859375,
0.089599609375,
-0.09710693359375,
0.020477294921875,
0.02783203125,
-0.00629425048828125,
0.01424407958984375,
0.029266357421875,
-0.0008683204650878906,
-0.029815673828125,
0.005069732666015625,
-0.0011997222900390625,
-0.00363922119140625,
0.00691986083984375,
0.0092926025390625,
-0.00963592529296875,
-0.041900634765625,
0.04443359375,
0.00019621849060058594,
-0.007015228271484375,
-0.0023479461669921875,
-0.01548004150390625,
-0.00638580322265625,
-0.00835418701171875,
0.016357421875,
0.02130126953125,
-0.007427215576171875,
-0.046356201171875,
0.03778076171875,
0.01381683349609375,
-0.0245208740234375,
-0.033966064453125,
0.004230499267578125,
0.0179443359375,
0.0399169921875,
-0.00946807861328125,
-0.034423828125,
0.03204345703125,
-0.01995849609375,
-0.0032634735107421875,
-0.0287017822265625,
-0.041290283203125,
0.027313232421875,
-0.054046630859375,
0.004486083984375,
-0.02484130859375,
0.03289794921875,
-0.0014429092407226562,
-0.006011962890625,
0.08154296875,
-0.03778076171875,
-0.025390625,
0.0200958251953125,
-0.02777099609375,
-0.02117919921875,
-0.023834228515625,
-0.0169219970703125,
-0.0238189697265625,
0.008697509765625,
-0.035552978515625,
-0.0215301513671875,
0.01397705078125,
-0.0517578125,
-0.0682373046875,
0.037567138671875,
-0.0227203369140625,
0.04620361328125,
0.01261138916015625,
-0.0032596588134765625,
0.02008056640625,
-0.015106201171875,
-0.02734375,
0.048553466796875,
-0.03729248046875,
0.054901123046875,
-0.05670166015625,
-0.006748199462890625,
0.033294677734375,
0.03753662109375,
0.0682373046875,
0.025115966796875,
-0.0119171142578125,
-0.0067596435546875,
0.028076171875,
-0.001911163330078125,
-0.035736083984375,
0.039398193359375,
0.021575927734375,
0.041717529296875,
0.10113525390625,
-0.03887939453125,
0.0294189453125,
0.01471710205078125,
0.00720977783203125,
0.0477294921875,
-0.001007080078125,
-0.0141754150390625,
-0.009429931640625,
0.0161590576171875,
-0.0010356903076171875,
-0.01560211181640625,
-0.0002498626708984375,
-0.049468994140625,
-0.01336669921875,
0.053802490234375,
0.033111572265625,
-0.064208984375,
0.0149078369140625,
-0.047027587890625,
0.05029296875,
-0.006183624267578125,
0.0182342529296875,
0.0506591796875,
0.018280029296875,
0.06134033203125,
0.0096282958984375,
0.01983642578125,
-0.01378631591796875,
0.0186920166015625,
0.06402587890625,
-0.0153961181640625,
-0.00740814208984375,
-0.10198974609375,
-0.0171661376953125,
0.078125,
0.0966796875,
-0.04754638671875,
-0.0298309326171875,
0.00516510009765625,
0.0006055831909179688,
0.0228271484375,
0.0032978057861328125,
0.0164947509765625,
0.0255279541015625,
0.028533935546875,
-0.05487060546875,
-0.0010890960693359375,
0.035247802734375,
0.01107025146484375,
-0.007167816162109375,
-0.0207977294921875,
0.0026798248291015625,
-0.0107421875,
-0.045867919921875,
0.002033233642578125,
0.00775146484375,
0.0070037841796875,
0.0177459716796875,
0.0230560302734375,
0.047698974609375,
-0.004913330078125,
-0.0005350112915039062,
-0.0038242340087890625,
-0.0200653076171875,
-0.00087738037109375,
-0.019775390625,
-0.000014722347259521484,
-0.031219482421875,
0.025146484375,
0.01678466796875,
-0.053985595703125,
0.012664794921875,
0.0099029541015625,
-0.0309295654296875,
-0.03192138671875,
-0.0267333984375,
-0.006198883056640625,
0.009307861328125,
-0.01381683349609375,
0.0287628173828125,
-0.0004177093505859375,
0.0004343986511230469,
-0.0284881591796875,
0.051513671875,
0.01552581787109375,
-0.009796142578125,
0.050048828125,
-0.00762939453125,
0.034149169921875,
0.0269775390625,
-0.0188140869140625,
-0.0004487037658691406,
0.01325225830078125,
-0.043670654296875,
-0.01186370849609375,
-0.02606201171875,
-0.005062103271484375,
-0.00131988525390625,
0.031097412109375,
0.0134735107421875,
0.0214996337890625,
0.01100921630859375,
-0.03125,
0.00884246826171875,
-0.003368377685546875,
0.0325927734375,
-0.0069427490234375,
-0.01160430908203125,
-0.005657196044921875,
-0.038238525390625,
-0.006137847900390625,
0.0122833251953125,
-0.0299224853515625,
0.0221099853515625,
0.002628326416015625,
0.04241943359375,
-0.0005669593811035156,
-0.03253173828125,
0.00885009765625,
-0.06634521484375,
-0.0394287109375,
0.038330078125,
-0.05743408203125,
-0.043975830078125,
0.0299835205078125,
-0.05645751953125,
0.0020198822021484375,
0.048736572265625,
0.01113128662109375,
0.007068634033203125,
-0.015380859375,
0.026947021484375,
-0.0111541748046875,
-0.0006704330444335938,
-0.020538330078125,
-0.02203369140625,
-0.0096435546875,
-0.0181121826171875,
0.0268707275390625,
0.0208892822265625,
0.0028076171875,
0.03350830078125,
0.022491455078125,
-0.02276611328125,
0.0202178955078125,
-0.031982421875,
0.042205810546875,
0.032562255859375,
-0.01439666748046875,
0.036376953125,
0.00492095947265625,
-0.029388427734375,
0.03387451171875,
-0.00989532470703125,
0.028533935546875,
-0.006011962890625,
0.0091094970703125,
0.00829315185546875,
-0.0006537437438964844,
0.049530029296875,
0.0250091552734375,
0.011749267578125,
-0.0186309814453125,
0.005401611328125,
-0.0166168212890625,
-0.0867919921875,
-0.03680419921875,
-0.034942626953125,
-0.00321197509765625,
0.0269927978515625,
-0.0208740234375,
-0.035736083984375,
-0.060760498046875,
0.0095672607421875,
-0.007354736328125,
-0.00044417381286621094,
-0.03729248046875,
0.01364898681640625,
0.01284027099609375,
0.0261077880859375,
-0.02264404296875,
-0.004810333251953125,
0.0085296630859375,
0.038238525390625,
-0.038421630859375,
-0.029052734375,
-0.0303955078125,
0.0075836181640625,
-0.0160369873046875,
0.002765655517578125,
0.01666259765625,
0.0305633544921875,
-0.07415771484375,
0.039794921875,
-0.035614013671875,
0.0711669921875,
-0.0489501953125,
-0.0142974853515625,
0.00875091552734375,
0.01145172119140625,
-0.027374267578125,
-0.070556640625,
0.0189208984375,
-0.05987548828125,
0.004680633544921875,
-0.01270294189453125,
0.0178070068359375,
0.049285888671875,
-0.0261383056640625,
-0.06298828125,
0.049072265625,
-0.00778961181640625,
-0.0335693359375,
-0.0003724098205566406,
0.0218658447265625,
0.0203399658203125,
-0.035003662109375,
-0.0020236968994140625,
-0.055328369140625,
-0.0445556640625,
0.0006456375122070312,
0.03973388671875,
0.01229095458984375,
0.035369873046875,
0.042572021484375,
-0.08837890625,
-0.0020732879638671875,
-0.0399169921875,
0.0216522216796875,
-0.00818634033203125,
0.0034465789794921875,
0.007495880126953125,
0.0308837890625,
-0.00823211669921875,
-0.00098419189453125,
0.004962921142578125,
-0.023468017578125,
-0.042327880859375,
-0.053497314453125,
0.0127105712890625,
0.0223236083984375,
0.0712890625,
0.036285400390625,
-0.0014619827270507812,
-0.05328369140625,
-0.05731201171875,
0.0020465850830078125,
-0.008697509765625,
-0.0101776123046875,
0.0394287109375,
-0.09356689453125,
-0.004131317138671875,
0.004726409912109375,
-0.039947509765625,
-0.0047607421875,
-0.0310211181640625,
-0.0654296875,
0.01385498046875,
-0.039337158203125,
-0.002742767333984375,
-0.015655517578125,
-0.031829833984375,
0.042236328125,
-0.031463623046875,
-0.0203094482421875,
0.02911376953125,
0.005680084228515625,
0.01174163818359375,
0.035125732421875,
0.0177001953125,
-0.0038051605224609375,
0.0096588134765625,
-0.00882720947265625,
0.03692626953125,
-0.01910400390625,
0.0389404296875,
-0.029998779296875,
-0.014495849609375,
0.044342041015625,
-0.01445770263671875,
0.04180908203125,
0.01456451416015625,
0.047882080078125,
0.0187225341796875,
0.05340576171875,
-0.0063934326171875,
-0.0122833251953125,
-0.028228759765625,
0.041534423828125,
0.00632476806640625,
-0.0144195556640625,
0.0312347412109375,
-0.0254364013671875,
0.0025787353515625,
0.0274810791015625,
0.057708740234375,
-0.0160369873046875,
0.0219879150390625,
0.01776123046875,
0.04345703125,
0.0131072998046875
]
|
4297875025c582868a9f9aa717d3c0d1acf3c708 | Wordpress Stackexchange
Q: Wp_head and wp_footer vs wp_enqueue_script javascript files? I'm converting a bootstrap html website into Wordpress.
Now, all recommend using wp_enqueue_script() for registering javascript files. i.e.
function themeslug_enqueue_script() {
wp_enqueue_script( 'my-js', 'filename.js', false );
}
add_action( 'wp_enqueue_scripts', 'themeslug_enqueue_script' );
But I have some js files loading in the head and some other ones in the footer of the original html code.
I was going to use wp_head and wp_footer, is it ok to do so or better stick to wp_enqueue_script?
A: It looks like you've overlooked the 5th input parameter of:
wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );
Namely the boolean $in_footer part, that will put the script in the footer, if set as true, else in the header.
You can also use $deps to handle dependencies.
Check out the Codex for more info.
=> I would stick to wp_enqueue_script() and not manually place the scripts into the header or footer.
| Q: Wp_head and wp_footer vs wp_enqueue_script javascript files? I'm converting a bootstrap html website into Wordpress.
Now, all recommend using wp_enqueue_script() for registering javascript files. i.e.
function themeslug_enqueue_script() {
wp_enqueue_script( 'my-js', 'filename.js', false );
}
add_action( 'wp_enqueue_scripts', 'themeslug_enqueue_script' );
But I have some js files loading in the head and some other ones in the footer of the original html code.
I was going to use wp_head and wp_footer, is it ok to do so or better stick to wp_enqueue_script?
A: It looks like you've overlooked the 5th input parameter of:
wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );
Namely the boolean $in_footer part, that will put the script in the footer, if set as true, else in the header.
You can also use $deps to handle dependencies.
Check out the Codex for more info.
=> I would stick to wp_enqueue_script() and not manually place the scripts into the header or footer.
| wordpress | {
"language": "en",
"length": 151,
"provenance": "stackexchange_00019.jsonl.gz:455836",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/189232"
} | [
0.030853271484375,
0.00861358642578125,
-0.0408935546875,
-0.01971435546875,
0.019256591796875,
-0.04718017578125,
0.037445068359375,
0.002429962158203125,
-0.04083251953125,
-0.0064239501953125,
-0.03741455078125,
0.0268096923828125,
-0.04254150390625,
-0.0035552978515625,
0.0167388916015625,
-0.06646728515625,
0.052459716796875,
-0.037994384765625,
-0.0008292198181152344,
-0.0034809112548828125,
0.0037078857421875,
0.0207061767578125,
0.0228271484375,
0.10565185546875,
0.01227569580078125,
-0.08575439453125,
0.1097412109375,
0.00559234619140625,
0.0105133056640625,
-0.013702392578125,
0.019866943359375,
-0.012359619140625,
0.0182342529296875,
0.0184478759765625,
-0.011688232421875,
0.028076171875,
0.0204010009765625,
0.007488250732421875,
0.02728271484375,
0.018157958984375,
0.01165771484375,
0.00348663330078125,
0.022979736328125,
0.035919189453125,
-0.003063201904296875,
-0.032684326171875,
0.01398468017578125,
-0.035888671875,
-0.0165557861328125,
0.0158538818359375,
0.027130126953125,
-0.025146484375,
0.03289794921875,
-0.035552978515625,
0.0011091232299804688,
0.007476806640625,
-0.018646240234375,
-0.031646728515625,
0.00853729248046875,
0.0655517578125,
0.022857666015625,
0.00921630859375,
-0.0070037841796875,
-0.035888671875,
-0.0199127197265625,
0.00011092424392700195,
-0.038543701171875,
-0.00079345703125,
-0.031402587890625,
-0.00881195068359375,
0.0396728515625,
-0.0290679931640625,
-0.01971435546875,
0.001476287841796875,
-0.0027618408203125,
0.021514892578125,
-0.03900146484375,
0.0107421875,
0.0292816162109375,
0.034271240234375,
-0.00844573974609375,
-0.035797119140625,
-0.026397705078125,
-0.0226287841796875,
0.0026397705078125,
0.01175689697265625,
-0.004932403564453125,
-0.0044097900390625,
-0.037109375,
-0.0149993896484375,
-0.029296875,
-0.0210723876953125,
-0.0273284912109375,
-0.009429931640625,
-0.00608062744140625,
-0.00853729248046875,
0.0266265869140625,
0.020172119140625,
0.01263427734375,
0.007656097412109375,
0.037445068359375,
-0.05853271484375,
0.05096435546875,
-0.027191162109375,
0.006069183349609375,
0.08892822265625,
-0.0022907257080078125,
-0.058441162109375,
-0.0021495819091796875,
-0.006603240966796875,
0.023468017578125,
-0.0166473388671875,
0.032073974609375,
-0.008056640625,
0.002666473388671875,
-0.013946533203125,
-0.01468658447265625,
0.040985107421875,
0.0018339157104492188,
0.016204833984375,
0.011871337890625,
0.04168701171875,
-0.0178375244140625,
-0.033294677734375,
-0.01494598388671875,
-0.0294036865234375,
0.0067138671875,
-0.03497314453125,
-0.004169464111328125,
0.032257080078125,
-0.0106353759765625,
-0.01099395751953125,
0.056121826171875,
0.04412841796875,
-0.001453399658203125,
-0.0299224853515625,
0.0313720703125,
0.00247955322265625,
0.0067596435546875,
-0.0106658935546875,
0.007396697998046875,
-0.0211639404296875,
0.0021648406982421875,
-0.01050567626953125,
-0.0281219482421875,
0.003936767578125,
-0.002452850341796875,
0.0165863037109375,
0.0122222900390625,
-0.0362548828125,
0.0252838134765625,
-0.06951904296875,
0.027496337890625,
-0.00901031494140625,
-0.002193450927734375,
-0.032379150390625,
-0.010772705078125,
-0.022552490234375,
0.01324462890625,
-0.0347900390625,
-0.06298828125,
-0.00634765625,
0.01486968994140625,
-0.081787109375,
-0.036895751953125,
-0.0140533447265625,
0.01293182373046875,
0.0114898681640625,
0.017486572265625,
0.03399658203125,
-0.01233673095703125,
-0.028350830078125,
0.0006494522094726562,
0.00846099853515625,
-0.0006504058837890625,
0.0251007080078125,
0.00797271728515625,
0.01375579833984375,
0.0567626953125,
-0.0078887939453125,
-0.0237579345703125,
-0.0247650146484375,
0.0889892578125,
-0.041107177734375,
-0.05853271484375,
0.0122833251953125,
0.0233612060546875,
0.043182373046875,
0.004913330078125,
0.01230621337890625,
0.1064453125,
0.01111602783203125,
-0.01605224609375,
-0.01276397705078125,
-0.007350921630859375,
-0.02679443359375,
0.007843017578125,
-0.0065765380859375,
0.0010995864868164062,
0.01934814453125,
-0.0071868896484375,
0.006591796875,
0.035980224609375,
0.0088043212890625,
0.00794219970703125,
0.01544952392578125,
-0.017974853515625,
0.045135498046875,
0.0058135986328125,
0.018035888671875,
0.01309967041015625,
0.032379150390625,
-0.0239715576171875,
-0.0404052734375,
-0.03839111328125,
-0.0126495361328125,
-0.048431396484375,
0.0740966796875,
0.0010528564453125,
0.0094757080078125,
0.01422882080078125,
-0.0350341796875,
0.039764404296875,
0.01520538330078125,
-0.00792694091796875,
-0.0181884765625,
-0.023651123046875,
-0.02178955078125,
-0.0237579345703125,
-0.0025177001953125,
-0.003177642822265625,
0.059295654296875,
-0.001392364501953125,
0.0496826171875,
0.0002727508544921875,
-0.021026611328125,
0.001140594482421875,
-0.03021240234375,
0.0217437744140625,
0.0266876220703125,
0.033294677734375,
0.058319091796875,
-0.004283905029296875,
0.01012420654296875,
0.058502197265625,
-0.04119873046875,
0.0013208389282226562,
-0.0016622543334960938,
0.0283660888671875,
0.0263519287109375,
0.0174560546875,
-0.0355224609375,
0.035980224609375,
-0.0595703125,
-0.004505157470703125,
0.049102783203125,
-0.01294708251953125,
0.00647735595703125,
-0.01861572265625,
-0.00960540771484375,
0.0219879150390625,
-0.029205322265625,
-0.024871826171875,
-0.01406097412109375,
0.03631591796875,
-0.029296875,
-0.0011653900146484375,
-0.0216827392578125,
-0.031219482421875,
-0.0023174285888671875,
0.03607177734375,
-0.0244293212890625,
-0.0089874267578125,
0.04925537109375,
0.0216827392578125,
-0.01030731201171875,
-0.02685546875,
-0.01666259765625,
0.0184173583984375,
0.02642822265625,
-0.00028514862060546875,
-0.005374908447265625,
-0.041351318359375,
-0.00927734375,
0.0129241943359375,
-0.04595947265625,
0.0135498046875,
0.0312347412109375,
0.0380859375,
0.0198211669921875,
0.042633056640625,
0.023193359375,
0.00013828277587890625,
0.021881103515625,
0.04034423828125,
-0.015869140625,
0.0693359375,
-0.01861572265625,
0.0187225341796875,
-0.017852783203125,
0.054107666015625,
0.03656005859375,
-0.00963592529296875,
0.0010290145874023438,
-0.00011360645294189453,
0.022430419921875,
0.022186279296875,
-0.0282440185546875,
-0.0222625732421875,
-0.007801055908203125,
-0.031494140625,
0.0092926025390625,
0.02239990234375,
0.0626220703125,
0.009368896484375,
-0.04547119140625,
0.0226287841796875,
0.024078369140625,
-0.0670166015625,
-0.1065673828125,
-0.01386260986328125,
-0.07696533203125,
0.057952880859375,
0.0011205673217773438,
-0.0167694091796875,
-0.037017822265625,
0.05047607421875,
0.0311737060546875,
-0.0584716796875,
-0.0193634033203125,
-0.020782470703125,
-0.043975830078125,
-0.04693603515625,
0.039459228515625,
0.00628662109375,
0.00818634033203125,
-0.0023708343505859375,
-0.01097869873046875,
-0.00933837890625,
-0.0177459716796875,
0.002048492431640625,
0.0215606689453125,
0.0050811767578125,
-0.0238037109375,
0.0291595458984375,
-0.06500244140625,
-0.0189361572265625,
-0.01346588134765625,
-0.039886474609375,
0.00894927978515625,
0.01044464111328125,
0.016082763671875,
-0.035308837890625,
-0.0247802734375,
-0.0015869140625,
0.05291748046875,
0.0234832763671875,
-0.027130126953125,
0.03155517578125,
-0.0406494140625,
-0.0280914306640625,
0.0292205810546875,
-0.0231475830078125,
0.0007677078247070312,
0.0087127685546875,
-0.032745361328125,
0.0060577392578125,
0.006435394287109375,
0.06268310546875,
0.020111083984375,
-0.0239715576171875,
0.0134429931640625,
0.0670166015625,
0.03369140625,
0.055877685546875,
-0.03411865234375,
0.06231689453125,
-0.007602691650390625,
0.0119476318359375,
0.0280914306640625,
0.0057830810546875,
-0.0089569091796875,
-0.00682830810546875,
-0.046966552734375,
-0.038238525390625,
0.02734375,
-0.0289154052734375,
0.010833740234375,
-0.035797119140625,
-0.0060577392578125,
-0.003253936767578125,
0.080078125,
-0.0333251953125,
-0.003871917724609375,
0.0131378173828125,
0.01335906982421875,
-0.05743408203125,
-0.025238037109375,
-0.06134033203125,
-0.00644683837890625,
-0.034576416015625,
0.01461029052734375,
-0.0192718505859375,
-0.0014925003051757812,
-0.0196990966796875,
0.0350341796875,
-0.00655364990234375,
-0.0294342041015625,
0.03662109375,
-0.045379638671875,
0.006374359130859375,
0.026824951171875,
-0.000934600830078125,
-0.0195465087890625,
-0.0203399658203125,
-0.025787353515625,
-0.06878662109375,
-0.024200439453125,
-0.0290985107421875,
0.0936279296875,
0.03045654296875,
-0.030303955078125,
-0.005107879638671875,
0.05316162109375,
0.006320953369140625,
0.0229644775390625,
0.022247314453125,
0.0250396728515625,
-0.004199981689453125,
-0.0218658447265625,
0.016815185546875,
-0.04840087890625,
-0.0025005340576171875,
-0.03240966796875,
-0.08154296875,
-0.03460693359375,
-0.0131378173828125,
0.037322998046875,
0.029022216796875,
-0.019989013671875,
-0.0242156982421875,
-0.0015993118286132812,
-0.006084442138671875,
-0.0244598388671875,
0.0272216796875,
-0.051666259765625,
-0.0061798095703125,
-0.009033203125,
0.040740966796875,
-0.0111236572265625,
0.0144500732421875,
-0.00873565673828125,
0.037811279296875,
0.028717041015625,
-0.0172119140625,
0.023193359375,
0.054595947265625,
0.033782958984375,
0.0018291473388671875,
0.06903076171875,
-0.00292205810546875,
-0.0286865234375,
0.09637451171875,
0.0106048583984375,
-0.00714874267578125,
0.03533935546875,
0.0257415771484375,
0.025299072265625,
-0.01092529296875,
-0.00653076171875,
0.0452880859375,
-0.056549072265625,
0.007762908935546875,
-0.020172119140625,
0.021728515625,
-0.00836944580078125,
-0.027587890625,
-0.0130767822265625,
-0.0007367134094238281,
-0.006252288818359375,
-0.034759521484375,
0.0011844635009765625,
-0.046875,
0.07830810546875,
0.022247314453125,
-0.0011091232299804688,
0.036346435546875,
0.08026123046875,
0.0274200439453125,
0.013275146484375,
0.003665924072265625,
-0.02069091796875,
0.04278564453125,
0.0244598388671875,
0.010589599609375,
0.0050201416015625,
-0.007709503173828125,
0.011810302734375,
0.034088134765625,
-0.017608642578125,
-0.007617950439453125,
0.006114959716796875,
0.06024169921875,
-0.0304107666015625,
0.02099609375,
0.045501708984375,
0.021209716796875,
-0.01904296875,
-0.01071929931640625,
-0.0110931396484375,
-0.003612518310546875,
-0.049591064453125,
0.023681640625,
0.004924774169921875,
-0.01165008544921875,
-0.0149078369140625,
0.01776123046875,
0.007602691650390625,
0.006786346435546875,
-0.006702423095703125,
0.033660888671875,
0.005825042724609375,
0.054107666015625,
0.0147552490234375,
-0.0654296875,
0.0085296630859375,
0.0207977294921875,
-0.01300048828125,
-0.0297088623046875,
0.00860595703125,
-0.004467010498046875,
0.031646728515625,
-0.0124969482421875,
-0.00299072265625,
0.03753662109375,
-0.0171356201171875,
-0.006137847900390625,
0.0259552001953125,
-0.00218963623046875,
-0.0177154541015625,
-0.021636962890625,
-0.0167236328125,
0.03143310546875,
-0.0019588470458984375,
0.0172119140625,
0.0074310302734375,
0.02581787109375,
0.0186767578125,
0.0157318115234375,
-0.01285552978515625,
-0.01477813720703125,
-0.003986358642578125,
0.0162200927734375,
0.018310546875,
0.0009474754333496094,
-0.072509765625,
-0.046905517578125,
-0.0031147003173828125,
-0.0099945068359375,
0.02410888671875,
-0.039825439453125,
-0.0008478164672851562,
-0.0350341796875,
0.0439453125,
0.026763916015625,
0.0254364013671875,
0.0235443115234375,
0.0020294189453125,
-0.022613525390625,
-0.0251007080078125,
-0.054229736328125,
-0.0172271728515625,
-0.049224853515625,
-0.038360595703125,
-0.018310546875,
0.0196533203125,
-0.002262115478515625,
0.01500701904296875,
-0.040252685546875,
-0.060699462890625,
-0.00873565673828125,
0.01372528076171875,
0.01433563232421875,
0.036712646484375,
-0.053680419921875,
0.062286376953125,
0.033660888671875,
-0.00820159912109375,
-0.0035572052001953125,
0.040374755859375,
0.03070068359375,
-0.00511932373046875,
-0.014678955078125,
-0.07305908203125,
0.0035839080810546875,
-0.0125732421875,
0.010009765625,
0.047271728515625,
0.02178955078125,
0.01593017578125,
0.02947998046875,
0.0177459716796875,
0.012115478515625,
-0.0006575584411621094,
-0.0298919677734375,
0.021240234375,
-0.01480865478515625,
0.0673828125,
0.021820068359375,
0.007793426513671875,
-0.0266876220703125,
-0.021514892578125,
0.0198974609375,
0.0092315673828125,
0.0146026611328125,
-0.020843505859375,
-0.0302734375,
0.037872314453125,
0.035858154296875,
0.01873779296875,
0.03167724609375,
0.006427764892578125,
0.01312255859375,
0.0112457275390625,
0.046539306640625,
-0.0286102294921875,
-0.032012939453125,
0.018463134765625,
-0.01161956787109375,
-0.0131683349609375,
-0.0172271728515625,
-0.0081024169921875,
-0.01336669921875,
0.03436279296875,
0.035308837890625,
-0.06402587890625,
0.00704193115234375,
-0.0014438629150390625,
-0.01033782958984375,
-0.00916290283203125,
-0.0175628662109375,
0.015350341796875,
0.025604248046875,
0.0143585205078125,
0.0367431640625,
-0.01666259765625,
0.0271759033203125,
0.01517486572265625,
-0.0283966064453125,
-0.03070068359375,
-0.02935791015625,
0.006839752197265625,
-0.052459716796875,
0.047210693359375,
0.034088134765625,
-0.002872467041015625,
-0.007534027099609375,
0.0010633468627929688,
0.01067352294921875,
-0.035369873046875,
-0.039794921875,
0.0213775634765625,
-0.0270233154296875,
-0.015472412109375,
0.0028228759765625,
0.001861572265625,
0.042999267578125,
0.0276336669921875,
0.0079498291015625,
-0.0160980224609375,
0.0022106170654296875,
0.01132965087890625,
-0.00004214048385620117,
-0.0285491943359375,
0.0333251953125,
-0.01220703125,
-0.049102783203125,
0.0126495361328125,
-0.01317596435546875,
-0.04766845703125,
-0.017120361328125,
-0.058563232421875,
0.0220947265625,
-0.0091552734375,
-0.0180511474609375,
-0.007049560546875,
-0.003387451171875,
0.0147705078125,
-0.00832366943359375,
0.04833984375,
-0.07177734375,
-0.05706787109375,
0.0265350341796875,
-0.069580078125,
-0.048553466796875,
-0.0396728515625,
-0.0025997161865234375,
0.091552734375,
0.01276397705078125,
-0.028411865234375,
0.0191650390625,
0.051788330078125,
-0.0189056396484375,
0.03570556640625,
-0.01020050048828125,
0.039215087890625,
-0.012664794921875,
0.04412841796875,
-0.0066070556640625,
0.0008854866027832031,
0.039276123046875,
0.016998291015625,
0.0012273788452148438,
-0.01345062255859375,
0.0286407470703125,
0.0207977294921875,
0.08056640625,
0.0867919921875,
0.0347900390625,
-0.0465087890625,
-0.0199432373046875,
0.00888824462890625,
0.00028705596923828125,
-0.03729248046875,
0.0247802734375,
-0.057403564453125,
-0.035308837890625,
0.004062652587890625,
0.0087432861328125,
0.01500701904296875,
-0.026092529296875,
-0.039306640625,
-0.046783447265625,
0.01239776611328125,
0.01491546630859375,
0.055328369140625,
-0.03350830078125,
0.043060302734375,
-0.01168060302734375,
0.023651123046875,
-0.059600830078125,
-0.01009368896484375,
0.012115478515625,
0.00823211669921875,
0.007770538330078125,
0.0134735107421875,
0.01393890380859375,
0.01290130615234375,
0.0094451904296875,
0.00127410888671875,
0.04150390625,
-0.0247039794921875,
0.015350341796875,
0.035614013671875,
0.032989501953125,
-0.007144927978515625,
-0.01096343994140625,
0.025177001953125,
0.02398681640625,
-0.02813720703125,
0.0219573974609375,
-0.0016384124755859375,
0.0169830322265625,
0.008697509765625,
-0.049560546875,
0.012176513671875,
0.01025390625,
0.01473236083984375,
0.0274200439453125,
-0.01030731201171875,
-0.01050567626953125,
-0.0192718505859375,
0.00286102294921875,
0.0186920166015625,
0.02783203125,
0.0489501953125,
-0.06439208984375,
0.034027099609375,
0.0228118896484375,
0.07244873046875,
0.0289764404296875,
0.034332275390625,
-0.0152435302734375,
-0.033721923828125,
-0.0263214111328125,
0.061004638671875,
-0.0083160400390625,
0.04248046875,
-0.058685302734375,
-0.03167724609375,
-0.0215606689453125,
0.051483154296875,
0.01038360595703125,
0.0323486328125,
0.04278564453125,
0.04266357421875,
-0.0256195068359375,
0.00273895263671875,
0.0509033203125,
-0.0141448974609375,
0.029052734375,
0.025665283203125,
-0.00815582275390625,
-0.003032684326171875,
-0.0181427001953125,
-0.02154541015625,
0.07122802734375,
-0.01270294189453125,
-0.00939178466796875,
0.002826690673828125,
0.0034942626953125,
-0.034759521484375,
0.02734375,
0.025665283203125,
0.0797119140625,
0.02874755859375,
0.0007710456848144531,
-0.01971435546875,
0.0233001708984375,
-0.022613525390625,
0.0166778564453125,
0.045196533203125,
-0.004070281982421875,
0.00949859619140625,
0.05694580078125,
-0.0199737548828125,
0.0124359130859375,
0.00983428955078125,
0.02728271484375,
0.0142974853515625,
0.0372314453125,
0.0372314453125,
-0.0174560546875,
-0.0111541748046875,
0.008087158203125,
0.042083740234375,
-0.01165008544921875,
0.0268096923828125,
-0.02008056640625,
0.01282501220703125,
0.040008544921875,
-0.0134124755859375,
0.019622802734375,
0.02801513671875,
0.005374908447265625,
-0.01317596435546875,
-0.00211334228515625,
-0.0171966552734375,
-0.0791015625,
0.017547607421875,
0.00707244873046875,
0.0177154541015625,
-0.0012035369873046875,
-0.0038394927978515625,
0.0289306640625,
0.0253448486328125,
-0.0198516845703125,
-0.03546142578125,
-0.053375244140625,
-0.0204925537109375,
0.02447509765625,
-0.00022983551025390625,
-0.01053619384765625,
-0.0117645263671875,
0.007770538330078125,
0.016326904296875,
-0.026947021484375,
0.01751708984375,
-0.0023021697998046875,
0.01396942138671875,
0.024688720703125,
0.029296875,
0.0174407958984375,
0.0340576171875,
-0.0123291015625,
0.019012451171875,
0.0158233642578125,
-0.00923919677734375,
0.0122222900390625,
-0.08135986328125,
0.0006361007690429688,
0.0465087890625,
0.0440673828125,
0.00916290283203125,
0.02508544921875,
0.0158538818359375,
-0.040863037109375,
-0.02642822265625,
-0.03424072265625,
-0.0135345458984375,
-0.023162841796875,
-0.009674072265625,
0.0239105224609375,
-0.01015472412109375,
-0.0121307373046875,
-0.0153961181640625,
-0.0028476715087890625,
0.01605224609375,
-0.005840301513671875,
-0.042572021484375,
0.021575927734375,
-0.04010009765625,
0.03271484375,
-0.022857666015625,
0.06622314453125,
-0.03369140625,
0.00618743896484375,
-0.0416259765625,
-0.030242919921875,
-0.041473388671875,
0.0743408203125,
-0.0264739990234375,
0.0233001708984375,
0.0382080078125,
-0.01297760009765625,
-0.007045745849609375,
0.031707763671875,
0.004344940185546875,
0.081787109375,
-0.0207061767578125,
-0.016754150390625,
0.00444793701171875,
0.034576416015625,
0.01308441162109375,
-0.0572509765625,
-0.02203369140625,
-0.0194091796875,
0.036285400390625,
-0.05548095703125,
0.0222625732421875,
0.004627227783203125,
-0.0411376953125,
-0.07745361328125,
0.06744384765625,
-0.03729248046875,
-0.025634765625,
-0.061004638671875,
-0.00412750244140625,
0.01059722900390625,
-0.030548095703125,
-0.028900146484375,
-0.028839111328125,
-0.05230712890625,
0.01428985595703125,
0.0035762786865234375,
0.041961669921875,
0.0450439453125,
-0.021392822265625,
-0.007266998291015625,
-0.002216339111328125,
-0.005626678466796875,
0.00630950927734375,
-0.041473388671875,
0.0134124755859375,
0.0261688232421875,
0.02679443359375,
0.002254486083984375,
0.045379638671875,
0.01904296875,
-0.0213623046875,
-0.004253387451171875,
-0.027069091796875,
-0.03167724609375,
0.0006265640258789062,
0.07733154296875,
0.004741668701171875,
0.017242431640625,
-0.02984619140625,
-0.043609619140625,
-0.038665771484375,
0.0184478759765625,
-0.0133209228515625,
-0.0037288665771484375,
-0.040985107421875,
0.0264129638671875,
-0.0231781005859375,
0.00249481201171875,
-0.042022705078125,
-0.0277252197265625,
-0.033294677734375,
-0.0289459228515625,
-0.0123748779296875,
0.0245819091796875,
0.01107025146484375,
-0.053680419921875,
0.07525634765625,
-0.0175933837890625,
0.03961181640625,
0.0022602081298828125,
0.035614013671875,
0.05767822265625,
0.031646728515625,
-0.004302978515625,
0.04840087890625,
-0.038604736328125,
0.0198516845703125,
-0.007572174072265625,
0.02911376953125,
-0.061737060546875,
0.031982421875,
0.01438140869140625,
0.04052734375,
-0.006198883056640625,
0.051971435546875,
-0.0283660888671875,
0.052520751953125,
-0.00800323486328125,
0.01558685302734375,
-0.058868408203125,
0.006519317626953125,
-0.0400390625,
0.0010995864868164062,
0.016693115234375,
0.0289154052734375,
0.08056640625,
-0.0007796287536621094,
-0.01151275634765625,
0.005340576171875,
-0.0347900390625,
-0.0255126953125,
0.005950927734375,
-0.03753662109375,
-0.00489044189453125,
0.01326751708984375
]
|
274afd99891fc531add741fed996b69c9850c960 | Wordpress Stackexchange
Q: how to remove default jquery and add js in footer? I want to remove default jQuery, because I am adding new or latest jQuery. Also I want include some js in my footer. How can I do that?
I want to add another different js like a slider js or css in my footer.
A: This will do the trick when added to your functions file:
if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);
function my_jquery_enqueue() {
wp_deregister_script('jquery');
wp_register_script('jquery', "//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js", false, null);
wp_enqueue_script('jquery');
}
| Q: how to remove default jquery and add js in footer? I want to remove default jQuery, because I am adding new or latest jQuery. Also I want include some js in my footer. How can I do that?
I want to add another different js like a slider js or css in my footer.
A: This will do the trick when added to your functions file:
if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);
function my_jquery_enqueue() {
wp_deregister_script('jquery');
wp_register_script('jquery', "//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js", false, null);
wp_enqueue_script('jquery');
}
A: I am searching I get one blog here I get two different code. one for
Remove Default Jquery In Wordpress
Here I am the same code for below
<?php
function myphpinformation_scripts() {
if( !is_admin() ) {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', get_stylesheet_directory_uri() . '/js/jquery.min.js', false );
wp_enqueue_script( 'jquery' );
}
}
add_action( 'wp_enqueue_scripts', 'myphpinformation_scripts' );
?>
Add Jquery In Footer In Wordpress
here I know how to add js in WordPress in the footer. I think removing default jquery and add js in the footer in WordPress is a different question.
Here I can found that
<?php
function myphpinformation_scripts() {
wp_enqueue_script( 'scroll', get_stylesheet_directory_uri() . '/js/script.js',array('jquery'),'',true);
}
add_action( 'wp_enqueue_scripts', 'myphpinformation_scripts' );
?>
A: Remove WordPress default jQuery from front end
We can remove default wordpress jQuery from the frontend so that to avoid conflict with the jQuery in the theme. In order to remove the default jQuery add the following code in the function.php file in the theme folder.
add_action('wp_enqueue_scripts', 'no_more_jquery');
function no_more_jquery(){
wp_deregister_script('jquery');
}
| wordpress | {
"language": "en",
"length": 247,
"provenance": "stackexchange_00019.jsonl.gz:455858",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/189310"
} | [
0.04400634765625,
0.045684814453125,
-0.074951171875,
-0.04803466796875,
0.06378173828125,
-0.0546875,
0.055450439453125,
-0.0017604827880859375,
-0.042236328125,
0.0016107559204101562,
-0.0350341796875,
0.0113983154296875,
-0.044189453125,
-0.01097869873046875,
0.0121307373046875,
-0.07012939453125,
0.05419921875,
-0.0247802734375,
0.0179595947265625,
-0.009857177734375,
0.0005016326904296875,
0.0115966796875,
0.038543701171875,
0.1602783203125,
0.0081634521484375,
-0.02294921875,
0.099853515625,
-0.00916290283203125,
0.00249481201171875,
-0.0158538818359375,
0.019012451171875,
-0.00982666015625,
0.0014104843139648438,
0.0207061767578125,
-0.0072784423828125,
-0.02099609375,
0.0150909423828125,
0.01873779296875,
0.023773193359375,
0.0092926025390625,
0.0283660888671875,
-0.0182037353515625,
-0.0283660888671875,
0.01206207275390625,
-0.0257568359375,
-0.045623779296875,
0.040069580078125,
-0.00213623046875,
0.00728607177734375,
-0.023834228515625,
0.0183258056640625,
-0.03240966796875,
0.036529541015625,
-0.05902099609375,
-0.0200653076171875,
-0.00798797607421875,
0.01456451416015625,
-0.004436492919921875,
0.0205230712890625,
0.06182861328125,
-0.011566162109375,
0.016143798828125,
-0.014312744140625,
-0.06805419921875,
0.00457000732421875,
-0.03204345703125,
-0.04327392578125,
0.0153350830078125,
-0.055511474609375,
0.01258087158203125,
0.062408447265625,
-0.033905029296875,
-0.0250244140625,
-0.001956939697265625,
-0.005474090576171875,
0.00835418701171875,
0.00978851318359375,
0.012939453125,
0.0088348388671875,
0.01776123046875,
0.0193634033203125,
0.005939483642578125,
-0.0230712890625,
-0.0179901123046875,
0.0277557373046875,
0.016754150390625,
-0.0110626220703125,
-0.0223236083984375,
-0.053985595703125,
-0.0195159912109375,
-0.025146484375,
-0.053253173828125,
-0.08001708984375,
0.0014600753784179688,
0.01404571533203125,
0.00977325439453125,
0.02117919921875,
0.04510498046875,
0.01021575927734375,
0.0018444061279296875,
0.010711669921875,
-0.04315185546875,
0.01230621337890625,
-0.033203125,
-0.0060882568359375,
0.037322998046875,
0.00981903076171875,
-0.0021991729736328125,
0.001354217529296875,
0.017791748046875,
-0.01287841796875,
-0.0243377685546875,
0.0487060546875,
0.0220794677734375,
-0.03631591796875,
-0.027496337890625,
0.005035400390625,
0.00814056396484375,
-0.0226898193359375,
0.004119873046875,
-0.00811767578125,
0.032562255859375,
-0.03302001953125,
-0.0168609619140625,
0.00974273681640625,
-0.01483154296875,
-0.0015544891357421875,
-0.0089569091796875,
-0.006122589111328125,
-0.002285003662109375,
-0.054718017578125,
0.018951416015625,
0.1005859375,
0.03143310546875,
0.0129547119140625,
-0.0194091796875,
0.056488037109375,
0.005367279052734375,
0.01214599609375,
-0.0017194747924804688,
-0.005687713623046875,
-0.0167236328125,
-0.0033512115478515625,
-0.0104827880859375,
-0.0036773681640625,
0.0030307769775390625,
-0.0036144256591796875,
0.0179443359375,
0.0220947265625,
-0.034942626953125,
0.026519775390625,
-0.046783447265625,
0.060150146484375,
-0.00615692138671875,
-0.027435302734375,
-0.0151519775390625,
0.04864501953125,
-0.0298309326171875,
-0.051483154296875,
-0.035247802734375,
-0.0290985107421875,
0.004795074462890625,
0.01471710205078125,
-0.032379150390625,
-0.01479339599609375,
-0.0221405029296875,
-0.0035648345947265625,
0.01605224609375,
0.027069091796875,
0.0618896484375,
-0.01727294921875,
-0.06201171875,
-0.007289886474609375,
0.0182952880859375,
-0.015960693359375,
0.03887939453125,
-0.00962066650390625,
0.053192138671875,
0.025360107421875,
-0.03570556640625,
-0.034820556640625,
-0.05859375,
0.0892333984375,
-0.04803466796875,
-0.057586669921875,
0.007160186767578125,
0.0146484375,
0.054595947265625,
0.00862884521484375,
0.0238800048828125,
0.07391357421875,
0.003635406494140625,
-0.04949951171875,
-0.026092529296875,
0.04376220703125,
0.00742340087890625,
-0.04046630859375,
-0.03570556640625,
0.0177459716796875,
-0.0022296905517578125,
-0.01123046875,
0.0215301513671875,
0.00589752197265625,
-0.0031909942626953125,
-0.0175628662109375,
0.00388336181640625,
-0.0203857421875,
0.056915283203125,
-0.018157958984375,
0.006977081298828125,
0.022857666015625,
0.00823211669921875,
-0.044158935546875,
-0.00795745849609375,
-0.029205322265625,
-0.013153076171875,
-0.04339599609375,
0.051422119140625,
-0.0005254745483398438,
0.02947998046875,
0.009063720703125,
-0.03826904296875,
0.01548004150390625,
-0.01020050048828125,
0.037261962890625,
-0.0186004638671875,
-0.02301025390625,
-0.037078857421875,
0.007076263427734375,
-0.0168914794921875,
-0.03839111328125,
0.07476806640625,
0.0203094482421875,
0.0205230712890625,
-0.01389312744140625,
-0.0022068023681640625,
0.01010894775390625,
-0.0450439453125,
-0.002986907958984375,
0.037994384765625,
0.0174560546875,
0.06805419921875,
-0.0262451171875,
-0.00856781005859375,
0.0631103515625,
-0.039703369140625,
-0.0012187957763671875,
0.00024306774139404297,
-0.016448974609375,
-0.0024585723876953125,
0.00726318359375,
0.006023406982421875,
0.02020263671875,
-0.02880859375,
0.0030269622802734375,
0.031829833984375,
-0.0019588470458984375,
-0.005558013916015625,
-0.00457763671875,
-0.0190277099609375,
0.017120361328125,
-0.0164337158203125,
-0.0408935546875,
0.0125579833984375,
0.049530029296875,
-0.0352783203125,
0.0220489501953125,
0.0044708251953125,
0.017364501953125,
-0.01294708251953125,
-0.002773284912109375,
-0.08734130859375,
-0.01419830322265625,
0.033233642578125,
0.0092315673828125,
0.0160675048828125,
-0.038299560546875,
-0.00850677490234375,
0.01666259765625,
0.0269622802734375,
0.00815582275390625,
0.0219268798828125,
-0.01155853271484375,
-0.01334381103515625,
0.02398681640625,
-0.01557159423828125,
0.005275726318359375,
-0.00447845458984375,
0.0013761520385742188,
0.010467529296875,
0.035430908203125,
0.006847381591796875,
-0.013214111328125,
-0.0033054351806640625,
0.01227569580078125,
-0.0183563232421875,
0.054534912109375,
-0.00626373291015625,
0.01593017578125,
-0.001373291015625,
0.036468505859375,
0.045501708984375,
0.008148193359375,
-0.0174102783203125,
0.0063323974609375,
0.0233001708984375,
0.038818359375,
-0.03204345703125,
-0.026336669921875,
0.04498291015625,
-0.09222412109375,
-0.00542449951171875,
0.0068511962890625,
-0.00992584228515625,
-0.01000213623046875,
-0.0260009765625,
-0.0194854736328125,
-0.01207733154296875,
-0.10986328125,
-0.08319091796875,
-0.0115509033203125,
-0.08636474609375,
0.006938934326171875,
0.0230712890625,
-0.04888916015625,
0.0020313262939453125,
0.075927734375,
0.01416015625,
-0.008636474609375,
-0.036285400390625,
-0.049530029296875,
-0.040924072265625,
-0.051544189453125,
0.001373291015625,
-0.004215240478515625,
-0.005489349365234375,
0.00820159912109375,
0.037506103515625,
0.00910186767578125,
-0.04376220703125,
0.01367950439453125,
-0.01267242431640625,
-0.013763427734375,
0.034149169921875,
0.035888671875,
-0.01270294189453125,
-0.019683837890625,
0.00616455078125,
-0.0262298583984375,
0.035919189453125,
-0.0300140380859375,
-0.01617431640625,
-0.046966552734375,
-0.022674560546875,
-0.0275421142578125,
0.053955078125,
0.04547119140625,
-0.03643798828125,
0.0058135986328125,
-0.05450439453125,
-0.0244293212890625,
0.0240478515625,
-0.017578125,
0.021881103515625,
-0.01380157470703125,
-0.019622802734375,
-0.003326416015625,
0.0428466796875,
0.03515625,
0.00899505615234375,
0.0419921875,
-0.01314544677734375,
0.01419830322265625,
-0.00783538818359375,
0.0092620849609375,
-0.061859130859375,
0.05023193359375,
-0.036102294921875,
0.0026702880859375,
0.0198211669921875,
-0.00919342041015625,
0.039276123046875,
-0.039276123046875,
0.031494140625,
-0.0260162353515625,
0.0189666748046875,
-0.0301666259765625,
0.001434326171875,
-0.0139007568359375,
0.0076904296875,
0.007640838623046875,
0.063232421875,
-0.0523681640625,
-0.01136016845703125,
-0.005992889404296875,
0.01020050048828125,
-0.019866943359375,
-0.05133056640625,
-0.040435791015625,
-0.0175018310546875,
-0.07086181640625,
0.0269927978515625,
-0.0039825439453125,
0.004123687744140625,
-0.03961181640625,
0.049468994140625,
-0.0526123046875,
-0.0323486328125,
0.016021728515625,
-0.0246124267578125,
-0.0218353271484375,
0.0010547637939453125,
-0.043212890625,
-0.02471923828125,
0.0101318359375,
-0.033477783203125,
-0.04876708984375,
-0.02093505859375,
-0.032562255859375,
0.0689697265625,
0.0294189453125,
-0.0262603759765625,
-0.0057830810546875,
0.0430908203125,
-0.0175323486328125,
0.013336181640625,
-0.00647735595703125,
0.0328369140625,
-0.0014972686767578125,
-0.03582763671875,
-0.01263427734375,
-0.03826904296875,
-0.0007958412170410156,
0.003002166748046875,
-0.01537322998046875,
0.0010747909545898438,
-0.01027679443359375,
0.00014591217041015625,
0.0302886962890625,
-0.017852783203125,
-0.0496826171875,
-0.0212249755859375,
-0.049468994140625,
-0.03240966796875,
0.010589599609375,
-0.051727294921875,
-0.006069183349609375,
-0.0472412109375,
0.0364990234375,
0.01258087158203125,
0.00592803955078125,
0.006053924560546875,
0.03192138671875,
0.01180267333984375,
-0.017974853515625,
-0.042816162109375,
0.042327880859375,
0.045318603515625,
0.0196533203125,
0.03472900390625,
-0.004482269287109375,
-0.0164642333984375,
0.05413818359375,
0.0106353759765625,
0.0293426513671875,
-0.0210418701171875,
0.05267333984375,
0.0006895065307617188,
-0.0210723876953125,
0.03314208984375,
0.0124053955078125,
-0.02294921875,
-0.0374755859375,
-0.01352691650390625,
0.0264129638671875,
0.016693115234375,
-0.02740478515625,
0.0097198486328125,
-0.0021610260009765625,
0.00707244873046875,
0.0125579833984375,
-0.016387939453125,
-0.039794921875,
0.07421875,
0.037384033203125,
-0.0017938613891601562,
0.0202484130859375,
0.051422119140625,
-0.0060272216796875,
-0.0131378173828125,
-0.01995849609375,
-0.01056671142578125,
0.00440216064453125,
0.0197601318359375,
-0.010162353515625,
0.0054779052734375,
-0.0108795166015625,
0.05816650390625,
0.03204345703125,
-0.025970458984375,
-0.014068603515625,
0.010406494140625,
0.06732177734375,
-0.02716064453125,
0.047027587890625,
0.03363037109375,
0.01233673095703125,
-0.00760650634765625,
-0.035308837890625,
-0.007328033447265625,
0.005382537841796875,
-0.05194091796875,
0.0343017578125,
0.0355224609375,
-0.0205078125,
0.00325775146484375,
0.00348663330078125,
0.03656005859375,
-0.0247039794921875,
-0.01334381103515625,
0.006160736083984375,
-0.039947509765625,
0.064208984375,
-0.01113128662109375,
-0.0214080810546875,
-0.01373291015625,
0.0767822265625,
-0.0030612945556640625,
-0.01045989990234375,
-0.017578125,
-0.0019989013671875,
0.0009870529174804688,
-0.020721435546875,
0.0091705322265625,
0.02252197265625,
-0.0032711029052734375,
-0.020843505859375,
-0.0235748291015625,
-0.0063934326171875,
-0.00615692138671875,
-0.00922393798828125,
-0.0164337158203125,
0.01012420654296875,
0.0215606689453125,
-0.00891876220703125,
0.0005626678466796875,
-0.02044677734375,
0.007061004638671875,
-0.00403594970703125,
-0.0352783203125,
0.0031490325927734375,
0.0165252685546875,
0.022216796875,
0.0283966064453125,
0.0101470947265625,
-0.100341796875,
-0.0609130859375,
-0.01140594482421875,
0.0103607177734375,
0.0263824462890625,
-0.0172882080078125,
0.0161285400390625,
-0.00145721435546875,
-0.0231170654296875,
0.01763916015625,
0.0263214111328125,
0.0310516357421875,
0.01184844970703125,
-0.0014581680297851562,
-0.0171966552734375,
-0.07568359375,
-0.04644775390625,
-0.06036376953125,
-0.03759765625,
-0.04071044921875,
0.0176239013671875,
0.01023101806640625,
0.0164337158203125,
-0.0207366943359375,
-0.041748046875,
-0.00484466552734375,
0.005229949951171875,
0.0195465087890625,
0.01727294921875,
-0.029388427734375,
0.0537109375,
0.01273345947265625,
-0.004791259765625,
0.0034351348876953125,
0.05438232421875,
0.037109375,
-0.0338134765625,
0.00511932373046875,
-0.0650634765625,
0.0029544830322265625,
-0.01410675048828125,
-0.024169921875,
0.02252197265625,
0.035888671875,
0.015838623046875,
-0.01250457763671875,
0.01043701171875,
0.0003554821014404297,
-0.033782958984375,
0.030059814453125,
0.035064697265625,
0.0178375244140625,
-0.006015777587890625,
0.012359619140625,
0.056915283203125,
-0.01568603515625,
-0.00653076171875,
0.01169586181640625,
-0.0277252197265625,
0.024932861328125,
-0.004840850830078125,
-0.020660400390625,
0.031402587890625,
0.031402587890625,
0.0005435943603515625,
0.031524658203125,
0.0030956268310546875,
0.0140380859375,
0.0156402587890625,
0.00635528564453125,
-0.0211944580078125,
-0.0124359130859375,
0.020355224609375,
-0.0012140274047851562,
0.01047515869140625,
0.023284912109375,
0.00010514259338378906,
-0.006496429443359375,
0.0531005859375,
0.0423583984375,
-0.07073974609375,
0.007244110107421875,
-0.0167999267578125,
-0.006412506103515625,
0.040435791015625,
0.005733489990234375,
-0.007022857666015625,
0.01117706298828125,
-0.00849151611328125,
0.03875732421875,
-0.013214111328125,
0.015655517578125,
0.050323486328125,
-0.0245361328125,
-0.00022029876708984375,
-0.06927490234375,
-0.0035152435302734375,
0.007778167724609375,
0.031097412109375,
-0.000988006591796875,
0.0193023681640625,
-0.0266876220703125,
-0.0148773193359375,
0.0174713134765625,
-0.0335693359375,
-0.06451416015625,
0.01029205322265625,
-0.028564453125,
0.01100921630859375,
0.02044677734375,
-0.0167694091796875,
0.02911376953125,
0.046356201171875,
-0.032318115234375,
0.0271148681640625,
0.00421142578125,
-0.01971435546875,
-0.031982421875,
-0.0340576171875,
0.050048828125,
-0.0252532958984375,
-0.042816162109375,
0.025604248046875,
-0.021881103515625,
-0.07171630859375,
0.01206207275390625,
-0.0274810791015625,
0.025238037109375,
-0.0643310546875,
0.013671875,
-0.0018720626831054688,
0.035736083984375,
0.0247955322265625,
-0.0396728515625,
0.033538818359375,
-0.055877685546875,
-0.01300048828125,
-0.0115814208984375,
-0.01520538330078125,
-0.0026702880859375,
-0.053955078125,
-0.039306640625,
0.0789794921875,
0.0133819580078125,
-0.0234375,
-0.015625,
0.050811767578125,
-0.0184783935546875,
0.043060302734375,
-0.0020542144775390625,
0.0171966552734375,
-0.01055908203125,
0.0171661376953125,
0.02569580078125,
0.005123138427734375,
0.0176544189453125,
0.00818634033203125,
0.031341552734375,
0.00390625,
0.07208251953125,
-0.0020236968994140625,
0.043212890625,
0.059478759765625,
-0.01445770263671875,
-0.060150146484375,
-0.01226043701171875,
0.014434814453125,
0.028564453125,
-0.01385498046875,
0.004123687744140625,
0.03070068359375,
-0.0304718017578125,
0.036041259765625,
0.0146942138671875,
0.028656005859375,
0.020782470703125,
-0.0118255615234375,
0.0002092123031616211,
0.0224609375,
-0.0001971721649169922,
0.0238189697265625,
-0.0189208984375,
0.06640625,
0.0009312629699707031,
0.01525115966796875,
-0.0276031494140625,
-0.0204925537109375,
0.0257568359375,
-0.0005507469177246094,
0.00179290771484375,
0.0208587646484375,
0.0142974853515625,
-0.033447265625,
0.037994384765625,
0.01446533203125,
0.034942626953125,
-0.0051727294921875,
0.019287109375,
0.00943756103515625,
0.0107574462890625,
-0.06036376953125,
-0.00807952880859375,
0.047271728515625,
0.041259765625,
-0.0386962890625,
0.005275726318359375,
0.006893157958984375,
-0.007511138916015625,
0.0139617919921875,
-0.0506591796875,
0.00875091552734375,
-0.03558349609375,
-0.048095703125,
-0.0160369873046875,
-0.0033092498779296875,
-0.0006103515625,
-0.00974273681640625,
-0.0123443603515625,
-0.007526397705078125,
0.0341796875,
0.033599853515625,
-0.034088134765625,
-0.00739288330078125,
0.0275115966796875,
0.033935546875,
0.01291656494140625,
0.032806396484375,
0.025726318359375,
-0.00795745849609375,
0.01171875,
0.0296173095703125,
-0.01306915283203125,
0.00044989585876464844,
-0.016937255859375,
-0.0261688232421875,
-0.035858154296875,
0.0198211669921875,
-0.0149078369140625,
0.05792236328125,
0.047088623046875,
0.0194091796875,
-0.0232086181640625,
-0.0148162841796875,
-0.01387786865234375,
-0.0462646484375,
-0.0112152099609375,
0.01448822021484375,
0.00347137451171875,
0.032958984375,
0.0010852813720703125,
-0.0253753662109375,
0.0643310546875,
0.0293121337890625,
-0.0250396728515625,
-0.0243377685546875,
0.01427459716796875,
-0.06182861328125,
0.05230712890625,
0.044891357421875,
0.0811767578125,
0.0189666748046875,
-0.03741455078125,
-0.01861572265625,
0.0138702392578125,
-0.036285400390625,
0.0234832763671875,
0.03936767578125,
-0.03277587890625,
0.032806396484375,
0.064697265625,
-0.02105712890625,
0.00879669189453125,
0.006916046142578125,
0.014923095703125,
-0.04046630859375,
0.0238800048828125,
0.007160186767578125,
0.00829315185546875,
0.0093994140625,
0.033935546875,
0.00733184814453125,
0.00511932373046875,
0.00891876220703125,
0.0007233619689941406,
-0.005523681640625,
0.0283966064453125,
-0.0034637451171875,
0.029937744140625,
0.02557373046875,
-0.01165771484375,
0.01264190673828125,
0.00853729248046875,
-0.0257568359375,
-0.0615234375,
0.0306243896484375,
0.0108795166015625,
0.00783538818359375,
0.05059814453125,
-0.0278167724609375,
0.0133209228515625,
-0.02166748046875,
0.0153045654296875,
-0.0386962890625,
-0.0198516845703125,
-0.034759521484375,
-0.019927978515625,
0.02362060546875,
-0.0134124755859375,
-0.0007596015930175781,
-0.0276336669921875,
0.0171661376953125,
-0.033294677734375,
0.00115966796875,
0.0256500244140625,
-0.00005835294723510742,
0.0323486328125,
0.0165557861328125,
-0.007320404052734375,
0.01154327392578125,
-0.011871337890625,
0.01026153564453125,
0.00540924072265625,
0.006824493408203125,
0.0063934326171875,
-0.04864501953125,
-0.0067901611328125,
0.00617218017578125,
0.032470703125,
0.00525665283203125,
0.009002685546875,
-0.016357421875,
-0.004730224609375,
-0.0246124267578125,
0.0302276611328125,
-0.002529144287109375,
-0.004596710205078125,
-0.00887298583984375,
0.0181884765625,
-0.00665283203125,
-0.01485443115234375,
-0.05718994140625,
0.0310211181640625,
0.01861572265625,
0.022216796875,
-0.09881591796875,
0.062103271484375,
-0.0068359375,
0.074462890625,
-0.0193023681640625,
0.0038890838623046875,
-0.033203125,
-0.032012939453125,
-0.003997802734375,
-0.0156707763671875,
-0.0518798828125,
0.041290283203125,
-0.007152557373046875,
0.01397705078125,
0.0184326171875,
-0.0198211669921875,
0.0211334228515625,
-0.005748748779296875,
0.0185546875,
0.054046630859375,
-0.0016012191772460938,
-0.006671905517578125,
-0.01479339599609375,
0.03717041015625,
-0.028533935546875,
-0.08447265625,
0.00749969482421875,
-0.058563232421875,
-0.01056671142578125,
0.002895355224609375,
0.01419830322265625,
0.047607421875,
-0.01128387451171875,
-0.08575439453125,
0.08929443359375,
-0.0234527587890625,
-0.0247344970703125,
-0.0122528076171875,
0.0149078369140625,
-0.0204315185546875,
0.01290130615234375,
-0.0038280487060546875,
-0.01398468017578125,
-0.0019779205322265625,
0.0257110595703125,
0.00981903076171875,
0.03497314453125,
0.026947021484375,
-0.035919189453125,
-0.030487060546875,
-0.006969451904296875,
-0.0135345458984375,
0.030731201171875,
-0.01421356201171875,
0.015960693359375,
0.024383544921875,
0.039886474609375,
-0.00963592529296875,
0.0294036865234375,
0.008758544921875,
-0.038055419921875,
0.0074462890625,
-0.0152435302734375,
-0.037445068359375,
-0.03399658203125,
0.05908203125,
0.0023975372314453125,
0.020538330078125,
0.00910186767578125,
-0.042755126953125,
-0.055267333984375,
0.0487060546875,
-0.005283355712890625,
-0.0079345703125,
-0.0435791015625,
0.00693511962890625,
0.0228118896484375,
-0.004833221435546875,
-0.0200653076171875,
-0.0233154296875,
-0.04583740234375,
-0.0157318115234375,
-0.0211334228515625,
0.021209716796875,
-0.06036376953125,
0.0242919921875,
0.048980712890625,
-0.01375579833984375,
0.04205322265625,
-0.0194244384765625,
-0.0012197494506835938,
0.055755615234375,
-0.0023021697998046875,
-0.0038604736328125,
0.0215606689453125,
-0.0577392578125,
0.0157470703125,
-0.0202178955078125,
0.0014123916625976562,
-0.0369873046875,
-0.003505706787109375,
-0.0024471282958984375,
0.042877197265625,
0.0204315185546875,
0.07574462890625,
-0.048858642578125,
0.03863525390625,
0.0113067626953125,
-0.0227813720703125,
-0.058837890625,
0.0322265625,
-0.0400390625,
0.022491455078125,
0.011260986328125,
0.0248870849609375,
0.0792236328125,
-0.007724761962890625,
-0.012451171875,
0.0034542083740234375,
-0.05584716796875,
-0.049560546875,
-0.01015472412109375,
-0.03228759765625,
-0.013214111328125,
0.015960693359375
]
|
3e0301f4b2211c60c28700027690327fbfd705a0 | Wordpress Stackexchange
Q: Add custom background to div in home page I want to have featured image on specific div on home page that could be changed in customizer. I saw in documentation custom background for body(https://codex.wordpress.org/Custom_Backgrounds) But I want to make it for specific div eg. #featured-home-image. How?
$args = array(
'default-color' => '000000',
'default-image' => '%1$s/images/background.jpg',
);
add_theme_support( 'custom-background', $args );
A: Use the wp-head-callback argument to specify your own handler:
add_theme_support( 'custom-background', array(
'wp-head-callback' => 'wpse_189361_custom_background_cb',
'default-color' => '000000',
'default-image' => '%1$s/images/background.jpg',
));
function wpse_189361_custom_background_cb() {
ob_start();
_custom_background_cb(); // Default handler
$style = ob_get_clean();
$style = str_replace( 'body.custom-background', '#featured-home-image', $style );
echo $style;
}
| Q: Add custom background to div in home page I want to have featured image on specific div on home page that could be changed in customizer. I saw in documentation custom background for body(https://codex.wordpress.org/Custom_Backgrounds) But I want to make it for specific div eg. #featured-home-image. How?
$args = array(
'default-color' => '000000',
'default-image' => '%1$s/images/background.jpg',
);
add_theme_support( 'custom-background', $args );
A: Use the wp-head-callback argument to specify your own handler:
add_theme_support( 'custom-background', array(
'wp-head-callback' => 'wpse_189361_custom_background_cb',
'default-color' => '000000',
'default-image' => '%1$s/images/background.jpg',
));
function wpse_189361_custom_background_cb() {
ob_start();
_custom_background_cb(); // Default handler
$style = ob_get_clean();
$style = str_replace( 'body.custom-background', '#featured-home-image', $style );
echo $style;
}
| wordpress | {
"language": "en",
"length": 105,
"provenance": "stackexchange_00019.jsonl.gz:455873",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/189361"
} | [
0.036468505859375,
0.0089874267578125,
0.01495361328125,
-0.06427001953125,
0.0223388671875,
-0.009735107421875,
0.0204010009765625,
-0.0291748046875,
0.012786865234375,
-0.013275146484375,
-0.06512451171875,
0.01348114013671875,
-0.033355712890625,
-0.01261138916015625,
0.017364501953125,
-0.03936767578125,
0.054473876953125,
-0.03448486328125,
0.050628662109375,
0.00922393798828125,
0.0058746337890625,
0.0523681640625,
0.033050537109375,
0.05712890625,
0.022735595703125,
-0.0452880859375,
0.053955078125,
0.0010814666748046875,
-0.00325775146484375,
0.0024852752685546875,
0.0247039794921875,
-0.00620269775390625,
0.04278564453125,
0.0186920166015625,
-0.042877197265625,
0.0288238525390625,
0.00798797607421875,
-0.00939178466796875,
-0.0038204193115234375,
0.004180908203125,
0.0160980224609375,
-0.01194000244140625,
-0.004367828369140625,
0.022247314453125,
-0.0249786376953125,
-0.021697998046875,
0.02288818359375,
-0.0205230712890625,
-0.0008311271667480469,
0.02618408203125,
-0.0015287399291992188,
-0.005786895751953125,
-0.0030670166015625,
-0.034942626953125,
0.0039043426513671875,
-0.0171966552734375,
-0.03240966796875,
0.0180816650390625,
0.03466796875,
-0.0102996826171875,
-0.0262908935546875,
-0.032440185546875,
0.0362548828125,
0.0009655952453613281,
0.00530242919921875,
0.00817108154296875,
0.0215606689453125,
0.0010013580322265625,
-0.054168701171875,
-0.01904296875,
0.0286712646484375,
-0.045989990234375,
-0.0112762451171875,
-0.049652099609375,
-0.041595458984375,
0.0208740234375,
-0.01439666748046875,
-0.0435791015625,
0.00975799560546875,
-0.0001609325408935547,
0.0011444091796875,
-0.02423095703125,
-0.0078582763671875,
-0.0209197998046875,
0.024169921875,
-0.009979248046875,
-0.01428985595703125,
-0.000255584716796875,
-0.0167236328125,
0.0043487548828125,
-0.01537322998046875,
-0.03717041015625,
-0.007415771484375,
0.027069091796875,
0.0047149658203125,
-0.00843048095703125,
-0.00443267822265625,
0.01715087890625,
-0.0189666748046875,
0.036163330078125,
0.0037021636962890625,
-0.042236328125,
0.0806884765625,
-0.05596923828125,
0.018768310546875,
0.0263824462890625,
-0.005710601806640625,
-0.01033782958984375,
0.0224456787109375,
0.01300048828125,
-0.01369476318359375,
-0.0026721954345703125,
0.006893157958984375,
-0.03411865234375,
-0.0276947021484375,
-0.006099700927734375,
-0.0188446044921875,
-0.0249176025390625,
0.0184326171875,
-0.06982421875,
0.006107330322265625,
0.016448974609375,
0.0478515625,
-0.0290985107421875,
0.00904083251953125,
0.0013837814331054688,
-0.043701171875,
-0.04986572265625,
-0.0168304443359375,
0.0293426513671875,
-0.04132080078125,
0.024658203125,
0.09857177734375,
0.01520538330078125,
0.0144195556640625,
-0.019683837890625,
0.055023193359375,
-0.02105712890625,
-0.0027217864990234375,
0.01666259765625,
0.0241241455078125,
-0.0222625732421875,
-0.022003173828125,
-0.00594329833984375,
0.004913330078125,
0.0091400146484375,
0.00260162353515625,
0.0157318115234375,
0.0014028549194335938,
-0.08282470703125,
0.0601806640625,
-0.0309295654296875,
0.004177093505859375,
0.032684326171875,
0.0184478759765625,
0.0303192138671875,
0.04736328125,
-0.005825042724609375,
-0.0174560546875,
-0.0321044921875,
0.022979736328125,
0.0200653076171875,
0.018524169921875,
0.027862548828125,
0.031707763671875,
-0.044769287109375,
-0.01401519775390625,
0.010955810546875,
0.0163421630859375,
0.0389404296875,
0.01410675048828125,
-0.0164947509765625,
-0.0294189453125,
0.0235443115234375,
0.005767822265625,
0.0262298583984375,
0.0052032470703125,
0.01378631591796875,
0.0210113525390625,
0.046356201171875,
-0.0066680908203125,
-0.035797119140625,
0.08416748046875,
-0.0306854248046875,
-0.041595458984375,
0.0001747608184814453,
-0.0001983642578125,
0.05133056640625,
0.035675048828125,
0.01181793212890625,
0.001308441162109375,
-0.030242919921875,
-0.04473876953125,
-0.0204010009765625,
-0.015655517578125,
-0.01247406005859375,
-0.028564453125,
-0.029693603515625,
-0.0164794921875,
0.0562744140625,
0.00957489013671875,
-0.01983642578125,
0.02618408203125,
0.003574371337890625,
-0.0088653564453125,
-0.000888824462890625,
-0.017852783203125,
0.0292205810546875,
-0.0078887939453125,
-0.003711700439453125,
0.00609588623046875,
-0.004161834716796875,
0.033111572265625,
-0.10662841796875,
-0.044342041015625,
0.0281982421875,
0.01485443115234375,
0.0230255126953125,
0.01226806640625,
0.04168701171875,
0.01739501953125,
-0.0164031982421875,
-0.00799560546875,
0.01477813720703125,
0.06805419921875,
0.018951416015625,
-0.037353515625,
-0.0158538818359375,
0.02020263671875,
0.01629638671875,
-0.079345703125,
0.06744384765625,
0.03240966796875,
0.03448486328125,
-0.024505615234375,
-0.01812744140625,
-0.003391265869140625,
-0.07952880859375,
-0.01136016845703125,
0.055084228515625,
0.025726318359375,
-0.004314422607421875,
-0.01678466796875,
-0.00908660888671875,
0.08404541015625,
0.0565185546875,
0.019195556640625,
-0.01126861572265625,
0.032073974609375,
0.01248931884765625,
-0.03765869140625,
-0.03485107421875,
0.042724609375,
-0.0966796875,
0.03741455078125,
0.03839111328125,
-0.03485107421875,
-0.0169677734375,
-0.0302886962890625,
0.0174560546875,
0.01311492919921875,
0.01617431640625,
-0.004878997802734375,
-0.0008449554443359375,
-0.0009927749633789062,
-0.006908416748046875,
0.0221405029296875,
0.0034732818603515625,
0.00021338462829589844,
-0.0035762786865234375,
0.004482269287109375,
-0.03253173828125,
-0.00376129150390625,
0.02313232421875,
0.01427459716796875,
-0.00965118408203125,
-0.010345458984375,
0.0132293701171875,
-0.0170745849609375,
0.0068206787109375,
-0.005153656005859375,
0.005229949951171875,
-0.04815673828125,
-0.0007047653198242188,
0.0159454345703125,
-0.0692138671875,
0.00383758544921875,
0.040985107421875,
0.006076812744140625,
-0.0033779144287109375,
0.01580810546875,
0.0282745361328125,
-0.01444244384765625,
0.0196533203125,
0.056884765625,
-0.0201416015625,
-0.01788330078125,
-0.022979736328125,
0.0323486328125,
-0.045654296875,
0.040435791015625,
0.0545654296875,
-0.03668212890625,
0.0200958251953125,
0.001308441162109375,
0.004924774169921875,
0.0222015380859375,
-0.0153350830078125,
-0.0227508544921875,
0.0083465576171875,
-0.056549072265625,
0.000011682510375976562,
0.0274810791015625,
0.00876617431640625,
0.0084228515625,
-0.00904083251953125,
-0.01328277587890625,
0.011138916015625,
-0.061798095703125,
-0.08758544921875,
0.0216064453125,
-0.0177459716796875,
-0.01410675048828125,
-0.0160980224609375,
-0.003025054931640625,
0.00218963623046875,
-0.0075836181640625,
-0.0152435302734375,
-0.045166015625,
-0.0244598388671875,
0.01380157470703125,
-0.08673095703125,
-0.059356689453125,
-0.07086181640625,
0.0098724365234375,
0.02044677734375,
-0.00860595703125,
0.07232666015625,
0.0154266357421875,
0.01367950439453125,
0.029144287109375,
0.03173828125,
0.007213592529296875,
-0.00921630859375,
-0.00820159912109375,
0.01263427734375,
-0.0060882568359375,
-0.008148193359375,
-0.0194091796875,
0.0226593017578125,
-0.0318603515625,
0.00011879205703735352,
-0.058013916015625,
0.0225067138671875,
-0.07135009765625,
0.09002685546875,
0.1092529296875,
-0.03167724609375,
-0.0269012451171875,
-0.05108642578125,
-0.033843994140625,
0.00792694091796875,
-0.05694580078125,
0.01451873779296875,
0.0299835205078125,
-0.019775390625,
0.02447509765625,
-0.002170562744140625,
0.0213470458984375,
0.00380706787109375,
0.026123046875,
-0.01323699951171875,
0.023773193359375,
0.0146942138671875,
0.01335906982421875,
-0.031158447265625,
0.01169586181640625,
-0.00136566162109375,
0.06585693359375,
0.032958984375,
0.02264404296875,
-0.037811279296875,
0.033721923828125,
-0.08734130859375,
-0.055755615234375,
0.0528564453125,
0.02056884765625,
0.0201263427734375,
-0.01345062255859375,
-0.03704833984375,
0.0297393798828125,
0.0919189453125,
-0.072265625,
-0.01145172119140625,
-0.00038909912109375,
0.019317626953125,
-0.004810333251953125,
-0.00275421142578125,
-0.05792236328125,
-0.0175018310546875,
-0.1318359375,
0.0117645263671875,
-0.00847625732421875,
-0.0274200439453125,
-0.0216827392578125,
0.0367431640625,
-0.0784912109375,
-0.05975341796875,
0.0047607421875,
0.01580810546875,
-0.023193359375,
0.0406494140625,
-0.05682373046875,
0.05804443359375,
0.0125885009765625,
-0.03167724609375,
-0.0736083984375,
-0.00914764404296875,
-0.03118896484375,
0.04229736328125,
0.019317626953125,
-0.007335662841796875,
-0.0160980224609375,
0.035003662109375,
0.0313720703125,
0.02008056640625,
0.0142822265625,
-0.00421142578125,
0.0089569091796875,
-0.0208282470703125,
0.0152740478515625,
-0.04449462890625,
0.0096282958984375,
0.0186920166015625,
-0.03216552734375,
0.0313720703125,
-0.0162353515625,
0.026458740234375,
0.0220489501953125,
-0.03399658203125,
0.01385498046875,
-0.0084228515625,
-0.01297760009765625,
0.051513671875,
0.0012645721435546875,
-0.0025730133056640625,
-0.052825927734375,
-0.00832366943359375,
0.03887939453125,
0.029327392578125,
0.005340576171875,
0.0009965896606445312,
0.062286376953125,
0.021881103515625,
-0.025054931640625,
-0.043365478515625,
0.007228851318359375,
0.042510986328125,
0.0225372314453125,
-0.005367279052734375,
-0.03021240234375,
-0.054718017578125,
0.0716552734375,
0.0196685791015625,
-0.016632080078125,
0.016876220703125,
0.06884765625,
-0.003505706787109375,
-0.043365478515625,
0.0305938720703125,
-0.01183319091796875,
-0.003009796142578125,
0.00768280029296875,
-0.01349639892578125,
-0.0021686553955078125,
-0.0208740234375,
-0.0157928466796875,
-0.01309967041015625,
0.00492095947265625,
0.0097198486328125,
-0.0004534721374511719,
-0.01910400390625,
0.00008273124694824219,
0.0631103515625,
0.021881103515625,
-0.0030994415283203125,
0.007053375244140625,
0.038116455078125,
-0.0108795166015625,
0.01380157470703125,
-0.02520751953125,
0.01422119140625,
0.00983428955078125,
0.0133514404296875,
-0.002040863037109375,
0.006107330322265625,
-0.01480865478515625,
0.053436279296875,
0.01824951171875,
-0.033477783203125,
-0.010162353515625,
-0.0176239013671875,
0.024749755859375,
-0.0019140243530273438,
-0.006622314453125,
0.04254150390625,
0.0295257568359375,
-0.00713348388671875,
-0.0209808349609375,
-0.03228759765625,
-0.0125732421875,
-0.057891845703125,
0.028778076171875,
0.03839111328125,
-0.020538330078125,
0.0178680419921875,
0.0091552734375,
0.030181884765625,
-0.003719329833984375,
-0.010986328125,
-0.0183258056640625,
0.0236358642578125,
0.01617431640625,
0.0051116943359375,
0.0280303955078125,
-0.01910400390625,
0.0200347900390625,
0.066650390625,
-0.0125274658203125,
0.0129547119140625,
0.041259765625,
0.06201171875,
-0.03326416015625,
-0.0452880859375,
-0.01438140869140625,
-0.049896240234375,
-0.025726318359375,
0.01409149169921875,
-0.021392822265625,
-0.04144287109375,
-0.02532958984375,
0.038604736328125,
0.05303955078125,
-0.0001652240753173828,
-0.0330810546875,
-0.0009675025939941406,
-0.00655364990234375,
0.03594970703125,
0.022674560546875,
-0.0122833251953125,
0.035003662109375,
0.01137542724609375,
-0.017578125,
0.01189422607421875,
-0.00551605224609375,
-0.0416259765625,
-0.0271453857421875,
-0.0131683349609375,
0.00027680397033691406,
0.021881103515625,
-0.04034423828125,
0.031463623046875,
-0.02679443359375,
-0.00916290283203125,
-0.0039043426513671875,
0.0241241455078125,
0.016387939453125,
0.010528564453125,
0.01276397705078125,
-0.01253509521484375,
-0.0195159912109375,
-0.0208587646484375,
0.005199432373046875,
-0.024322509765625,
-0.0247802734375,
-0.033935546875,
0.01145172119140625,
0.0162353515625,
-0.0030517578125,
-0.026519775390625,
-0.049957275390625,
0.03314208984375,
0.0482177734375,
0.06512451171875,
-0.03729248046875,
0.0194091796875,
-0.0037441253662109375,
0.00962066650390625,
-0.0223541259765625,
-0.00496673583984375,
0.0369873046875,
-0.0177459716796875,
-0.01544189453125,
-0.0260772705078125,
0.01088714599609375,
0.0008158683776855469,
0.0184326171875,
0.03900146484375,
0.058624267578125,
0.0298614501953125,
0.00991058349609375,
-0.0204925537109375,
-0.0117950439453125,
-0.0270843505859375,
-0.00007265806198120117,
-0.039276123046875,
0.011871337890625,
-0.01201629638671875,
-0.003551483154296875,
0.01219940185546875,
-0.04248046875,
-0.0259246826171875,
0.024200439453125,
-0.005001068115234375,
0.00324249267578125,
0.0241851806640625,
-0.041168212890625,
0.033294677734375,
0.05291748046875,
0.01096343994140625,
0.044677734375,
-0.005474090576171875,
0.01450347900390625,
0.0222015380859375,
0.0293731689453125,
-0.03399658203125,
-0.03192138671875,
0.040008544921875,
0.01323699951171875,
-0.015106201171875,
0.03021240234375,
-0.01302337646484375,
0.01325225830078125,
0.024261474609375,
0.054840087890625,
-0.0279998779296875,
0.0035858154296875,
-0.0036296844482421875,
0.01007080078125,
0.0860595703125,
0.038543701171875,
0.00478363037109375,
0.01947021484375,
0.01611328125,
-0.0321044921875,
0.020263671875,
0.023345947265625,
0.0167388916015625,
-0.01064300537109375,
0.0012722015380859375,
-0.04052734375,
-0.0222320556640625,
-0.0469970703125,
-0.0343017578125,
0.034027099609375,
-0.040985107421875,
0.005859375,
0.01690673828125,
-0.034698486328125,
-0.0289154052734375,
-0.040802001953125,
-0.019195556640625,
-0.00701904296875,
-0.030731201171875,
0.01268768310546875,
-0.004047393798828125,
-0.00274658203125,
0.04925537109375,
-0.0121917724609375,
0.020782470703125,
0.003692626953125,
-0.02862548828125,
0.018280029296875,
-0.0005106925964355469,
0.039337158203125,
0.007061004638671875,
-0.074462890625,
0.01104736328125,
-0.04388427734375,
0.021392822265625,
-0.0106658935546875,
-0.02862548828125,
0.0677490234375,
-0.044219970703125,
-0.004024505615234375,
-0.006256103515625,
0.03582763671875,
0.001743316650390625,
-0.003955841064453125,
0.06195068359375,
-0.06756591796875,
-0.0386962890625,
0.01513671875,
-0.045654296875,
-0.01361846923828125,
-0.0121002197265625,
-0.042022705078125,
0.07452392578125,
-0.03656005859375,
0.04443359375,
0.0110626220703125,
0.03363037109375,
0.0196990966796875,
0.018585205078125,
0.0014619827270507812,
0.04388427734375,
-0.03759765625,
0.0173187255859375,
-0.0026493072509765625,
0.023468017578125,
0.0250396728515625,
0.0192718505859375,
0.008514404296875,
0.011932373046875,
-0.0020732879638671875,
0.011871337890625,
0.0187530517578125,
-0.0013332366943359375,
-0.03179931640625,
0.042205810546875,
-0.035797119140625,
-0.0067138671875,
-0.027069091796875,
-0.038421630859375,
0.0147705078125,
-0.033355712890625,
-0.047210693359375,
-0.01023101806640625,
0.0213623046875,
0.03692626953125,
0.0234832763671875,
0.024078369140625,
-0.04083251953125,
0.0121307373046875,
0.06158447265625,
-0.0721435546875,
-0.011566162109375,
0.051788330078125,
-0.016754150390625,
0.0101318359375,
0.0036716461181640625,
-0.0238494873046875,
0.033233642578125,
-0.03533935546875,
0.059783935546875,
0.0024471282958984375,
0.015655517578125,
0.0112762451171875,
0.040283203125,
0.03045654296875,
0.06951904296875,
-0.030670166015625,
0.0034503936767578125,
0.01361846923828125,
0.009033203125,
-0.02630615234375,
0.01398468017578125,
0.0199127197265625,
0.0240325927734375,
-0.044403076171875,
0.005619049072265625,
0.0167236328125,
0.0037631988525390625,
0.0201416015625,
-0.041748046875,
0.033782958984375,
-0.040008544921875,
-0.05035400390625,
-0.024322509765625,
0.002872467041015625,
0.0271759033203125,
0.019195556640625,
-0.013214111328125,
-0.02484130859375,
-0.008270263671875,
0.01511383056640625,
-0.01042938232421875,
0.0032596588134765625,
-0.0128021240234375,
-0.0008459091186523438,
0.016693115234375,
-0.0031280517578125,
0.0318603515625,
0.0272064208984375,
-0.0015163421630859375,
0.025543212890625,
0.035552978515625,
-0.0104217529296875,
0.0017118453979492188,
-0.0121612548828125,
0.00766754150390625,
0.01377105712890625,
-0.00661468505859375,
-0.0231170654296875,
-0.00371551513671875,
-0.010650634765625,
-0.041046142578125,
-0.01122283935546875,
0.00843048095703125,
-0.033721923828125,
-0.0009341239929199219,
-0.047088623046875,
0.030029296875,
0.025543212890625,
-0.003261566162109375,
0.041473388671875,
-0.00024819374084472656,
0.043853759765625,
0.004703521728515625,
0.0239715576171875,
0.01294708251953125,
-0.0275726318359375,
-0.021148681640625,
0.0291748046875,
0.048095703125,
0.023223876953125,
-0.06927490234375,
-0.0197906494140625,
0.005298614501953125,
-0.052001953125,
0.033172607421875,
0.0491943359375,
-0.0352783203125,
0.01178741455078125,
-0.00955963134765625,
-0.0244903564453125,
-0.01335906982421875,
0.0155181884765625,
-0.01044464111328125,
-0.023223876953125,
0.01263427734375,
-0.018768310546875,
-0.09063720703125,
-0.05181884765625,
-0.044708251953125,
0.039764404296875,
-0.0172882080078125,
0.04022216796875,
0.0010042190551757812,
0.03387451171875,
0.005184173583984375,
0.027313232421875,
-0.0252685546875,
-0.0032711029052734375,
0.0271148681640625,
-0.004329681396484375,
0.0062255859375,
-0.018707275390625,
-0.05804443359375,
0.0002741813659667969,
0.03173828125,
-0.022552490234375,
0.0098114013671875,
0.00033926963806152344,
0.0196685791015625,
-0.007259368896484375,
-0.0022296905517578125,
-0.045501708984375,
-0.0269012451171875,
-0.06951904296875,
-0.020263671875,
0.023712158203125,
-0.00904083251953125,
-0.00623321533203125,
0.0419921875,
0.0212249755859375,
0.0265045166015625,
0.049041748046875,
-0.02423095703125,
0.09881591796875,
0.047088623046875,
-0.047271728515625,
-0.06903076171875,
0.009979248046875,
0.006633758544921875,
-0.00608062744140625,
-0.0062713623046875,
0.087890625,
-0.01229095458984375,
0.0041656494140625,
0.0273590087890625,
0.028350830078125,
0.0275115966796875,
-0.025482177734375,
-0.003978729248046875,
0.03546142578125,
-0.0242767333984375,
-0.02130126953125,
-0.03668212890625,
0.0008296966552734375,
-0.04345703125,
0.006439208984375,
0.049957275390625,
-0.0104827880859375,
0.05126953125,
-0.01374053955078125,
0.021484375,
0.01435089111328125,
0.010589599609375,
-0.0653076171875,
0.060791015625,
-0.0408935546875,
0.0443115234375,
-0.0134735107421875,
-0.01329803466796875,
-0.00591278076171875,
-0.004367828369140625,
-0.021514892578125,
-0.0213470458984375,
-0.039764404296875,
0.0213165283203125,
-0.0172882080078125,
0.0040435791015625,
0.04986572265625,
-0.0005407333374023438,
0.012115478515625,
-0.0011262893676757812,
-0.0250701904296875,
0.07012939453125,
-0.1036376953125,
-0.034881591796875,
0.0004057884216308594,
-0.016510009765625,
-0.0197296142578125,
0.003337860107421875,
0.045501708984375,
-0.05108642578125,
-0.04266357421875,
-0.004825592041015625,
-0.008575439453125,
0.0059051513671875,
-0.043975830078125,
-0.08074951171875,
-0.00312042236328125,
0.00951385498046875,
-0.045166015625,
-0.011566162109375,
0.0418701171875,
-0.0052947998046875,
-0.03619384765625,
0.0115814208984375,
-0.045196533203125,
0.0249481201171875,
-0.003856658935546875,
-0.009033203125,
0.0242919921875,
-0.0022983551025390625,
0.002033233642578125,
-0.05987548828125,
-0.00626373291015625,
-0.01389312744140625,
0.00514984130859375,
0.00501251220703125,
-0.00910186767578125,
0.0149688720703125,
0.018310546875,
-0.035308837890625,
-0.041259765625,
-0.007175445556640625,
-0.01507568359375,
-0.0135955810546875,
-0.0281829833984375,
0.0227508544921875,
0.006069183349609375,
0.06549072265625,
-0.009490966796875,
0.008148193359375,
-0.0178070068359375,
0.00281524658203125,
-0.023284912109375,
0.01129913330078125,
-0.0263214111328125,
0.0019741058349609375,
-0.05535888671875,
-0.031585693359375,
0.01233673095703125,
-0.01503753662109375,
-0.042236328125,
0.0003180503845214844,
-0.033721923828125,
-0.01436614990234375,
-0.00506591796875,
-0.0016279220581054688,
-0.02252197265625,
0.013885498046875,
0.051910400390625,
-0.0227508544921875,
0.055816650390625,
-0.0174102783203125,
0.004802703857421875,
0.07257080078125,
0.035003662109375,
-0.0089874267578125,
0.0007872581481933594,
-0.0008907318115234375,
0.017181396484375,
-0.006763458251953125,
0.00705718994140625,
-0.0207977294921875,
0.0031070709228515625,
-0.01078033447265625,
-0.0136260986328125,
0.0007195472717285156,
-0.02850341796875,
-0.004055023193359375,
-0.0019092559814453125,
-0.020751953125,
0.0299224853515625,
-0.001239776611328125,
-0.0108184814453125,
0.00016939640045166016,
-0.004543304443359375,
0.0158843994140625,
-0.01442718505859375,
0.05096435546875,
-0.0404052734375,
0.0236968994140625,
-0.0199127197265625,
0.00823211669921875,
0.0037078857421875,
0.0164031982421875,
-0.033416748046875,
-0.030517578125,
0.0136566162109375
]
|
30534de3b8cf30db48fefa4135100686eb9e29a1 | Wordpress Stackexchange
Q: Custom Posts Types using Posts Category I'm using some custom posts types, and, I don't wanna create specific categories for each one.
I'd like to use the Post Category in all my Custom Post.
Here is a example of my new custom posts type:
I know how create new category type for my custom posts, but I don't know how use the regular categories from posts.
/* New Custom Post - Cupons
/* ------------------------------------ */
add_action( 'init', 'create_post_type_cupons' );
function create_post_type_cupons() {
register_post_type( 'cupom',
array(
'labels' => array(
'name' => __( 'Cupons' ),
'singular_name' => __( 'Cupom' )
),
'public' => true,
)
);
}
A: The documentation for register_post_type mentions a taxonomies parameter, giving it a value of array( 'category' ) will do what you want.
There is also the register_taxonomy_for_object_type function
| Q: Custom Posts Types using Posts Category I'm using some custom posts types, and, I don't wanna create specific categories for each one.
I'd like to use the Post Category in all my Custom Post.
Here is a example of my new custom posts type:
I know how create new category type for my custom posts, but I don't know how use the regular categories from posts.
/* New Custom Post - Cupons
/* ------------------------------------ */
add_action( 'init', 'create_post_type_cupons' );
function create_post_type_cupons() {
register_post_type( 'cupom',
array(
'labels' => array(
'name' => __( 'Cupons' ),
'singular_name' => __( 'Cupom' )
),
'public' => true,
)
);
}
A: The documentation for register_post_type mentions a taxonomies parameter, giving it a value of array( 'category' ) will do what you want.
There is also the register_taxonomy_for_object_type function
A: After
'public' => true,
you add
'taxonomies' => array('category','post_tag'),
this one create category and tag for your custom post type if you want just category the delete ,'post_tag'.
A: I added the function register_taxonomy_for_object_type( $taxonomy, $object_type ) in functions.php.
First: I need to choose which kind of taxonomy I want, in this case, "category".
Second: I choose the object type, in this case, "cupom" that is my Custom Post Type.
add_action('init','add_categories_to_cupom');
function add_categories_to_cupom(){
register_taxonomy_for_object_type('category', 'cupom');
}
So now, my Custom Post Type "cupom" uses the the Posts Category.
| wordpress | {
"language": "en",
"length": 223,
"provenance": "stackexchange_00019.jsonl.gz:455905",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/189451"
} | [
0.053375244140625,
0.0019073486328125,
-0.0130462646484375,
-0.0281829833984375,
0.0308685302734375,
-0.0227508544921875,
0.04315185546875,
-0.00339508056640625,
-0.0498046875,
0.0008592605590820312,
-0.016387939453125,
0.00882720947265625,
-0.0017223358154296875,
-0.0288238525390625,
0.043426513671875,
-0.029388427734375,
0.034332275390625,
0.004199981689453125,
0.045440673828125,
-0.0270843505859375,
0.03216552734375,
-0.0159454345703125,
0.045989990234375,
0.0263519287109375,
0.0179290771484375,
-0.03240966796875,
0.0474853515625,
-0.051055908203125,
0.0308837890625,
-0.0194244384765625,
0.0233612060546875,
0.00679779052734375,
-0.0004494190216064453,
0.028045654296875,
0.0005049705505371094,
0.03924560546875,
0.0291748046875,
0.01540374755859375,
0.042755126953125,
0.01190185546875,
0.0341796875,
-0.03143310546875,
0.038848876953125,
0.0202178955078125,
0.01155853271484375,
-0.016357421875,
0.01476287841796875,
-0.060150146484375,
0.01201629638671875,
-0.055267333984375,
0.0177459716796875,
0.0038547515869140625,
0.05908203125,
-0.067138671875,
-0.0255889892578125,
0.0072174072265625,
-0.00629425048828125,
-0.0109100341796875,
0.057220458984375,
-0.0166778564453125,
-0.042144775390625,
-0.05670166015625,
0.037811279296875,
-0.034423828125,
-0.0105438232421875,
0.00588226318359375,
0.03515625,
0.010986328125,
-0.03619384765625,
-0.029571533203125,
0.0277557373046875,
-0.01141357421875,
0.007061004638671875,
0.0048675537109375,
-0.016357421875,
-0.04888916015625,
0.0225067138671875,
-0.03125,
0.004474639892578125,
0.016815185546875,
-0.018829345703125,
-0.0139007568359375,
0.02691650390625,
-0.00537109375,
-0.034271240234375,
-0.006801605224609375,
-0.02490234375,
-0.002483367919921875,
-0.03387451171875,
-0.04296875,
-0.0231781005859375,
-0.051544189453125,
-0.05267333984375,
0.0335693359375,
0.0171661376953125,
-0.0263671875,
0.004669189453125,
0.019317626953125,
0.0005102157592773438,
0.023223876953125,
-0.017333984375,
-0.03460693359375,
0.032073974609375,
-0.037750244140625,
0.055023193359375,
0.034698486328125,
-0.042205810546875,
-0.08050537109375,
0.056121826171875,
0.0290374755859375,
0.00925445556640625,
0.061126708984375,
0.023834228515625,
-0.006988525390625,
-0.0303192138671875,
0.00125885009765625,
0.0061798095703125,
0.0016927719116210938,
-0.0019350051879882812,
-0.0008978843688964844,
-0.0141448974609375,
0.025787353515625,
0.0482177734375,
-0.034027099609375,
0.0217742919921875,
0.0177459716796875,
0.009002685546875,
-0.08538818359375,
-0.00504302978515625,
0.00563812255859375,
-0.030914306640625,
0.0213623046875,
0.071044921875,
0.033203125,
0.01042938232421875,
-0.0184783935546875,
-0.0089263916015625,
-0.028289794921875,
0.004055023193359375,
-0.006679534912109375,
0.03302001953125,
-0.0255279541015625,
0.01806640625,
0.0195159912109375,
0.036956787109375,
0.041839599609375,
0.01425933837890625,
-0.001026153564453125,
-0.00460052490234375,
-0.005962371826171875,
0.0168914794921875,
-0.06292724609375,
0.033721923828125,
0.0115814208984375,
-0.0230712890625,
-0.0035839080810546875,
-0.0004184246063232422,
-0.01091766357421875,
-0.0251617431640625,
-0.0202789306640625,
0.0198211669921875,
0.005565643310546875,
-0.00714874267578125,
-0.00821685791015625,
-0.0157318115234375,
0.01537322998046875,
-0.0203399658203125,
0.006244659423828125,
0.01824951171875,
-0.021759033203125,
-0.00238037109375,
0.006008148193359375,
-0.019561767578125,
-0.0028209686279296875,
0.024566650390625,
0.004177093505859375,
-0.035919189453125,
-0.0102996826171875,
0.036773681640625,
0.0269927978515625,
-0.006389617919921875,
-0.04205322265625,
-0.0102386474609375,
0.004070281982421875,
-0.03515625,
0.0245361328125,
0.0258026123046875,
0.05328369140625,
-0.0027217864990234375,
0.018310546875,
0.026123046875,
0.027313232421875,
-0.035186767578125,
0.0205230712890625,
0.00289154052734375,
-0.02880859375,
-0.0020732879638671875,
-0.01161956787109375,
0.002223968505859375,
-0.0021839141845703125,
-0.0302886962890625,
-0.025909423828125,
0.01338958740234375,
0.0037517547607421875,
-0.020965576171875,
-0.00185394287109375,
-0.012420654296875,
0.034637451171875,
-0.03277587890625,
-0.011871337890625,
0.0307769775390625,
-0.029083251953125,
-0.00403594970703125,
-0.062042236328125,
-0.0174713134765625,
0.01509857177734375,
-0.01480865478515625,
-0.00928497314453125,
-0.026947021484375,
-0.01361846923828125,
-0.0037517547607421875,
-0.0313720703125,
0.012603759765625,
0.0816650390625,
0.051422119140625,
0.03240966796875,
-0.04217529296875,
0.00009298324584960938,
0.0124359130859375,
0.054931640625,
-0.10791015625,
0.018402099609375,
-0.0176239013671875,
0.00687408447265625,
-0.02655029296875,
-0.01129150390625,
0.01474761962890625,
-0.01305389404296875,
0.00737762451171875,
0.046142578125,
0.03570556640625,
0.0210723876953125,
0.0025043487548828125,
-0.0049591064453125,
0.057769775390625,
-0.009857177734375,
0.028533935546875,
-0.015838623046875,
-0.0215301513671875,
0.018829345703125,
0.0123443603515625,
0.0290374755859375,
0.01593017578125,
-0.002017974853515625,
0.00897979736328125,
0.028350830078125,
0.007617950439453125,
-0.023101806640625,
0.025665283203125,
-0.00923919677734375,
0.0110321044921875,
-0.0205535888671875,
-0.050628662109375,
0.0013303756713867188,
0.0214385986328125,
0.030303955078125,
0.043609619140625,
0.034759521484375,
-0.04107666015625,
0.026824951171875,
0.0059814453125,
-0.0166778564453125,
0.00024187564849853516,
0.0128173828125,
0.019256591796875,
0.006816864013671875,
-0.026275634765625,
-0.006031036376953125,
0.02301025390625,
0.00582122802734375,
-0.0249481201171875,
0.0118255615234375,
-0.0462646484375,
-0.0066986083984375,
-0.013580322265625,
-0.06732177734375,
0.005908966064453125,
0.01471710205078125,
-0.042755126953125,
-0.0283203125,
-0.0116729736328125,
0.061553955078125,
-0.0006604194641113281,
0.0018014907836914062,
0.0267333984375,
0.01454925537109375,
-0.036376953125,
-0.055450439453125,
0.033966064453125,
-0.030975341796875,
0.047332763671875,
0.0760498046875,
-0.001163482666015625,
0.0235137939453125,
0.01486968994140625,
0.0177154541015625,
0.03515625,
0.0213623046875,
0.0057525634765625,
-0.03631591796875,
0.0066986083984375,
-0.01220703125,
0.032012939453125,
0.0643310546875,
0.00638580322265625,
-0.03851318359375,
0.0284576416015625,
0.056610107421875,
0.00980377197265625,
-0.0003497600555419922,
0.047149658203125,
-0.044708251953125,
-0.002040863037109375,
-0.0506591796875,
-0.0220794677734375,
-0.0203399658203125,
-0.051727294921875,
-0.011474609375,
0.0364990234375,
-0.037017822265625,
-0.03851318359375,
-0.039306640625,
-0.0631103515625,
-0.0546875,
0.01076507568359375,
-0.01055908203125,
0.00337982177734375,
0.083251953125,
0.0268707275390625,
-0.0283203125,
0.018096923828125,
0.039703369140625,
-0.0249786376953125,
-0.0018825531005859375,
0.037200927734375,
-0.0234222412109375,
0.0203704833984375,
0.009490966796875,
0.0309906005859375,
0.0499267578125,
-0.0517578125,
-0.0257415771484375,
-0.012847900390625,
0.00736236572265625,
0.02679443359375,
-0.00279998779296875,
-0.00798797607421875,
0.039276123046875,
0.031494140625,
-0.01210784912109375,
0.00009018182754516602,
-0.00868988037109375,
-0.01357269287109375,
-0.02593994140625,
-0.0187225341796875,
0.0014171600341796875,
-0.0447998046875,
0.044464111328125,
-0.0134429931640625,
-0.002208709716796875,
0.022369384765625,
-0.047210693359375,
0.034698486328125,
0.0150604248046875,
0.007213592529296875,
-0.0141448974609375,
-0.062225341796875,
-0.0562744140625,
0.07073974609375,
-0.0269927978515625,
0.004642486572265625,
-0.0172882080078125,
0.0127716064453125,
-0.0267333984375,
-0.0654296875,
0.0419921875,
-0.077392578125,
-0.018035888671875,
-0.04595947265625,
-0.0133819580078125,
-0.0011434555053710938,
0.08404541015625,
-0.0155029296875,
0.0007925033569335938,
-0.01525115966796875,
-0.00994110107421875,
-0.0019464492797851562,
-0.016571044921875,
-0.05462646484375,
-0.007720947265625,
-0.0338134765625,
0.00350189208984375,
-0.0009627342224121094,
-0.0283050537109375,
-0.032196044921875,
0.02056884765625,
-0.044708251953125,
-0.0217742919921875,
0.039947509765625,
-0.04425048828125,
0.027923583984375,
-0.01229095458984375,
0.00624847412109375,
-0.0196075439453125,
-0.034454345703125,
-0.01479339599609375,
-0.0738525390625,
-0.004276275634765625,
-0.037322998046875,
0.033966064453125,
0.00856781005859375,
-0.0108489990234375,
-0.00389862060546875,
0.033782958984375,
0.0367431640625,
0.041168212890625,
0.0161590576171875,
-0.004871368408203125,
-0.0214080810546875,
-0.0010890960693359375,
0.0283660888671875,
-0.02325439453125,
-0.01513671875,
-0.0133514404296875,
0.0033855438232421875,
0.06536865234375,
-0.021697998046875,
0.0217742919921875,
-0.0182037353515625,
-0.019989013671875,
0.002086639404296875,
-0.0239105224609375,
-0.0258636474609375,
-0.0020732879638671875,
-0.0163116455078125,
-0.014251708984375,
-0.0215301513671875,
0.0008974075317382812,
0.04345703125,
0.0185699462890625,
-0.01898193359375,
0.0009784698486328125,
0.07275390625,
0.00858306884765625,
-0.0287322998046875,
-0.0772705078125,
0.0391845703125,
0.031951904296875,
-0.00629425048828125,
0.01465606689453125,
-0.0239715576171875,
-0.01021575927734375,
0.039703369140625,
-0.02484130859375,
-0.030487060546875,
-0.01415252685546875,
0.055572509765625,
-0.002056121826171875,
0.01007843017578125,
-0.0290069580078125,
-0.056060791015625,
0.0577392578125,
0.00396728515625,
0.00475311279296875,
-0.031585693359375,
0.0280303955078125,
0.058837890625,
-0.015106201171875,
0.0241546630859375,
-0.023681640625,
-0.053314208984375,
0.031707763671875,
0.016937255859375,
-0.0229339599609375,
0.018798828125,
-0.01236724853515625,
0.005451202392578125,
-0.0521240234375,
0.005550384521484375,
0.017303466796875,
0.019561767578125,
0.0301666259765625,
0.0236663818359375,
0.042083740234375,
0.01593017578125,
-0.036773681640625,
0.007259368896484375,
-0.0097503662109375,
-0.024627685546875,
-0.060546875,
-0.0220489501953125,
-0.00937652587890625,
0.037689208984375,
0.025360107421875,
-0.0287017822265625,
0.03631591796875,
0.040679931640625,
0.0013866424560546875,
-0.0020694732666015625,
-0.04632568359375,
0.0177764892578125,
-0.043701171875,
-0.0277862548828125,
0.028228759765625,
-0.036956787109375,
-0.0104827880859375,
0.0236663818359375,
0.0196685791015625,
-0.0011930465698242188,
-0.01459503173828125,
0.0623779296875,
0.0460205078125,
0.033416748046875,
0.0192413330078125,
-0.01018524169921875,
-0.0203857421875,
0.0016918182373046875,
-0.059967041015625,
-0.0357666015625,
0.009063720703125,
-0.0157470703125,
0.034576416015625,
-0.01611328125,
-0.033935546875,
0.049041748046875,
-0.030548095703125,
-0.00870513916015625,
-0.0377197265625,
-0.006256103515625,
-0.004711151123046875,
0.01229095458984375,
0.02142333984375,
-0.004100799560546875,
0.01000213623046875,
-0.0258941650390625,
0.020782470703125,
-0.036529541015625,
0.043609619140625,
-0.033233642578125,
0.01611328125,
0.01593017578125,
0.01061248779296875,
-0.07659912109375,
-0.022186279296875,
0.02618408203125,
-0.0189971923828125,
-0.00848388671875,
-0.00858306884765625,
-0.053375244140625,
0.00879669189453125,
-0.01425933837890625,
0.0408935546875,
-0.01995849609375,
-0.0239105224609375,
0.0296630859375,
-0.0062103271484375,
0.08050537109375,
0.0282135009765625,
-0.0352783203125,
0.005573272705078125,
-0.05145263671875,
-0.013916015625,
-0.0221710205078125,
-0.05865478515625,
-0.04620361328125,
-0.00897979736328125,
0.032958984375,
0.00759124755859375,
0.02410888671875,
-0.0159759521484375,
-0.0258026123046875,
0.0204315185546875,
0.030731201171875,
0.00222015380859375,
0.00003546476364135742,
0.01049041748046875,
0.017120361328125,
0.057098388671875,
0.005664825439453125,
-0.0195465087890625,
-0.0188446044921875,
-0.0284423828125,
-0.0275421142578125,
-0.090576171875,
-0.0037975311279296875,
0.023101806640625,
-0.047119140625,
0.060760498046875,
0.06658935546875,
0.015625,
0.00433349609375,
-0.0178375244140625,
0.003520965576171875,
-0.025421142578125,
-0.017333984375,
-0.01062774658203125,
0.0081329345703125,
0.00688934326171875,
-0.007297515869140625,
0.03350830078125,
0.00804901123046875,
-0.0269622802734375,
0.0240325927734375,
-0.0210723876953125,
0.039276123046875,
0.0203094482421875,
-0.032562255859375,
0.01837158203125,
0.031707763671875,
0.0035552978515625,
0.01184844970703125,
-0.0112762451171875,
-0.0016632080078125,
-0.009857177734375,
-0.00942230224609375,
-0.0123443603515625,
-0.025787353515625,
0.032562255859375,
0.01273345947265625,
-0.0089874267578125,
0.03436279296875,
-0.018218994140625,
-0.0198822021484375,
0.063232421875,
0.039886474609375,
-0.08880615234375,
0.007549285888671875,
0.0226593017578125,
0.01275634765625,
0.0054779052734375,
0.00345611572265625,
-0.015228271484375,
-0.0005488395690917969,
0.01015472412109375,
-0.0426025390625,
-0.051055908203125,
-0.0183563232421875,
-0.0143280029296875,
0.00701141357421875,
0.0186614990234375,
0.031494140625,
0.005413055419921875,
-0.000331878662109375,
-0.04150390625,
-0.0110015869140625,
0.0029850006103515625,
0.0007152557373046875,
0.01123046875,
-0.0224609375,
-0.012420654296875,
-0.04034423828125,
0.013824462890625,
-0.044708251953125,
0.00290679931640625,
0.02276611328125,
-0.0294189453125,
0.03204345703125,
0.0262908935546875,
-0.0166473388671875,
0.01433563232421875,
-0.0022411346435546875,
-0.0205841064453125,
-0.0073394775390625,
-0.007732391357421875,
0.0187835693359375,
0.0230865478515625,
-0.039764404296875,
0.0205230712890625,
-0.03363037109375,
0.00951385498046875,
-0.0177764892578125,
-0.04180908203125,
0.056488037109375,
-0.043701171875,
-0.0019292831420898438,
0.024261474609375,
0.007633209228515625,
0.00905609130859375,
-0.0115509033203125,
0.018341064453125,
-0.034820556640625,
-0.018951416015625,
-0.0111236572265625,
-0.0305328369140625,
-0.000022590160369873047,
-0.0248870849609375,
-0.049285888671875,
0.06414794921875,
-0.01099395751953125,
0.03033447265625,
0.01393890380859375,
0.0183563232421875,
0.004604339599609375,
0.01471710205078125,
-0.040924072265625,
0.04412841796875,
-0.00417327880859375,
0.0284423828125,
-0.055419921875,
-0.005970001220703125,
-0.01026153564453125,
0.0350341796875,
0.055389404296875,
0.00478363037109375,
-0.01004791259765625,
-0.0083160400390625,
0.0286102294921875,
0.036651611328125,
-0.0205230712890625,
0.00846099853515625,
-0.01480865478515625,
0.01053619384765625,
0.039306640625,
-0.0086517333984375,
0.049224853515625,
0.01445770263671875,
-0.04150390625,
-0.01119232177734375,
0.01218414306640625,
0.028350830078125,
-0.0170440673828125,
-0.0423583984375,
-0.02337646484375,
-0.0108642578125,
0.01401519775390625,
-0.0164642333984375,
0.0167388916015625,
0.04766845703125,
0.05633544921875,
-0.03265380859375,
0.0230255126953125,
-0.037750244140625,
0.078369140625,
-0.0011739730834960938,
0.041015625,
0.031890869140625,
0.0187530517578125,
0.058868408203125,
-0.0191650390625,
0.0249786376953125,
-0.0024547576904296875,
-0.0175628662109375,
0.05535888671875,
0.01383209228515625,
0.030853271484375,
-0.0355224609375,
0.0147857666015625,
0.0345458984375,
0.06829833984375,
-0.054229736328125,
-0.039215087890625,
0.005191802978515625,
0.021209716796875,
0.03253173828125,
-0.0081787109375,
0.04351806640625,
-0.003818511962890625,
0.0283966064453125,
-0.055084228515625,
0.0197296142578125,
0.0259552001953125,
0.04315185546875,
-0.006805419921875,
-0.00991058349609375,
-0.078125,
-0.01001739501953125,
-0.053741455078125,
-0.0197601318359375,
0.025482177734375,
0.07977294921875,
0.040191650390625,
0.0738525390625,
0.0010690689086914062,
-0.04095458984375,
0.023712158203125,
0.00412750244140625,
0.0281982421875,
-0.035430908203125,
0.0272369384765625,
-0.006931304931640625,
0.0089263916015625,
0.0033054351806640625,
-0.0037860870361328125,
-0.00235748291015625,
0.039703369140625,
0.05987548828125,
0.004421234130859375,
-0.03369140625,
0.0438232421875,
0.0030117034912109375,
-0.01197052001953125,
-0.0478515625,
0.003162384033203125,
0.01067352294921875,
-0.0087738037109375,
0.03265380859375,
-0.011016845703125,
0.034912109375,
-0.0012998580932617188,
0.0543212890625,
-0.00011068582534790039,
-0.03466796875,
0.048828125,
-0.01509857177734375,
0.1175537109375,
0.028961181640625,
-0.056640625,
-0.00739288330078125,
-0.08306884765625,
-0.047943115234375,
0.06121826171875,
0.04412841796875,
-0.0047149658203125,
0.0006308555603027344,
0.020294189453125,
-0.0185394287109375,
0.01157379150390625,
0.003795623779296875,
0.0226898193359375,
-0.0006322860717773438,
0.0019168853759765625,
0.009124755859375,
-0.01428985595703125,
-0.005054473876953125,
0.016937255859375,
0.026763916015625,
0.0167236328125,
0.0034770965576171875,
0.01358795166015625,
0.01849365234375,
-0.034393310546875,
0.0653076171875,
-0.07989501953125,
-0.041168212890625,
0.05694580078125,
0.00989532470703125,
0.0149688720703125,
-0.010528564453125,
0.030792236328125,
0.0121612548828125,
0.0545654296875,
-0.0640869140625,
-0.018798828125,
0.0186614990234375,
0.0194854736328125,
-0.0290374755859375,
0.01386260986328125,
-0.0247650146484375,
-0.002811431884765625,
-0.011871337890625,
-0.031707763671875,
0.0231475830078125,
0.01506805419921875,
0.030059814453125,
0.0248565673828125,
-0.007965087890625,
-0.022216796875,
0.0173797607421875,
-0.02545166015625,
0.01345062255859375,
0.03594970703125,
-0.0162200927734375,
-0.033660888671875,
0.047607421875,
0.0035991668701171875,
-0.01029205322265625,
0.0310516357421875,
0.0255279541015625,
0.0394287109375,
-0.06207275390625,
-0.0270843505859375,
0.03466796875,
0.03253173828125,
-0.036773681640625,
0.033721923828125,
0.01364898681640625,
-0.0182952880859375,
0.02557373046875,
-0.004642486572265625,
-0.0310211181640625,
-0.031707763671875,
-0.01430511474609375,
0.00395965576171875,
-0.0218505859375,
-0.05767822265625,
-0.062286376953125,
-0.0079193115234375,
0.051177978515625,
-0.004444122314453125,
-0.0268402099609375,
0.016571044921875,
-0.045806884765625,
0.029998779296875,
-0.00014007091522216797,
-0.0491943359375,
0.01995849609375,
0.042633056640625,
-0.0167236328125,
0.0196380615234375,
-0.035980224609375,
-0.049102783203125,
-0.01543426513671875,
0.0310211181640625,
0.030670166015625,
-0.036834716796875,
-0.03759765625,
0.036590576171875,
0.0240936279296875,
0.07769775390625,
0.0399169921875,
-0.01751708984375,
-0.005153656005859375,
0.01070404052734375,
-0.05023193359375,
-0.06951904296875,
0.038787841796875,
-0.08160400390625,
-0.035736083984375,
-0.01152801513671875,
0.0177764892578125,
0.032684326171875,
-0.01129913330078125,
-0.037109375,
0.04718017578125,
-0.01413726806640625,
-0.018646240234375,
-0.0594482421875,
0.0295867919921875,
0.0083160400390625,
-0.02276611328125,
-0.01198577880859375,
-0.05303955078125,
-0.028411865234375,
0.022491455078125,
0.0147857666015625,
0.035491943359375,
0.004886627197265625,
0.0248870849609375,
-0.032684326171875,
0.01450347900390625,
-0.00543975830078125,
-0.00020444393157958984,
0.0214996337890625,
-0.004131317138671875,
-0.01238250732421875,
0.035125732421875,
-0.04742431640625,
-0.046722412109375,
-0.0340576171875,
-0.006237030029296875,
0.0167388916015625,
-0.05950927734375,
-0.039306640625,
-0.053619384765625,
0.039642333984375,
-0.012603759765625,
0.020660400390625,
-0.0055084228515625,
-0.0258941650390625,
-0.049072265625,
-0.032257080078125,
-0.0102081298828125,
0.01654052734375,
-0.058258056640625,
0.0082244873046875,
0.0201568603515625,
0.046295166015625,
-0.0036602020263671875,
-0.016876220703125,
0.0274810791015625,
-0.04913330078125,
0.0113525390625,
-0.007541656494140625,
-0.021209716796875,
0.050872802734375,
-0.045379638671875,
0.00765228271484375,
-0.0141448974609375,
-0.034820556640625,
-0.00988006591796875,
-0.042388916015625,
-0.01184844970703125,
-0.0212860107421875,
0.0003619194030761719,
-0.0049285888671875,
0.019989013671875,
-0.00860595703125,
0.052154541015625,
-0.01290130615234375,
0.0179595947265625,
-0.03564453125,
0.03851318359375,
0.0103302001953125,
0.04583740234375,
-0.0321044921875,
0.05230712890625,
0.05657958984375,
0.0296630859375,
0.0212249755859375,
-0.034423828125,
-0.016510009765625,
0.03924560546875,
0.01226043701171875,
-0.02691650390625,
0.01241302490234375,
-0.0311279296875,
0.00872802734375,
-0.033477783203125,
-0.0290985107421875,
0.0028553009033203125,
-0.0028934478759765625,
0.0350341796875,
-0.04339599609375,
0.0172119140625
]
|
4ecdaa95664c9e3fedd508ac5c839c9c76c3942b | Wordpress Stackexchange
Q: What exactly does the 's' parameter search for in WP queries? I have a simple question, but can't find the answer anywhere. What exactly does the 's' parameter search when used in a query? Ex:
$args = array(
's' => $keyword
);
$query = new WP_Query($args);
Does it just search post content, or does it also look at title, tags, etc?
EDIT: Just to clarify. The question is what post fields are being searched, not what data is being returned.
A: As usual it's most reliable to dump the resulting SQL query and see:
SELECT wp_posts.ID
FROM wp_posts
WHERE 1=1
AND (((wp_posts.post_title LIKE '%keyword%')
OR (wp_posts.post_content LIKE '%keyword%')))
AND wp_posts.post_type = 'post'
AND ((wp_posts.post_status = 'publish'))
ORDER BY wp_posts.post_date DESC LIMIT 0,5
The only two things native search is considering are title and content.
| Q: What exactly does the 's' parameter search for in WP queries? I have a simple question, but can't find the answer anywhere. What exactly does the 's' parameter search when used in a query? Ex:
$args = array(
's' => $keyword
);
$query = new WP_Query($args);
Does it just search post content, or does it also look at title, tags, etc?
EDIT: Just to clarify. The question is what post fields are being searched, not what data is being returned.
A: As usual it's most reliable to dump the resulting SQL query and see:
SELECT wp_posts.ID
FROM wp_posts
WHERE 1=1
AND (((wp_posts.post_title LIKE '%keyword%')
OR (wp_posts.post_content LIKE '%keyword%')))
AND wp_posts.post_type = 'post'
AND ((wp_posts.post_status = 'publish'))
ORDER BY wp_posts.post_date DESC LIMIT 0,5
The only two things native search is considering are title and content.
| wordpress | {
"language": "en",
"length": 135,
"provenance": "stackexchange_00019.jsonl.gz:455914",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/189494"
} | [
0.0306549072265625,
-0.0018815994262695312,
0.0390625,
0.0208740234375,
-0.0151824951171875,
-0.0325927734375,
0.062255859375,
-0.03564453125,
0.03594970703125,
0.040557861328125,
-0.04608154296875,
-0.012725830078125,
-0.01678466796875,
0.0029582977294921875,
-0.04364013671875,
-0.03289794921875,
0.0251312255859375,
-0.039154052734375,
-0.0131072998046875,
-0.0240478515625,
0.0225677490234375,
-0.0255126953125,
0.032440185546875,
0.0255279541015625,
0.0224151611328125,
-0.00441741943359375,
0.060272216796875,
-0.01183319091796875,
0.046539306640625,
0.0187835693359375,
0.0288238525390625,
-0.056427001953125,
0.0177001953125,
-0.0005879402160644531,
0.01995849609375,
0.032623291015625,
0.0467529296875,
-0.0015287399291992188,
0.042572021484375,
0.0011339187622070312,
0.041351318359375,
-0.030609130859375,
0.003658294677734375,
0.0390625,
0.0004527568817138672,
-0.03985595703125,
0.07061767578125,
-0.0075531005859375,
0.039215087890625,
-0.01462554931640625,
0.004528045654296875,
-0.0029621124267578125,
0.011260986328125,
-0.06451416015625,
-0.0148162841796875,
0.00424957275390625,
0.00774383544921875,
0.0361328125,
0.0236053466796875,
-0.003925323486328125,
-0.03570556640625,
0.037139892578125,
0.0104522705078125,
-0.00255584716796875,
-0.0022716522216796875,
0.0036029815673828125,
0.050537109375,
0.033050537109375,
-0.05584716796875,
-0.056488037109375,
0.023406982421875,
-0.01470184326171875,
0.00010132789611816406,
0.01136016845703125,
-0.01120758056640625,
-0.05279541015625,
0.0258636474609375,
-0.022430419921875,
-0.007625579833984375,
0.04443359375,
-0.01035308837890625,
-0.03765869140625,
-0.04669189453125,
-0.0000883340835571289,
0.0099334716796875,
0.00627899169921875,
-0.006866455078125,
0.0025691986083984375,
-0.00946044921875,
-0.028778076171875,
-0.0209503173828125,
0.0037021636962890625,
-0.016571044921875,
-0.045379638671875,
-0.0206756591796875,
-0.0653076171875,
-0.01215362548828125,
0.0271148681640625,
0.0063323974609375,
0.0227813720703125,
-0.024871826171875,
-0.0361328125,
0.01430511474609375,
-0.0243988037109375,
0.034820556640625,
0.0780029296875,
-0.0023670196533203125,
0.036285400390625,
0.037750244140625,
-0.00787353515625,
0.0316162109375,
-0.0015811920166015625,
-0.00499725341796875,
-0.0084228515625,
-0.035736083984375,
0.0243072509765625,
-0.007472991943359375,
-0.035186767578125,
-0.002689361572265625,
-0.0293426513671875,
-0.01456451416015625,
0.014129638671875,
0.006237030029296875,
-0.0311279296875,
0.031097412109375,
-0.004993438720703125,
-0.00008791685104370117,
-0.00001049041748046875,
-0.06463623046875,
0.0311431884765625,
0.00004607439041137695,
0.01654052734375,
0.0267181396484375,
0.0283660888671875,
-0.0246124267578125,
-0.016632080078125,
0.020416259765625,
-0.03515625,
-0.006000518798828125,
-0.01232147216796875,
0.041900634765625,
-0.0174407958984375,
0.005283355712890625,
0.02197265625,
0.006763458251953125,
-0.032867431640625,
0.021514892578125,
0.045257568359375,
0.007904052734375,
-0.0009164810180664062,
0.0180511474609375,
0.0382080078125,
0.0394287109375,
0.006683349609375,
-0.07257080078125,
0.032989501953125,
-0.007434844970703125,
0.016082763671875,
-0.057373046875,
-0.041412353515625,
-0.0025386810302734375,
-0.01360321044921875,
0.01776123046875,
0.000469207763671875,
-0.00701904296875,
0.0201568603515625,
-0.03692626953125,
0.008392333984375,
0.01097869873046875,
-0.0219879150390625,
-0.0213165283203125,
0.00002181529998779297,
0.03173828125,
-0.01337432861328125,
-0.0142822265625,
0.006908416748046875,
0.00916290283203125,
0.020660400390625,
0.01557159423828125,
0.0222930908203125,
-0.03424072265625,
-0.041412353515625,
0.06829833984375,
-0.041046142578125,
-0.0379638671875,
0.05224609375,
0.0161895751953125,
0.049468994140625,
-0.0144500732421875,
0.01079559326171875,
0.0244598388671875,
0.043792724609375,
-0.03594970703125,
0.0850830078125,
0.0031909942626953125,
-0.05108642578125,
-0.05255126953125,
-0.027587890625,
-0.01654052734375,
-0.033782958984375,
0.044525146484375,
-0.00921630859375,
0.01305389404296875,
0.0092010498046875,
-0.066650390625,
0.0195770263671875,
-0.0240478515625,
0.00801849365234375,
0.0012922286987304688,
0.0252685546875,
0.00786590576171875,
-0.0157470703125,
-0.01401519775390625,
0.0159759521484375,
-0.0273284912109375,
-0.033203125,
-0.006534576416015625,
0.010040283203125,
-0.002857208251953125,
0.018707275390625,
-0.0178985595703125,
-0.0479736328125,
-0.025604248046875,
0.02410888671875,
0.06646728515625,
-0.0008625984191894531,
0.0124053955078125,
-0.01145172119140625,
0.1107177734375,
0.00807952880859375,
0.0311279296875,
-0.0156097412109375,
0.0599365234375,
0.08514404296875,
-0.0021419525146484375,
0.007171630859375,
0.024810791015625,
-0.01558685302734375,
-0.00449371337890625,
0.0236358642578125,
0.038177490234375,
0.060028076171875,
-0.002712249755859375,
-0.0167388916015625,
0.0743408203125,
-0.046539306640625,
0.004852294921875,
-0.0183258056640625,
0.02001953125,
0.0657958984375,
0.0197906494140625,
-0.02789306640625,
0.01073455810546875,
-0.032684326171875,
-0.0022754669189453125,
0.0210418701171875,
-0.0116424560546875,
0.0088043212890625,
-0.045196533203125,
0.02996826171875,
-0.01824951171875,
-0.018890380859375,
0.018157958984375,
-0.008880615234375,
0.00974273681640625,
0.0203399658203125,
0.0286865234375,
0.0186920166015625,
0.005001068115234375,
0.006084442138671875,
0.004222869873046875,
-0.031982421875,
0.013946533203125,
0.018829345703125,
-0.0267791748046875,
-0.0226287841796875,
0.005168914794921875,
-0.0036373138427734375,
0.014190673828125,
-0.0178985595703125,
0.00493621826171875,
0.0323486328125,
-0.0016994476318359375,
-0.003246307373046875,
-0.034454345703125,
-0.017333984375,
0.01727294921875,
0.03717041015625,
0.038665771484375,
0.0308380126953125,
0.041717529296875,
0.01285552978515625,
-0.01293182373046875,
0.0428466796875,
0.02294921875,
-0.017059326171875,
-0.01528167724609375,
-0.028167724609375,
0.0017223358154296875,
-0.0211334228515625,
0.020660400390625,
0.054656982421875,
0.00354766845703125,
-0.016845703125,
0.030364990234375,
0.0036487579345703125,
0.017608642578125,
0.01534271240234375,
-0.0025577545166015625,
0.0491943359375,
-0.10321044921875,
0.007686614990234375,
0.03546142578125,
0.03656005859375,
0.00975799560546875,
-0.035125732421875,
-0.0096282958984375,
0.030242919921875,
-0.11358642578125,
-0.0966796875,
0.001674652099609375,
-0.041107177734375,
-0.06280517578125,
-0.004657745361328125,
-0.03509521484375,
0.034820556640625,
0.01010894775390625,
-0.032318115234375,
0.0025634765625,
-0.022308349609375,
-0.0809326171875,
-0.031768798828125,
-0.0751953125,
0.053741455078125,
-0.005550384521484375,
0.03619384765625,
0.01453399658203125,
0.04705810546875,
0.04046630859375,
-0.0221405029296875,
0.043243408203125,
0.0458984375,
-0.03155517578125,
-0.005207061767578125,
0.0018625259399414062,
-0.01503753662109375,
-0.00719451904296875,
-0.008941650390625,
0.06597900390625,
0.02825927734375,
-0.041748046875,
0.0107421875,
-0.01959228515625,
0.026580810546875,
0.03338623046875,
-0.025146484375,
-0.01406097412109375,
0.053009033203125,
0.033050537109375,
-0.0095977783203125,
-0.0218048095703125,
-0.020111083984375,
-0.04986572265625,
0.01934814453125,
0.042816162109375,
0.0009636878967285156,
-0.0019369125366210938,
-0.01453399658203125,
0.029052734375,
0.013092041015625,
-0.006877899169921875,
-0.0419921875,
0.03875732421875,
0.016326904296875,
0.056060791015625,
-0.004871368408203125,
-0.007556915283203125,
-0.04302978515625,
0.042755126953125,
-0.003265380859375,
-0.03167724609375,
0.0012235641479492188,
-0.0360107421875,
-0.01300811767578125,
-0.01215362548828125,
0.0487060546875,
0.0255889892578125,
0.03546142578125,
-0.053680419921875,
-0.0418701171875,
-0.06951904296875,
0.057586669921875,
-0.0227203369140625,
-0.013763427734375,
-0.00632476806640625,
0.00151824951171875,
-0.041534423828125,
-0.0252685546875,
-0.036163330078125,
0.0092315673828125,
-0.0298004150390625,
-0.01222991943359375,
-0.0176544189453125,
-0.033416748046875,
-0.0245361328125,
-0.06475830078125,
-0.03875732421875,
-0.018280029296875,
0.02813720703125,
-0.0133056640625,
0.015777587890625,
0.00577545166015625,
0.016998291015625,
-0.0107574462890625,
-0.006053924560546875,
-0.022857666015625,
-0.055572509765625,
-0.0015621185302734375,
0.0164794921875,
-0.0021038055419921875,
-0.018310546875,
-0.02215576171875,
-0.0139923095703125,
0.0251312255859375,
0.01239776611328125,
0.035980224609375,
0.010009765625,
-0.0286865234375,
0.042205810546875,
0.0201416015625,
0.023651123046875,
-0.003810882568359375,
-0.00740814208984375,
-0.00037670135498046875,
-0.01389312744140625,
0.00406646728515625,
-0.0290679931640625,
-0.013153076171875,
0.0035572052001953125,
-0.027923583984375,
-0.009552001953125,
-0.016815185546875,
-0.01404571533203125,
0.0247039794921875,
-0.0384521484375,
0.03021240234375,
-0.02081298828125,
0.003582000732421875,
0.1253662109375,
0.04730224609375,
0.009674072265625,
-0.03326416015625,
0.09100341796875,
0.001979827880859375,
-0.07183837890625,
-0.045013427734375,
-0.057098388671875,
-0.00823974609375,
0.005863189697265625,
0.048583984375,
0.0082244873046875,
0.012054443359375,
0.004520416259765625,
-0.031585693359375,
-0.020111083984375,
-0.0196990966796875,
0.043792724609375,
0.0126190185546875,
0.00131988525390625,
-0.00811004638671875,
-0.0258636474609375,
0.022186279296875,
0.044769287109375,
-0.00966644287109375,
-0.0254058837890625,
0.0220947265625,
0.0467529296875,
-0.05291748046875,
0.0546875,
-0.034759521484375,
-0.0194854736328125,
0.017852783203125,
0.0015363693237304688,
-0.00876617431640625,
0.012237548828125,
-0.0057220458984375,
-0.0106658935546875,
0.0024051666259765625,
-0.0081329345703125,
0.0211639404296875,
0.027618408203125,
-0.001934051513671875,
0.0181884765625,
0.013641357421875,
-0.0220489501953125,
-0.0274505615234375,
0.00272369384765625,
0.030303955078125,
-0.011962890625,
-0.058441162109375,
0.01505279541015625,
0.00366973876953125,
-0.0293121337890625,
0.039886474609375,
0.0206451416015625,
0.0218963623046875,
0.0208587646484375,
-0.00962066650390625,
0.00408935546875,
0.0253753662109375,
0.0026645660400390625,
-0.0216827392578125,
0.038665771484375,
-0.0191497802734375,
-0.00023829936981201172,
0.0299224853515625,
0.029693603515625,
-0.0032291412353515625,
0.02587890625,
-0.037139892578125,
-0.022125244140625,
0.00630950927734375,
0.006031036376953125,
0.017822265625,
-0.0080718994140625,
0.0306243896484375,
-0.038299560546875,
0.06634521484375,
-0.016845703125,
-0.0367431640625,
-0.02459716796875,
-0.01226806640625,
-0.0192718505859375,
0.03570556640625,
0.048736572265625,
0.032745361328125,
-0.03277587890625,
0.00897979736328125,
0.0245208740234375,
-0.003108978271484375,
-0.039520263671875,
-0.019317626953125,
0.021820068359375,
0.027252197265625,
-0.01010894775390625,
0.027313232421875,
-0.04095458984375,
0.0216064453125,
-0.0213623046875,
0.01092529296875,
-0.0253143310546875,
-0.0290679931640625,
-0.0159454345703125,
-0.0203399658203125,
0.0176849365234375,
-0.027313232421875,
0.00994873046875,
-0.02886962890625,
-0.02630615234375,
0.0697021484375,
-0.0035305023193359375,
0.05426025390625,
-0.036590576171875,
-0.0155792236328125,
0.0227508544921875,
0.006488800048828125,
0.03472900390625,
0.0015125274658203125,
-0.035614013671875,
-0.018157958984375,
0.0000978708267211914,
-0.015869140625,
0.043792724609375,
0.00665283203125,
-0.0297698974609375,
-0.01861572265625,
-0.0032501220703125,
0.0080718994140625,
0.0126190185546875,
0.005107879638671875,
-0.0269775390625,
0.00812530517578125,
-0.0009074211120605469,
-0.02032470703125,
-0.032623291015625,
0.06488037109375,
-0.032012939453125,
0.0304107666015625,
-0.0260009765625,
0.0155792236328125,
-0.001964569091796875,
0.007259368896484375,
0.005340576171875,
-0.0234527587890625,
-0.02587890625,
-0.01390838623046875,
0.015838623046875,
-0.00101470947265625,
0.0113677978515625,
-0.00921630859375,
0.017791748046875,
-0.006275177001953125,
-0.005512237548828125,
-0.0189361572265625,
0.032196044921875,
0.000553131103515625,
0.040496826171875,
0.022247314453125,
-0.0030498504638671875,
0.01187896728515625,
-0.0214996337890625,
0.045562744140625,
-0.037689208984375,
-0.0239410400390625,
-0.03887939453125,
0.01947021484375,
0.005283355712890625,
0.00901031494140625,
0.05615234375,
-0.01001739501953125,
0.045867919921875,
0.0219268798828125,
0.01702880859375,
0.03302001953125,
-0.005260467529296875,
-0.0258941650390625,
-0.003200531005859375,
0.015045166015625,
-0.0157470703125,
0.006916046142578125,
0.0250091552734375,
-0.01303863525390625,
0.0015697479248046875,
0.00843048095703125,
0.04901123046875,
-0.02423095703125,
-0.0006399154663085938,
0.033843994140625,
-0.00615692138671875,
-0.0180511474609375,
0.01461029052734375,
0.00897216796875,
-0.015655517578125,
0.0017375946044921875,
0.00791168212890625,
-0.0138702392578125,
-0.00705718994140625,
-0.00746917724609375,
0.013397216796875,
-0.01355743408203125,
0.020751953125,
-0.0178375244140625,
-0.03759765625,
-0.023345947265625,
0.021209716796875,
-0.0309600830078125,
-0.034820556640625,
0.01297760009765625,
0.014190673828125,
-0.0006103515625,
-0.077392578125,
0.031158447265625,
-0.00746917724609375,
-0.0108489990234375,
0.014617919921875,
0.0154266357421875,
0.03399658203125,
0.0968017578125,
-0.00917816162109375,
0.00897216796875,
0.050872802734375,
0.0164031982421875,
-0.0258941650390625,
-0.0292816162109375,
0.00537872314453125,
0.07318115234375,
-0.046234130859375,
0.03143310546875,
-0.0018911361694335938,
-0.00860595703125,
0.0013523101806640625,
-0.046875,
0.0025482177734375,
-0.0804443359375,
0.032470703125,
0.015716552734375,
0.024749755859375,
0.03106689453125,
-0.0293121337890625,
-0.011627197265625,
-0.072265625,
-0.0301666259765625,
-0.035491943359375,
-0.0247802734375,
0.00710296630859375,
-0.0330810546875,
-0.023956298828125,
0.0374755859375,
0.0298614501953125,
-0.003864288330078125,
0.033538818359375,
0.00775146484375,
-0.0281982421875,
0.003261566162109375,
-0.06756591796875,
0.032073974609375,
0.007427215576171875,
0.05035400390625,
-0.07867431640625,
-0.00464630126953125,
-0.0024890899658203125,
0.00738525390625,
0.045928955078125,
-0.00701904296875,
-0.00034332275390625,
-0.010955810546875,
0.05908203125,
0.03619384765625,
-0.010833740234375,
0.011077880859375,
0.02734375,
0.045806884765625,
0.094482421875,
-0.04840087890625,
0.029022216796875,
0.0028362274169921875,
0.055511474609375,
0.037322998046875,
0.01202392578125,
0.01910400390625,
-0.00882720947265625,
-0.024261474609375,
-0.0269012451171875,
-0.0117950439453125,
0.0160064697265625,
-0.038360595703125,
0.01318359375,
0.03125,
0.03857421875,
-0.09722900390625,
-0.059814453125,
-0.033660888671875,
0.036346435546875,
0.0099334716796875,
0.03338623046875,
0.047271728515625,
0.0237274169921875,
0.099853515625,
-0.01032257080078125,
0.024139404296875,
0.009857177734375,
-0.008514404296875,
0.04345703125,
0.01032257080078125,
0.024139404296875,
-0.040740966796875,
-0.0006732940673828125,
0.0029773712158203125,
0.04425048828125,
-0.0292816162109375,
-0.0509033203125,
0.008270263671875,
-0.0038394927978515625,
0.01690673828125,
-0.0024623870849609375,
-0.00847625732421875,
0.047607421875,
0.0654296875,
-0.0230560302734375,
0.007137298583984375,
0.0265960693359375,
-0.01093292236328125,
-0.01506805419921875,
-0.0212860107421875,
-0.004669189453125,
0.032958984375,
-0.006931304931640625,
0.01187896728515625,
0.01467132568359375,
0.034271240234375,
-0.010528564453125,
0.0234527587890625,
-0.0263824462890625,
-0.003376007080078125,
-0.0137481689453125,
0.00464630126953125,
-0.0212249755859375,
0.0333251953125,
-0.0174407958984375,
-0.0295257568359375,
-0.0011281967163085938,
0.0268402099609375,
0.047271728515625,
-0.0165252685546875,
0.04156494140625,
0.01253509521484375,
-0.0384521484375,
0.01189422607421875,
0.004505157470703125,
-0.01320648193359375,
-0.0125579833984375,
-0.005428314208984375,
0.0290985107421875,
0.055755615234375,
0.01788330078125,
-0.00341796875,
0.054656982421875,
0.0212554931640625,
0.0202789306640625,
0.0311279296875,
0.0146636962890625,
-0.0201263427734375,
0.00494384765625,
0.0214385986328125,
0.049896240234375,
0.05517578125,
-0.059295654296875,
0.0015401840209960938,
-0.037811279296875,
-0.0806884765625,
0.0245513916015625,
0.045928955078125,
-0.0024852752685546875,
-0.006778717041015625,
-0.00701904296875,
-0.034515380859375,
0.009246826171875,
0.0182037353515625,
0.01824951171875,
0.020416259765625,
-0.0133209228515625,
-0.005535125732421875,
-0.05816650390625,
-0.0165252685546875,
0.042388916015625,
-0.0129241943359375,
-0.039703369140625,
0.043975830078125,
0.021942138671875,
-0.02301025390625,
0.0312347412109375,
0.01375579833984375,
0.001155853271484375,
0.0169830322265625,
0.036041259765625,
-0.01177978515625,
0.00079345703125,
-0.0108795166015625,
0.0015821456909179688,
0.02191162109375,
0.046905517578125,
-0.0031299591064453125,
0.01361846923828125,
0.007801055908203125,
0.020263671875,
-0.0100555419921875,
0.0035381317138671875,
-0.051055908203125,
0.01177978515625,
-0.01666259765625,
-0.048492431640625,
0.046173095703125,
-0.0212860107421875,
0.018402099609375,
0.0270843505859375,
0.004302978515625,
-0.05572509765625,
0.06304931640625,
-0.07080078125,
0.08905029296875,
0.052215576171875,
0.0055999755859375,
0.037139892578125,
-0.001926422119140625,
-0.036376953125,
0.046478271484375,
-0.0008091926574707031,
-0.0136566162109375,
-0.01505279541015625,
0.033355712890625,
-0.0411376953125,
-0.00007206201553344727,
0.018951416015625,
0.02252197265625,
0.011077880859375,
-0.044189453125,
-0.030242919921875,
0.0216522216796875,
-0.0022373199462890625,
-0.019744873046875,
0.009521484375,
-0.00731658935546875,
0.01145172119140625,
0.0203704833984375,
-0.0384521484375,
-0.0556640625,
-0.0215911865234375,
0.007328033447265625,
0.0012912750244140625,
-0.017822265625,
0.01210784912109375,
-0.0227508544921875,
-0.02142333984375,
-0.01311492919921875,
-0.01232147216796875,
0.01253509521484375,
0.02886962890625,
-0.051483154296875,
-0.00946044921875,
-0.0440673828125,
-0.01776123046875,
-0.0355224609375,
0.04302978515625,
0.045623779296875,
-0.040740966796875,
-0.020294189453125,
0.06884765625,
0.03070068359375,
0.09185791015625,
0.004322052001953125,
-0.00926971435546875,
0.0662841796875,
0.01081085205078125,
-0.018829345703125,
-0.05462646484375,
-0.024261474609375,
0.0015316009521484375,
0.036163330078125,
0.00823211669921875,
0.004779815673828125,
0.0301513671875,
-0.0261077880859375,
-0.0955810546875,
0.03631591796875,
-0.02496337890625,
-0.028472900390625,
-0.05621337890625,
0.01221466064453125,
0.03460693359375,
-0.0479736328125,
-0.01218414306640625,
0.009124755859375,
-0.075439453125,
-0.0297698974609375,
0.038055419921875,
0.013397216796875,
0.027862548828125,
0.02838134765625,
-0.06988525390625,
0.0274658203125,
-0.01282501220703125,
0.02642822265625,
0.0182952880859375,
-0.01503753662109375,
0.0254058837890625,
0.00978851318359375,
-0.040863037109375,
-0.0120849609375,
0.00666046142578125,
0.0025157928466796875,
-0.01263427734375,
0.0232086181640625,
-0.010772705078125,
0.027587890625,
0.0469970703125,
0.058135986328125,
0.02069091796875,
-0.045928955078125,
-0.006999969482421875,
-0.00531768798828125,
-0.0121002197265625,
-0.016082763671875,
0.019134521484375,
-0.0469970703125,
-0.0157318115234375,
0.0039005279541015625,
0.013824462890625,
-0.0179901123046875,
0.0018129348754882812,
0.00044846534729003906,
-0.0321044921875,
0.01068115234375,
-0.0112152099609375,
0.004283905029296875,
0.0166168212890625,
0.044189453125,
-0.05450439453125,
-0.02252197265625,
-0.0144195556640625,
0.017852783203125,
-0.0128021240234375,
-0.058685302734375,
-0.0077972412109375,
0.02435302734375,
0.006488800048828125,
-0.0288543701171875,
0.031982421875,
-0.01904296875,
0.05560302734375,
0.0088653564453125,
-0.0205535888671875,
0.0196380615234375,
0.01397705078125,
-0.0028018951416015625,
-0.04046630859375,
0.0496826171875,
0.0084228515625,
0.0687255859375,
0.00937652587890625,
-0.0156707763671875,
-0.0282135009765625,
0.028656005859375,
0.0164337158203125,
-0.0185394287109375,
0.027679443359375,
-0.0006189346313476562,
0.00368499755859375,
-0.0003380775451660156,
-0.01690673828125,
-0.032470703125,
0.0146331787109375,
0.0176544189453125,
-0.0304718017578125,
0.01727294921875
]
|
42133024a90200ff12fb4ae5ce10a40110966e07 | Wordpress Stackexchange
Q: How to run Jetpack from localhost? I just installed the jetpack plugin on my localhost version of WordPress 4.2.2 however after activating it—when I click on 'Connect to Wordpress.com', I get the following error:
Your website needs to be publicly accessible to use Jetpack: site_inaccessible Error Details: The Jetpack server was unable to communicate with your site http://wordpress.local [IXR -32300: transport error: http_request_failed Couldn't resolve host 'wordpress.local']
Is there any way to work around this running on localhost?
A: Add this to your wp-config.php:
const JETPACK_DEV_DEBUG = TRUE;
This makes it possible to use features on localhost that don’t require a connection to wordpress.com. See the announcement post on jetpack.me for the background.
For your own plugins, learn that lesson: Do not rely on working outgoing connections. Respect your users privacy, and explain in clear words why such a connection is necessary, what data will be sent, and how to work with the plugin when the connection fails. In other words: Don’t do it the Jetpack way.
| Q: How to run Jetpack from localhost? I just installed the jetpack plugin on my localhost version of WordPress 4.2.2 however after activating it—when I click on 'Connect to Wordpress.com', I get the following error:
Your website needs to be publicly accessible to use Jetpack: site_inaccessible Error Details: The Jetpack server was unable to communicate with your site http://wordpress.local [IXR -32300: transport error: http_request_failed Couldn't resolve host 'wordpress.local']
Is there any way to work around this running on localhost?
A: Add this to your wp-config.php:
const JETPACK_DEV_DEBUG = TRUE;
This makes it possible to use features on localhost that don’t require a connection to wordpress.com. See the announcement post on jetpack.me for the background.
For your own plugins, learn that lesson: Do not rely on working outgoing connections. Respect your users privacy, and explain in clear words why such a connection is necessary, what data will be sent, and how to work with the plugin when the connection fails. In other words: Don’t do it the Jetpack way.
| wordpress | {
"language": "en",
"length": 168,
"provenance": "stackexchange_00019.jsonl.gz:455926",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/189532"
} | [
0.01056671142578125,
-0.027099609375,
0.0221710205078125,
-0.037353515625,
-0.025054931640625,
0.020782470703125,
-0.0019397735595703125,
0.002086639404296875,
0.014312744140625,
-0.0093231201171875,
-0.017822265625,
-0.0096893310546875,
-0.0229034423828125,
-0.033905029296875,
0.01025390625,
-0.03436279296875,
0.01290130615234375,
0.0281524658203125,
0.0157012939453125,
-0.0178680419921875,
0.0169525146484375,
0.0009784698486328125,
-0.034576416015625,
0.07373046875,
-0.0191802978515625,
0.0239715576171875,
0.10308837890625,
-0.0284423828125,
-0.01412200927734375,
-0.022369384765625,
0.00732421875,
0.0043182373046875,
-0.01314544677734375,
0.053497314453125,
-0.0413818359375,
-0.07049560546875,
-0.018310546875,
0.030029296875,
-0.0292510986328125,
0.04156494140625,
0.0008416175842285156,
-0.01251220703125,
-0.028411865234375,
0.061004638671875,
-0.041839599609375,
-0.0159759521484375,
-0.0156707763671875,
-0.0298919677734375,
-0.0002288818359375,
-0.00833892822265625,
-0.0226593017578125,
0.0170135498046875,
-0.0225982666015625,
0.030487060546875,
0.0009455680847167969,
-0.01105499267578125,
0.0168609619140625,
0.0189208984375,
0.0239715576171875,
-0.005535125732421875,
-0.032989501953125,
0.025421142578125,
0.000232696533203125,
-0.01012420654296875,
0.018310546875,
-0.0029201507568359375,
-0.0166015625,
-0.0016145706176757812,
0.01177978515625,
0.0693359375,
0.02838134765625,
-0.032012939453125,
0.01042938232421875,
0.01316070556640625,
-0.0396728515625,
-0.032958984375,
0.03607177734375,
-0.00946807861328125,
0.01497650146484375,
-0.00377655029296875,
0.01154327392578125,
-0.0295562744140625,
-0.07098388671875,
-0.004764556884765625,
0.01090240478515625,
0.02813720703125,
0.001300811767578125,
-0.0140380859375,
-0.02642822265625,
-0.0093231201171875,
-0.026580810546875,
-0.061981201171875,
0.0013780593872070312,
0.01335906982421875,
-0.018585205078125,
-0.0157318115234375,
-0.0161590576171875,
-0.04620361328125,
-0.001407623291015625,
-0.0012264251708984375,
0.03875732421875,
-0.048919677734375,
0.056182861328125,
-0.0103759765625,
0.0045928955078125,
-0.0216522216796875,
-0.0170440673828125,
0.032012939453125,
0.0528564453125,
0.034149169921875,
-0.0153350830078125,
0.005451202392578125,
-0.0247344970703125,
-0.006374359130859375,
-0.0145111083984375,
0.028533935546875,
-0.02984619140625,
-0.0072479248046875,
-0.02801513671875,
-0.0001863241195678711,
0.01177215576171875,
0.0307159423828125,
-0.07305908203125,
0.0080413818359375,
-0.01224517822265625,
-0.0310821533203125,
-0.0035610198974609375,
0.03851318359375,
0.01033782958984375,
-0.0347900390625,
-0.0004611015319824219,
0.03363037109375,
0.0225982666015625,
0.0248565673828125,
-0.006221771240234375,
0.0185699462890625,
0.06475830078125,
-0.0189971923828125,
0.006378173828125,
0.00949859619140625,
0.009765625,
-0.0104217529296875,
-0.02996826171875,
-0.0010776519775390625,
0.006519317626953125,
-0.0136871337890625,
0.0159912109375,
0.0297088623046875,
-0.00930023193359375,
0.00975799560546875,
0.00919342041015625,
-0.01161956787109375,
0.0119781494140625,
0.0274505615234375,
0.0357666015625,
0.0255889892578125,
0.053253173828125,
-0.00984954833984375,
-0.034271240234375,
-0.01314544677734375,
-0.002956390380859375,
0.0090179443359375,
0.0093841552734375,
-0.01806640625,
0.002002716064453125,
-0.02410888671875,
-0.017669677734375,
0.0096893310546875,
0.01239776611328125,
0.0098876953125,
0.0041656494140625,
0.0265045166015625,
0.044647216796875,
-0.006622314453125,
-0.0163421630859375,
-0.0119171142578125,
-0.05145263671875,
0.0017232894897460938,
0.040435791015625,
-0.007236480712890625,
0.01171875,
-0.0196533203125,
0.054595947265625,
0.0235137939453125,
-0.005954742431640625,
0.01399993896484375,
0.0050201416015625,
0.03533935546875,
0.0165863037109375,
0.0135345458984375,
-0.01361083984375,
0.01291656494140625,
0.025482177734375,
0.000537872314453125,
-0.0228118896484375,
-0.048065185546875,
0.040008544921875,
0.0203399658203125,
-0.0103912353515625,
-0.01203155517578125,
-0.01480865478515625,
0.00514984130859375,
0.004451751708984375,
0.0172576904296875,
-0.018280029296875,
0.0015916824340820312,
-0.01291656494140625,
0.01088714599609375,
0.039154052734375,
0.0086822509765625,
-0.0238037109375,
-0.016815185546875,
0.0280609130859375,
-0.03662109375,
-0.0399169921875,
0.037200927734375,
-0.05096435546875,
0.01739501953125,
-0.004589080810546875,
0.032745361328125,
-0.0033168792724609375,
-0.0325927734375,
-0.0011005401611328125,
-0.0220794677734375,
0.011016845703125,
0.017791748046875,
-0.0158538818359375,
0.007205963134765625,
-0.01294708251953125,
0.038482666015625,
-0.03240966796875,
-0.0040130615234375,
-0.0166473388671875,
0.008056640625,
-0.00962066650390625,
0.023040771484375,
0.004619598388671875,
0.01441192626953125,
-0.00687408447265625,
0.01507568359375,
0.041961669921875,
-0.037322998046875,
-0.01094818115234375,
-0.0164337158203125,
0.00614166259765625,
-0.066650390625,
0.006809234619140625,
-0.00983428955078125,
-0.0164031982421875,
-0.021697998046875,
-0.005092620849609375,
-0.00815582275390625,
0.044708251953125,
-0.007297515869140625,
-0.0146331787109375,
0.033111572265625,
-0.024749755859375,
-0.0200347900390625,
-0.0225677490234375,
0.00945281982421875,
0.019561767578125,
-0.0038909912109375,
-0.0211029052734375,
0.00969696044921875,
0.0155487060546875,
-0.0272216796875,
0.0291900634765625,
0.032867431640625,
0.006961822509765625,
-0.03485107421875,
-0.0004944801330566406,
-0.006587982177734375,
0.01529693603515625,
0.044464111328125,
0.0215301513671875,
0.032196044921875,
-0.030487060546875,
-0.0269775390625,
0.0253448486328125,
0.03662109375,
-0.01403045654296875,
-0.0259857177734375,
-0.01251220703125,
-0.007793426513671875,
0.0184173583984375,
-0.0284576416015625,
0.025665283203125,
0.01293182373046875,
-0.037811279296875,
-0.0180816650390625,
0.019256591796875,
0.022918701171875,
-0.00403594970703125,
0.0008330345153808594,
0.034149169921875,
-0.0024318695068359375,
0.059967041015625,
-0.0176544189453125,
0.00420379638671875,
-0.0007681846618652344,
0.056121826171875,
0.05419921875,
0.00550079345703125,
-0.0022411346435546875,
0.01490020751953125,
-0.028106689453125,
0.042266845703125,
-0.0012388229370117188,
-0.01263427734375,
0.0070037841796875,
-0.0965576171875,
-0.035125732421875,
0.01358795166015625,
0.01898193359375,
-0.007755279541015625,
-0.05145263671875,
-0.0198211669921875,
-0.01105499267578125,
-0.1346435546875,
-0.09881591796875,
-0.032867431640625,
-0.046630859375,
0.0221405029296875,
0.01105499267578125,
-0.016998291015625,
-0.01186370849609375,
0.05078125,
0.036163330078125,
-0.0531005859375,
-0.0025482177734375,
-0.025482177734375,
-0.07666015625,
-0.060028076171875,
-0.030303955078125,
-0.009796142578125,
0.03240966796875,
0.0148773193359375,
0.07501220703125,
0.01434326171875,
-0.024749755859375,
0.01483917236328125,
-0.020660400390625,
-0.054718017578125,
-0.03240966796875,
0.012603759765625,
-0.03143310546875,
0.0526123046875,
-0.005146026611328125,
0.03759765625,
0.038970947265625,
-0.01316070556640625,
-0.029937744140625,
-0.00818634033203125,
-0.0111083984375,
0.006439208984375,
-0.0032196044921875,
0.003322601318359375,
-0.035064697265625,
-0.007904052734375,
-0.0634765625,
-0.042022705078125,
0.0118408203125,
-0.045013427734375,
-0.0018310546875,
0.0408935546875,
-0.0311737060546875,
-0.035888671875,
-0.0027599334716796875,
0.043701171875,
0.005985260009765625,
0.01837158203125,
-0.0071258544921875,
0.051727294921875,
-0.0029201507568359375,
0.0153350830078125,
-0.039337158203125,
0.06915283203125,
-0.00632476806640625,
-0.035064697265625,
0.0034961700439453125,
-0.0263214111328125,
-0.055328369140625,
0.00797271728515625,
-0.10107421875,
-0.0161895751953125,
0.043243408203125,
-0.03607177734375,
0.00678253173828125,
-0.0380859375,
-0.00850677490234375,
-0.017974853515625,
0.05340576171875,
0.022918701171875,
-0.01971435546875,
-0.006977081298828125,
-0.0048065185546875,
-0.05194091796875,
0.035614013671875,
-0.0255279541015625,
0.01441192626953125,
-0.0146026611328125,
-0.042144775390625,
-0.047882080078125,
-0.0322265625,
0.034881591796875,
-0.04693603515625,
0.039581298828125,
-0.039276123046875,
0.016632080078125,
-0.005031585693359375,
0.0181121826171875,
-0.03173828125,
0.0185699462890625,
-0.07537841796875,
-0.0060577392578125,
-0.00244140625,
-0.08416748046875,
-0.025848388671875,
0.002094268798828125,
0.073486328125,
0.0025005340576171875,
-0.007732391357421875,
-0.007724761962890625,
0.060089111328125,
-0.01253509521484375,
-0.00948333740234375,
-0.046051025390625,
-0.00026726722717285156,
-0.05450439453125,
0.043731689453125,
-0.0290679931640625,
0.019256591796875,
-0.0077667236328125,
0.005695343017578125,
-0.06500244140625,
-0.049652099609375,
0.00579071044921875,
-0.0271148681640625,
0.0716552734375,
-0.059051513671875,
0.016143798828125,
-0.0288848876953125,
-0.01195526123046875,
0.004009246826171875,
-0.01558685302734375,
0.005077362060546875,
-0.040374755859375,
0.01538848876953125,
0.04425048828125,
-0.0120697021484375,
0.00930023193359375,
-0.00949859619140625,
0.06988525390625,
0.01015472412109375,
-0.01763916015625,
0.01204681396484375,
-0.004337310791015625,
0.020477294921875,
0.0029144287109375,
0.047271728515625,
0.048614501953125,
0.0027866363525390625,
0.00896453857421875,
0.01363372802734375,
0.010955810546875,
-0.01117706298828125,
0.0145416259765625,
0.01273345947265625,
-0.01898193359375,
0.015045166015625,
0.0303192138671875,
-0.0268096923828125,
0.02197265625,
0.0272216796875,
-0.0155181884765625,
0.040863037109375,
0.0146331787109375,
-0.0037822723388671875,
-0.023895263671875,
0.0016536712646484375,
-0.0831298828125,
0.045318603515625,
-0.054290771484375,
-0.003589630126953125,
-0.0101776123046875,
0.0096435546875,
0.038665771484375,
0.0039043426513671875,
-0.037872314453125,
-0.007320404052734375,
0.00004750490188598633,
-0.006832122802734375,
-0.0274810791015625,
0.026092529296875,
-0.04962158203125,
-0.0254364013671875,
-0.00946044921875,
0.10662841796875,
-0.0014705657958984375,
-0.058990478515625,
-0.0130767822265625,
-0.01641845703125,
0.0230560302734375,
0.0269775390625,
0.027069091796875,
-0.0146331787109375,
0.0012426376342773438,
-0.0064849853515625,
-0.00632476806640625,
0.047760009765625,
0.004261016845703125,
-0.017791748046875,
-0.01189422607421875,
-0.00579833984375,
0.001617431640625,
0.045989990234375,
0.04248046875,
-0.0080413818359375,
0.04315185546875,
-0.023895263671875,
0.003879547119140625,
0.0161285400390625,
0.00533294677734375,
0.0188140869140625,
0.004451751708984375,
-0.004131317138671875,
-0.0230560302734375,
0.026153564453125,
-0.0323486328125,
-0.00922393798828125,
0.0224761962890625,
0.0258331298828125,
-0.040130615234375,
-0.046234130859375,
0.0484619140625,
-0.00530242919921875,
-0.01617431640625,
0.00803375244140625,
-0.03973388671875,
-0.0205535888671875,
-0.0285491943359375,
-0.029205322265625,
0.034423828125,
-0.00806427001953125,
0.0046539306640625,
-0.00997161865234375,
0.020233154296875,
0.0200958251953125,
-0.006893157958984375,
-0.0283203125,
0.0243682861328125,
0.02935791015625,
0.052581787109375,
-0.0199127197265625,
-0.0267486572265625,
0.0201873779296875,
0.0294342041015625,
-0.024932861328125,
-0.021484375,
0.054840087890625,
-0.0228118896484375,
0.0367431640625,
-0.06121826171875,
0.0181884765625,
-0.07574462890625,
0.0161590576171875,
-0.00099945068359375,
0.01267242431640625,
-0.030029296875,
-0.004306793212890625,
-0.040191650390625,
-0.03887939453125,
0.054107666015625,
0.040435791015625,
-0.0517578125,
0.0019626617431640625,
0.021392822265625,
0.04132080078125,
-0.03399658203125,
-0.055511474609375,
-0.007747650146484375,
0.0115203857421875,
0.0207977294921875,
0.061126708984375,
-0.01288604736328125,
0.04998779296875,
0.00931549072265625,
0.03173828125,
0.0180511474609375,
0.0272979736328125,
-0.02947998046875,
-0.0230255126953125,
0.049163818359375,
-0.00809478759765625,
-0.04315185546875,
-0.03790283203125,
-0.00089263916015625,
-0.034271240234375,
0.0191192626953125,
-0.027740478515625,
0.0178375244140625,
-0.037445068359375,
-0.00589752197265625,
-0.0165863037109375,
0.050537109375,
-0.0263671875,
0.04852294921875,
-0.003414154052734375,
-0.0229339599609375,
0.010345458984375,
0.0113677978515625,
-0.0305633544921875,
0.005260467529296875,
-0.0099945068359375,
0.01006317138671875,
0.0220489501953125,
-0.0134735107421875,
0.04412841796875,
0.10272216796875,
-0.0221405029296875,
0.047515869140625,
0.03521728515625,
-0.0243377685546875,
0.03662109375,
0.042205810546875,
-0.005504608154296875,
-0.057037353515625,
0.0247039794921875,
0.003963470458984375,
-0.036041259765625,
-0.005340576171875,
-0.038299560546875,
-0.00021207332611083984,
0.0020160675048828125,
0.02655029296875,
0.0016756057739257812,
-0.004932403564453125,
0.0203399658203125,
-0.0260009765625,
-0.04364013671875,
-0.037445068359375,
0.0264892578125,
0.002986907958984375,
0.03656005859375,
0.01352691650390625,
-0.037628173828125,
-0.007843017578125,
-0.0163726806640625,
0.002780914306640625,
0.03125,
0.01727294921875,
-0.0014791488647460938,
-0.049713134765625,
-0.0006580352783203125,
0.0232696533203125,
0.005649566650390625,
0.022216796875,
-0.024200439453125,
0.0226898193359375,
-0.07470703125,
-0.08203125,
-0.04547119140625,
-0.036376953125,
-0.058563232421875,
0.008880615234375,
0.0149993896484375,
-0.0240631103515625,
0.04278564453125,
-0.0143280029296875,
0.0210418701171875,
0.012847900390625,
0.0088653564453125,
0.06060791015625,
-0.01593017578125,
-0.00927734375,
-0.00832366943359375,
-0.035736083984375,
-0.00963592529296875,
-0.004116058349609375,
0.0083770751953125,
-0.00769805908203125,
0.040496826171875,
0.07257080078125,
0.0136566162109375,
-0.0364990234375,
0.055999755859375,
0.00460052490234375,
-0.055267333984375,
-0.00937652587890625,
-0.0161895751953125,
-0.056610107421875,
-0.00884246826171875,
-0.01137542724609375,
-0.035125732421875,
0.0166778564453125,
-0.02703857421875,
0.004985809326171875,
0.05828857421875,
-0.0306549072265625,
-0.05047607421875,
0.009246826171875,
0.049835205078125,
0.00817108154296875,
0.048736572265625,
-0.0216064453125,
0.034454345703125,
0.00070953369140625,
0.0162811279296875,
-0.057647705078125,
-0.0161895751953125,
-0.003276824951171875,
0.045440673828125,
0.0017337799072265625,
0.002780914306640625,
-0.020965576171875,
-0.01309967041015625,
0.00833892822265625,
0.00240325927734375,
-0.0118408203125,
0.042022705078125,
-0.004169464111328125,
-0.006496429443359375,
-0.0137786865234375,
-0.0113983154296875,
0.0345458984375,
-0.04425048828125,
-0.01349639892578125,
0.01371002197265625,
0.00872039794921875,
0.0103759765625,
-0.005161285400390625,
0.044342041015625,
0.0261688232421875,
-0.0260467529296875,
-0.017547607421875,
-0.00039315223693847656,
-0.014007568359375,
0.0157623291015625,
-0.0286712646484375,
-0.03497314453125,
-0.0142974853515625,
-0.04168701171875,
0.0268402099609375,
-0.0311431884765625,
-0.0007500648498535156,
0.0013799667358398438,
0.017547607421875,
0.035430908203125,
-0.034576416015625,
-0.0160369873046875,
0.015228271484375,
-0.02752685546875,
0.04815673828125,
0.0472412109375,
0.039276123046875,
-0.007518768310546875,
0.01739501953125,
0.050628662109375,
0.059326171875,
-0.049285888671875,
-0.0638427734375,
-0.00104522705078125,
-0.0197601318359375,
-0.0006031990051269531,
-0.00311279296875,
-0.01541900634765625,
0.0301971435546875,
0.06451416015625,
-0.0010204315185546875,
0.001468658447265625,
-0.00030994415283203125,
-0.0137786865234375,
0.0038547515869140625,
0.03948974609375,
0.0156402587890625,
0.0167236328125,
-0.0105133056640625,
-0.016510009765625,
0.009674072265625,
0.033905029296875,
0.0154876708984375,
0.0295867919921875,
-0.0168304443359375,
-0.006275177001953125,
-0.03106689453125,
0.0302581787109375,
-0.002552032470703125,
0.0107421875,
-0.05914306640625,
-0.03955078125,
0.0318603515625,
0.055145263671875,
-0.006591796875,
0.0019159317016601562,
0.0309295654296875,
0.022064208984375,
-0.0200653076171875,
-0.0184173583984375,
0.01268768310546875,
-0.028045654296875,
-0.046844482421875,
-0.002780914306640625,
-0.00534820556640625,
0.000774383544921875,
0.0018491744995117188,
0.0056304931640625,
0.0859375,
-0.048492431640625,
-0.033843994140625,
0.0594482421875,
-0.01424407958984375,
-0.028076171875,
0.05322265625,
-0.03192138671875,
0.10418701171875,
-0.0064849853515625,
-0.059112548828125,
-0.0035953521728515625,
-0.011810302734375,
-0.0128631591796875,
-0.0010728836059570312,
0.0299224853515625,
0.0122528076171875,
-0.0008344650268554688,
-0.0280914306640625,
-0.049102783203125,
0.0345458984375,
0.0190277099609375,
0.01412200927734375,
0.00018227100372314453,
-0.0222625732421875,
-0.039581298828125,
-0.04193115234375,
-0.0213775634765625,
-0.04290771484375,
0.040863037109375,
0.005321502685546875,
0.1627197265625,
-0.06402587890625,
0.0252227783203125,
0.0160675048828125,
0.0191802978515625,
-0.0107879638671875,
0.014801025390625,
-0.04034423828125,
-0.026214599609375,
0.0246124267578125,
0.00006264448165893555,
-0.05316162109375,
-0.01715087890625,
0.01824951171875,
-0.041290283203125,
-0.019989013671875,
0.0016803741455078125,
0.02264404296875,
0.00569915771484375,
-0.005855560302734375,
-0.034942626953125,
-0.07080078125,
-0.046966552734375,
0.02032470703125,
-0.00199127197265625,
0.023193359375,
-0.0224609375,
0.0028228759765625,
-0.03363037109375,
-0.01126861572265625,
-0.0038433074951171875,
0.007152557373046875,
-0.0298614501953125,
0.00904083251953125,
-0.039794921875,
-0.048004150390625,
0.014251708984375,
-0.01092529296875,
0.02691650390625,
-0.0286102294921875,
0.11041259765625,
-0.02154541015625,
0.0254364013671875,
0.040252685546875,
-0.013671875,
0.00269317626953125,
-0.039764404296875,
-0.0273284912109375,
0.030181884765625,
0.0113983154296875,
-0.02410888671875,
-0.048858642578125,
-0.028778076171875,
-0.033477783203125,
0.006378173828125,
0.0374755859375,
-0.0189666748046875,
-0.0014505386352539062,
-0.0310516357421875,
-0.0214385986328125,
0.01551055908203125,
-0.023529052734375,
0.0254364013671875,
-0.03271484375,
-0.038604736328125,
0.0027866363525390625,
-0.00853729248046875,
0.055511474609375,
-0.01442718505859375,
-0.0008459091186523438,
-0.049163818359375,
-0.012847900390625,
-0.0148468017578125,
0.02874755859375,
-0.0139923095703125,
0.031280517578125,
0.027587890625,
-0.01229095458984375,
-0.033203125,
0.0545654296875,
0.03302001953125,
0.08428955078125,
-0.0210723876953125,
-0.00018537044525146484,
0.017303466796875,
-0.0024871826171875,
-0.033843994140625,
-0.05279541015625,
-0.004177093505859375,
-0.056915283203125,
-0.00608062744140625,
-0.0472412109375,
0.043212890625,
0.041900634765625,
-0.01959228515625,
-0.052398681640625,
-0.0178985595703125,
-0.004749298095703125,
-0.0313720703125,
-0.0538330078125,
0.00884246826171875,
0.016326904296875,
0.036865234375,
-0.00629425048828125,
-0.0135650634765625,
-0.049346923828125,
0.002635955810546875,
-0.0294342041015625,
-0.0177154541015625,
0.008087158203125,
-0.01415252685546875,
-0.01201629638671875,
0.01092529296875,
0.032867431640625,
-0.0753173828125,
-0.0175323486328125,
0.0062408447265625,
0.01166534423828125,
0.0283660888671875,
-0.0203094482421875,
0.006008148193359375,
0.01149749755859375,
0.0114288330078125,
-0.006885528564453125,
0.003170013427734375,
-0.0217742919921875,
-0.01125335693359375,
0.028533935546875,
0.041351318359375,
0.0091400146484375,
-0.01641845703125,
-0.0187530517578125,
-0.0645751953125,
-0.0077362060546875,
-0.009490966796875,
-0.00226593017578125,
-0.039337158203125,
0.01178741455078125,
0.00836944580078125,
0.0236053466796875,
0.00909423828125,
-0.030242919921875,
-0.00311279296875,
-0.0234375,
-0.02789306640625,
-0.0151824951171875,
0.01171112060546875,
0.0010480880737304688,
0.03179931640625,
-0.0267486572265625,
0.0277252197265625,
0.01187896728515625,
-0.0052490234375,
0.01398468017578125,
0.057037353515625,
0.062744140625,
-0.01477813720703125,
-0.01245880126953125,
0.01480865478515625,
0.033050537109375,
0.0543212890625,
-0.01459503173828125,
-0.0860595703125,
-0.003940582275390625,
0.026031494140625,
-0.005718231201171875,
0.04571533203125,
0.0160369873046875,
-0.00217437744140625,
0.0147552490234375,
0.03466796875,
0.006195068359375,
-0.06494140625,
-0.002681732177734375,
0.0136871337890625,
-0.061065673828125,
-0.002628326416015625,
-0.0265045166015625,
-0.052642822265625,
0.00984954833984375,
0.03192138671875,
-0.01125335693359375,
-0.027252197265625,
0.0394287109375,
-0.007320404052734375,
0.00013458728790283203,
0.021881103515625
]
|
dcb3f2cece021f6cc94a6a221d7c0ff8e10ce5a4 | Wordpress Stackexchange
Q: Showing WP_Error message with admin_notice action hook I have just get an answer to one of my question but the problem is I want to print an error when every user will insert tags of more than two words through post-new.php with admin_notice action hook.
How can it be done?
A: You can use function add_settings_error.
More details can be found in the Wordpress documentation. I have edited your previous answer to include that:
function wpse_189722_limit_tag_words( $term, $taxonomy ) {
if ($taxonomy === 'post_tag') {
if ( count( preg_split( '/\s+/', trim( $term ) ) ) > 2 ) {
add_settings_error('term_too_many_words', 'term_too_many_words', 'Maximum of 2 words allowed, but entered: '. trim($term), 'error');
// shorten the term to the allowed number of tags
$normalized_term = $foo = implode(' ', array_slice(preg_split('/\s+/', trim($term)), 0, 2));
return $normalized_term;
}
}
return $term;
}
add_filter( 'pre_insert_term', 'wpse_189722_limit_tag_words', 10, 2 );
You can also check a nice guide to Wordpress notifications here.
| Q: Showing WP_Error message with admin_notice action hook I have just get an answer to one of my question but the problem is I want to print an error when every user will insert tags of more than two words through post-new.php with admin_notice action hook.
How can it be done?
A: You can use function add_settings_error.
More details can be found in the Wordpress documentation. I have edited your previous answer to include that:
function wpse_189722_limit_tag_words( $term, $taxonomy ) {
if ($taxonomy === 'post_tag') {
if ( count( preg_split( '/\s+/', trim( $term ) ) ) > 2 ) {
add_settings_error('term_too_many_words', 'term_too_many_words', 'Maximum of 2 words allowed, but entered: '. trim($term), 'error');
// shorten the term to the allowed number of tags
$normalized_term = $foo = implode(' ', array_slice(preg_split('/\s+/', trim($term)), 0, 2));
return $normalized_term;
}
}
return $term;
}
add_filter( 'pre_insert_term', 'wpse_189722_limit_tag_words', 10, 2 );
You can also check a nice guide to Wordpress notifications here.
| wordpress | {
"language": "en",
"length": 156,
"provenance": "stackexchange_00019.jsonl.gz:455983",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/189745"
} | [
0.050567626953125,
-0.01434326171875,
-0.00479888916015625,
-0.024810791015625,
0.00748443603515625,
-0.03662109375,
0.0391845703125,
-0.02239990234375,
-0.002643585205078125,
-0.00701904296875,
-0.04681396484375,
-0.02069091796875,
-0.01172637939453125,
-0.0305633544921875,
0.005062103271484375,
-0.05023193359375,
0.0166473388671875,
-0.028106689453125,
-0.01445770263671875,
-0.0021209716796875,
0.007244110107421875,
0.01276397705078125,
-0.020172119140625,
0.01120758056640625,
-0.017486572265625,
0.0164642333984375,
0.06988525390625,
-0.050079345703125,
0.0006804466247558594,
-0.036041259765625,
0.003536224365234375,
0.006439208984375,
0.02197265625,
0.037200927734375,
-0.058135986328125,
-0.008880615234375,
0.02349853515625,
-0.0026683807373046875,
-0.029266357421875,
0.06640625,
0.0369873046875,
-0.0302276611328125,
0.04638671875,
0.02386474609375,
0.025543212890625,
0.00438690185546875,
0.05560302734375,
-0.043975830078125,
-0.00655364990234375,
-0.0172882080078125,
0.0426025390625,
-0.02740478515625,
0.061065673828125,
-0.0584716796875,
-0.0145263671875,
0.047882080078125,
-0.0244140625,
-0.015960693359375,
0.0202484130859375,
0.05108642578125,
-0.00708770751953125,
-0.0205841064453125,
0.0024566650390625,
-0.06341552734375,
0.0168304443359375,
0.004955291748046875,
-0.0005927085876464844,
0.03253173828125,
0.00106048583984375,
0.00104522705078125,
-0.02069091796875,
-0.0101318359375,
0.0130462646484375,
0.016693115234375,
-0.0091552734375,
-0.0094757080078125,
-0.0229644775390625,
0.00934600830078125,
0.0535888671875,
0.010955810546875,
0.041656494140625,
-0.01006317138671875,
-0.00948333740234375,
0.007904052734375,
0.0269622802734375,
0.040374755859375,
0.0019817352294921875,
-0.023193359375,
-0.01355743408203125,
0.0070343017578125,
-0.012542724609375,
-0.0225982666015625,
-0.0296630859375,
0.035797119140625,
0.0303955078125,
-0.036224365234375,
-0.01297760009765625,
0.0496826171875,
-0.042083740234375,
0.021820068359375,
-0.025360107421875,
-0.01097869873046875,
0.0219573974609375,
-0.03009033203125,
0.028533935546875,
0.03759765625,
-0.06134033203125,
-0.057373046875,
0.0479736328125,
0.0181121826171875,
0.005828857421875,
-0.037994384765625,
0.006237030029296875,
-0.01444244384765625,
-0.026702880859375,
-0.0228118896484375,
-0.0260162353515625,
0.0012559890747070312,
-0.00022792816162109375,
-0.0212249755859375,
-0.01023101806640625,
0.01117706298828125,
-0.00388336181640625,
-0.01007843017578125,
-0.0128936767578125,
-0.01568603515625,
-0.0177154541015625,
-0.0032958984375,
0.0297698974609375,
0.001312255859375,
-0.008026123046875,
0.038909912109375,
0.016693115234375,
-0.01197052001953125,
-0.02032470703125,
-0.0024967193603515625,
0.028045654296875,
-0.01354217529296875,
-0.0156097412109375,
0.0406494140625,
-0.0301055908203125,
-0.039642333984375,
-0.00820159912109375,
-0.0265350341796875,
0.04388427734375,
0.03350830078125,
0.0208282470703125,
-0.01313018798828125,
0.0207366943359375,
-0.0303192138671875,
0.01739501953125,
-0.037872314453125,
0.07623291015625,
-0.019195556640625,
-0.11505126953125,
-0.019622802734375,
-0.0323486328125,
-0.0218658447265625,
-0.04296875,
-0.0670166015625,
-0.03814697265625,
-0.036102294921875,
0.032440185546875,
-0.05987548828125,
-0.06536865234375,
0.05316162109375,
-0.053009033203125,
-0.01116180419921875,
0.0247344970703125,
0.00991058349609375,
0.026275634765625,
0.026397705078125,
0.05072021484375,
0.005168914794921875,
-0.01031494140625,
-0.0148773193359375,
-0.038330078125,
0.036102294921875,
0.0289764404296875,
0.0077056884765625,
0.0233306884765625,
-0.01558685302734375,
0.0872802734375,
-0.0017910003662109375,
-0.045074462890625,
-0.01611328125,
0.019744873046875,
0.033599853515625,
0.028717041015625,
0.00811767578125,
0.05364990234375,
-0.0095977783203125,
0.044403076171875,
-0.00739288330078125,
-0.0163726806640625,
-0.065185546875,
-0.0084381103515625,
-0.01259613037109375,
-0.030670166015625,
0.0450439453125,
0.00860595703125,
0.0141448974609375,
0.0117034912109375,
-0.015411376953125,
-0.09405517578125,
0.020599365234375,
-0.051910400390625,
0.05084228515625,
-0.007160186767578125,
-0.01255035400390625,
0.00035572052001953125,
-0.043670654296875,
-0.014617919921875,
0.02069091796875,
-0.0016107559204101562,
0.018035888671875,
-0.043212890625,
0.03009033203125,
0.002872467041015625,
0.06719970703125,
0.0258331298828125,
-0.020965576171875,
0.034912109375,
-0.0248565673828125,
0.0291748046875,
-0.0117034912109375,
-0.007587432861328125,
-0.0083465576171875,
0.016326904296875,
0.014129638671875,
-0.0284576416015625,
0.01678466796875,
0.03253173828125,
0.0687255859375,
0.01084136962890625,
-0.022491455078125,
0.01406097412109375,
-0.081298828125,
0.039093017578125,
0.041473388671875,
0.0197906494140625,
-0.00009530782699584961,
-0.01442718505859375,
0.0029449462890625,
0.060577392578125,
-0.031036376953125,
-0.006221771240234375,
-0.0006399154663085938,
-0.01751708984375,
-0.024322509765625,
-0.0186004638671875,
0.02337646484375,
0.052032470703125,
-0.02880859375,
0.01018524169921875,
0.04473876953125,
-0.0310211181640625,
-0.045196533203125,
-0.0010995864868164062,
-0.022186279296875,
0.040771484375,
-0.062744140625,
-0.04693603515625,
-0.010467529296875,
0.006473541259765625,
0.00494384765625,
0.01678466796875,
0.016510009765625,
-0.005764007568359375,
-0.01116943359375,
0.01311492919921875,
-0.016143798828125,
0.0018072128295898438,
-0.0228118896484375,
-0.04638671875,
-0.035919189453125,
-0.0396728515625,
0.050994873046875,
0.0008945465087890625,
-0.0313720703125,
-0.008148193359375,
0.06658935546875,
-0.00482177734375,
-0.01209259033203125,
-0.045074462890625,
-0.0467529296875,
-0.0014400482177734375,
-0.022613525390625,
-0.005062103271484375,
-0.0191650390625,
0.0016298294067382812,
0.054779052734375,
-0.0146942138671875,
0.05255126953125,
0.0014276504516601562,
0.0151519775390625,
-0.0275726318359375,
-0.035797119140625,
0.03314208984375,
-0.05499267578125,
0.05279541015625,
0.061614990234375,
-0.03033447265625,
0.0265655517578125,
-0.004032135009765625,
0.03570556640625,
0.004119873046875,
0.0078277587890625,
-0.01523590087890625,
-0.020782470703125,
-0.028411865234375,
-0.0219879150390625,
0.014495849609375,
0.029266357421875,
-0.0017147064208984375,
-0.031463623046875,
-0.007358551025390625,
0.006862640380859375,
-0.020599365234375,
-0.00569915771484375,
-0.020355224609375,
-0.025360107421875,
0.00017440319061279297,
0.023162841796875,
-0.00843048095703125,
-0.01145172119140625,
0.023193359375,
-0.00017762184143066406,
-0.032623291015625,
-0.038482666015625,
-0.001987457275390625,
-0.047210693359375,
-0.027069091796875,
0.0277252197265625,
0.00934600830078125,
-0.0063934326171875,
0.003475189208984375,
0.1124267578125,
0.0279083251953125,
-0.056182861328125,
-0.0015869140625,
-0.037353515625,
-0.04754638671875,
0.0197601318359375,
-0.02093505859375,
0.0139007568359375,
0.04937744140625,
-0.0014123916625976562,
-0.0225982666015625,
0.032989501953125,
-0.006771087646484375,
-0.0276336669921875,
-0.005222320556640625,
0.0110015869140625,
0.030670166015625,
-0.01387786865234375,
-0.01369476318359375,
-0.0222015380859375,
0.00665283203125,
-0.042205810546875,
0.000904083251953125,
0.032745361328125,
-0.0220947265625,
-0.0264892578125,
-0.0202484130859375,
-0.0275421142578125,
0.03033447265625,
-0.038604736328125,
-0.0300750732421875,
-0.022552490234375,
0.0173187255859375,
-0.0245819091796875,
0.00931549072265625,
-0.026336669921875,
-0.039581298828125,
-0.006206512451171875,
0.005764007568359375,
0.004581451416015625,
0.0170135498046875,
-0.0081634521484375,
0.04364013671875,
0.010162353515625,
0.0178375244140625,
-0.03009033203125,
-0.045074462890625,
0.02203369140625,
-0.058624267578125,
0.0137939453125,
-0.06500244140625,
-0.00807952880859375,
-0.02117919921875,
0.059661865234375,
-0.035675048828125,
-0.0232696533203125,
-0.04827880859375,
0.004451751708984375,
-0.0004723072052001953,
-0.044525146484375,
0.0310821533203125,
-0.0007772445678710938,
-0.0301666259765625,
0.0167694091796875,
-0.01194000244140625,
0.00792694091796875,
-0.028533935546875,
0.0196990966796875,
-0.016876220703125,
-0.0215301513671875,
0.05169677734375,
-0.06427001953125,
0.0251312255859375,
-0.0005593299865722656,
0.00893402099609375,
-0.052337646484375,
-0.02410888671875,
-0.01413726806640625,
-0.0648193359375,
-0.01055145263671875,
-0.00995635986328125,
0.0268096923828125,
0.002716064453125,
0.0016880035400390625,
-0.00018453598022460938,
0.04620361328125,
-0.01485443115234375,
0.03363037109375,
-0.0173492431640625,
0.0189971923828125,
0.00482940673828125,
-0.00959014892578125,
-0.01947021484375,
-0.00513458251953125,
-0.0066986083984375,
-0.0048370361328125,
-0.017608642578125,
0.051849365234375,
-0.00946044921875,
0.03564453125,
0.01543426513671875,
-0.01715087890625,
-0.065185546875,
-0.05841064453125,
-0.0205078125,
-0.0051422119140625,
0.01317596435546875,
-0.037567138671875,
-0.04693603515625,
-0.07623291015625,
0.017791748046875,
-0.007549285888671875,
-0.041595458984375,
0.01033782958984375,
0.0709228515625,
0.027252197265625,
-0.005619049072265625,
-0.05072021484375,
0.021331787109375,
0.0306396484375,
0.0379638671875,
0.00746917724609375,
-0.01190948486328125,
-0.03277587890625,
0.031494140625,
0.011138916015625,
0.005496978759765625,
-0.0190582275390625,
0.0004627704620361328,
-0.00640106201171875,
-0.042083740234375,
0.01499176025390625,
-0.0185699462890625,
0.06085205078125,
0.0016736984252929688,
-0.03582763671875,
-0.0159912109375,
-0.0210723876953125,
0.048309326171875,
-0.0213775634765625,
0.06500244140625,
-0.0240936279296875,
-0.00568389892578125,
0.00836181640625,
0.01515960693359375,
-0.038543701171875,
-0.010406494140625,
0.019683837890625,
-0.0694580078125,
-0.052734375,
-0.0205230712890625,
-0.0011682510375976562,
0.006633758544921875,
0.00036835670471191406,
0.025390625,
-0.006656646728515625,
-0.020751953125,
-0.0004930496215820312,
0.0082855224609375,
-0.0153045654296875,
-0.015655517578125,
-0.03924560546875,
-0.0214996337890625,
0.0220947265625,
0.0250396728515625,
0.027557373046875,
0.0207366943359375,
-0.01132965087890625,
0.022125244140625,
-0.0005640983581542969,
-0.0029144287109375,
0.04791259765625,
0.0166473388671875,
0.0005068778991699219,
0.0284423828125,
0.0220794677734375,
-0.0151824951171875,
0.0013227462768554688,
0.031585693359375,
0.035675048828125,
-0.0008168220520019531,
-0.0157928466796875,
0.0142059326171875,
0.015380859375,
0.03863525390625,
0.025482177734375,
-0.0308837890625,
-0.008758544921875,
0.024017333984375,
0.00897979736328125,
-0.039031982421875,
-0.007183074951171875,
-0.00403594970703125,
0.01393890380859375,
-0.02197265625,
-0.0164947509765625,
0.049591064453125,
0.00921630859375,
0.01451873779296875,
0.019073486328125,
-0.0056915283203125,
-0.02801513671875,
-0.01540374755859375,
0.01389312744140625,
0.0194244384765625,
-0.043548583984375,
0.017578125,
0.041595458984375,
0.03662109375,
0.041229248046875,
-0.0300445556640625,
0.01074981689453125,
-0.0211639404296875,
-0.006160736083984375,
-0.06378173828125,
0.01265716552734375,
0.0226898193359375,
-0.02874755859375,
-0.055999755859375,
-0.0016222000122070312,
-0.046875,
0.0309295654296875,
-0.034881591796875,
-0.0014715194702148438,
-0.02972412109375,
0.0299072265625,
-0.0302276611328125,
0.02294921875,
0.01522064208984375,
0.0057220458984375,
-0.0219879150390625,
-0.0072021484375,
-0.0386962890625,
-0.00749969482421875,
0.020263671875,
-0.0022487640380859375,
-0.006778717041015625,
-0.0136566162109375,
0.031982421875,
0.00904083251953125,
0.01081085205078125,
-0.0284881591796875,
-0.0006427764892578125,
0.0287017822265625,
0.0296173095703125,
0.01491546630859375,
-0.057830810546875,
0.033172607421875,
0.035125732421875,
-0.030181884765625,
-0.01232147216796875,
0.01175689697265625,
0.05572509765625,
-0.0006842613220214844,
-0.0108795166015625,
-0.06365966796875,
0.008941650390625,
0.0201263427734375,
-0.0298309326171875,
0.0112457275390625,
0.0174102783203125,
0.00789642333984375,
0.0194549560546875,
-0.0039520263671875,
0.01198577880859375,
-0.0015459060668945312,
-0.00257110595703125,
0.0156707763671875,
-0.053466796875,
0.09405517578125,
-0.037017822265625,
0.0025615692138671875,
0.005489349365234375,
0.00727081298828125,
0.0222320556640625,
-0.0249481201171875,
0.0201263427734375,
0.019378662109375,
0.035614013671875,
-0.00836944580078125,
-0.00006729364395141602,
-0.0184173583984375,
0.030517578125,
-0.0137786865234375,
0.0270538330078125,
-0.00010687112808227539,
0.0101470947265625,
-0.0231170654296875,
-0.0177459716796875,
0.04217529296875,
0.01184844970703125,
-0.0146331787109375,
0.041259765625,
-0.0175018310546875,
-0.0222625732421875,
0.040374755859375,
0.05908203125,
-0.036376953125,
-0.002971649169921875,
0.02984619140625,
-0.01091766357421875,
-0.005626678466796875,
-0.005901336669921875,
0.01512908935546875,
-0.0243072509765625,
0.034515380859375,
0.00110626220703125,
-0.0012350082397460938,
0.0249481201171875,
-0.0282440185546875,
-0.01332855224609375,
-0.01132965087890625,
0.02117919921875,
0.0206451416015625,
-0.0182647705078125,
0.0276336669921875,
0.005340576171875,
0.0347900390625,
0.0007271766662597656,
0.0022411346435546875,
-0.00962066650390625,
-0.032806396484375,
-0.06451416015625,
-0.026214599609375,
-0.0019512176513671875,
-0.0196075439453125,
0.0044708251953125,
-0.0280609130859375,
-0.004673004150390625,
0.03692626953125,
-0.029052734375,
0.02178955078125,
0.00983428955078125,
-0.0406494140625,
-0.046051025390625,
-0.0078277587890625,
-0.0088348388671875,
0.022064208984375,
0.008819580078125,
0.02850341796875,
-0.00466156005859375,
-0.0182647705078125,
0.0179901123046875,
-0.00643157958984375,
0.05596923828125,
-0.005931854248046875,
-0.0360107421875,
-0.0037555694580078125,
-0.03021240234375,
0.0260772705078125,
0.0037384033203125,
0.005580902099609375,
-0.052886962890625,
-0.035369873046875,
0.0109100341796875,
-0.048431396484375,
-0.0090789794921875,
-0.01308441162109375,
-0.055328369140625,
0.12109375,
0.04608154296875,
-0.00722503662109375,
0.00002580881118774414,
0.0572509765625,
-0.06866455078125,
0.032196044921875,
-0.03912353515625,
0.07281494140625,
0.008819580078125,
0.029541015625,
-0.032989501953125,
-0.0040740966796875,
0.013092041015625,
0.029205322265625,
0.029144287109375,
0.0038547515869140625,
-0.02008056640625,
-0.033233642578125,
-0.00794219970703125,
0.0013751983642578125,
-0.028472900390625,
0.037078857421875,
0.02899169921875,
-0.027008056640625,
0.015625,
0.0025997161865234375,
0.04888916015625,
-0.065673828125,
0.0145111083984375,
0.0301055908203125,
-0.00994873046875,
-0.00968170166015625,
-0.03680419921875,
-0.0201568603515625,
0.0003039836883544922,
-0.036590576171875,
0.0003731250762939453,
-0.046661376953125,
-0.00693511962890625,
0.040740966796875,
0.03515625,
-0.057830810546875,
-0.00749969482421875,
-0.039459228515625,
0.04254150390625,
0.0057525634765625,
0.0596923828125,
0.04705810546875,
0.0246124267578125,
0.06097412109375,
0.020538330078125,
0.037841796875,
0.019500732421875,
-0.01165008544921875,
0.0129852294921875,
-0.007415771484375,
0.0037174224853515625,
-0.052703857421875,
0.0105438232421875,
0.06011962890625,
0.045867919921875,
-0.031890869140625,
-0.0110321044921875,
0.0008726119995117188,
0.02532958984375,
0.002655029296875,
0.0164794921875,
0.03363037109375,
0.06500244140625,
0.0694580078125,
-0.039764404296875,
-0.0021038055419921875,
0.005657196044921875,
0.019561767578125,
-0.0013875961303710938,
0.028106689453125,
-0.0211334228515625,
-0.022705078125,
-0.04656982421875,
0.02001953125,
-0.0018634796142578125,
0.056549072265625,
0.0093841552734375,
0.03631591796875,
-0.02703857421875,
-0.025390625,
0.0055694580078125,
0.012786865234375,
0.034637451171875,
-0.04144287109375,
0.0011444091796875,
-0.01495361328125,
0.01361083984375,
0.01436614990234375,
-0.0262451171875,
-0.01157379150390625,
-0.019683837890625,
0.0188446044921875,
-0.0149993896484375,
-0.037750244140625,
0.018890380859375,
-0.023468017578125,
-0.023284912109375,
-0.033477783203125,
-0.04534912109375,
-0.00914764404296875,
-0.025299072265625,
0.03814697265625,
-0.01143646240234375,
-0.001049041748046875,
0.000209808349609375,
-0.02520751953125,
0.01538848876953125,
-0.0257720947265625,
0.0374755859375,
0.030029296875,
-0.0082244873046875,
0.03973388671875,
-0.11920166015625,
0.003326416015625,
-0.08197021484375,
-0.0362548828125,
0.020263671875,
0.0169677734375,
-0.016693115234375,
0.041168212890625,
0.0187835693359375,
-0.04364013671875,
0.00305938720703125,
0.04620361328125,
0.006252288818359375,
0.03125,
0.006038665771484375,
-0.001644134521484375,
-0.0308990478515625,
0.0064544677734375,
-0.01313018798828125,
0.0235748291015625,
0.01934814453125,
0.058868408203125,
-0.00791168212890625,
0.01568603515625,
-0.0153045654296875,
0.01214599609375,
-0.0272064208984375,
-0.02630615234375,
0.03729248046875,
-0.002582550048828125,
-0.00494384765625,
-0.0099029541015625,
-0.036956787109375,
0.044952392578125,
0.0142669677734375,
-0.008697509765625,
0.06103515625,
-0.01451873779296875,
-0.0026397705078125,
-0.031768798828125,
0.07666015625,
-0.018341064453125,
-0.077880859375,
-0.09368896484375,
0.004192352294921875,
0.0098419189453125,
0.0740966796875,
0.0089874267578125,
-0.00010788440704345703,
-0.03204345703125,
-0.0150146484375,
0.0081787109375,
0.001026153564453125,
-0.017364501953125,
0.022613525390625,
-0.055023193359375,
0.00867462158203125,
-0.0064849853515625,
-0.036834716796875,
0.010894775390625,
-0.005481719970703125,
0.020172119140625,
-0.0177764892578125,
0.01447296142578125,
0.0098724365234375,
-0.0232391357421875,
0.02435302734375,
-0.0195465087890625,
-0.002361297607421875,
-0.0196380615234375,
0.0229644775390625,
-0.004444122314453125,
0.01313018798828125,
-0.0228271484375,
-0.03948974609375,
-0.00775909423828125,
0.0013875961303710938,
-0.026580810546875,
-0.0290374755859375,
-0.0296173095703125,
0.0179901123046875,
0.05096435546875,
0.004634857177734375,
-0.0215606689453125,
0.0012159347534179688,
-0.02496337890625,
0.049041748046875,
0.01849365234375,
-0.028778076171875,
-0.0116119384765625,
-0.00676727294921875,
-0.03204345703125,
-0.0611572265625,
-0.051025390625,
0.056182861328125,
-0.056060791015625,
-0.0146331787109375,
0.0219268798828125,
-0.0116424560546875,
-0.0310516357421875,
-0.037567138671875,
0.0003609657287597656,
0.0084991455078125,
0.032318115234375,
-0.0077056884765625,
0.0222015380859375,
0.0267333984375,
-0.01885986328125,
-0.09552001953125,
-0.01409149169921875,
-0.046661376953125,
0.03448486328125,
-0.0021839141845703125,
-0.0202789306640625,
-0.01409912109375,
-0.062103271484375,
-0.1168212890625,
0.06219482421875,
-0.0247650146484375,
-0.040557861328125,
0.007709503173828125,
-0.049835205078125,
-0.03924560546875,
0.0498046875,
0.005340576171875,
-0.0135345458984375,
-0.0183258056640625,
0.053436279296875,
-0.0002548694610595703,
-0.01776123046875,
0.043792724609375,
-0.0270538330078125,
-0.03265380859375,
-0.0067291259765625,
0.01035308837890625,
-0.020843505859375,
0.0416259765625,
-0.0299530029296875,
0.06365966796875,
0.0689697265625,
-0.0267486572265625,
0.0134429931640625,
-0.0157928466796875,
-0.05804443359375,
0.005260467529296875,
-0.05230712890625,
-0.0372314453125,
-0.02740478515625,
0.08489990234375,
-0.0030231475830078125,
0.03228759765625,
-0.036224365234375,
-0.03057861328125,
-0.037017822265625,
0.01557159423828125,
-0.0005054473876953125,
-0.0200653076171875,
-0.03900146484375,
0.00738525390625,
0.0007443428039550781,
-0.0022830963134765625,
0.02301025390625,
-0.007266998291015625,
-0.0161590576171875,
-0.0108795166015625,
0.016754150390625,
0.01085662841796875,
-0.07061767578125,
-0.01232147216796875,
0.01983642578125,
-0.022003173828125,
-0.01439666748046875,
-0.032623291015625,
0.025543212890625,
-0.020355224609375,
-0.03387451171875,
-0.0037136077880859375,
-0.03802490234375,
-0.009490966796875,
0.0146636962890625,
0.004016876220703125,
0.015411376953125,
-0.007007598876953125,
-0.0296173095703125,
0.0298004150390625,
-0.0184783935546875,
-0.0247650146484375,
-0.03924560546875,
0.029510498046875,
0.0114288330078125,
-0.053192138671875,
0.034271240234375,
-0.036224365234375,
0.049774169921875,
-0.0257720947265625,
0.021820068359375,
-0.038421630859375,
0.01861572265625,
-0.00579833984375,
0.0048828125,
0.0194854736328125,
0.020294189453125,
0.0278167724609375,
-0.01099395751953125,
0.000339508056640625,
0.06585693359375,
0.033599853515625,
0.01091766357421875
]
|
5b88a97279c27f67baca4015c22b0e50c4bad85b | Wordpress Stackexchange
Q: is_home , is_front_page not working i tried many conditions to my footer.php section to include this function in my front page only and not on blog page...but it just pops up on both pages or none of them...can anyone explain the fault ?
<?php if( is_home() && is_front_page() ) : ?>
<div id="blurbs">
<ul>
<?php $the_query = new WP_Query( 'showposts=3' ); ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
<div class="postwrapper">
<?php the_post_thumbnail(); ?> <li style="display:inline; font-size: 20px; font-weight:light;"><?php the_title(); ?></li>
<br class="clear">
<li style=" font-size: 14px; font-weight:light;"><?php the_content(); ?></li>
</div>
<?php endwhile;?>
</ul>
</div>
<?php endif; ?>
A: <?php if( is_front_page() ) : ?>
is_home relates to the posts page according to your reading settings. is_front_page always returns true on the front page.
| Q: is_home , is_front_page not working i tried many conditions to my footer.php section to include this function in my front page only and not on blog page...but it just pops up on both pages or none of them...can anyone explain the fault ?
<?php if( is_home() && is_front_page() ) : ?>
<div id="blurbs">
<ul>
<?php $the_query = new WP_Query( 'showposts=3' ); ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
<div class="postwrapper">
<?php the_post_thumbnail(); ?> <li style="display:inline; font-size: 20px; font-weight:light;"><?php the_title(); ?></li>
<br class="clear">
<li style=" font-size: 14px; font-weight:light;"><?php the_content(); ?></li>
</div>
<?php endwhile;?>
</ul>
</div>
<?php endif; ?>
A: <?php if( is_front_page() ) : ?>
is_home relates to the posts page according to your reading settings. is_front_page always returns true on the front page.
A: *
*On the site front page, is_front_page() will always return TRUE,
regardless of whether the site front page displays the blog posts
index or a static page.
*On the blog posts index, is_home() will
always return TRUE, regardless of whether the blog posts index is
displayed on the site front page or a separate page.
So try following condition instead:
<?php if( 'page' == get_option( 'show_on_front' ) && is_front_page() ) : ?>
A: wp_reset_query(); solved the problem...it was maybe due to loops running prior to this one..
A: wp_reset_query(); is realy worked, if you use custom queries before call check front page
| wordpress | {
"language": "en",
"length": 231,
"provenance": "stackexchange_00019.jsonl.gz:456027",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/189911"
} | [
0.038970947265625,
0.0177154541015625,
0.01413726806640625,
0.0012292861938476562,
0.0258636474609375,
-0.0169219970703125,
0.041290283203125,
-0.0648193359375,
0.031524658203125,
0.0024623870849609375,
-0.07171630859375,
-0.00384521484375,
-0.02508544921875,
-0.01015472412109375,
-0.012786865234375,
-0.061309814453125,
0.050689697265625,
-0.0165557861328125,
0.039398193359375,
-0.00045561790466308594,
0.0021800994873046875,
0.0298309326171875,
0.026947021484375,
0.066650390625,
0.0267486572265625,
-0.050750732421875,
0.08673095703125,
-0.0111846923828125,
0.0273284912109375,
-0.01171112060546875,
0.03466796875,
-0.01276397705078125,
0.0082855224609375,
0.0255584716796875,
-0.0169830322265625,
-0.02410888671875,
0.0236663818359375,
-0.0027751922607421875,
0.01080322265625,
0.02667236328125,
0.0236968994140625,
-0.0167236328125,
-0.0189666748046875,
0.03924560546875,
-0.00835418701171875,
-0.05426025390625,
0.021820068359375,
-0.033599853515625,
-0.00904083251953125,
-0.006168365478515625,
-0.018463134765625,
-0.01500701904296875,
-0.00916290283203125,
-0.004230499267578125,
-0.010833740234375,
0.01232147216796875,
0.01329803466796875,
-0.0013322830200195312,
0.0244598388671875,
-0.04998779296875,
-0.03131103515625,
-0.01161956787109375,
0.048187255859375,
0.017913818359375,
-0.0231170654296875,
-0.00623321533203125,
0.0086517333984375,
0.0106658935546875,
-0.048431396484375,
-0.057342529296875,
0.0250244140625,
-0.0163421630859375,
0.00975799560546875,
0.01088714599609375,
-0.04315185546875,
-0.016082763671875,
0.0134735107421875,
-0.0169219970703125,
0.02001953125,
-0.01024627685546875,
-0.047515869140625,
0.0218048095703125,
-0.11187744140625,
-0.01387786865234375,
-0.030426025390625,
-0.0261688232421875,
-0.023284912109375,
0.006885528564453125,
-0.03033447265625,
-0.040771484375,
-0.0191802978515625,
-0.03192138671875,
-0.043487548828125,
-0.0189971923828125,
-0.0206451416015625,
-0.01152801513671875,
0.0210723876953125,
0.06939697265625,
-0.047119140625,
-0.036865234375,
-0.0292205810546875,
-0.01023101806640625,
-0.023590087890625,
-0.0200653076171875,
0.0255126953125,
0.041900634765625,
-0.0113677978515625,
-0.0008721351623535156,
0.032073974609375,
0.0240936279296875,
0.00916290283203125,
-0.0183563232421875,
-0.03631591796875,
-0.04132080078125,
0.004970550537109375,
0.027191162109375,
-0.06597900390625,
0.0232696533203125,
0.004428863525390625,
0.01129913330078125,
0.0269927978515625,
0.06341552734375,
0.004322052001953125,
-0.060302734375,
0.01377105712890625,
0.00983428955078125,
-0.0153350830078125,
-0.06732177734375,
0.0198211669921875,
0.052276611328125,
-0.0298614501953125,
-0.002635955810546875,
0.017791748046875,
-0.01305389404296875,
-0.0272216796875,
-0.028076171875,
0.0211639404296875,
-0.006862640380859375,
-0.0098876953125,
0.011962890625,
0.0157012939453125,
-0.052215576171875,
-0.023162841796875,
0.0137786865234375,
-0.013092041015625,
0.02001953125,
0.039764404296875,
0.0173187255859375,
-0.0372314453125,
-0.06121826171875,
0.057708740234375,
-0.056182861328125,
0.022216796875,
0.0269775390625,
0.00211334228515625,
-0.00971221923828125,
0.02716064453125,
-0.007457733154296875,
-0.005016326904296875,
-0.041290283203125,
0.024658203125,
0.00991058349609375,
0.036285400390625,
-0.015777587890625,
-0.046356201171875,
-0.017242431640625,
-0.06842041015625,
-0.01708984375,
-0.0015935897827148438,
0.0018644332885742188,
-0.0010738372802734375,
0.0254058837890625,
-0.0236968994140625,
0.0021648406982421875,
-0.00412750244140625,
-0.01702880859375,
0.0006656646728515625,
-0.016754150390625,
0.0291290283203125,
0.0194091796875,
-0.04412841796875,
-0.037109375,
0.0117034912109375,
-0.0240936279296875,
-0.024627685546875,
0.0297698974609375,
0.00206756591796875,
0.035125732421875,
-0.01187896728515625,
0.01081085205078125,
0.022064208984375,
0.0325927734375,
-0.043243408203125,
0.04425048828125,
-0.0176544189453125,
-0.02178955078125,
-0.0234222412109375,
-0.007030487060546875,
-0.02874755859375,
0.00312042236328125,
0.017242431640625,
-0.0108184814453125,
0.003265380859375,
-0.0006766319274902344,
-0.028961181640625,
-0.0233612060546875,
-0.004024505615234375,
0.0154571533203125,
0.0164947509765625,
0.0229949951171875,
0.0113067626953125,
-0.0089263916015625,
-0.00902557373046875,
-0.0221099853515625,
-0.03704833984375,
-0.0024166107177734375,
-0.0026035308837890625,
0.0180511474609375,
-0.005657196044921875,
0.00574493408203125,
-0.012939453125,
0.0136871337890625,
-0.028076171875,
0.03265380859375,
0.050323486328125,
-0.0140228271484375,
-0.0187225341796875,
-0.0269317626953125,
-0.0126953125,
0.010101318359375,
-0.06805419921875,
0.054595947265625,
0.037200927734375,
0.03521728515625,
-0.048858642578125,
-0.01788330078125,
0.0113677978515625,
-0.019500732421875,
0.0137481689453125,
0.047088623046875,
0.0269927978515625,
0.03466796875,
-0.0199127197265625,
-0.0192718505859375,
0.04754638671875,
-0.0257110595703125,
0.0018253326416015625,
-0.01800537109375,
-0.003875732421875,
0.040252685546875,
-0.033172607421875,
0.043365478515625,
0.02386474609375,
-0.05572509765625,
-0.0108184814453125,
0.0645751953125,
0.00972747802734375,
0.032012939453125,
-0.0191497802734375,
0.01226806640625,
-0.0095977783203125,
0.01922607421875,
-0.00646209716796875,
0.00836181640625,
0.01197052001953125,
-0.0235443115234375,
0.005611419677734375,
-0.01099395751953125,
-0.0040435791015625,
-0.0179290771484375,
0.005260467529296875,
-0.00029468536376953125,
-0.0023937225341796875,
0.051422119140625,
0.019622802734375,
-0.024139404296875,
-0.025726318359375,
-0.00832366943359375,
-0.01061248779296875,
0.0004673004150390625,
0.006069183349609375,
0.0216064453125,
-0.00457763671875,
-0.00917816162109375,
-0.0004954338073730469,
-0.055206298828125,
0.01309967041015625,
0.033416748046875,
0.051605224609375,
0.033111572265625,
0.0197601318359375,
0.0499267578125,
-0.04583740234375,
0.09210205078125,
0.01461029052734375,
-0.00913238525390625,
-0.0347900390625,
-0.06829833984375,
0.03729248046875,
-0.0302276611328125,
0.044342041015625,
0.08154296875,
0.0189361572265625,
-0.0032825469970703125,
0.01409149169921875,
0.003932952880859375,
0.01776123046875,
-0.006622314453125,
-0.027130126953125,
0.029296875,
-0.0662841796875,
-0.00141143798828125,
0.01471710205078125,
0.056884765625,
0.005771636962890625,
-0.046722412109375,
0.0255584716796875,
0.00685882568359375,
-0.04541015625,
-0.07586669921875,
-0.0477294921875,
-0.041656494140625,
0.0272369384765625,
-0.0024776458740234375,
-0.01904296875,
-0.0030422210693359375,
0.0028858184814453125,
0.007320404052734375,
-0.0145263671875,
-0.05096435546875,
-0.03863525390625,
-0.0782470703125,
-0.0762939453125,
0.00926971435546875,
0.0220489501953125,
0.0219573974609375,
-0.0167999267578125,
0.09246826171875,
0.006168365478515625,
-0.059478759765625,
-0.006656646728515625,
0.0260467529296875,
-0.018524169921875,
0.015625,
0.0012311935424804688,
0.0172882080078125,
-0.0452880859375,
0.019622802734375,
-0.042022705078125,
-0.01340484619140625,
-0.02294921875,
-0.033599853515625,
-0.03607177734375,
-0.0506591796875,
-0.004573822021484375,
0.026824951171875,
0.0277252197265625,
-0.0447998046875,
-0.00281524658203125,
-0.059051513671875,
-0.0229949951171875,
-0.0152130126953125,
-0.0562744140625,
0.0164337158203125,
0.059600830078125,
-0.01317596435546875,
0.017425537109375,
-0.0302734375,
0.01354217529296875,
0.003086090087890625,
0.0288543701171875,
-0.0307464599609375,
0.003597259521484375,
0.0087127685546875,
0.034576416015625,
-0.0139923095703125,
-0.0198516845703125,
-0.0014181137084960938,
0.0172882080078125,
-0.0142364501953125,
0.04302978515625,
-0.01274871826171875,
0.032745361328125,
-0.0587158203125,
-0.04425048828125,
0.0233306884765625,
-0.0033111572265625,
0.00922393798828125,
0.0027370452880859375,
-0.01294708251953125,
0.0277252197265625,
0.07818603515625,
-0.08056640625,
-0.0030689239501953125,
-0.003406524658203125,
0.0194091796875,
-0.039520263671875,
-0.041900634765625,
-0.038330078125,
0.0132293701171875,
-0.027587890625,
0.00792694091796875,
-0.0256500244140625,
0.00827789306640625,
-0.032684326171875,
0.0252685546875,
-0.033660888671875,
-0.0223388671875,
0.0260009765625,
-0.016357421875,
-0.0167388916015625,
0.0226287841796875,
-0.0596923828125,
0.0300140380859375,
-0.011138916015625,
-0.0418701171875,
-0.06591796875,
-0.0276947021484375,
0.0291900634765625,
0.048583984375,
-0.00335693359375,
-0.0262451171875,
-0.04205322265625,
0.037750244140625,
0.022491455078125,
0.0146942138671875,
0.032135009765625,
-0.0167083740234375,
0.055572509765625,
-0.0169830322265625,
-0.00836944580078125,
-0.02783203125,
-0.0014352798461914062,
0.0151519775390625,
-0.03857421875,
0.01788330078125,
-0.01456451416015625,
-0.0234222412109375,
0.046478271484375,
-0.0299835205078125,
-0.017852783203125,
-0.0200653076171875,
-0.0158843994140625,
-0.00859832763671875,
-0.0164947509765625,
-0.0069122314453125,
-0.004215240478515625,
-0.018646240234375,
0.034454345703125,
-0.01328277587890625,
-0.05255126953125,
0.01148223876953125,
0.0550537109375,
0.03375244140625,
-0.01312255859375,
-0.035400390625,
0.0233612060546875,
0.051544189453125,
-0.003948211669921875,
0.0214691162109375,
0.0308837890625,
-0.053131103515625,
0.057281494140625,
0.03228759765625,
0.0021190643310546875,
-0.01165008544921875,
0.06365966796875,
0.00931549072265625,
-0.0174407958984375,
0.0200347900390625,
0.0288848876953125,
-0.011871337890625,
0.015289306640625,
-0.0118408203125,
-0.019775390625,
-0.028533935546875,
0.0299072265625,
-0.009368896484375,
0.027130126953125,
-0.040924072265625,
-0.00782012939453125,
-0.00798797607421875,
0.0220947265625,
0.06927490234375,
0.021209716796875,
0.0188446044921875,
0.01470184326171875,
0.05487060546875,
0.0017938613891601562,
0.023284912109375,
0.0277862548828125,
0.00984954833984375,
0.020599365234375,
0.00443267822265625,
-0.0115509033203125,
-0.0069732666015625,
-0.0012350082397460938,
0.0982666015625,
-0.016204833984375,
-0.054229736328125,
-0.014801025390625,
-0.030792236328125,
-0.0180816650390625,
0.03167724609375,
0.017364501953125,
0.031768798828125,
0.006114959716796875,
-0.00872039794921875,
-0.0249481201171875,
0.005367279052734375,
0.0120849609375,
-0.029815673828125,
0.02276611328125,
0.00341033935546875,
-0.005626678466796875,
0.01404571533203125,
0.046142578125,
-0.0014801025390625,
0.0509033203125,
-0.0304718017578125,
-0.0309906005859375,
-0.01019287109375,
0.0237579345703125,
0.01031494140625,
0.0277099609375,
0.012908935546875,
0.019927978515625,
0.07818603515625,
-0.0178070068359375,
-0.0010814666748046875,
0.01294708251953125,
0.005916595458984375,
0.0099639892578125,
-0.0180816650390625,
0.019073486328125,
0.009368896484375,
-0.03228759765625,
0.04461669921875,
0.0285797119140625,
-0.07476806640625,
-0.0185546875,
0.0162811279296875,
0.0135650634765625,
-0.010650634765625,
-0.01397705078125,
-0.0061798095703125,
-0.0224761962890625,
0.023529052734375,
-0.025482177734375,
-0.025604248046875,
0.0362548828125,
0.0286407470703125,
0.00893402099609375,
-0.0135040283203125,
0.00641632080078125,
-0.0089111328125,
0.0093841552734375,
-0.0455322265625,
-0.0209197998046875,
0.0220794677734375,
-0.0214996337890625,
0.035797119140625,
-0.00493621826171875,
-0.029754638671875,
-0.0002772808074951172,
0.02423095703125,
0.040771484375,
0.03363037109375,
-0.06951904296875,
0.017791748046875,
-0.057647705078125,
-0.01654052734375,
-0.01085662841796875,
-0.0299530029296875,
-0.056121826171875,
-0.0238800048828125,
0.0263214111328125,
0.03265380859375,
-0.0230712890625,
-0.0748291015625,
-0.04736328125,
0.009735107421875,
0.06390380859375,
0.0635986328125,
-0.0243682861328125,
0.06622314453125,
-0.001773834228515625,
0.0506591796875,
-0.006824493408203125,
0.039703369140625,
-0.00047969818115234375,
-0.0259857177734375,
0.007099151611328125,
-0.04119873046875,
-0.0030384063720703125,
-0.004291534423828125,
0.0027217864990234375,
-0.0135345458984375,
0.014862060546875,
0.003795623779296875,
0.0052032470703125,
-0.00042700767517089844,
-0.0084381103515625,
-0.01849365234375,
0.019866943359375,
0.0127410888671875,
0.0011320114135742188,
0.0135498046875,
-0.0167388916015625,
-0.0399169921875,
-0.0007758140563964844,
-0.024261474609375,
0.0174560546875,
0.02618408203125,
-0.01470184326171875,
-0.005298614501953125,
-0.055877685546875,
0.06787109375,
0.11138916015625,
0.026123046875,
0.07904052734375,
0.0161285400390625,
0.0330810546875,
0.037017822265625,
0.0311126708984375,
-0.035858154296875,
-0.01424407958984375,
0.0252532958984375,
-0.00873565673828125,
-0.007049560546875,
-0.00025725364685058594,
-0.01800537109375,
0.008880615234375,
0.061859130859375,
0.0595703125,
-0.0634765625,
-0.006221771240234375,
0.0201873779296875,
-0.00927734375,
0.038299560546875,
-0.0028171539306640625,
0.014251708984375,
0.0208740234375,
0.0733642578125,
-0.00241851806640625,
-0.0016641616821289062,
0.0623779296875,
-0.00925445556640625,
0.01556396484375,
-0.004589080810546875,
0.07135009765625,
0.023193359375,
-0.0660400390625,
-0.00787353515625,
0.06329345703125,
-0.0247955322265625,
-0.01922607421875,
0.01519775390625,
-0.03948974609375,
-0.0207672119140625,
-0.0550537109375,
-0.022430419921875,
0.0098876953125,
-0.0175933837890625,
0.0109405517578125,
-0.02508544921875,
-0.01398468017578125,
0.023681640625,
-0.046173095703125,
0.048126220703125,
-0.0225677490234375,
-0.009124755859375,
-0.027801513671875,
0.00323486328125,
0.0645751953125,
0.01055908203125,
-0.043243408203125,
0.033294677734375,
-0.0279083251953125,
-0.046966552734375,
-0.02008056640625,
-0.07647705078125,
0.0611572265625,
0.00548553466796875,
-0.0218963623046875,
-0.00937652587890625,
0.0225372314453125,
-0.0007677078247070312,
-0.034576416015625,
0.049407958984375,
-0.04803466796875,
0.0099334716796875,
-0.00286102294921875,
0.01439666748046875,
-0.045562744140625,
-0.04364013671875,
-0.068115234375,
0.07330322265625,
-0.0204315185546875,
0.038818359375,
-0.0130615234375,
0.03338623046875,
0.00965118408203125,
0.0150604248046875,
-0.0509033203125,
0.03338623046875,
0.00864410400390625,
0.055999755859375,
-0.0128326416015625,
0.01324462890625,
0.0264892578125,
0.00629425048828125,
0.01094818115234375,
0.0039825439453125,
-0.0007181167602539062,
0.007358551025390625,
0.048065185546875,
0.0595703125,
0.0165252685546875,
-0.01149749755859375,
-0.058074951171875,
0.00023162364959716797,
-0.00882720947265625,
-0.0643310546875,
0.0277557373046875,
-0.028228759765625,
-0.031463623046875,
-0.0298919677734375,
-0.00868988037109375,
-0.00751495361328125,
0.003757476806640625,
-0.04132080078125,
-0.0117340087890625,
-0.0014209747314453125,
0.00738525390625,
-0.05316162109375,
-0.003917694091796875,
0.069091796875,
0.0274810791015625,
-0.0128173828125,
0.0123443603515625,
-0.031463623046875,
0.03692626953125,
-0.007289886474609375,
0.013946533203125,
-0.0087738037109375,
0.0211334228515625,
0.01474761962890625,
-0.00756072998046875,
0.00424957275390625,
0.0304718017578125,
-0.00913238525390625,
0.054931640625,
0.06829833984375,
0.03240966796875,
-0.007843017578125,
-0.0143280029296875,
0.036224365234375,
0.08001708984375,
-0.042877197265625,
-0.026702880859375,
-0.0033016204833984375,
-0.03326416015625,
-0.01512908935546875,
-0.0177001953125,
-0.0223388671875,
0.0131378173828125,
0.0139007568359375,
-0.054107666015625,
0.0157928466796875,
0.00952911376953125,
0.0174102783203125,
-0.0160980224609375,
-0.0173187255859375,
-0.00836944580078125,
-0.006031036376953125,
-0.0246124267578125,
-0.0032215118408203125,
-0.006793975830078125,
0.0281982421875,
0.01070404052734375,
0.01666259765625,
-0.026519775390625,
0.005229949951171875,
-0.0268096923828125,
0.020751953125,
-0.039306640625,
0.0294342041015625,
-0.0689697265625,
-0.04290771484375,
-0.0325927734375,
0.053741455078125,
0.010650634765625,
0.061676025390625,
0.0006175041198730469,
-0.002254486083984375,
0.034332275390625,
0.01702880859375,
0.032135009765625,
-0.0295867919921875,
-0.034332275390625,
-0.00373077392578125,
-0.0294952392578125,
0.00939178466796875,
-0.01004791259765625,
0.00997161865234375,
0.053680419921875,
0.011932373046875,
0.00046825408935546875,
0.008270263671875,
0.005054473876953125,
-0.0161895751953125,
0.0003483295440673828,
0.016510009765625,
0.03179931640625,
0.0190887451171875,
-0.044830322265625,
-0.015838623046875,
-0.0299530029296875,
0.0004436969757080078,
0.0282135009765625,
0.03424072265625,
0.0007071495056152344,
0.0028476715087890625,
0.0221099853515625,
-0.00347900390625,
-0.008331298828125,
-0.01255035400390625,
0.03564453125,
0.00643157958984375,
0.0008063316345214844,
0.018096923828125,
-0.030975341796875,
-0.01483154296875,
0.022064208984375,
0.0107269287109375,
-0.018157958984375,
0.04443359375,
-0.0005545616149902344,
-0.0087127685546875,
0.007648468017578125,
0.0362548828125,
-0.033355712890625,
-0.01398468017578125,
0.012542724609375,
-0.023468017578125,
0.0168304443359375,
-0.00948333740234375,
-0.07745361328125,
0.01360321044921875,
0.0260772705078125,
-0.00467681884765625,
0.05029296875,
-0.042327880859375,
-0.003421783447265625,
-0.036285400390625,
-0.0345458984375,
-0.0306854248046875,
-0.0036411285400390625,
0.0018939971923828125,
0.0010690689086914062,
0.00519561767578125,
0.0002713203430175781,
0.00785064697265625,
0.064208984375,
0.040069580078125,
-0.034027099609375,
0.01904296875,
-0.07122802734375,
0.0440673828125,
0.0364990234375,
0.044952392578125,
-0.044921875,
-0.0272064208984375,
0.002277374267578125,
-0.0084381103515625,
0.01523590087890625,
0.0117340087890625,
0.00714111328125,
0.0013151168823242188,
-0.0121612548828125,
0.0269927978515625,
0.0163726806640625,
-0.047637939453125,
0.002086639404296875,
0.059356689453125,
-0.0240936279296875,
-0.003143310546875,
-0.0262908935546875,
-0.007221221923828125,
-0.038238525390625,
-0.021331787109375,
0.0169525146484375,
-0.03790283203125,
-0.01885986328125,
-0.0191192626953125,
-0.0177001953125,
-0.0014553070068359375,
-0.042236328125,
0.02557373046875,
-0.053741455078125,
-0.03143310546875,
0.046844482421875,
-0.044586181640625,
-0.001560211181640625,
0.013641357421875,
0.0283966064453125,
-0.006134033203125,
0.045654296875,
-0.0120697021484375,
-0.0290374755859375,
0.0318603515625,
0.036773681640625,
0.05743408203125,
-0.0179595947265625,
-0.0293426513671875,
0.0250091552734375,
0.0108795166015625,
0.072021484375,
-0.00525665283203125,
-0.0347900390625,
-0.009918212890625,
-0.0115966796875,
0.0227813720703125,
-0.012054443359375,
0.0212860107421875,
-0.067626953125,
-0.05413818359375,
-0.024261474609375,
0.016448974609375,
0.0217437744140625,
-0.04058837890625,
-0.06597900390625,
0.06573486328125,
-0.0217132568359375,
-0.0347900390625,
-0.0296478271484375,
-0.030975341796875,
0.01399993896484375,
-0.012420654296875,
-0.0162506103515625,
-0.0251007080078125,
-0.0601806640625,
0.03594970703125,
0.0283966064453125,
0.039276123046875,
0.032989501953125,
0.01456451416015625,
-0.0290374755859375,
0.0022029876708984375,
-0.041473388671875,
0.01537322998046875,
-0.009857177734375,
0.002223968505859375,
0.00390625,
0.0227508544921875,
-0.022674560546875,
-0.01568603515625,
0.00495147705078125,
0.004627227783203125,
0.026824951171875,
-0.0186767578125,
-0.0129852294921875,
-0.002727508544921875,
0.01462554931640625,
-0.0200042724609375,
-0.0031414031982421875,
-0.021514892578125,
-0.0187225341796875,
-0.042083740234375,
-0.061004638671875,
0.00031065940856933594,
0.0132293701171875,
-0.047576904296875,
0.021942138671875,
-0.0086212158203125,
-0.02105712890625,
-0.0296630859375,
0.0010023117065429688,
-0.056304931640625,
0.0060272216796875,
-0.002178192138671875,
-0.00868988037109375,
0.0140228271484375,
-0.0240936279296875,
0.060943603515625,
-0.04156494140625,
-0.02130126953125,
-0.0031147003173828125,
0.01812744140625,
0.002361297607421875,
0.005153656005859375,
0.043487548828125,
0.031494140625,
-0.0264434814453125,
-0.0275115966796875,
0.05328369140625,
0.01000213623046875,
0.03857421875,
-0.032196044921875,
0.0517578125,
0.0175018310546875,
-0.033477783203125,
0.01236724853515625,
0.0195159912109375,
0.0164794921875,
-0.06256103515625,
0.054229736328125,
-0.0241851806640625,
0.0211944580078125,
-0.0148162841796875,
0.02923583984375,
-0.0252227783203125,
0.0120849609375,
0.0132293701171875,
-0.011260986328125,
0.01163482666015625,
0.00750732421875,
0.0224609375,
0.00725555419921875,
-0.0013523101806640625,
-0.0213470458984375,
-0.015777587890625,
0.0031261444091796875
]
|
86d5232c39abb1175cce44d54188c9545364c6c9 | Wordpress Stackexchange
Q: How to display all images "Uploaded By" an author I have multiple users, that have the ability to upload media. When I look at the media library it shows the file information, and included at the bottom is an "Uploaded By 'username'"
How can I use this username to loop through the media library and display all images from a user?
Here's a picture of the information with the media.
A: You can do it via WP_Query loop:
$args = array(
'author' => $author_id, // Replace with author id
'post_status' => 'any',
'post_type' => 'attachment'
);
$query = new WP_Query( $args );
More info how to use WP_Query: Codex WP Query
| Q: How to display all images "Uploaded By" an author I have multiple users, that have the ability to upload media. When I look at the media library it shows the file information, and included at the bottom is an "Uploaded By 'username'"
How can I use this username to loop through the media library and display all images from a user?
Here's a picture of the information with the media.
A: You can do it via WP_Query loop:
$args = array(
'author' => $author_id, // Replace with author id
'post_status' => 'any',
'post_type' => 'attachment'
);
$query = new WP_Query( $args );
More info how to use WP_Query: Codex WP Query
| wordpress | {
"language": "en",
"length": 112,
"provenance": "stackexchange_00019.jsonl.gz:456043",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/189967"
} | [
0.04815673828125,
-0.0008831024169921875,
0.012939453125,
-0.01107025146484375,
0.0043487548828125,
-0.03485107421875,
0.0472412109375,
-0.037078857421875,
0.037628173828125,
0.0589599609375,
-0.0262451171875,
0.003101348876953125,
0.019256591796875,
0.003093719482421875,
-0.0670166015625,
-0.01427459716796875,
0.0218353271484375,
-0.0216827392578125,
0.0372314453125,
0.0222930908203125,
-0.0006947517395019531,
0.034393310546875,
0.066162109375,
-0.05029296875,
-0.007404327392578125,
-0.0004024505615234375,
0.051513671875,
-0.014007568359375,
-0.00814056396484375,
-0.03558349609375,
-0.0063323974609375,
0.0139617919921875,
-0.0029392242431640625,
0.0055389404296875,
0.0131988525390625,
0.02227783203125,
0.0167388916015625,
0.00460052490234375,
0.038360595703125,
-0.0084381103515625,
0.01274871826171875,
0.00904083251953125,
0.0013256072998046875,
0.0288848876953125,
-0.0261688232421875,
-0.03826904296875,
0.0285186767578125,
-0.00858306884765625,
0.0207977294921875,
0.055877685546875,
0.01026153564453125,
-0.0011034011840820312,
0.00940704345703125,
0.025115966796875,
-0.020050048828125,
-0.02264404296875,
0.0233917236328125,
0.0025196075439453125,
0.037353515625,
-0.09393310546875,
-0.07806396484375,
-0.01519775390625,
0.059783935546875,
0.0263519287109375,
-0.010589599609375,
0.003849029541015625,
0.0193328857421875,
0.01435089111328125,
-0.040130615234375,
-0.0633544921875,
0.00103759765625,
-0.02703857421875,
0.000888824462890625,
-0.0205841064453125,
-0.024566650390625,
-0.00392913818359375,
-0.0286407470703125,
-0.060028076171875,
0.032684326171875,
-0.0228271484375,
0.022247314453125,
-0.0099945068359375,
-0.0755615234375,
0.03582763671875,
0.01213836669921875,
0.07269287109375,
-0.003955841064453125,
-0.041900634765625,
-0.003597259521484375,
0.00310516357421875,
-0.0090179443359375,
-0.0113067626953125,
0.006023406982421875,
0.0340576171875,
-0.00963592529296875,
-0.026397705078125,
0.043182373046875,
0.043792724609375,
-0.0016269683837890625,
-0.00815582275390625,
-0.00464630126953125,
-0.0311431884765625,
-0.01013946533203125,
-0.033111572265625,
0.006580352783203125,
0.0124053955078125,
-0.006694793701171875,
-0.0391845703125,
0.02056884765625,
0.047393798828125,
-0.0022602081298828125,
0.041290283203125,
-0.0543212890625,
-0.0251617431640625,
-0.0029296875,
0.0299835205078125,
-0.07684326171875,
0.031585693359375,
-0.006832122802734375,
0.016998291015625,
-0.006900787353515625,
0.0257720947265625,
-0.03863525390625,
-0.005847930908203125,
0.0252227783203125,
0.0051422119140625,
0.004589080810546875,
-0.009002685546875,
0.00920867919921875,
0.0088348388671875,
-0.03192138671875,
0.0229339599609375,
0.0213623046875,
-0.00235748291015625,
-0.00786590576171875,
-0.01010894775390625,
-0.00788116455078125,
-0.01971435546875,
-0.01068878173828125,
0.01922607421875,
0.00849151611328125,
-0.038330078125,
-0.005718231201171875,
0.006107330322265625,
-0.0207672119140625,
0.032989501953125,
-0.0045013427734375,
0.00485992431640625,
-0.0005960464477539062,
-0.0654296875,
-0.01406097412109375,
-0.006061553955078125,
-0.0015583038330078125,
0.0279693603515625,
0.04022216796875,
0.0075225830078125,
0.068359375,
-0.026031494140625,
0.0138092041015625,
-0.0214080810546875,
0.018890380859375,
0.02056884765625,
0.034423828125,
0.0025920867919921875,
0.013641357421875,
-0.031707763671875,
-0.039154052734375,
0.0001628398895263672,
0.033935546875,
-0.0140228271484375,
-0.00894927978515625,
-0.03546142578125,
0.07293701171875,
0.03607177734375,
-0.006061553955078125,
0.05078125,
-0.0031795501708984375,
0.05419921875,
-0.0030956268310546875,
0.045440673828125,
0.0148773193359375,
-0.040435791015625,
0.0523681640625,
-0.028167724609375,
-0.061309814453125,
0.004695892333984375,
0.00724029541015625,
0.04193115234375,
0.0299072265625,
-0.0004687309265136719,
0.059722900390625,
0.012451171875,
-0.03509521484375,
0.0191802978515625,
0.00521087646484375,
-0.024810791015625,
-0.0362548828125,
-0.0203857421875,
-0.0024738311767578125,
0.0048370361328125,
0.039093017578125,
-0.0170135498046875,
0.037384033203125,
-0.0166778564453125,
-0.045257568359375,
0.017059326171875,
-0.0158843994140625,
0.00799560546875,
0.0218505859375,
0.046722412109375,
0.01331329345703125,
0.036773681640625,
-0.044677734375,
-0.0092620849609375,
-0.0172576904296875,
0.0008058547973632812,
-0.01287841796875,
0.015594482421875,
0.00714111328125,
0.048187255859375,
-0.0114898681640625,
-0.01548004150390625,
-0.0125274658203125,
-0.00855255126953125,
0.0350341796875,
-0.01556396484375,
-0.00548553466796875,
-0.0180816650390625,
0.0208892822265625,
0.003875732421875,
-0.0230712890625,
0.022552490234375,
-0.01904296875,
0.01387786865234375,
-0.0300445556640625,
-0.0196990966796875,
-0.0186920166015625,
-0.035980224609375,
0.027679443359375,
0.03851318359375,
0.00897979736328125,
0.0085296630859375,
0.0006875991821289062,
0.046417236328125,
0.07550048828125,
0.0479736328125,
0.030548095703125,
0.0034923553466796875,
0.02777099609375,
0.041778564453125,
-0.0341796875,
-0.0030612945556640625,
0.0379638671875,
-0.07916259765625,
0.0186767578125,
0.051025390625,
0.0049896240234375,
0.0297698974609375,
-0.04376220703125,
0.0285797119140625,
0.002582550048828125,
0.0143280029296875,
-0.004001617431640625,
-0.010223388671875,
0.01534271240234375,
0.0225372314453125,
0.01458740234375,
0.0048065185546875,
-0.04522705078125,
0.022430419921875,
0.0130767822265625,
-0.0279998779296875,
0.003696441650390625,
0.0132904052734375,
0.0012054443359375,
0.0011072158813476562,
-0.0191802978515625,
-0.0010204315185546875,
0.0042572021484375,
0.004474639892578125,
-0.01372528076171875,
-0.04364013671875,
-0.035369873046875,
0.01049041748046875,
0.0169830322265625,
-0.031280517578125,
0.04217529296875,
0.0312347412109375,
-0.038665771484375,
-0.001422882080078125,
0.022979736328125,
0.05743408203125,
0.02142333984375,
-0.005016326904296875,
-0.04180908203125,
0.0195770263671875,
-0.01175689697265625,
-0.0673828125,
0.05145263671875,
-0.040313720703125,
0.064453125,
0.07708740234375,
-0.00339508056640625,
0.01345062255859375,
-0.014434814453125,
-0.0247955322265625,
-0.0192108154296875,
0.014862060546875,
-0.0061798095703125,
-0.03619384765625,
-0.0198211669921875,
0.0071868896484375,
0.0129852294921875,
0.02276611328125,
-0.00977325439453125,
-0.0240020751953125,
-0.0186767578125,
0.011810302734375,
-0.0909423828125,
-0.05938720703125,
-0.0141143798828125,
-0.0755615234375,
-0.01384735107421875,
-0.0156707763671875,
-0.038360595703125,
0.010162353515625,
0.00836944580078125,
-0.003856658935546875,
-0.033477783203125,
-0.0111541748046875,
-0.00826263427734375,
-0.0211334228515625,
-0.0261993408203125,
0.01300048828125,
-0.00537109375,
0.0188446044921875,
0.00732421875,
0.04949951171875,
0.0018758773803710938,
-0.0270233154296875,
0.00540924072265625,
0.05401611328125,
0.01055145263671875,
-0.0149993896484375,
0.00992584228515625,
0.01251983642578125,
-0.01049041748046875,
0.020172119140625,
0.020233154296875,
0.035858154296875,
-0.04327392578125,
-0.01132965087890625,
0.01007080078125,
-0.030487060546875,
0.014007568359375,
0.0216217041015625,
-0.01308441162109375,
-0.0198211669921875,
0.014007568359375,
-0.049835205078125,
0.0022258758544921875,
-0.01477813720703125,
-0.0233001708984375,
0.0240631103515625,
0.00878143310546875,
-0.015655517578125,
-0.010223388671875,
0.0040130615234375,
0.019287109375,
0.0261688232421875,
-0.0265350341796875,
-0.02447509765625,
-0.0009293556213378906,
0.0206146240234375,
0.051361083984375,
0.02569580078125,
0.00778961181640625,
-0.00231170654296875,
-0.0150604248046875,
-0.00806427001953125,
0.0259857177734375,
-0.02093505859375,
0.0247039794921875,
-0.030670166015625,
-0.0235137939453125,
0.0457763671875,
0.0036773681640625,
0.03546142578125,
-0.05072021484375,
-0.041748046875,
-0.03875732421875,
0.058990478515625,
0.019744873046875,
-0.0209808349609375,
0.00560760498046875,
-0.004436492919921875,
-0.06884765625,
0.025115966796875,
-0.06268310546875,
0.0259246826171875,
-0.04150390625,
-0.0140380859375,
-0.0026760101318359375,
-0.049774169921875,
0.0182037353515625,
-0.05975341796875,
-0.01038360595703125,
-0.0312042236328125,
0.0104522705078125,
0.004886627197265625,
0.02008056640625,
-0.0086822509765625,
-0.0105438232421875,
0.01183319091796875,
0.004161834716796875,
-0.029266357421875,
-0.1448974609375,
-0.0311279296875,
0.00018858909606933594,
0.12347412109375,
-0.03021240234375,
0.016998291015625,
-0.0516357421875,
0.07232666015625,
0.0296630859375,
0.04498291015625,
0.004055023193359375,
-0.0175323486328125,
0.0014696121215820312,
-0.033599853515625,
0.0004315376281738281,
-0.032196044921875,
-0.00974273681640625,
-0.07489013671875,
-0.031982421875,
-0.07086181640625,
-0.0673828125,
-0.007053375244140625,
-0.05230712890625,
0.0036716461181640625,
-0.037628173828125,
-0.0202484130859375,
-0.018402099609375,
0.022857666015625,
-0.0186767578125,
-0.0052032470703125,
-0.032989501953125,
-0.0601806640625,
0.0179443359375,
-0.00762939453125,
0.023590087890625,
0.0214996337890625,
0.10382080078125,
0.0003972053527832031,
-0.0020999908447265625,
-0.098388671875,
0.01141357421875,
0.03289794921875,
-0.017578125,
0.056427001953125,
0.04327392578125,
-0.008697509765625,
0.0150299072265625,
0.00115203857421875,
0.0036449432373046875,
0.00597381591796875,
0.004669189453125,
-0.00638580322265625,
-0.0526123046875,
0.0460205078125,
0.0026454925537109375,
0.005718231201171875,
-0.005985260009765625,
-0.0006403923034667969,
-0.00978851318359375,
-0.01016998291015625,
0.00833892822265625,
0.00931549072265625,
0.0268402099609375,
-0.00412750244140625,
-0.046661376953125,
-0.0030651092529296875,
-0.060638427734375,
0.030029296875,
-0.00946044921875,
0.01192474365234375,
0.0059967041015625,
0.058624267578125,
-0.000014722347259521484,
0.010589599609375,
-0.021942138671875,
0.0153045654296875,
0.043792724609375,
-0.03973388671875,
-0.0017862319946289062,
-0.00016057491302490234,
-0.01377105712890625,
0.0184326171875,
0.0016145706176757812,
-0.045623779296875,
0.0007481575012207031,
-0.0066680908203125,
0.017333984375,
0.01242828369140625,
0.01557159423828125,
0.0328369140625,
0.032867431640625,
0.01605224609375,
-0.0104522705078125,
-0.035797119140625,
0.047119140625,
-0.03662109375,
0.04608154296875,
0.0050048828125,
0.0006914138793945312,
-0.002513885498046875,
0.06982421875,
-0.058685302734375,
0.043304443359375,
0.0026378631591796875,
0.0260009765625,
0.032623291015625,
0.01226806640625,
0.033447265625,
0.0163726806640625,
-0.017486572265625,
-0.00440216064453125,
-0.00843048095703125,
-0.042449951171875,
0.04473876953125,
0.022674560546875,
0.054656982421875,
0.041778564453125,
-0.03759765625,
-0.00348663330078125,
-0.07733154296875,
-0.0229034423828125,
0.0242767333984375,
-0.026275634765625,
-0.034393310546875,
-0.05340576171875,
-0.021026611328125,
0.03875732421875,
-0.006061553955078125,
-0.0106048583984375,
-0.0196685791015625,
-0.003429412841796875,
0.004154205322265625,
-0.011199951171875,
-0.0294189453125,
0.0232696533203125,
0.027801513671875,
0.006740570068359375,
-0.02618408203125,
-0.022857666015625,
-0.02099609375,
0.0175933837890625,
-0.0258941650390625,
-0.0185699462890625,
0.067138671875,
-0.0033435821533203125,
-0.002613067626953125,
-0.0224609375,
0.00408935546875,
-0.036956787109375,
0.0005664825439453125,
0.06524658203125,
0.026275634765625,
-0.028961181640625,
0.015960693359375,
-0.0160980224609375,
0.015350341796875,
0.039886474609375,
-0.0193023681640625,
-0.027679443359375,
-0.06744384765625,
-0.0008273124694824219,
0.01690673828125,
-0.00225830078125,
0.003528594970703125,
0.0033111572265625,
0.019378662109375,
-0.0243072509765625,
0.0310516357421875,
0.0011997222900390625,
0.023284912109375,
-0.00445556640625,
0.04864501953125,
-0.00626373291015625,
-0.005664825439453125,
-0.047698974609375,
-0.01053619384765625,
-0.02398681640625,
-0.057403564453125,
-0.0014820098876953125,
0.044342041015625,
-0.028228759765625,
0.008880615234375,
-0.0022335052490234375,
0.015899658203125,
0.00989532470703125,
-0.0408935546875,
-0.0121307373046875,
-0.01502227783203125,
0.03546142578125,
-0.0198211669921875,
-0.005764007568359375,
0.0212860107421875,
0.0005812644958496094,
0.0284576416015625,
-0.0157012939453125,
-0.04510498046875,
0.0080108642578125,
0.0236358642578125,
-0.0012578964233398438,
0.013702392578125,
-0.0003495216369628906,
0.033447265625,
0.05975341796875,
-0.01528167724609375,
0.034576416015625,
0.050689697265625,
0.004047393798828125,
0.0190582275390625,
-0.0023708343505859375,
0.040557861328125,
-0.0254669189453125,
0.04229736328125,
0.00362396240234375,
0.027740478515625,
0.045501708984375,
-0.021514892578125,
-0.01198577880859375,
-0.005435943603515625,
0.019378662109375,
0.00455474853515625,
-0.0094451904296875,
-0.003009796142578125,
-0.0033588409423828125,
0.022979736328125,
-0.016082763671875,
-0.007785797119140625,
-0.0389404296875,
0.049041748046875,
-0.0282440185546875,
-0.026214599609375,
-0.00745391845703125,
-0.02294921875,
0.021484375,
-0.00592803955078125,
0.046356201171875,
-0.00624847412109375,
-0.03631591796875,
-0.0474853515625,
0.0292510986328125,
-0.036407470703125,
-0.0106201171875,
0.00982666015625,
-0.0296173095703125,
0.0245361328125,
0.0028324127197265625,
0.03564453125,
-0.05035400390625,
0.048187255859375,
-0.005306243896484375,
0.02362060546875,
0.0015897750854492188,
0.052032470703125,
-0.00603485107421875,
-0.0098724365234375,
0.038818359375,
-0.048431396484375,
-0.0038814544677734375,
-0.0221405029296875,
-0.032257080078125,
0.045562744140625,
-0.0233612060546875,
0.01517486572265625,
-0.01450347900390625,
0.023345947265625,
-0.02545166015625,
-0.03668212890625,
0.061614990234375,
-0.03143310546875,
-0.00640106201171875,
0.0306549072265625,
0.054595947265625,
-0.028076171875,
0.0287322998046875,
0.017242431640625,
-0.06646728515625,
-0.0494384765625,
0.031707763671875,
-0.05206298828125,
-0.0152435302734375,
0.0097808837890625,
-0.08074951171875,
0.0718994140625,
-0.0200347900390625,
0.06610107421875,
0.0304412841796875,
0.0037479400634765625,
0.0012722015380859375,
-0.0225982666015625,
-0.04046630859375,
0.058868408203125,
0.00839996337890625,
0.0489501953125,
-0.084716796875,
-0.0165252685546875,
0.01064300537109375,
0.0628662109375,
0.07025146484375,
0.01551055908203125,
-0.06451416015625,
-0.03826904296875,
0.0260467529296875,
0.035369873046875,
0.01119232177734375,
0.056182861328125,
-0.0021724700927734375,
0.01303863525390625,
0.0462646484375,
-0.01959228515625,
0.04296875,
-0.01531219482421875,
-0.0136871337890625,
0.0162506103515625,
0.0283966064453125,
0.046112060546875,
-0.01198577880859375,
0.01235198974609375,
-0.049468994140625,
-0.0015802383422851562,
0.05902099609375,
-0.03143310546875,
0.02801513671875,
0.04815673828125,
0.045318603515625,
-0.006195068359375,
-0.0181732177734375,
-0.01065826416015625,
0.05206298828125,
0.003154754638671875,
0.0022029876708984375,
0.037933349609375,
0.01514434814453125,
0.0173187255859375,
0.0098876953125,
0.00791168212890625,
0.0098114013671875,
0.018707275390625,
0.047607421875,
0.01007843017578125,
0.004642486572265625,
-0.0797119140625,
-0.036865234375,
0.040313720703125,
0.06683349609375,
-0.039031982421875,
-0.029052734375,
0.0194854736328125,
0.0038433074951171875,
-0.0254364013671875,
0.00447845458984375,
-0.0208740234375,
-0.0340576171875,
0.022918701171875,
-0.02117919921875,
-0.002471923828125,
0.01535797119140625,
0.049774169921875,
-0.00860595703125,
-0.01763916015625,
-0.036376953125,
-0.018524169921875,
-0.020965576171875,
0.0178375244140625,
0.00948333740234375,
-0.0080108642578125,
-0.01438140869140625,
0.01214599609375,
0.01061248779296875,
0.0106353759765625,
-0.041168212890625,
0.037109375,
0.007610321044921875,
0.05401611328125,
-0.06610107421875,
-0.021636962890625,
0.0036296844482421875,
0.0546875,
0.045684814453125,
-0.0223846435546875,
0.0102081298828125,
-0.009368896484375,
-0.0489501953125,
-0.0025482177734375,
0.04248046875,
-0.0201263427734375,
0.00203704833984375,
-0.037750244140625,
0.03009033203125,
0.0418701171875,
-0.0032787322998046875,
0.0119171142578125,
-0.0262603759765625,
0.08441162109375,
-0.043182373046875,
0.028350830078125,
-0.034759521484375,
-0.0631103515625,
0.0031032562255859375,
-0.04742431640625,
0.0770263671875,
-0.041595458984375,
-0.10601806640625,
-0.0212249755859375,
-0.0447998046875,
-0.03265380859375,
0.040496826171875,
0.037353515625,
-0.035064697265625,
0.037811279296875,
-0.020294189453125,
-0.01273345947265625,
0.019805908203125,
-0.0276947021484375,
0.006717681884765625,
-0.0029048919677734375,
-0.01554107666015625,
-0.0200042724609375,
-0.037017822265625,
-0.00955963134765625,
-0.0190582275390625,
0.01561737060546875,
0.02288818359375,
0.0237579345703125,
0.0205078125,
0.02734375,
0.011749267578125,
0.0017957687377929688,
-0.033966064453125,
-0.0219268798828125,
0.053009033203125,
-0.033660888671875,
-0.03387451171875,
0.001605987548828125,
0.0217742919921875,
0.06561279296875,
-0.0017786026000976562,
-0.0102691650390625,
0.0051727294921875,
-0.0221710205078125,
0.00952911376953125,
0.04608154296875,
-0.0164031982421875,
-0.0186920166015625,
0.0007658004760742188,
-0.0037364959716796875,
-0.0018033981323242188,
0.0298614501953125,
0.0037136077880859375,
-0.0247344970703125,
-0.00118255615234375,
0.030120849609375,
-0.041656494140625,
0.0177459716796875,
0.0001817941665649414,
0.01381683349609375,
0.0233917236328125,
0.0214691162109375,
-0.03009033203125,
-0.033905029296875,
-0.028076171875,
-0.0029773712158203125,
-0.0164947509765625,
0.033477783203125,
-0.022674560546875,
-0.015350341796875,
0.02789306640625,
0.00756072998046875,
0.037445068359375,
0.006465911865234375,
-0.00884246826171875,
0.00167083740234375,
-0.00951385498046875,
-0.008544921875,
-0.0208282470703125,
-0.0250091552734375,
-0.0550537109375,
0.0298614501953125,
0.0288543701171875,
-0.0079803466796875,
-0.00856781005859375,
-0.053375244140625,
-0.0004112720489501953,
0.00017642974853515625,
-0.004184722900390625,
-0.02923583984375,
0.025634765625,
-0.0162353515625,
0.0009207725524902344,
-0.04205322265625,
-0.0221710205078125,
0.01580810546875,
0.0390625,
-0.034210205078125,
-0.0304718017578125,
-0.031982421875,
0.0052490234375,
-0.0230865478515625,
0.00550079345703125,
-0.0038471221923828125,
-0.0160369873046875,
0.01397705078125,
0.046417236328125,
0.0286712646484375,
0.0941162109375,
-0.0083465576171875,
-0.042755126953125,
-0.0280914306640625,
0.005706787109375,
0.01052093505859375,
-0.038299560546875,
0.005584716796875,
-0.045318603515625,
0.0041961669921875,
-0.0230865478515625,
0.006404876708984375,
0.01262664794921875,
-0.018310546875,
-0.036529541015625,
0.055633544921875,
-0.005138397216796875,
-0.030914306640625,
-0.0306243896484375,
0.046630859375,
-0.006069183349609375,
-0.0037860870361328125,
-0.00312042236328125,
-0.013671875,
0.0175933837890625,
-0.005229949951171875,
-0.002056121826171875,
-0.009674072265625,
0.0178375244140625,
0.0086212158203125,
-0.051666259765625,
-0.01050567626953125,
-0.0263671875,
-0.032379150390625,
0.035430908203125,
-0.0216827392578125,
0.04095458984375,
0.030853271484375,
-0.0277862548828125,
0.0106048583984375,
-0.002994537353515625,
-0.018035888671875,
-0.04742431640625,
-0.0008764266967773438,
-0.0408935546875,
0.0017871856689453125,
0.0916748046875,
0.08880615234375,
0.032867431640625,
-0.03125,
0.01256561279296875,
-0.00688934326171875,
0.005489349365234375,
-0.0111541748046875,
-0.00994110107421875,
-0.04595947265625,
-0.015899658203125,
-0.0035228729248046875,
-0.035797119140625,
0.00124359130859375,
0.006366729736328125,
-0.0653076171875,
-0.0026988983154296875,
-0.042694091796875,
-0.01788330078125,
-0.035797119140625,
0.00669097900390625,
0.042938232421875,
-0.037017822265625,
-0.004192352294921875,
-0.0138397216796875,
0.00835418701171875,
-0.0018978118896484375,
-0.0291748046875,
-0.0030612945556640625,
-0.00836181640625,
0.00691986083984375,
0.0276336669921875,
0.0150909423828125,
-0.0168609619140625,
-0.0023822784423828125,
0.00829315185546875,
-0.0231475830078125,
0.012298583984375,
-0.00684356689453125,
0.00787353515625,
0.025238037109375,
0.036163330078125,
0.00928497314453125,
0.045928955078125,
-0.0254364013671875,
0.0111541748046875,
-0.0159454345703125,
-0.0095977783203125,
-0.022613525390625,
0.022247314453125,
0.0377197265625,
-0.03179931640625,
0.0019683837890625,
0.00382232666015625,
0.004703521728515625,
-0.04034423828125,
0.027923583984375,
0.017730712890625,
-0.004863739013671875,
0.03326416015625
]
|
24620cd9f2983a6f77466d0011db7e03d17ecfe7 | Wordpress Stackexchange
Q: Remove Customize Background and Header from Appearance admin menu without CSS or JS I am trying to remove background and header from appearance menu, but they don't seem to go away! I think it's because I have activated customize, but can I remove them anyway without using CSS or JS?
Here is my code:
add_action('admin_menu', 'remove_unnecessary_wordpress_menus', 999);
function remove_unnecessary_wordpress_menus(){
remove_menu_page('themes.php?page=custom-background');
remove_submenu_page('themes.php', 'custom-background');
remove_submenu_page('themes.php', 'custom-header');
}
Thanks in advance!
A: Here is my final of the code. Thanks for the fast answer!
add_action('admin_menu', 'remove_unnecessary_wordpress_menus', 999);
function remove_unnecessary_wordpress_menus(){
global $submenu;
foreach($submenu['themes.php'] as $menu_index => $theme_menu){
if($theme_menu[0] == 'Header' || $theme_menu[0] == 'Background')
unset($submenu['themes.php'][$menu_index]);
}
}
| Q: Remove Customize Background and Header from Appearance admin menu without CSS or JS I am trying to remove background and header from appearance menu, but they don't seem to go away! I think it's because I have activated customize, but can I remove them anyway without using CSS or JS?
Here is my code:
add_action('admin_menu', 'remove_unnecessary_wordpress_menus', 999);
function remove_unnecessary_wordpress_menus(){
remove_menu_page('themes.php?page=custom-background');
remove_submenu_page('themes.php', 'custom-background');
remove_submenu_page('themes.php', 'custom-header');
}
Thanks in advance!
A: Here is my final of the code. Thanks for the fast answer!
add_action('admin_menu', 'remove_unnecessary_wordpress_menus', 999);
function remove_unnecessary_wordpress_menus(){
global $submenu;
foreach($submenu['themes.php'] as $menu_index => $theme_menu){
if($theme_menu[0] == 'Header' || $theme_menu[0] == 'Background')
unset($submenu['themes.php'][$menu_index]);
}
}
A: As overcomplicated as it sounds, I always find the best way to handle admin menu modifications is to overlook the given wordpress remove_ functions and go straight to the $menu and $submenu globals. In the case you've specified here, you'd want to change your code to:
add_action('admin_menu', 'remove_unnecessary_wordpress_menus', 999);
function remove_unnecessary_wordpress_menus(){
global $submenu;
unset($submenu['themes.php'][20]);
unset($submenu['themes.php'][22]);
}
The indices of the pages in the themes.php array seem strange, but what isn't when you try to hack WP?! A good reference for using these globals can be found here.
EDIT: Just a thought, given the varying amounts of plugins etc. which could (potentially, but not definitely) change the index of a given menu/submenu item in the array, it'd be a good idea to check the numbers required if the snippet I've provided doesn't work. You can do that by modifying the code slightly to this:
add_action('admin_menu', 'remove_unnecessary_wordpress_menus', 999);
function remove_unnecessary_wordpress_menus(){
global $submenu;
//Left margin is to account for the admin sidebar menu
echo '<pre style="margin-left:11em">';
print_r($submenu);
echo '</pre>';
}
This will 'pretty' print the $submenu array, from which you can find the exact numbers you need.
EDIT: Since I don't have the rep to comment on this community yet, it's worth pointing out that @Fredrik did a good job of generalisation. +1.
A: Thanks all! Here is the code within WordPress 4.9.8.
function remove_header_and_bg(){
global $submenu;
unset($submenu['themes.php'][6]); // customize
unset($submenu['themes.php'][15]); // header_image
unset($submenu['themes.php'][20]); // background_image
}
add_action( 'admin_menu', 'remove_header_and_bg', 999 );
A: Here is another option to remove header and background (source):
//Remove the custom options provided by the default twentyeleven theme.
add_action( 'after_setup_theme','remove_twentyeleven_options', 100 );
function remove_twentyeleven_options() {
remove_custom_background();
remove_custom_image_header();
remove_action('admin_menu', 'twentyeleven_theme_options_add_page');
}
A: Another version without need to use a loop is to use the correct identifier, which can be displayed by var_dump the global $submenu.
function remove_unnecessary_wordpress_menus(){
remove_submenu_page( 'themes.php', 'customize.php?return=%2Fwp-admin%2Findex.php&autofocus%5Bcontrol%5D=header_image' );
remove_submenu_page( 'themes.php', 'customize.php?return=%2Fwp-admin%2Findex.php&autofocus%5Bcontrol%5D=background_image' );
}
add_action('admin_menu', 'remove_unnecessary_wordpress_menus', 999);
This works only if the path to the website is /, otherwise you need to add the path after customize.php?return=, e. g. customize.php?return=%2Fwordpress%2F if the path is /wordpress/.
It’s also possible to handle the path automatically:
function remove_unnecessary_wordpress_menus(){
$site_path = rawurlencode( get_blog_details()->path );
remove_submenu_page( 'themes.php', 'customize.php?return=' . $site_path . 'wp-admin%2Findex.php&autofocus%5Bcontrol%5D=header_image' );
remove_submenu_page( 'themes.php', 'customize.php?return=' . $site_path . 'wp-admin%2Findex.php&autofocus%5Bcontrol%5D=background_image' );
}
add_action('admin_menu', 'remove_unnecessary_wordpress_menus', 999);
| wordpress | {
"language": "en",
"length": 478,
"provenance": "stackexchange_00019.jsonl.gz:456097",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/190170"
} | [
0.08782958984375,
0.0239105224609375,
0.00782012939453125,
-0.03704833984375,
0.0567626953125,
-0.053863525390625,
0.052215576171875,
-0.055816650390625,
-0.021942138671875,
0.0235748291015625,
0.00426483154296875,
-0.036712646484375,
-0.036163330078125,
-0.03558349609375,
-0.019134521484375,
-0.039581298828125,
0.0196990966796875,
0.0132904052734375,
0.050567626953125,
0.01107025146484375,
0.00412750244140625,
0.016357421875,
0.006977081298828125,
0.0026416778564453125,
0.0292816162109375,
-0.0927734375,
0.02032470703125,
0.0136566162109375,
-0.0134429931640625,
-0.019012451171875,
0.0162506103515625,
0.0364990234375,
0.0004258155822753906,
0.0421142578125,
0.01058197021484375,
0.049591064453125,
-0.0006508827209472656,
0.0318603515625,
0.037811279296875,
-0.004871368408203125,
0.01995849609375,
-0.007518768310546875,
0.0173492431640625,
0.0279693603515625,
-0.0099945068359375,
-0.03778076171875,
0.01065826416015625,
-0.035400390625,
0.00592803955078125,
-0.0086212158203125,
-0.0025787353515625,
0.0128631591796875,
0.0163726806640625,
-0.01438140869140625,
-0.0166473388671875,
-0.0085296630859375,
-0.0179901123046875,
-0.023468017578125,
0.04376220703125,
0.03594970703125,
-0.02484130859375,
-0.040924072265625,
0.02032470703125,
-0.054473876953125,
-0.0018711090087890625,
0.0236358642578125,
0.01351165771484375,
0.01003265380859375,
-0.10064697265625,
0.0035152435302734375,
0.06048583984375,
-0.06695556640625,
0.0092315673828125,
-0.007793426513671875,
-0.0183563232421875,
-0.052154541015625,
-0.004512786865234375,
-0.044036865234375,
0.035888671875,
-0.01678466796875,
0.023834228515625,
0.013336181640625,
-0.023590087890625,
-0.0035152435302734375,
0.0151824951171875,
0.017181396484375,
0.0038738250732421875,
-0.0328369140625,
-0.01247406005859375,
-0.0246429443359375,
-0.0142364501953125,
-0.04071044921875,
-0.0150146484375,
0.01277923583984375,
0.00002962350845336914,
-0.0283660888671875,
0.039276123046875,
0.056060791015625,
-0.010711669921875,
0.03228759765625,
0.005207061767578125,
-0.046875,
0.08447265625,
-0.074462890625,
-0.0016889572143554688,
0.02227783203125,
-0.013031005859375,
0.0129852294921875,
0.04400634765625,
0.03228759765625,
-0.00909423828125,
-0.01363372802734375,
-0.0122528076171875,
-0.0239715576171875,
-0.01468658447265625,
0.01309967041015625,
-0.03314208984375,
-0.00908660888671875,
0.005615234375,
-0.026641845703125,
-0.0212860107421875,
0.0196380615234375,
-0.00914764404296875,
-0.032867431640625,
0.0245208740234375,
0.011505126953125,
-0.019256591796875,
-0.0208282470703125,
0.025238037109375,
0.0038928985595703125,
-0.039520263671875,
0.015777587890625,
0.0758056640625,
0.007534027099609375,
0.0244598388671875,
-0.0175933837890625,
0.04132080078125,
-0.0134429931640625,
0.0142364501953125,
0.014373779296875,
0.03472900390625,
-0.03070068359375,
-0.023345947265625,
0.0131683349609375,
0.00579071044921875,
-0.004032135009765625,
-0.005268096923828125,
0.01551055908203125,
0.028564453125,
-0.052886962890625,
0.035980224609375,
-0.04351806640625,
0.01259613037109375,
0.037200927734375,
-0.031158447265625,
0.0033740997314453125,
0.037841796875,
-0.021514892578125,
-0.010345458984375,
-0.04913330078125,
0.00826263427734375,
-0.0196380615234375,
0.006595611572265625,
-0.02960205078125,
-0.039794921875,
0.0273590087890625,
-0.0270538330078125,
-0.0020427703857421875,
0.0184478759765625,
-0.033111572265625,
0.041107177734375,
0.002605438232421875,
0.0266876220703125,
0.03472900390625,
0.032257080078125,
0.018218994140625,
0.0193023681640625,
-0.016204833984375,
0.006740570068359375,
0.060760498046875,
-0.0158538818359375,
-0.049224853515625,
0.00494384765625,
-0.03192138671875,
-0.10015869140625,
0.047149658203125,
0.0036907196044921875,
0.09674072265625,
0.0443115234375,
0.017791748046875,
0.07318115234375,
-0.036346435546875,
-0.0115509033203125,
-0.00888824462890625,
-0.0142364501953125,
-0.02105712890625,
-0.0190887451171875,
0.0095672607421875,
-0.0229949951171875,
0.00787353515625,
0.0009832382202148438,
0.0089263916015625,
0.021026611328125,
-0.01253509521484375,
-0.036895751953125,
0.0271759033203125,
-0.0296630859375,
0.042022705078125,
-0.0033168792724609375,
0.02410888671875,
-0.0040283203125,
0.0004982948303222656,
-0.0081329345703125,
-0.0211181640625,
0.002605438232421875,
-0.0007925033569335938,
-0.00484466552734375,
0.01287078857421875,
-0.00959014892578125,
0.0214385986328125,
0.0279693603515625,
-0.030548095703125,
0.013671875,
0.0233917236328125,
0.034515380859375,
-0.0197296142578125,
-0.004108428955078125,
-0.032257080078125,
0.030853271484375,
-0.01142120361328125,
-0.0081634521484375,
0.0382080078125,
0.0186614990234375,
0.00920867919921875,
-0.03656005859375,
0.00281524658203125,
0.016387939453125,
-0.044586181640625,
-0.023712158203125,
0.04315185546875,
0.051483154296875,
0.0294952392578125,
-0.01496124267578125,
-0.0517578125,
0.0887451171875,
-0.018402099609375,
-0.0008349418640136719,
-0.0382080078125,
0.0168304443359375,
-0.01070404052734375,
0.0338134765625,
-0.039947509765625,
0.03277587890625,
0.0086517333984375,
0.06048583984375,
-0.00850677490234375,
-0.0076904296875,
-0.01148223876953125,
0.024139404296875,
-0.00946044921875,
0.01303863525390625,
0.0143280029296875,
-0.026336669921875,
-0.0037746429443359375,
0.0306854248046875,
-0.0161895751953125,
0.0191802978515625,
0.01519775390625,
-0.01328277587890625,
-0.0160980224609375,
0.036285400390625,
0.004543304443359375,
-0.0179443359375,
0.01457977294921875,
0.034393310546875,
-0.0189971923828125,
-0.014373779296875,
-0.0121612548828125,
-0.016448974609375,
-0.00095367431640625,
-0.020599365234375,
0.00989532470703125,
0.01213836669921875,
-0.0028076171875,
-0.0089874267578125,
-0.06048583984375,
0.0289154052734375,
0.021392822265625,
0.00942230224609375,
0.01934814453125,
0.031402587890625,
0.01309967041015625,
-0.0158233642578125,
0.0146484375,
0.019683837890625,
-0.007843017578125,
0.01102447509765625,
0.00789642333984375,
0.011993408203125,
0.00586700439453125,
0.0148468017578125,
0.048492431640625,
0.01806640625,
-0.010498046875,
0.000015556812286376953,
0.0006308555603027344,
0.035736083984375,
0.00540924072265625,
-0.00887298583984375,
0.01438140869140625,
-0.038055419921875,
0.01641845703125,
0.01561737060546875,
-0.024688720703125,
0.00362396240234375,
-0.034332275390625,
-0.0212554931640625,
-0.01068878173828125,
-0.08203125,
-0.07080078125,
0.003936767578125,
-0.0035953521728515625,
-0.0259246826171875,
0.01525115966796875,
-0.019195556640625,
-0.000029802322387695312,
0.0225830078125,
-0.0060577392578125,
0.02899169921875,
-0.0165252685546875,
-0.0033664703369140625,
0.003414154052734375,
-0.049072265625,
-0.046112060546875,
0.003978729248046875,
-0.00360870361328125,
-0.005626678466796875,
0.06707763671875,
0.005023956298828125,
-0.062164306640625,
0.025054931640625,
0.0025577545166015625,
0.002216339111328125,
0.050811767578125,
0.03472900390625,
0.0124359130859375,
-0.007297515869140625,
0.0191497802734375,
-0.0257568359375,
0.0189666748046875,
-0.0301971435546875,
-0.04364013671875,
-0.0462646484375,
-0.009490966796875,
-0.040618896484375,
0.031494140625,
0.08306884765625,
-0.0318603515625,
-0.0278167724609375,
-0.05169677734375,
-0.059661865234375,
-0.0078277587890625,
-0.06927490234375,
0.03680419921875,
0.033233642578125,
0.00382232666015625,
-0.00911712646484375,
0.0283050537109375,
0.03216552734375,
0.00325775146484375,
-0.036407470703125,
0.010223388671875,
0.0093231201171875,
0.0170440673828125,
0.04107666015625,
0.0264892578125,
0.0182037353515625,
-0.0211029052734375,
0.030853271484375,
0.0168304443359375,
-0.0175018310546875,
-0.00907135009765625,
-0.0005955696105957031,
-0.01094818115234375,
-0.016204833984375,
0.04400634765625,
0.01383209228515625,
0.032196044921875,
-0.002750396728515625,
-0.01800537109375,
0.00006496906280517578,
0.06585693359375,
-0.054840087890625,
-0.021026611328125,
-0.01219940185546875,
0.0079803466796875,
0.01457977294921875,
-0.015869140625,
-0.01641845703125,
-0.018280029296875,
-0.19580078125,
0.026123046875,
-0.01464080810546875,
-0.03338623046875,
-0.0204315185546875,
0.049346923828125,
-0.0989990234375,
-0.07330322265625,
0.0197296142578125,
0.0234375,
-0.007732391357421875,
0.037384033203125,
0.004364013671875,
-0.015106201171875,
-0.005634307861328125,
-0.0012044906616210938,
-0.0309906005859375,
-0.0035648345947265625,
-0.034210205078125,
0.032196044921875,
0.026153564453125,
0.02197265625,
-0.0161590576171875,
0.0178070068359375,
0.0197296142578125,
0.031280517578125,
0.0087890625,
0.004993438720703125,
0.00275421142578125,
-0.0281219482421875,
0.0023193359375,
-0.0274200439453125,
0.012359619140625,
0.00917816162109375,
-0.0302581787109375,
0.01094818115234375,
-0.0137481689453125,
0.00635528564453125,
0.03240966796875,
-0.032073974609375,
-0.0159454345703125,
-0.01395416259765625,
-0.026153564453125,
0.00080108642578125,
-0.0298309326171875,
0.01357269287109375,
-0.01473236083984375,
-0.0187225341796875,
0.00441741943359375,
0.01367950439453125,
0.002132415771484375,
-0.00004982948303222656,
0.007450103759765625,
0.0258026123046875,
-0.0206146240234375,
0.0057830810546875,
-0.006923675537109375,
0.032440185546875,
-0.017730712890625,
0.040740966796875,
-0.00820159912109375,
-0.039337158203125,
0.1058349609375,
-0.0070953369140625,
0.00380706787109375,
0.00025153160095214844,
0.063720703125,
-0.0092010498046875,
-0.023773193359375,
0.035980224609375,
-0.002742767333984375,
-0.0197601318359375,
-0.025848388671875,
0.0225067138671875,
-0.0106201171875,
0.0104217529296875,
0.016448974609375,
0.05120849609375,
-0.06048583984375,
-0.029937744140625,
0.000354766845703125,
-0.0013418197631835938,
-0.0021038055419921875,
0.04022216796875,
0.0234222412109375,
-0.00571441650390625,
-0.01535797119140625,
0.01255035400390625,
0.0218658447265625,
-0.0103759765625,
0.021942138671875,
-0.042999267578125,
0.042022705078125,
-0.0272064208984375,
-0.0008525848388671875,
-0.0034637451171875,
0.00385284423828125,
0.05859375,
0.0079498291015625,
-0.0234222412109375,
-0.079345703125,
0.0173797607421875,
0.038818359375,
-0.0174560546875,
-0.0185089111328125,
0.038726806640625,
0.00841522216796875,
0.0139617919921875,
-0.0184478759765625,
-0.019378662109375,
-0.0250091552734375,
-0.0496826171875,
0.03265380859375,
0.034820556640625,
-0.0253753662109375,
0.042022705078125,
-0.0159149169921875,
0.054351806640625,
-0.0311737060546875,
-0.0095367431640625,
-0.028076171875,
-0.044219970703125,
0.03369140625,
-0.0122833251953125,
0.0208740234375,
0.0177459716796875,
0.0010166168212890625,
0.063232421875,
-0.029541015625,
-0.0207061767578125,
0.049957275390625,
0.043792724609375,
-0.0152435302734375,
-0.0135040283203125,
-0.0350341796875,
-0.006542205810546875,
-0.0175628662109375,
0.06591796875,
-0.0012760162353515625,
-0.05255126953125,
-0.0192413330078125,
0.017913818359375,
0.0567626953125,
-0.0240020751953125,
-0.033538818359375,
0.02850341796875,
-0.0233917236328125,
-0.01126861572265625,
0.055755615234375,
-0.0506591796875,
0.0142669677734375,
0.023040771484375,
-0.0226593017578125,
0.01039886474609375,
0.0185546875,
-0.12188720703125,
-0.06927490234375,
-0.0065155029296875,
0.01378631591796875,
0.041778564453125,
-0.02264404296875,
0.00447845458984375,
-0.0294189453125,
0.0185089111328125,
0.0021915435791015625,
0.0036792755126953125,
0.0545654296875,
0.01526641845703125,
-0.0347900390625,
0.006580352783203125,
-0.0301513671875,
-0.00848388671875,
-0.06793212890625,
-0.06414794921875,
-0.047515869140625,
-0.0018510818481445312,
0.0014410018920898438,
-0.0073699951171875,
0.024749755859375,
0.01100921630859375,
-0.06304931640625,
0.047698974609375,
0.041748046875,
0.033203125,
-0.03741455078125,
0.0218658447265625,
0.0306396484375,
-0.040191650390625,
0.0055999755859375,
0.0213775634765625,
0.02886962890625,
-0.01023101806640625,
0.0245208740234375,
-0.022491455078125,
-0.0188140869140625,
-0.040496826171875,
-0.0190277099609375,
0.00717926025390625,
0.04803466796875,
-0.0091552734375,
0.03533935546875,
-0.02880859375,
-0.0026264190673828125,
-0.039581298828125,
0.0217132568359375,
-0.08026123046875,
0.017547607421875,
-0.0240631103515625,
-0.01409149169921875,
0.037353515625,
-0.01129913330078125,
-0.0021305084228515625,
0.00615692138671875,
-0.0213775634765625,
0.0279541015625,
0.015228271484375,
-0.0443115234375,
0.04278564453125,
0.07373046875,
0.00580596923828125,
0.031829833984375,
0.0008707046508789062,
-0.007282257080078125,
0.0140380859375,
-0.01503753662109375,
-0.0003821849822998047,
0.0413818359375,
0.05523681640625,
0.00485992431640625,
0.0151824951171875,
0.0450439453125,
-0.019195556640625,
0.0183258056640625,
0.049652099609375,
0.08319091796875,
-0.07757568359375,
0.004070281982421875,
0.043182373046875,
0.021514892578125,
0.045989990234375,
0.0006337165832519531,
-0.0086822509765625,
-0.035675048828125,
0.03717041015625,
0.01020050048828125,
-0.0123138427734375,
0.006805419921875,
0.01837158203125,
-0.0166778564453125,
-0.0284423828125,
-0.000024437904357910156,
-0.01502227783203125,
0.015380859375,
-0.0144195556640625,
-0.02301025390625,
-0.027618408203125,
-0.01461029052734375,
-0.006343841552734375,
0.0040740966796875,
-0.050048828125,
-0.067626953125,
-0.0198974609375,
0.00008314847946166992,
-0.0291900634765625,
0.0252532958984375,
0.0152435302734375,
-0.0316162109375,
0.031341552734375,
-0.02703857421875,
0.0290679931640625,
-0.0213165283203125,
-0.0159149169921875,
0.001621246337890625,
-0.004871368408203125,
0.04827880859375,
-0.003505706787109375,
-0.055328369140625,
0.0157928466796875,
-0.0201873779296875,
-0.00975799560546875,
-0.01045989990234375,
0.0113677978515625,
0.11590576171875,
-0.06304931640625,
-0.01512908935546875,
0.026947021484375,
-0.0025806427001953125,
-0.007518768310546875,
-0.0175018310546875,
0.07537841796875,
-0.04681396484375,
-0.01090240478515625,
0.0258026123046875,
0.0085601806640625,
-0.035003662109375,
-0.007442474365234375,
-0.058258056640625,
0.0777587890625,
-0.0565185546875,
0.05621337890625,
0.0218658447265625,
0.0224151611328125,
0.0272674560546875,
0.0160980224609375,
0.0005331039428710938,
0.046142578125,
0.033447265625,
-0.003749847412109375,
-0.003002166748046875,
0.005229949951171875,
0.01013946533203125,
0.01715087890625,
0.0143585205078125,
0.008209228515625,
0.0124359130859375,
0.0295867919921875,
0.06689453125,
0.051300048828125,
0.0133056640625,
-0.006504058837890625,
-0.017974853515625,
-0.0253753662109375,
-0.006679534912109375,
-0.030731201171875,
0.0261383056640625,
-0.06158447265625,
-0.017608642578125,
-0.00647735595703125,
0.0248565673828125,
0.0263214111328125,
0.02783203125,
0.011993408203125,
-0.01367950439453125,
0.006145477294921875,
0.027069091796875,
-0.024078369140625,
-0.030975341796875,
0.01442718505859375,
-0.0267181396484375,
-0.0187530517578125,
-0.004177093505859375,
-0.0206146240234375,
0.031097412109375,
0.017913818359375,
0.02313232421875,
-0.055694580078125,
0.005764007568359375,
-0.0029144287109375,
-0.045196533203125,
-0.01404571533203125,
0.052520751953125,
-0.07794189453125,
0.00226593017578125,
0.0201263427734375,
0.0243988037109375,
-0.023284912109375,
-0.01568603515625,
0.01458740234375,
0.0125885009765625,
-0.00833892822265625,
-0.050537109375,
0.0207977294921875,
0.0191192626953125,
0.0036182403564453125,
0.0143890380859375,
0.040618896484375,
-0.037078857421875,
0.0016384124755859375,
-0.023712158203125,
0.015533447265625,
0.041839599609375,
-0.01560211181640625,
-0.002288818359375,
0.0274810791015625,
-0.01300048828125,
0.046661376953125,
-0.040802001953125,
0.0323486328125,
0.01434326171875,
0.029022216796875,
-0.01129150390625,
0.04925537109375,
0.005558013916015625,
-0.00946044921875,
-0.0199737548828125,
0.0204010009765625,
-0.01544189453125,
0.0261688232421875,
-0.05413818359375,
-0.04248046875,
-0.020965576171875,
0.04058837890625,
0.001804351806640625,
-0.0113677978515625,
0.0316162109375,
0.0055084228515625,
-0.038848876953125,
-0.005702972412109375,
-0.0056915283203125,
-0.03668212890625,
-0.036895751953125,
-0.023162841796875,
-0.0169830322265625,
0.0095672607421875,
0.0007586479187011719,
0.0131683349609375,
0.003082275390625,
0.0274658203125,
0.0060882568359375,
-0.016143798828125,
0.017120361328125,
-0.025421142578125,
-0.013092041015625,
0.017547607421875,
-0.0182037353515625,
0.034332275390625,
-0.053955078125,
-0.023284912109375,
-0.0179901123046875,
0.01885986328125,
0.021575927734375,
0.0247344970703125,
-0.0175933837890625,
0.0523681640625,
0.0175018310546875,
0.0014028549194335938,
-0.032989501953125,
0.0027294158935546875,
0.016021728515625,
0.004795074462890625,
0.018798828125,
0.0253143310546875,
-0.044891357421875,
-0.0212249755859375,
-0.0241851806640625,
0.0259857177734375,
-0.002109527587890625,
0.0296630859375,
-0.000713348388671875,
0.021575927734375,
-0.022552490234375,
-0.00231170654296875,
-0.0160369873046875,
-0.00754547119140625,
-0.0218658447265625,
0.0168914794921875,
0.012847900390625,
-0.007152557373046875,
-0.0372314453125,
0.0245361328125,
0.043548583984375,
-0.03619384765625,
0.032318115234375,
0.03369140625,
-0.00015687942504882812,
-0.05584716796875,
0.0120086669921875,
-0.01541900634765625,
-0.01474761962890625,
-0.005298614501953125,
0.0005674362182617188,
0.020721435546875,
0.0163421630859375,
-0.01812744140625,
0.0008940696716308594,
0.00490570068359375,
-0.020050048828125,
0.0389404296875,
-0.01062774658203125,
0.051239013671875,
0.0299072265625,
-0.0270233154296875,
-0.0041046142578125,
0.03521728515625,
0.01393890380859375,
0.01311492919921875,
0.0307159423828125,
-0.011138916015625,
0.049041748046875,
-0.01209259033203125,
0.0460205078125,
0.0322265625,
0.05047607421875,
0.01226806640625,
0.0009965896606445312,
0.038970947265625,
-0.0168304443359375,
-0.0272979736328125,
-0.016571044921875,
-0.022796630859375,
-0.048583984375,
-0.00025725364685058594,
0.0305023193359375,
-0.0231781005859375,
-0.0286102294921875,
-0.079345703125,
0.020904541015625,
0.031890869140625,
0.0161285400390625,
-0.08599853515625,
0.0548095703125,
-0.0352783203125,
0.032135009765625,
-0.0021190643310546875,
0.03533935546875,
-0.042022705078125,
-0.045654296875,
-0.01326751708984375,
-0.0299530029296875,
-0.05255126953125,
0.074951171875,
-0.016845703125,
-0.0328369140625,
0.002643585205078125,
0.0179595947265625,
0.0272369384765625,
-0.05133056640625,
-0.0129241943359375,
-0.001956939697265625,
-0.0260009765625,
-0.01047515869140625,
0.0008320808410644531,
0.0170745849609375,
-0.0245208740234375,
-0.025726318359375,
-0.00501251220703125,
-0.017974853515625,
0.0146331787109375,
-0.0267333984375,
-0.00490570068359375,
-0.00466156005859375,
-0.046630859375,
-0.049560546875,
0.00255584716796875,
0.0151214599609375,
-0.034210205078125,
0.020782470703125,
0.0197906494140625,
-0.0011997222900390625,
-0.0159759521484375,
0.0022792816162109375,
-0.0163421630859375,
0.00525665283203125,
-0.0191802978515625,
-0.00803375244140625,
0.0276336669921875,
-0.007556915283203125,
-0.004917144775390625,
-0.04571533203125,
0.021575927734375,
0.01446533203125,
0.0080413818359375,
-0.0001589059829711914,
-0.00106048583984375,
0.01517486572265625,
0.01258087158203125,
-0.036895751953125,
0.002887725830078125,
0.00029397010803222656,
0.0110321044921875,
-0.019622802734375,
0.00615692138671875,
-0.01605224609375,
0.006435394287109375,
0.08709716796875,
0.04547119140625,
0.0285186767578125,
-0.0290679931640625,
-0.0226287841796875,
-0.023101806640625,
0.0286407470703125,
-0.01568603515625,
0.00577545166015625,
-0.055999755859375,
-0.0177459716796875,
0.01093292236328125,
-0.0206756591796875,
-0.0238189697265625,
0.0021305084228515625,
-0.040191650390625,
-0.003337860107421875,
-0.01306915283203125,
-0.003047943115234375,
-0.0245819091796875,
-0.041107177734375,
-0.0033626556396484375,
-0.0257720947265625,
-0.0186004638671875,
-0.0192718505859375,
0.034942626953125,
-0.0226593017578125,
0.015869140625,
-0.010589599609375,
-0.0267333984375,
-0.0361328125,
0.03472900390625,
-0.01552581787109375,
0.0247650146484375,
-0.0609130859375,
-0.0208587646484375,
-0.0243682861328125,
-0.0034236907958984375,
0.003963470458984375,
-0.01158905029296875,
-0.006031036376953125,
-0.0071258544921875,
-0.0008492469787597656,
0.016632080078125,
0.00754547119140625,
0.0482177734375,
0.0007610321044921875,
0.038482666015625,
0.046966552734375,
-0.03521728515625,
0.078857421875,
-0.058929443359375,
-0.01108551025390625,
0.0094757080078125,
-0.020416259765625,
-0.10150146484375,
0.050872802734375,
-0.01837158203125,
0.0318603515625,
0.043243408203125
]
|
5a1671c2d94cb77e880ccb94a79f5cf7f2db6651 | Wordpress Stackexchange
Q: Exclude posts that only have the 'Uncategorized' category I want to exclude posts that only have the Uncategorized category (i.e. category id 1), but if a post is (erroneously) categorised as "Uncategorized" but also has other categories, I want to include it.
Every solution I've found so far excludes all posts with the Uncategorized category, whether they have other categories or not. I've tried:
'category__not_in' => array('1')
and
'cat' => -1
in the query arguments but I'm not getting the results I need. Is there a way around this?
A: Working off of Pieter Goosen's answer to this question, the way around this is to create a list of all the categories except the one you want to exclude, then search for posts that include them. That way, if a post has the excluded category but also other categories, it'll be included. So, in my case:
$args = array ('exclude'=>1,'fields'=>'ids');
$exclude_uncategorized = get_terms('category',$args);
and then include the following in the $args for the wp_query:
'category__in' => $exclude_uncategorized,
| Q: Exclude posts that only have the 'Uncategorized' category I want to exclude posts that only have the Uncategorized category (i.e. category id 1), but if a post is (erroneously) categorised as "Uncategorized" but also has other categories, I want to include it.
Every solution I've found so far excludes all posts with the Uncategorized category, whether they have other categories or not. I've tried:
'category__not_in' => array('1')
and
'cat' => -1
in the query arguments but I'm not getting the results I need. Is there a way around this?
A: Working off of Pieter Goosen's answer to this question, the way around this is to create a list of all the categories except the one you want to exclude, then search for posts that include them. That way, if a post has the excluded category but also other categories, it'll be included. So, in my case:
$args = array ('exclude'=>1,'fields'=>'ids');
$exclude_uncategorized = get_terms('category',$args);
and then include the following in the $args for the wp_query:
'category__in' => $exclude_uncategorized,
| wordpress | {
"language": "en",
"length": 168,
"provenance": "stackexchange_00019.jsonl.gz:456098",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/190180"
} | [
0.0428466796875,
0.01220703125,
-0.012481689453125,
-0.0153656005859375,
0.031829833984375,
-0.0389404296875,
0.049163818359375,
-0.043304443359375,
-0.03375244140625,
0.022857666015625,
-0.028350830078125,
0.019439697265625,
-0.016998291015625,
-0.0008349418640136719,
0.00759124755859375,
-0.03369140625,
0.00725555419921875,
0.00630950927734375,
0.0193939208984375,
-0.0282135009765625,
0.0230255126953125,
-0.021270751953125,
0.019683837890625,
0.03558349609375,
0.0160064697265625,
-0.0165252685546875,
0.0347900390625,
-0.0244140625,
-0.006656646728515625,
-0.031341552734375,
0.02630615234375,
0.0192413330078125,
0.0133819580078125,
0.01273345947265625,
-0.007781982421875,
-0.00347137451171875,
-0.052703857421875,
0.0146942138671875,
0.023040771484375,
-0.00688934326171875,
0.019317626953125,
-0.0204925537109375,
0.00812530517578125,
0.029266357421875,
-0.005916595458984375,
-0.0264739990234375,
0.0276947021484375,
-0.0276031494140625,
0.01041412353515625,
-0.06060791015625,
0.00890350341796875,
0.0209808349609375,
0.047821044921875,
-0.06640625,
-0.0135955810546875,
0.035003662109375,
-0.0021686553955078125,
0.0173187255859375,
0.056610107421875,
0.002552032470703125,
-0.055023193359375,
-0.02386474609375,
0.01496124267578125,
-0.058319091796875,
-0.01171875,
0.01922607421875,
0.033203125,
-0.005001068115234375,
-0.049102783203125,
-0.01107025146484375,
0.057464599609375,
-0.041259765625,
0.00174713134765625,
0.013580322265625,
-0.0545654296875,
-0.0192718505859375,
0.038726806640625,
0.00870513916015625,
0.01446533203125,
-0.01454925537109375,
0.0071563720703125,
0.007656097412109375,
-0.027130126953125,
-0.012298583984375,
0.0185394287109375,
0.0077972412109375,
-0.008819580078125,
-0.0250244140625,
-0.0374755859375,
-0.0010213851928710938,
-0.00707244873046875,
-0.015167236328125,
-0.09625244140625,
0.057861328125,
0.04388427734375,
-0.002532958984375,
0.024688720703125,
0.058074951171875,
-0.01194000244140625,
-0.00943756103515625,
-0.0311126708984375,
-0.026611328125,
-0.0208740234375,
-0.030120849609375,
0.03240966796875,
0.03729248046875,
-0.018524169921875,
0.006244659423828125,
0.0662841796875,
0.0260772705078125,
0.0160675048828125,
0.038330078125,
-0.00855255126953125,
-0.0175323486328125,
-0.0372314453125,
0.01483917236328125,
-0.02130126953125,
0.004238128662109375,
-0.005077362060546875,
0.012939453125,
0.0018091201782226562,
0.0285491943359375,
0.000006794929504394531,
-0.04541015625,
0.01129913330078125,
0.00012010335922241211,
-0.018585205078125,
-0.023193359375,
0.0308685302734375,
-0.0347900390625,
-0.046356201171875,
0.035614013671875,
0.0789794921875,
0.0262908935546875,
0.01035308837890625,
-0.005764007568359375,
0.0249481201171875,
0.0010318756103515625,
0.024017333984375,
-0.002414703369140625,
0.024627685546875,
-0.030242919921875,
0.006404876708984375,
0.0145721435546875,
0.01629638671875,
0.032623291015625,
0.0130462646484375,
0.00467681884765625,
0.0196075439453125,
-0.050079345703125,
0.02459716796875,
-0.0260467529296875,
0.05810546875,
0.017547607421875,
-0.05010986328125,
0.0004303455352783203,
0.04010009765625,
-0.047454833984375,
-0.051910400390625,
-0.0802001953125,
0.060333251953125,
0.0013933181762695312,
-0.0249176025390625,
0.0059661865234375,
-0.0238494873046875,
0.0026035308837890625,
-0.040740966796875,
-0.01233673095703125,
0.015838623046875,
0.01434326171875,
0.0036449432373046875,
-0.018890380859375,
0.0345458984375,
0.000732421875,
-0.00914764404296875,
0.003726959228515625,
-0.046112060546875,
-0.004291534423828125,
0.021331787109375,
0.052032470703125,
0.024200439453125,
-0.03387451171875,
-0.014617919921875,
0.04986572265625,
-0.06207275390625,
0.05596923828125,
0.02020263671875,
0.068603515625,
-0.025299072265625,
0.00644683837890625,
0.060546875,
0.0638427734375,
-0.03125,
0.0034046173095703125,
-0.0079498291015625,
-0.05242919921875,
-0.031463623046875,
-0.032135009765625,
-0.01363372802734375,
0.04058837890625,
0.044189453125,
-0.04443359375,
0.0203857421875,
-0.0173797607421875,
-0.05950927734375,
-0.021026611328125,
-0.014434814453125,
0.01470947265625,
-0.038604736328125,
0.0162811279296875,
0.03643798828125,
-0.013641357421875,
-0.020721435546875,
0.0008072853088378906,
-0.0001418590545654297,
-0.021881103515625,
-0.00518798828125,
0.0170745849609375,
-0.0037860870361328125,
-0.00696563720703125,
0.0282745361328125,
-0.0185546875,
0.016204833984375,
0.046112060546875,
0.0965576171875,
0.01519012451171875,
-0.0190582275390625,
-0.034881591796875,
0.05511474609375,
0.0234222412109375,
-0.10369873046875,
0.035614013671875,
0.04461669921875,
0.0572509765625,
-0.0304107666015625,
0.00920867919921875,
0.01605224609375,
0.02484130859375,
-0.0114288330078125,
0.0263519287109375,
0.023468017578125,
0.01107025146484375,
-0.0150146484375,
-0.0099945068359375,
0.03656005859375,
-0.045989990234375,
0.0011005401611328125,
-0.0090484619140625,
0.0010461807250976562,
0.048126220703125,
0.06494140625,
0.0261993408203125,
0.0007891654968261719,
0.05804443359375,
0.035308837890625,
-0.006381988525390625,
-0.004009246826171875,
0.00139617919921875,
-0.019287109375,
0.0011568069458007812,
0.007511138916015625,
-0.0242156982421875,
-0.034576416015625,
-0.016815185546875,
0.0648193359375,
-0.036041259765625,
0.01143646240234375,
-0.000022172927856445312,
-0.041778564453125,
0.0049896240234375,
0.0217132568359375,
-0.0196990966796875,
-0.00701141357421875,
0.0266571044921875,
0.002574920654296875,
0.046051025390625,
-0.05743408203125,
0.0152587890625,
0.0350341796875,
0.027984619140625,
-0.0177154541015625,
0.040496826171875,
0.057464599609375,
-0.01000213623046875,
-0.0311126708984375,
-0.07379150390625,
0.03289794921875,
-0.0175628662109375,
-0.0361328125,
-0.04248046875,
-0.01104736328125,
0.037811279296875,
-0.0093841552734375,
0.005268096923828125,
0.022308349609375,
-0.0017061233520507812,
-0.0184478759765625,
-0.029754638671875,
0.04278564453125,
-0.036529541015625,
-0.0067291259765625,
0.0604248046875,
-0.0012187957763671875,
-0.00778961181640625,
0.013702392578125,
-0.01273345947265625,
0.01090240478515625,
0.007904052734375,
-0.00585174560546875,
-0.004253387451171875,
-0.04876708984375,
0.008880615234375,
0.0233001708984375,
0.03057861328125,
0.018707275390625,
-0.017578125,
0.02471923828125,
0.0283203125,
-0.030731201171875,
-0.055633544921875,
0.017669677734375,
-0.00801849365234375,
-0.010101318359375,
0.0056610107421875,
-0.00852203369140625,
-0.02569580078125,
0.0036602020263671875,
-0.0148773193359375,
0.039093017578125,
-0.0242156982421875,
-0.07769775390625,
-0.0199737548828125,
-0.07000732421875,
0.0118255615234375,
-0.007904052734375,
0.0155029296875,
0.005428314208984375,
0.09222412109375,
0.0216217041015625,
-0.068359375,
-0.002040863037109375,
0.0272369384765625,
-0.023193359375,
0.0192718505859375,
0.00394439697265625,
0.0494384765625,
-0.01800537109375,
0.029266357421875,
0.023834228515625,
0.00783538818359375,
-0.036865234375,
-0.029296875,
-0.00957489013671875,
0.02655029296875,
0.021881103515625,
-0.00716400146484375,
0.0082244873046875,
0.0250091552734375,
0.00157928466796875,
-0.0285186767578125,
-0.006450653076171875,
-0.040435791015625,
-0.04119873046875,
-0.01529693603515625,
0.0226287841796875,
0.01116180419921875,
-0.044464111328125,
-0.0023403167724609375,
0.006832122802734375,
-0.0004839897155761719,
-0.020538330078125,
-0.0147247314453125,
0.04376220703125,
0.012542724609375,
0.020538330078125,
0.00710296630859375,
-0.0156097412109375,
-0.053070068359375,
0.01068878173828125,
-0.0281524658203125,
-0.010498046875,
-0.024688720703125,
-0.00855255126953125,
-0.04095458984375,
-0.017974853515625,
0.03466796875,
-0.0189208984375,
0.0134735107421875,
-0.01248931884765625,
-0.0205230712890625,
-0.0037841796875,
0.0728759765625,
-0.0203704833984375,
-0.040069580078125,
-0.04400634765625,
0.0252685546875,
0.01568603515625,
-0.05816650390625,
0.053558349609375,
-0.0372314453125,
-0.05010986328125,
-0.01059722900390625,
-0.0251617431640625,
-0.0171051025390625,
-0.0139923095703125,
0.01155853271484375,
-0.02032470703125,
-0.03399658203125,
0.032073974609375,
-0.03857421875,
0.049346923828125,
-0.0084075927734375,
0.043975830078125,
-0.038055419921875,
-0.027252197265625,
-0.0081939697265625,
-0.041595458984375,
0.028717041015625,
-0.021453857421875,
-0.026336669921875,
-0.029144287109375,
0.052398681640625,
-0.041839599609375,
0.001384735107421875,
-0.0064544677734375,
-0.019927978515625,
-0.0102996826171875,
0.015716552734375,
-0.0311126708984375,
0.037384033203125,
-0.0209503173828125,
-0.0006742477416992188,
-0.006381988525390625,
-0.002960205078125,
0.00554656982421875,
0.050750732421875,
-0.0245819091796875,
0.004573822021484375,
-0.01552581787109375,
-0.0177154541015625,
-0.03973388671875,
-0.038543701171875,
-0.0167083740234375,
0.00478363037109375,
-0.003261566162109375,
-0.002124786376953125,
-0.03594970703125,
-0.0251617431640625,
0.046234130859375,
0.063720703125,
0.0036258697509765625,
0.0032405853271484375,
0.048065185546875,
0.00426483154296875,
-0.052520751953125,
-0.08392333984375,
-0.012847900390625,
0.0194549560546875,
-0.0147247314453125,
0.062164306640625,
0.0146026611328125,
-0.0223541259765625,
0.09625244140625,
-0.001735687255859375,
0.007610321044921875,
-0.029510498046875,
0.05938720703125,
-0.01259613037109375,
-0.033843994140625,
0.028106689453125,
-0.037261962890625,
0.0224609375,
0.00836944580078125,
0.0016460418701171875,
-0.019317626953125,
0.01873779296875,
0.0301666259765625,
0.0051116943359375,
-0.02789306640625,
-0.03521728515625,
0.0006146430969238281,
-0.0050201416015625,
0.027862548828125,
0.035308837890625,
0.058135986328125,
-0.00678253173828125,
0.0080718994140625,
0.02093505859375,
0.0234832763671875,
0.000759124755859375,
0.014984130859375,
-0.041107177734375,
0.03582763671875,
0.00048351287841796875,
-0.0065155029296875,
0.00200653076171875,
0.0004515647888183594,
-0.0004603862762451172,
-0.020233154296875,
-0.0487060546875,
-0.022125244140625,
-0.0112152099609375,
-0.0016012191772460938,
0.0260009765625,
-0.0020236968994140625,
0.0311431884765625,
-0.00763702392578125,
-0.0027637481689453125,
0.002696990966796875,
-0.0343017578125,
-0.053192138671875,
-0.036346435546875,
0.0047149658203125,
-0.0021152496337890625,
-0.007106781005859375,
0.042022705078125,
0.01073455810546875,
0.00739288330078125,
0.037139892578125,
-0.031524658203125,
0.02337646484375,
0.00606536865234375,
0.0518798828125,
0.009490966796875,
-0.0077667236328125,
-0.01837158203125,
0.02783203125,
-0.0036773681640625,
-0.049835205078125,
-0.020172119140625,
0.015899658203125,
0.0008358955383300781,
-0.040985107421875,
-0.033538818359375,
0.05657958984375,
0.028778076171875,
-0.026214599609375,
0.0186614990234375,
0.025390625,
0.0052032470703125,
-0.036834716796875,
-0.016845703125,
0.0260772705078125,
0.0247955322265625,
-0.01068115234375,
0.034820556640625,
-0.044189453125,
-0.023468017578125,
0.05133056640625,
-0.046875,
-0.02130126953125,
0.0094146728515625,
-0.0266876220703125,
-0.03851318359375,
-0.011444091796875,
0.00830078125,
-0.01361083984375,
0.007205963134765625,
-0.00998687744140625,
-0.0036067962646484375,
-0.00969696044921875,
0.056976318359375,
-0.02581787109375,
-0.0259552001953125,
0.03466796875,
0.002166748046875,
0.045562744140625,
0.025146484375,
-0.02783203125,
0.0022258758544921875,
-0.048004150390625,
-0.0228729248046875,
0.0006103515625,
-0.01305389404296875,
-0.047088623046875,
-0.0131988525390625,
0.00736236572265625,
0.0181427001953125,
-0.00592803955078125,
-0.00885772705078125,
-0.00890350341796875,
0.0157928466796875,
-0.001613616943359375,
0.0098876953125,
-0.03900146484375,
0.025421142578125,
0.004283905029296875,
0.003498077392578125,
-0.0401611328125,
-0.017730712890625,
0.021240234375,
-0.0028171539306640625,
-0.0235137939453125,
-0.09820556640625,
0.02423095703125,
0.0299530029296875,
-0.0260009765625,
0.0298614501953125,
0.0017728805541992188,
0.0261688232421875,
0.00215911865234375,
-0.007904052734375,
0.0022258758544921875,
0.001911163330078125,
-0.002552032470703125,
0.0245208740234375,
0.0137939453125,
0.035247802734375,
-0.0002741813659667969,
0.02032470703125,
-0.039642333984375,
0.00925445556640625,
-0.017669677734375,
-0.0178375244140625,
-0.0004162788391113281,
-0.00408172607421875,
-0.007244110107421875,
0.031829833984375,
0.0135650634765625,
0.00036716461181640625,
0.005008697509765625,
0.0290679931640625,
0.0051116943359375,
-0.056732177734375,
-0.05047607421875,
0.00394439697265625,
0.0055389404296875,
0.031402587890625,
-0.00719451904296875,
-0.0026912689208984375,
0.04547119140625,
-0.033203125,
-0.030487060546875,
0.038726806640625,
0.019561767578125,
-0.040435791015625,
-0.00682830810546875,
0.0099334716796875,
-0.004825592041015625,
-0.0204620361328125,
0.00225067138671875,
-0.0164947509765625,
-0.016845703125,
0.0080108642578125,
-0.023468017578125,
-0.034912109375,
-0.01023101806640625,
0.00010138750076293945,
-0.0164947509765625,
-0.01256561279296875,
-0.012298583984375,
0.01020050048828125,
-0.036468505859375,
0.032073974609375,
0.0305328369140625,
-0.004093170166015625,
-0.01105499267578125,
-0.01551055908203125,
0.016815185546875,
-0.04150390625,
-0.0753173828125,
0.030792236328125,
0.00130462646484375,
0.00760650634765625,
0.010772705078125,
-0.0274505615234375,
0.0176544189453125,
0.049346923828125,
-0.016998291015625,
-0.0012731552124023438,
0.022796630859375,
-0.0279693603515625,
0.0233001708984375,
0.0017843246459960938,
0.00478363037109375,
0.055450439453125,
-0.0458984375,
0.007537841796875,
0.0008435249328613281,
0.01561737060546875,
-0.00853729248046875,
-0.02105712890625,
0.0672607421875,
-0.07012939453125,
-0.0003724098205566406,
-0.0123291015625,
0.05364990234375,
0.033721923828125,
-0.00930023193359375,
0.01183319091796875,
-0.0122528076171875,
0.0272979736328125,
-0.003482818603515625,
0.033538818359375,
-0.028228759765625,
-0.01117706298828125,
-0.0816650390625,
0.043121337890625,
0.014923095703125,
0.068115234375,
0.00794219970703125,
-0.006526947021484375,
0.0081787109375,
-0.0189666748046875,
-0.03228759765625,
0.0762939453125,
0.0209503173828125,
0.03753662109375,
-0.035491943359375,
-0.0006427764892578125,
0.0210418701171875,
0.0289306640625,
0.0738525390625,
0.016204833984375,
-0.0304718017578125,
-0.0017690658569335938,
0.04022216796875,
0.062286376953125,
0.00782012939453125,
0.024658203125,
0.018218994140625,
-0.034759521484375,
0.006053924560546875,
0.0325927734375,
0.0458984375,
-0.0247650146484375,
-0.0231475830078125,
0.0321044921875,
0.01605224609375,
0.0313720703125,
0.005252838134765625,
0.0202484130859375,
0.01061248779296875,
-0.0156707763671875,
-0.00731658935546875,
-0.005168914794921875,
0.005527496337890625,
0.0267791748046875,
0.03369140625,
-0.0811767578125,
-0.00033855438232421875,
-0.050750732421875,
0.0635986328125,
0.00982666015625,
0.04852294921875,
0.0168304443359375,
0.01522064208984375,
0.0947265625,
-0.0197601318359375,
0.0195770263671875,
-0.00006753206253051758,
-0.0213775634765625,
0.033905029296875,
0.060089111328125,
0.036376953125,
0.010986328125,
0.00494384765625,
0.05047607421875,
0.040496826171875,
-0.0287933349609375,
-0.0287628173828125,
0.0227508544921875,
0.030120849609375,
-0.009429931640625,
-0.00013768672943115234,
0.01338958740234375,
0.0026378631591796875,
0.03594970703125,
-0.064208984375,
0.0239410400390625,
0.055206298828125,
0.052642822265625,
-0.0125579833984375,
-0.0537109375,
-0.0638427734375,
0.01314544677734375,
-0.0364990234375,
0.0309906005859375,
0.00782012939453125,
0.048980712890625,
0.0155181884765625,
0.03106689453125,
-0.036468505859375,
-0.02557373046875,
0.0008482933044433594,
0.0205535888671875,
-0.020050048828125,
-0.00533294677734375,
0.01125335693359375,
-0.031585693359375,
-0.026947021484375,
0.004161834716796875,
-0.0169525146484375,
-0.044189453125,
0.0172119140625,
0.0906982421875,
-0.0132904052734375,
-0.043914794921875,
0.0452880859375,
0.00470733642578125,
-0.02362060546875,
-0.044769287109375,
0.0199432373046875,
0.04803466796875,
0.016021728515625,
0.0227813720703125,
0.0276947021484375,
0.050048828125,
0.0036258697509765625,
0.0183258056640625,
0.01343536376953125,
-0.039459228515625,
0.0116119384765625,
0.0179290771484375,
0.055084228515625,
0.0389404296875,
-0.061737060546875,
-0.031219482421875,
-0.0073699951171875,
-0.0205841064453125,
0.01898193359375,
0.02825927734375,
-0.0291748046875,
0.0400390625,
0.0506591796875,
-0.0380859375,
-0.0163726806640625,
0.037506103515625,
0.011810302734375,
-0.036346435546875,
0.02099609375,
-0.0150299072265625,
-0.024078369140625,
-0.01190185546875,
0.01482391357421875,
0.04071044921875,
0.0181732177734375,
0.00901031494140625,
0.00426483154296875,
0.013641357421875,
-0.0247955322265625,
0.060455322265625,
-0.08099365234375,
-0.038360595703125,
0.029327392578125,
-0.031402587890625,
0.0092010498046875,
0.019134521484375,
0.02276611328125,
-0.017120361328125,
0.05706787109375,
-0.04736328125,
0.006946563720703125,
-0.037811279296875,
0.0194091796875,
-0.053192138671875,
0.0697021484375,
-0.0175933837890625,
-0.0137939453125,
-0.0693359375,
-0.04119873046875,
0.04052734375,
0.0294189453125,
0.0166473388671875,
-0.013031005859375,
-0.01824951171875,
-0.0070648193359375,
0.00445556640625,
0.0299835205078125,
-0.0262451171875,
0.0269775390625,
-0.0008935928344726562,
0.0271148681640625,
0.045074462890625,
-0.0018835067749023438,
0.0126953125,
0.043731689453125,
-0.035675048828125,
0.046905517578125,
-0.031585693359375,
-0.03375244140625,
0.0557861328125,
0.04571533203125,
0.0007433891296386719,
0.0186920166015625,
-0.0020885467529296875,
-0.040435791015625,
-0.0228118896484375,
0.0014295578002929688,
-0.042144775390625,
-0.034515380859375,
-0.0106048583984375,
-0.021240234375,
-0.01395416259765625,
-0.0880126953125,
-0.0246429443359375,
-0.004791259765625,
0.0109710693359375,
-0.0029621124267578125,
-0.019256591796875,
0.0439453125,
-0.040863037109375,
-0.00473785400390625,
-0.032623291015625,
0.0278472900390625,
-0.01265716552734375,
0.00251007080078125,
-0.048492431640625,
0.0030498504638671875,
-0.01496124267578125,
0.0164642333984375,
0.0047607421875,
0.01050567626953125,
0.0252685546875,
-0.01100921630859375,
-0.0213775634765625,
0.01520538330078125,
0.002193450927734375,
0.05206298828125,
-0.004383087158203125,
-0.0137939453125,
-0.0243377685546875,
0.031036376953125,
-0.029632568359375,
0.0005950927734375,
0.03680419921875,
-0.01381683349609375,
-0.032958984375,
-0.01165008544921875,
0.0011415481567382812,
0.01456451416015625,
-0.0222320556640625,
-0.06622314453125,
0.0599365234375,
-0.0188446044921875,
-0.023895263671875,
-0.038421630859375,
0.0506591796875,
-0.01154327392578125,
0.036712646484375,
-0.004703521728515625,
-0.00909423828125,
0.01390838623046875,
-0.00189208984375,
0.0309295654296875,
-0.0158843994140625,
0.036834716796875,
-0.015899658203125,
-0.0633544921875,
0.00698089599609375,
0.01273345947265625,
0.03558349609375,
-0.007427215576171875,
0.0030078887939453125,
0.0212249755859375,
0.04901123046875,
-0.0305023193359375,
-0.0233306884765625,
-0.01131439208984375,
-0.01071929931640625,
0.04144287109375,
-0.0295562744140625,
-0.093994140625,
-0.07208251953125,
0.042022705078125,
0.043365478515625,
0.04156494140625,
0.0089874267578125,
-0.046112060546875,
-0.07745361328125,
-0.004543304443359375,
-0.0115509033203125,
0.008575439453125,
-0.04876708984375,
0.0296478271484375,
0.018035888671875,
-0.0198822021484375,
0.014129638671875,
0.0214080810546875,
-0.03936767578125,
-0.006488800048828125,
-0.0098114013671875,
-0.024444580078125,
-0.053741455078125,
0.04791259765625,
-0.076171875,
0.009796142578125,
-0.0186614990234375,
-0.03558349609375,
-0.0175628662109375,
-0.0589599609375,
0.003261566162109375,
-0.0177154541015625,
-0.0147857666015625,
0.006519317626953125,
0.0262603759765625,
0.01568603515625,
0.017547607421875,
0.00844573974609375,
0.0129241943359375,
-0.041595458984375,
0.002567291259765625,
0.039825439453125,
-0.0010557174682617188,
-0.036407470703125,
-0.00479888916015625,
0.032867431640625,
-0.018646240234375,
0.00699615478515625,
-0.0239715576171875,
-0.015777587890625,
0.045684814453125,
0.0235443115234375,
-0.031463623046875,
0.059112548828125,
-0.03631591796875,
-0.0010194778442382812,
0.005695343017578125,
-0.01390838623046875,
-0.029388427734375,
0.0304412841796875,
0.002758026123046875,
0.0081634521484375,
0.0252685546875
]
|
ed71cba4767a87fadde050a7d0343346bee1f67b | Wordpress Stackexchange
Q: Get Parent Theme Author Name I want to to get the Author name of the Parent theme.
I can get the theme name using wp_get_theme() to get the theme object of the current (child) theme. From this I can get the parent theme name.
Next I think I need to get the object of the parent theme, but unsure how best to approach this. Here is my code so far:
$style_parent_theme = wp_get_theme();
$style_parent_theme_dir = $style_parent_theme->get( 'Template' );
$style_parent_theme_name = wp_get_theme($parent_theme_dir);
$style_parent_theme_author = $style_parent_theme_name->get( 'Author' );
if ($style_parent_theme_author == "WooThemes") {
A: Thanks for all the help which pointed me in the right direction. In the end I used the following:
$style_parent_theme = wp_get_theme(get_template());
$style_parent_theme_author = $style_parent_theme->get( 'Author' );
I use get_template() to recover the folder name of the parent theme.
wp_get_theme then get's the theme object.
Once we have that we can manipulate the object to get the author name.
| Q: Get Parent Theme Author Name I want to to get the Author name of the Parent theme.
I can get the theme name using wp_get_theme() to get the theme object of the current (child) theme. From this I can get the parent theme name.
Next I think I need to get the object of the parent theme, but unsure how best to approach this. Here is my code so far:
$style_parent_theme = wp_get_theme();
$style_parent_theme_dir = $style_parent_theme->get( 'Template' );
$style_parent_theme_name = wp_get_theme($parent_theme_dir);
$style_parent_theme_author = $style_parent_theme_name->get( 'Author' );
if ($style_parent_theme_author == "WooThemes") {
A: Thanks for all the help which pointed me in the right direction. In the end I used the following:
$style_parent_theme = wp_get_theme(get_template());
$style_parent_theme_author = $style_parent_theme->get( 'Author' );
I use get_template() to recover the folder name of the parent theme.
wp_get_theme then get's the theme object.
Once we have that we can manipulate the object to get the author name.
A: I was searching for getting the name of the parent theme and stumbled over this post.
I think the best solution is not mentioned here:
wp_get_theme()->parent()->get( 'Author' );
or what I needed:
wp_get_theme()->parent()->get( 'Name' )
A: Line 3 of your code reads:
$style_parent_theme_name = wp_get_theme($parent_theme_dir);
it should be:
$style_parent_theme_name = wp_get_theme($style_parent_theme_dir);
otherwise the code is correct.
A: You can get this value about the child theme. At first get your child theme date. The simplest way is the function wp_get_theme(), see codex for the parameters and more information. You get a object with all relevant information about the current theme. In step two check, if is a child theme and then get his parent information, like the follow source.
// Current WP_Theme object.
// Get this data via hook or class WP_Theme
// As wrapper, simple to sue is the function wp_get_theme()
$theme_data = wp_get_theme();
$is_child = $this->is_child( $theme_data );
if ( $is_child ) {
$parent_name = $theme_data->parent()->Name;
}
The method is_child is simple:
function is_child( $theme_data ) {
// For limitation of empty() write in var
$parent = $theme_data->parent();
if ( ! empty( $parent ) ) {
return TRUE;
}
return FALSE;
}
A: This works for me.
<?php
$my_theme = wp_get_theme('parentThemeName');
echo $my_theme->get( 'Author' );
?>
A: simple function
function show_theme_author(){
$theme = wp_get_theme();
return $theme->get('Author');
}
| wordpress | {
"language": "en",
"length": 372,
"provenance": "stackexchange_00019.jsonl.gz:456118",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/190248"
} | [
-0.019287109375,
-0.0217742919921875,
-0.0171356201171875,
-0.032501220703125,
-0.0389404296875,
0.0172119140625,
-0.0380859375,
0.004131317138671875,
-0.02239990234375,
0.0478515625,
0.01259613037109375,
0.0251007080078125,
-0.00806427001953125,
-0.0133819580078125,
-0.0036449432373046875,
-0.01325225830078125,
0.043182373046875,
-0.029388427734375,
0.038543701171875,
0.006664276123046875,
-0.0047454833984375,
0.03009033203125,
0.045745849609375,
0.018707275390625,
0.0548095703125,
-0.06427001953125,
0.0948486328125,
-0.00978851318359375,
0.037872314453125,
-0.01264190673828125,
0.038116455078125,
-0.03656005859375,
-0.00540924072265625,
0.029815673828125,
0.01366424560546875,
-0.0008611679077148438,
-0.0180816650390625,
0.0277862548828125,
0.037689208984375,
0.00030493736267089844,
0.007236480712890625,
0.01137542724609375,
-0.10565185546875,
0.047882080078125,
-0.08648681640625,
-0.056976318359375,
-0.03082275390625,
-0.005779266357421875,
0.00316619873046875,
0.01557159423828125,
0.016632080078125,
-0.0027599334716796875,
0.020538330078125,
-0.0137481689453125,
-0.024749755859375,
-0.032073974609375,
0.0310211181640625,
0.0045623779296875,
0.02850341796875,
-0.07403564453125,
-0.05572509765625,
0.0016231536865234375,
0.0460205078125,
0.0283203125,
0.026885986328125,
0.014434814453125,
0.00740814208984375,
0.0270538330078125,
0.0023021697998046875,
0.0333251953125,
0.01104736328125,
-0.02545166015625,
-0.0008301734924316406,
-0.0054168701171875,
-0.0084686279296875,
-0.06085205078125,
-0.0100555419921875,
-0.06646728515625,
0.0183868408203125,
0.018890380859375,
-0.022491455078125,
-0.0131988525390625,
-0.10028076171875,
0.003475189208984375,
0.0165557861328125,
0.03924560546875,
-0.0164794921875,
-0.0246124267578125,
-0.056182861328125,
-0.00348663330078125,
-0.034881591796875,
-0.05145263671875,
-0.025787353515625,
0.012176513671875,
0.0041961669921875,
-0.018218994140625,
0.04840087890625,
0.08404541015625,
-0.034423828125,
-0.0116119384765625,
-0.0099334716796875,
-0.03326416015625,
0.0099334716796875,
-0.031402587890625,
-0.008453369140625,
0.030120849609375,
0.0289764404296875,
0.0144500732421875,
0.01523590087890625,
0.024749755859375,
0.0023193359375,
0.0015134811401367188,
-0.002651214599609375,
-0.0175933837890625,
-0.0220184326171875,
0.03582763671875,
-0.016082763671875,
0.0012521743774414062,
0.004314422607421875,
0.0029811859130859375,
0.0084228515625,
0.0207977294921875,
0.01085662841796875,
-0.005435943603515625,
-0.01081085205078125,
-0.0051727294921875,
-0.04193115234375,
-0.01299285888671875,
0.0210723876953125,
0.005153656005859375,
-0.04522705078125,
-0.006771087646484375,
0.03680419921875,
0.0206146240234375,
0.0215606689453125,
-0.0257720947265625,
0.005855560302734375,
0.03436279296875,
0.01204681396484375,
-0.0289154052734375,
0.033721923828125,
-0.0024967193603515625,
0.0206756591796875,
0.007617950439453125,
-0.033905029296875,
0.008575439453125,
0.00870513916015625,
0.024505615234375,
-0.022705078125,
-0.029083251953125,
0.0153961181640625,
-0.01629638671875,
0.028289794921875,
0.0023632049560546875,
0.03466796875,
-0.034942626953125,
0.02276611328125,
-0.0283966064453125,
0.005741119384765625,
-0.03070068359375,
-0.0092010498046875,
-0.007419586181640625,
0.033905029296875,
0.011627197265625,
-0.00656890869140625,
0.00530242919921875,
-0.00885009765625,
-0.01221466064453125,
0.0150299072265625,
0.0026607513427734375,
0.04754638671875,
-0.042205810546875,
-0.01543426513671875,
0.01477813720703125,
0.003978729248046875,
0.022430419921875,
-0.024200439453125,
-0.0134429931640625,
0.0306243896484375,
0.047149658203125,
-0.001918792724609375,
-0.019195556640625,
-0.005084991455078125,
0.0137176513671875,
-0.0010700225830078125,
0.009307861328125,
0.006755828857421875,
0.02325439453125,
-0.0021457672119140625,
0.0111236572265625,
-0.0255889892578125,
0.020599365234375,
-0.04608154296875,
-0.01511383056640625,
0.00873565673828125,
0.03594970703125,
0.0003237724304199219,
0.0277099609375,
-0.0038661956787109375,
-0.01568603515625,
-0.0052337646484375,
-0.032623291015625,
0.043060302734375,
-0.043182373046875,
-0.0294342041015625,
-0.012908935546875,
-0.01337432861328125,
0.04205322265625,
0.007617950439453125,
0.031768798828125,
0.0051422119140625,
0.0006055831909179688,
-0.0226898193359375,
-0.0228424072265625,
-0.01169586181640625,
0.029205322265625,
0.00865936279296875,
0.02667236328125,
0.01520538330078125,
0.02362060546875,
0.016357421875,
0.00981903076171875,
0.01120758056640625,
0.02227783203125,
0.048095703125,
0.0043792724609375,
-0.0198974609375,
-0.00970458984375,
0.031829833984375,
0.0372314453125,
-0.050506591796875,
0.006778717041015625,
0.0289764404296875,
0.01059722900390625,
-0.01294708251953125,
0.0064849853515625,
0.032867431640625,
-0.06317138671875,
0.0080108642578125,
0.036651611328125,
0.03277587890625,
0.01401519775390625,
-0.019561767578125,
-0.0218658447265625,
0.0672607421875,
-0.035247802734375,
-0.0234222412109375,
0.002227783203125,
0.038909912109375,
0.0672607421875,
-0.0306854248046875,
-0.009429931640625,
0.01149749755859375,
-0.0667724609375,
0.0207977294921875,
0.0298004150390625,
-0.0236968994140625,
0.0025157928466796875,
-0.04449462890625,
0.038330078125,
0.002895355224609375,
-0.033660888671875,
-0.002506256103515625,
-0.02545166015625,
0.00862884521484375,
0.0150909423828125,
-0.007602691650390625,
-0.0170135498046875,
-0.045684814453125,
0.0182647705078125,
0.0245513916015625,
-0.007213592529296875,
0.0004775524139404297,
0.049713134765625,
-0.02142333984375,
-0.01751708984375,
0.0029621124267578125,
-0.0135498046875,
-0.0234527587890625,
0.0113372802734375,
-0.0120391845703125,
0.0159454345703125,
0.03155517578125,
-0.0004584789276123047,
-0.01129913330078125,
-0.043487548828125,
0.0361328125,
0.03875732421875,
0.0096893310546875,
0.027557373046875,
0.02001953125,
0.0626220703125,
-0.0177459716796875,
0.0487060546875,
-0.011993408203125,
0.0233306884765625,
0.03564453125,
-0.0207672119140625,
0.0439453125,
-0.00955963134765625,
0.01094818115234375,
0.037353515625,
-0.01023101806640625,
0.005832672119140625,
0.01348876953125,
-0.0760498046875,
0.00734710693359375,
0.012603759765625,
0.0006113052368164062,
-0.01275634765625,
-0.05206298828125,
0.02972412109375,
0.0226287841796875,
0.053009033203125,
-0.0167388916015625,
-0.037200927734375,
-0.018280029296875,
0.0269622802734375,
-0.059356689453125,
-0.055877685546875,
0.0282745361328125,
-0.0572509765625,
-0.0213623046875,
-0.03265380859375,
-0.046051025390625,
-0.01006317138671875,
-0.01236724853515625,
-0.017303466796875,
0.0328369140625,
-0.056915283203125,
-0.0667724609375,
-0.0618896484375,
-0.10015869140625,
-0.053314208984375,
0.003143310546875,
0.00864410400390625,
-0.0068817138671875,
0.0029048919677734375,
-0.01558685302734375,
-0.03271484375,
-0.0265655517578125,
0.047149658203125,
0.013763427734375,
-0.04608154296875,
-0.0131378173828125,
0.0225067138671875,
-0.0262603759765625,
0.00934600830078125,
-0.045379638671875,
-0.0032291412353515625,
0.001773834228515625,
-0.026092529296875,
-0.01424407958984375,
0.00243377685546875,
0.0218963623046875,
0.04510498046875,
0.01123809814453125,
0.008758544921875,
0.06024169921875,
-0.041168212890625,
-0.06451416015625,
-0.0172576904296875,
-0.05889892578125,
0.0799560546875,
0.031707763671875,
0.00888824462890625,
-0.0021991729736328125,
0.04034423828125,
0.0200958251953125,
0.01013946533203125,
-0.017852783203125,
-0.005901336669921875,
0.04437255859375,
0.0237884521484375,
0.03460693359375,
0.015838623046875,
0.0209808349609375,
-0.0284271240234375,
0.00817108154296875,
0.0030269622802734375,
-0.01654052734375,
-0.0160980224609375,
-0.02685546875,
-0.003971099853515625,
-0.05450439453125,
0.05511474609375,
-0.0202178955078125,
0.00295257568359375,
-0.034454345703125,
-0.0301666259765625,
-0.01451873779296875,
0.083740234375,
0.0096282958984375,
-0.01507568359375,
0.00568389892578125,
0.0174102783203125,
-0.0557861328125,
-0.042144775390625,
-0.055419921875,
-0.004207611083984375,
-0.08709716796875,
0.02020263671875,
-0.0128936767578125,
-0.0227508544921875,
-0.01409912109375,
0.0335693359375,
-0.05047607421875,
-0.024688720703125,
0.02044677734375,
-0.03509521484375,
-0.01031494140625,
0.0311431884765625,
-0.051177978515625,
0.039154052734375,
-0.0251007080078125,
-0.01505279541015625,
-0.07635498046875,
-0.0280303955078125,
-0.00250244140625,
0.0682373046875,
-0.000461578369140625,
-0.0010957717895507812,
-0.0204620361328125,
0.05938720703125,
0.0146026611328125,
0.055816650390625,
0.005100250244140625,
0.014556884765625,
-0.0083160400390625,
-0.01690673828125,
0.0191650390625,
-0.0269012451171875,
-0.0086669921875,
-0.005558013916015625,
-0.043975830078125,
-0.0001329183578491211,
-0.0184326171875,
-0.0135650634765625,
0.031585693359375,
-0.034423828125,
-0.0135498046875,
-0.03009033203125,
-0.0175323486328125,
0.0064544677734375,
0.000751495361328125,
0.0010223388671875,
-0.0276336669921875,
-0.0377197265625,
0.06207275390625,
0.0261077880859375,
-0.01058197021484375,
-0.0181732177734375,
0.10382080078125,
0.0289154052734375,
-0.0421142578125,
-0.0027637481689453125,
-0.01543426513671875,
0.0175933837890625,
0.007617950439453125,
0.00323486328125,
-0.0117950439453125,
-0.03668212890625,
0.03961181640625,
-0.00415802001953125,
-0.015655517578125,
0.0151824951171875,
0.046478271484375,
-0.005489349365234375,
-0.026824951171875,
0.014251708984375,
-0.0083465576171875,
0.01004791259765625,
0.019378662109375,
-0.0289459228515625,
-0.00783538818359375,
-0.0197601318359375,
0.040130615234375,
-0.040679931640625,
0.040374755859375,
-0.03582763671875,
-0.044219970703125,
0.01361083984375,
-0.014862060546875,
0.00530242919921875,
0.007495880126953125,
0.00043845176696777344,
-0.004993438720703125,
-0.016754150390625,
0.030487060546875,
-0.02264404296875,
0.00290679931640625,
-0.0196533203125,
0.04315185546875,
-0.024658203125,
0.0092926025390625,
-0.00543975830078125,
-0.0136260986328125,
0.08233642578125,
0.01058197021484375,
-0.03759765625,
0.007659912109375,
-0.0205230712890625,
0.01314544677734375,
0.0012063980102539062,
-0.037261962890625,
0.049407958984375,
0.0254669189453125,
-0.025634765625,
0.0022792816162109375,
-0.0689697265625,
0.0113525390625,
-0.0504150390625,
0.016021728515625,
-0.0023326873779296875,
-0.001251220703125,
0.003627777099609375,
0.052734375,
0.006649017333984375,
0.0277862548828125,
-0.0272369384765625,
-0.0252838134765625,
-0.015289306640625,
0.05023193359375,
0.03607177734375,
-0.06146240234375,
0.053680419921875,
-0.0234527587890625,
0.043792724609375,
-0.03204345703125,
0.011077880859375,
0.03851318359375,
0.0621337890625,
0.005199432373046875,
-0.042755126953125,
0.003040313720703125,
-0.048980712890625,
-0.0008549690246582031,
-0.025604248046875,
-0.0173797607421875,
0.0022144317626953125,
0.003475189208984375,
0.01032257080078125,
-0.0011491775512695312,
0.02801513671875,
-0.01428985595703125,
-0.01157379150390625,
-0.039215087890625,
-0.0244140625,
0.00695037841796875,
-0.055328369140625,
0.0222930908203125,
0.0272216796875,
-0.060882568359375,
0.00812530517578125,
0.03253173828125,
-0.07525634765625,
-0.061798095703125,
-0.0120849609375,
-0.01349639892578125,
0.03778076171875,
-0.00833892822265625,
0.037750244140625,
-0.03369140625,
-0.006893157958984375,
-0.007965087890625,
-0.01983642578125,
0.076171875,
0.04278564453125,
-0.037353515625,
0.0249786376953125,
-0.037445068359375,
0.00047206878662109375,
-0.0245513916015625,
-0.044158935546875,
-0.044830322265625,
-0.01415252685546875,
-0.037811279296875,
-0.0195465087890625,
0.005496978759765625,
0.04693603515625,
-0.00911712646484375,
0.052734375,
-0.01471710205078125,
0.006107330322265625,
0.0034046173095703125,
0.08367919921875,
-0.020233154296875,
0.039215087890625,
0.0330810546875,
0.04901123046875,
-0.033935546875,
-0.025421142578125,
0.00901031494140625,
-0.005245208740234375,
0.005710601806640625,
-0.03594970703125,
0.0235443115234375,
-0.041534423828125,
0.0254058837890625,
0.00800323486328125,
0.01904296875,
-0.0199432373046875,
-0.0004470348358154297,
-0.00391387939453125,
-0.0089263916015625,
-0.020050048828125,
-0.01227569580078125,
0.01148223876953125,
-0.040191650390625,
-0.007167816162109375,
-0.01068115234375,
-0.0141754150390625,
0.03460693359375,
-0.005039215087890625,
0.01483917236328125,
0.03887939453125,
-0.06683349609375,
0.09765625,
0.0623779296875,
0.0038928985595703125,
0.03619384765625,
0.0013017654418945312,
0.0167236328125,
-0.01131439208984375,
0.0200347900390625,
-0.011138916015625,
-0.0243682861328125,
0.044769287109375,
0.03009033203125,
0.0035266876220703125,
0.045684814453125,
-0.02288818359375,
-0.0206146240234375,
-0.0228271484375,
0.0234222412109375,
-0.001018524169921875,
0.00018298625946044922,
0.02801513671875,
0.004695892333984375,
-0.00559234619140625,
0.024749755859375,
-0.0111236572265625,
-0.0289306640625,
0.027496337890625,
-0.044464111328125,
0.007022857666015625,
0.0250396728515625,
-0.0264129638671875,
0.004962921142578125,
-0.0247650146484375,
0.04974365234375,
0.002460479736328125,
-0.021331787109375,
0.0092620849609375,
-0.0015802383422851562,
0.01085662841796875,
-0.02557373046875,
0.0220794677734375,
-0.03912353515625,
0.0170135498046875,
-0.023712158203125,
0.025146484375,
-0.041046142578125,
0.020599365234375,
-0.026031494140625,
0.01885986328125,
-0.002079010009765625,
0.05169677734375,
-0.026458740234375,
0.005611419677734375,
0.0242767333984375,
-0.0238189697265625,
-0.0096282958984375,
0.010009765625,
0.02764892578125,
0.0019931793212890625,
-0.03790283203125,
0.00716400146484375,
-0.05169677734375,
0.01678466796875,
-0.004947662353515625,
0.01416015625,
0.021209716796875,
0.0005512237548828125,
-0.033447265625,
0.0227813720703125,
0.0380859375,
0.003314971923828125,
0.007549285888671875,
0.042816162109375,
-0.035247802734375,
-0.00047326087951660156,
0.038909912109375,
0.01451873779296875,
-0.0171051025390625,
0.016693115234375,
-0.06561279296875,
0.0538330078125,
0.009521484375,
0.033172607421875,
0.022796630859375,
0.01345062255859375,
-0.0423583984375,
-0.031341552734375,
-0.041015625,
0.050811767578125,
0.0540771484375,
0.0219879150390625,
-0.044464111328125,
-0.0221710205078125,
-0.005496978759765625,
0.04150390625,
0.052947998046875,
-0.005615234375,
-0.02093505859375,
-0.0164337158203125,
0.03997802734375,
0.01312255859375,
-0.0197906494140625,
0.048431396484375,
0.0144195556640625,
-0.0140380859375,
0.0362548828125,
0.0172882080078125,
0.03485107421875,
-0.00012409687042236328,
-0.0129547119140625,
0.0270538330078125,
0.0038909912109375,
-0.0033626556396484375,
-0.0083160400390625,
-0.0172576904296875,
-0.0301666259765625,
-0.02032470703125,
0.0243682861328125,
-0.057891845703125,
0.0176544189453125,
0.03912353515625,
0.07763671875,
-0.035980224609375,
-0.00394439697265625,
-0.0211029052734375,
0.062164306640625,
0.0231475830078125,
-0.0185699462890625,
-0.022705078125,
0.01287841796875,
-0.0452880859375,
-0.007099151611328125,
-0.00878143310546875,
0.034637451171875,
-0.0235748291015625,
0.0111541748046875,
-0.0105743408203125,
0.00769805908203125,
-0.0467529296875,
0.026824951171875,
-0.005344390869140625,
0.0013751983642578125,
-0.03594970703125,
-0.0262603759765625,
0.0261993408203125,
-0.0187530517578125,
-0.023834228515625,
-0.011810302734375,
-0.02618408203125,
0.032623291015625,
0.0316162109375,
-0.028106689453125,
0.0002548694610595703,
0.01419830322265625,
0.033416748046875,
0.0018892288208007812,
0.01239013671875,
-0.043426513671875,
-0.01216888427734375,
-0.01544952392578125,
-0.01983642578125,
0.0124359130859375,
0.0064239501953125,
0.010345458984375,
0.051361083984375,
-0.01329803466796875,
0.003940582275390625,
-0.004688262939453125,
-0.01132965087890625,
-0.002582550048828125,
0.011505126953125,
0.03448486328125,
0.039459228515625,
0.00821685791015625,
0.002166748046875,
0.033721923828125,
0.039886474609375,
0.038604736328125,
0.01012420654296875,
-0.0102081298828125,
0.0011281967163085938,
-0.00287628173828125,
-0.0287017822265625,
0.02447509765625,
-0.029205322265625,
-0.01122283935546875,
-0.0182037353515625,
-0.02166748046875,
-0.030914306640625,
0.0014514923095703125,
0.024261474609375,
-0.0112762451171875,
0.020111083984375,
0.0026607513427734375,
0.0006270408630371094,
0.005748748779296875,
-0.003810882568359375,
0.00004220008850097656,
0.0124053955078125,
-0.09283447265625,
-0.006603240966796875,
-0.051177978515625,
-0.00649261474609375,
0.027374267578125,
0.032958984375,
-0.021087646484375,
0.040771484375,
-0.0238494873046875,
-0.021453857421875,
-0.0045318603515625,
0.0099029541015625,
0.006381988525390625,
0.06744384765625,
0.0139923095703125,
0.025848388671875,
-0.05126953125,
-0.031768798828125,
-0.01434326171875,
0.026275634765625,
0.03131103515625,
0.004695892333984375,
0.014739990234375,
0.0360107421875,
-0.034027099609375,
0.044189453125,
-0.08880615234375,
-0.059783935546875,
0.092529296875,
-0.048797607421875,
-0.04620361328125,
0.004638671875,
-0.0970458984375,
0.0233612060546875,
0.041778564453125,
0.02618408203125,
0.043060302734375,
0.0026340484619140625,
0.0166473388671875,
-0.03973388671875,
0.01328277587890625,
-0.0249176025390625,
-0.03900146484375,
-0.0310211181640625,
-0.004169464111328125,
0.0070343017578125,
-0.00350189208984375,
-0.00818634033203125,
-0.004077911376953125,
0.01103973388671875,
-0.02874755859375,
0.025177001953125,
0.026397705078125,
0.033416748046875,
0.0328369140625,
-0.024200439453125,
-0.1185302734375,
0.01163482666015625,
0.0022296905517578125,
-0.0011014938354492188,
-0.00601959228515625,
0.10809326171875,
0.0148468017578125,
-0.05072021484375,
0.049163818359375,
0.00550079345703125,
0.0380859375,
-0.0285797119140625,
0.0008220672607421875,
0.03564453125,
0.0054779052734375,
-0.00548553466796875,
-0.056610107421875,
-0.0242919921875,
-0.05035400390625,
0.01372528076171875,
0.0168914794921875,
0.00574493408203125,
-0.0225982666015625,
0.008087158203125,
-0.007205963134765625,
0.0288848876953125,
-0.006549835205078125,
0.01318359375,
-0.027252197265625,
-0.0313720703125,
0.01212310791015625,
0.01251983642578125,
-0.0263824462890625,
0.0201873779296875,
0.005245208740234375,
-0.033447265625,
0.0174713134765625,
-0.04364013671875,
-0.039337158203125,
-0.022491455078125,
0.0201873779296875,
0.031158447265625,
-0.0104827880859375,
0.012847900390625,
0.04412841796875,
0.0174713134765625,
0.09539794921875,
-0.050750732421875,
-0.025482177734375,
0.00849151611328125,
-0.01271820068359375,
-0.0013437271118164062,
-0.04254150390625,
0.0129547119140625,
-0.0673828125,
-0.004364013671875,
-0.038482666015625,
0.01377105712890625,
0.018310546875,
-0.0270538330078125,
-0.0035762786865234375,
0.019775390625,
0.0036773681640625,
-0.03289794921875,
-0.0285186767578125,
0.00786590576171875,
-0.01340484619140625,
0.021575927734375,
0.01367950439453125,
-0.038482666015625,
0.0088043212890625,
0.048919677734375,
-0.001922607421875,
0.0186920166015625,
-0.01091766357421875,
-0.00872802734375,
-0.07611083984375,
0.005512237548828125,
-0.00298309326171875,
-0.001018524169921875,
-0.03167724609375,
0.016815185546875,
0.00026988983154296875,
0.042724609375,
-0.0095977783203125,
0.005344390869140625,
0.0031795501708984375,
0.01702880859375,
-0.01727294921875,
-0.0137786865234375,
0.003505706787109375,
0.026123046875,
0.033538818359375,
0.0474853515625,
-0.004917144775390625,
-0.046356201171875,
-0.026611328125,
-0.031585693359375,
-0.052520751953125,
-0.0244140625,
0.035858154296875,
-0.08343505859375,
0.002368927001953125,
0.0251922607421875,
-0.031219482421875,
-0.01812744140625,
-0.01177215576171875,
-0.056304931640625,
0.0005865097045898438,
-0.032440185546875,
0.0009293556213378906,
-0.018341064453125,
-0.038360595703125,
0.031005859375,
-0.007717132568359375,
0.027984619140625,
-0.00803375244140625,
0.033416748046875,
0.03582763671875,
0.046142578125,
0.00820159912109375,
0.047821044921875,
-0.048431396484375,
-0.007415771484375,
0.01299285888671875,
0.01526641845703125,
-0.0078277587890625,
0.006198883056640625,
-0.00553131103515625,
0.0173492431640625,
-0.019439697265625,
-0.0179290771484375,
0.01319122314453125,
0.0643310546875,
0.0024738311767578125,
0.11395263671875,
-0.0034770965576171875,
0.02178955078125,
-0.00995635986328125,
0.04974365234375,
-0.0231475830078125,
-0.0159759521484375,
-0.00913238525390625,
-0.045196533203125,
0.0110931396484375,
-0.01213836669921875,
0.0263671875,
-0.035858154296875,
0.0198822021484375,
0.011322021484375,
0.012542724609375,
0.0239105224609375
]
|
4209faae22440c8874cad97724e52e0e5947cd16 | Wordpress Stackexchange
Q: ajaxurl not defined on front end I am trying to create a ajaxform on the front side. I am using the code
jQuery.ajax(
{
type: "post",
dataType: "json",
url: ajaxurl,
data: formData,
success: function(msg){
console.log(msg);
}
});
for which I am getting error
Uncaught ReferenceError: ajaxurl is not definedworklorAjaxBookForm @
?page_id=2:291onclick @ ?page_id=2:202
While using similar code on the admin backend works. What url must I use to process the ajax request?
A: In backend there is global ajaxurl variable defined by WordPress itself.
This variable is not created by WP in frontend. It means that if you want to use AJAX calls in frontend, then you have to define such variable by yourself.
Good way to do this is to use wp_localize_script.
Let's assume your AJAX calls are in my-ajax-script.js file, then add wp_localize_script for this JS file like so:
function my_enqueue() {
wp_enqueue_script( 'ajax-script', get_template_directory_uri() . '/js/my-ajax-script.js', array('jquery') );
wp_localize_script( 'ajax-script', 'my_ajax_object',
array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
}
add_action( 'wp_enqueue_scripts', 'my_enqueue' );
After localizing your JS file, you can use my_ajax_object object in your JS file:
jQuery.ajax(
{
type: "post",
dataType: "json",
url: my_ajax_object.ajax_url,
data: formData,
success: function(msg){
console.log(msg);
}
});
| Q: ajaxurl not defined on front end I am trying to create a ajaxform on the front side. I am using the code
jQuery.ajax(
{
type: "post",
dataType: "json",
url: ajaxurl,
data: formData,
success: function(msg){
console.log(msg);
}
});
for which I am getting error
Uncaught ReferenceError: ajaxurl is not definedworklorAjaxBookForm @
?page_id=2:291onclick @ ?page_id=2:202
While using similar code on the admin backend works. What url must I use to process the ajax request?
A: In backend there is global ajaxurl variable defined by WordPress itself.
This variable is not created by WP in frontend. It means that if you want to use AJAX calls in frontend, then you have to define such variable by yourself.
Good way to do this is to use wp_localize_script.
Let's assume your AJAX calls are in my-ajax-script.js file, then add wp_localize_script for this JS file like so:
function my_enqueue() {
wp_enqueue_script( 'ajax-script', get_template_directory_uri() . '/js/my-ajax-script.js', array('jquery') );
wp_localize_script( 'ajax-script', 'my_ajax_object',
array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
}
add_action( 'wp_enqueue_scripts', 'my_enqueue' );
After localizing your JS file, you can use my_ajax_object object in your JS file:
jQuery.ajax(
{
type: "post",
dataType: "json",
url: my_ajax_object.ajax_url,
data: formData,
success: function(msg){
console.log(msg);
}
});
A: to use ajaxurl directly, in your plugin file add this:
add_action('wp_head', 'myplugin_ajaxurl');
function myplugin_ajaxurl() {
echo '<script type="text/javascript">
var ajaxurl = "' . admin_url('admin-ajax.php') . '";
</script>';
}
you can then use the ajaxurl for ajax request.
A: The 2021 way is a bit different ;-)
function my_enqueue() {
wp_enqueue_script( 'ajax-script', get_template_directory_uri() . '/js/my-ajax-script.js', array('jquery') );
wp_add_inline_script( 'ajax-script',
'const myVariables = ' . json_encode(
array(
'ajaxUrl' => admin_url( 'admin-ajax.php' ),
) ),
'before' );
}
add_action( 'wp_enqueue_scripts', 'my_enqueue' );
Source: https://developer.wordpress.org/reference/functions/wp_add_inline_script/#comment-4632
A: i have use below code in wordpress site.
we can use below code for setup ajaxurl like this.
<?php echo esc_url(admin_url('admin-ajax.php')); ?>
i have also added ajax example were we can use above line.
function setNotificationRead() {
fetch('<?php echo esc_url(admin_url('admin-ajax.php')); ?>', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
},
body: `action=yourFunctionsAction`,
credentials: 'same-origin'
}).then(response => {
return response.json();
}).then(data => {
if (data.status === 'true') {
console.log('Do something...');
}
});
}
A: I got this to work after many hours...and trials and errors. So, I do share how to make ajax work in wordpress with an example (started with https://www.tweaking4all.com/web-development/wordpress/wordpress-ajax-example/#comment-562814 and adapted the example)
--use chrome developer tools and take off cache from network tab
--look to console if you get any errors, first goal is to get to console "ready!" when you click the button and if all works you get some nice output too!
--add to wordpress website as custom html block:
<div id="receiving_div_id">
<p>Nothing loaded yet</p>
</div>
<button id="button_to_load_data">Get Ajax Content</button>
--add to theme/js/button.js (create js folder):
jQuery("#button_to_load_data").click(function() {
console.log( "ready!" );
var data = {
'action' : 't4a_ajax_call', // the name of your PHP function!
'function' : 'show_files', // a random value we'd like to pass
'fileid' : '7' // another random value we'd like to pass
};
jQuery.post(my_ajax_object.ajax_url, data, function(response) {
jQuery("#receiving_div_id").html(response);
});
});
--add to theme functions.php:
/* custom script in theme functions.php */
/* read button.js (->my-script) and localize admin-ajax.php for my-script */
function add_my_script() {
wp_enqueue_script( 'my-script',
get_template_directory_uri() . '/js/button.js',
array ( 'jquery' ),
false,
true
);
wp_localize_script( 'my-script', 'my_ajax_object',
array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
}
add_action( 'wp_enqueue_scripts', 'add_my_script' );
/*ajax result */
add_action('wp_ajax_t4a_ajax_call', 't4a_ajax_call'); // for logged in users only
add_action('wp_ajax_nopriv_t4a_ajax_call', 't4a_ajax_call'); // for ALL users
function t4a_ajax_call(){
echo 'Ajax call output:';
echo '<pre>';
var_dump($_POST);
echo '</pre>';
wp_die();// this is required to terminate immediately and return a proper response
}
| wordpress | {
"language": "en",
"length": 593,
"provenance": "stackexchange_00019.jsonl.gz:456131",
"question_score": "38",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/190297"
} | [
0.032073974609375,
-0.00665283203125,
-0.0545654296875,
-0.072509765625,
0.0277862548828125,
-0.032012939453125,
-0.01084136962890625,
0.018157958984375,
0.01070404052734375,
0.004283905029296875,
-0.0242767333984375,
-0.006717681884765625,
-0.04534912109375,
-0.0264129638671875,
-0.01352691650390625,
-0.0310821533203125,
0.0694580078125,
-0.051483154296875,
-0.00003057718276977539,
-0.0037670135498046875,
0.00839996337890625,
0.029022216796875,
0.027740478515625,
0.0699462890625,
0.01522064208984375,
-0.00279998779296875,
0.035247802734375,
-0.00133514404296875,
-0.01493072509765625,
-0.01019287109375,
0.0248260498046875,
-0.006092071533203125,
0.01861572265625,
0.00896453857421875,
-0.010955810546875,
-0.022735595703125,
0.01605224609375,
0.0115203857421875,
0.00426483154296875,
0.01910400390625,
0.029449462890625,
-0.0218505859375,
0.0117034912109375,
0.03759765625,
-0.0148468017578125,
-0.03643798828125,
0.038238525390625,
-0.0338134765625,
-0.0116729736328125,
0.0263214111328125,
0.01396942138671875,
-0.022918701171875,
0.01403045654296875,
0.0223388671875,
0.0033130645751953125,
0.01401519775390625,
-0.033935546875,
-0.0298004150390625,
0.043304443359375,
0.060089111328125,
-0.01491546630859375,
-0.0474853515625,
0.0017919540405273438,
-0.06842041015625,
-0.0250396728515625,
0.0006837844848632812,
-0.005756378173828125,
0.0136871337890625,
-0.037628173828125,
-0.0173492431640625,
0.0204315185546875,
-0.0211181640625,
0.001056671142578125,
0.00662994384765625,
-0.0257110595703125,
-0.01372528076171875,
0.03533935546875,
0.0198211669921875,
-0.01366424560546875,
0.0048980712890625,
-0.00005418062210083008,
-0.006683349609375,
-0.053466796875,
0.008148193359375,
-0.00106048583984375,
0.0277862548828125,
-0.0175628662109375,
-0.0277252197265625,
-0.0472412109375,
-0.0482177734375,
-0.036651611328125,
-0.07196044921875,
-0.0823974609375,
0.02587890625,
0.0143890380859375,
-0.005542755126953125,
0.0352783203125,
0.01885986328125,
0.0269775390625,
0.02349853515625,
-0.0051116943359375,
-0.0255279541015625,
0.032623291015625,
-0.036163330078125,
0.0102081298828125,
0.04998779296875,
0.0089111328125,
0.013641357421875,
0.029327392578125,
0.00966644287109375,
-0.0032520294189453125,
0.017181396484375,
0.0243377685546875,
0.024322509765625,
-0.00833892822265625,
-0.043243408203125,
-0.04949951171875,
0.0233612060546875,
-0.01788330078125,
0.00025582313537597656,
0.00592041015625,
0.023284912109375,
-0.035980224609375,
0.01910400390625,
-0.0036983489990234375,
-0.01087188720703125,
0.012603759765625,
-0.0020313262939453125,
0.0201568603515625,
0.041168212890625,
-0.049774169921875,
0.017120361328125,
0.11004638671875,
0.01465606689453125,
0.01192474365234375,
-0.03411865234375,
0.0498046875,
-0.026153564453125,
0.0133209228515625,
-0.0114593505859375,
0.0222320556640625,
-0.01776123046875,
-0.0084991455078125,
0.01080322265625,
-0.0265960693359375,
0.0025463104248046875,
0.00812530517578125,
0.00992584228515625,
-0.0004227161407470703,
-0.0115509033203125,
-0.028594970703125,
-0.0195159912109375,
0.04705810546875,
0.05633544921875,
-0.0161895751953125,
0.0103912353515625,
0.09356689453125,
-0.059844970703125,
-0.05084228515625,
-0.07403564453125,
-0.004467010498046875,
0.005748748779296875,
0.0006837844848632812,
-0.00201416015625,
-0.0010986328125,
-0.0256195068359375,
0.0098876953125,
-0.0021190643310546875,
0.019683837890625,
0.017578125,
-0.0088653564453125,
-0.01081085205078125,
0.0085906982421875,
-0.0039215087890625,
-0.01335906982421875,
0.00345611572265625,
-0.018157958984375,
0.004985809326171875,
0.031463623046875,
-0.011383056640625,
-0.021881103515625,
-0.0270538330078125,
0.059814453125,
-0.00371551513671875,
-0.048065185546875,
0.029022216796875,
0.04425048828125,
0.07415771484375,
-0.01715087890625,
0.0137786865234375,
0.035491943359375,
0.035186767578125,
0.00954437255859375,
0.027679443359375,
-0.03790283203125,
-0.047607421875,
-0.035369873046875,
0.0089263916015625,
-0.048248291015625,
0.034423828125,
0.0460205078125,
-0.0048828125,
0.0226593017578125,
0.0121307373046875,
-0.053619384765625,
0.032684326171875,
-0.0244293212890625,
0.035400390625,
-0.00029277801513671875,
0.01873779296875,
0.0172119140625,
0.0648193359375,
-0.043731689453125,
-0.05609130859375,
-0.0301666259765625,
0.0248870849609375,
-0.041717529296875,
0.047607421875,
-0.00792694091796875,
0.060302734375,
-0.0037364959716796875,
-0.043792724609375,
-0.0030879974365234375,
-0.052093505859375,
0.01334381103515625,
0.01947021484375,
-0.021484375,
-0.00433349609375,
0.03668212890625,
-0.020050048828125,
0.037139892578125,
0.037811279296875,
0.029632568359375,
0.03900146484375,
-0.00687408447265625,
-0.0219573974609375,
0.0165863037109375,
-0.0836181640625,
0.0214996337890625,
0.054840087890625,
0.033477783203125,
0.0292205810546875,
-0.0025272369384765625,
0.0174407958984375,
-0.003498077392578125,
-0.033447265625,
0.029754638671875,
-0.0154876708984375,
-0.00138092041015625,
0.01540374755859375,
-0.01544952392578125,
-0.0265045166015625,
0.0267486572265625,
-0.0811767578125,
-0.0232696533203125,
0.051422119140625,
-0.020965576171875,
-0.01013946533203125,
-0.010833740234375,
-0.002361297607421875,
-0.00153350830078125,
0.002105712890625,
-0.01904296875,
-0.0074462890625,
0.0584716796875,
-0.006366729736328125,
0.035736083984375,
0.036773681640625,
-0.0195465087890625,
-0.01351165771484375,
0.00820159912109375,
0.00788116455078125,
-0.002567291259765625,
0.02532958984375,
0.0297088623046875,
0.0106964111328125,
-0.037353515625,
-0.01221466064453125,
0.03839111328125,
0.02471923828125,
-0.011383056640625,
-0.00003337860107421875,
-0.0236358642578125,
-0.00830078125,
0.0212860107421875,
-0.06842041015625,
-0.0085906982421875,
0.0044097900390625,
0.03662109375,
0.003803253173828125,
0.045074462890625,
-0.0216827392578125,
-0.01529693603515625,
0.02978515625,
-0.002437591552734375,
-0.04595947265625,
0.02996826171875,
0.00347137451171875,
0.022216796875,
-0.035247802734375,
0.045745849609375,
0.039459228515625,
-0.015899658203125,
0.00019538402557373047,
0.0035858154296875,
-0.032196044921875,
0.0016851425170898438,
0.01548004150390625,
-0.0009698867797851562,
-0.029266357421875,
-0.044830322265625,
0.004611968994140625,
0.0248260498046875,
0.047149658203125,
0.016082763671875,
-0.036468505859375,
0.018157958984375,
0.045684814453125,
-0.0762939453125,
-0.0960693359375,
-0.020721435546875,
-0.046844482421875,
0.02655029296875,
0.003429412841796875,
-0.0105438232421875,
-0.01361846923828125,
0.0272216796875,
0.020782470703125,
-0.02777099609375,
-0.00960540771484375,
-0.055023193359375,
-0.06390380859375,
-0.057373046875,
-0.01690673828125,
-0.0257415771484375,
-0.007350921630859375,
0.006961822509765625,
-0.0162200927734375,
0.009124755859375,
-0.01366424560546875,
0.0194854736328125,
0.045196533203125,
-0.00494384765625,
-0.0113372802734375,
0.056060791015625,
-0.041015625,
-0.00846099853515625,
-0.00098419189453125,
0.04547119140625,
0.03729248046875,
-0.037200927734375,
-0.005283355712890625,
-0.0137481689453125,
-0.0282440185546875,
0.0169525146484375,
0.012664794921875,
0.0019474029541015625,
-0.00783538818359375,
0.031524658203125,
-0.047149658203125,
-0.041107177734375,
0.046417236328125,
-0.0255889892578125,
0.00878143310546875,
0.00817108154296875,
-0.0360107421875,
0.0288543701171875,
0.0237579345703125,
0.018798828125,
-0.0265045166015625,
-0.00830078125,
0.01520538330078125,
0.0148773193359375,
-0.0210418701171875,
-0.0015001296997070312,
-0.021209716796875,
0.0831298828125,
0.0032863616943359375,
-0.030975341796875,
0.0312042236328125,
0.0143890380859375,
0.0249176025390625,
-0.034210205078125,
0.007228851318359375,
-0.0325927734375,
0.02301025390625,
-0.04046630859375,
-0.0101470947265625,
-0.0011072158813476562,
-0.0062255859375,
0.0229949951171875,
0.03143310546875,
-0.005817413330078125,
-0.00551605224609375,
-0.0233612060546875,
0.0089263916015625,
-0.0655517578125,
-0.078369140625,
-0.0278167724609375,
0.0176849365234375,
-0.0257568359375,
-0.0026569366455078125,
-0.015625,
-0.01045989990234375,
-0.015655517578125,
0.0792236328125,
0.0017557144165039062,
-0.02911376953125,
0.039276123046875,
-0.061859130859375,
0.0088043212890625,
0.0054931640625,
0.005889892578125,
-0.04266357421875,
-0.034881591796875,
-0.024993896484375,
-0.042724609375,
-0.0037708282470703125,
-0.03662109375,
0.03924560546875,
0.031463623046875,
-0.03924560546875,
-0.00888824462890625,
0.03741455078125,
-0.0062103271484375,
-0.01155853271484375,
0.0011138916015625,
0.0051116943359375,
-0.00672149658203125,
0.032501220703125,
0.0032138824462890625,
-0.0164794921875,
0.00839996337890625,
0.0174407958984375,
-0.0347900390625,
0.01523590087890625,
-0.015472412109375,
-0.033905029296875,
0.0275726318359375,
-0.034576416015625,
-0.04840087890625,
-0.024322509765625,
-0.0273284912109375,
0.0029735565185546875,
0.002964019775390625,
-0.003971099853515625,
-0.026397705078125,
-0.0706787109375,
0.03515625,
-0.0017080307006835938,
-0.01544189453125,
0.006740570068359375,
0.01568603515625,
0.004932403564453125,
-0.01812744140625,
-0.04327392578125,
-0.01267242431640625,
0.0379638671875,
0.00780487060546875,
0.0289154052734375,
-0.011749267578125,
-0.04010009765625,
0.0928955078125,
0.01136016845703125,
0.047088623046875,
0.02484130859375,
0.0025806427001953125,
0.01097869873046875,
-0.023345947265625,
0.036224365234375,
0.05096435546875,
-0.109619140625,
0.002422332763671875,
0.0016527175903320312,
0.00997161865234375,
0.049468994140625,
-0.0160369873046875,
-0.0692138671875,
0.0318603515625,
0.03118896484375,
-0.04083251953125,
0.02081298828125,
-0.07763671875,
0.0491943359375,
0.016021728515625,
-0.006137847900390625,
0.01270294189453125,
0.01055145263671875,
0.0030765533447265625,
0.04949951171875,
0.034332275390625,
-0.0012025833129882812,
0.01538848876953125,
0.03948974609375,
-0.0085906982421875,
0.01971435546875,
0.0147705078125,
-0.01143646240234375,
-0.01045989990234375,
-0.022735595703125,
-0.041046142578125,
0.0003876686096191406,
-0.01488494873046875,
-0.0155487060546875,
-0.0003752708435058594,
-0.0101165771484375,
0.029083251953125,
0.0095672607421875,
0.0150604248046875,
0.07171630859375,
-0.01242828369140625,
0.00733184814453125,
0.08447265625,
0.0286407470703125,
0.0208587646484375,
-0.07275390625,
0.11871337890625,
0.034759521484375,
0.0031070709228515625,
-0.0230712890625,
0.0240325927734375,
-0.01174163818359375,
0.07318115234375,
0.02398681640625,
-0.045623779296875,
0.0204620361328125,
0.0232391357421875,
-0.000027060508728027344,
-0.0408935546875,
0.01317596435546875,
0.0160980224609375,
0.03460693359375,
0.044708251953125,
0.0021514892578125,
-0.0215301513671875,
-0.0265350341796875,
-0.04241943359375,
0.034210205078125,
0.0164031982421875,
-0.0506591796875,
-0.024932861328125,
-0.01132965087890625,
0.011810302734375,
0.0181884765625,
-0.0025348663330078125,
0.023406982421875,
-0.0087432861328125,
0.033721923828125,
-0.00537109375,
0.032623291015625,
-0.0175323486328125,
-0.039764404296875,
-0.0240936279296875,
-0.00931549072265625,
-0.01270294189453125,
-0.04876708984375,
-0.0208587646484375,
-0.0089263916015625,
0.007328033447265625,
0.0163116455078125,
-0.01947021484375,
-0.01280975341796875,
-0.029022216796875,
0.042083740234375,
-0.046539306640625,
0.01100921630859375,
0.02923583984375,
0.010406494140625,
0.003841400146484375,
-0.03411865234375,
-0.050384521484375,
-0.0275421142578125,
-0.0158843994140625,
-0.0182342529296875,
-0.010284423828125,
0.0170135498046875,
0.01214599609375,
0.0164031982421875,
-0.0202484130859375,
-0.0006628036499023438,
0.043548583984375,
0.0209197998046875,
-0.01418304443359375,
0.038421630859375,
-0.01617431640625,
0.069580078125,
-0.00443267822265625,
0.038604736328125,
-0.0123291015625,
-0.001983642578125,
-0.04266357421875,
0.0104522705078125,
-0.0172882080078125,
-0.040771484375,
0.01277923583984375,
-0.0021514892578125,
-0.0007624626159667969,
0.0137786865234375,
0.051116943359375,
0.0086517333984375,
0.019134521484375,
0.0305938720703125,
-0.003692626953125,
-0.0255584716796875,
0.0260772705078125,
0.062164306640625,
0.056121826171875,
0.0233154296875,
-0.0110626220703125,
0.016571044921875,
-0.0123748779296875,
-0.036376953125,
0.038360595703125,
-0.01702880859375,
0.0146942138671875,
0.034332275390625,
-0.022186279296875,
0.045745849609375,
0.09051513671875,
0.0252227783203125,
0.067138671875,
0.033294677734375,
0.0167388916015625,
0.0149688720703125,
0.0458984375,
-0.021484375,
-0.0526123046875,
0.0213470458984375,
0.0011930465698242188,
-0.0220794677734375,
0.00789642333984375,
-0.01354217529296875,
-0.0035457611083984375,
0.053070068359375,
0.061859130859375,
-0.08575439453125,
0.0207977294921875,
0.0243072509765625,
0.004299163818359375,
-0.009429931640625,
0.0037384033203125,
0.00588226318359375,
0.0009565353393554688,
0.01806640625,
-0.00003981590270996094,
-0.00922393798828125,
0.0213623046875,
-0.0011873245239257812,
-0.0017309188842773438,
-0.006656646728515625,
0.044677734375,
0.01312255859375,
-0.0195770263671875,
-0.0004992485046386719,
-0.01062774658203125,
0.009063720703125,
-0.043060302734375,
0.0290679931640625,
-0.0003006458282470703,
0.0007119178771972656,
-0.03875732421875,
0.0213775634765625,
0.01678466796875,
-0.017303466796875,
-0.0267486572265625,
-0.0108795166015625,
0.0726318359375,
0.034423828125,
0.006488800048828125,
-0.03466796875,
0.01404571533203125,
0.0301971435546875,
0.0345458984375,
-0.0257568359375,
0.023406982421875,
0.0179901123046875,
-0.10028076171875,
0.0160675048828125,
-0.030242919921875,
-0.0008721351623535156,
0.002166748046875,
0.0283355712890625,
0.042724609375,
-0.005878448486328125,
-0.023834228515625,
0.0266876220703125,
0.029571533203125,
-0.00502777099609375,
-0.00865936279296875,
0.01332855224609375,
-0.03790283203125,
-0.034576416015625,
0.0012807846069335938,
-0.0736083984375,
-0.023162841796875,
-0.053802490234375,
-0.044403076171875,
0.07269287109375,
-0.00264739990234375,
0.0186920166015625,
0.022186279296875,
0.0297393798828125,
-0.01393890380859375,
0.006816864013671875,
-0.001468658447265625,
0.009674072265625,
-0.01983642578125,
0.00661468505859375,
-0.0178375244140625,
0.00800323486328125,
0.0027866363525390625,
0.04364013671875,
0.00528717041015625,
-0.004425048828125,
0.0570068359375,
-0.0214996337890625,
-0.013336181640625,
0.042449951171875,
-0.0278167724609375,
-0.0408935546875,
0.01148223876953125,
-0.0129241943359375,
0.03228759765625,
-0.0264739990234375,
0.013153076171875,
-0.041534423828125,
0.0252532958984375,
0.020721435546875,
0.00760650634765625,
0.01019287109375,
0.03082275390625,
0.0052337646484375,
-0.0616455078125,
0.0268096923828125,
0.027587890625,
-0.0103302001953125,
-0.04534912109375,
0.049407958984375,
-0.0157928466796875,
0.020843505859375,
-0.018341064453125,
-0.02520751953125,
0.0137786865234375,
-0.017303466796875,
-0.01297760009765625,
-0.012481689453125,
0.003269195556640625,
0.0017299652099609375,
-0.0277099609375,
-0.039337158203125,
0.0012502670288085938,
0.01450347900390625,
0.05242919921875,
0.05224609375,
0.048187255859375,
0.00794219970703125,
-0.06890869140625,
0.0178680419921875,
0.07275390625,
-0.017669677734375,
-0.028656005859375,
0.004291534423828125,
0.01497650146484375,
0.0128021240234375,
-0.005283355712890625,
0.044891357421875,
0.0546875,
0.0582275390625,
-0.0239410400390625,
-0.02056884765625,
0.0205841064453125,
0.043548583984375,
-0.00533294677734375,
-0.0018596649169921875,
-0.0095977783203125,
-0.02203369140625,
-0.04632568359375,
-0.0262603759765625,
0.0184173583984375,
0.0740966796875,
0.03521728515625,
0.030975341796875,
-0.0258941650390625,
-0.038848876953125,
-0.00027680397033691406,
0.0423583984375,
-0.0111083984375,
-0.0077667236328125,
0.0019550323486328125,
-0.02593994140625,
-0.025634765625,
0.0174102783203125,
0.0008897781372070312,
0.0308685302734375,
0.0447998046875,
0.02911376953125,
0.02532958984375,
-0.0022373199462890625,
0.024993896484375,
-0.00655364990234375,
0.005077362060546875,
-0.0162506103515625,
0.02838134765625,
-0.006656646728515625,
-0.005283355712890625,
0.016632080078125,
0.068359375,
-0.0152740478515625,
-0.05328369140625,
0.050445556640625,
-0.01499176025390625,
-0.040679931640625,
0.0596923828125,
-0.01934814453125,
0.140380859375,
-0.0308990478515625,
-0.03619384765625,
-0.006412506103515625,
-0.008148193359375,
-0.0606689453125,
0.03564453125,
0.047882080078125,
-0.0281982421875,
0.0221710205078125,
-0.00923919677734375,
-0.003814697265625,
0.00832366943359375,
-0.00774383544921875,
-0.015228271484375,
-0.0227203369140625,
0.03619384765625,
-0.01922607421875,
0.0173492431640625,
0.003421783447265625,
0.036651611328125,
0.0205841064453125,
-0.02093505859375,
0.01372528076171875,
-0.0172576904296875,
-0.00704193115234375,
0.0225372314453125,
0.03448486328125,
-0.0240325927734375,
0.00974273681640625,
-0.01560211181640625,
-0.01340484619140625,
0.0367431640625,
-0.0036163330078125,
-0.030975341796875,
0.01372528076171875,
0.00800323486328125,
-0.0177154541015625,
0.0106658935546875,
-0.0203094482421875,
0.010162353515625,
-0.0019855499267578125,
0.035400390625,
-0.03192138671875,
-0.061920166015625,
-0.041656494140625,
0.025787353515625,
0.0231781005859375,
0.047698974609375,
-0.02655029296875,
-0.007068634033203125,
-0.037994384765625,
-0.04229736328125,
0.03369140625,
-0.0311126708984375,
0.0206146240234375,
0.033660888671875,
-0.01079559326171875,
-0.02386474609375,
0.006038665771484375,
-0.0032634735107421875,
0.01171875,
0.027740478515625,
0.01270294189453125,
0.02630615234375,
0.00919342041015625,
0.000720977783203125,
-0.01715087890625,
-0.0089263916015625,
-0.024993896484375,
-0.0205230712890625,
0.0076904296875,
-0.022979736328125,
-0.0372314453125,
0.013214111328125,
-0.0285186767578125,
-0.0205230712890625,
0.010009765625,
0.025909423828125,
0.022796630859375,
-0.006504058837890625,
-0.05889892578125,
0.0243377685546875,
0.01059722900390625,
-0.0116119384765625,
-0.026611328125,
0.0026226043701171875,
-0.0406494140625,
0.047882080078125,
-0.0131378173828125,
0.01059722900390625,
-0.023651123046875,
0.0070648193359375,
-0.0228424072265625,
-0.0270843505859375,
-0.04150390625,
0.0287322998046875,
-0.0197296142578125,
0.00415802001953125,
0.0133209228515625,
0.0045166015625,
-0.005924224853515625,
-0.00832366943359375,
0.0036106109619140625,
0.05029296875,
-0.0117034912109375,
-0.01499176025390625,
0.02020263671875,
0.035400390625,
-0.03192138671875,
-0.091552734375,
-0.0161895751953125,
-0.059326171875,
0.058074951171875,
-0.010955810546875,
0.0203857421875,
0.01953125,
-0.039794921875,
-0.1041259765625,
0.03192138671875,
-0.01027679443359375,
-0.0528564453125,
-0.0251007080078125,
0.0053558349609375,
0.035858154296875,
0.00337982177734375,
-0.0167388916015625,
-0.0439453125,
-0.064697265625,
-0.026214599609375,
0.0099334716796875,
0.0047760009765625,
0.048065185546875,
-0.028900146484375,
-0.01788330078125,
0.0008716583251953125,
0.021636962890625,
0.003955841064453125,
-0.01326751708984375,
0.00568389892578125,
0.03631591796875,
0.042022705078125,
-0.00440216064453125,
0.00904083251953125,
0.003391265869140625,
-0.03253173828125,
0.00664520263671875,
0.0186614990234375,
0.006496429443359375,
0.0167388916015625,
0.04229736328125,
-0.0075225830078125,
0.005985260009765625,
-0.01445770263671875,
0.01126861572265625,
-0.0236968994140625,
-0.01189422607421875,
-0.012054443359375,
0.007556915283203125,
-0.039276123046875,
-0.001026153564453125,
-0.0004391670227050781,
-0.016876220703125,
-0.020355224609375,
-0.006473541259765625,
-0.032958984375,
-0.01009368896484375,
0.017730712890625,
0.001216888427734375,
0.01036834716796875,
-0.01080322265625,
0.07586669921875,
-0.0303497314453125,
0.0203857421875,
0.034515380859375,
0.0120086669921875,
0.05792236328125,
0.025421142578125,
-0.0016765594482421875,
0.046966552734375,
-0.040771484375,
-0.0096282958984375,
0.0247955322265625,
-0.0007100105285644531,
-0.02276611328125,
0.01447296142578125,
-0.0213775634765625,
0.0247955322265625,
-0.0178375244140625,
0.0230560302734375,
0.039337158203125,
0.044281005859375,
0.027740478515625,
-0.0022258758544921875,
-0.035797119140625,
0.01123046875,
-0.01220703125,
-0.0021457672119140625,
0.00785064697265625,
0.0123138427734375,
0.075927734375,
-0.02191162109375,
0.0115814208984375,
0.00115203857421875,
-0.055328369140625,
0.0180206298828125,
-0.038177490234375,
-0.0266265869140625,
-0.0302276611328125,
-0.006256103515625
]
|
88895646166484dfbadb5e8e548e9ee6db7d0039 | Wordpress Stackexchange
Q: Custom and browser agent logging in wordpress I wanted to log browser agent, screen size, timezone (including current system time). This is my first go at any web server (wordpress is my first install). I wanted to do this without plugins by editing the httpd configuration file.
Can someone please guide me? Also I was reading Apache documentation and there was a warning for write access to logging directory reducing security. What is the best way to have logging and not reduce security of the server?
cheers in advance!
| Q: Custom and browser agent logging in wordpress I wanted to log browser agent, screen size, timezone (including current system time). This is my first go at any web server (wordpress is my first install). I wanted to do this without plugins by editing the httpd configuration file.
Can someone please guide me? Also I was reading Apache documentation and there was a warning for write access to logging directory reducing security. What is the best way to have logging and not reduce security of the server?
cheers in advance!
| wordpress | {
"language": "en",
"length": 90,
"provenance": "stackexchange_00019.jsonl.gz:456139",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/190333"
} | [
0.013641357421875,
-0.033538818359375,
-0.020904541015625,
-0.029754638671875,
-0.030731201171875,
-0.0164947509765625,
-0.0160369873046875,
0.00839996337890625,
-0.03753662109375,
0.00267791748046875,
-0.0034503936767578125,
0.0101470947265625,
-0.038970947265625,
-0.028472900390625,
0.00843048095703125,
-0.04693603515625,
0.04522705078125,
-0.011260986328125,
0.0088043212890625,
-0.012237548828125,
-0.004299163818359375,
0.028076171875,
-0.008514404296875,
0.08294677734375,
0.0635986328125,
-0.03582763671875,
0.01401519775390625,
0.018035888671875,
0.04949951171875,
0.0286865234375,
0.041839599609375,
-0.0648193359375,
0.0124664306640625,
0.045074462890625,
-0.0234832763671875,
0.0192413330078125,
0.0170440673828125,
0.0117034912109375,
0.0225830078125,
0.018280029296875,
0.025390625,
-0.0169219970703125,
0.09014892578125,
-0.03900146484375,
0.037628173828125,
-0.012359619140625,
0.0186614990234375,
-0.063720703125,
-0.010772705078125,
-0.0227203369140625,
0.01416778564453125,
-0.026092529296875,
0.0413818359375,
0.0040740966796875,
-0.03173828125,
-0.029296875,
0.0092010498046875,
0.053619384765625,
0.02960205078125,
-0.07525634765625,
-0.0562744140625,
0.018798828125,
0.033355712890625,
0.046112060546875,
-0.0196990966796875,
0.008270263671875,
0.0185699462890625,
0.0251007080078125,
-0.040069580078125,
-0.05328369140625,
0.00659942626953125,
-0.01520538330078125,
0.009002685546875,
0.01323699951171875,
-0.035369873046875,
-0.0447998046875,
0.0075225830078125,
-0.045684814453125,
0.019744873046875,
0.0081634521484375,
-0.007694244384765625,
-0.00458526611328125,
-0.0258636474609375,
-0.03851318359375,
0.0288238525390625,
0.0090484619140625,
-0.021331787109375,
-0.01479339599609375,
0.017547607421875,
-0.01134490966796875,
0.0024433135986328125,
-0.0188446044921875,
0.007843017578125,
0.01085662841796875,
-0.01593017578125,
-0.036712646484375,
-0.02239990234375,
0.0078277587890625,
-0.0249481201171875,
-0.0157623291015625,
-0.0185394287109375,
0.00311279296875,
-0.056610107421875,
0.006427764892578125,
0.00675201416015625,
0.072998046875,
-0.0174713134765625,
0.0330810546875,
0.03887939453125,
0.02020263671875,
0.0254974365234375,
-0.0233001708984375,
0.016754150390625,
-0.005268096923828125,
0.01190948486328125,
0.03228759765625,
0.02520751953125,
0.01300811767578125,
-0.01354217529296875,
-0.00579833984375,
0.0072784423828125,
0.0166168212890625,
0.0007309913635253906,
-0.0219573974609375,
0.0037708282470703125,
-0.0142822265625,
-0.0212860107421875,
0.00830841064453125,
0.003528594970703125,
0.0294647216796875,
-0.00485992431640625,
0.0253753662109375,
-0.01189422607421875,
-0.02874755859375,
-0.048675537109375,
0.005825042724609375,
0.029327392578125,
-0.006702423095703125,
-0.005023956298828125,
0.01514434814453125,
-0.0033245086669921875,
-0.04302978515625,
-0.0163421630859375,
-0.00910186767578125,
-0.0302276611328125,
-0.012725830078125,
0.0018987655639648438,
0.06085205078125,
-0.01486968994140625,
-0.035491943359375,
0.04827880859375,
-0.049346923828125,
0.004669189453125,
0.00665283203125,
0.021026611328125,
-0.00495147705078125,
0.006969451904296875,
-0.025054931640625,
0.00798797607421875,
-0.00794219970703125,
-0.02166748046875,
-0.0037250518798828125,
0.023284912109375,
-0.014312744140625,
-0.0033512115478515625,
-0.0016145706176757812,
-0.0120086669921875,
0.00891876220703125,
0.0257568359375,
-0.0228729248046875,
0.040802001953125,
-0.0200042724609375,
0.0245513916015625,
-0.0039215087890625,
0.004436492919921875,
0.025177001953125,
-0.0347900390625,
-0.011871337890625,
0.026580810546875,
-0.006519317626953125,
-0.0018978118896484375,
-0.027923583984375,
0.016845703125,
0.00926971435546875,
-0.0166778564453125,
-0.0199737548828125,
0.0214996337890625,
0.03497314453125,
0.00812530517578125,
0.02490234375,
0.0008487701416015625,
-0.004638671875,
-0.0655517578125,
0.053924560546875,
0.00298309326171875,
0.0015506744384765625,
-0.01154327392578125,
0.0018186569213867188,
-0.00672149658203125,
-0.0350341796875,
-0.03875732421875,
0.03875732421875,
-0.015289306640625,
0.01477813720703125,
0.0016298294067382812,
0.024932861328125,
-0.003894805908203125,
0.047149658203125,
0.045318603515625,
0.00783538818359375,
-0.025054931640625,
-0.0200347900390625,
0.037261962890625,
-0.0875244140625,
-0.0653076171875,
0.0196685791015625,
-0.044403076171875,
0.032470703125,
-0.0016336441040039062,
-0.007232666015625,
-0.029266357421875,
-0.012115478515625,
0.01245880126953125,
-0.01300048828125,
-0.01287841796875,
-0.0007710456848144531,
-0.02618408203125,
-0.0020885467529296875,
0.00982666015625,
0.016082763671875,
0.01160430908203125,
0.0117034912109375,
0.02325439453125,
0.049102783203125,
-0.0028247833251953125,
-0.02911376953125,
0.00897979736328125,
-0.0809326171875,
0.0282135009765625,
0.048797607421875,
0.0289154052734375,
0.0167236328125,
-0.00888824462890625,
0.0272674560546875,
-0.0014715194702148438,
-0.08319091796875,
-0.00939178466796875,
0.008148193359375,
-0.0001316070556640625,
0.005924224853515625,
-0.0010271072387695312,
-0.0269622802734375,
0.02825927734375,
-0.049560546875,
-0.0093994140625,
0.033050537109375,
0.0257415771484375,
-0.002735137939453125,
-0.0233001708984375,
0.059600830078125,
-0.005672454833984375,
0.035400390625,
-0.005046844482421875,
0.0072479248046875,
-0.01155853271484375,
0.0440673828125,
0.016326904296875,
0.0196075439453125,
-0.0236053466796875,
0.027008056640625,
0.0230712890625,
-0.0139312744140625,
0.0086517333984375,
0.0270538330078125,
0.040374755859375,
0.02880859375,
-0.01317596435546875,
-0.01424407958984375,
0.0176849365234375,
0.0224151611328125,
0.007190704345703125,
0.07867431640625,
-0.01073455810546875,
-0.0283355712890625,
-0.0156097412109375,
-0.01494598388671875,
-0.03131103515625,
-0.00756072998046875,
0.0156707763671875,
0.0004057884216308594,
0.033935546875,
0.00527191162109375,
-0.04266357421875,
0.042694091796875,
-0.00914764404296875,
-0.03253173828125,
0.0266876220703125,
-0.055877685546875,
0.035400390625,
-0.01715087890625,
0.049530029296875,
0.08258056640625,
0.0197601318359375,
-0.01898193359375,
-0.016204833984375,
-0.014556884765625,
-0.005462646484375,
-0.0191497802734375,
-0.032196044921875,
-0.032073974609375,
-0.03857421875,
0.0211029052734375,
0.010528564453125,
-0.049774169921875,
0.0266571044921875,
0.0138397216796875,
-0.0283966064453125,
-0.0138397216796875,
-0.053741455078125,
-0.029754638671875,
-0.0178680419921875,
-0.11376953125,
-0.01198577880859375,
-0.0178375244140625,
-0.06512451171875,
0.011810302734375,
0.0177001953125,
0.02008056640625,
0.01312255859375,
-0.04071044921875,
-0.03997802734375,
-0.047271728515625,
-0.07147216796875,
-0.033355712890625,
0.007080078125,
0.0071563720703125,
-0.00262451171875,
0.07061767578125,
0.0104217529296875,
-0.055267333984375,
-0.02490234375,
-0.02093505859375,
-0.0240478515625,
0.0008931159973144531,
-0.0155487060546875,
-0.001644134521484375,
0.0333251953125,
0.005352020263671875,
-0.0401611328125,
0.0110626220703125,
0.0137481689453125,
-0.0302734375,
-0.00027298927307128906,
-0.08538818359375,
-0.01427459716796875,
0.0002384185791015625,
-0.004314422607421875,
-0.049224853515625,
0.0123443603515625,
-0.060028076171875,
0.021759033203125,
0.0191192626953125,
0.00555419921875,
-0.034210205078125,
-0.0207672119140625,
-0.043426513671875,
0.010650634765625,
-0.0243072509765625,
0.060546875,
0.072998046875,
0.04071044921875,
0.037933349609375,
-0.039093017578125,
-0.005352020263671875,
-0.00797271728515625,
-0.0640869140625,
0.028594970703125,
-0.0318603515625,
0.01715087890625,
0.0019254684448242188,
-0.032623291015625,
-0.01105499267578125,
-0.03350830078125,
-0.021636962890625,
-0.04791259765625,
0.052642822265625,
-0.005390167236328125,
0.007701873779296875,
-0.0361328125,
-0.023345947265625,
-0.013671875,
0.0654296875,
-0.06927490234375,
-0.0147705078125,
0.005767822265625,
0.01611328125,
-0.01311492919921875,
-0.0200347900390625,
-0.051513671875,
-0.0235443115234375,
-0.041900634765625,
0.022003173828125,
0.01320648193359375,
-0.004169464111328125,
-0.0284423828125,
-0.0292816162109375,
-0.050048828125,
-0.030487060546875,
0.0170745849609375,
0.037017822265625,
0.03155517578125,
-0.034637451171875,
0.03466796875,
-0.0304718017578125,
0.0084991455078125,
-0.0156097412109375,
-0.0526123046875,
-0.014007568359375,
-0.051544189453125,
0.08929443359375,
0.03363037109375,
-0.0294952392578125,
0.0036106109619140625,
0.05340576171875,
-0.0176849365234375,
-0.0146636962890625,
0.039398193359375,
0.0176849365234375,
0.01110076904296875,
0.0355224609375,
0.020416259765625,
-0.01447296142578125,
-0.004909515380859375,
-0.018768310546875,
-0.033203125,
0.017669677734375,
-0.0242919921875,
0.0111236572265625,
-0.0006494522094726562,
-0.0177154541015625,
-0.0260467529296875,
-0.0196533203125,
-0.0190887451171875,
0.03765869140625,
-0.0162353515625,
0.0093994140625,
-0.03607177734375,
-0.043975830078125,
0.016632080078125,
-0.032745361328125,
-0.0160675048828125,
0.0023975372314453125,
0.0667724609375,
0.01605224609375,
0.01093292236328125,
0.01354217529296875,
-0.031158447265625,
0.01800537109375,
-0.007534027099609375,
0.043426513671875,
0.00409698486328125,
-0.025360107421875,
0.06756591796875,
-0.0011663436889648438,
-0.0035724639892578125,
-0.004421234130859375,
0.02325439453125,
-0.00185394287109375,
0.002376556396484375,
0.00458526611328125,
-0.016632080078125,
0.00798797607421875,
0.0182037353515625,
-0.026885986328125,
0.03021240234375,
0.0151214599609375,
-0.017608642578125,
-0.03271484375,
0.01142120361328125,
0.0179443359375,
-0.0023746490478515625,
0.00795745849609375,
-0.01372528076171875,
0.0306396484375,
0.0285797119140625,
-0.01076507568359375,
-0.0134124755859375,
-0.0028228759765625,
-0.0035572052001953125,
0.01543426513671875,
0.0333251953125,
-0.011077880859375,
0.0031337738037109375,
0.0232696533203125,
-0.0152130126953125,
-0.025115966796875,
-0.0110626220703125,
0.01300048828125,
0.00615692138671875,
-0.035552978515625,
-0.0018053054809570312,
-0.01611328125,
-0.0296478271484375,
-0.005741119384765625,
0.0121002197265625,
0.05975341796875,
0.008636474609375,
-0.048675537109375,
-0.02313232421875,
-0.00685882568359375,
-0.028076171875,
-0.0635986328125,
-0.0277557373046875,
-0.055938720703125,
-0.00415802001953125,
-0.0008544921875,
0.018524169921875,
-0.0806884765625,
0.02447509765625,
0.0160675048828125,
0.0248260498046875,
-0.015869140625,
0.039398193359375,
0.0174560546875,
-0.0141754150390625,
-0.0001608133316040039,
0.02227783203125,
-0.01476287841796875,
0.0033245086669921875,
-0.02667236328125,
-0.0028362274169921875,
0.0170135498046875,
-0.0193939208984375,
0.01617431640625,
0.0163116455078125,
-0.0015583038330078125,
0.007526397705078125,
0.0014505386352539062,
-0.01508331298828125,
-0.042816162109375,
0.0096893310546875,
0.01007843017578125,
-0.00015807151794433594,
-0.03338623046875,
-0.002445220947265625,
0.023590087890625,
0.003162384033203125,
0.0782470703125,
-0.004947662353515625,
0.033966064453125,
-0.00537872314453125,
-0.007686614990234375,
-0.07257080078125,
-0.0171966552734375,
0.006603240966796875,
-0.042205810546875,
-0.0369873046875,
0.0110321044921875,
-0.0194854736328125,
0.0055389404296875,
-0.037322998046875,
-0.0086822509765625,
-0.0254669189453125,
0.0235137939453125,
-0.0159912109375,
0.0160980224609375,
0.037811279296875,
0.016510009765625,
0.013702392578125,
-0.0178375244140625,
-0.0460205078125,
-0.051605224609375,
-0.0157012939453125,
-0.005283355712890625,
-0.031829833984375,
-0.00275421142578125,
-0.0086212158203125,
0.01451873779296875,
0.0175628662109375,
0.037994384765625,
-0.0243377685546875,
0.0259552001953125,
0.002994537353515625,
0.0253143310546875,
-0.00634765625,
0.05438232421875,
0.028289794921875,
0.00571441650390625,
0.037109375,
0.06268310546875,
0.02099609375,
-0.026947021484375,
0.03289794921875,
0.0086517333984375,
-0.06732177734375,
-0.0447998046875,
-0.0088653564453125,
0.00429534912109375,
0.051666259765625,
-0.029510498046875,
0.0038604736328125,
-0.01065826416015625,
0.003627777099609375,
-0.0084381103515625,
0.0210418701171875,
0.0206451416015625,
-0.0018568038940429688,
0.022308349609375,
0.01132965087890625,
0.06146240234375,
-0.0230560302734375,
0.0304107666015625,
-0.043487548828125,
-0.0208282470703125,
-0.005809783935546875,
0.00681304931640625,
0.0302581787109375,
-0.0177001953125,
0.041046142578125,
-0.0230865478515625,
0.040679931640625,
0.046966552734375,
0.025238037109375,
0.0479736328125,
-0.0190582275390625,
-0.039794921875,
0.014068603515625,
0.042572021484375,
-0.0106353759765625,
-0.034454345703125,
0.015869140625,
-0.0201416015625,
0.0372314453125,
0.06732177734375,
0.09918212890625,
-0.1234130859375,
0.0428466796875,
0.05059814453125,
0.017578125,
0.045196533203125,
0.0120391845703125,
-0.0148468017578125,
-0.0084686279296875,
0.0201416015625,
-0.024993896484375,
-0.02996826171875,
0.00489044189453125,
0.00209808349609375,
0.01136016845703125,
0.01383209228515625,
0.07720947265625,
0.006282806396484375,
-0.06427001953125,
-0.0213623046875,
0.0467529296875,
0.004550933837890625,
-0.029693603515625,
0.0092620849609375,
0.02459716796875,
-0.03753662109375,
-0.0726318359375,
0.01497650146484375,
0.0149078369140625,
-0.01873779296875,
0.018890380859375,
0.01224517822265625,
0.0278167724609375,
0.0458984375,
-0.00978851318359375,
0.0171966552734375,
0.01824951171875,
0.000047147274017333984,
0.031982421875,
-0.032073974609375,
0.01221466064453125,
0.028533935546875,
-0.027862548828125,
0.011962890625,
0.0028858184814453125,
-0.02606201171875,
0.00897979736328125,
-0.005428314208984375,
0.027618408203125,
-0.01352691650390625,
-0.01508331298828125,
0.004680633544921875,
-0.01226806640625,
0.0204010009765625,
-0.02252197265625,
-0.0009832382202148438,
-0.0687255859375,
-0.0286712646484375,
-0.0035686492919921875,
-0.00545501708984375,
0.044769287109375,
0.003265380859375,
-0.05877685546875,
0.042938232421875,
0.002742767333984375,
0.014434814453125,
-0.005504608154296875,
0.01555633544921875,
-0.0016632080078125,
0.00322723388671875,
-0.023895263671875,
0.038909912109375,
0.032196044921875,
0.0168914794921875,
-0.0771484375,
-0.0455322265625,
-0.01116180419921875,
0.06829833984375,
0.035552978515625,
0.00618743896484375,
-0.0731201171875,
-0.032745361328125,
0.0081634521484375,
0.011810302734375,
0.00855255126953125,
0.08319091796875,
-0.0196685791015625,
0.04241943359375,
0.0180511474609375,
-0.03338623046875,
0.035186767578125,
-0.01047515869140625,
-0.0526123046875,
0.01314544677734375,
0.007843017578125,
-0.0186004638671875,
-0.01360321044921875,
0.01544952392578125,
-0.059814453125,
0.0085906982421875,
0.014129638671875,
0.0428466796875,
0.014892578125,
0.034912109375,
0.03826904296875,
-0.031646728515625,
-0.013885498046875,
-0.016571044921875,
0.036651611328125,
-0.00952911376953125,
-0.04058837890625,
0.0026378631591796875,
0.01132965087890625,
-0.07421875,
-0.035369873046875,
-0.03778076171875,
0.01358795166015625,
-0.01061248779296875,
-0.032318115234375,
-0.0105743408203125,
0.0170745849609375,
-0.0257110595703125,
-0.00934600830078125,
0.05059814453125,
-0.010101318359375,
0.00803375244140625,
-0.044464111328125,
0.0008215904235839844,
-0.0159454345703125,
0.03369140625,
0.006351470947265625,
0.057952880859375,
-0.0240936279296875,
-0.005031585693359375,
0.00951385498046875,
0.00958251953125,
0.0023822784423828125,
0.025604248046875,
0.01496124267578125,
0.052886962890625,
-0.037139892578125,
0.0006694793701171875,
0.0037136077880859375,
-0.03814697265625,
-0.01132965087890625,
0.010894775390625,
0.0504150390625,
-0.0096435546875,
0.00750732421875,
-0.004291534423828125,
-0.03472900390625,
0.0198516845703125,
0.01358795166015625,
0.0290374755859375,
-0.01500701904296875,
0.042083740234375,
-0.01499176025390625,
0.0161590576171875,
0.0293121337890625,
0.0208892822265625,
0.021697998046875,
0.00502777099609375,
0.00818634033203125,
-0.0154266357421875,
0.0261077880859375,
-0.0184173583984375,
-0.01221466064453125,
-0.024078369140625,
0.03277587890625,
0.06744384765625,
0.01910400390625,
0.0239410400390625,
-0.0256500244140625,
0.0943603515625,
-0.0124664306640625,
0.028228759765625,
-0.0048828125,
-0.031982421875,
0.0296478271484375,
-0.023101806640625,
0.08026123046875,
0.0021381378173828125,
-0.043670654296875,
0.032867431640625,
-0.033111572265625,
-0.06854248046875,
-0.002349853515625,
0.03179931640625,
-0.01479339599609375,
0.0196533203125,
0.0198211669921875,
0.005840301513671875,
-0.038787841796875,
0.007762908935546875,
0.0289154052734375,
0.00019466876983642578,
0.0031108856201171875,
0.032867431640625,
-0.105712890625,
-0.07623291015625,
-0.07861328125,
0.0662841796875,
0.037872314453125,
0.09600830078125,
-0.0157470703125,
0.04779052734375,
0.01158905029296875,
0.01161956787109375,
0.006622314453125,
0.001956939697265625,
0.00910186767578125,
0.0294342041015625,
0.02484130859375,
-0.039520263671875,
-0.0841064453125,
0.048004150390625,
0.0047149658203125,
0.01387786865234375,
0.0548095703125,
-0.0179443359375,
-0.0061798095703125,
-0.007755279541015625,
-0.0095977783203125,
-0.033966064453125,
-0.06060791015625,
0.004352569580078125,
0.04278564453125,
-0.0277099609375,
-0.01375579833984375,
0.0031528472900390625,
0.038299560546875,
-0.004795074462890625,
-0.005916595458984375,
0.0006494522094726562,
-0.035064697265625,
-0.0203094482421875,
0.021728515625,
0.005077362060546875,
0.01041412353515625,
-0.036773681640625,
-0.0249176025390625,
-0.01116180419921875,
0.0098724365234375,
-0.0201568603515625,
-0.031036376953125,
0.0189208984375,
0.004360198974609375,
0.0190582275390625,
0.0523681640625,
0.006702423095703125,
0.01313018798828125,
-0.01557159423828125,
-0.0009145736694335938,
-0.0296630859375,
-0.005298614501953125,
-0.01629638671875,
-0.0117034912109375,
-0.032073974609375,
0.00675201416015625,
-0.007282257080078125,
-0.05340576171875,
-0.028411865234375,
-0.021881103515625,
0.0256500244140625,
-0.018829345703125,
0.003841400146484375,
-0.018096923828125,
-0.035552978515625,
0.027496337890625,
-0.0142059326171875,
-0.01435089111328125,
-0.0147552490234375,
0.008453369140625,
-0.01087188720703125,
-0.018402099609375,
-0.031494140625,
0.030181884765625,
-0.01340484619140625,
0.02850341796875,
0.0172576904296875,
-0.0080413818359375,
0.00777435302734375,
0.0190887451171875,
0.0159149169921875,
0.061920166015625,
-0.02325439453125,
-0.035186767578125,
-0.0204620361328125,
0.017608642578125,
-0.00988006591796875,
0.01247406005859375,
0.0177459716796875,
0.019805908203125,
-0.024993896484375,
0.0224761962890625,
-0.043304443359375,
-0.0287322998046875,
-0.055084228515625,
-0.07000732421875,
0.0645751953125,
0.0032329559326171875,
-0.032562255859375,
-0.03948974609375,
0.011383056640625,
0.0157928466796875,
0.0019664764404296875,
-0.0165863037109375,
-0.01029205322265625,
-0.038970947265625,
0.0008578300476074219,
-0.00501251220703125,
-0.056304931640625,
0.05908203125,
-0.03387451171875,
-0.025665283203125,
-0.0039215087890625,
0.0280914306640625,
-0.05157470703125,
-0.01311492919921875,
0.02716064453125,
0.0294342041015625,
0.050811767578125,
0.01239776611328125,
0.04864501953125,
0.020172119140625,
-0.037445068359375,
-0.01029205322265625,
0.003826141357421875,
-0.0233001708984375,
0.0032329559326171875,
0.0811767578125,
0.055145263671875,
0.0202789306640625,
-0.04345703125,
-0.06610107421875,
-0.08465576171875,
0.02862548828125,
-0.035919189453125,
-0.01081085205078125,
-0.0755615234375,
0.00925445556640625,
0.00835418701171875,
-0.00009751319885253906,
0.054046630859375,
0.0305328369140625,
0.01971435546875,
0.00025153160095214844,
0.05218505859375,
-0.03411865234375,
-0.0457763671875,
0.06781005859375,
0.0287322998046875,
-0.02783203125,
0.017578125,
-0.021392822265625,
-0.0167236328125,
0.04052734375,
-0.025482177734375,
0.009765625,
0.0168304443359375,
-0.0199432373046875,
0.0181427001953125,
0.0195770263671875,
0.011016845703125,
-0.011993408203125,
-0.02862548828125,
-0.012054443359375,
-0.01580810546875,
0.0204620361328125,
-0.005462646484375,
-0.006259918212890625,
-0.0626220703125,
-0.00615692138671875,
-0.0155181884765625,
-0.00670623779296875,
-0.0615234375,
-0.020782470703125,
0.01898193359375,
0.0030078887939453125,
-0.0212860107421875,
0.04052734375,
-0.055908203125,
-0.0011262893676757812,
0.015106201171875,
-0.004039764404296875,
-0.050994873046875,
0.040985107421875,
-0.01617431640625,
0.0081024169921875,
0.0157318115234375
]
|
5b909e9fb294c46aa49a20092967c3c24eb89074 | Wordpress Stackexchange
Q: How to intercept publish post for a custom post type "event" I am trying to write a plugin that copies a custom post type "event" from one blog to another. The code for copying I already have working but I cannot seem to get this "add_action" hook to work when an event is published.
add_action('publish_event', 'copy_event_to_mini_site' );
function copy_event_to_mini_site() {
code in here to copy relevant data from one blog to the other
}
I also tried: add_action('publish_post', 'copy_event_to_mini_site' );
That did not work either.
A: Read the codex, that's where i finally found the answer :
https://codex.wordpress.org/Plugin_API/Action_Reference/publish_post
in the end :
Custom Post Types
To trigger this action for a custom post type, use publish_{$custom_post_type}. e.g. if your post type is 'book' use:
add_action( 'publish_book', 'post_published_notification', 10, 2 );
| Q: How to intercept publish post for a custom post type "event" I am trying to write a plugin that copies a custom post type "event" from one blog to another. The code for copying I already have working but I cannot seem to get this "add_action" hook to work when an event is published.
add_action('publish_event', 'copy_event_to_mini_site' );
function copy_event_to_mini_site() {
code in here to copy relevant data from one blog to the other
}
I also tried: add_action('publish_post', 'copy_event_to_mini_site' );
That did not work either.
A: Read the codex, that's where i finally found the answer :
https://codex.wordpress.org/Plugin_API/Action_Reference/publish_post
in the end :
Custom Post Types
To trigger this action for a custom post type, use publish_{$custom_post_type}. e.g. if your post type is 'book' use:
add_action( 'publish_book', 'post_published_notification', 10, 2 );
A: transition_post_status helps you to perform for all post types and change from one status to other,say for example, pending to publish. or new publishing post.
Here is official WordPress Codec Page
.
function on_all_status_transitions( $new_status, $old_status, $post )
{
if ( $new_status != $old_status ) {
// A function to perform actions any time any post changes status.
}
if ( $new_status != 'publish' ) {
// A function to perform action when new post published.
}
}
add_action( 'transition_post_status', 'on_all_status_transitions', 10, 3 );
I hope this will help universally for all custom post types and default post types.
A: *
*{old_status}to{new_status}
*{status}_{post_type}
The available post statuses are:
*
*new – When there’s no previous status (this means these hooks are
always run whenever "save_post" runs.
*publish – A published post or page.
*pending – A post pending review.
*draft – A post in draft status.
*auto-draft – A newly created post with no content.
*future – A post scheduled to publish in the future.
*private – Not visible to users who are not logged in.
*inherit – A revision or attachment (see get_children()).
*trash – Post is in the trash (added with Version 2.9).
You can create events per post status transitions as you need.
| wordpress | {
"language": "en",
"length": 338,
"provenance": "stackexchange_00019.jsonl.gz:456152",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/190381"
} | [
0.049560546875,
-0.0079803466796875,
0.007686614990234375,
-0.01105499267578125,
0.01134490966796875,
-0.038909912109375,
0.04534912109375,
-0.031463623046875,
-0.0237274169921875,
0.002719879150390625,
0.054229736328125,
0.00864410400390625,
-0.005367279052734375,
-0.06573486328125,
0.0416259765625,
0.006999969482421875,
0.05694580078125,
-0.0235443115234375,
0.039154052734375,
-0.0094757080078125,
0.006580352783203125,
0.032501220703125,
0.050079345703125,
0.00640869140625,
0.04974365234375,
-0.0007829666137695312,
0.050537109375,
-0.0208282470703125,
0.05755615234375,
0.0111083984375,
0.03887939453125,
-0.073974609375,
0.030792236328125,
0.050811767578125,
-0.0634765625,
0.03143310546875,
-0.000507354736328125,
0.0172576904296875,
-0.02081298828125,
0.04986572265625,
0.031036376953125,
-0.014251708984375,
0.0306243896484375,
0.031646728515625,
-0.002170562744140625,
-0.031951904296875,
0.03192138671875,
-0.035736083984375,
-0.01190948486328125,
-0.00567626953125,
-0.005245208740234375,
-0.016510009765625,
0.00647735595703125,
0.0090179443359375,
-0.0027217864990234375,
0.025360107421875,
-0.0626220703125,
0.05743408203125,
0.00995635986328125,
0.034332275390625,
0.01383209228515625,
0.019866943359375,
-0.007843017578125,
-0.016815185546875,
0.007503509521484375,
0.00165557861328125,
0.020416259765625,
0.0022125244140625,
-0.0133514404296875,
-0.00014328956604003906,
0.0200653076171875,
-0.02337646484375,
-0.0157623291015625,
0.01220703125,
0.0021381378173828125,
-0.02880859375,
0.0172576904296875,
-0.00494384765625,
-0.0082244873046875,
0.053009033203125,
-0.0396728515625,
-0.002002716064453125,
0.00785064697265625,
-0.04168701171875,
0.0048065185546875,
-0.01284027099609375,
-0.03485107421875,
0.015777587890625,
-0.01239013671875,
-0.01129150390625,
-0.01531219482421875,
-0.0362548828125,
-0.0119781494140625,
0.0260772705078125,
-0.011444091796875,
-0.036834716796875,
0.0301513671875,
0.078857421875,
-0.06585693359375,
0.00843048095703125,
-0.04144287109375,
0.0009293556213378906,
0.0029392242431640625,
-0.042510986328125,
0.0298004150390625,
0.02496337890625,
-0.019683837890625,
-0.035186767578125,
0.042083740234375,
0.01800537109375,
-0.01082611083984375,
0.034088134765625,
-0.01560211181640625,
0.002696990966796875,
-0.0161895751953125,
0.0024738311767578125,
-0.050537109375,
0.04205322265625,
-0.00916290283203125,
0.05828857421875,
0.0163726806640625,
0.0183258056640625,
0.0037326812744140625,
-0.0253143310546875,
-0.0018777847290039062,
-0.01303863525390625,
-0.03204345703125,
-0.0106353759765625,
0.043243408203125,
-0.006267547607421875,
-0.04241943359375,
0.0212554931640625,
0.06964111328125,
-0.006496429443359375,
0.007244110107421875,
-0.01171875,
0.02740478515625,
-0.0096282958984375,
0.0027866363525390625,
0.01412200927734375,
0.0162506103515625,
-0.0257568359375,
-0.0259857177734375,
0.016143798828125,
-0.0200653076171875,
0.002796173095703125,
-0.0135040283203125,
0.021453857421875,
0.00809478759765625,
-0.0333251953125,
0.0013589859008789062,
-0.033477783203125,
0.037872314453125,
0.0024013519287109375,
-0.0208282470703125,
-0.0567626953125,
0.004924774169921875,
-0.051666259765625,
0.032135009765625,
-0.04833984375,
0.0140838623046875,
0.0027561187744140625,
0.0206451416015625,
0.001132965087890625,
-0.020111083984375,
0.01068115234375,
-0.052215576171875,
-0.019012451171875,
0.01806640625,
0.01380157470703125,
-0.00579833984375,
0.01100921630859375,
-0.01898193359375,
0.01904296875,
-0.0006651878356933594,
0.0167236328125,
-0.002788543701171875,
0.0072021484375,
0.0296173095703125,
-0.0013818740844726562,
-0.024078369140625,
-0.0250701904296875,
0.055450439453125,
-0.02490234375,
-0.039154052734375,
0.0435791015625,
0.02984619140625,
0.047088623046875,
-0.0258941650390625,
0.01345062255859375,
0.029571533203125,
0.051727294921875,
-0.034759521484375,
-0.0010881423950195312,
-0.03900146484375,
-0.006679534912109375,
0.044219970703125,
0.01311492919921875,
-0.007110595703125,
0.0283660888671875,
-0.039703369140625,
0.027496337890625,
-0.017486572265625,
0.0196380615234375,
-0.0213165283203125,
0.0286865234375,
-0.01528167724609375,
0.035247802734375,
0.0178070068359375,
-0.0043487548828125,
-0.00021386146545410156,
0.01107025146484375,
-0.0093994140625,
-0.037628173828125,
-0.04669189453125,
0.03564453125,
-0.0160675048828125,
0.00604248046875,
-0.03131103515625,
0.0291595458984375,
-0.034515380859375,
-0.05230712890625,
-0.044769287109375,
-0.006927490234375,
0.052001953125,
-0.0576171875,
0.0191650390625,
-0.0391845703125,
0.035858154296875,
-0.0003490447998046875,
-0.0214691162109375,
0.00931549072265625,
0.015289306640625,
-0.041778564453125,
-0.01617431640625,
0.0292510986328125,
0.01849365234375,
-0.08636474609375,
-0.00812530517578125,
0.056884765625,
0.024871826171875,
0.0094451904296875,
0.005886077880859375,
0.032958984375,
0.007015228271484375,
-0.03045654296875,
0.0234222412109375,
-0.0120849609375,
0.048797607421875,
0.09033203125,
-0.017486572265625,
-0.0213165283203125,
-0.002773284912109375,
-0.07269287109375,
0.0232391357421875,
0.009307861328125,
0.01332855224609375,
0.00592803955078125,
-0.0027904510498046875,
-0.0081787109375,
0.0009016990661621094,
-0.0282440185546875,
-0.040283203125,
-0.0027561187744140625,
0.007411956787109375,
0.022674560546875,
0.0246734619140625,
0.0163116455078125,
-0.03436279296875,
-0.0005393028259277344,
0.0191802978515625,
0.03302001953125,
0.01629638671875,
0.0185089111328125,
0.005489349365234375,
0.06646728515625,
-0.019287109375,
-0.02923583984375,
0.040771484375,
0.022430419921875,
-0.00893402099609375,
0.062286376953125,
-0.05792236328125,
-0.0239410400390625,
-0.0081787109375,
-0.0196075439453125,
-0.053436279296875,
-0.037353515625,
0.020355224609375,
-0.0443115234375,
-0.00836181640625,
0.0034942626953125,
-0.039154052734375,
0.056427001953125,
0.028472900390625,
-0.056243896484375,
0.0242462158203125,
-0.06439208984375,
0.06591796875,
-0.0457763671875,
0.050140380859375,
0.07257080078125,
-0.0274810791015625,
0.041778564453125,
0.00237274169921875,
-0.003597259521484375,
-0.037017822265625,
0.043670654296875,
-0.0006432533264160156,
-0.01434326171875,
-0.074462890625,
-0.0128173828125,
0.038543701171875,
0.0338134765625,
0.025054931640625,
-0.0119171142578125,
-0.0106353759765625,
0.053863525390625,
-0.034759521484375,
-0.0229949951171875,
0.01068115234375,
-0.06396484375,
0.004970550537109375,
-0.040313720703125,
-0.0224151611328125,
0.006870269775390625,
-0.026123046875,
0.006923675537109375,
-0.03973388671875,
0.005336761474609375,
0.01415252685546875,
-0.02459716796875,
-0.0251007080078125,
-0.013946533203125,
0.0193634033203125,
0.03143310546875,
0.0079193115234375,
0.0792236328125,
0.0268096923828125,
-0.04052734375,
0.0262908935546875,
0.02880859375,
-0.039703369140625,
0.0129241943359375,
0.002513885498046875,
-0.0396728515625,
0.01441192626953125,
-0.0016002655029296875,
0.003635406494140625,
0.0268402099609375,
-0.01200103759765625,
-0.00621795654296875,
-0.00252532958984375,
-0.0011548995971679688,
0.02667236328125,
0.0194091796875,
-0.00948333740234375,
0.03289794921875,
0.055450439453125,
-0.0292510986328125,
0.00949859619140625,
0.0133209228515625,
-0.0142364501953125,
-0.0582275390625,
-0.00304412841796875,
-0.018280029296875,
-0.03729248046875,
0.0301666259765625,
0.0244598388671875,
0.033905029296875,
0.06829833984375,
0.0242767333984375,
-0.00286102294921875,
-0.029388427734375,
-0.03387451171875,
-0.07830810546875,
-0.035247802734375,
-0.0230560302734375,
0.0704345703125,
-0.0063629150390625,
0.02520751953125,
-0.0255584716796875,
0.06341552734375,
-0.04205322265625,
-0.06982421875,
0.02099609375,
-0.0438232421875,
0.01439666748046875,
-0.01013946533203125,
-0.0185394287109375,
0.033203125,
0.09185791015625,
-0.044097900390625,
-0.01934814453125,
0.01520538330078125,
0.011932373046875,
-0.030029296875,
-0.026641845703125,
-0.03277587890625,
-0.0064849853515625,
-0.01184844970703125,
0.002712249755859375,
0.0023937225341796875,
-0.0091094970703125,
-0.01175689697265625,
-0.00616455078125,
-0.01393890380859375,
-0.011810302734375,
0.03912353515625,
-0.0175018310546875,
0.00455474853515625,
0.046417236328125,
-0.01032257080078125,
0.0181121826171875,
-0.0216827392578125,
-0.01374053955078125,
-0.026031494140625,
-0.0072174072265625,
-0.0108489990234375,
0.01369476318359375,
0.009918212890625,
0.01502227783203125,
-0.0029888153076171875,
0.026397705078125,
0.025726318359375,
0.001556396484375,
-0.02685546875,
-0.03302001953125,
-0.032867431640625,
0.02154541015625,
-0.01197052001953125,
0.0028362274169921875,
0.00139617919921875,
0.038970947265625,
-0.039154052734375,
0.00920867919921875,
-0.0052642822265625,
-0.041351318359375,
0.06341552734375,
-0.0643310546875,
-0.04449462890625,
-0.01038360595703125,
0.01189422607421875,
-0.001155853271484375,
0.007476806640625,
-0.0179443359375,
-0.002780914306640625,
-0.028472900390625,
0.035125732421875,
-0.052764892578125,
-0.014373779296875,
0.0010919570922851562,
0.03875732421875,
0.00843048095703125,
-0.00798797607421875,
0.044677734375,
0.026702880859375,
-0.003173828125,
-0.0221405029296875,
0.022125244140625,
0.00595855712890625,
0.0216827392578125,
-0.038909912109375,
-0.036041259765625,
0.01189422607421875,
-0.06072998046875,
0.059295654296875,
0.01068115234375,
0.042236328125,
-0.01132965087890625,
-0.0092315673828125,
0.042144775390625,
0.023040771484375,
0.00737762451171875,
-0.034515380859375,
0.037384033203125,
0.0195770263671875,
-0.054107666015625,
0.062744140625,
0.0177459716796875,
-0.0005388259887695312,
0.0078125,
0.035186767578125,
-0.0127105712890625,
0.0219879150390625,
-0.00998687744140625,
-0.01849365234375,
-0.032379150390625,
-0.0027523040771484375,
0.01036834716796875,
-0.02880859375,
0.01477813720703125,
0.01605224609375,
0.0182342529296875,
0.0006036758422851562,
0.0001709461212158203,
0.0238800048828125,
-0.0280609130859375,
-0.021820068359375,
-0.0280303955078125,
-0.06781005859375,
0.007564544677734375,
-0.035980224609375,
-0.0014133453369140625,
-0.042144775390625,
0.03271484375,
0.09417724609375,
-0.029510498046875,
-0.003444671630859375,
-0.01332855224609375,
0.034027099609375,
-0.0498046875,
-0.0626220703125,
-0.01641845703125,
0.0017375946044921875,
0.02288818359375,
0.02532958984375,
-0.0044403076171875,
0.0296173095703125,
-0.034149169921875,
0.07684326171875,
0.06640625,
0.031463623046875,
0.00893402099609375,
-0.0254669189453125,
-0.021026611328125,
0.020660400390625,
-0.040771484375,
-0.03759765625,
-0.0188140869140625,
0.039337158203125,
0.02655029296875,
0.0264892578125,
0.008026123046875,
-0.002819061279296875,
0.0140228271484375,
-0.0489501953125,
0.0036067962646484375,
0.019256591796875,
0.006732940673828125,
-0.032257080078125,
-0.0039520263671875,
0.041046142578125,
0.061798095703125,
-0.006587982177734375,
0.01171112060546875,
-0.040435791015625,
-0.00882720947265625,
0.0011386871337890625,
-0.01021575927734375,
-0.0248565673828125,
-0.0225982666015625,
0.006076812744140625,
-0.041656494140625,
-0.0244903564453125,
-0.00004589557647705078,
0.01727294921875,
-0.0186767578125,
0.0006079673767089844,
0.002460479736328125,
-0.06268310546875,
-0.0169525146484375,
-0.03656005859375,
0.048187255859375,
-0.09100341796875,
0.01490020751953125,
0.056365966796875,
0.064453125,
0.004276275634765625,
-0.01078033447265625,
-0.0012426376342773438,
-0.0223236083984375,
-0.0233306884765625,
-0.031494140625,
-0.040374755859375,
-0.003025054931640625,
0.01910400390625,
0.027130126953125,
-0.011749267578125,
-0.05743408203125,
0.0027141571044921875,
-0.02569580078125,
-0.00014102458953857422,
-0.01337432861328125,
-0.008270263671875,
0.0709228515625,
-0.0096893310546875,
0.073486328125,
-0.00211334228515625,
0.0034732818603515625,
-0.0462646484375,
-0.002712249755859375,
-0.033599853515625,
-0.057220458984375,
0.01551055908203125,
0.0018968582153320312,
0.050140380859375,
0.06439208984375,
0.0262603759765625,
0.0184783935546875,
-0.0194244384765625,
-0.0074310302734375,
0.004100799560546875,
-0.02276611328125,
0.0029773712158203125,
0.0012340545654296875,
-0.03387451171875,
0.0034618377685546875,
-0.04718017578125,
-0.0144195556640625,
0.02142333984375,
0.01678466796875,
0.0126800537109375,
-0.0185699462890625,
0.0145416259765625,
0.01227569580078125,
-0.006702423095703125,
0.01568603515625,
0.0728759765625,
-0.0023174285888671875,
0.047607421875,
0.005809783935546875,
0.0088653564453125,
0.0288543701171875,
0.031829833984375,
-0.0106658935546875,
-0.0255126953125,
0.05255126953125,
-0.0036373138427734375,
-0.052001953125,
-0.0080413818359375,
-0.033599853515625,
0.0167083740234375,
0.022308349609375,
0.045074462890625,
-0.0582275390625,
0.006317138671875,
0.022918701171875,
0.00818634033203125,
0.0555419921875,
-0.006946563720703125,
-0.006206512451171875,
-0.0174407958984375,
0.0233154296875,
0.057830810546875,
-0.0114593505859375,
0.00968170166015625,
0.033416748046875,
-0.003849029541015625,
-0.02197265625,
0.00896453857421875,
0.0032787322998046875,
0.01363372802734375,
0.01739501953125,
-0.02606201171875,
0.0255126953125,
-0.0076904296875,
0.03594970703125,
-0.0021953582763671875,
-0.01554107666015625,
-0.044281005859375,
0.0262451171875,
-0.0040130615234375,
-0.019744873046875,
-0.036407470703125,
0.004314422607421875,
0.01116180419921875,
0.040313720703125,
-0.025543212890625,
-0.00974273681640625,
0.019775390625,
-0.0181121826171875,
-0.0543212890625,
-0.011383056640625,
0.01081085205078125,
0.0311737060546875,
-0.048614501953125,
0.034698486328125,
-0.0496826171875,
0.005123138427734375,
-0.007709503173828125,
-0.0131378173828125,
0.0909423828125,
-0.049957275390625,
-0.0189208984375,
0.024383544921875,
0.00765228271484375,
-0.01331329345703125,
-0.0069732666015625,
0.047882080078125,
-0.053436279296875,
-0.016326904296875,
0.0203704833984375,
-0.013702392578125,
-0.0467529296875,
-0.0009765625,
-0.05712890625,
0.11175537109375,
0.01406097412109375,
0.00836944580078125,
0.0106353759765625,
0.041046142578125,
-0.0467529296875,
0.016845703125,
-0.07501220703125,
0.083251953125,
-0.05462646484375,
0.088623046875,
-0.079345703125,
0.01020050048828125,
0.01520538330078125,
-0.01428985595703125,
0.0789794921875,
0.03143310546875,
-0.0433349609375,
-0.015777587890625,
0.00591278076171875,
-0.01143646240234375,
-0.0516357421875,
0.06439208984375,
-0.0190277099609375,
-0.0167083740234375,
0.03936767578125,
0.005767822265625,
0.03759765625,
0.01373291015625,
-0.028289794921875,
0.00958251953125,
-0.01995849609375,
-0.041717529296875,
-0.01149749755859375,
-0.01187896728515625,
0.01071929931640625,
-0.0280303955078125,
-0.0211029052734375,
-0.0237884521484375,
0.04119873046875,
0.01055145263671875,
0.035186767578125,
0.006359100341796875,
0.019866943359375,
-0.00923919677734375,
0.050323486328125,
0.0025482177734375,
0.0289459228515625,
-0.000698089599609375,
0.011260986328125,
-0.0074920654296875,
0.01326751708984375,
0.01528167724609375,
0.032318115234375,
-0.007537841796875,
0.0194244384765625,
-0.006870269775390625,
0.00408935546875,
-0.03375244140625,
0.045562744140625,
0.0308685302734375,
0.006683349609375,
-0.03948974609375,
-0.045745849609375,
0.0189361572265625,
0.026763916015625,
0.01309967041015625,
-0.007457733154296875,
-0.0096282958984375,
-0.050537109375,
0.0267181396484375,
-0.022705078125,
-0.0224609375,
-0.00792694091796875,
0.01873779296875,
0.001102447509765625,
0.0089111328125,
0.004322052001953125,
-0.04449462890625,
-0.037353515625,
-0.0019025802612304688,
0.0024242401123046875,
0.042572021484375,
0.0312042236328125,
0.0321044921875,
0.01293182373046875,
-0.0120697021484375,
-0.0000045299530029296875,
0.0138702392578125,
0.0055999755859375,
0.00141143798828125,
-0.01393890380859375,
-0.0265045166015625,
0.0150299072265625,
0.033660888671875,
0.0209808349609375,
0.0528564453125,
0.042144775390625,
0.02313232421875,
0.01543426513671875,
0.00788116455078125,
0.03692626953125,
-0.02130126953125,
0.02117919921875,
-0.047210693359375,
-0.0028934478759765625,
-0.046417236328125,
-0.031829833984375,
-0.022216796875,
0.00952911376953125,
-0.0182952880859375,
-0.00865936279296875,
-0.0108795166015625,
0.0033740997314453125,
-0.0216064453125,
0.0682373046875,
0.0081634521484375,
0.050994873046875,
0.0011854171752929688,
-0.07232666015625,
0.0231475830078125,
-0.09002685546875,
-0.08294677734375,
0.050323486328125,
0.0478515625,
-0.026092529296875,
0.022369384765625,
0.01300048828125,
0.02569580078125,
0.00626373291015625,
-0.036773681640625,
0.014984130859375,
0.028167724609375,
0.00919342041015625,
0.029541015625,
-0.0050811767578125,
-0.021270751953125,
-0.0226898193359375,
0.0537109375,
0.0211944580078125,
0.0562744140625,
-0.035552978515625,
0.0501708984375,
0.01013946533203125,
0.046234130859375,
-0.027984619140625,
0.003215789794921875,
0.0122222900390625,
0.01055145263671875,
0.03582763671875,
-0.024200439453125,
-0.0122528076171875,
-0.01678466796875,
0.04010009765625,
-0.03448486328125,
-0.0272979736328125,
0.00368499755859375,
0.0227203369140625,
0.00322723388671875,
-0.0112762451171875,
-0.0294647216796875,
0.001659393310546875,
-0.018310546875,
-0.050140380859375,
0.0489501953125,
0.01029205322265625,
0.03302001953125,
0.051055908203125,
0.02789306640625,
0.0009455680847167969,
0.01555633544921875,
-0.040252685546875,
0.026336669921875,
0.01110076904296875,
0.0284423828125,
0.0015459060668945312,
0.04437255859375,
-0.0034637451171875,
0.01202392578125,
0.0277252197265625,
0.033294677734375,
0.0236968994140625,
-0.022369384765625,
-0.0140533447265625,
-0.0299835205078125,
0.0131378173828125,
-0.006633758544921875,
-0.0144805908203125,
-0.0225982666015625,
0.007114410400390625,
-0.0262603759765625,
-0.0182952880859375,
-0.0152740478515625,
-0.0247344970703125,
0.0016241073608398438,
0.007587432861328125,
-0.00841522216796875,
-0.045166015625,
-0.032745361328125,
-0.035003662109375,
0.019989013671875,
0.003719329833984375,
-0.0257568359375,
-0.00940704345703125,
-0.0008225440979003906,
0.0089569091796875,
-0.00982666015625,
0.0018339157104492188,
0.007129669189453125,
0.051544189453125,
-0.005496978759765625,
-0.018157958984375,
-0.0150604248046875,
0.0274810791015625,
-0.0231475830078125,
0.01812744140625,
0.052337646484375,
-0.0279998779296875,
-0.054229736328125,
-0.007465362548828125,
-0.0015096664428710938,
0.04241943359375,
-0.04107666015625,
-0.034698486328125,
-0.032989501953125,
0.01488494873046875,
-0.008087158203125,
-0.01261138916015625,
0.031463623046875,
-0.035552978515625,
-0.0499267578125,
-0.03509521484375,
0.00876617431640625,
0.00284576416015625,
-0.0267181396484375,
-0.02581787109375,
0.0084686279296875,
0.0161285400390625,
-0.0133819580078125,
-0.06317138671875,
0.055328369140625,
0.03680419921875,
-0.033660888671875,
-0.0249176025390625,
-0.00847625732421875,
-0.022369384765625,
0.0011224746704101562,
-0.0189056396484375,
0.0006127357482910156,
0.033447265625,
-0.0318603515625,
-0.00983428955078125,
-0.0246429443359375,
-0.0009379386901855469,
-0.034515380859375,
-0.025177001953125,
-0.0189971923828125,
0.03509521484375,
0.01439666748046875,
-0.01617431640625,
0.022979736328125,
0.045379638671875,
0.012969970703125,
-0.013885498046875,
-0.0281219482421875,
-0.026123046875,
0.0226287841796875,
0.068603515625,
0.08648681640625,
0.0245819091796875,
-0.064453125,
-0.00018870830535888672,
-0.0288848876953125,
-0.06256103515625,
-0.0046844482421875,
0.0199432373046875,
-0.03546142578125,
0.011871337890625,
-0.013580322265625,
-0.01226043701171875,
0.005298614501953125,
-0.0216217041015625,
-0.01546478271484375,
-0.023651123046875,
-0.0279083251953125,
-0.0150909423828125,
-0.045257568359375,
-0.0033359527587890625,
0.055999755859375,
-0.0350341796875,
-0.0012073516845703125,
0.032135009765625,
-0.01256561279296875,
0.03326416015625,
0.053741455078125,
-0.006256103515625,
-0.00864410400390625,
-0.0213623046875,
0.01279449462890625,
-0.0164031982421875,
0.018035888671875,
-0.0238800048828125,
-0.01556396484375,
0.0044097900390625,
0.024078369140625,
-0.0294189453125,
0.00667572021484375,
0.0193939208984375,
0.043212890625,
-0.007404327392578125,
0.07354736328125,
0.0107421875,
-0.0377197265625,
-0.029266357421875,
0.04278564453125,
0.00350189208984375,
-0.035919189453125,
0.01220703125,
-0.0146484375,
0.0056304931640625,
0.02459716796875,
-0.028533935546875,
-0.0181732177734375,
-0.0141448974609375,
-0.0118560791015625,
0.0012912750244140625,
-0.0115509033203125
]
|
60fc6629ad7a2a18d65e6b49dbc83301f077df99 | Wordpress Stackexchange
Q: Replace Taxomony Description Field with Visual/WYSIWYG Editor Is there a way to add a TinyMCE editor to the taxonomy description field on the term editing pages? The solution here (Can you add the visual editor to the description field for custom taxonomies?) no longer works, I think because the wp_tiny_mce function has been deprecated.
A: For those still looking for a solution to this problem, it's worth mentioning that the Yoast SEO plugin adds a WYSIWYG editor for descriptions automatically on the taxonomy term edit screen.
If you're not planning to use that plugin for SEO please don't add it only for this functionality. Given the plugin's popularity, I figured it was worth noting it here since it could save time for someone who already plans to install the plugin.
| Q: Replace Taxomony Description Field with Visual/WYSIWYG Editor Is there a way to add a TinyMCE editor to the taxonomy description field on the term editing pages? The solution here (Can you add the visual editor to the description field for custom taxonomies?) no longer works, I think because the wp_tiny_mce function has been deprecated.
A: For those still looking for a solution to this problem, it's worth mentioning that the Yoast SEO plugin adds a WYSIWYG editor for descriptions automatically on the taxonomy term edit screen.
If you're not planning to use that plugin for SEO please don't add it only for this functionality. Given the plugin's popularity, I figured it was worth noting it here since it could save time for someone who already plans to install the plugin.
A: You can use a {$taxonomy}_edit_form_fields action hook to add html to the term edit table. In that HTML you can remove description textarea and add tinymce editor
add_action("{$taxonomy}_edit_form_fields", 'add_form_fields_example', 10, 2);
function add_form_fields_example($term, $taxonomy){
?>
<tr valign="top">
<th scope="row">Description</th>
<td>
<?php wp_editor(html_entity_decode($term->description), 'description', array('media_buttons' => false)); ?>
<script>
jQuery(window).ready(function(){
jQuery('label[for=description]').parent().parent().remove();
});
</script>
</td>
</tr>
<?php
}
| wordpress | {
"language": "en",
"length": 188,
"provenance": "stackexchange_00019.jsonl.gz:456186",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/190510"
} | [
0.00014579296112060547,
-0.0009617805480957031,
-0.0260162353515625,
-0.016143798828125,
0.02459716796875,
-0.031829833984375,
0.04559326171875,
0.0162353515625,
0.0007643699645996094,
0.0389404296875,
-0.003116607666015625,
-0.023345947265625,
-0.0023479461669921875,
-0.0252838134765625,
-0.040985107421875,
-0.01953125,
-0.004177093505859375,
-0.0089111328125,
0.01123046875,
-0.02490234375,
0.0161285400390625,
-0.028839111328125,
0.020782470703125,
-0.09942626953125,
0.0114593505859375,
0.044769287109375,
0.048919677734375,
-0.059173583984375,
0.0074005126953125,
-0.03570556640625,
0.00569915771484375,
0.004390716552734375,
0.02899169921875,
0.0250701904296875,
-0.0390625,
0.03741455078125,
-0.0166015625,
0.018157958984375,
0.00847625732421875,
0.001277923583984375,
0.0262603759765625,
-0.0281982421875,
0.00390625,
-0.0163421630859375,
-0.020294189453125,
0.0025997161865234375,
-0.0057830810546875,
-0.0283660888671875,
-0.01226806640625,
-0.055938720703125,
-0.009674072265625,
0.01151275634765625,
0.029205322265625,
-0.049072265625,
-0.0004162788391113281,
0.004913330078125,
-0.06341552734375,
0.018157958984375,
-0.0041961669921875,
0.0246734619140625,
0.041839599609375,
-0.0029697418212890625,
0.00627899169921875,
0.0294952392578125,
-0.0166778564453125,
0.0223541259765625,
-0.0164031982421875,
-0.0005435943603515625,
0.00037550926208496094,
-0.0216522216796875,
-0.01910400390625,
-0.033843994140625,
-0.006622314453125,
-0.015045166015625,
0.01335906982421875,
-0.0184173583984375,
0.0262908935546875,
-0.025115966796875,
-0.00821685791015625,
0.030426025390625,
0.03173828125,
0.00417327880859375,
0.00603485107421875,
0.00560760498046875,
0.00942230224609375,
0.0261077880859375,
-0.006473541259765625,
-0.0303802490234375,
-0.032012939453125,
-0.0172271728515625,
-0.0033206939697265625,
-0.038604736328125,
-0.08319091796875,
0.044677734375,
0.042510986328125,
-0.023162841796875,
-0.00302886962890625,
0.035247802734375,
-0.01529693603515625,
0.033599853515625,
-0.01026153564453125,
-0.029296875,
0.05657958984375,
-0.05389404296875,
0.0209197998046875,
0.007175445556640625,
-0.0019245147705078125,
0.016754150390625,
0.0501708984375,
0.0036830902099609375,
-0.0218963623046875,
0.054443359375,
-0.007373809814453125,
-0.041656494140625,
0.0240020751953125,
0.02020263671875,
-0.021636962890625,
0.0257110595703125,
-0.000621795654296875,
-0.013427734375,
0.017364501953125,
0.024993896484375,
-0.00695037841796875,
-0.003787994384765625,
-0.046173095703125,
-0.055450439453125,
-0.02447509765625,
-0.0018663406372070312,
0.05059814453125,
0.007541656494140625,
-0.04632568359375,
0.00519561767578125,
0.050506591796875,
0.0273284912109375,
0.0265045166015625,
-0.0137786865234375,
-0.0151214599609375,
-0.0225677490234375,
0.016448974609375,
-0.024444580078125,
-0.00601959228515625,
0.0296783447265625,
0.06427001953125,
-0.01079559326171875,
-0.002582550048828125,
0.0247802734375,
0.04229736328125,
0.018707275390625,
-0.01226806640625,
-0.051971435546875,
0.007549285888671875,
0.01544952392578125,
0.06451416015625,
0.00798797607421875,
-0.08062744140625,
-0.0552978515625,
0.01123809814453125,
-0.04534912109375,
-0.0014562606811523438,
-0.09320068359375,
0.021209716796875,
0.004528045654296875,
0.0019741058349609375,
-0.0506591796875,
-0.039764404296875,
-0.02752685546875,
-0.06878662109375,
-0.00897216796875,
0.031982421875,
0.0035686492919921875,
0.020263671875,
-0.028717041015625,
0.01192474365234375,
0.0167236328125,
-0.0020313262939453125,
0.028472900390625,
-0.0135650634765625,
0.0379638671875,
0.0489501953125,
-0.022186279296875,
-0.01654052734375,
-0.041259765625,
0.10662841796875,
-0.036590576171875,
-0.020751953125,
-0.016326904296875,
0.0023860931396484375,
0.040283203125,
0.0190582275390625,
0.042449951171875,
-0.04248046875,
0.00030922889709472656,
0.00994110107421875,
0.00016224384307861328,
0.040618896484375,
-0.033355712890625,
-0.041534423828125,
-0.0309906005859375,
-0.0044097900390625,
-0.0193939208984375,
0.0131683349609375,
0.003650665283203125,
0.004833221435546875,
-0.02630615234375,
-0.059967041015625,
0.0026302337646484375,
-0.01126861572265625,
0.039764404296875,
0.005413055419921875,
-0.005062103271484375,
0.0121612548828125,
-0.036529541015625,
-0.0163116455078125,
0.01192474365234375,
-0.034454345703125,
-0.0093231201171875,
0.007572174072265625,
0.05108642578125,
0.03759765625,
-0.004909515380859375,
0.049102783203125,
-0.0321044921875,
0.06982421875,
0.01537322998046875,
-0.002460479736328125,
-0.01366424560546875,
-0.0071258544921875,
0.006153106689453125,
0.0265655517578125,
0.0089874267578125,
0.06170654296875,
-0.007793426513671875,
0.0159912109375,
0.0155487060546875,
-0.005321502685546875,
0.0002332925796508789,
0.012054443359375,
-0.105712890625,
0.014251708984375,
0.05413818359375,
0.0178985595703125,
0.0017614364624023438,
-0.0128631591796875,
0.0156707763671875,
0.06524658203125,
0.01258087158203125,
0.00876617431640625,
0.007305145263671875,
0.01114654541015625,
0.0501708984375,
0.027008056640625,
-0.00934600830078125,
-0.00214385986328125,
-0.04638671875,
0.005199432373046875,
0.01003265380859375,
-0.00838470458984375,
-0.003726959228515625,
0.0278472900390625,
-0.0241851806640625,
0.006793975830078125,
0.00567626953125,
-0.0213775634765625,
0.01251220703125,
0.061431884765625,
0.03216552734375,
0.05450439453125,
0.0504150390625,
-0.039520263671875,
0.0269622802734375,
0.008148193359375,
0.0244903564453125,
0.011993408203125,
0.031768798828125,
0.0027523040771484375,
0.01523590087890625,
-0.0350341796875,
-0.01058197021484375,
0.0147552490234375,
0.0276336669921875,
-0.00739288330078125,
0.005527496337890625,
-0.0071258544921875,
-0.0029430389404296875,
0.0062713623046875,
-0.037017822265625,
0.006679534912109375,
-0.0029392242431640625,
-0.025665283203125,
-0.06268310546875,
-0.0219879150390625,
0.01454925537109375,
-0.045440673828125,
0.03424072265625,
-0.00021517276763916016,
-0.027313232421875,
0.0208892822265625,
-0.004909515380859375,
0.0296478271484375,
-0.023040771484375,
-0.00438690185546875,
0.043212890625,
0.0037212371826171875,
-0.00791168212890625,
0.0092620849609375,
-0.0177001953125,
0.0011386871337890625,
0.035125732421875,
0.01293182373046875,
0.0031890869140625,
-0.054840087890625,
0.0247039794921875,
0.00582122802734375,
0.01267242431640625,
-0.01580810546875,
-0.033905029296875,
-0.0350341796875,
-0.00023031234741210938,
-0.046661376953125,
0.0128326416015625,
0.011871337890625,
-0.022369384765625,
-0.048919677734375,
0.026947021484375,
-0.042572021484375,
0.00823211669921875,
0.0380859375,
-0.01096343994140625,
0.007175445556640625,
-0.05706787109375,
-0.005908966064453125,
-0.0589599609375,
-0.06085205078125,
-0.046112060546875,
0.0211639404296875,
-0.0054473876953125,
0.0230560302734375,
0.030029296875,
0.0290679931640625,
-0.01456451416015625,
0.06512451171875,
-0.0008039474487304688,
-0.01389312744140625,
0.0498046875,
0.00652313232421875,
-0.07025146484375,
0.035064697265625,
-0.01149749755859375,
0.00007778406143188477,
0.023345947265625,
0.004184722900390625,
0.00940704345703125,
0.004665374755859375,
0.0296173095703125,
0.031951904296875,
-0.031524658203125,
-0.0128173828125,
0.05206298828125,
0.0295867919921875,
0.0018434524536132812,
-0.012908935546875,
0.0234375,
-0.001132965087890625,
0.017578125,
-0.04168701171875,
-0.01557159423828125,
-0.00763702392578125,
0.05572509765625,
-0.0128326416015625,
0.026641845703125,
0.02935791015625,
0.0016727447509765625,
-0.026031494140625,
-0.031829833984375,
-0.058441162109375,
-0.0189361572265625,
0.0166015625,
-0.02728271484375,
0.026763916015625,
0.0031280517578125,
0.0012683868408203125,
-0.0023975372314453125,
0.0224456787109375,
-0.01171875,
0.01523590087890625,
-0.016143798828125,
-0.06964111328125,
0.038543701171875,
-0.049896240234375,
0.01708984375,
-0.0274505615234375,
0.03118896484375,
0.021820068359375,
-0.01181793212890625,
0.0234222412109375,
-0.018463134765625,
-0.0090789794921875,
0.044281005859375,
-0.061676025390625,
-0.006473541259765625,
-0.08294677734375,
0.0173797607421875,
0.021026611328125,
-0.033172607421875,
-0.052520751953125,
0.0811767578125,
-0.0897216796875,
-0.0171356201171875,
0.027099609375,
0.0004239082336425781,
-0.002956390380859375,
0.0121612548828125,
-0.028076171875,
0.0001455545425415039,
-0.01294708251953125,
-0.024383544921875,
-0.041656494140625,
-0.006496429443359375,
-0.0201263427734375,
0.033172607421875,
-0.00019657611846923828,
0.0201416015625,
-0.0007557868957519531,
0.0443115234375,
0.029754638671875,
0.020538330078125,
0.00884246826171875,
-0.01338958740234375,
0.00112152099609375,
-0.0220947265625,
-0.001842498779296875,
-0.031463623046875,
-0.0231475830078125,
0.0136871337890625,
-0.0064544677734375,
0.019012451171875,
-0.023193359375,
-0.0345458984375,
0.03948974609375,
-0.03369140625,
-0.07098388671875,
-0.035797119140625,
-0.05108642578125,
0.0029449462890625,
-0.0130462646484375,
-0.030609130859375,
-0.0443115234375,
-0.0645751953125,
0.06475830078125,
0.007724761962890625,
-0.0017910003662109375,
-0.0020904541015625,
0.08575439453125,
-0.0012865066528320312,
-0.0298004150390625,
-0.08380126953125,
-0.006229400634765625,
0.0167083740234375,
0.045654296875,
-0.014923095703125,
-0.0218353271484375,
-0.0167236328125,
0.00153350830078125,
0.000736236572265625,
-0.0115509033203125,
-0.038238525390625,
0.047271728515625,
0.006717681884765625,
-0.0224151611328125,
0.01409149169921875,
-0.0193939208984375,
0.0496826171875,
-0.01148223876953125,
-0.018218994140625,
0.015228271484375,
-0.00742340087890625,
0.0252532958984375,
0.00589752197265625,
0.01259613037109375,
-0.011505126953125,
-0.0355224609375,
0.0245361328125,
0.042694091796875,
-0.009124755859375,
-0.0147705078125,
0.007465362548828125,
-0.0168609619140625,
-0.024169921875,
-0.0248870849609375,
-0.00887298583984375,
-0.0221710205078125,
-0.00884246826171875,
-0.0299072265625,
0.0264739990234375,
-0.044921875,
-0.007297515869140625,
-0.0018949508666992188,
-0.0032825469970703125,
-0.01323699951171875,
-0.058349609375,
-0.0140838623046875,
0.01239013671875,
0.015106201171875,
0.0087432861328125,
0.041534423828125,
0.040191650390625,
0.0216522216796875,
0.0063018798828125,
0.005584716796875,
0.003696441650390625,
0.0296173095703125,
-0.0211181640625,
-0.01399993896484375,
-0.01197052001953125,
-0.0137786865234375,
0.019378662109375,
0.0170440673828125,
-0.041015625,
0.0247344970703125,
-0.00382232666015625,
0.043182373046875,
0.00335693359375,
0.037445068359375,
0.0013866424560546875,
-0.0003986358642578125,
0.0183868408203125,
0.01023101806640625,
0.005054473876953125,
-0.044464111328125,
-0.01273345947265625,
-0.00653839111328125,
0.0232391357421875,
-0.0265045166015625,
-0.0235595703125,
0.035430908203125,
0.0026645660400390625,
0.0027790069580078125,
-0.0379638671875,
-0.0506591796875,
-0.022125244140625,
0.0120086669921875,
0.02166748046875,
0.002536773681640625,
-0.006389617919921875,
-0.0229339599609375,
-0.00795745849609375,
-0.072509765625,
-0.0032405853271484375,
-0.02215576171875,
0.00725555419921875,
-0.0237579345703125,
-0.032684326171875,
-0.015625,
0.003971099853515625,
0.00310516357421875,
-0.051361083984375,
-0.062744140625,
0.00908660888671875,
-0.002544403076171875,
0.03387451171875,
-0.0216064453125,
0.01377105712890625,
-0.0092926025390625,
-0.005519866943359375,
-0.0025081634521484375,
0.0176849365234375,
0.0179595947265625,
0.01316070556640625,
0.021636962890625,
-0.01540374755859375,
-0.054412841796875,
-0.0438232421875,
-0.035369873046875,
-0.0178375244140625,
-0.0380859375,
0.003459930419921875,
-0.0194854736328125,
0.01032257080078125,
-0.005939483642578125,
0.01117706298828125,
0.0128021240234375,
0.0175018310546875,
-0.0262603759765625,
0.0164031982421875,
-0.0002875328063964844,
0.006244659423828125,
-0.0252838134765625,
0.042633056640625,
-0.019989013671875,
-0.036773681640625,
-0.0197906494140625,
-0.017578125,
-0.005687713623046875,
-0.08837890625,
-0.03521728515625,
-0.01557159423828125,
-0.036224365234375,
0.0899658203125,
0.03857421875,
0.00603485107421875,
0.035980224609375,
-0.0003447532653808594,
0.0110015869140625,
-0.022491455078125,
-0.032470703125,
-0.0241851806640625,
0.004001617431640625,
0.03369140625,
-0.041595458984375,
0.0303802490234375,
0.0169677734375,
0.01093292236328125,
0.0421142578125,
-0.036865234375,
0.046905517578125,
0.00646209716796875,
-0.0137481689453125,
0.00469970703125,
-0.029876708984375,
-0.0029430389404296875,
0.00450897216796875,
-0.0199432373046875,
0.022796630859375,
-0.006267547607421875,
0.01100921630859375,
0.0207672119140625,
0.002532958984375,
0.054718017578125,
-0.0015096664428710938,
0.01128387451171875,
0.0341796875,
-0.02423095703125,
-0.0017900466918945312,
0.041168212890625,
0.04632568359375,
-0.05828857421875,
-0.0132904052734375,
0.0254669189453125,
-0.03631591796875,
-0.019805908203125,
-0.006023406982421875,
-0.002193450927734375,
-0.042205810546875,
0.005573272705078125,
0.02392578125,
-0.02362060546875,
-0.001827239990234375,
-0.0038814544677734375,
-0.00185394287109375,
-0.01617431640625,
0.0191802978515625,
0.006366729736328125,
-0.01543426513671875,
-0.007488250732421875,
0.01338958740234375,
-0.0009264945983886719,
0.006130218505859375,
0.0219573974609375,
-0.01261138916015625,
-0.0005040168762207031,
-0.0212554931640625,
0.0318603515625,
-0.03179931640625,
-0.01617431640625,
0.040313720703125,
0.0293731689453125,
-0.0291900634765625,
0.0296630859375,
-0.0203094482421875,
0.02325439453125,
-0.018463134765625,
-0.0006046295166015625,
0.05328369140625,
-0.019256591796875,
-0.023284912109375,
0.005947113037109375,
-0.01458740234375,
-0.004016876220703125,
0.000640869140625,
0.00844573974609375,
-0.00672149658203125,
-0.0195159912109375,
0.02813720703125,
-0.0361328125,
-0.003627777099609375,
0.041046142578125,
0.00792694091796875,
0.00026488304138183594,
-0.0250396728515625,
-0.0003924369812011719,
-0.089111328125,
-0.055908203125,
-0.0081787109375,
-0.046356201171875,
0.00576019287109375,
-0.0231170654296875,
-0.10015869140625,
0.1446533203125,
0.0340576171875,
0.01763916015625,
-0.041015625,
0.072998046875,
-0.05804443359375,
0.0218963623046875,
0.0028076171875,
0.0166473388671875,
-0.00695037841796875,
-0.035797119140625,
0.001956939697265625,
0.006031036376953125,
-0.017333984375,
0.035888671875,
0.032196044921875,
0.006526947021484375,
-0.035491943359375,
-0.0254669189453125,
0.01313018798828125,
0.00812530517578125,
-0.029296875,
0.03515625,
0.0364990234375,
-0.0589599609375,
0.006961822509765625,
0.0826416015625,
0.054046630859375,
-0.017974853515625,
-0.031982421875,
0.0394287109375,
-0.00772857666015625,
-0.01439666748046875,
0.01157379150390625,
-0.005283355712890625,
-0.032073974609375,
-0.00032401084899902344,
0.0142974853515625,
-0.0704345703125,
-0.016998291015625,
0.023345947265625,
-0.0024967193603515625,
-0.041168212890625,
-0.0080108642578125,
-0.0203704833984375,
0.029266357421875,
-0.0158233642578125,
0.021240234375,
0.007282257080078125,
0.00756072998046875,
0.03082275390625,
-0.0210723876953125,
0.00878143310546875,
0.0240020751953125,
-0.0057830810546875,
0.0244903564453125,
-0.02899169921875,
-0.004009246826171875,
-0.061492919921875,
0.01776123046875,
0.031402587890625,
0.03314208984375,
-0.04547119140625,
0.0093536376953125,
0.0201568603515625,
0.00974273681640625,
-0.026611328125,
-0.0297393798828125,
-0.0166015625,
0.03887939453125,
0.037261962890625,
-0.0269927978515625,
-0.01513671875,
0.0088958740234375,
0.03387451171875,
0.0011224746704101562,
-0.0011186599731445312,
-0.00705718994140625,
-0.042755126953125,
-0.045074462890625,
0.0257720947265625,
0.024749755859375,
0.0623779296875,
-0.01177978515625,
0.07940673828125,
-0.021087646484375,
-0.0188140869140625,
-0.036712646484375,
0.0164642333984375,
0.032440185546875,
0.024322509765625,
-0.032440185546875,
0.011962890625,
0.033477783203125,
0.02508544921875,
-0.0257110595703125,
0.0631103515625,
0.0096588134765625,
0.032684326171875,
0.042327880859375,
-0.0086669921875,
0.0634765625,
-0.0191497802734375,
0.007686614990234375,
-0.036651611328125,
0.01367950439453125,
0.043701171875,
0.0029621124267578125,
-0.00653076171875,
-0.00405120849609375,
0.06787109375,
-0.02655029296875,
0.032318115234375,
-0.0094146728515625,
-0.042144775390625,
0.05242919921875,
-0.04144287109375,
0.08172607421875,
-0.006778717041015625,
-0.0230712890625,
0.00653839111328125,
-0.041595458984375,
-0.02581787109375,
0.00910186767578125,
0.02783203125,
-0.0173187255859375,
0.0229034423828125,
-0.031463623046875,
-0.036956787109375,
-0.0120086669921875,
0.03662109375,
0.00439453125,
-0.01401519775390625,
-0.0189666748046875,
-0.039642333984375,
-0.0087127685546875,
0.0020236968994140625,
-0.005466461181640625,
0.0247955322265625,
0.004207611083984375,
0.10113525390625,
-0.048828125,
0.0215911865234375,
-0.057952880859375,
0.02374267578125,
-0.057220458984375,
-0.056732177734375,
0.02178955078125,
0.0210418701171875,
-0.0036163330078125,
-0.0007348060607910156,
-0.048004150390625,
0.038482666015625,
0.0184326171875,
-0.0178985595703125,
0.0190277099609375,
0.0151214599609375,
-0.00962066650390625,
-0.02337646484375,
0.0396728515625,
-0.0225372314453125,
-0.037811279296875,
-0.0389404296875,
-0.0191192626953125,
0.025238037109375,
0.037750244140625,
0.00850677490234375,
0.004093170166015625,
0.033538818359375,
-0.04217529296875,
0.038818359375,
-0.051361083984375,
0.0809326171875,
0.0382080078125,
0.03289794921875,
0.01181793212890625,
0.03509521484375,
-0.006694793701171875,
0.00966644287109375,
0.022552490234375,
-0.011688232421875,
0.036834716796875,
-0.05389404296875,
0.046295166015625,
-0.0295562744140625,
0.030609130859375,
-0.04254150390625,
-0.0144805908203125,
0.02044677734375,
0.0146331787109375,
-0.0031890869140625,
-0.0021209716796875,
-0.030242919921875,
-0.01406097412109375,
-0.005870819091796875,
0.01053619384765625,
-0.0083770751953125,
-0.060638427734375,
-0.070556640625,
-0.028717041015625,
0.06414794921875,
0.0010433197021484375,
-0.0164642333984375,
0.0066986083984375,
-0.03729248046875,
-0.005672454833984375,
0.0298309326171875,
-0.01399993896484375,
0.01079559326171875,
0.0157928466796875,
-0.0501708984375,
-0.00661468505859375,
-0.039947509765625,
-0.0187530517578125,
-0.05169677734375,
0.0322265625,
0.04010009765625,
-0.027801513671875,
0.0024242401123046875,
0.01346588134765625,
0.035614013671875,
0.054473876953125,
0.00395965576171875,
-0.00978851318359375,
0.04803466796875,
-0.005321502685546875,
-0.035858154296875,
-0.07659912109375,
-0.02276611328125,
-0.017608642578125,
0.0240478515625,
0.003665924072265625,
-0.038787841796875,
-0.02593994140625,
-0.05938720703125,
-0.104248046875,
-0.0074310302734375,
0.01038360595703125,
-0.045501708984375,
0.0304718017578125,
-0.033050537109375,
-0.032135009765625,
0.01806640625,
0.006450653076171875,
0.0030460357666015625,
0.0094451904296875,
0.0313720703125,
0.005802154541015625,
0.053497314453125,
0.00722503662109375,
0.01125335693359375,
-0.00662994384765625,
0.020050048828125,
-0.004322052001953125,
0.014984130859375,
0.034393310546875,
-0.0088958740234375,
-0.0022525787353515625,
0.02484130859375,
-0.049285888671875,
-0.1181640625,
-0.049560546875,
-0.035247802734375,
-0.00933837890625,
-0.006504058837890625,
-0.023040771484375,
-0.01134490966796875,
0.06707763671875,
0.027313232421875,
0.006092071533203125,
-0.0155181884765625,
-0.01345062255859375,
-0.0178680419921875,
-0.046051025390625,
-0.01020050048828125,
0.029571533203125,
-0.059112548828125,
0.004489898681640625,
0.01763916015625,
0.00560760498046875,
-0.00940704345703125,
0.00403594970703125,
-0.030548095703125,
-0.01078033447265625,
0.0076446533203125,
0.005771636962890625,
-0.06451416015625,
0.0408935546875,
0.0362548828125,
-0.0462646484375,
-0.027435302734375,
0.005382537841796875,
-0.01325225830078125,
-0.002933502197265625,
0.004573822021484375,
-0.058746337890625,
-0.0277099609375,
0.0008797645568847656,
0.0288543701171875,
-0.0268402099609375,
0.0165252685546875,
-0.0189971923828125,
0.025177001953125,
-0.01776123046875,
0.0164947509765625,
0.00389862060546875,
0.0221405029296875,
-0.03204345703125,
0.0078125,
-0.0123748779296875,
0.035369873046875,
-0.032257080078125,
0.04229736328125,
-0.02679443359375,
0.0266571044921875,
-0.03179931640625,
0.0197296142578125,
-0.003726959228515625,
-0.0018463134765625,
0.0222015380859375,
0.04779052734375,
0.0198974609375,
0.0275115966796875,
-0.01360321044921875,
-0.07464599609375,
0.00922393798828125,
-0.0178680419921875
]
|
82ca21ffaba6483643d83ffe087a258b9e047bad | Wordpress Stackexchange
Q: Modify get_permalink with a specific filter I'm trying to modify the get_permalink function to return a custom url, as:
function my_function( $permalink, $postID ) {
$external_link = get_post_meta( $postID, 'external_link', true );
if( !empty( $external_link ) ) {
$permalink = $external_link;
}
return $permalink;
}
add_filter( 'post_link', 'my_function', 10, 2 );
So, when I will call the function as:
<a href="' . esc_attr( get_permalink( $post->ID ) ) . '"></a>
I think that the result depends of the "external_link" value, and if this value is not empty I need to return this value.
But it not works :/
A: Solved!,
Change $postID by $post->ID, so, rewriting function:
function noticias_print_permalink( $permalink, $post, $leavename ){
$external_link = get_post_meta( $post->ID, 'external_link', true );
if( !empty( $external_link ) ) {
$permalink = $external_link;
}
return $permalink;
}
Regards.
| Q: Modify get_permalink with a specific filter I'm trying to modify the get_permalink function to return a custom url, as:
function my_function( $permalink, $postID ) {
$external_link = get_post_meta( $postID, 'external_link', true );
if( !empty( $external_link ) ) {
$permalink = $external_link;
}
return $permalink;
}
add_filter( 'post_link', 'my_function', 10, 2 );
So, when I will call the function as:
<a href="' . esc_attr( get_permalink( $post->ID ) ) . '"></a>
I think that the result depends of the "external_link" value, and if this value is not empty I need to return this value.
But it not works :/
A: Solved!,
Change $postID by $post->ID, so, rewriting function:
function noticias_print_permalink( $permalink, $post, $leavename ){
$external_link = get_post_meta( $post->ID, 'external_link', true );
if( !empty( $external_link ) ) {
$permalink = $external_link;
}
return $permalink;
}
Regards.
| wordpress | {
"language": "en",
"length": 134,
"provenance": "stackexchange_00019.jsonl.gz:456192",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/190527"
} | [
0.06494140625,
0.0004582405090332031,
0.050262451171875,
-0.00922393798828125,
0.008056640625,
-0.00632476806640625,
0.053985595703125,
-0.053741455078125,
-0.01357269287109375,
-0.008880615234375,
-0.03900146484375,
0.0147552490234375,
-0.040771484375,
-0.0294952392578125,
0.037750244140625,
-0.038665771484375,
0.0299835205078125,
0.0159149169921875,
0.0618896484375,
-0.00007861852645874023,
0.00016999244689941406,
0.02398681640625,
0.0457763671875,
0.008941650390625,
0.0307464599609375,
-0.032928466796875,
0.07611083984375,
-0.05169677734375,
0.0233917236328125,
-0.0244903564453125,
0.0200042724609375,
-0.007785797119140625,
0.0055694580078125,
0.01959228515625,
-0.0084381103515625,
-0.031890869140625,
0.01174163818359375,
0.004924774169921875,
0.00527191162109375,
0.039703369140625,
0.031524658203125,
-0.017791748046875,
-0.024688720703125,
0.01519012451171875,
-0.0189666748046875,
-0.02130126953125,
0.0189361572265625,
-0.05169677734375,
-0.001537322998046875,
0.04248046875,
0.0275421142578125,
-0.0036296844482421875,
0.029541015625,
0.029449462890625,
-0.01003265380859375,
-0.01513671875,
-0.0153961181640625,
-0.030914306640625,
0.0211334228515625,
0.0224456787109375,
-0.0261993408203125,
-0.01529693603515625,
0.01174163818359375,
-0.043853759765625,
-0.0053253173828125,
0.0024852752685546875,
-0.029632568359375,
0.041015625,
-0.03558349609375,
-0.04107666015625,
0.00650787353515625,
-0.0335693359375,
-0.03948974609375,
0.0020275115966796875,
-0.041015625,
-0.0281829833984375,
0.02008056640625,
-0.06036376953125,
-0.020782470703125,
0.0227203369140625,
0.00786590576171875,
0.00428009033203125,
-0.053863525390625,
-0.029144287109375,
0.017364501953125,
-0.01291656494140625,
0.003261566162109375,
-0.006740570068359375,
-0.034210205078125,
-0.01800537109375,
-0.020477294921875,
-0.036346435546875,
-0.0112152099609375,
-0.004180908203125,
-0.0079193115234375,
-0.0222930908203125,
0.039154052734375,
0.059051513671875,
-0.012542724609375,
0.00850677490234375,
0.028167724609375,
-0.05487060546875,
0.04608154296875,
-0.050140380859375,
-0.0183563232421875,
0.00469970703125,
0.0183563232421875,
0.04681396484375,
0.0306549072265625,
0.031402587890625,
-0.01285552978515625,
0.00925445556640625,
-0.03253173828125,
-0.0004906654357910156,
-0.039337158203125,
0.0205078125,
-0.0714111328125,
-0.0229034423828125,
-0.0203399658203125,
0.021453857421875,
-0.003627777099609375,
0.004302978515625,
0.036285400390625,
0.00009274482727050781,
0.0156707763671875,
0.0207977294921875,
-0.0203704833984375,
-0.04742431640625,
0.038970947265625,
0.02740478515625,
-0.059356689453125,
0.005947113037109375,
0.08929443359375,
0.016815185546875,
0.01202392578125,
-0.024810791015625,
0.020660400390625,
-0.0218505859375,
0.001697540283203125,
0.0091094970703125,
0.0092620849609375,
-0.01126861572265625,
0.01348876953125,
0.006011962890625,
0.0075836181640625,
0.0269775390625,
0.0223388671875,
-0.00437164306640625,
-0.029083251953125,
-0.034759521484375,
-0.00946044921875,
-0.00640869140625,
0.048797607421875,
-0.027862548828125,
-0.0161895751953125,
-0.039154052734375,
0.00914764404296875,
-0.0251922607421875,
-0.01076507568359375,
-0.014373779296875,
0.01174163818359375,
-0.0146026611328125,
-0.00689697265625,
-0.020172119140625,
-0.0506591796875,
0.0221099853515625,
-0.0214996337890625,
-0.00823974609375,
0.0103912353515625,
0.08221435546875,
0.007354736328125,
-0.0007567405700683594,
-0.061431884765625,
-0.005794525146484375,
-0.0018243789672851562,
-0.033416748046875,
-0.0031681060791015625,
0.0435791015625,
0.00408935546875,
0.0207672119140625,
0.0010929107666015625,
-0.04168701171875,
0.044525146484375,
-0.0292816162109375,
-0.064208984375,
0.042694091796875,
0.01508331298828125,
0.072021484375,
-0.0018157958984375,
0.01445770263671875,
0.019378662109375,
0.012237548828125,
-0.0404052734375,
0.015838623046875,
-0.0085601806640625,
-0.0284423828125,
-0.009979248046875,
-0.01409149169921875,
-0.021209716796875,
0.038238525390625,
0.00582122802734375,
0.02178955078125,
-0.0045013427734375,
0.01111602783203125,
-0.05987548828125,
0.043060302734375,
-0.0262451171875,
0.0396728515625,
0.01873779296875,
0.040740966796875,
0.0089263916015625,
0.0040740966796875,
-0.0278167724609375,
0.012176513671875,
0.0017614364624023438,
0.031890869140625,
0.014190673828125,
0.016326904296875,
-0.0396728515625,
-0.01515960693359375,
-0.036529541015625,
-0.033660888671875,
-0.039764404296875,
0.06439208984375,
0.036590576171875,
-0.040496826171875,
-0.0042572021484375,
-0.0352783203125,
-0.02276611328125,
0.004352569580078125,
-0.081298828125,
0.05059814453125,
0.08331298828125,
0.04913330078125,
-0.0177154541015625,
0.003612518310546875,
0.0112152099609375,
-0.07708740234375,
-0.0137176513671875,
0.0556640625,
0.039947509765625,
0.02545166015625,
0.0167694091796875,
0.0021991729736328125,
0.060150146484375,
0.0196380615234375,
0.045867919921875,
-0.04058837890625,
0.006023406982421875,
0.0014696121215820312,
-0.01953125,
-0.0017442703247070312,
0.03985595703125,
-0.0160675048828125,
0.00006818771362304688,
0.03759765625,
-0.0164031982421875,
0.004116058349609375,
0.002696990966796875,
0.006862640380859375,
-0.0029659271240234375,
0.0223236083984375,
0.0162200927734375,
-0.0016756057739257812,
0.00925445556640625,
0.0009055137634277344,
0.01203155517578125,
0.0121612548828125,
-0.006549835205078125,
-0.00533294677734375,
0.01468658447265625,
0.0082550048828125,
-0.0230255126953125,
0.006633758544921875,
0.00007635354995727539,
-0.022308349609375,
-0.024658203125,
0.0231781005859375,
-0.0302734375,
-0.00891876220703125,
-0.0169525146484375,
0.032928466796875,
0.00492095947265625,
-0.004451751708984375,
-0.011016845703125,
-0.0408935546875,
0.0005497932434082031,
0.0066070556640625,
-0.00705718994140625,
-0.00991058349609375,
0.0280303955078125,
0.0013942718505859375,
-0.030517578125,
0.0222625732421875,
0.002288818359375,
-0.0254974365234375,
0.006103515625,
-0.07684326171875,
0.06329345703125,
-0.05780029296875,
0.038848876953125,
0.0692138671875,
-0.0178070068359375,
0.030364990234375,
-0.0076751708984375,
-0.0027866363525390625,
-0.036102294921875,
0.0177764892578125,
-0.0214385986328125,
-0.01629638671875,
-0.07421875,
-0.0242919921875,
0.0007572174072265625,
0.00901031494140625,
-0.0328369140625,
-0.05255126953125,
-0.02197265625,
-0.0239105224609375,
-0.0989990234375,
-0.04876708984375,
-0.007457733154296875,
-0.025421142578125,
-0.0217132568359375,
0.0240325927734375,
-0.01129913330078125,
0.0024623870849609375,
0.0184783935546875,
-0.0103607177734375,
0.0282745361328125,
-0.02734375,
-0.08685302734375,
-0.047515869140625,
-0.09857177734375,
0.007354736328125,
-0.0028858184814453125,
0.0136260986328125,
-0.003429412841796875,
0.0006504058837890625,
-0.003406524658203125,
-0.025634765625,
0.0113372802734375,
0.03839111328125,
-0.0083160400390625,
-0.035125732421875,
0.00962066650390625,
-0.01995849609375,
-0.032958984375,
-0.0086212158203125,
0.08465576171875,
0.0290374755859375,
-0.046112060546875,
0.0200958251953125,
-0.018218994140625,
0.0211029052734375,
0.044219970703125,
0.016937255859375,
0.017974853515625,
0.06744384765625,
0.054229736328125,
0.005001068115234375,
-0.016510009765625,
-0.03961181640625,
-0.041107177734375,
0.08221435546875,
0.033233642578125,
0.00021588802337646484,
0.0133514404296875,
0.0282440185546875,
0.0175628662109375,
0.00254058837890625,
0.037353515625,
-0.02508544921875,
0.032073974609375,
0.003116607666015625,
0.026947021484375,
-0.05120849609375,
0.045196533203125,
-0.00804901123046875,
0.00383758544921875,
0.0261077880859375,
0.019500732421875,
0.021484375,
-0.02667236328125,
-0.027252197265625,
-0.04217529296875,
0.07427978515625,
-0.034271240234375,
-0.00475311279296875,
-0.055206298828125,
-0.04351806640625,
-0.00766754150390625,
0.09686279296875,
0.0151519775390625,
-0.0287322998046875,
-0.01300048828125,
-0.00018644332885742188,
-0.01800537109375,
-0.0262298583984375,
0.0029144287109375,
0.00030159950256347656,
-0.0675048828125,
-0.0030117034912109375,
-0.02545166015625,
-0.00027441978454589844,
-0.02557373046875,
0.04730224609375,
-0.04510498046875,
-0.03662109375,
0.0191802978515625,
0.048919677734375,
-0.01617431640625,
0.0262908935546875,
-0.0258026123046875,
0.007068634033203125,
-0.0166015625,
0.015625,
-0.048431396484375,
-0.004467010498046875,
-0.0278778076171875,
0.030426025390625,
0.003719329833984375,
-0.0016307830810546875,
0.00083160400390625,
0.04266357421875,
0.007183074951171875,
0.0125579833984375,
0.00872039794921875,
-0.0041656494140625,
0.007183074951171875,
0.008941650390625,
0.013153076171875,
-0.011260986328125,
-0.00616455078125,
-0.0210723876953125,
-0.046722412109375,
0.00899505615234375,
-0.0121612548828125,
0.004058837890625,
0.038116455078125,
-0.032928466796875,
-0.08502197265625,
-0.0013523101806640625,
0.004150390625,
0.0167388916015625,
-0.0089111328125,
-0.015777587890625,
0.0005049705505371094,
-0.09564208984375,
0.052276611328125,
0.005157470703125,
0.006534576416015625,
-0.01328277587890625,
0.043853759765625,
0.012725830078125,
-0.0350341796875,
0.0107574462890625,
-0.00960540771484375,
0.0217437744140625,
-0.0401611328125,
0.05523681640625,
0.0240631103515625,
-0.00004202127456665039,
0.03228759765625,
-0.041778564453125,
-0.004486083984375,
-0.017059326171875,
0.05902099609375,
0.0167236328125,
0.00685882568359375,
0.0120697021484375,
-0.0014209747314453125,
-0.0014657974243164062,
0.011688232421875,
-0.038604736328125,
-0.009368896484375,
-0.04522705078125,
0.034820556640625,
0.00690460205078125,
0.033233642578125,
-0.041778564453125,
-0.02362060546875,
0.025421142578125,
-0.01161956787109375,
0.032501220703125,
0.0265045166015625,
-0.01415252685546875,
0.0089874267578125,
-0.01776123046875,
0.0162353515625,
-0.01119232177734375,
0.02532958984375,
-0.037017822265625,
0.040008544921875,
-0.01251220703125,
-0.01166534423828125,
-0.021392822265625,
0.0018091201782226562,
0.032684326171875,
0.0198516845703125,
0.018096923828125,
-0.038970947265625,
-0.01375579833984375,
-0.02520751953125,
-0.03936767578125,
0.02276611328125,
0.03997802734375,
-0.01470947265625,
-0.016357421875,
0.0011892318725585938,
-0.0256500244140625,
0.0004930496215820312,
-0.04266357421875,
-0.0036220550537109375,
0.007415771484375,
-0.007419586181640625,
-0.014678955078125,
0.07061767578125,
0.00937652587890625,
0.0284881591796875,
-0.00691986083984375,
-0.002750396728515625,
-0.00582122802734375,
0.03387451171875,
0.01470947265625,
-0.029388427734375,
0.01152801513671875,
0.00030422210693359375,
0.034637451171875,
-0.029205322265625,
-0.019073486328125,
0.029571533203125,
0.058013916015625,
-0.0193023681640625,
-0.0016088485717773438,
-0.004974365234375,
-0.023773193359375,
-0.026580810546875,
0.062255859375,
0.0721435546875,
-0.0207366943359375,
-0.0263214111328125,
-0.00849151611328125,
0.0150604248046875,
0.00408935546875,
-0.01050567626953125,
0.0104827880859375,
-0.00148773193359375,
0.0113067626953125,
-0.0009374618530273438,
-0.005367279052734375,
-0.00835418701171875,
-0.00197601318359375,
0.01641845703125,
-0.006443023681640625,
-0.0113677978515625,
0.0003533363342285156,
-0.0104217529296875,
-0.0209503173828125,
-0.008636474609375,
0.058807373046875,
0.00618743896484375,
0.07012939453125,
-0.03826904296875,
-0.045623779296875,
-0.0266571044921875,
-0.0101776123046875,
0.06622314453125,
0.038299560546875,
-0.0711669921875,
0.0015659332275390625,
-0.015960693359375,
0.00986480712890625,
-0.00920867919921875,
-0.0047149658203125,
-0.033203125,
0.0026950836181640625,
0.0261383056640625,
0.035675048828125,
0.01128387451171875,
-0.010040283203125,
0.0018825531005859375,
0.004547119140625,
-0.004650115966796875,
0.07012939453125,
-0.00955963134765625,
0.058135986328125,
0.0281524658203125,
0.03582763671875,
0.00971221923828125,
0.01971435546875,
-0.0262451171875,
-0.01373291015625,
-0.021392822265625,
-0.040863037109375,
0.002361297607421875,
0.01120758056640625,
-0.0093841552734375,
0.0248565673828125,
0.039459228515625,
0.008209228515625,
0.013519287109375,
-0.0080413818359375,
-0.01885986328125,
-0.0295257568359375,
-0.0007114410400390625,
-0.00760650634765625,
0.0384521484375,
-0.038818359375,
-0.022125244140625,
-0.000980377197265625,
0.0152740478515625,
0.0078887939453125,
0.00321197509765625,
-0.01137542724609375,
-0.00016021728515625,
0.003971099853515625,
-0.0521240234375,
0.04278564453125,
0.0677490234375,
0.0263824462890625,
0.05352783203125,
0.0069580078125,
0.034637451171875,
0.043365478515625,
-0.00962066650390625,
0.053131103515625,
0.050140380859375,
0.0767822265625,
-0.005771636962890625,
0.0207977294921875,
0.053436279296875,
-0.0155181884765625,
-0.0052947998046875,
0.0147552490234375,
0.05035400390625,
-0.036590576171875,
0.006931304931640625,
0.04437255859375,
0.0239105224609375,
0.0178375244140625,
0.0186767578125,
-0.017730712890625,
0.0007681846618652344,
0.01522064208984375,
-0.0712890625,
-0.0186767578125,
0.00225067138671875,
-0.00992584228515625,
-0.005756378173828125,
-0.0095062255859375,
0.01160430908203125,
-0.0014324188232421875,
0.01336669921875,
-0.0193634033203125,
-0.004856109619140625,
0.0034198760986328125,
-0.001010894775390625,
0.00228118896484375,
-0.0156707763671875,
-0.0316162109375,
-0.03619384765625,
0.000629425048828125,
-0.03076171875,
0.004337310791015625,
0.03997802734375,
-0.026947021484375,
0.07501220703125,
0.00382232666015625,
0.00893402099609375,
0.0006146430969238281,
-0.038604736328125,
-0.0158538818359375,
0.045989990234375,
-0.037994384765625,
0.00669097900390625,
0.014007568359375,
-0.01494598388671875,
0.004364013671875,
0.0202178955078125,
-0.045806884765625,
-0.00934600830078125,
-0.00875091552734375,
0.101318359375,
-0.0275115966796875,
-0.0251312255859375,
0.029998779296875,
0.0169525146484375,
-0.024566650390625,
0.0006232261657714844,
0.0217437744140625,
-0.062255859375,
-0.038177490234375,
0.00014019012451171875,
-0.051788330078125,
-0.0244903564453125,
-0.035186767578125,
-0.0811767578125,
0.134765625,
0.007526397705078125,
0.08050537109375,
0.01380157470703125,
0.023834228515625,
-0.007602691650390625,
0.018402099609375,
-0.036407470703125,
0.034515380859375,
0.0236053466796875,
0.031982421875,
-0.056793212890625,
-0.03277587890625,
-0.0105133056640625,
0.048431396484375,
0.0289459228515625,
0.013824462890625,
-0.032135009765625,
0.0131072998046875,
0.039154052734375,
0.0206756591796875,
0.005382537841796875,
0.010223388671875,
-0.0055084228515625,
0.0771484375,
0.05859375,
-0.06915283203125,
0.018096923828125,
-0.02447509765625,
-0.00354766845703125,
0.02618408203125,
0.02685546875,
0.033111572265625,
-0.0099334716796875,
0.00029206275939941406,
-0.049652099609375,
-0.006511688232421875,
0.05767822265625,
-0.032684326171875,
0.0035762786865234375,
-0.0171051025390625,
0.00841522216796875,
-0.07464599609375,
0.00957489013671875,
-0.0242462158203125,
0.04052734375,
0.01428985595703125,
-0.0177764892578125,
0.0137939453125,
-0.00412750244140625,
0.0184783935546875,
-0.0297393798828125,
-0.022216796875,
-0.018280029296875,
0.039703369140625,
0.06903076171875,
0.057403564453125,
0.0216217041015625,
-0.007183074951171875,
0.0307464599609375,
0.06390380859375,
0.08880615234375,
-0.050384521484375,
-0.01010894775390625,
-0.0010156631469726562,
-0.016448974609375,
0.004581451416015625,
-0.0201568603515625,
0.01922607421875,
0.01146697998046875,
-0.00966644287109375,
-0.03857421875,
0.00684356689453125,
0.055694580078125,
0.034423828125,
-0.00968170166015625,
-0.0736083984375,
-0.036651611328125,
0.0197601318359375,
-0.04052734375,
-0.0095977783203125,
0.021209716796875,
0.06561279296875,
0.036712646484375,
0.02630615234375,
-0.00994873046875,
-0.0161285400390625,
0.006694793701171875,
0.014984130859375,
-0.024200439453125,
0.00930023193359375,
-0.014373779296875,
-0.027008056640625,
-0.00406646728515625,
0.02484130859375,
0.0194244384765625,
0.004367828369140625,
0.037322998046875,
-0.0173187255859375,
-0.0526123046875,
0.005397796630859375,
0.006805419921875,
-0.03411865234375,
0.0265045166015625,
-0.0474853515625,
0.032958984375,
0.0040435791015625,
-0.001682281494140625,
-0.017486572265625,
-0.0101470947265625,
0.046966552734375,
-0.033905029296875,
0.032318115234375,
-0.0019664764404296875,
-0.0258026123046875,
0.039031982421875,
-0.01294708251953125,
0.07000732421875,
-0.015716552734375,
-0.050018310546875,
-0.01238250732421875,
-0.006114959716796875,
-0.05303955078125,
0.025604248046875,
0.044708251953125,
0.01238250732421875,
-0.028778076171875,
-0.01459503173828125,
0.0027179718017578125,
0.02734375,
0.0028400421142578125,
-0.01531219482421875,
0.0197906494140625,
0.0249481201171875,
-0.00009191036224365234,
-0.0283966064453125,
-0.021392822265625,
-0.0207061767578125,
0.041900634765625,
0.034393310546875,
0.06781005859375,
-0.022796630859375,
0.02490234375,
0.01180267333984375,
-0.008209228515625,
-0.0086517333984375,
-0.01739501953125,
0.0019626617431640625,
-0.034271240234375,
0.028411865234375,
0.01800537109375,
0.007175445556640625,
0.0157012939453125,
0.0408935546875,
-0.0301666259765625,
0.00833892822265625,
-0.018951416015625,
0.02459716796875,
-0.032318115234375,
0.03173828125,
-0.0268402099609375,
-0.0214080810546875,
-0.03912353515625,
-0.0294952392578125,
0.050384521484375,
0.0224151611328125,
-0.0005803108215332031,
0.0291748046875,
0.00826263427734375,
-0.0253753662109375,
0.006439208984375,
-0.035125732421875,
0.0379638671875,
0.0467529296875,
-0.02227783203125,
0.00553131103515625,
-0.0164031982421875,
-0.030426025390625,
0.022308349609375,
-0.008392333984375,
0.005695343017578125,
-0.007305145263671875,
-0.00042366981506347656,
-0.024322509765625,
-0.007106781005859375,
0.0268096923828125,
-0.0160675048828125,
0.01140594482421875,
-0.01140594482421875,
0.009124755859375,
-0.006580352783203125,
-0.0133514404296875,
-0.007389068603515625,
-0.03216552734375,
-0.0169525146484375,
0.003009796142578125,
-0.0225982666015625,
-0.033416748046875,
-0.00507354736328125,
-0.00452423095703125,
0.036285400390625,
0.017059326171875,
-0.07421875,
0.033782958984375,
-0.01380157470703125,
0.020965576171875,
-0.0140380859375,
0.005527496337890625,
-0.0102691650390625,
0.027435302734375,
-0.004547119140625,
-0.0267181396484375,
-0.032196044921875,
0.040557861328125,
-0.023345947265625,
0.0245819091796875,
0.051300048828125,
-0.0249176025390625,
-0.040557861328125,
0.0121002197265625,
-0.003734588623046875,
0.056549072265625,
-0.0295867919921875,
-0.016754150390625,
-0.01238250732421875,
0.01074981689453125,
-0.017333984375,
-0.055816650390625,
0.025665283203125,
-0.053680419921875,
-0.0307159423828125,
0.0255126953125,
-0.02587890625,
0.0126495361328125,
-0.018707275390625,
-0.02581787109375,
0.032135009765625,
0.0125885009765625,
-0.0158843994140625,
-0.048492431640625,
-0.01078033447265625,
-0.01082611083984375,
0.04852294921875,
0.00727081298828125,
-0.042999267578125,
-0.065673828125,
0.00807952880859375,
0.040283203125,
-0.0012102127075195312,
0.0367431640625,
0.055755615234375,
-0.0205078125,
0.04400634765625,
0.024749755859375,
0.01549530029296875,
0.004535675048828125,
-0.01293182373046875,
0.032867431640625,
0.0102386474609375,
-0.0257568359375,
-0.0171661376953125,
0.0084991455078125,
0.0018444061279296875,
-0.018646240234375,
-0.0848388671875,
-0.0008330345153808594,
-0.00954437255859375,
0.10687255859375,
-0.01111602783203125,
0.0191192626953125,
-0.048797607421875,
-0.01380157470703125,
-0.0011320114135742188,
-0.020751953125,
-0.00794219970703125,
0.020599365234375,
-0.071533203125,
-0.021209716796875,
0.001476287841796875,
-0.0018749237060546875,
-0.00255584716796875,
-0.016082763671875,
-0.0141754150390625,
0.006061553955078125,
0.01171112060546875,
0.0119476318359375,
-0.0112152099609375,
0.021240234375,
0.07025146484375,
-0.0616455078125,
-0.004451751708984375,
0.0095062255859375,
-0.00839996337890625,
0.034454345703125,
-0.0282745361328125,
-0.02532958984375,
0.019195556640625,
-0.0005207061767578125,
-0.0124664306640625,
0.0216827392578125,
0.03369140625,
0.03631591796875,
0.00482940673828125,
-0.0211181640625,
0.01161956787109375,
-0.0104217529296875,
-0.0036945343017578125,
0.00260162353515625,
0.0193939208984375,
-0.0031108856201171875,
0.05975341796875,
-0.03289794921875,
0.07586669921875,
0.025360107421875,
-0.0013685226440429688,
-0.040863037109375,
0.033935546875,
0.003902435302734375,
-0.04364013671875,
0.0004296302795410156,
0.0164794921875,
0.0074615478515625,
-0.0246429443359375,
0.0025844573974609375,
-0.031890869140625,
0.006229400634765625,
0.011932373046875
]
|
a3b365ed9e46db0fc6423494397f56229b891223 | Wordpress Stackexchange
Q: is .maintenance file still valid for putting WP in maintenance mode? I see that upon upgrades the .maintenance file is deleted, if present. Is it still a viable/correct way to put WP in maintenance mode?
A: Step 1: Create a file .maintenance in the WP root directory like .htaccess
Step 2: Put this code in the file
<?php $upgrading = time(); ?>
Step 3: Save the file. Then you can see the default maintenance message 'Briefly unavailable for scheduled maintenance. Check back in a minute.'.
Step 4: Once you have finished the repair or upgrade, then delete the code or the file .maintenance.
In case you want to have your own custom warning message, create a maintenance.php file and placing it in your /wp-content/ directory. WordPress uses this file to display during any forced maintenance period that you might have.
| Q: is .maintenance file still valid for putting WP in maintenance mode? I see that upon upgrades the .maintenance file is deleted, if present. Is it still a viable/correct way to put WP in maintenance mode?
A: Step 1: Create a file .maintenance in the WP root directory like .htaccess
Step 2: Put this code in the file
<?php $upgrading = time(); ?>
Step 3: Save the file. Then you can see the default maintenance message 'Briefly unavailable for scheduled maintenance. Check back in a minute.'.
Step 4: Once you have finished the repair or upgrade, then delete the code or the file .maintenance.
In case you want to have your own custom warning message, create a maintenance.php file and placing it in your /wp-content/ directory. WordPress uses this file to display during any forced maintenance period that you might have.
A: Not really.
.maintenance is a temporary file, not viable if you want to put your site in maintenance mode for a long time.
If you look at source the maintenance mode is maintained only if $upgrading variable defined in the file is no older than 10 minutes.
It means .maintenance is a sort of lock file when WordPress is upgrading plugins, themes or itself, something that should not last more than 10 minutes.
Surely is possible to insert into that file something like:
$upgrading = time();
And in theory hold WordPress in maintenance mode, but once it is intended to be a temporary file, WordPress feels free to delete the file after a successfull update.
For a long-duration maintenance mode you need to use a different solution.
Here you'll find one.
| wordpress | {
"language": "en",
"length": 273,
"provenance": "stackexchange_00019.jsonl.gz:456206",
"question_score": "30",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/190588"
} | [
0.06756591796875,
0.003635406494140625,
-0.01409912109375,
-0.056121826171875,
0.01751708984375,
-0.05474853515625,
0.02508544921875,
-0.00720977783203125,
-0.0103759765625,
0.0036907196044921875,
-0.0214691162109375,
-0.0218353271484375,
-0.007648468017578125,
-0.0204925537109375,
-0.00897216796875,
-0.03564453125,
0.01367950439453125,
0.025970458984375,
0.0015583038330078125,
-0.005786895751953125,
-0.00821685791015625,
0.00782012939453125,
-0.03424072265625,
0.007503509521484375,
-0.0206756591796875,
0.01409912109375,
0.09405517578125,
-0.0130157470703125,
-0.0242462158203125,
-0.037567138671875,
-0.0019550323486328125,
0.01467132568359375,
0.01568603515625,
0.021026611328125,
-0.00955963134765625,
-0.0011444091796875,
0.0146331787109375,
0.01129913330078125,
0.01178741455078125,
0.0167694091796875,
-0.0186920166015625,
0.0255889892578125,
0.051483154296875,
-0.00965118408203125,
-0.0010404586791992188,
-0.0237579345703125,
-0.0251922607421875,
-0.06610107421875,
0.023712158203125,
-0.001163482666015625,
0.01242828369140625,
-0.007305145263671875,
0.0284576416015625,
-0.0278778076171875,
-0.0244140625,
-0.035675048828125,
0.002391815185546875,
-0.006481170654296875,
0.0309295654296875,
-0.0190582275390625,
-0.042755126953125,
-0.0128021240234375,
0.02667236328125,
-0.0217132568359375,
-0.0098114013671875,
0.01102447509765625,
-0.01253509521484375,
0.006256103515625,
-0.05938720703125,
-0.0023288726806640625,
0.034912109375,
-0.0615234375,
0.0197906494140625,
-0.0247802734375,
0.006717681884765625,
-0.00090789794921875,
-0.0108795166015625,
-0.022613525390625,
0.0146331787109375,
0.0087432861328125,
0.038116455078125,
0.0290985107421875,
-0.032501220703125,
-0.006015777587890625,
0.01537322998046875,
0.0063018798828125,
0.00011408329010009766,
-0.032379150390625,
-0.01727294921875,
0.0017633438110351562,
-0.022491455078125,
0.017578125,
-0.055908203125,
0.0154266357421875,
0.0022106170654296875,
-0.01364898681640625,
0.004791259765625,
0.042022705078125,
-0.034912109375,
0.03594970703125,
-0.011199951171875,
-0.0235595703125,
0.05816650390625,
-0.049102783203125,
-0.01523590087890625,
0.0146026611328125,
0.0135498046875,
0.0118865966796875,
-0.003368377685546875,
0.01727294921875,
-0.0238800048828125,
-0.021026611328125,
0.019805908203125,
-0.058319091796875,
-0.0175323486328125,
0.058074951171875,
0.0330810546875,
-0.0027408599853515625,
0.035003662109375,
0.0009794235229492188,
-0.01605224609375,
0.019439697265625,
-0.0206298828125,
-0.050018310546875,
-0.0230560302734375,
-0.05474853515625,
-0.0236358642578125,
0.0250701904296875,
-0.0200347900390625,
0.00641632080078125,
-0.026214599609375,
0.01039886474609375,
0.0521240234375,
0.029632568359375,
-0.0066375732421875,
-0.0068511962890625,
-0.00027751922607421875,
0.01548004150390625,
0.00804901123046875,
0.0037326812744140625,
0.0224609375,
-0.0205078125,
0.0137786865234375,
0.0230712890625,
0.01067352294921875,
0.045562744140625,
0.0237884521484375,
-0.01059722900390625,
-0.01641845703125,
-0.043548583984375,
0.0184783935546875,
-0.041748046875,
0.036651611328125,
0.0008373260498046875,
0.00341033935546875,
-0.059539794921875,
0.01383209228515625,
-0.03436279296875,
0.0192413330078125,
-0.03765869140625,
-0.026580810546875,
-0.0099945068359375,
0.046417236328125,
-0.046783447265625,
-0.031707763671875,
0.020263671875,
-0.07208251953125,
-0.01349639892578125,
0.01299285888671875,
0.0158843994140625,
-0.0150604248046875,
-0.035919189453125,
-0.0440673828125,
-0.007694244384765625,
-0.003826141357421875,
0.0256805419921875,
0.0017042160034179688,
0.0015821456909179688,
0.0243072509765625,
0.030731201171875,
0.0021190643310546875,
-0.0293731689453125,
0.037933349609375,
0.00020003318786621094,
-0.036468505859375,
-0.0260467529296875,
0.0202178955078125,
0.04327392578125,
0.0295257568359375,
0.034912109375,
0.0214385986328125,
-0.0211639404296875,
-0.018768310546875,
0.054290771484375,
-0.01409912109375,
-0.0296478271484375,
-0.038299560546875,
0.0016584396362304688,
-0.0258941650390625,
-0.01470947265625,
0.0028896331787109375,
-0.0035037994384765625,
-0.0033969879150390625,
-0.01336669921875,
-0.0848388671875,
0.032928466796875,
-0.059356689453125,
0.05047607421875,
-0.00955963134765625,
0.004058837890625,
0.01274871826171875,
-0.00873565673828125,
-0.0166778564453125,
-0.01509857177734375,
-0.031890869140625,
-0.0187835693359375,
-0.0305633544921875,
0.007701873779296875,
-0.0148468017578125,
0.0361328125,
-0.0221710205078125,
-0.0143890380859375,
-0.02264404296875,
-0.00548553466796875,
-0.055389404296875,
-0.0147705078125,
0.0018262863159179688,
0.0083160400390625,
-0.0484619140625,
0.0189666748046875,
0.022613525390625,
-0.01395416259765625,
0.0291290283203125,
-0.01268768310546875,
-0.028778076171875,
-0.01043701171875,
-0.01399993896484375,
-0.10821533203125,
0.006824493408203125,
0.07177734375,
0.031280517578125,
0.03875732421875,
0.0013589859008789062,
0.0248870849609375,
0.06976318359375,
-0.0234375,
0.000019788742065429688,
0.01538848876953125,
-0.006946563720703125,
0.0093536376953125,
-0.00879669189453125,
0.005855560302734375,
0.02020263671875,
-0.018524169921875,
-0.0307464599609375,
0.055755615234375,
-0.01538848876953125,
-0.032440185546875,
-0.0328369140625,
0.0287322998046875,
0.01617431640625,
-0.060577392578125,
-0.042572021484375,
-0.016937255859375,
0.08056640625,
0.007343292236328125,
0.064208984375,
0.04693603515625,
-0.0191802978515625,
0.00006109476089477539,
-0.0087890625,
-0.02490234375,
0.00421142578125,
0.028900146484375,
0.00371551513671875,
0.019195556640625,
-0.0147552490234375,
-0.011810302734375,
-0.005168914794921875,
0.0218505859375,
-0.040069580078125,
-0.052337646484375,
-0.01232147216796875,
-0.004528045654296875,
0.01157379150390625,
-0.01287841796875,
0.037567138671875,
-0.00293731689453125,
-0.04766845703125,
-0.021270751953125,
0.03082275390625,
-0.004467010498046875,
-0.05010986328125,
0.0128631591796875,
-0.025360107421875,
-0.020233154296875,
-0.0191497802734375,
-0.03314208984375,
0.03399658203125,
-0.05340576171875,
-0.01085662841796875,
0.05303955078125,
0.00392913818359375,
-0.00606536865234375,
0.006561279296875,
0.00555419921875,
0.0210723876953125,
0.00754547119140625,
-0.00821685791015625,
0.0174407958984375,
-0.051513671875,
0.0070037841796875,
0.0161590576171875,
0.00933837890625,
-0.005138397216796875,
-0.0171051025390625,
-0.033050537109375,
0.01367950439453125,
-0.0731201171875,
-0.055572509765625,
-0.08544921875,
-0.053497314453125,
0.0090484619140625,
0.021697998046875,
-0.023040771484375,
0.012542724609375,
0.046630859375,
0.029510498046875,
-0.0634765625,
-0.00739288330078125,
-0.0550537109375,
-0.056060791015625,
-0.058349609375,
0.020721435546875,
-0.006687164306640625,
0.034088134765625,
-0.00775146484375,
0.0777587890625,
-0.004711151123046875,
-0.07159423828125,
-0.041595458984375,
0.00027441978454589844,
-0.00989532470703125,
0.0006694793701171875,
0.00010192394256591797,
-0.00194549560546875,
0.006488800048828125,
-0.0031890869140625,
0.0213470458984375,
0.03167724609375,
-0.01300048828125,
-0.0121307373046875,
-0.04241943359375,
-0.0045623779296875,
-0.0263214111328125,
-0.00554656982421875,
0.0299530029296875,
-0.03564453125,
-0.030181884765625,
-0.060943603515625,
-0.008209228515625,
0.00907135009765625,
-0.008636474609375,
0.00994873046875,
-0.006732940673828125,
-0.0141754150390625,
-0.009429931640625,
0.01522064208984375,
-0.0200347900390625,
0.00485992431640625,
0.047515869140625,
-0.05865478515625,
0.007171630859375,
-0.0169677734375,
-0.02105712890625,
-0.0251617431640625,
0.0401611328125,
-0.00948333740234375,
-0.002140045166015625,
0.012969970703125,
0.01120758056640625,
-0.004344940185546875,
0.006443023681640625,
-0.035675048828125,
-0.0257568359375,
0.00600433349609375,
-0.07843017578125,
0.00836944580078125,
-0.046630859375,
0.00872039794921875,
-0.0236968994140625,
0.04364013671875,
-0.05291748046875,
-0.02703857421875,
0.032562255859375,
0.04034423828125,
-0.009368896484375,
-0.043914794921875,
0.00567626953125,
-0.046722412109375,
-0.07379150390625,
0.03790283203125,
-0.00362396240234375,
-0.01348114013671875,
-0.03436279296875,
-0.04876708984375,
-0.04522705078125,
-0.052734375,
0.031280517578125,
-0.0523681640625,
0.01296234130859375,
0.027099609375,
-0.00853729248046875,
-0.01268768310546875,
-0.0231781005859375,
-0.04412841796875,
-0.09954833984375,
-0.00399017333984375,
-0.05889892578125,
0.05841064453125,
0.037353515625,
-0.02984619140625,
0.0082244873046875,
0.0428466796875,
0.01007843017578125,
0.045684814453125,
-0.01045989990234375,
-0.0171966552734375,
0.0290985107421875,
0.01091766357421875,
0.02459716796875,
-0.00537872314453125,
-0.0164642333984375,
-0.057525634765625,
-0.051788330078125,
-0.017547607421875,
-0.0166473388671875,
0.05401611328125,
-0.0099639892578125,
-0.01013946533203125,
-0.0215606689453125,
-0.032135009765625,
-0.031951904296875,
-0.003955841064453125,
-0.0192108154296875,
0.0081787109375,
-0.027374267578125,
-0.0221099853515625,
0.020660400390625,
0.00640869140625,
-0.021453857421875,
0.0255889892578125,
0.046051025390625,
0.0075225830078125,
-0.03173828125,
-0.1143798828125,
-0.005779266357421875,
0.0343017578125,
-0.0229034423828125,
0.0516357421875,
0.026397705078125,
-0.02545166015625,
0.07330322265625,
0.01201629638671875,
-0.02850341796875,
-0.007171630859375,
0.0306243896484375,
-0.004085540771484375,
0.00870513916015625,
-0.014923095703125,
-0.037384033203125,
0.057464599609375,
-0.01277923583984375,
0.006305694580078125,
-0.0014362335205078125,
-0.004741668701171875,
0.01079559326171875,
0.007755279541015625,
0.01483154296875,
-0.01096343994140625,
-0.034393310546875,
0.003040313720703125,
-0.0273590087890625,
0.06561279296875,
-0.0056915283203125,
0.0159912109375,
0.03436279296875,
0.03326416015625,
0.00745391845703125,
0.01210784912109375,
0.031158447265625,
-0.0240936279296875,
0.0299224853515625,
0.0235595703125,
-0.0057373046875,
-0.016082763671875,
-0.00911712646484375,
0.048980712890625,
0.031585693359375,
-0.028778076171875,
0.01027679443359375,
0.0004374980926513672,
0.01357269287109375,
0.025115966796875,
-0.0114898681640625,
0.046173095703125,
0.0204010009765625,
-0.040130615234375,
-0.01053619384765625,
-0.0250396728515625,
-0.026763916015625,
-0.06329345703125,
0.0182647705078125,
0.004180908203125,
-0.002674102783203125,
0.0196990966796875,
0.0311279296875,
-0.01654052734375,
0.0203857421875,
0.0013580322265625,
0.0518798828125,
0.03240966796875,
-0.0002791881561279297,
-0.004779815673828125,
0.0423583984375,
0.0211029052734375,
-0.03369140625,
0.01413726806640625,
-0.0367431640625,
-0.046142578125,
-0.0026073455810546875,
0.038421630859375,
-0.027679443359375,
0.00019788742065429688,
0.033477783203125,
0.00379180908203125,
0.004436492919921875,
0.0235748291015625,
-0.023529052734375,
-0.044189453125,
-0.0247344970703125,
0.021331787109375,
0.0445556640625,
-0.0167236328125,
0.003696441650390625,
0.0003085136413574219,
-0.0009531974792480469,
0.0278472900390625,
-0.0227203369140625,
-0.0023784637451171875,
-0.01328277587890625,
-0.0102081298828125,
-0.023406982421875,
-0.0224456787109375,
-0.01348876953125,
-0.0379638671875,
-0.0006651878356933594,
-0.01324462890625,
-0.0165252685546875,
0.0203857421875,
-0.004364013671875,
-0.035003662109375,
-0.0283050537109375,
0.02667236328125,
0.0010662078857421875,
0.0207672119140625,
0.00005990266799926758,
-0.04998779296875,
-0.056854248046875,
-0.004486083984375,
-0.044677734375,
-0.024169921875,
-0.047607421875,
-0.03765869140625,
-0.056121826171875,
0.01067352294921875,
0.024688720703125,
0.0091552734375,
-0.01812744140625,
-0.04852294921875,
-0.0250091552734375,
0.0129547119140625,
0.03857421875,
0.0289764404296875,
0.01540374755859375,
0.00927734375,
0.03375244140625,
0.0287017822265625,
0.045623779296875,
0.0217132568359375,
0.0009713172912597656,
-0.0555419921875,
0.055999755859375,
0.0202484130859375,
-0.03668212890625,
-0.07708740234375,
0.0232696533203125,
-0.041168212890625,
0.0308685302734375,
-0.031951904296875,
0.021820068359375,
-0.0171356201171875,
0.0029735565185546875,
-0.037139892578125,
0.032135009765625,
-0.04736328125,
0.031707763671875,
-0.037506103515625,
-0.037078857421875,
-0.00559234619140625,
-0.0283355712890625,
-0.0028018951416015625,
0.006587982177734375,
-0.040008544921875,
-0.0160369873046875,
0.045623779296875,
-0.047515869140625,
0.07965087890625,
0.10736083984375,
-0.007389068603515625,
0.03271484375,
0.032928466796875,
-0.01326751708984375,
-0.0094757080078125,
-0.0047760009765625,
-0.01303863525390625,
-0.0274810791015625,
0.0158843994140625,
-0.001346588134765625,
0.006256103515625,
0.0200042724609375,
-0.006366729736328125,
0.0000903010368347168,
0.074951171875,
0.07366943359375,
-0.07183837890625,
-0.01343536376953125,
0.024627685546875,
-0.031646728515625,
-0.0012464523315429688,
-0.000881195068359375,
-0.03875732421875,
-0.0701904296875,
0.059783935546875,
-0.005558013916015625,
-0.0006709098815917969,
0.0253753662109375,
0.02099609375,
0.018890380859375,
0.0462646484375,
0.075439453125,
0.01177978515625,
-0.022857666015625,
-0.08111572265625,
0.03485107421875,
-0.01519012451171875,
0.0276336669921875,
0.0277099609375,
-0.0171966552734375,
-0.01519775390625,
-0.01141357421875,
0.005046844482421875,
-0.0088348388671875,
-0.03070068359375,
-0.019012451171875,
-0.013763427734375,
0.056365966796875,
0.05218505859375,
-0.01030731201171875,
-0.0042877197265625,
0.0251922607421875,
0.035247802734375,
-0.041259765625,
-0.0225677490234375,
0.00711822509765625,
0.01053619384765625,
0.00024056434631347656,
0.016357421875,
-0.0098724365234375,
-0.04718017578125,
0.003204345703125,
-0.0249786376953125,
0.04486083984375,
-0.05499267578125,
-0.0021209716796875,
-0.01145172119140625,
-0.0301971435546875,
0.0416259765625,
0.0028400421142578125,
0.0338134765625,
-0.0248870849609375,
-0.014495849609375,
0.00963592529296875,
-0.039581298828125,
-0.027069091796875,
-0.0007462501525878906,
-0.0298004150390625,
0.10211181640625,
-0.01157379150390625,
-0.0128173828125,
0.00783538818359375,
0.061614990234375,
-0.01285552978515625,
0.054595947265625,
-0.005237579345703125,
0.0256195068359375,
0.0032787322998046875,
0.07586669921875,
-0.03790283203125,
-0.02239990234375,
0.021240234375,
0.07672119140625,
0.0033206939697265625,
0.007625579833984375,
-0.01512908935546875,
0.006259918212890625,
0.0301971435546875,
0.0243072509765625,
0.0074920654296875,
0.04400634765625,
-0.037841796875,
-0.01134490966796875,
-0.00820159912109375,
-0.029541015625,
0.03143310546875,
-0.057769775390625,
-0.04412841796875,
-0.047149658203125,
0.005062103271484375,
-0.01345062255859375,
-0.00820159912109375,
-0.0294342041015625,
-0.022064208984375,
0.0061492919921875,
-0.0037097930908203125,
0.03228759765625,
-0.0010967254638671875,
0.00431060791015625,
-0.004241943359375,
0.0178375244140625,
0.0084075927734375,
0.0006308555603027344,
0.02783203125,
-0.006008148193359375,
0.006740570068359375,
0.04119873046875,
0.031005859375,
0.0199737548828125,
-0.0272674560546875,
0.014923095703125,
0.0007061958312988281,
-0.0260772705078125,
0.0145263671875,
0.046783447265625,
0.0294647216796875,
0.0255584716796875,
0.027801513671875,
0.034027099609375,
0.0184478759765625,
-0.0177764892578125,
0.0030002593994140625,
0.012908935546875,
-0.00930023193359375,
0.0032520294189453125,
-0.033477783203125,
0.00678253173828125,
0.01392364501953125,
-0.01303863525390625,
0.003803253173828125,
-0.0020961761474609375,
0.017364501953125,
-0.034576416015625,
0.00125885009765625,
0.060394287109375,
0.01436614990234375,
0.042938232421875,
-0.04400634765625,
0.0238189697265625,
0.061065673828125,
0.0452880859375,
-0.02117919921875,
0.037109375,
0.0224151611328125,
-0.00421142578125,
-0.0168609619140625,
0.041778564453125,
-0.01305389404296875,
0.0193023681640625,
-0.0265045166015625,
-0.039031982421875,
-0.0016031265258789062,
0.03314208984375,
0.03302001953125,
-0.0148162841796875,
0.0022106170654296875,
0.02862548828125,
0.014892578125,
0.0015134811401367188,
0.0293121337890625,
-0.0015954971313476562,
0.01435089111328125,
-0.033050537109375,
0.0243377685546875,
0.00038933753967285156,
-0.01128387451171875,
-0.0043182373046875,
0.0251617431640625,
0.028167724609375,
0.004810333251953125,
-0.0003311634063720703,
0.01375579833984375,
-0.01004791259765625,
0.058929443359375,
0.006107330322265625,
0.016357421875,
0.03485107421875,
-0.032318115234375,
-0.051910400390625,
0.0204925537109375,
0.05694580078125,
-0.0173797607421875,
0.0169677734375,
0.0411376953125,
-0.006011962890625,
0.01044464111328125,
0.018646240234375,
0.0224761962890625,
-0.020233154296875,
-0.0218353271484375,
-0.03216552734375,
0.04095458984375,
-0.0173187255859375,
-0.059722900390625,
-0.047515869140625,
-0.04522705078125,
0.05889892578125,
0.0310821533203125,
0.098876953125,
-0.0159912109375,
0.045379638671875,
-0.066162109375,
0.005863189697265625,
-0.04248046875,
-0.0183563232421875,
-0.05029296875,
0.0261383056640625,
0.00005245208740234375,
0.007305145263671875,
-0.0406494140625,
0.024444580078125,
0.0227508544921875,
-0.006134033203125,
0.0274505615234375,
-0.002811431884765625,
0.003276824951171875,
-0.0297088623046875,
-0.0216217041015625,
-0.030487060546875,
-0.06744384765625,
-0.02911376953125,
0.01560211181640625,
-0.002376556396484375,
0.0183868408203125,
-0.037017822265625,
-0.003795623779296875,
-0.00926971435546875,
-0.00927734375,
0.00949859619140625,
0.020294189453125,
0.0073699951171875,
0.0389404296875,
-0.02783203125,
-0.03472900390625,
-0.004619598388671875,
-0.0165557861328125,
-0.0011653900146484375,
0.00047707557678222656,
0.03924560546875,
0.0009379386901855469,
0.0028438568115234375,
0.0022335052490234375,
-0.00563812255859375,
0.01493072509765625,
-0.05108642578125,
-0.0080108642578125,
0.002269744873046875,
0.01293182373046875,
0.053863525390625,
0.0021648406982421875,
-0.011322021484375,
-0.0294036865234375,
-0.0296783447265625,
0.00884246826171875,
-0.042999267578125,
-0.0165863037109375,
-0.024383544921875,
0.0355224609375,
0.02777099609375,
-0.0016269683837890625,
-0.053802490234375,
0.041839599609375,
-0.03594970703125,
0.0701904296875,
-0.03497314453125,
0.00548553466796875,
-0.034698486328125,
-0.0396728515625,
-0.04559326171875,
-0.042999267578125,
-0.0653076171875,
0.050384521484375,
-0.04510498046875,
-0.0105438232421875,
0.019287109375,
0.007656097412109375,
0.0102081298828125,
-0.01461029052734375,
-0.0098724365234375,
0.0250396728515625,
-0.061370849609375,
-0.03033447265625,
0.0257415771484375,
-0.016143798828125,
-0.0012960433959960938,
-0.066162109375,
-0.0139312744140625,
-0.04803466796875,
0.00913238525390625,
-0.0265960693359375,
0.0094146728515625,
0.0174102783203125,
-0.045684814453125,
-0.0760498046875,
-0.00873565673828125,
-0.0173492431640625,
-0.039337158203125,
-0.03839111328125,
-0.02984619140625,
-0.0286865234375,
0.073486328125,
-0.005229949951171875,
-0.019378662109375,
-0.004451751708984375,
0.072509765625,
0.00823211669921875,
0.04766845703125,
0.00809478759765625,
0.012176513671875,
0.0236663818359375,
0.0020294189453125,
-0.000274658203125,
-0.01318359375,
0.0109100341796875,
0.004901885986328125,
0.0272369384765625,
0.0682373046875,
-0.0024776458740234375,
-0.004840850830078125,
-0.00814056396484375,
-0.07232666015625,
0.00536346435546875,
0.00995635986328125,
-0.0249786376953125,
-0.018218994140625,
0.017669677734375,
0.027740478515625,
0.01509857177734375,
-0.002124786376953125,
-0.02532958984375,
-0.047576904296875,
0.0021839141845703125,
-0.00988006591796875,
0.004459381103515625,
-0.037567138671875,
0.0196075439453125,
0.002765655517578125,
-0.005474090576171875,
-0.05938720703125,
-0.014923095703125,
-0.04852294921875,
-0.01580810546875,
-0.00591278076171875,
0.0108642578125,
-0.00524139404296875,
-0.08880615234375,
0.0538330078125,
-0.006839752197265625,
0.0230560302734375,
-0.00531005859375,
0.06732177734375,
0.0294647216796875,
0.0390625,
0.0246124267578125,
0.032379150390625,
-0.01116943359375,
-0.0023517608642578125,
0.0308837890625,
-0.0153656005859375,
-0.01296234130859375,
-0.01258087158203125,
0.037261962890625,
0.029266357421875,
-0.0004131793975830078,
0.01528167724609375,
-0.005584716796875,
0.04583740234375,
-0.01198577880859375,
-0.023101806640625,
-0.024322509765625,
0.018402099609375,
-0.0253448486328125,
0.045623779296875,
-0.0428466796875,
0.01251220703125,
-0.0008935928344726562,
-0.0128326416015625,
-0.0063934326171875,
0.028076171875,
0.0379638671875,
-0.034027099609375,
0.02362060546875,
-0.0618896484375,
0.0289154052734375,
0.01323699951171875
]
|
9055e63905e9c936d61841be38a99936975817bd | Wordpress Stackexchange
Q: ACF: get_field() returning false I have created a custom true/false field with the default value of true. I've set different posts to different values. However, get_field() always returns false:
<?php if( have_posts() ): while( have_posts() ): the_post(); ?>
<?php global var_dump(get_field('display_featured_image'));?>
<?php endwhile; endif ?>
The displayed output is: (bool)false
I've checked and double checked the field name. Why would it return false if the value is set to true?
A: You need to pass in the ID of the post you're trying to get the field from: Eg
get_field('display_featured_image', $post_id).
In a loop you could do
get_field('display_featured_image', get_the_id());
ACF Stores field data in wp's meta_fields, so you could even use WP's built in meta handler to pull the data yourself Eg:
get_post_meta( $post_id, 'acf_field_name', true); // Use true for almost every case, as WP will return an array otherwise.
| Q: ACF: get_field() returning false I have created a custom true/false field with the default value of true. I've set different posts to different values. However, get_field() always returns false:
<?php if( have_posts() ): while( have_posts() ): the_post(); ?>
<?php global var_dump(get_field('display_featured_image'));?>
<?php endwhile; endif ?>
The displayed output is: (bool)false
I've checked and double checked the field name. Why would it return false if the value is set to true?
A: You need to pass in the ID of the post you're trying to get the field from: Eg
get_field('display_featured_image', $post_id).
In a loop you could do
get_field('display_featured_image', get_the_id());
ACF Stores field data in wp's meta_fields, so you could even use WP's built in meta handler to pull the data yourself Eg:
get_post_meta( $post_id, 'acf_field_name', true); // Use true for almost every case, as WP will return an array otherwise.
A: You have a few options. The easiest would be to use get_field( $field_key ) (use the ACF field ID rather than the meta_key). This will choose the correct field regardless of location rules which will let it access the default value.
If you must use the meta key, you can mostly do so with filters. Not sure how efficient it is (could be mitigated by using acf-json caching). This also assumes that your fields keys are unique (otherwise you have to filter based on the location rules, which may or may not be available).
add_filter( 'acf/load_value', function( $value, $post_id, $field ){
// get your field groups
$groups = acf_get_field_groups();
if ( !empty( $groups ) ){
// loop over each group
foreach ($groups as $group) {
// load the fields for this group key
$fields = acf_get_fields( $group['key'] );
if ( !empty( $fields ) ){
// loop over the returned fields
foreach ( $fields as $this_field ){
// if the name is a match, set the default value
if ( $this_field['name'] == $field['name'] ){
return $this_field['default_value'];
}
}
}
}
}
return $value;
}
| wordpress | {
"language": "en",
"length": 325,
"provenance": "stackexchange_00019.jsonl.gz:456235",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/190701"
} | [
0.01837158203125,
-0.0247802734375,
0.01065826416015625,
0.006793975830078125,
-0.0084686279296875,
-0.018096923828125,
0.0146636962890625,
-0.011505126953125,
-0.006557464599609375,
0.0191650390625,
-0.0159149169921875,
0.0068817138671875,
-0.036590576171875,
-0.02911376953125,
-0.0093994140625,
-0.02435302734375,
0.022186279296875,
0.00817108154296875,
0.02130126953125,
-0.0007948875427246094,
0.0006251335144042969,
0.0173187255859375,
0.00547027587890625,
-0.023468017578125,
0.0307464599609375,
-0.068359375,
0.0296478271484375,
-0.0024585723876953125,
0.031494140625,
-0.007350921630859375,
0.029815673828125,
-0.00441741943359375,
0.023284912109375,
0.051025390625,
-0.045440673828125,
-0.03912353515625,
0.028594970703125,
-0.0006170272827148438,
-0.0157012939453125,
0.046722412109375,
0.007549285888671875,
0.01287078857421875,
-0.045654296875,
0.022705078125,
-0.05169677734375,
-0.028533935546875,
-0.0142059326171875,
-0.01175689697265625,
0.0265655517578125,
0.039337158203125,
-0.0148162841796875,
0.0266265869140625,
-0.0181732177734375,
0.01558685302734375,
-0.0040740966796875,
-0.0137939453125,
-0.0265655517578125,
-0.004436492919921875,
0.04571533203125,
0.006633758544921875,
-0.021697998046875,
-0.036651611328125,
0.01568603515625,
-0.05352783203125,
0.01739501953125,
-0.0015840530395507812,
-0.028656005859375,
0.01450347900390625,
-0.0286712646484375,
-0.007038116455078125,
0.01800537109375,
-0.0377197265625,
0.009857177734375,
-0.009613037109375,
-0.034088134765625,
-0.036865234375,
0.025146484375,
-0.045501708984375,
-0.005046844482421875,
0.01202392578125,
-0.0271148681640625,
0.005443572998046875,
-0.09808349609375,
0.0419921875,
-0.0286712646484375,
0.0494384765625,
-0.0208892822265625,
-0.0162506103515625,
-0.0018033981323242188,
-0.04779052734375,
-0.0179290771484375,
-0.0111846923828125,
-0.035003662109375,
-0.00466156005859375,
-0.031951904296875,
-0.032012939453125,
0.04791259765625,
0.059844970703125,
-0.0255126953125,
-0.0231781005859375,
-0.018035888671875,
-0.016082763671875,
-0.0234527587890625,
-0.01154327392578125,
0.02398681640625,
0.0357666015625,
-0.01776123046875,
-0.05096435546875,
0.01406097412109375,
0.01406097412109375,
-0.0012655258178710938,
-0.00861358642578125,
-0.0058441162109375,
-0.0026493072509765625,
-0.0091705322265625,
0.017547607421875,
-0.0271759033203125,
-0.01275634765625,
-0.0171661376953125,
0.0020313262939453125,
0.01715087890625,
0.00792694091796875,
0.03179931640625,
-0.040802001953125,
0.0222930908203125,
0.01238250732421875,
-0.05523681640625,
-0.01154327392578125,
-0.03765869140625,
0.046844482421875,
-0.027679443359375,
-0.00800323486328125,
0.054901123046875,
0.037445068359375,
0.032989501953125,
-0.0260009765625,
-0.0352783203125,
-0.0306243896484375,
-0.00569915771484375,
0.01512908935546875,
-0.01122283935546875,
-0.02276611328125,
0.056365966796875,
0.0019292831420898438,
-0.0584716796875,
0.0012598037719726562,
0.01934814453125,
0.034210205078125,
-0.046783447265625,
-0.06207275390625,
-0.003742218017578125,
-0.01233673095703125,
-0.0059661865234375,
0.0192413330078125,
0.036102294921875,
0.006855010986328125,
0.05255126953125,
-0.02142333984375,
-0.01275634765625,
-0.018829345703125,
0.0489501953125,
-0.01007080078125,
-0.02392578125,
-0.0129241943359375,
-0.02947998046875,
-0.0088653564453125,
-0.041473388671875,
0.0018720626831054688,
0.021087646484375,
0.002811431884765625,
0.06365966796875,
-0.0009217262268066406,
-0.049957275390625,
0.008941650390625,
0.01520538330078125,
-0.00460052490234375,
0.01435089111328125,
0.032745361328125,
0.02410888671875,
-0.016082763671875,
-0.038177490234375,
-0.03704833984375,
0.06060791015625,
-0.034423828125,
-0.04815673828125,
0.016693115234375,
0.008636474609375,
0.0201416015625,
0.02667236328125,
0.0018033981323242188,
0.0341796875,
0.01242828369140625,
-0.0171356201171875,
0.01025390625,
0.0205841064453125,
0.002407073974609375,
-0.041473388671875,
0.0012407302856445312,
-0.01442718505859375,
-0.0175933837890625,
0.029693603515625,
-0.0245819091796875,
0.0155181884765625,
0.0007586479187011719,
-0.0220794677734375,
-0.02545166015625,
-0.00821685791015625,
0.004638671875,
-0.039306640625,
0.029327392578125,
0.0311737060546875,
0.0189056396484375,
-0.052337646484375,
0.06707763671875,
0.022308349609375,
-0.0036830902099609375,
-0.001613616943359375,
-0.0003688335418701172,
-0.03741455078125,
0.0237579345703125,
-0.047607421875,
-0.0207977294921875,
-0.04693603515625,
0.0307159423828125,
0.0438232421875,
-0.013275146484375,
0.01042938232421875,
-0.0151824951171875,
0.056671142578125,
-0.0009331703186035156,
-0.00007814168930053711,
0.01322174072265625,
0.0100555419921875,
0.02239990234375,
-0.0261993408203125,
-0.00939178466796875,
-0.039398193359375,
-0.0882568359375,
0.01216888427734375,
0.07281494140625,
0.032073974609375,
-0.00397491455078125,
-0.036590576171875,
-0.018768310546875,
0.061859130859375,
0.02691650390625,
0.01387786865234375,
-0.031341552734375,
0.026885986328125,
0.0357666015625,
-0.0218505859375,
-0.005588531494140625,
0.03955078125,
-0.04840087890625,
0.0160064697265625,
0.053985595703125,
-0.037841796875,
0.0006289482116699219,
0.00921630859375,
-0.01340484619140625,
-0.01360321044921875,
-0.01081085205078125,
0.0205230712890625,
-0.0249176025390625,
0.001300811767578125,
0.023529052734375,
0.003971099853515625,
0.0071258544921875,
-0.036529541015625,
0.0287322998046875,
0.0307769775390625,
-0.01029205322265625,
-0.00618743896484375,
0.0212249755859375,
0.0140228271484375,
0.00244140625,
-0.04278564453125,
0.003559112548828125,
0.010040283203125,
0.006534576416015625,
-0.00334930419921875,
-0.0283966064453125,
-0.027740478515625,
0.004810333251953125,
0.037567138671875,
-0.00756072998046875,
0.0248565673828125,
0.0175323486328125,
0.026519775390625,
0.022003173828125,
0.018402099609375,
0.051116943359375,
0.00846099853515625,
0.051513671875,
-0.00274658203125,
0.00739288330078125,
-0.033172607421875,
-0.051605224609375,
0.032257080078125,
-0.04547119140625,
0.016845703125,
0.06884765625,
0.01605224609375,
0.01393890380859375,
-0.0106964111328125,
-0.01151275634765625,
-0.0028743743896484375,
0.0194549560546875,
-0.0186920166015625,
-0.0229034423828125,
-0.0721435546875,
-0.014434814453125,
0.0452880859375,
0.11102294921875,
-0.00351715087890625,
-0.031280517578125,
0.0154876708984375,
0.06494140625,
-0.057586669921875,
-0.116943359375,
0.0080108642578125,
-0.032867431640625,
-0.0006184577941894531,
0.0037136077880859375,
-0.004894256591796875,
-0.005329132080078125,
0.0168609619140625,
0.00452423095703125,
0.003955841064453125,
-0.0183563232421875,
-0.050445556640625,
-0.048736572265625,
-0.07550048828125,
-0.01136016845703125,
-0.006504058837890625,
0.0178680419921875,
0.00445556640625,
0.077392578125,
0.009521484375,
-0.030181884765625,
0.01096343994140625,
-0.0023555755615234375,
-0.01088714599609375,
0.0158843994140625,
0.00490570068359375,
-0.0211181640625,
0.037261962890625,
0.0098724365234375,
-0.018829345703125,
0.0114898681640625,
0.00154876708984375,
-0.051177978515625,
-0.01009368896484375,
0.024078369140625,
0.004802703857421875,
0.035980224609375,
0.022186279296875,
0.01152801513671875,
0.032684326171875,
-0.0248870849609375,
-0.0200653076171875,
-0.002346038818359375,
-0.0140838623046875,
0.051177978515625,
-0.01128387451171875,
-0.002391815185546875,
0.0030422210693359375,
0.05853271484375,
-0.00186920166015625,
0.0003352165222167969,
0.008941650390625,
-0.035186767578125,
0.0307769775390625,
0.0026760101318359375,
0.007083892822265625,
-0.007106781005859375,
0.01043701171875,
-0.0239715576171875,
0.01490020751953125,
-0.00734710693359375,
0.021484375,
0.004947662353515625,
-0.00183868408203125,
-0.01483154296875,
-0.0157623291015625,
0.0419921875,
-0.0389404296875,
-0.02880859375,
-0.021942138671875,
-0.007160186767578125,
-0.01483154296875,
0.046539306640625,
-0.01776123046875,
-0.0066070556640625,
-0.033935546875,
0.0032901763916015625,
-0.048583984375,
-0.052886962890625,
-0.0243072509765625,
0.0173797607421875,
-0.08917236328125,
0.0107574462890625,
-0.01163482666015625,
-0.029083251953125,
0.0012302398681640625,
-0.0185394287109375,
-0.0418701171875,
-0.05255126953125,
0.0291748046875,
-0.022552490234375,
0.035980224609375,
0.0187225341796875,
0.0311279296875,
-0.006572723388671875,
-0.0040283203125,
-0.025787353515625,
-0.087646484375,
-0.0265350341796875,
0.049407958984375,
0.047943115234375,
-0.038787841796875,
0.04144287109375,
-0.0311126708984375,
0.059417724609375,
0.0192413330078125,
0.0026836395263671875,
0.015289306640625,
-0.00434112548828125,
0.0005955696105957031,
-0.0201263427734375,
0.0103912353515625,
-0.02490234375,
0.00939178466796875,
-0.032257080078125,
-0.033172607421875,
-0.05206298828125,
-0.055816650390625,
-0.0246429443359375,
-0.02203369140625,
-0.0367431640625,
0.019622802734375,
0.0158538818359375,
-0.047271728515625,
-0.009490966796875,
-0.0347900390625,
-0.0228729248046875,
0.0197906494140625,
0.006702423095703125,
0.00644683837890625,
-0.03424072265625,
0.0013427734375,
0.032440185546875,
0.07965087890625,
0.023681640625,
0.00368499755859375,
-0.07421875,
-0.00824737548828125,
0.0146484375,
-0.01038360595703125,
0.055511474609375,
0.03350830078125,
-0.0149078369140625,
0.0526123046875,
-0.002185821533203125,
0.03875732421875,
-0.064697265625,
0.07989501953125,
-0.0222930908203125,
0.005283355712890625,
0.017486572265625,
-0.01435089111328125,
-0.01132965087890625,
0.043060302734375,
0.005344390869140625,
-0.035125732421875,
0.0061798095703125,
0.0306549072265625,
-0.02325439453125,
0.0110321044921875,
-0.020172119140625,
-0.026947021484375,
0.00885009765625,
0.01439666748046875,
0.0166778564453125,
-0.00783538818359375,
0.01386260986328125,
0.0007877349853515625,
0.0227508544921875,
0.016693115234375,
-0.02294921875,
-0.0213165283203125,
-0.01497650146484375,
0.0021114349365234375,
0.056488037109375,
0.01551055908203125,
-0.00354766845703125,
-0.0008401870727539062,
0.032470703125,
-0.0294952392578125,
-0.06719970703125,
0.0027256011962890625,
-0.0220489501953125,
-0.0008392333984375,
0.044281005859375,
-0.0300445556640625,
0.042266845703125,
0.03790283203125,
-0.00628662109375,
0.019012451171875,
-0.00449371337890625,
0.0010509490966796875,
-0.036285400390625,
0.0153045654296875,
0.0219573974609375,
-0.001888275146484375,
-0.0131988525390625,
0.0946044921875,
0.020660400390625,
0.0250091552734375,
-0.036468505859375,
0.04364013671875,
0.02618408203125,
0.036102294921875,
0.0136871337890625,
-0.028778076171875,
0.0047149658203125,
0.0015630722045898438,
-0.022552490234375,
-0.02447509765625,
-0.0254974365234375,
0.01253509521484375,
0.021331787109375,
-0.01702880859375,
-0.00701141357421875,
0.03631591796875,
0.0218963623046875,
-0.0271759033203125,
0.046051025390625,
-0.00849151611328125,
-0.049835205078125,
-0.033477783203125,
-0.005458831787109375,
0.046630859375,
-0.013824462890625,
-0.02642822265625,
0.0251007080078125,
-0.032135009765625,
0.00896453857421875,
-0.00170135498046875,
-0.035400390625,
0.00949859619140625,
0.017578125,
-0.039337158203125,
-0.020599365234375,
-0.01499176025390625,
0.03387451171875,
-0.030029296875,
0.007843017578125,
-0.035919189453125,
0.01983642578125,
-0.030670166015625,
0.033477783203125,
-0.041351318359375,
0.00922393798828125,
-0.04205322265625,
0.0029430389404296875,
0.060455322265625,
0.0504150390625,
0.006214141845703125,
0.01239013671875,
-0.0275115966796875,
0.0036449432373046875,
0.0155792236328125,
-0.045196533203125,
-0.00559234619140625,
-0.03741455078125,
0.0026340484619140625,
0.0250396728515625,
-0.00417327880859375,
-0.03997802734375,
0.013275146484375,
-0.005352020263671875,
0.01042938232421875,
0.02301025390625,
0.006084442138671875,
0.0186004638671875,
0.018951416015625,
0.0311431884765625,
0.0232696533203125,
-0.01380157470703125,
-0.05108642578125,
-0.020751953125,
-0.026336669921875,
-0.02825927734375,
0.00931549072265625,
0.021087646484375,
-0.0020885467529296875,
-0.021240234375,
0.0043182373046875,
0.00783538818359375,
-0.0028591156005859375,
-0.0086669921875,
-0.016448974609375,
-0.022186279296875,
0.042449951171875,
0.01105499267578125,
-0.0149993896484375,
0.039642333984375,
-0.03375244140625,
-0.0204315185546875,
0.009185791015625,
-0.0260467529296875,
0.035797119140625,
-0.01056671142578125,
0.01351165771484375,
0.026214599609375,
-0.01415252685546875,
0.0372314453125,
0.02630615234375,
0.004665374755859375,
0.0290985107421875,
0.004474639892578125,
0.015380859375,
-0.0240325927734375,
0.066162109375,
-0.0606689453125,
-0.06292724609375,
0.05914306640625,
0.04327392578125,
-0.049041748046875,
0.04803466796875,
-0.0248260498046875,
0.04345703125,
0.01093292236328125,
0.0634765625,
-0.04986572265625,
0.037261962890625,
0.04144287109375,
-0.0300140380859375,
0.00466156005859375,
-0.00804901123046875,
0.0015859603881835938,
-0.01343536376953125,
-0.01177978515625,
0.0189208984375,
-0.0281982421875,
-0.0137939453125,
-0.006221771240234375,
-0.0019779205322265625,
0.0277252197265625,
0.053466796875,
0.0189056396484375,
-0.030548095703125,
-0.0079193115234375,
0.01155853271484375,
0.00514984130859375,
0.0207977294921875,
0.021148681640625,
-0.0237274169921875,
-0.050689697265625,
-0.0692138671875,
-0.051605224609375,
0.01403045654296875,
-0.0574951171875,
0.0438232421875,
0.035797119140625,
0.04058837890625,
0.044891357421875,
0.0170135498046875,
0.0090179443359375,
0.002536773681640625,
0.01678466796875,
-0.0360107421875,
-0.043121337890625,
0.00170135498046875,
0.031280517578125,
-0.039886474609375,
0.0362548828125,
-0.00916290283203125,
-0.03253173828125,
-0.0256500244140625,
0.003559112548828125,
0.0968017578125,
0.005832672119140625,
-0.0482177734375,
0.00344085693359375,
0.006000518798828125,
-0.01380157470703125,
-0.0014276504516601562,
0.0265045166015625,
-0.046661376953125,
-0.01171112060546875,
-0.00391387939453125,
-0.0299072265625,
-0.01006317138671875,
-0.004974365234375,
-0.032562255859375,
0.08831787109375,
0.017303466796875,
-0.010406494140625,
-0.005886077880859375,
0.038055419921875,
-0.02587890625,
0.012908935546875,
-0.039398193359375,
0.038604736328125,
0.018280029296875,
0.034637451171875,
-0.09576416015625,
-0.034088134765625,
-0.0198211669921875,
0.06317138671875,
0.0059051513671875,
-0.002689361572265625,
-0.006343841552734375,
0.0030269622802734375,
0.024078369140625,
0.0394287109375,
-0.00439453125,
0.0084228515625,
0.024627685546875,
0.0596923828125,
0.042755126953125,
-0.07427978515625,
0.0015611648559570312,
-0.006122589111328125,
-0.002063751220703125,
0.0555419921875,
0.01380157470703125,
0.004863739013671875,
-0.0018682479858398438,
0.005260467529296875,
-0.040618896484375,
0.0007176399230957031,
0.039520263671875,
-0.034210205078125,
0.0150299072265625,
0.025909423828125,
0.042388916015625,
0.0207366943359375,
0.070068359375,
-0.0181427001953125,
0.06427001953125,
0.014801025390625,
0.01134490966796875,
0.03759765625,
0.0075225830078125,
0.044891357421875,
-0.02117919921875,
-0.004302978515625,
-0.00921630859375,
0.014251708984375,
-0.01629638671875,
0.0161590576171875,
0.001186370849609375,
-0.006359100341796875,
0.04248046875,
0.08050537109375,
-0.00128936767578125,
-0.032745361328125,
-0.0277099609375,
0.0222930908203125,
0.0162811279296875,
-0.0010099411010742188,
0.005603790283203125,
-0.0261993408203125,
0.0308837890625,
0.084228515625,
-0.049591064453125,
0.03411865234375,
0.056732177734375,
0.012298583984375,
0.004810333251953125,
0.0190582275390625,
-0.09124755859375,
0.0178680419921875,
-0.066162109375,
0.0222320556640625,
0.022216796875,
0.04833984375,
0.0285186767578125,
0.04083251953125,
0.022003173828125,
-0.0236053466796875,
-0.0094451904296875,
0.0181427001953125,
-0.0234222412109375,
0.0401611328125,
-0.049285888671875,
-0.032501220703125,
0.004150390625,
0.033660888671875,
0.0183868408203125,
0.01107025146484375,
0.0384521484375,
0.030120849609375,
-0.036773681640625,
0.0095367431640625,
0.0595703125,
-0.014862060546875,
-0.060028076171875,
-0.039886474609375,
-0.025726318359375,
0.036224365234375,
0.005420684814453125,
0.0631103515625,
-0.06585693359375,
0.04229736328125,
0.014373779296875,
-0.003078460693359375,
0.0129547119140625,
-0.0263824462890625,
0.0041656494140625,
-0.010589599609375,
0.01100921630859375,
0.02239990234375,
-0.044769287109375,
0.01482391357421875,
-0.057464599609375,
-0.0941162109375,
0.0121612548828125,
0.02947998046875,
-0.010711669921875,
-0.0002963542938232422,
0.01021575927734375,
0.0024051666259765625,
0.016632080078125,
-0.008056640625,
0.006549835205078125,
-0.01306915283203125,
0.0202178955078125,
0.0075225830078125,
-0.0082244873046875,
-0.0016298294067382812,
0.03521728515625,
0.0105438232421875,
-0.021728515625,
0.007965087890625,
0.0175933837890625,
0.00576019287109375,
0.0011959075927734375,
-0.01342010498046875,
0.0017366409301757812,
0.006641387939453125,
0.03521728515625,
0.0011138916015625,
-0.0288848876953125,
-0.019775390625,
0.007305145263671875,
-0.0216522216796875,
0.0538330078125,
-0.032928466796875,
-0.0084075927734375,
-0.0197601318359375,
0.031646728515625,
-0.014373779296875,
-0.0301055908203125,
-0.044158935546875,
-0.07537841796875,
-0.072509765625,
-0.0010480880737304688,
0.013214111328125,
0.002197265625,
-0.020263671875,
0.024017333984375,
0.03717041015625,
-0.034698486328125,
0.045379638671875,
-0.060150146484375,
0.08203125,
0.046966552734375,
0.004474639892578125,
0.041717529296875,
-0.025543212890625,
-0.032318115234375,
0.047119140625,
-0.0167694091796875,
0.0156402587890625,
-0.004817962646484375,
-0.0053863525390625,
0.008453369140625,
0.0023784637451171875,
0.0239105224609375,
-0.032867431640625,
0.0011081695556640625,
0.03790283203125,
0.015777587890625,
-0.00859832763671875,
-0.0574951171875,
-0.00250244140625,
-0.053741455078125,
-0.0202178955078125,
0.01490020751953125,
-0.0321044921875,
-0.0185394287109375,
0.0302581787109375,
0.021148681640625,
0.0056610107421875,
-0.0293426513671875,
-0.00902557373046875,
0.010406494140625,
-0.027191162109375,
0.04254150390625,
-0.046905517578125,
0.007350921630859375,
0.024444580078125,
0.031585693359375,
-0.0285186767578125,
0.028045654296875,
0.01194000244140625,
-0.03271484375,
0.034423828125,
0.006381988525390625,
0.00946044921875,
-0.006378173828125,
-0.019622802734375,
0.0135040283203125,
-0.005229949951171875,
0.033966064453125,
-0.002044677734375,
-0.0233001708984375,
-0.01385498046875,
0.0184173583984375,
-0.0098876953125,
-0.042388916015625,
0.0307769775390625,
-0.0670166015625,
-0.018096923828125,
-0.0726318359375,
0.029510498046875,
0.0260772705078125,
-0.035186767578125,
-0.043121337890625,
0.04034423828125,
-0.02679443359375,
-0.00995635986328125,
-0.033966064453125,
-0.028594970703125,
0.00579833984375,
0.046844482421875,
0.0081024169921875,
-0.038482666015625,
-0.059783935546875,
0.0204925537109375,
0.035125732421875,
-0.007129669189453125,
0.044097900390625,
0.0281982421875,
-0.10223388671875,
-0.0204925537109375,
-0.050689697265625,
0.037628173828125,
-0.019500732421875,
0.0021190643310546875,
0.0024013519287109375,
0.007801055908203125,
-0.047332763671875,
-0.021728515625,
-0.0026073455810546875,
0.03973388671875,
0.0009531974792480469,
-0.033203125,
-0.00537109375,
-0.0298614501953125,
0.043212890625,
-0.020660400390625,
-0.0012722015380859375,
-0.0070953369140625,
-0.0616455078125,
-0.046722412109375,
-0.0293731689453125,
-0.0291748046875,
0.034637451171875,
-0.09088134765625,
0.022064208984375,
0.0004184246063232422,
-0.03033447265625,
-0.032379150390625,
0.0303497314453125,
-0.04998779296875,
0.00982666015625,
0.034271240234375,
0.006801605224609375,
-0.031463623046875,
-0.0196380615234375,
0.060211181640625,
-0.044586181640625,
-0.0208740234375,
0.0023708343505859375,
0.016387939453125,
0.0194549560546875,
0.01056671142578125,
0.002597808837890625,
0.007476806640625,
0.015228271484375,
0.0007519721984863281,
0.0271759033203125,
-0.0120849609375,
0.019134521484375,
-0.0143280029296875,
0.00441741943359375,
0.0151824951171875,
-0.0276641845703125,
0.003143310546875,
0.024871826171875,
0.00048422813415527344,
-0.0127716064453125,
0.03369140625,
0.017242431640625,
0.0687255859375,
0.01363372802734375,
0.0538330078125,
-0.01123046875,
-0.03350830078125,
-0.006404876708984375,
-0.043670654296875,
0.005870819091796875,
0.0224761962890625,
0.01161956787109375,
0.0010395050048828125,
-0.0059967041015625,
0.0086669921875,
-0.0031147003173828125,
-0.0159912109375
]
|
92d4a2ade87ff1b6be5a5aa001db2c31e2f233a4 | Wordpress Stackexchange
Q: Add visit site to your toolbar instead of being in the dropdown I'm looking for a way to move the "Visit Site" link from drop-down and add it to the main toolbar, just like in the image shown below:
A: Add this to your theme's functions.php:
add_action( 'admin_bar_menu', 'make_parent_node', 999 );
function make_parent_node( $wp_admin_bar ) {
if ( ! is_admin() ) { return; } // end function if not in admin back-end, credit @Rarst
$args = array(
'id' => 'view-site', // id of the existing child node (View Site)
'title' => 'Visit Site', // alter the title of existing node (optional)
'parent' => false // set parent to false to make it a top level (parent) node
);
$wp_admin_bar->add_node( $args );
}
This will move the "View Site" to just right of the Dashboard drop-down. For more information, see the Codex; the code above is from the "Make an Existing Child Node a Parent Node" section.
| Q: Add visit site to your toolbar instead of being in the dropdown I'm looking for a way to move the "Visit Site" link from drop-down and add it to the main toolbar, just like in the image shown below:
A: Add this to your theme's functions.php:
add_action( 'admin_bar_menu', 'make_parent_node', 999 );
function make_parent_node( $wp_admin_bar ) {
if ( ! is_admin() ) { return; } // end function if not in admin back-end, credit @Rarst
$args = array(
'id' => 'view-site', // id of the existing child node (View Site)
'title' => 'Visit Site', // alter the title of existing node (optional)
'parent' => false // set parent to false to make it a top level (parent) node
);
$wp_admin_bar->add_node( $args );
}
This will move the "View Site" to just right of the Dashboard drop-down. For more information, see the Codex; the code above is from the "Make an Existing Child Node a Parent Node" section.
A: Not complicated, but a little tricky to get timing right.
Something like this should work, but you might need to experiment with priority to get the link to specific position on the bar:
add_action( 'admin_bar_menu', function ( $wp_admin_bar ) {
if ( ! is_admin() ) {
return;
}
/** @var WP_Admin_Bar $wp_admin_bar */
$wp_admin_bar->remove_node( 'view-site' );
$wp_admin_bar->add_menu( array(
'id' => 'view-site',
'title' => __( 'Visit Site' ),
'href' => home_url( '/' ),
) );
}, 31 ); // After `wp_admin_bar_site_menu()` at 30.
| wordpress | {
"language": "en",
"length": 240,
"provenance": "stackexchange_00019.jsonl.gz:456342",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/191101"
} | [
0.044708251953125,
-0.0261993408203125,
-0.0114898681640625,
-0.00005513429641723633,
-0.005126953125,
-0.046844482421875,
0.0333251953125,
-0.025177001953125,
-0.0027790069580078125,
0.0170745849609375,
-0.0258026123046875,
0.00754547119140625,
-0.055572509765625,
-0.0162353515625,
-0.024658203125,
-0.04998779296875,
0.043701171875,
-0.038818359375,
0.01544189453125,
-0.00284576416015625,
0.011749267578125,
0.01264190673828125,
0.026580810546875,
0.0216217041015625,
-0.0159149169921875,
0.005359649658203125,
0.02490234375,
-0.0136566162109375,
-0.016815185546875,
-0.01812744140625,
-0.01078033447265625,
0.01390838623046875,
0.043609619140625,
-0.07122802734375,
0.051605224609375,
0.0296630859375,
0.02154541015625,
-0.032867431640625,
-0.00746917724609375,
0.0140380859375,
0.0007662773132324219,
0.01529693603515625,
-0.01158905029296875,
0.0038013458251953125,
-0.036834716796875,
-0.0167388916015625,
-0.004741668701171875,
-0.01439666748046875,
-0.01458740234375,
-0.07135009765625,
0.007068634033203125,
0.03594970703125,
0.03192138671875,
-0.060455322265625,
-0.00534820556640625,
0.016143798828125,
0.0204010009765625,
-0.006710052490234375,
0.0184478759765625,
0.03338623046875,
-0.02783203125,
0.025146484375,
-0.010711669921875,
-0.055450439453125,
-0.005382537841796875,
-0.004451751708984375,
-0.01486968994140625,
-0.0045623779296875,
-0.052581787109375,
0.010955810546875,
0.05462646484375,
-0.050750732421875,
-0.00896453857421875,
0.01470184326171875,
-0.0299835205078125,
-0.050537109375,
0.0267181396484375,
-0.04718017578125,
0.022247314453125,
0.00921630859375,
-0.01505279541015625,
0.0095367431640625,
-0.01239776611328125,
-0.051971435546875,
0.03668212890625,
0.0002422332763671875,
-0.0176544189453125,
-0.00971221923828125,
-0.041229248046875,
-0.01070404052734375,
-0.0263671875,
0.025665283203125,
-0.06658935546875,
0.03216552734375,
-0.006206512451171875,
0.0210113525390625,
0.005645751953125,
0.0213623046875,
0.0382080078125,
0.041748046875,
-0.031951904296875,
-0.031585693359375,
0.018798828125,
-0.0253448486328125,
-0.01131439208984375,
0.040496826171875,
-0.01068878173828125,
0.01800537109375,
0.021697998046875,
0.03460693359375,
0.00007957220077514648,
-0.0236358642578125,
-0.00225830078125,
-0.006046295166015625,
-0.023651123046875,
-0.005161285400390625,
-0.022216796875,
0.021240234375,
-0.003406524658203125,
0.0379638671875,
-0.0130157470703125,
0.01560211181640625,
-0.040313720703125,
0.00750732421875,
0.00582122802734375,
-0.01384735107421875,
-0.01107025146484375,
0.01407623291015625,
-0.069580078125,
-0.0200653076171875,
-0.0318603515625,
0.032989501953125,
0.06427001953125,
0.033843994140625,
0.00885772705078125,
-0.011993408203125,
0.0029754638671875,
-0.0019350051879882812,
0.0168914794921875,
-0.007110595703125,
0.0247039794921875,
-0.0159759521484375,
0.01360321044921875,
0.006481170654296875,
0.0199127197265625,
0.01384735107421875,
0.01055145263671875,
0.01238250732421875,
0.0160064697265625,
0.010284423828125,
0.0129547119140625,
-0.0404052734375,
0.040985107421875,
-0.001506805419921875,
-0.03656005859375,
-0.021240234375,
-0.0380859375,
-0.0150604248046875,
0.0116729736328125,
-0.016082763671875,
-0.024261474609375,
0.0172882080078125,
0.034027099609375,
-0.0909423828125,
-0.0556640625,
-0.035308837890625,
-0.046783447265625,
-0.01067352294921875,
0.028533935546875,
0.0203857421875,
0.014129638671875,
-0.044342041015625,
0.0112152099609375,
0.0242767333984375,
-0.001125335693359375,
0.0270538330078125,
-0.0016965866088867188,
0.01336669921875,
0.02764892578125,
0.042938232421875,
-0.004795074462890625,
-0.040008544921875,
0.0445556640625,
-0.0209503173828125,
-0.05450439453125,
0.062469482421875,
-0.0229034423828125,
0.03759765625,
0.0198822021484375,
0.01226043701171875,
-0.01433563232421875,
0.038360595703125,
-0.0273895263671875,
-0.0005431175231933594,
0.000701904296875,
-0.01209259033203125,
-0.010772705078125,
0.009124755859375,
-0.017669677734375,
-0.013397216796875,
-0.0293121337890625,
0.0243072509765625,
0.0010099411010742188,
0.03924560546875,
0.028900146484375,
0.01171112060546875,
0.0010480880737304688,
0.0228424072265625,
0.0631103515625,
0.0066680908203125,
-0.0221099853515625,
0.004817962646484375,
-0.01678466796875,
0.0259246826171875,
-0.052398681640625,
0.01541900634765625,
-0.0024394989013671875,
0.0256805419921875,
-0.0111541748046875,
-0.0010051727294921875,
-0.01218414306640625,
-0.026885986328125,
0.00441741943359375,
0.040679931640625,
0.06524658203125,
0.003997802734375,
-0.03863525390625,
0.0006074905395507812,
0.011627197265625,
0.04022216796875,
-0.09930419921875,
0.03546142578125,
0.01479339599609375,
0.0081329345703125,
-0.027923583984375,
-0.00231170654296875,
-0.006282806396484375,
-0.059417724609375,
0.006931304931640625,
0.050811767578125,
0.00850677490234375,
0.0130767822265625,
-0.032470703125,
-0.0020465850830078125,
0.0083465576171875,
-0.0293426513671875,
0.006809234619140625,
0.0070648193359375,
-0.03594970703125,
0.00992584228515625,
0.0439453125,
0.0216522216796875,
-0.00887298583984375,
-0.0212249755859375,
0.004032135009765625,
0.01312255859375,
-0.0071258544921875,
0.01174163818359375,
-0.01148223876953125,
-0.0274810791015625,
0.01470947265625,
-0.038665771484375,
-0.032623291015625,
0.0008854866027832031,
0.0255279541015625,
-0.00460052490234375,
0.0185089111328125,
0.0094757080078125,
-0.0391845703125,
-0.0010528564453125,
0.0279388427734375,
0.02508544921875,
-0.01038360595703125,
0.0298919677734375,
-0.00006151199340820312,
-0.040435791015625,
0.0017242431640625,
-0.0047607421875,
-0.030120849609375,
-0.016693115234375,
-0.03790283203125,
0.024810791015625,
0.002361297607421875,
-0.01020050048828125,
-0.0270538330078125,
-0.005069732666015625,
0.036224365234375,
-0.0138702392578125,
0.0247039794921875,
-0.0016889572143554688,
0.03131103515625,
-0.035247802734375,
-0.02960205078125,
0.0105133056640625,
0.0416259765625,
-0.051055908203125,
0.05133056640625,
-0.006328582763671875,
0.012176513671875,
-0.0313720703125,
0.058074951171875,
0.040008544921875,
-0.0281219482421875,
-0.00033473968505859375,
-0.010467529296875,
-0.0031909942626953125,
-0.0439453125,
0.01511383056640625,
-0.007602691650390625,
-0.0185546875,
-0.040008544921875,
0.039947509765625,
0.01319122314453125,
-0.06463623046875,
0.030609130859375,
-0.0003426074981689453,
-0.017791748046875,
-0.0098724365234375,
-0.053009033203125,
0.0017566680908203125,
-0.0279388427734375,
-0.043609619140625,
-0.04071044921875,
0.0237274169921875,
-0.034149169921875,
0.024566650390625,
0.03326416015625,
-0.0038299560546875,
-0.020843505859375,
-0.0153961181640625,
-0.01329803466796875,
-0.0199432373046875,
-0.036163330078125,
0.0357666015625,
0.00194549560546875,
0.020782470703125,
0.0066375732421875,
0.016387939453125,
0.001064300537109375,
-0.0169525146484375,
-0.003070831298828125,
0.053985595703125,
-0.0174713134765625,
-0.07080078125,
0.0197601318359375,
-0.01666259765625,
-0.031646728515625,
0.017852783203125,
-0.0168304443359375,
-0.004062652587890625,
-0.01110076904296875,
-0.0016574859619140625,
-0.017364501953125,
0.0183868408203125,
0.003345489501953125,
-0.035186767578125,
0.01087188720703125,
0.053619384765625,
0.009002685546875,
-0.0218353271484375,
0.0168914794921875,
0.0018434524536132812,
-0.00792694091796875,
-0.01354217529296875,
-0.0163116455078125,
-0.01279449462890625,
-0.003635406494140625,
0.0030345916748046875,
-0.0032367706298828125,
-0.0203399658203125,
0.07147216796875,
-0.00176239013671875,
0.00983428955078125,
-0.03619384765625,
-0.0496826171875,
-0.07366943359375,
0.035614013671875,
-0.01139068603515625,
0.01538848876953125,
0.0166473388671875,
0.0175933837890625,
0.01290130615234375,
0.017791748046875,
-0.004390716552734375,
-0.01605224609375,
0.04345703125,
0.004581451416015625,
0.036163330078125,
-0.0364990234375,
-0.041015625,
-0.010223388671875,
0.0872802734375,
-0.040557861328125,
0.00029659271240234375,
0.01641845703125,
0.006694793701171875,
-0.034759521484375,
-0.0122222900390625,
-0.06561279296875,
-0.0017633438110351562,
-0.09100341796875,
0.03521728515625,
0.021484375,
-0.03729248046875,
-0.0260162353515625,
0.019195556640625,
-0.0660400390625,
-0.032562255859375,
0.053741455078125,
-0.0037403106689453125,
0.00614166259765625,
0.053375244140625,
-0.0098876953125,
0.0418701171875,
-0.048431396484375,
0.00785064697265625,
-0.046051025390625,
-0.0216064453125,
-0.0284423828125,
0.056304931640625,
0.0087890625,
-0.0013427734375,
-0.023101806640625,
0.029754638671875,
0.03411865234375,
-0.01399993896484375,
0.046783447265625,
-0.0180816650390625,
0.0243377685546875,
0.006015777587890625,
0.03558349609375,
-0.03778076171875,
-0.03778076171875,
-0.0235137939453125,
-0.057708740234375,
-0.0106658935546875,
0.0197296142578125,
0.023040771484375,
0.065673828125,
-0.0207366943359375,
-0.076171875,
-0.065185546875,
0.004947662353515625,
-0.0091705322265625,
0.01468658447265625,
-0.0169219970703125,
-0.04107666015625,
-0.058624267578125,
0.017852783203125,
-0.006927490234375,
-0.00484466552734375,
0.0089111328125,
0.07342529296875,
0.01427459716796875,
-0.02099609375,
-0.002643585205078125,
0.0229339599609375,
0.043701171875,
0.0017070770263671875,
0.032562255859375,
-0.006465911865234375,
-0.034698486328125,
0.08404541015625,
-0.000034332275390625,
0.074951171875,
-0.0232086181640625,
0.04071044921875,
-0.00037789344787597656,
0.0006718635559082031,
0.045166015625,
0.0423583984375,
-0.06976318359375,
0.00928497314453125,
-0.007293701171875,
-0.023590087890625,
-0.027374267578125,
0.0278167724609375,
0.00716400146484375,
0.0374755859375,
-0.01486968994140625,
0.03814697265625,
-0.027374267578125,
0.03424072265625,
0.036376953125,
0.04705810546875,
0.01324462890625,
-0.03167724609375,
0.021148681640625,
0.00591278076171875,
0.003192901611328125,
0.021270751953125,
-0.0139923095703125,
0.040496826171875,
-0.00844573974609375,
-0.01309967041015625,
0.002490997314453125,
-0.022705078125,
0.07586669921875,
0.0628662109375,
-0.00586700439453125,
0.0145263671875,
-0.0017604827880859375,
0.0197906494140625,
-0.040985107421875,
0.0390625,
0.013641357421875,
-0.00916290283203125,
-0.0010099411010742188,
0.00994110107421875,
0.032135009765625,
-0.0244140625,
-0.013214111328125,
0.0228424072265625,
0.00897979736328125,
-0.001007080078125,
-0.0035552978515625,
0.05889892578125,
0.01666259765625,
0.019683837890625,
-0.0219573974609375,
0.006847381591796875,
0.020263671875,
-0.0101776123046875,
-0.00437164306640625,
0.0234375,
0.0302886962890625,
-0.039825439453125,
0.07098388671875,
0.01253509521484375,
-0.0179595947265625,
0.010284423828125,
0.014923095703125,
0.0176849365234375,
0.0196990966796875,
-0.0157470703125,
-0.0037708282470703125,
-0.02325439453125,
0.003192901611328125,
-0.0120086669921875,
-0.038299560546875,
-0.01505279541015625,
0.023468017578125,
-0.00970458984375,
0.0183563232421875,
0.0174407958984375,
-0.021484375,
-0.01399993896484375,
-0.0094757080078125,
0.0207977294921875,
-0.0037364959716796875,
-0.040313720703125,
-0.04620361328125,
0.0023708343505859375,
-0.007465362548828125,
0.01611328125,
-0.05999755859375,
-0.03253173828125,
-0.0206298828125,
0.0137939453125,
0.03973388671875,
0.0105133056640625,
0.010986328125,
-0.06219482421875,
0.01387786865234375,
0.004566192626953125,
-0.04107666015625,
0.0855712890625,
0.0198974609375,
-0.05364990234375,
-0.00203704833984375,
-0.040069580078125,
-0.01263427734375,
-0.03167724609375,
-0.037567138671875,
-0.039398193359375,
0.0021457672119140625,
0.01959228515625,
0.019256591796875,
0.026092529296875,
0.0111541748046875,
-0.01415252685546875,
0.00390625,
-0.005947113037109375,
0.01202392578125,
-0.00608062744140625,
0.05914306640625,
-0.02508544921875,
0.040191650390625,
0.019073486328125,
0.0283966064453125,
-0.00022590160369873047,
-0.0322265625,
0.0234527587890625,
-0.007366180419921875,
-0.034088134765625,
-0.0523681640625,
0.033447265625,
0.037017822265625,
0.07421875,
-0.0156402587890625,
0.029632568359375,
-0.00901031494140625,
0.002895355224609375,
-0.027313232421875,
0.032745361328125,
-0.039947509765625,
0.022705078125,
0.0017528533935546875,
0.00952911376953125,
0.0193328857421875,
-0.0026226043701171875,
0.002918243408203125,
-0.0276031494140625,
0.0211334228515625,
-0.00403594970703125,
-0.044342041015625,
-0.1036376953125,
0.10089111328125,
0.10601806640625,
-0.0156402587890625,
0.040496826171875,
0.01861572265625,
0.002483367919921875,
0.0126495361328125,
0.0080108642578125,
-0.0017757415771484375,
0.023345947265625,
0.01422882080078125,
-0.01141357421875,
0.0013294219970703125,
0.0090789794921875,
-0.0182647705078125,
-0.034271240234375,
0.0099639892578125,
0.01499176025390625,
-0.03228759765625,
-0.0015773773193359375,
0.00708770751953125,
0.00994110107421875,
0.017730712890625,
-0.0178070068359375,
-0.0167694091796875,
-0.00067138671875,
0.0369873046875,
-0.01000213623046875,
-0.0242462158203125,
0.01325225830078125,
0.027099609375,
-0.017333984375,
-0.003814697265625,
-0.0355224609375,
-0.01036834716796875,
0.020538330078125,
-0.0537109375,
-0.026031494140625,
-0.01367950439453125,
-0.0210723876953125,
0.0218505859375,
-0.021148681640625,
0.007205963134765625,
-0.03912353515625,
0.01152801513671875,
-0.036590576171875,
0.0287933349609375,
0.0416259765625,
-0.0060882568359375,
-0.01068878173828125,
0.028167724609375,
-0.0288543701171875,
0.02349853515625,
-0.01093292236328125,
0.0290374755859375,
0.072998046875,
0.019256591796875,
0.0259246826171875,
-0.07281494140625,
-0.0242156982421875,
-0.032012939453125,
-0.047821044921875,
-0.0140838623046875,
-0.0017366409301757812,
0.0259857177734375,
0.057464599609375,
-0.0116119384765625,
-0.0372314453125,
0.047821044921875,
-0.0160369873046875,
-0.040802001953125,
-0.00457763671875,
0.055877685546875,
-0.05780029296875,
-0.053619384765625,
0.0177764892578125,
-0.0628662109375,
-0.038360595703125,
-0.045318603515625,
-0.01751708984375,
0.0994873046875,
-0.028076171875,
0.025421142578125,
0.06707763671875,
0.032379150390625,
-0.06988525390625,
0.0055084228515625,
-0.0172271728515625,
0.051666259765625,
0.06280517578125,
0.0174713134765625,
-0.0012454986572265625,
-0.024017333984375,
0.0127410888671875,
0.0279998779296875,
0.019256591796875,
0.0160980224609375,
-0.055419921875,
-0.0139923095703125,
0.039825439453125,
0.042510986328125,
0.02447509765625,
0.048065185546875,
-0.012969970703125,
0.0019855499267578125,
0.058837890625,
-0.0126953125,
0.0225982666015625,
0.0312042236328125,
-0.0160675048828125,
0.0056610107421875,
-0.00263214111328125,
-0.0183868408203125,
0.0111236572265625,
0.0213775634765625,
0.032989501953125,
-0.0171661376953125,
-0.0268707275390625,
0.0126190185546875,
0.039154052734375,
-0.0032215118408203125,
0.0153045654296875,
-0.0147552490234375,
-0.0091705322265625,
-0.00812530517578125,
0.0269317626953125,
-0.000926971435546875,
0.0031375885009765625,
-0.0408935546875,
0.00598907470703125,
-0.031707763671875,
0.00115966796875,
-0.0185546875,
0.06585693359375,
-0.0300445556640625,
0.039947509765625,
0.050750732421875,
0.0296630859375,
-0.0187225341796875,
-0.01288604736328125,
0.061553955078125,
0.07232666015625,
-0.03228759765625,
-0.0254058837890625,
0.007198333740234375,
-0.0079498291015625,
0.007671356201171875,
-0.0108642578125,
0.006809234619140625,
0.02081298828125,
0.032562255859375,
0.01568603515625,
-0.0230560302734375,
-0.0028247833251953125,
0.0006365776062011719,
0.0169677734375,
0.0219268798828125,
0.01406097412109375,
0.003406524658203125,
-0.008331298828125,
-0.0037059783935546875,
-0.026611328125,
-0.0014181137084960938,
0.01727294921875,
0.00012034177780151367,
-0.0129241943359375,
-0.01103973388671875,
-0.0297088623046875,
-0.0261077880859375,
-0.00785064697265625,
0.037017822265625,
-0.045196533203125,
0.007251739501953125,
-0.0040130615234375,
0.03619384765625,
0.00652313232421875,
0.0241851806640625,
0.03936767578125,
0.05255126953125,
0.0185089111328125,
-0.0117645263671875,
0.024078369140625,
-0.0058441162109375,
0.01262664794921875,
-0.0268707275390625,
-0.01139068603515625,
0.0276031494140625,
-0.012115478515625,
-0.002593994140625,
-0.025390625,
0.054046630859375,
-0.0306396484375,
0.042938232421875,
-0.01922607421875,
-0.0216064453125,
0.027435302734375,
-0.0193634033203125,
0.09033203125,
0.0121612548828125,
-0.071044921875,
-0.036285400390625,
0.029693603515625,
-0.046173095703125,
0.01131439208984375,
0.0478515625,
-0.0253448486328125,
0.00536346435546875,
0.0247344970703125,
0.0219268798828125,
-0.00782012939453125,
0.0118865966796875,
-0.0247802734375,
0.00897979736328125,
0.0546875,
0.006572723388671875,
-0.053741455078125,
-0.035491943359375,
-0.0078887939453125,
0.0275115966796875,
-0.00835418701171875,
0.0421142578125,
0.01398468017578125,
0.0270233154296875,
-0.0280914306640625,
-0.01401519775390625,
-0.0260162353515625,
-0.030853271484375,
-0.00972747802734375,
-0.0029544830322265625,
-0.000010848045349121094,
0.014007568359375,
-0.0285491943359375,
-0.005344390869140625,
0.0085906982421875,
-0.0296173095703125,
0.0079193115234375,
-0.044830322265625,
0.02215576171875,
-0.007732391357421875,
0.052459716796875,
-0.00334930419921875,
-0.0256805419921875,
-0.07513427734375,
-0.0482177734375,
0.046112060546875,
0.0516357421875,
0.005847930908203125,
0.031494140625,
0.0250091552734375,
0.0244598388671875,
0.0207061767578125,
0.0032806396484375,
0.01641845703125,
0.01995849609375,
-0.01273345947265625,
0.0066680908203125,
0.045684814453125,
0.0028324127197265625,
0.053131103515625,
0.0169525146484375,
0.00409698486328125,
0.057403564453125,
-0.0166473388671875,
-0.0182952880859375,
-0.0145416259765625,
0.0123748779296875,
-0.039886474609375,
0.00394439697265625,
0.00478363037109375,
0.00948333740234375,
-0.0345458984375,
0.0194244384765625,
-0.031829833984375,
-0.0189361572265625,
-0.0027790069580078125,
-0.006671905517578125,
0.002048492431640625,
-0.06256103515625,
-0.06353759765625,
0.05438232421875,
0.07464599609375,
0.037445068359375,
-0.0926513671875,
0.08551025390625,
-0.03521728515625,
0.055816650390625,
0.0411376953125,
0.0292510986328125,
-0.000023424625396728516,
0.0221099853515625,
-0.06231689453125,
-0.003170013427734375,
-0.0225830078125,
-0.010986328125,
-0.0254364013671875,
-0.01338958740234375,
-0.000888824462890625,
0.0034942626953125,
0.036529541015625,
-0.0177154541015625,
-0.0115814208984375,
0.0208740234375,
0.009918212890625,
-0.058197021484375,
-0.005889892578125,
-0.0185546875,
0.04119873046875,
0.0157470703125,
-0.0209197998046875,
-0.006317138671875,
-0.01032257080078125,
-0.049560546875,
0.0009632110595703125,
0.0035610198974609375,
-0.0643310546875,
-0.09454345703125,
0.03411865234375,
-0.027069091796875,
-0.0305023193359375,
-0.054046630859375,
0.0007557868957519531,
-0.036285400390625,
0.1014404296875,
0.00774383544921875,
-0.0184173583984375,
0.00531005859375,
0.05035400390625,
0.0207977294921875,
0.06671142578125,
-0.006175994873046875,
-0.005886077880859375,
-0.0264434814453125,
0.0166015625,
0.0102691650390625,
0.02734375,
-0.008758544921875,
-0.0341796875,
0.037017822265625,
0.0228271484375,
-0.038543701171875,
-0.056854248046875,
0.015960693359375,
0.0261688232421875,
0.0026397705078125,
0.0018453598022460938,
-0.0149078369140625,
-0.03094482421875,
0.01535797119140625,
0.00370025634765625,
0.00366973876953125,
0.0161895751953125,
-0.044219970703125,
-0.0679931640625,
-0.03717041015625,
-0.044158935546875,
0.0171051025390625,
-0.09368896484375,
-0.001026153564453125,
0.01165771484375,
-0.00205230712890625,
0.006298065185546875,
-0.00423431396484375,
-0.0243377685546875,
-0.004940032958984375,
0.0257110595703125,
0.02496337890625,
-0.0628662109375,
-0.0069732666015625,
0.06298828125,
-0.05059814453125,
-0.028778076171875,
0.02001953125,
0.00843048095703125,
0.0012559890747070312,
-0.0036830902099609375,
-0.01039886474609375,
-0.04290771484375,
-0.034088134765625,
0.00982666015625,
-0.0194854736328125,
0.04779052734375,
-0.0241546630859375,
-0.037933349609375,
-0.031982421875,
0.00799560546875,
0.002696990966796875,
0.004425048828125,
-0.0278778076171875,
0.031951904296875,
0.0007786750793457031,
0.0771484375,
0.0139617919921875,
0.014312744140625,
0.0082855224609375,
0.025848388671875,
-0.012847900390625,
-0.01468658447265625,
0.004375457763671875,
-0.03582763671875,
-0.01288604736328125,
0.01690673828125,
-0.028778076171875,
-0.05633544921875,
0.0131683349609375,
0.006496429443359375,
0.006671905517578125,
0.027191162109375
]
|
a62cb5d021ad8d26bdada659d9a2476fb1ba7d09 | Wordpress Stackexchange
Q: How to add ul class on nav I've been learning to convert HTML to WordPress and want to convert on to class like this:
<div class="mainmenu pull-left">
<ul class="nav navbar-nav collapse navbar-collapse">
<li><a href="index.html" class="active">Home</a></li>
<li class="dropdown"><a href="#">Shop<i class="fa fa-angle-down"></i></a>
<ul role="menu" class="sub-menu">
<li><a href="shop.html">Products</a></li>
<li><a href="product-details.html">Product Details</a></li>
<li><a href="checkout.html">Checkout</a></li>
<li><a href="cart.html">Cart</a></li>
<li><a href="login.html">Login</a></li>
</ul>
</li>
<li class="dropdown"><a href="#">Blog<i class="fa fa-angle-down"></i></a>
<ul role="menu" class="sub-menu">
<li><a href="blog.html">Blog List</a></li>
<li><a href="blog-single.html">Blog Single</a></li>
</ul>
</li>
<li><a href="404.html">404</a></li>
<li><a href="contact-us.html">Contact</a></li>
</ul>
</div>
This what I've done:
if ( ! function_exists( 'mytheme_setup' ) ) :
function wpflex_setup() {
register_nav_menus( array(
'primary' => 'Primary Menu'
) );
}
endif;
wp_nav_menu( array(
'theme_location' => 'top-menu',
'container' => '',
'menu_class' => 'mainmenu pull-left',
) );
How to add class for ul?
A: You already did it the right way. If you take a look in the Documentation for wp_nav_menu, you'll see that menu_class is the right option for the UL's class:
wp_nav_menu( array(
'theme_location' => 'top-menu',
'container' => '',
'menu_class'=> 'mainmenu pull-left *add-your-class-here*'
) );
| Q: How to add ul class on nav I've been learning to convert HTML to WordPress and want to convert on to class like this:
<div class="mainmenu pull-left">
<ul class="nav navbar-nav collapse navbar-collapse">
<li><a href="index.html" class="active">Home</a></li>
<li class="dropdown"><a href="#">Shop<i class="fa fa-angle-down"></i></a>
<ul role="menu" class="sub-menu">
<li><a href="shop.html">Products</a></li>
<li><a href="product-details.html">Product Details</a></li>
<li><a href="checkout.html">Checkout</a></li>
<li><a href="cart.html">Cart</a></li>
<li><a href="login.html">Login</a></li>
</ul>
</li>
<li class="dropdown"><a href="#">Blog<i class="fa fa-angle-down"></i></a>
<ul role="menu" class="sub-menu">
<li><a href="blog.html">Blog List</a></li>
<li><a href="blog-single.html">Blog Single</a></li>
</ul>
</li>
<li><a href="404.html">404</a></li>
<li><a href="contact-us.html">Contact</a></li>
</ul>
</div>
This what I've done:
if ( ! function_exists( 'mytheme_setup' ) ) :
function wpflex_setup() {
register_nav_menus( array(
'primary' => 'Primary Menu'
) );
}
endif;
wp_nav_menu( array(
'theme_location' => 'top-menu',
'container' => '',
'menu_class' => 'mainmenu pull-left',
) );
How to add class for ul?
A: You already did it the right way. If you take a look in the Documentation for wp_nav_menu, you'll see that menu_class is the right option for the UL's class:
wp_nav_menu( array(
'theme_location' => 'top-menu',
'container' => '',
'menu_class'=> 'mainmenu pull-left *add-your-class-here*'
) );
A: It's simple just you need to add items_wrap parameter and add or edit class attr:
wp_nav_menu( array(
'theme_location' => 'top-menu',
'container' => false,
'items_wrap' => '<ul class="nav your_custom_class">%3$s</ul>',
));
A: Wordpress creates the default page menu different from the active menus -- those which you create and assign in the backend. There is no direct way to add classes to the UL in page menus, but there are other ways. Try adding this to your functions.php
function add_id_and_classes_to_page_menu( $ulclass ) {
return preg_replace( '/<ul>/', '<ul id="main-menu" class="nav navbar-nav collapse navbar-collapse">', $ulclass, 1 );
}
add_filter( 'wp_page_menu', 'add_id_and_classes_to_page_menu' );
Keep in mind this will replace any existing id and classes, thus I re-added them in the above example. I also added an id="main-menu" for completion.
A: Here is your fixed code. I have tested it add class to ul
wp_nav_menu( array(
'theme_location' => 'top-menu',
'container' => 'ul',
'menu_class' => 'mainmenu pull-left',
) );
A: <?php
wp_nav_menu( array('menu' => 'Main Menu' ,
'menu_class' => 'nav navbar-nav',
'container' => ''));
?>
| wordpress | {
"language": "en",
"length": 337,
"provenance": "stackexchange_00019.jsonl.gz:456399",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/191299"
} | [
0.00479888916015625,
-0.0195770263671875,
0.002227783203125,
0.038604736328125,
0.0036830902099609375,
-0.032318115234375,
0.05133056640625,
-0.04522705078125,
-0.0166168212890625,
0.0094757080078125,
-0.0201416015625,
0.0341796875,
-0.01090240478515625,
-0.0251922607421875,
0.03594970703125,
-0.02825927734375,
0.034759521484375,
-0.0174407958984375,
0.03369140625,
-0.0008955001831054688,
0.005336761474609375,
0.0045166015625,
0.04486083984375,
0.003604888916015625,
0.004444122314453125,
-0.0374755859375,
0.07623291015625,
-0.0185546875,
0.0037784576416015625,
-0.01474761962890625,
0.0230560302734375,
-0.0193328857421875,
0.0538330078125,
-0.0097808837890625,
-0.010223388671875,
0.0148468017578125,
-0.00702667236328125,
-0.009368896484375,
-0.01367950439453125,
0.021942138671875,
0.018310546875,
-0.0214691162109375,
-0.0155792236328125,
0.052947998046875,
-0.0189971923828125,
-0.07171630859375,
0.022857666015625,
-0.0246429443359375,
0.02691650390625,
-0.07952880859375,
-0.002574920654296875,
0.00902557373046875,
0.0224151611328125,
-0.06341552734375,
-0.045806884765625,
-0.02911376953125,
-0.0041351318359375,
-0.0335693359375,
0.006702423095703125,
0.059051513671875,
0.0181121826171875,
0.018402099609375,
-0.01113128662109375,
-0.032073974609375,
-0.01200103759765625,
-0.0179290771484375,
0.01171112060546875,
0.022735595703125,
-0.0131988525390625,
-0.016754150390625,
0.0028438568115234375,
0.00009626150131225586,
-0.0187835693359375,
-0.01084136962890625,
-0.0061798095703125,
-0.0261688232421875,
0.01456451416015625,
-0.0268096923828125,
0.00531005859375,
0.0333251953125,
0.053436279296875,
0.042633056640625,
0.00943756103515625,
-0.049835205078125,
0.029327392578125,
-0.03424072265625,
-0.003391265869140625,
-0.02423095703125,
-0.0133209228515625,
-0.0026378631591796875,
-0.0266265869140625,
-0.018707275390625,
0.0157470703125,
-0.0007920265197753906,
-0.053497314453125,
-0.004261016845703125,
0.00568389892578125,
0.055938720703125,
-0.007568359375,
0.03155517578125,
-0.00406646728515625,
-0.029754638671875,
0.033447265625,
-0.07305908203125,
0.00024020671844482422,
0.049468994140625,
0.01507568359375,
0.0987548828125,
0.058380126953125,
0.0164031982421875,
0.010040283203125,
0.01372528076171875,
-0.00916290283203125,
-0.0296630859375,
-0.0092620849609375,
-0.0056610107421875,
-0.022674560546875,
0.0160064697265625,
0.011505126953125,
-0.01806640625,
0.020721435546875,
0.0667724609375,
-0.03509521484375,
-0.018280029296875,
0.0010747909545898438,
0.0006279945373535156,
0.033721923828125,
-0.06036376953125,
-0.034332275390625,
-0.0208740234375,
-0.015777587890625,
0.06512451171875,
0.0230865478515625,
0.003936767578125,
-0.0251007080078125,
-0.0052490234375,
0.0303955078125,
0.04443359375,
-0.01268768310546875,
0.0011749267578125,
0.01100921630859375,
-0.033111572265625,
-0.0435791015625,
-0.01123046875,
-0.01540374755859375,
0.0153961181640625,
0.01044464111328125,
0.00858306884765625,
-0.0029506683349609375,
-0.06011962890625,
0.02239990234375,
-0.054412841796875,
0.05682373046875,
0.0043792724609375,
-0.041290283203125,
-0.02301025390625,
0.0009646415710449219,
-0.01282501220703125,
-0.00606536865234375,
-0.03900146484375,
-0.0170135498046875,
0.004669189453125,
0.0555419921875,
-0.08538818359375,
-0.06414794921875,
-0.024658203125,
-0.08062744140625,
-0.015838623046875,
0.0143890380859375,
-0.032684326171875,
-0.0015821456909179688,
-0.044189453125,
-0.007579803466796875,
0.0151214599609375,
0.01032257080078125,
0.044708251953125,
-0.00019276142120361328,
0.0054168701171875,
0.0145721435546875,
0.0286407470703125,
0.0083465576171875,
-0.0294647216796875,
0.027984619140625,
-0.006610870361328125,
-0.03228759765625,
0.04693603515625,
-0.023406982421875,
0.00472259521484375,
0.0222320556640625,
-0.01519012451171875,
0.03411865234375,
0.038360595703125,
-0.049407958984375,
0.07177734375,
-0.015716552734375,
-0.035919189453125,
-0.006381988525390625,
0.015594482421875,
-0.02459716796875,
-0.0201263427734375,
-0.0228729248046875,
0.0280914306640625,
-0.0164947509765625,
0.006687164306640625,
0.00670623779296875,
0.00571441650390625,
-0.0013790130615234375,
0.036102294921875,
-0.008056640625,
0.014984130859375,
0.00359344482421875,
0.01255035400390625,
0.0121917724609375,
-0.075439453125,
-0.0242462158203125,
0.01079559326171875,
0.01085662841796875,
0.009857177734375,
-0.03167724609375,
-0.02239990234375,
-0.0055084228515625,
-0.041961669921875,
-0.0304412841796875,
0.0718994140625,
0.04547119140625,
-0.00392913818359375,
-0.0230560302734375,
-0.0222320556640625,
0.00665283203125,
0.01003265380859375,
-0.057098388671875,
0.040496826171875,
0.01305389404296875,
0.003910064697265625,
-0.05242919921875,
0.015899658203125,
-0.008026123046875,
-0.003971099853515625,
-0.0133514404296875,
0.0272369384765625,
0.0256805419921875,
0.0251617431640625,
-0.0100860595703125,
-0.03997802734375,
0.037384033203125,
-0.0224761962890625,
0.0244903564453125,
-0.04730224609375,
-0.043121337890625,
-0.0186309814453125,
0.0004820823669433594,
0.0192108154296875,
0.039306640625,
0.043701171875,
-0.014373779296875,
0.040679931640625,
-0.0099029541015625,
-0.019805908203125,
0.00255584716796875,
-0.00710296630859375,
0.01107025146484375,
0.006374359130859375,
-0.0308685302734375,
0.0100250244140625,
0.036773681640625,
-0.0194854736328125,
0.01192474365234375,
-0.00876617431640625,
-0.02862548828125,
-0.017974853515625,
0.033172607421875,
0.0428466796875,
0.0010480880737304688,
0.034820556640625,
-0.00913238525390625,
0.0158538818359375,
-0.01050567626953125,
-0.0079345703125,
0.004184722900390625,
0.01000213623046875,
-0.01544189453125,
0.062225341796875,
0.041046142578125,
-0.02728271484375,
-0.03277587890625,
-0.039276123046875,
0.01508331298828125,
-0.03558349609375,
-0.0229339599609375,
0.0242156982421875,
0.045654296875,
0.0003902912139892578,
-0.021881103515625,
0.01551055908203125,
-0.00640106201171875,
-0.0120391845703125,
0.0693359375,
-0.020294189453125,
0.037017822265625,
-0.014984130859375,
0.04583740234375,
0.0531005859375,
-0.0301971435546875,
0.01305389404296875,
-0.0137786865234375,
-0.0235595703125,
-0.03326416015625,
0.02764892578125,
0.005123138427734375,
-0.055938720703125,
0.050689697265625,
0.072021484375,
0.0212860107421875,
0.01151275634765625,
-0.00926971435546875,
-0.0311737060546875,
-0.0101165771484375,
0.00811004638671875,
-0.05242919921875,
-0.02288818359375,
0.016845703125,
-0.091552734375,
0.03643798828125,
-0.0066070556640625,
-0.05743408203125,
-0.036590576171875,
0.0382080078125,
0.014007568359375,
0.0164794921875,
-0.01282501220703125,
-0.06378173828125,
-0.034332275390625,
-0.0836181640625,
0.0231781005859375,
0.0003273487091064453,
0.022979736328125,
0.00225830078125,
0.035003662109375,
-0.007678985595703125,
-0.01165008544921875,
0.0280914306640625,
0.040252685546875,
0.01255035400390625,
-0.0015316009521484375,
-0.042724609375,
-0.026947021484375,
-0.01641845703125,
-0.0152435302734375,
0.0026531219482421875,
-0.0284576416015625,
0.033294677734375,
0.00528717041015625,
0.005809783935546875,
-0.0169677734375,
0.0164337158203125,
-0.00789642333984375,
-0.0007615089416503906,
0.018463134765625,
0.03582763671875,
-0.033416748046875,
0.007701873779296875,
-0.04461669921875,
-0.0252532958984375,
0.016632080078125,
-0.01490020751953125,
0.024627685546875,
-0.01007080078125,
0.023468017578125,
-0.01560211181640625,
-0.00484466552734375,
0.055419921875,
-0.034820556640625,
-0.0008563995361328125,
-0.0259246826171875,
-0.01629638671875,
-0.025665283203125,
0.06817626953125,
0.0009164810180664062,
-0.0286865234375,
0.02691650390625,
-0.00677490234375,
-0.0219573974609375,
-0.0103912353515625,
-0.05218505859375,
-0.045654296875,
0.049957275390625,
0.0017442703247070312,
0.018402099609375,
-0.021759033203125,
-0.03399658203125,
-0.00460052490234375,
0.0999755859375,
-0.0599365234375,
-0.0062713623046875,
0.00504302978515625,
-0.003704071044921875,
0.0195159912109375,
-0.0039825439453125,
-0.0621337890625,
-0.0201568603515625,
-0.11102294921875,
-0.0026092529296875,
-0.0258941650390625,
-0.031646728515625,
-0.0026874542236328125,
-0.0180816650390625,
-0.03631591796875,
-0.07061767578125,
0.041778564453125,
-0.0225067138671875,
-0.019866943359375,
0.0281524658203125,
-0.029052734375,
-0.0011625289916992188,
-0.026214599609375,
0.00081634521484375,
-0.039520263671875,
-0.024139404296875,
-0.00572967529296875,
0.040374755859375,
0.00801849365234375,
-0.0220184326171875,
-0.0301666259765625,
0.044525146484375,
0.032958984375,
-0.01255035400390625,
0.0271453857421875,
-0.007511138916015625,
-0.0013885498046875,
-0.020233154296875,
0.020904541015625,
-0.032562255859375,
0.02435302734375,
-0.0001747608184814453,
-0.07684326171875,
-0.01097869873046875,
-0.0229034423828125,
0.023101806640625,
0.021270751953125,
-0.03485107421875,
-0.05645751953125,
-0.040435791015625,
0.0352783203125,
0.0025615692138671875,
-0.00027751922607421875,
0.0177001953125,
0.0035114288330078125,
-0.021026611328125,
-0.0179901123046875,
-0.0010328292846679688,
-0.0142364501953125,
0.0111846923828125,
-0.004428863525390625,
0.017303466796875,
-0.0167999267578125,
0.01546478271484375,
0.049530029296875,
0.047332763671875,
-0.01323699951171875,
0.06158447265625,
0.025360107421875,
0.004512786865234375,
0.054901123046875,
-0.01180267333984375,
0.0523681640625,
-0.0012121200561523438,
0.01511383056640625,
0.00997161865234375,
0.0013866424560546875,
0.00872039794921875,
0.037261962890625,
-0.042694091796875,
0.0030975341796875,
0.00972747802734375,
-0.050048828125,
0.0374755859375,
0.032867431640625,
-0.0027408599853515625,
0.019989013671875,
0.0000591278076171875,
-0.0190277099609375,
-0.01873779296875,
-0.043975830078125,
0.060760498046875,
0.042022705078125,
-0.01354217529296875,
0.02264404296875,
0.046630859375,
-0.03155517578125,
0.0131683349609375,
0.00246429443359375,
0.020751953125,
0.0012645721435546875,
-0.007373809814453125,
-0.039154052734375,
-0.01082611083984375,
-0.01149749755859375,
0.0867919921875,
0.05609130859375,
-0.003448486328125,
-0.00839996337890625,
0.01203155517578125,
-0.01027679443359375,
-0.0259857177734375,
0.002918243408203125,
0.0400390625,
-0.0178680419921875,
-0.01163482666015625,
0.0019779205322265625,
-0.03594970703125,
-0.044281005859375,
-0.036529541015625,
0.044952392578125,
0.0059967041015625,
0.01236724853515625,
0.0297698974609375,
0.010833740234375,
0.057525634765625,
-0.00736236572265625,
-0.02838134765625,
-0.0269622802734375,
-0.00809478759765625,
0.03167724609375,
0.034576416015625,
-0.01157379150390625,
-0.03289794921875,
0.035247802734375,
0.014312744140625,
-0.01406097412109375,
-0.0072021484375,
0.035736083984375,
0.042755126953125,
0.029083251953125,
-0.0074005126953125,
-0.050384521484375,
-0.033477783203125,
-0.020111083984375,
0.0325927734375,
-0.025543212890625,
-0.06451416015625,
-0.0170440673828125,
0.0229949951171875,
0.021881103515625,
-0.035186767578125,
-0.01535797119140625,
-0.004482269287109375,
0.006977081298828125,
0.02911376953125,
0.0091552734375,
-0.016387939453125,
0.0208740234375,
0.024627685546875,
0.007598876953125,
0.03607177734375,
0.036529541015625,
-0.06365966796875,
-0.028656005859375,
-0.02130126953125,
-0.033905029296875,
0.055023193359375,
-0.007335662841796875,
0.021697998046875,
-0.05206298828125,
0.0193939208984375,
-0.04864501953125,
0.00006902217864990234,
0.01134490966796875,
-0.006374359130859375,
-0.04296875,
0.00904083251953125,
-0.039337158203125,
-0.002246856689453125,
0.0016307830810546875,
-0.037872314453125,
-0.0321044921875,
-0.021240234375,
0.019989013671875,
0.0052032470703125,
0.003589630126953125,
-0.032623291015625,
-0.014739990234375,
-0.0006914138793945312,
0.0297698974609375,
-0.004085540771484375,
-0.020904541015625,
0.05548095703125,
0.0251007080078125,
0.0267486572265625,
0.025146484375,
0.0325927734375,
-0.01174163818359375,
-0.0211181640625,
-0.013519287109375,
-0.0263519287109375,
0.004673004150390625,
-0.0027713775634765625,
-0.01025390625,
0.05133056640625,
0.10003662109375,
-0.0033817291259765625,
-0.004543304443359375,
0.00832366943359375,
0.005664825439453125,
-0.0289306640625,
0.0130157470703125,
0.01250457763671875,
0.01100921630859375,
0.015594482421875,
0.009521484375,
0.04547119140625,
-0.0012426376342773438,
0.00414276123046875,
-0.02679443359375,
-0.005306243896484375,
-0.001956939697265625,
0.0006937980651855469,
-0.041778564453125,
0.03961181640625,
0.04998779296875,
0.002223968505859375,
0.0218353271484375,
0.010406494140625,
0.00946044921875,
-0.0196533203125,
-0.0023365020751953125,
0.0184326171875,
0.021392822265625,
0.06854248046875,
-0.010833740234375,
-0.033294677734375,
0.026214599609375,
-0.057159423828125,
0.01544952392578125,
0.087158203125,
0.090576171875,
-0.0826416015625,
0.004810333251953125,
0.0247650146484375,
-0.0241241455078125,
0.048614501953125,
0.019317626953125,
-0.047393798828125,
-0.022857666015625,
0.03277587890625,
-0.04925537109375,
-0.0164642333984375,
0.0196380615234375,
0.01470947265625,
0.0172576904296875,
0.0191497802734375,
0.043121337890625,
0.008026123046875,
0.00110626220703125,
-0.0694580078125,
-0.0045013427734375,
0.007785797119140625,
-0.05487060546875,
0.007354736328125,
0.0296630859375,
0.0064849853515625,
-0.065185546875,
0.0276947021484375,
0.0007658004760742188,
0.0008940696716308594,
0.005126953125,
0.0084991455078125,
0.002864837646484375,
0.0223541259765625,
-0.02593994140625,
-0.0031757354736328125,
0.00405120849609375,
-0.01535797119140625,
0.0023937225341796875,
0.0015993118286132812,
0.03118896484375,
-0.0169830322265625,
-0.02093505859375,
0.015289306640625,
-0.03607177734375,
-0.01380157470703125,
-0.00605010986328125,
-0.029327392578125,
0.05706787109375,
-0.01329803466796875,
-0.0252227783203125,
0.019500732421875,
-0.01165771484375,
-0.0044097900390625,
-0.0161590576171875,
0.03704833984375,
-0.07562255859375,
-0.04052734375,
-0.0003402233123779297,
-0.036376953125,
0.0025348663330078125,
-0.032012939453125,
-0.03350830078125,
0.0689697265625,
-0.06829833984375,
0.02093505859375,
0.0333251953125,
0.027801513671875,
-0.0030269622802734375,
0.01074981689453125,
-0.01251983642578125,
0.029815673828125,
0.00396728515625,
0.016082763671875,
-0.0079345703125,
-0.002227783203125,
0.0119476318359375,
0.0171051025390625,
-0.050079345703125,
-0.00021147727966308594,
-0.0213623046875,
-0.0275726318359375,
0.0021724700927734375,
0.045257568359375,
0.043121337890625,
0.0099945068359375,
-0.04766845703125,
0.02203369140625,
-0.016326904296875,
-0.060943603515625,
0.0099334716796875,
-0.01416015625,
-0.06396484375,
-0.003993988037109375,
-0.0078887939453125,
-0.00350189208984375,
0.029205322265625,
0.0572509765625,
-0.01171875,
0.01399993896484375,
0.0026264190673828125,
-0.007633209228515625,
0.059112548828125,
0.03240966796875,
0.035736083984375,
-0.037689208984375,
-0.01019287109375,
-0.0239715576171875,
0.03338623046875,
-0.02978515625,
-0.005893707275390625,
-0.021331787109375,
0.00494384765625,
0.0158233642578125,
-0.00708770751953125,
-0.00955963134765625,
0.049041748046875,
-0.0033931732177734375,
0.0184173583984375,
0.01511383056640625,
0.0254669189453125,
-0.047607421875,
-0.05084228515625,
0.042724609375,
0.041107177734375,
-0.0096435546875,
-0.0272674560546875,
0.0028629302978515625,
0.01824951171875,
0.0078277587890625,
0.00096893310546875,
0.0162200927734375,
-0.07696533203125,
-0.0208740234375,
-0.021759033203125,
-0.0072479248046875,
0.00262451171875,
0.0004825592041015625,
0.0017261505126953125,
0.020172119140625,
0.0006976127624511719,
0.005222320556640625,
-0.045654296875,
0.01476287841796875,
-0.0285491943359375,
0.04949951171875,
0.0262451171875,
0.03887939453125,
0.003726959228515625,
-0.0323486328125,
0.01129913330078125,
0.00637054443359375,
0.025054931640625,
-0.0452880859375,
-0.006168365478515625,
-0.0265350341796875,
0.040313720703125,
0.018402099609375,
-0.01153564453125,
0.01248931884765625,
0.039794921875,
0.03704833984375,
-0.01702880859375,
-0.01617431640625,
0.0210113525390625,
-0.0215911865234375,
0.00492095947265625,
0.0182952880859375,
-0.0010509490966796875,
0.027679443359375,
-0.006908416748046875,
-0.048828125,
0.034881591796875,
0.053955078125,
-0.0192108154296875,
0.042205810546875,
0.00658416748046875,
0.007061004638671875,
-0.001758575439453125,
-0.006023406982421875,
0.0191192626953125,
0.017181396484375,
-0.11676025390625,
-0.0117645263671875,
-0.00812530517578125,
-0.093505859375,
0.04534912109375,
0.06304931640625,
-0.0211334228515625,
-0.015838623046875,
0.052581787109375,
-0.01751708984375,
0.00592803955078125,
0.0193023681640625,
-0.010498046875,
0.03912353515625,
0.0389404296875,
0.0244598388671875,
-0.05731201171875,
-0.0323486328125,
-0.032562255859375,
0.039947509765625,
-0.0239715576171875,
0.030548095703125,
-0.0052337646484375,
0.042022705078125,
-0.048126220703125,
-0.0195770263671875,
-0.01227569580078125,
-0.0438232421875,
0.022918701171875,
0.00641632080078125,
-0.016998291015625,
0.014190673828125,
-0.01287078857421875,
0.0499267578125,
0.012664794921875,
-0.032501220703125,
0.02532958984375,
0.0011014938354492188,
0.003082275390625,
-0.01129913330078125,
-0.0128173828125,
-0.028961181640625,
-0.0144805908203125,
-0.0185546875,
-0.01241302490234375,
0.036956787109375,
0.021484375,
-0.0278778076171875,
0.037078857421875,
0.0131683349609375,
0.0013713836669921875,
0.0113983154296875,
-0.01169586181640625,
0.005725860595703125,
0.0241851806640625,
0.011871337890625,
-0.005802154541015625,
0.05047607421875,
0.006626129150390625,
0.0274810791015625,
-0.00115203857421875,
0.023895263671875,
0.0277557373046875,
-0.03790283203125,
0.07135009765625,
0.070556640625,
0.053070068359375,
-0.051239013671875,
0.010955810546875,
0.08258056640625,
-0.0005140304565429688,
0.0214080810546875,
0.0072174072265625,
-0.023162841796875,
-0.024810791015625,
-0.01023101806640625,
0.0160064697265625,
-0.021514892578125,
-0.0185089111328125,
-0.05523681640625,
-0.007022857666015625,
0.03387451171875,
0.004459381103515625,
-0.039031982421875,
-0.0079498291015625,
0.0092315673828125,
0.08453369140625,
-0.0271453857421875,
0.00939178466796875,
-0.0078582763671875,
0.005031585693359375,
-0.03076171875,
-0.01145172119140625,
-0.0226898193359375,
0.0120697021484375,
-0.0254364013671875,
0.01357269287109375,
0.0155029296875,
-0.0252227783203125,
0.019866943359375,
-0.0007524490356445312,
0.035125732421875,
0.057373046875,
-0.0050201416015625,
-0.02587890625,
-0.00879669189453125,
0.0157318115234375,
0.0053863525390625,
-0.044525146484375,
-0.004123687744140625,
-0.039337158203125,
0.0009851455688476562,
0.06854248046875,
-0.03631591796875,
0.0180511474609375,
-0.0200347900390625,
-0.037078857421875,
0.1082763671875,
0.0112762451171875,
-0.032257080078125,
0.0060272216796875,
0.0074615478515625,
-0.0114593505859375,
0.02801513671875,
-0.0014934539794921875,
-0.0179290771484375,
0.0207977294921875,
0.02557373046875,
0.00864410400390625,
0.0875244140625,
0.01099395751953125,
-0.02020263671875,
-0.0006837844848632812,
-0.0105133056640625,
-0.0201873779296875,
0.00420379638671875,
-0.0012722015380859375,
-0.0174102783203125,
0.033203125,
0.044342041015625,
-0.0450439453125,
-0.046051025390625,
0.0116729736328125,
0.0303955078125,
0.0278167724609375,
-0.0172576904296875,
-0.037506103515625,
-0.040618896484375,
0.03515625,
-0.0196075439453125,
0.0096893310546875,
0.015716552734375,
-0.0031871795654296875,
-0.005687713623046875,
-0.034149169921875,
0.0122528076171875,
0.0227203369140625,
-0.0455322265625,
0.0052947998046875,
-0.0013799667358398438,
0.0096588134765625,
-0.0019550323486328125,
0.0000851750373840332,
-0.017181396484375,
-0.009429931640625,
-0.006305694580078125,
-0.0034656524658203125,
-0.03839111328125,
0.03759765625,
0.065185546875,
-0.045074462890625,
-0.0010900497436523438,
0.02899169921875,
-0.02362060546875,
0.053955078125,
0.02777099609375,
-0.01995849609375,
-0.01055908203125,
-0.005901336669921875,
0.005176544189453125,
-0.0098876953125,
0.0168304443359375,
-0.0272216796875,
-0.0007138252258300781,
-0.0255584716796875,
0.0290069580078125,
0.0182037353515625,
0.0218353271484375,
-0.04632568359375,
0.04486083984375,
0.014312744140625,
0.023468017578125,
0.0182342529296875,
-0.0087890625,
-0.0242462158203125,
0.07330322265625,
0.046478271484375,
-0.055572509765625,
0.055999755859375,
-0.0286407470703125,
-0.01708984375,
-0.01113128662109375,
-0.01493072509765625,
-0.07550048828125,
0.02886962890625,
0.052734375,
0.002803802490234375,
0.03460693359375
]
|
bc5c8b19fcc9d9c724ae15e1103b09f473d321a1 | Wordpress Stackexchange
Q: how can I use WP_Query to exclude a specific tag.? I have the following working code for a query on a specific category and tag slug:
$args = array(
'category_name' => $cat_name,
'tag' => $tag_name,
'post__not_in' => $sticky
);
$my_query = new WP_Query( $args );
I can't figure out how to exclude a specific tag name from the query. Do I need the tag ID? How do I get it? Thank you in advance.
A: Use tag__not_in parameter. You have to use tag ID for this parameter
$args = array(
'category_name' => $cat_name,
'tag' => $tag_name,
'post__not_in' => $sticky,
'tag__not_in' => array($tag_id_1, $tag_id_2)
);
$my_query = new WP_Query( $args );
| Q: how can I use WP_Query to exclude a specific tag.? I have the following working code for a query on a specific category and tag slug:
$args = array(
'category_name' => $cat_name,
'tag' => $tag_name,
'post__not_in' => $sticky
);
$my_query = new WP_Query( $args );
I can't figure out how to exclude a specific tag name from the query. Do I need the tag ID? How do I get it? Thank you in advance.
A: Use tag__not_in parameter. You have to use tag ID for this parameter
$args = array(
'category_name' => $cat_name,
'tag' => $tag_name,
'post__not_in' => $sticky,
'tag__not_in' => array($tag_id_1, $tag_id_2)
);
$my_query = new WP_Query( $args );
A: You need to use 'tag__not_in' and you need the ID of the Tag. Have a look into https://codex.wordpress.org/Function_Reference/get_term_by to retrieve the term object, where the ID is contained.
| wordpress | {
"language": "en",
"length": 140,
"provenance": "stackexchange_00019.jsonl.gz:456426",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/191384"
} | [
0.051605224609375,
0.0069732666015625,
0.00962066650390625,
-0.0007114410400390625,
0.040313720703125,
-0.047119140625,
0.08636474609375,
-0.02630615234375,
-0.0177764892578125,
0.042510986328125,
-0.034454345703125,
-0.004673004150390625,
0.01045989990234375,
0.0029697418212890625,
-0.029083251953125,
-0.0443115234375,
0.01363372802734375,
-0.01148223876953125,
0.001308441162109375,
-0.0270233154296875,
0.032196044921875,
-0.032012939453125,
0.017242431640625,
0.03887939453125,
0.03424072265625,
-0.033050537109375,
0.026641845703125,
-0.0176849365234375,
0.033172607421875,
0.00011897087097167969,
0.029266357421875,
-0.0206146240234375,
0.0082855224609375,
0.02117919921875,
-0.00478363037109375,
-0.0120849609375,
0.01067352294921875,
-0.0032100677490234375,
0.0276947021484375,
0.01556396484375,
0.0191650390625,
-0.0151214599609375,
-0.038543701171875,
0.041412353515625,
-0.030609130859375,
-0.0316162109375,
0.00948333740234375,
-0.030975341796875,
0.027069091796875,
-0.04583740234375,
0.01207733154296875,
0.0238189697265625,
0.034393310546875,
-0.04376220703125,
-0.0200958251953125,
0.033111572265625,
0.0016241073608398438,
0.03643798828125,
0.027984619140625,
-0.01065826416015625,
-0.04620361328125,
0.0196990966796875,
0.011688232421875,
-0.014617919921875,
0.00823211669921875,
-0.004795074462890625,
0.0280303955078125,
0.01236724853515625,
-0.02972412109375,
0.006778717041015625,
0.048065185546875,
-0.031829833984375,
-0.02471923828125,
0.01145172119140625,
-0.07598876953125,
-0.019989013671875,
0.054107666015625,
-0.038421630859375,
-0.0013990402221679688,
0.004871368408203125,
0.034912109375,
-0.01434326171875,
-0.061981201171875,
0.022125244140625,
0.02154541015625,
0.04388427734375,
0.0012989044189453125,
-0.028472900390625,
-0.017913818359375,
-0.0023784637451171875,
-0.017547607421875,
-0.01416778564453125,
-0.040374755859375,
0.017669677734375,
0.006435394287109375,
-0.023712158203125,
0.01512908935546875,
0.021881103515625,
-0.0010204315185546875,
0.0004832744598388672,
0.0005941390991210938,
-0.041717529296875,
0.0143280029296875,
-0.01715087890625,
0.030303955078125,
0.0955810546875,
-0.016876220703125,
0.031646728515625,
0.06268310546875,
0.00629425048828125,
0.0574951171875,
-0.0098114013671875,
-0.0239715576171875,
0.0029468536376953125,
-0.0667724609375,
0.024169921875,
-0.02392578125,
-0.04925537109375,
-0.0231475830078125,
-0.016998291015625,
0.008270263671875,
0.0460205078125,
-0.051422119140625,
-0.02593994140625,
0.01316070556640625,
-0.01027679443359375,
0.0025844573974609375,
0.01053619384765625,
-0.0037822723388671875,
0.0018739700317382812,
-0.033905029296875,
0.01389312744140625,
0.07855224609375,
0.03289794921875,
-0.001506805419921875,
-0.014190673828125,
0.0379638671875,
-0.031585693359375,
0.00524139404296875,
-0.00009036064147949219,
0.0216217041015625,
-0.01812744140625,
0.005939483642578125,
-0.0023021697998046875,
0.031890869140625,
0.023529052734375,
0.01444244384765625,
0.018768310546875,
-0.006038665771484375,
-0.022369384765625,
0.0467529296875,
-0.0413818359375,
0.043243408203125,
0.00811767578125,
-0.07305908203125,
-0.0027637481689453125,
0.0026645660400390625,
-0.0158843994140625,
-0.039215087890625,
-0.050567626953125,
-0.014312744140625,
0.0032634735107421875,
0.020721435546875,
-0.01256561279296875,
-0.02056884765625,
-0.004215240478515625,
-0.03106689453125,
-0.01122283935546875,
0.00922393798828125,
0.00830841064453125,
-0.005931854248046875,
0.0032482147216796875,
0.04937744140625,
-0.0019893646240234375,
-0.01221466064453125,
0.00262451171875,
-0.0145416259765625,
0.0156097412109375,
0.01457977294921875,
0.0241851806640625,
-0.0022735595703125,
-0.03253173828125,
0.0252685546875,
-0.003448486328125,
-0.07843017578125,
0.04376220703125,
0.0144195556640625,
0.06304931640625,
-0.004825592041015625,
0.0019292831420898438,
0.0948486328125,
0.034942626953125,
-0.0219879150390625,
0.040802001953125,
0.00464630126953125,
-0.037994384765625,
-0.02459716796875,
-0.0156402587890625,
0.00254058837890625,
-0.008697509765625,
0.01317596435546875,
0.0200347900390625,
-0.031982421875,
0.012847900390625,
-0.0885009765625,
0.0159912109375,
-0.028961181640625,
0.041107177734375,
-0.0142059326171875,
0.01885986328125,
0.0293731689453125,
-0.01364898681640625,
-0.04962158203125,
0.04669189453125,
-0.02227783203125,
-0.0311431884765625,
-0.016326904296875,
0.004886627197265625,
-0.011932373046875,
0.0022830963134765625,
0.00902557373046875,
-0.006580352783203125,
0.00154876708984375,
0.016204833984375,
0.046051025390625,
-0.026153564453125,
-0.0018987655639648438,
-0.024627685546875,
0.0362548828125,
0.0196533203125,
-0.072021484375,
0.00762939453125,
0.056427001953125,
0.09088134765625,
-0.002147674560546875,
0.020477294921875,
0.0367431640625,
0.0085601806640625,
-0.006916046142578125,
0.0134124755859375,
0.0231781005859375,
-0.0062103271484375,
-0.04205322265625,
-0.0219268798828125,
0.038360595703125,
-0.0643310546875,
-0.025909423828125,
0.0034923553466796875,
0.004604339599609375,
0.002140045166015625,
0.024810791015625,
-0.01152801513671875,
0.042510986328125,
0.020111083984375,
0.0235443115234375,
0.0088653564453125,
-0.01244354248046875,
0.01253509521484375,
-0.0072021484375,
-0.0012197494506835938,
-0.01177978515625,
-0.01230621337890625,
0.0023670196533203125,
-0.0183563232421875,
0.054229736328125,
-0.0148162841796875,
0.026702880859375,
0.016082763671875,
-0.01316070556640625,
0.0017213821411132812,
0.0016918182373046875,
-0.0238189697265625,
0.007495880126953125,
0.015350341796875,
-0.00036215782165527344,
0.0166168212890625,
-0.0189971923828125,
-0.00220489501953125,
0.035369873046875,
0.019012451171875,
0.0035724639892578125,
0.09320068359375,
0.056671142578125,
-0.0142364501953125,
-0.06982421875,
-0.0521240234375,
0.0277557373046875,
-0.0010786056518554688,
-0.042327880859375,
-0.0257568359375,
-0.006107330322265625,
0.0498046875,
-0.006011962890625,
-0.00492095947265625,
0.050384521484375,
-0.00162506103515625,
-0.016845703125,
-0.01085662841796875,
0.0195770263671875,
-0.0302734375,
0.0511474609375,
0.06378173828125,
-0.01358795166015625,
0.0006756782531738281,
0.0201416015625,
-0.0266876220703125,
0.00942230224609375,
-0.0035648345947265625,
-0.00975799560546875,
0.032928466796875,
-0.09185791015625,
0.0297088623046875,
0.0220184326171875,
0.01023101806640625,
0.01433563232421875,
-0.0269927978515625,
0.0030918121337890625,
0.01319122314453125,
-0.053253173828125,
-0.05767822265625,
0.0164947509765625,
-0.005451202392578125,
-0.00843048095703125,
0.013641357421875,
-0.00859832763671875,
-0.019683837890625,
0.02130126953125,
-0.00765228271484375,
-0.00742340087890625,
-0.04534912109375,
-0.08087158203125,
-0.061920166015625,
-0.048370361328125,
0.0703125,
0.004779815673828125,
0.01020050048828125,
0.0199127197265625,
0.0987548828125,
0.02215576171875,
-0.053955078125,
0.0194854736328125,
-0.029510498046875,
-0.038848876953125,
0.028289794921875,
-0.005649566650390625,
-0.007144927978515625,
0.002246856689453125,
0.00472259521484375,
0.0389404296875,
0.01129150390625,
0.004322052001953125,
-0.012969970703125,
0.01073455810546875,
-0.006038665771484375,
0.039642333984375,
-0.00945281982421875,
-0.0313720703125,
0.01403045654296875,
0.03619384765625,
-0.027801513671875,
-0.02197265625,
-0.0282745361328125,
-0.036285400390625,
0.036102294921875,
0.0108184814453125,
0.012176513671875,
-0.01141357421875,
0.02911376953125,
0.058013916015625,
0.03009033203125,
0.01143646240234375,
0.000011086463928222656,
0.01445770263671875,
0.0230865478515625,
0.054901123046875,
-0.0278167724609375,
0.0095062255859375,
-0.033111572265625,
-0.007335662841796875,
-0.0117645263671875,
-0.0168304443359375,
-0.0146484375,
-0.01161956787109375,
-0.0285797119140625,
-0.00193023681640625,
0.0267791748046875,
0.001361846923828125,
0.0154876708984375,
-0.0005235671997070312,
-0.02752685546875,
-0.018035888671875,
0.03387451171875,
0.0111541748046875,
-0.05096435546875,
-0.0538330078125,
0.00438690185546875,
0.0229339599609375,
-0.01342010498046875,
0.058624267578125,
-0.019744873046875,
-0.06689453125,
-0.0115509033203125,
-0.0236358642578125,
-0.034759521484375,
-0.00921630859375,
-0.032073974609375,
-0.039886474609375,
-0.04498291015625,
0.051849365234375,
-0.046142578125,
0.0198822021484375,
-0.03533935546875,
0.0210723876953125,
-0.066162109375,
-0.0361328125,
0.00045037269592285156,
-0.02996826171875,
0.0159149169921875,
-0.0335693359375,
-0.016754150390625,
-0.015777587890625,
0.031158447265625,
-0.034820556640625,
-0.0002624988555908203,
-0.0030879974365234375,
0.0135650634765625,
-0.01125335693359375,
0.005580902099609375,
-0.008148193359375,
0.0194549560546875,
-0.01517486572265625,
-0.005584716796875,
-0.0074310302734375,
-0.0010175704956054688,
-0.0247955322265625,
0.042022705078125,
-0.02020263671875,
0.006786346435546875,
0.00815582275390625,
-0.02935791015625,
-0.050506591796875,
-0.010467529296875,
-0.00714874267578125,
0.0029659271240234375,
-0.0181732177734375,
-0.0023193359375,
0.0002727508544921875,
-0.0286407470703125,
0.0904541015625,
0.03729248046875,
-0.014801025390625,
-0.0099639892578125,
0.08355712890625,
0.00067901611328125,
-0.064453125,
-0.0811767578125,
-0.010498046875,
0.040679931640625,
-0.047088623046875,
0.051666259765625,
0.0121612548828125,
-0.03515625,
0.1103515625,
-0.01126861572265625,
0.0014781951904296875,
-0.01378631591796875,
0.046630859375,
-0.01203155517578125,
-0.0251007080078125,
0.007495880126953125,
-0.048065185546875,
0.0220184326171875,
0.0169830322265625,
-0.01190948486328125,
-0.040435791015625,
0.0135955810546875,
0.055206298828125,
-0.00838470458984375,
0.0126953125,
-0.046539306640625,
-0.0316162109375,
0.00743865966796875,
0.048553466796875,
-0.006237030029296875,
0.028289794921875,
-0.0082855224609375,
-0.004375457763671875,
-0.01410675048828125,
0.0130157470703125,
-0.0148468017578125,
0.0143280029296875,
-0.051605224609375,
0.01910400390625,
0.0023899078369140625,
-0.01922607421875,
0.0004601478576660156,
0.004669189453125,
0.017669677734375,
0.00833892822265625,
-0.02642822265625,
0.01105499267578125,
-0.00445556640625,
-0.0006442070007324219,
0.0072174072265625,
0.002750396728515625,
0.0305328369140625,
0.0164642333984375,
0.01142120361328125,
0.0013246536254882812,
-0.01104736328125,
-0.03369140625,
-0.0287322998046875,
-0.0026226043701171875,
0.00868988037109375,
-0.0164642333984375,
0.01049041748046875,
0.056671142578125,
-0.01129913330078125,
0.053314208984375,
-0.0153350830078125,
-0.0169830322265625,
-0.045501708984375,
0.033050537109375,
0.0194244384765625,
-0.02301025390625,
0.029510498046875,
-0.01824951171875,
0.033905029296875,
-0.0232086181640625,
0.00995635986328125,
-0.0017042160034179688,
0.01067352294921875,
-0.0197601318359375,
-0.040557861328125,
0.047821044921875,
-0.026885986328125,
-0.0082550048828125,
0.02685546875,
0.0130157470703125,
-0.0104827880859375,
-0.048492431640625,
-0.02508544921875,
0.0419921875,
0.0034847259521484375,
-0.028961181640625,
0.05169677734375,
-0.040130615234375,
0.0269775390625,
0.013641357421875,
0.0006265640258789062,
-0.00017213821411132812,
-0.004558563232421875,
0.018402099609375,
-0.01433563232421875,
-0.050140380859375,
0.035552978515625,
0.0015363693237304688,
-0.01099395751953125,
-0.0051727294921875,
0.0139312744140625,
-0.0352783203125,
0.0595703125,
-0.0241851806640625,
-0.031951904296875,
0.0162200927734375,
0.00708770751953125,
0.05694580078125,
0.05511474609375,
0.01385498046875,
-0.01348114013671875,
-0.03094482421875,
-0.0263214111328125,
0.01299285888671875,
-0.0240631103515625,
-0.00836181640625,
-0.01302337646484375,
0.004726409912109375,
0.0298004150390625,
-0.018890380859375,
-0.02276611328125,
-0.00004982948303222656,
0.00252532958984375,
-0.002498626708984375,
0.01250457763671875,
-0.0236358642578125,
0.018768310546875,
0.006893157958984375,
-0.01093292236328125,
-0.01702880859375,
-0.0007691383361816406,
0.026580810546875,
-0.017852783203125,
-0.00555419921875,
-0.07513427734375,
-0.01296234130859375,
0.0197601318359375,
-0.0513916015625,
0.02435302734375,
0.0203704833984375,
0.004756927490234375,
0.03741455078125,
-0.0203857421875,
0.0036106109619140625,
-0.0084381103515625,
-0.00379180908203125,
-0.044342041015625,
0.0188751220703125,
0.0400390625,
-0.009857177734375,
-0.0172576904296875,
-0.03411865234375,
0.0169830322265625,
-0.0189208984375,
-0.01177215576171875,
-0.028839111328125,
0.006038665771484375,
0.00010293722152709961,
0.0294189453125,
0.035186767578125,
0.00159454345703125,
0.0328369140625,
0.0275421142578125,
0.014251708984375,
0.0069427490234375,
-0.01336669921875,
-0.0084381103515625,
0.0006284713745117188,
0.05865478515625,
-0.0020236968994140625,
0.0065460205078125,
0.054351806640625,
-0.0255126953125,
-0.033905029296875,
0.008575439453125,
0.01346588134765625,
-0.023590087890625,
0.0025730133056640625,
0.0263519287109375,
0.030731201171875,
-0.019195556640625,
0.0170135498046875,
-0.01543426513671875,
-0.03399658203125,
0.004253387451171875,
-0.008453369140625,
-0.014068603515625,
-0.0038509368896484375,
0.0178680419921875,
-0.01174163818359375,
0.0035572052001953125,
0.03192138671875,
0.0220489501953125,
-0.01511383056640625,
0.00498199462890625,
0.0281524658203125,
-0.0185546875,
0.0032024383544921875,
0.01776123046875,
0.014862060546875,
-0.0274200439453125,
-0.06549072265625,
0.022216796875,
0.0088653564453125,
-0.040496826171875,
0.018280029296875,
-0.024749755859375,
0.041595458984375,
0.0419921875,
-0.006404876708984375,
-0.016510009765625,
0.0226287841796875,
-0.034759521484375,
-0.035186767578125,
0.0035724639892578125,
0.00812530517578125,
0.01922607421875,
-0.041839599609375,
0.017303466796875,
-0.047454833984375,
0.01477813720703125,
-0.0010528564453125,
-0.0051422119140625,
0.03338623046875,
-0.014923095703125,
-0.0162200927734375,
0.004161834716796875,
0.02734375,
0.0287017822265625,
-0.00036644935607910156,
0.0011358261108398438,
-0.027862548828125,
-0.02178955078125,
0.005611419677734375,
-0.032440185546875,
-0.01166534423828125,
-0.014007568359375,
-0.09478759765625,
0.09429931640625,
0.0192718505859375,
0.07659912109375,
0.01407623291015625,
0.0159759521484375,
-0.03082275390625,
-0.01324462890625,
-0.0968017578125,
0.0677490234375,
0.06488037109375,
0.0689697265625,
-0.051727294921875,
-0.0032596588134765625,
0.031463623046875,
-0.0006542205810546875,
0.052490234375,
-0.00435638427734375,
-0.01898193359375,
-0.0171356201171875,
0.049713134765625,
0.06475830078125,
0.01029205322265625,
0.01143646240234375,
0.01222991943359375,
0.007183074951171875,
0.042266845703125,
-0.0207366943359375,
0.044525146484375,
-0.0242462158203125,
-0.0027008056640625,
0.02252197265625,
0.014495849609375,
0.0138702392578125,
-0.026702880859375,
-0.001312255859375,
-0.01276397705078125,
-0.0147857666015625,
0.0099029541015625,
-0.0011758804321289062,
0.004520416259765625,
0.0274658203125,
0.046630859375,
-0.1162109375,
-0.0703125,
-0.0308380126953125,
0.0418701171875,
0.025299072265625,
0.0287322998046875,
0.040496826171875,
0.00841522216796875,
0.0765380859375,
-0.0150146484375,
0.01702880859375,
-0.002010345458984375,
-0.0120086669921875,
0.04486083984375,
0.010009765625,
0.01800537109375,
-0.0526123046875,
0.0085296630859375,
0.0546875,
0.06207275390625,
-0.0498046875,
0.0036754608154296875,
-0.0021762847900390625,
0.0021953582763671875,
-0.017120361328125,
-0.0261688232421875,
0.006755828857421875,
0.04803466796875,
0.0276031494140625,
-0.064697265625,
0.0287017822265625,
0.051544189453125,
0.022796630859375,
-0.017974853515625,
-0.032501220703125,
-0.06573486328125,
0.01424407958984375,
-0.046722412109375,
0.0245513916015625,
0.0118865966796875,
0.0498046875,
0.0269012451171875,
0.01580810546875,
-0.003513336181640625,
-0.0285491943359375,
-0.02374267578125,
0.039093017578125,
-0.0244598388671875,
0.0166168212890625,
-0.01470184326171875,
-0.0294036865234375,
-0.001720428466796875,
0.0206756591796875,
0.03338623046875,
0.01525115966796875,
0.050140380859375,
0.033660888671875,
-0.014617919921875,
-0.01302337646484375,
0.004825592041015625,
-0.0277099609375,
-0.00945281982421875,
-0.0313720703125,
0.0207061767578125,
0.043426513671875,
0.00839996337890625,
0.006664276123046875,
0.0325927734375,
0.032928466796875,
-0.0264739990234375,
-0.002262115478515625,
-0.0026378631591796875,
-0.0286712646484375,
0.0249481201171875,
-0.019012451171875,
0.006450653076171875,
0.0028133392333984375,
-0.05712890625,
-0.00897979736328125,
-0.03546142578125,
0.013946533203125,
0.0247802734375,
0.023834228515625,
-0.01119232177734375,
0.049713134765625,
0.036285400390625,
-0.0186309814453125,
-0.003780364990234375,
0.001628875732421875,
0.036773681640625,
0.007183074951171875,
-0.015716552734375,
0.021636962890625,
-0.055877685546875,
-0.023468017578125,
0.02703857421875,
0.004177093505859375,
-0.01230621337890625,
0.046844482421875,
0.019866943359375,
-0.0128326416015625,
-0.01279449462890625,
0.044525146484375,
-0.03192138671875,
-0.0367431640625,
0.0755615234375,
-0.0123138427734375,
-0.01447296142578125,
-0.0030269622802734375,
0.026641845703125,
-0.00473785400390625,
0.052032470703125,
-0.054656982421875,
-0.009124755859375,
-0.039154052734375,
0.0219268798828125,
-0.033477783203125,
0.034912109375,
-0.0298004150390625,
-0.029052734375,
-0.049346923828125,
-0.020904541015625,
0.0220184326171875,
0.03472900390625,
0.026702880859375,
0.047393798828125,
-0.02227783203125,
0.016265869140625,
0.0141448974609375,
-0.0165863037109375,
-0.014892578125,
0.0263824462890625,
-0.006114959716796875,
-0.005313873291015625,
0.009185791015625,
-0.02099609375,
0.00861358642578125,
0.007274627685546875,
0.0089874267578125,
0.00339508056640625,
-0.006420135498046875,
-0.039459228515625,
0.01155853271484375,
0.0219268798828125,
-0.01384735107421875,
0.0296783447265625,
-0.043853759765625,
-0.0029010772705078125,
0.032073974609375,
-0.0301666259765625,
-0.054962158203125,
-0.039337158203125,
0.005702972412109375,
0.024749755859375,
-0.0217132568359375,
-0.051513671875,
-0.0753173828125,
-0.0115509033203125,
0.006008148193359375,
0.0028514862060546875,
-0.01485443115234375,
0.01096343994140625,
-0.0283203125,
0.0017709732055664062,
-0.02008056640625,
-0.0014324188232421875,
0.00464630126953125,
-0.00566864013671875,
-0.054779052734375,
-0.0236053466796875,
-0.032257080078125,
0.0179443359375,
-0.0222320556640625,
0.0167388916015625,
0.048828125,
-0.0361328125,
-0.0369873046875,
0.034576416015625,
0.0310821533203125,
0.05169677734375,
-0.01100921630859375,
0.005584716796875,
0.022430419921875,
0.0031948089599609375,
-0.0455322265625,
-0.04803466796875,
0.0296478271484375,
-0.0528564453125,
-0.0203399658203125,
0.006267547607421875,
-0.0278167724609375,
-0.0201568603515625,
-0.051116943359375,
-0.1175537109375,
0.05950927734375,
-0.0218963623046875,
-0.0445556640625,
-0.028839111328125,
0.0384521484375,
0.0235443115234375,
-0.058624267578125,
-0.0274810791015625,
0.00957489013671875,
-0.008148193359375,
-0.01397705078125,
0.037506103515625,
0.0200042724609375,
0.00720977783203125,
0.0150146484375,
-0.05859375,
0.03619384765625,
0.007320404052734375,
0.04571533203125,
0.01192474365234375,
-0.00836181640625,
0.027496337890625,
0.0364990234375,
-0.040252685546875,
0.0310821533203125,
-0.00986480712890625,
-0.0037708282470703125,
0.0167083740234375,
-0.014373779296875,
-0.072998046875,
-0.034423828125,
0.049072265625,
0.068115234375,
0.033966064453125,
-0.018890380859375,
-0.06671142578125,
-0.046783447265625,
-0.0074005126953125,
-0.016876220703125,
0.03704833984375,
-0.08935546875,
0.0033016204833984375,
0.023712158203125,
-0.018310546875,
0.0242919921875,
0.00559234619140625,
-0.03839111328125,
0.004608154296875,
-0.0039520263671875,
0.00836181640625,
-0.07720947265625,
0.00540924072265625,
-0.0305938720703125,
-0.0093994140625,
-0.0347900390625,
-0.055206298828125,
0.0316162109375,
-0.048828125,
-0.0672607421875,
-0.0020542144775390625,
-0.043121337890625,
0.03826904296875,
0.030303955078125,
0.01358795166015625,
-0.008209228515625,
0.0238037109375,
-0.0118408203125,
-0.0221405029296875,
0.00681304931640625,
0.020172119140625,
0.005828857421875,
-0.02447509765625,
0.00345611572265625,
0.0198211669921875,
0.0160064697265625,
0.02679443359375,
0.018463134765625,
-0.004650115966796875,
0.050140380859375,
0.006092071533203125,
-0.03076171875,
0.014984130859375,
-0.0236968994140625,
0.0038852691650390625,
-0.031463623046875,
0.021759033203125,
-0.044708251953125,
0.040924072265625,
-0.00940704345703125,
-0.0167236328125,
0.03485107421875
]
|
15aedc01f93ee5163e50d8804f88d1c8526544a4 | Wordpress Stackexchange
Q: How can i get the name parameter defined in get_header? For example, on my blog pages i use get_header('blog');, but i don't want to create a new header template called header-blog.php, because i just want to make a small adjustments. Is it possible to somehow get this name parameter in my header.php file?
A: There is an action get_header that you can use. In your theme’s functions.php, register a callback for that action:
add_action( 'get_header', function( $name ) {
add_filter( 'current_header', function() use ( $name ) {
// always return the same type, unlike WP
return (string) $name;
});
});
You could also write a little helper class that you can reuse:
class Template_Data {
private $name;
public function __construct( $name ) {
$this->name = (string) $name;
}
public function name() {
return $this->name;
}
}
add_action( 'get_header', function( $name ) {
add_filter( 'current_header', [ new Template_Data( $name ), 'name' ] );
});
In your header.php, you get the current part/name with:
$current_part = apply_filters( 'current_header', '' );
You can do the same with get_footer, get_sidebar and get_template_part_{$slug}.
| Q: How can i get the name parameter defined in get_header? For example, on my blog pages i use get_header('blog');, but i don't want to create a new header template called header-blog.php, because i just want to make a small adjustments. Is it possible to somehow get this name parameter in my header.php file?
A: There is an action get_header that you can use. In your theme’s functions.php, register a callback for that action:
add_action( 'get_header', function( $name ) {
add_filter( 'current_header', function() use ( $name ) {
// always return the same type, unlike WP
return (string) $name;
});
});
You could also write a little helper class that you can reuse:
class Template_Data {
private $name;
public function __construct( $name ) {
$this->name = (string) $name;
}
public function name() {
return $this->name;
}
}
add_action( 'get_header', function( $name ) {
add_filter( 'current_header', [ new Template_Data( $name ), 'name' ] );
});
In your header.php, you get the current part/name with:
$current_part = apply_filters( 'current_header', '' );
You can do the same with get_footer, get_sidebar and get_template_part_{$slug}.
| wordpress | {
"language": "en",
"length": 179,
"provenance": "stackexchange_00019.jsonl.gz:456432",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/191419"
} | [
0.00922393798828125,
0.009124755859375,
-0.023040771484375,
-0.0302276611328125,
0.0191497802734375,
-0.007297515869140625,
0.0176239013671875,
0.00475311279296875,
-0.020477294921875,
0.0193939208984375,
-0.0310821533203125,
0.0028820037841796875,
0.0013189315795898438,
-0.006969451904296875,
0.019683837890625,
-0.0230560302734375,
0.058868408203125,
-0.035491943359375,
0.04669189453125,
0.014739990234375,
-0.0250244140625,
0.0413818359375,
0.039459228515625,
0.05621337890625,
0.0297698974609375,
-0.055816650390625,
0.056427001953125,
-0.00923919677734375,
0.0087432861328125,
-0.0307159423828125,
0.0155487060546875,
0.02197265625,
0.00986480712890625,
0.034088134765625,
-0.01497650146484375,
0.051300048828125,
0.01568603515625,
0.016632080078125,
0.044403076171875,
0.005619049072265625,
0.0259857177734375,
-0.0158538818359375,
-0.05810546875,
0.031829833984375,
-0.040618896484375,
-0.056427001953125,
0.02734375,
-0.01157379150390625,
-0.000029146671295166016,
0.06378173828125,
0.0218963623046875,
0.00838470458984375,
0.01337432861328125,
0.0114898681640625,
-0.01335906982421875,
-0.0307464599609375,
-0.002918243408203125,
0.004337310791015625,
0.0306854248046875,
-0.03216552734375,
-0.0304107666015625,
-0.025482177734375,
0.035369873046875,
-0.007785797119140625,
-0.01129913330078125,
0.00228118896484375,
0.02691650390625,
0.014984130859375,
-0.007648468017578125,
0.01531982421875,
0.022735595703125,
-0.00882720947265625,
0.00036716461181640625,
0.0179443359375,
-0.01053619384765625,
-0.0631103515625,
0.019073486328125,
-0.039459228515625,
0.0017175674438476562,
0.028350830078125,
0.01861572265625,
-0.013031005859375,
-0.07794189453125,
0.023773193359375,
0.01079559326171875,
0.032806396484375,
-0.00337982177734375,
-0.02886962890625,
-0.02105712890625,
-0.026123046875,
-0.023956298828125,
-0.02044677734375,
-0.0158843994140625,
-0.004116058349609375,
-0.020294189453125,
-0.03521728515625,
0.0023403167724609375,
0.05169677734375,
-0.033966064453125,
0.01560211181640625,
-0.021484375,
-0.025390625,
0.056427001953125,
-0.062469482421875,
0.0125274658203125,
0.0457763671875,
-0.0006203651428222656,
0.059326171875,
0.04931640625,
0.0202789306640625,
0.0161590576171875,
-0.019287109375,
-0.020751953125,
-0.047149658203125,
-0.0179901123046875,
0.072021484375,
-0.0065460205078125,
-0.040802001953125,
0.0160369873046875,
-0.0157318115234375,
0.01261138916015625,
0.035308837890625,
0.003528594970703125,
-0.0111541748046875,
0.0032520294189453125,
0.007568359375,
-0.0062408447265625,
-0.042327880859375,
0.03131103515625,
0.005168914794921875,
-0.0003235340118408203,
-0.0055694580078125,
-0.0084228515625,
0.005237579345703125,
-0.0212860107421875,
-0.01149749755859375,
0.0625,
-0.004100799560546875,
0.018402099609375,
-0.012786865234375,
0.019805908203125,
0.013946533203125,
-0.021942138671875,
-0.0248870849609375,
0.022064208984375,
-0.03753662109375,
0.0194091796875,
0.032379150390625,
-0.005374908447265625,
0.040771484375,
-0.00042700767517089844,
0.01031494140625,
0.0225372314453125,
0.0135040283203125,
-0.03424072265625,
-0.00798797607421875,
-0.04443359375,
-0.0023899078369140625,
-0.000008165836334228516,
-0.01010894775390625,
0.0256805419921875,
-0.00965118408203125,
-0.00843048095703125,
-0.0179901123046875,
-0.05474853515625,
0.0149688720703125,
-0.021484375,
-0.00620269775390625,
0.004364013671875,
-0.021881103515625,
-0.00209808349609375,
0.0165252685546875,
0.0068817138671875,
0.003814697265625,
0.006977081298828125,
-0.0130157470703125,
-0.016265869140625,
0.03265380859375,
0.005340576171875,
0.0157623291015625,
-0.0137939453125,
-0.0404052734375,
0.0021953582763671875,
-0.004367828369140625,
-0.06317138671875,
0.056182861328125,
0.00762176513671875,
0.0621337890625,
-0.0009822845458984375,
0.0059051513671875,
0.047943115234375,
0.01300811767578125,
-0.06585693359375,
0.00836944580078125,
-0.00620269775390625,
0.0077972412109375,
0.006908416748046875,
0.01079559326171875,
-0.00554656982421875,
0.0005588531494140625,
-0.03656005859375,
0.00249481201171875,
-0.0032596588134765625,
0.00464630126953125,
-0.028839111328125,
0.006893157958984375,
-0.015960693359375,
0.04730224609375,
-0.007579803466796875,
-0.002239227294921875,
0.0180511474609375,
-0.0227203369140625,
-0.0264434814453125,
0.0001621246337890625,
-0.0236053466796875,
0.010101318359375,
-0.0268707275390625,
0.02227783203125,
-0.004726409912109375,
0.040771484375,
-0.0171356201171875,
-0.0030498504638671875,
-0.0299224853515625,
-0.015533447265625,
0.0167694091796875,
0.0086517333984375,
-0.0247802734375,
-0.01953125,
-0.01580810546875,
0.032806396484375,
-0.0584716796875,
0.0039005279541015625,
-0.0176849365234375,
0.0404052734375,
0.0158233642578125,
-0.003292083740234375,
0.00888824462890625,
-0.0484619140625,
0.0176849365234375,
0.020294189453125,
0.03546142578125,
0.049896240234375,
0.025970458984375,
0.02191162109375,
0.075439453125,
-0.0194549560546875,
0.006099700927734375,
-0.006359100341796875,
0.028045654296875,
0.05255126953125,
0.0140838623046875,
-0.01446533203125,
0.0020198822021484375,
-0.02362060546875,
0.03375244140625,
0.019989013671875,
-0.0286865234375,
-0.01348876953125,
-0.01242828369140625,
0.01493072509765625,
-0.0013942718505859375,
-0.004901885986328125,
-0.014129638671875,
-0.0009965896606445312,
0.06884765625,
0.0225067138671875,
0.03668212890625,
0.020477294921875,
-0.043731689453125,
0.0244293212890625,
0.0163726806640625,
-0.0154266357421875,
0.00687408447265625,
0.0628662109375,
0.017181396484375,
-0.0035610198974609375,
0.006809234619140625,
-0.035919189453125,
-0.0168914794921875,
0.01499176025390625,
-0.0140380859375,
0.0219268798828125,
-0.00656890869140625,
0.00232696533203125,
-0.0167236328125,
-0.024871826171875,
0.0310211181640625,
0.028594970703125,
0.03814697265625,
0.00412750244140625,
0.0230560302734375,
0.0184478759765625,
-0.027679443359375,
0.06005859375,
-0.024139404296875,
-0.0184783935546875,
0.02752685546875,
-0.016357421875,
0.022674560546875,
-0.002628326416015625,
0.03662109375,
0.039794921875,
-0.0184783935546875,
0.004016876220703125,
-0.0216827392578125,
-0.0025482177734375,
-0.0171051025390625,
-0.0188140869140625,
-0.034912109375,
-0.032958984375,
-0.0294036865234375,
0.0259246826171875,
0.0134735107421875,
0.056793212890625,
-0.044464111328125,
-0.06488037109375,
-0.03515625,
0.0036411285400390625,
-0.06793212890625,
-0.02484130859375,
0.0235595703125,
-0.048614501953125,
-0.0080413818359375,
-0.035736083984375,
-0.035400390625,
-0.01180267333984375,
-0.0169677734375,
-0.009033203125,
0.049896240234375,
-0.024169921875,
-0.054931640625,
-0.007259368896484375,
-0.082763671875,
-0.01296234130859375,
-0.0025424957275390625,
-0.0054931640625,
-0.01904296875,
0.02435302734375,
-0.01369476318359375,
-0.029388427734375,
-0.02313232421875,
0.001117706298828125,
0.01094818115234375,
-0.009307861328125,
-0.00545501708984375,
-0.0208892822265625,
0.01690673828125,
-0.00799560546875,
-0.016632080078125,
0.0218048095703125,
-0.0034313201904296875,
-0.0038814544677734375,
-0.03228759765625,
-0.040496826171875,
-0.0164947509765625,
0.0736083984375,
0.036224365234375,
-0.03765869140625,
0.031707763671875,
-0.0670166015625,
-0.050506591796875,
-0.033050537109375,
-0.07440185546875,
0.03607177734375,
0.055328369140625,
0.0101165771484375,
-0.0210723876953125,
0.0175933837890625,
0.01280975341796875,
0.0056915283203125,
-0.01465606689453125,
-0.02227783203125,
0.05023193359375,
0.029296875,
0.047149658203125,
0.008392333984375,
-0.0027866363525390625,
-0.0164947509765625,
0.05511474609375,
0.0184326171875,
0.03741455078125,
0.0064544677734375,
0.0190277099609375,
-0.02166748046875,
-0.0562744140625,
0.0723876953125,
0.0021648406982421875,
0.00946044921875,
-0.0288848876953125,
-0.0550537109375,
0.006343841552734375,
0.10693359375,
-0.00630950927734375,
-0.02679443359375,
-0.0077667236328125,
0.0015707015991210938,
-0.033905029296875,
-0.034210205078125,
-0.0306549072265625,
-0.003429412841796875,
-0.09246826171875,
0.000789642333984375,
-0.031402587890625,
-0.0292816162109375,
-0.0160369873046875,
0.00612640380859375,
-0.044189453125,
-0.042144775390625,
0.01416778564453125,
-0.0171051025390625,
-0.0161895751953125,
0.043182373046875,
-0.046844482421875,
0.03167724609375,
-0.0156097412109375,
-0.0270233154296875,
-0.03167724609375,
-0.0184326171875,
0.004669189453125,
0.0419921875,
0.019989013671875,
-0.044158935546875,
0.0013637542724609375,
0.041778564453125,
0.0200958251953125,
0.054534912109375,
0.01311492919921875,
-0.002933502197265625,
0.0863037109375,
-0.011627197265625,
0.00205230712890625,
-0.007732391357421875,
-0.01029205322265625,
-0.00775146484375,
-0.055938720703125,
-0.0084228515625,
-0.005008697509765625,
0.02685546875,
0.041473388671875,
-0.038787841796875,
-0.072265625,
-0.04229736328125,
0.052337646484375,
0.015899658203125,
0.003330230712890625,
0.033782958984375,
-0.0048065185546875,
-0.038116455078125,
0.09039306640625,
0.0270233154296875,
-0.0024929046630859375,
-0.0258941650390625,
0.09332275390625,
0.021820068359375,
-0.046600341796875,
0.01177978515625,
0.0189971923828125,
0.044586181640625,
-0.0404052734375,
0.05657958984375,
0.01168060302734375,
-0.0535888671875,
0.1123046875,
-0.0027866363525390625,
-0.0165557861328125,
0.0230712890625,
0.0192413330078125,
0.0168914794921875,
-0.0210113525390625,
0.00693511962890625,
0.0229949951171875,
-0.01148223876953125,
0.0149993896484375,
-0.0288543701171875,
-0.00708770751953125,
-0.00798797607421875,
0.045867919921875,
-0.02923583984375,
0.0146484375,
-0.055908203125,
-0.0333251953125,
-0.001758575439453125,
0.004383087158203125,
0.0179901123046875,
0.0089263916015625,
0.018096923828125,
-0.01497650146484375,
-0.00997161865234375,
-0.0011882781982421875,
-0.02313232421875,
-0.0201416015625,
-0.0024662017822265625,
0.031280517578125,
-0.045989990234375,
-0.0045166015625,
-0.00028324127197265625,
-0.01361083984375,
0.06396484375,
0.016571044921875,
-0.01385498046875,
0.0114898681640625,
-0.0218658447265625,
-0.0145111083984375,
-0.006862640380859375,
-0.0271759033203125,
0.0040435791015625,
0.04296875,
-0.01226806640625,
-0.005565643310546875,
-0.048004150390625,
0.02667236328125,
-0.03057861328125,
0.056488037109375,
0.033050537109375,
0.008544921875,
-0.0015935897827148438,
0.048828125,
0.048797607421875,
0.004123687744140625,
-0.020751953125,
0.0047454833984375,
-0.0089569091796875,
0.007678985595703125,
0.0223388671875,
-0.007030487060546875,
0.039825439453125,
-0.03692626953125,
0.0196075439453125,
-0.03399658203125,
0.0016021728515625,
-0.00714874267578125,
0.0455322265625,
-0.017059326171875,
-0.0242919921875,
0.0299224853515625,
-0.054290771484375,
0.001556396484375,
0.0180816650390625,
0.0019397735595703125,
-0.04168701171875,
-0.01448822021484375,
0.031646728515625,
0.03167724609375,
-0.005832672119140625,
-0.022613525390625,
0.016143798828125,
-0.01357269287109375,
0.016876220703125,
0.004058837890625,
-0.0197906494140625,
0.0192718505859375,
0.012115478515625,
-0.0101470947265625,
-0.004741668701171875,
0.01885986328125,
-0.059814453125,
-0.0291595458984375,
-0.017974853515625,
-0.0284423828125,
0.07830810546875,
-0.0110931396484375,
0.039031982421875,
-0.034698486328125,
-0.02215576171875,
-0.023834228515625,
0.008697509765625,
0.0396728515625,
0.031402587890625,
-0.0491943359375,
0.01273345947265625,
-0.05316162109375,
-0.0086669921875,
-0.041015625,
-0.0538330078125,
-0.024078369140625,
-0.01177978515625,
-0.0015363693237304688,
0.0290679931640625,
0.016571044921875,
0.02166748046875,
0.01422882080078125,
0.00823974609375,
-0.0178375244140625,
0.061309814453125,
-0.005146026611328125,
0.05865478515625,
0.0305023193359375,
0.02398681640625,
0.01488494873046875,
0.02496337890625,
-0.03741455078125,
-0.01383209228515625,
0.0287628173828125,
-0.0025615692138671875,
-0.02960205078125,
-0.03692626953125,
-0.01045989990234375,
-0.0202789306640625,
0.044189453125,
-0.0111083984375,
-0.005878448486328125,
-0.01056671142578125,
0.01544952392578125,
-0.00891876220703125,
-0.0252685546875,
-0.0048675537109375,
-0.055450439453125,
0.0181884765625,
-0.029998779296875,
-0.03424072265625,
-0.005481719970703125,
-0.018341064453125,
0.048919677734375,
-0.01248931884765625,
0.00597381591796875,
0.004261016845703125,
-0.06951904296875,
0.07763671875,
0.142578125,
0.0192718505859375,
0.05810546875,
0.0233612060546875,
0.0061492919921875,
0.03521728515625,
0.027862548828125,
0.030181884765625,
-0.0245819091796875,
0.0667724609375,
0.0157928466796875,
0.002063751220703125,
0.042144775390625,
-0.0297698974609375,
0.0220947265625,
-0.0091705322265625,
0.051116943359375,
-0.0273284912109375,
0.02789306640625,
0.0308685302734375,
-0.008331298828125,
0.01629638671875,
0.017578125,
-0.0225677490234375,
-0.016143798828125,
0.04052734375,
-0.0057525634765625,
-0.01549530029296875,
0.033294677734375,
0.0149383544921875,
-0.0252685546875,
-0.017303466796875,
0.05615234375,
-0.007457733154296875,
0.0250396728515625,
-0.03851318359375,
-0.021331787109375,
-0.0259552001953125,
-0.026336669921875,
0.024505615234375,
-0.021575927734375,
-0.0033416748046875,
-0.0404052734375,
0.00556182861328125,
-0.017578125,
0.002567291259765625,
0.017059326171875,
-0.00824737548828125,
-0.0012369155883789062,
0.04962158203125,
-0.0242156982421875,
0.0273284912109375,
0.0287628173828125,
-0.0165557861328125,
-0.0094757080078125,
-0.0264739990234375,
0.01329803466796875,
0.04248046875,
-0.015655517578125,
0.0219879150390625,
-0.00687408447265625,
-0.0082855224609375,
-0.020263671875,
-0.0273284912109375,
0.071044921875,
-0.0027790069580078125,
-0.039581298828125,
0.036834716796875,
0.002834320068359375,
-0.05084228515625,
0.01132965087890625,
-0.0030689239501953125,
-0.044952392578125,
-0.03851318359375,
0.0084075927734375,
-0.04779052734375,
-0.002384185791015625,
0.01076507568359375,
-0.050750732421875,
0.06610107421875,
0.0239410400390625,
0.037017822265625,
0.021514892578125,
0.0245819091796875,
-0.0295257568359375,
-0.0020732879638671875,
-0.040069580078125,
0.01666259765625,
0.002658843994140625,
0.06695556640625,
-0.0704345703125,
-0.013885498046875,
0.00989532470703125,
0.04901123046875,
0.04376220703125,
-0.0002294778823852539,
0.06658935546875,
-0.011962890625,
0.040618896484375,
0.0264739990234375,
-0.0377197265625,
-0.02392578125,
0.01445770263671875,
0.0167083740234375,
0.0205078125,
-0.0227813720703125,
0.032073974609375,
-0.039398193359375,
-0.0031032562255859375,
0.036468505859375,
-0.0024127960205078125,
-0.0011425018310546875,
0.0038604736328125,
-0.016693115234375,
-0.0214996337890625,
-0.019378662109375,
0.016265869140625,
-0.0538330078125,
-0.01218414306640625,
0.05682373046875,
0.06268310546875,
-0.0455322265625,
0.003452301025390625,
-0.0386962890625,
0.066650390625,
0.01983642578125,
0.01348114013671875,
0.03729248046875,
0.017730712890625,
0.00860595703125,
0.01351165771484375,
0.004756927490234375,
0.012847900390625,
0.01485443115234375,
0.082275390625,
0.037506103515625,
0.033843994140625,
-0.004764556884765625,
0.04248046875,
0.034210205078125,
0.0860595703125,
-0.0579833984375,
-0.004734039306640625,
0.00872039794921875,
-0.0216064453125,
-0.0037441253662109375,
-0.010986328125,
0.00872802734375,
0.007442474365234375,
-0.0023193359375,
-0.05560302734375,
0.007289886474609375,
0.040252685546875,
0.0145263671875,
-0.01287078857421875,
-0.01580810546875,
-0.0212554931640625,
0.01094818115234375,
-0.046783447265625,
0.0165252685546875,
0.00383758544921875,
0.07672119140625,
0.0030612945556640625,
0.05572509765625,
-0.0692138671875,
-0.03265380859375,
-0.006359100341796875,
0.0218353271484375,
-0.00699615478515625,
0.0214385986328125,
-0.01433563232421875,
-0.00231170654296875,
-0.01605224609375,
0.026275634765625,
0.051177978515625,
-0.0014657974243164062,
0.032684326171875,
-0.01800537109375,
-0.0489501953125,
0.013702392578125,
-0.0201263427734375,
-0.0295562744140625,
0.06695556640625,
-0.033721923828125,
-0.00667572021484375,
-0.044097900390625,
-0.040985107421875,
-0.036285400390625,
-0.04937744140625,
0.039642333984375,
-0.0182342529296875,
0.020843505859375,
-0.00299835205078125,
-0.003665924072265625,
-0.004108428955078125,
-0.029571533203125,
-0.0004756450653076172,
-0.0008287429809570312,
-0.05596923828125,
0.005832672119140625,
-0.05267333984375,
-0.03839111328125,
0.0307464599609375,
0.04498291015625,
-0.00917816162109375,
0.0166168212890625,
-0.044403076171875,
0.0161285400390625,
-0.0084075927734375,
-0.0225067138671875,
0.0168914794921875,
0.05621337890625,
0.00804901123046875,
0.04364013671875,
-0.0408935546875,
-0.00496673583984375,
-0.004489898681640625,
-0.003498077392578125,
0.0277099609375,
0.0225982666015625,
0.023040771484375,
0.0191192626953125,
-0.0166015625,
0.01360321044921875,
-0.032440185546875,
-0.03240966796875,
0.037445068359375,
0.01092529296875,
-0.007843017578125,
-0.019195556640625,
-0.069091796875,
0.0130767822265625,
0.0616455078125,
-0.020233154296875,
0.045562744140625,
0.002887725830078125,
0.01470184326171875,
-0.058807373046875,
0.00969696044921875,
-0.01303863525390625,
-0.050537109375,
-0.011016845703125,
0.007244110107421875,
0.0122528076171875,
0.0731201171875,
0.0298919677734375,
0.01238250732421875,
0.026336669921875,
-0.039215087890625,
0.03009033203125,
-0.0139007568359375,
0.06610107421875,
0.033721923828125,
-0.00756072998046875,
-0.0186614990234375,
0.00862884521484375,
-0.01331329345703125,
0.003543853759765625,
0.01153564453125,
0.005161285400390625,
-0.0183563232421875,
-0.036468505859375,
0.034088134765625,
-0.0247039794921875,
0.046478271484375,
-0.0173492431640625,
0.009521484375,
0.0011491775512695312,
0.0178985595703125,
-0.0019626617431640625,
-0.07550048828125,
-0.0205841064453125,
-0.029052734375,
-0.0264739990234375,
0.020751953125,
-0.0288543701171875,
-0.047821044921875,
-0.036773681640625,
-0.034942626953125,
-0.00836181640625,
-0.025726318359375,
0.04266357421875,
-0.0421142578125,
-0.00595855712890625,
-0.01045989990234375,
-0.0252838134765625,
-0.02056884765625,
-0.0096282958984375,
0.005725860595703125,
-0.0291290283203125,
0.009429931640625,
-0.0263519287109375,
-0.01473236083984375,
-0.002643585205078125,
-0.0017175674438476562,
0.052337646484375,
0.0223541259765625,
-0.0223388671875,
0.0163116455078125,
-0.035552978515625,
0.06781005859375,
-0.10552978515625,
-0.031768798828125,
0.0170440673828125,
-0.01165008544921875,
-0.0252532958984375,
-0.042572021484375,
0.02685546875,
-0.06396484375,
0.000652313232421875,
-0.00936126708984375,
-0.01947021484375,
-0.01837158203125,
-0.041900634765625,
-0.01458740234375,
-0.0014629364013671875,
0.0135650634765625,
-0.042266845703125,
-0.049041748046875,
0.0270538330078125,
0.0129547119140625,
-0.0335693359375,
-0.0168609619140625,
-0.034576416015625,
-0.0210113525390625,
0.027069091796875,
0.0006222724914550781,
0.072265625,
-0.004993438720703125,
-0.00411224365234375,
-0.002010345458984375,
0.02459716796875,
0.01250457763671875,
0.0135955810546875,
-0.01025390625,
0.0015230178833007812,
-0.0038852691650390625,
0.03326416015625,
-0.0243377685546875,
0.00914764404296875,
0.0006890296936035156,
-0.01154327392578125,
-0.016021728515625,
-0.04754638671875,
-0.01041412353515625,
0.00394439697265625,
0.05059814453125,
0.032257080078125,
0.0034313201904296875,
-0.032470703125,
0.0024929046630859375,
0.0232086181640625,
-0.061492919921875,
0.0196685791015625,
0.046478271484375,
-0.052154541015625,
0.00017964839935302734,
0.031402587890625,
0.00469970703125,
-0.036651611328125,
-0.0266265869140625,
-0.02783203125,
-0.016510009765625,
-0.0204010009765625,
0.006397247314453125,
0.004428863525390625,
-0.053253173828125,
0.0299530029296875,
-0.019744873046875,
-0.032012939453125,
0.0037784576416015625,
0.0352783203125,
-0.0199737548828125,
0.001781463623046875,
0.0025539398193359375,
0.06341552734375,
-0.037994384765625,
-0.00399017333984375,
0.032684326171875,
-0.005146026611328125,
0.006908416748046875,
0.0156402587890625,
-0.016876220703125,
0.01523590087890625,
-0.0044097900390625,
-0.0046234130859375,
-0.0081024169921875,
0.041717529296875,
0.0023555755615234375,
0.07855224609375,
-0.0012350082397460938,
0.02471923828125,
0.007167816162109375,
0.039886474609375,
0.0065765380859375,
-0.0285491943359375,
0.044036865234375,
-0.060516357421875,
-0.0251922607421875,
-0.0025310516357421875,
-0.036956787109375,
-0.06463623046875,
0.034942626953125,
-0.0292510986328125,
0.0201873779296875,
0.030303955078125
]
|
e0823156d87a8a7351fe6ac0d078c2a9e638c9fd | Wordpress Stackexchange
Q: Enabling shortcodes for custom fields So, in this post it is explained how to supposedly enable shortcodes for custom fields in Wordpress. (Shortcodes are not enabled for custom fields by default.)
What I dont understand is where to place this code:
<?php echo do_shortcode(get_post_meta(get_the_ID(), 'name', true)); ?>
I understand I have to paste the name of my custom field into the 'name' parameter, but where do I need to place this line of code?
I suppose in the functions.php of the template? I am unsure where though in that file. I don't want to break anything of my template.
Any suggestions are appreciated.
A: Normally Wordpress does not run shortcode that you put into a custom field.
By default, Custom Fields display whatever value you enter, as plain-text, so if you try entering a shortcode, (in the format [shortcode] VALUE [/shortcode]) you’ll end up displaying the entire text, including the tags.
Add the following in your template file, it can be single.php or page.php:
echo apply_filters('the_content', get_post_meta($post->ID,'YOUR_CUSTOM_FIELD_NAME', true));
or...
$shortcode = get_post_meta($post->ID,'YOUR_CUSTOM_FIELD_NAME',true);
echo do_shortcode($shortcode);
| Q: Enabling shortcodes for custom fields So, in this post it is explained how to supposedly enable shortcodes for custom fields in Wordpress. (Shortcodes are not enabled for custom fields by default.)
What I dont understand is where to place this code:
<?php echo do_shortcode(get_post_meta(get_the_ID(), 'name', true)); ?>
I understand I have to paste the name of my custom field into the 'name' parameter, but where do I need to place this line of code?
I suppose in the functions.php of the template? I am unsure where though in that file. I don't want to break anything of my template.
Any suggestions are appreciated.
A: Normally Wordpress does not run shortcode that you put into a custom field.
By default, Custom Fields display whatever value you enter, as plain-text, so if you try entering a shortcode, (in the format [shortcode] VALUE [/shortcode]) you’ll end up displaying the entire text, including the tags.
Add the following in your template file, it can be single.php or page.php:
echo apply_filters('the_content', get_post_meta($post->ID,'YOUR_CUSTOM_FIELD_NAME', true));
or...
$shortcode = get_post_meta($post->ID,'YOUR_CUSTOM_FIELD_NAME',true);
echo do_shortcode($shortcode);
| wordpress | {
"language": "en",
"length": 175,
"provenance": "stackexchange_00019.jsonl.gz:456450",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/191489"
} | [
0.0360107421875,
-0.018096923828125,
0.04400634765625,
-0.005496978759765625,
-0.029327392578125,
0.00428009033203125,
0.0206146240234375,
-0.044281005859375,
-0.03643798828125,
0.01629638671875,
-0.022674560546875,
-0.0007905960083007812,
-0.023406982421875,
-0.021575927734375,
0.0007691383361816406,
-0.05712890625,
0.020660400390625,
0.00638580322265625,
0.0013275146484375,
-0.024749755859375,
0.00978851318359375,
-0.009735107421875,
-0.00222015380859375,
0.0308074951171875,
0.03253173828125,
-0.041778564453125,
0.0621337890625,
-0.0281524658203125,
0.0174560546875,
-0.0158538818359375,
0.03143310546875,
-0.002391815185546875,
0.024444580078125,
0.0201416015625,
-0.03106689453125,
0.035552978515625,
-0.01641845703125,
0.0118560791015625,
-0.005107879638671875,
0.0259246826171875,
0.039154052734375,
-0.032623291015625,
0.0014047622680664062,
-0.01531219482421875,
-0.0023059844970703125,
-0.010650634765625,
0.0225677490234375,
-0.033538818359375,
0.0140533447265625,
-0.00167083740234375,
0.01041412353515625,
0.033843994140625,
0.0278778076171875,
-0.036041259765625,
-0.01275634765625,
-0.01026153564453125,
-0.035308837890625,
-0.040283203125,
0.0254364013671875,
0.0264129638671875,
0.01000213623046875,
-0.042816162109375,
0.023590087890625,
-0.0229034423828125,
0.041412353515625,
-0.008270263671875,
-0.0296478271484375,
0.03546142578125,
-0.010589599609375,
0.054046630859375,
0.037200927734375,
-0.058135986328125,
0.01471710205078125,
-0.0149993896484375,
0.006343841552734375,
-0.01261138916015625,
-0.01192474365234375,
-0.032318115234375,
0.0220489501953125,
-0.0020465850830078125,
0.0200347900390625,
-0.0306549072265625,
-0.0135345458984375,
0.0210113525390625,
-0.0162506103515625,
0.02532958984375,
-0.00879669189453125,
-0.0176544189453125,
0.01568603515625,
-0.0177154541015625,
-0.0014829635620117188,
0.004543304443359375,
-0.029052734375,
0.00814056396484375,
-0.0121002197265625,
-0.0161285400390625,
0.028045654296875,
0.07476806640625,
-0.0222015380859375,
-0.0076446533203125,
0.00231170654296875,
-0.041107177734375,
0.03155517578125,
-0.045257568359375,
-0.006122589111328125,
0.02001953125,
-0.00849151611328125,
0.00511932373046875,
0.0216064453125,
0.0224761962890625,
-0.0197906494140625,
-0.03662109375,
-0.025390625,
0.022064208984375,
-0.050445556640625,
-0.007274627685546875,
-0.06964111328125,
-0.0063323974609375,
-0.025238037109375,
0.0128173828125,
0.0399169921875,
0.032501220703125,
0.0182342529296875,
-0.03570556640625,
-0.0301361083984375,
-0.033599853515625,
-0.045684814453125,
-0.033416748046875,
0.01497650146484375,
-0.00824737548828125,
-0.0301055908203125,
0.003322601318359375,
0.07403564453125,
0.058624267578125,
0.040283203125,
-0.0007801055908203125,
0.00864410400390625,
-0.03570556640625,
0.01094818115234375,
0.0210418701171875,
-0.015838623046875,
-0.01100921630859375,
0.03802490234375,
-0.00604248046875,
-0.01294708251953125,
0.00988006591796875,
0.0172882080078125,
0.027618408203125,
-0.01404571533203125,
-0.048492431640625,
-0.005710601806640625,
0.0028705596923828125,
0.019775390625,
0.03472900390625,
0.0007333755493164062,
0.0208282470703125,
0.0546875,
-0.0242767333984375,
-0.032501220703125,
-0.0318603515625,
0.01263427734375,
-0.0167388916015625,
0.0032215118408203125,
-0.016510009765625,
-0.047607421875,
0.0193939208984375,
-0.0097503662109375,
-0.01026153564453125,
0.020477294921875,
0.031585693359375,
0.037322998046875,
0.013641357421875,
-0.035888671875,
-0.007122039794921875,
0.00466156005859375,
-0.040679931640625,
-0.0007033348083496094,
0.013702392578125,
0.0175933837890625,
-0.0074310302734375,
-0.029296875,
-0.036895751953125,
0.037109375,
-0.019073486328125,
-0.074951171875,
0.06207275390625,
0.004261016845703125,
0.0777587890625,
0.01287078857421875,
0.01039886474609375,
0.05340576171875,
0.01230621337890625,
-0.0220794677734375,
0.0008101463317871094,
0.00904083251953125,
-0.01428985595703125,
-0.033782958984375,
-0.022125244140625,
0.00042819976806640625,
0.01535797119140625,
-0.0195465087890625,
-0.031768798828125,
0.0144195556640625,
0.005462646484375,
-0.017852783203125,
0.0008988380432128906,
-0.01934814453125,
0.02325439453125,
0.003208160400390625,
-0.045318603515625,
0.00923919677734375,
-0.060943603515625,
0.007305145263671875,
-0.0074005126953125,
-0.057708740234375,
0.012847900390625,
-0.01395416259765625,
0.03753662109375,
0.0157470703125,
0.0212554931640625,
0.029083251953125,
-0.0400390625,
0.015106201171875,
0.01200103759765625,
0.0239410400390625,
-0.0082855224609375,
-0.0151824951171875,
-0.022674560546875,
0.0200042724609375,
0.008544921875,
-0.031982421875,
0.0236358642578125,
-0.0215606689453125,
-0.03558349609375,
-0.040679931640625,
-0.0020503997802734375,
-0.005767822265625,
-0.039154052734375,
0.0091552734375,
0.053741455078125,
0.033233642578125,
0.0047149658203125,
-0.0013675689697265625,
-0.008575439453125,
0.08184814453125,
0.034271240234375,
0.032318115234375,
-0.0304412841796875,
0.036407470703125,
0.063232421875,
-0.042724609375,
-0.007904052734375,
0.0169219970703125,
-0.0667724609375,
0.006748199462890625,
0.047332763671875,
-0.0538330078125,
-0.03387451171875,
0.0360107421875,
-0.03680419921875,
0.011474609375,
-0.046173095703125,
-0.0007128715515136719,
-0.0367431640625,
0.04730224609375,
0.040771484375,
0.0438232421875,
0.03948974609375,
-0.0628662109375,
0.05072021484375,
0.00609588623046875,
-0.014862060546875,
-0.004169464111328125,
0.0111846923828125,
0.0269317626953125,
0.005886077880859375,
-0.04058837890625,
-0.00788116455078125,
0.0290679931640625,
-0.001216888427734375,
0.008575439453125,
0.00800323486328125,
-0.018890380859375,
-0.00399017333984375,
0.022125244140625,
-0.056854248046875,
0.004878997802734375,
0.038116455078125,
0.011871337890625,
-0.01441192626953125,
-0.0177154541015625,
0.08514404296875,
-0.0017061233520507812,
0.038055419921875,
0.043670654296875,
0.004390716552734375,
-0.002109527587890625,
-0.053497314453125,
0.0579833984375,
-0.052764892578125,
0.0042572021484375,
0.06561279296875,
-0.03857421875,
0.0418701171875,
-0.001678466796875,
0.01409149169921875,
-0.0209808349609375,
0.022735595703125,
0.005825042724609375,
-0.0244598388671875,
-0.0204315185546875,
0.01369476318359375,
0.0372314453125,
0.087890625,
0.004932403564453125,
-0.038970947265625,
0.0220794677734375,
0.07177734375,
-0.040557861328125,
-0.07086181640625,
0.0034961700439453125,
-0.027984619140625,
-0.0110626220703125,
-0.02984619140625,
-0.0228729248046875,
0.01568603515625,
-0.033935546875,
-0.0005755424499511719,
0.016998291015625,
-0.052154541015625,
-0.03466796875,
-0.04766845703125,
-0.0682373046875,
-0.0200347900390625,
0.0234527587890625,
0.00666046142578125,
0.0210113525390625,
0.025054931640625,
0.0079498291015625,
-0.0213470458984375,
0.0177154541015625,
-0.02410888671875,
-0.0212554931640625,
0.0130767822265625,
0.0258941650390625,
-0.0411376953125,
0.0230712890625,
-0.0033130645751953125,
-0.032318115234375,
0.02166748046875,
0.003070831298828125,
-0.034332275390625,
-0.013946533203125,
0.0165252685546875,
0.01202392578125,
0.042449951171875,
0.01018524169921875,
-0.0005679130554199219,
0.03912353515625,
-0.035736083984375,
-0.002559661865234375,
-0.03240966796875,
-0.03887939453125,
0.0239715576171875,
0.0016202926635742188,
0.022613525390625,
-0.0121612548828125,
0.0304107666015625,
0.018218994140625,
0.01995849609375,
0.0096282958984375,
-0.023681640625,
0.009063720703125,
0.0148468017578125,
0.03564453125,
0.0007905960083007812,
0.00920867919921875,
-0.0207672119140625,
0.0277252197265625,
-0.0037975311279296875,
0.0256195068359375,
-0.024078369140625,
0.0272674560546875,
-0.0767822265625,
-0.07635498046875,
0.062103271484375,
-0.0374755859375,
0.0132293701171875,
-0.0526123046875,
-0.029998779296875,
0.005474090576171875,
0.11163330078125,
-0.025054931640625,
-0.00664520263671875,
0.00287628173828125,
-0.0216827392578125,
0.01317596435546875,
0.014617919921875,
-0.0430908203125,
-0.0185699462890625,
-0.087158203125,
0.036712646484375,
0.01403045654296875,
-0.028656005859375,
-0.0202789306640625,
0.00447845458984375,
-0.054962158203125,
-0.022674560546875,
0.0210113525390625,
-0.00800323486328125,
0.019500732421875,
0.00634002685546875,
-0.00391387939453125,
-0.0001010894775390625,
-0.01329803466796875,
-0.0149993896484375,
-0.06488037109375,
-0.00969696044921875,
0.010223388671875,
0.031890869140625,
0.00978851318359375,
-0.036895751953125,
-0.0011701583862304688,
0.04498291015625,
0.00684356689453125,
0.0025768280029296875,
0.00215911865234375,
0.00432586669921875,
0.00882720947265625,
0.016845703125,
-0.01189422607421875,
-0.00846099853515625,
0.021820068359375,
0.051116943359375,
-0.00879669189453125,
0.052032470703125,
-0.0406494140625,
-0.0301055908203125,
0.0230560302734375,
-0.0684814453125,
-0.026702880859375,
-0.0234527587890625,
-0.050537109375,
0.005313873291015625,
-0.05621337890625,
0.0085296630859375,
-0.0229034423828125,
-0.046417236328125,
0.049346923828125,
-0.01898193359375,
-0.028076171875,
0.00678253173828125,
0.08489990234375,
0.0145263671875,
-0.0118408203125,
-0.0540771484375,
0.024139404296875,
0.056365966796875,
0.01367950439453125,
0.01129150390625,
0.006923675537109375,
-0.042449951171875,
0.04742431640625,
0.0260772705078125,
-0.00033974647521972656,
-0.041168212890625,
0.0650634765625,
-0.0146026611328125,
0.01065826416015625,
-0.006809234619140625,
-0.0221710205078125,
0.020843505859375,
0.025177001953125,
-0.010345458984375,
-0.00905609130859375,
0.003498077392578125,
0.022216796875,
-0.019378662109375,
0.01001739501953125,
-0.0272979736328125,
-0.041046142578125,
0.0030364990234375,
-0.002437591552734375,
0.0241241455078125,
0.023773193359375,
-0.0013399124145507812,
0.01441192626953125,
-0.00034809112548828125,
0.0174713134765625,
0.01447296142578125,
-0.01485443115234375,
-0.004352569580078125,
0.01326751708984375,
0.03631591796875,
0.00908660888671875,
0.0295257568359375,
-0.00533294677734375,
0.08099365234375,
-0.004749298095703125,
-0.04290771484375,
-0.0012416839599609375,
-0.0264739990234375,
0.01300048828125,
0.0225982666015625,
-0.0051116943359375,
0.019683837890625,
0.061065673828125,
-0.0076141357421875,
0.010833740234375,
-0.01247406005859375,
0.06109619140625,
-0.040802001953125,
-0.002605438232421875,
-0.00304412841796875,
-0.015869140625,
-0.012603759765625,
0.053253173828125,
-0.0207061767578125,
0.0220489501953125,
-0.01090240478515625,
0.04083251953125,
0.0433349609375,
0.0199737548828125,
0.032806396484375,
-0.0248870849609375,
-0.01947021484375,
-0.0165252685546875,
-0.0455322265625,
-0.0528564453125,
-0.016632080078125,
0.00946807861328125,
0.06695556640625,
-0.033721923828125,
-0.0308380126953125,
0.029937744140625,
-0.040374755859375,
-0.018402099609375,
0.004665374755859375,
-0.009246826171875,
-0.017852783203125,
-0.0166473388671875,
-0.0285797119140625,
-0.000629425048828125,
0.0066070556640625,
-0.003963470458984375,
0.0010776519775390625,
-0.030364990234375,
0.0193023681640625,
-0.036102294921875,
0.027801513671875,
-0.02252197265625,
-0.03643798828125,
0.024139404296875,
0.006633758544921875,
-0.01345062255859375,
-0.01007080078125,
-0.0255889892578125,
-0.00467681884765625,
-0.0192108154296875,
0.042327880859375,
-0.0172119140625,
0.0290374755859375,
-0.041839599609375,
0.0251007080078125,
-0.0125579833984375,
0.004192352294921875,
0.034210205078125,
0.015106201171875,
-0.041961669921875,
0.01215362548828125,
-0.038665771484375,
-0.003631591796875,
0.0143585205078125,
-0.0311279296875,
-0.025238037109375,
-0.0187225341796875,
-0.012908935546875,
0.01849365234375,
-0.029266357421875,
-0.01416015625,
-0.0173187255859375,
0.0301361083984375,
-0.002902984619140625,
0.060516357421875,
0.0007228851318359375,
0.01348114013671875,
0.0137176513671875,
0.04315185546875,
0.0273590087890625,
0.0251007080078125,
0.0037784576416015625,
-0.046630859375,
0.021087646484375,
-0.01305389404296875,
-0.047119140625,
-0.0184783935546875,
-0.0266571044921875,
0.02392578125,
0.053985595703125,
-0.0164337158203125,
0.00567626953125,
-0.0006999969482421875,
-0.00212860107421875,
-0.0219573974609375,
-0.0003542900085449219,
0.0011310577392578125,
-0.0046234130859375,
0.003231048583984375,
-0.0396728515625,
-0.01446533203125,
0.0095367431640625,
-0.0236053466796875,
0.0579833984375,
-0.031768798828125,
0.033905029296875,
0.0202178955078125,
-0.039093017578125,
0.0692138671875,
0.07806396484375,
0.00015079975128173828,
0.039642333984375,
0.039642333984375,
0.00396728515625,
-0.0142669677734375,
0.0399169921875,
-0.0231781005859375,
-0.01389312744140625,
0.035675048828125,
-0.0066680908203125,
-0.0225830078125,
0.0049285888671875,
-0.01727294921875,
0.04443359375,
0.057220458984375,
0.10516357421875,
-0.08941650390625,
0.03546142578125,
0.04608154296875,
-0.01953125,
0.032501220703125,
-0.018524169921875,
-0.00211334228515625,
-0.0012941360473632812,
0.057464599609375,
-0.01131439208984375,
-0.0263214111328125,
0.0233001708984375,
-0.0036067962646484375,
-0.0134124755859375,
-0.0120697021484375,
0.080078125,
0.027740478515625,
0.025177001953125,
-0.01617431640625,
-0.020416259765625,
0.004627227783203125,
-0.0252685546875,
-0.0029582977294921875,
0.007232666015625,
-0.0318603515625,
-0.0699462890625,
0.0011415481567382812,
-0.01413726806640625,
0.006072998046875,
0.04119873046875,
0.01007080078125,
0.0124359130859375,
0.057220458984375,
-0.0169677734375,
0.057037353515625,
0.005222320556640625,
0.004268646240234375,
0.039093017578125,
-0.032745361328125,
-0.01065826416015625,
0.0634765625,
-0.027252197265625,
0.0128936767578125,
0.0384521484375,
-0.0096893310546875,
-0.0274658203125,
-0.014892578125,
0.09564208984375,
-0.015655517578125,
-0.0328369140625,
-0.0117950439453125,
0.051513671875,
0.0157012939453125,
-0.0087738037109375,
-0.004886627197265625,
0.0024280548095703125,
0.025665283203125,
-0.0186767578125,
-0.024871826171875,
-0.01340484619140625,
-0.025054931640625,
-0.07489013671875,
0.1153564453125,
0.035430908203125,
0.00991058349609375,
-0.0010023117065429688,
0.041534423828125,
-0.04058837890625,
0.00748443603515625,
-0.042205810546875,
0.04547119140625,
0.024932861328125,
0.0509033203125,
-0.068115234375,
-0.037017822265625,
0.0125732421875,
0.063720703125,
0.04119873046875,
0.0055694580078125,
0.0247650146484375,
0.008575439453125,
0.03521728515625,
0.02294921875,
-0.033935546875,
-0.0025196075439453125,
-0.021148681640625,
0.0498046875,
0.038360595703125,
-0.04144287109375,
0.0204925537109375,
0.0091094970703125,
-0.035369873046875,
0.0079803466796875,
0.0011816024780273438,
0.0001367330551147461,
-0.018310546875,
-0.0013418197631835938,
-0.00360870361328125,
-0.007129669189453125,
0.0003654956817626953,
-0.02484130859375,
-0.04620361328125,
0.05389404296875,
0.01934814453125,
-0.052642822265625,
-0.04510498046875,
-0.02838134765625,
0.03717041015625,
0.01442718505859375,
0.051605224609375,
0.03936767578125,
0.0299530029296875,
0.023651123046875,
-0.0200653076171875,
0.035888671875,
0.0128173828125,
-0.045074462890625,
0.021209716796875,
-0.007450103759765625,
-0.011016845703125,
-0.045654296875,
0.03338623046875,
0.035369873046875,
0.0265045166015625,
-0.05316162109375,
0.0066986083984375,
0.01390838623046875,
0.001766204833984375,
-0.01001739501953125,
-0.03924560546875,
-0.0248870849609375,
0.01265716552734375,
0.00905609130859375,
-0.04425048828125,
0.01392364501953125,
0.035430908203125,
0.03826904296875,
-0.0037860870361328125,
0.007411956787109375,
-0.060394287109375,
-0.0190887451171875,
-0.047271728515625,
0.0106201171875,
-0.00807952880859375,
0.061492919921875,
0.034515380859375,
0.03350830078125,
-0.0247802734375,
-0.032318115234375,
0.0012197494506835938,
0.03497314453125,
0.0220794677734375,
0.00881195068359375,
-0.0211944580078125,
-0.0128173828125,
0.0031757354736328125,
0.0240325927734375,
0.006618499755859375,
0.055145263671875,
0.04803466796875,
0.0218353271484375,
-0.018310546875,
0.0007801055908203125,
0.051025390625,
-0.0294647216796875,
-0.0136871337890625,
-0.01407623291015625,
-0.0157012939453125,
0.004894256591796875,
-0.01375579833984375,
0.0034160614013671875,
0.006801605224609375,
0.02069091796875,
-0.0238800048828125,
0.04827880859375,
-0.0016393661499023438,
-0.019683837890625,
0.042572021484375,
0.00844573974609375,
0.0615234375,
0.01000213623046875,
-0.064208984375,
-0.0200958251953125,
-0.038299560546875,
-0.053558349609375,
0.034027099609375,
0.04669189453125,
0.0024318695068359375,
-0.0023403167724609375,
-0.0126953125,
-0.0259857177734375,
0.01461029052734375,
0.0250244140625,
0.00446319580078125,
0.0207061767578125,
0.01033782958984375,
-0.01523590087890625,
-0.034759521484375,
-0.00232696533203125,
-0.01155853271484375,
0.011993408203125,
0.0260467529296875,
0.019439697265625,
0.00893402099609375,
0.030120849609375,
-0.0256500244140625,
0.00922393798828125,
-0.013946533203125,
-0.036651611328125,
0.06317138671875,
0.0223846435546875,
-0.00782012939453125,
-0.032470703125,
0.019805908203125,
0.06298828125,
0.030303955078125,
-0.0136260986328125,
0.041168212890625,
0.00205230712890625,
-0.00551605224609375,
-0.0184173583984375,
-0.0011138916015625,
-0.043060302734375,
-0.08026123046875,
-0.08135986328125,
0.01776123046875,
-0.0069122314453125,
0.0031604766845703125,
-0.023406982421875,
-0.01064300537109375,
0.048370361328125,
-0.0226593017578125,
0.04241943359375,
-0.004962921142578125,
0.07269287109375,
0.046478271484375,
0.0125885009765625,
-0.0178680419921875,
0.002231597900390625,
-0.0169219970703125,
0.0220947265625,
-0.0009570121765136719,
0.003887176513671875,
0.01873779296875,
-0.09320068359375,
0.0179290771484375,
0.0277099609375,
0.049713134765625,
-0.01096343994140625,
0.01480865478515625,
0.01221466064453125,
-0.0082855224609375,
0.0049285888671875,
-0.038177490234375,
-0.0169830322265625,
-0.047271728515625,
0.003620147705078125,
0.047821044921875,
-0.0224609375,
0.01459503173828125,
-0.0295562744140625,
-0.0157470703125,
0.01032257080078125,
-0.0023860931396484375,
-0.0265045166015625,
0.00360107421875,
-0.00016319751739501953,
-0.00789642333984375,
-0.0177459716796875,
0.016632080078125,
0.00269317626953125,
0.038970947265625,
-0.0218658447265625,
0.004299163818359375,
-0.01383209228515625,
0.0028667449951171875,
0.00372314453125,
0.018096923828125,
0.0283660888671875,
-0.0099334716796875,
-0.0167236328125,
0.06732177734375,
0.0222320556640625,
0.0865478515625,
0.0125579833984375,
-0.0209808349609375,
0.0063018798828125,
0.00396728515625,
-0.0230560302734375,
-0.07781982421875,
0.02117919921875,
-0.08734130859375,
0.000023365020751953125,
-0.048736572265625,
0.03594970703125,
0.0430908203125,
-0.0372314453125,
-0.09375,
0.00972747802734375,
-0.027801513671875,
-0.036651611328125,
-0.0228271484375,
-0.025390625,
0.0085601806640625,
0.0128936767578125,
0.0032253265380859375,
-0.054595947265625,
-0.05419921875,
0.004840850830078125,
0.0189056396484375,
0.0163116455078125,
0.00870513916015625,
0.039764404296875,
-0.037628173828125,
0.0168914794921875,
-0.01371002197265625,
-0.0193328857421875,
0.039154052734375,
-0.03375244140625,
0.034027099609375,
0.01800537109375,
-0.08154296875,
-0.0278167724609375,
-0.019775390625,
0.02459716796875,
0.00335693359375,
-0.0594482421875,
-0.026214599609375,
-0.01522064208984375,
0.06402587890625,
0.024139404296875,
0.013916015625,
-0.0254974365234375,
-0.01262664794921875,
-0.0207366943359375,
-0.0185699462890625,
-0.0267486572265625,
0.0086212158203125,
-0.066650390625,
-0.01329803466796875,
0.004802703857421875,
-0.0157623291015625,
0.004558563232421875,
-0.0011806488037109375,
-0.03057861328125,
0.01898193359375,
0.0235748291015625,
-0.004852294921875,
-0.054229736328125,
0.01910400390625,
0.06060791015625,
-0.05224609375,
0.00568389892578125,
-0.0164337158203125,
0.013397216796875,
0.0243682861328125,
-0.033477783203125,
0.00009495019912719727,
0.0010128021240234375,
0.0018062591552734375,
0.01259613037109375,
0.01751708984375,
0.032012939453125,
-0.0015859603881835938,
0.0018415451049804688,
0.0065765380859375,
0.038116455078125,
-0.018890380859375,
0.0308990478515625,
-0.006626129150390625,
0.036895751953125,
0.0112762451171875,
0.0309906005859375,
-0.020782470703125,
0.00994110107421875,
-0.016387939453125,
0.039337158203125,
-0.0225982666015625,
0.0028934478759765625,
0.013702392578125,
-0.03167724609375,
0.014984130859375,
0.00473785400390625,
0.034423828125,
0.00847625732421875,
-0.004375457763671875,
-0.005741119384765625,
0.0005788803100585938,
0.0102386474609375
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.